* lib/mkdir-p.c (make_dir_parents): Close a race condition that
[gnulib.git] / ChangeLog
1 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
4         occurs when "mkdir -m foo" creates a setgid directory that is (1)
5         writeable to group or other and (2) is intended to have a special
6         mode bit that is set or cleared.  In such a case, the directory
7         should be neither group- nor other-writeable until the special
8         mode bits are right.
9
10 2007-01-31  Eric Blake  <ebb9@byu.net>
11
12         * modules/mountlist (Depends-on): Add strstr
13
14         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
15         bug.
16         * modules/string (Makefile.am): Remove redundant replacement.
17         * modules/regex (Depends-on): Add mempcpy.
18
19 2007-01-31  Bruno Haible  <bruno@clisp.org>
20
21         New module description field 'Link'.
22         * gnulib-tool (func_usage): Document --extract-link-directive.
23         (sed_extract_prog): Recognize 'Link' directive.
24         (func_get_link_directive): New function.
25         (func_import): Show summary of link directives.
26         Handle --extract-link-directive option.
27         * modules/acl (Link): New section.
28         * modules/clock-time (Link): New section.
29         * modules/euidaccess (Link): New section.
30         * modules/gettext (Link): New section.
31         * modules/iconv (Link): New section.
32         * modules/lock (Link): New section.
33         * modules/nanosleep (Link): New section.
34         * modules/readline (Link): New section.
35
36 2007-01-27  Bruno Haible  <bruno@clisp.org>
37
38         Enforce the use of gnulib modules for unportable <string.h> functions.
39         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
40         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
41         (gl_HEADER_STRING_H_BODY): Require it.
42         * lib/string_.h: If the gnulib module XYZ is not present, redefine
43         the symbol XYZ to one that gives a link error.
44         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
45         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
46         * modules/mempcpy (configure.ac): Likewise.
47         * modules/memrchr (configure.ac): Likewise.
48         * modules/stpcpy (configure.ac): Likewise.
49         * modules/stpncpy (configure.ac): Likewise.
50         * modules/strcase (configure.ac): Likewise.
51         * modules/strcasestr (configure.ac): Likewise.
52         * modules/strchrnul (configure.ac): Likewise.
53         * modules/strdup (configure.ac): Likewise.
54         * modules/strndup (configure.ac): Likewise.
55         * modules/strnlen (configure.ac): Likewise.
56         * modules/strpbrk (configure.ac): Likewise.
57         * modules/strsep (configure.ac): Likewise.
58         * modules/strstr (configure.ac): Likewise.
59         * modules/strtok_r (configure.ac): Likewise.
60
61 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
62
63         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
64
65 2007-01-30  Jim Meyering  <jim@meyering.net>
66
67         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
68
69 2007-01-29  Bruno Haible  <bruno@clisp.org>
70
71         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
72         * lib/execute.c: Likewise.
73         * lib/pipe.c: Likewise.
74         * lib/printf-args.h: Likewise.
75         * lib/printf-args.c: Likewise.
76         * lib/printf-parse.c: Likewise.
77         * lib/vasnprintf.c: Likewise.
78
79 2007-01-29  Eric Blake  <ebb9@byu.net>
80
81         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
82         declaration.
83
84 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
85
86         * lib/strptime.h (strptime): Use 'restrict' for args where
87         POSIX requires this.
88         * lib/strptime.c (strptime): Likewise.
89         Change license notice from LGPL to GPL, since gnulib-tool will
90         change this as needed.
91         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
92         defined.
93         Include "strptime.h" first, to check interface.
94         Do not #undef _LIBC and _NL_CURRENT.
95         Do not include <stdlib.h>; no longer needed.
96         Include "time_r.h" and declare ptime_locale_status
97         only if _LIBC is not defined.
98         (__P): Remove unused macro.
99         (match_string): Bring back glibc version, but use it only if _LIBC
100         is defined.
101         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
102         Remove unnecessary assertion and abort() call.
103         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
104         * m4/strptime.m4: Fix serial number comment.
105         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
106         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
107         (Depends-on): Add time_r.
108
109 2007-01-29  Bruno Haible  <bruno@clisp.org>
110
111         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
112         strptime.
113         * modules/strptime (Depends-on): Add stdbool.
114         * lib/strptime.h: Include <time.h> always. Add comments.
115
116 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
117
118         * modules/strptime: New file.
119         * lib/strptime.h: New file.
120         * lib/strptime.c: New file.
121         * m4/strptime.m4: New file.
122
123 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
124
125         * MODULES.html.sh: New module mpsort.
126         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
127
128         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
129         a circularity problem with HP-UX ia64 reported by Bob Proulx in
130         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
131         All uses changed.
132         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
133         All uses changed.
134         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
135         to _Restrict_.
136         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
137         the parameter matches the prototype.
138
139 2007-01-28  Jim Meyering  <jim@meyering.net>
140
141         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
142         sys/time.h here, reverting that part of the previous patch:
143         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
144
145 2007-01-28  Bruno Haible  <bruno@clisp.org>
146
147         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
148         value of $(SYS_TIME_H).
149         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
150         remove it conditionally, too. [added by Jim Meyering]
151         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
152         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
153         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
154         GETTIMEOFDAY_REPLACEMENT to 1.
155
156 2007-01-28  Bruno Haible  <bruno@clisp.org>
157
158         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
159         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
160         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
161         Set UNISTD_H instead of UNISTD_H2.
162         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
163
164 2007-01-28  Bruno Haible  <bruno@clisp.org>
165
166         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
167         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
168
169 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
170
171         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
172         (func_create_testdir): Ensure C locale for `grep' and `tr'
173         character ranges.
174         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
175         ACLOCAL_AMFLAGS parsing state machine.
176
177 2007-01-27  Bruno Haible  <bruno@clisp.org>
178
179         * modules/unistr/base: Update.
180
181 2007-01-27  Bruno Haible  <bruno@clisp.org>
182
183         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
184         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
185         * modules/unistr/u32-mbtouc-unsafe: Renamed from
186         modules/unistr/u32-mbtouc.
187         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
188         * lib/unistr.h: Update.
189         * lib/linebreak.c: Update.
190         * modules/unistr/u32-mbtouc: Renamed from
191         modules/unistr/u32-mbtouc-safe.
192         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
193         * lib/unistr.h: Update.
194         * lib/unistr/u32-to-u8.c: Update.
195         * lib/unistr/u32-to-u16.c: Update.
196
197 2007-01-27  Bruno Haible  <bruno@clisp.org>
198
199         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
200         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
201         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
202         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
203         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
204         * modules/unistr/u16-mbtouc-unsafe: Renamed from
205         modules/unistr/u16-mbtouc.
206         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
207         * lib/unistr.h: Update.
208         * lib/linebreak.c: Update.
209         * modules/linebreak: Update.
210         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
211         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
212         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
213         * modules/unistr/u16-mbtouc: Renamed from
214         modules/unistr/u16-mbtouc-safe.
215         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
216         * lib/unistr.h: Update.
217         * lib/unistr/u16-to-u8.c: Update.
218         * modules/unistr/u16-to-u8: Update.
219         * lib/unistr/u16-to-u32.c: Update.
220         * modules/unistr/u16-to-u32: Update.
221
222 2007-01-27  Bruno Haible  <bruno@clisp.org>
223
224         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
225         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
226         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
227         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
228         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
229         * modules/unistr/u8-mbtouc-unsafe: Renamed from
230         modules/unistr/u8-mbtouc.
231         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
232         * lib/unistr.h: Update.
233         * lib/striconveh.c: Update.
234         * modules/striconveh: Update.
235         * lib/linebreak.c: Update.
236         * modules/linebreak: Update.
237         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
238         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
239         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
240         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
241         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
242         * lib/unistr.h: Update.
243         * lib/striconveh.c: Update.
244         * modules/striconveh: Update.
245         * lib/unistr/u8-to-u16.c: Update.
246         * modules/unistr/u8-to-u16: Update.
247         * lib/unistr/u8-to-u32.c: Update.
248         * modules/unistr/u8-to-u32: Update.
249
250 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
251
252         Sync from Libtool.
253         * lib/argz.c: Do not include strings.h nor memory.h, include
254         string.h unconditionally.  Patch by Simon Josefsson.
255
256 2007-01-27  Bruno Haible  <bruno@clisp.org>
257
258         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
259         from gl_HEADER_STRING_H_BODY.
260         (gl_HEADER_STRING_H_BODY): Require it.
261         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
262         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
263         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
264         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
265         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
266         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
267         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
268         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
269         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
270         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
271         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
272         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
273         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
274         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
275         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
276
277 2007-01-27  Bruno Haible  <bruno@clisp.org>
278
279         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
280         check_PROGRAMS into noinst_PROGRAMS.
281         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
282         check_PROGRAMS in this case.
283         (func_import): Set for_test to false.
284         (func_create_testdir): Set for_test to true.
285
286 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
287             Bruno Haible  <bruno@clisp.org>
288
289         * modules/strcasestr (Files): Remove lib/strcasestr.h.
290         (Depends-on): Add string.
291         (Includes): Use <string.h> instead of strcasestr.h.
292         * modules/string (Makefile.am): Also substitute the value of
293         REPLACE_STRCASESTR.
294         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
295         assume strcasestr is declared in <string.h> not <strings.h>. Also
296         set REPLACE_STRCASESTR.
297         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
298         REPLACE_STRCASESTR.
299         * lib/strcasestr.h: Remove file.
300         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
301         * lib/string_.h (strcasestr): New declaration.
302
303 2007-01-27  Bruno Haible  <bruno@clisp.org>
304
305         * lib/string_.h: Use 'extern'.
306
307 2007-01-27  Jim Meyering  <jim@meyering.net>
308
309         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
310         of set-but-not-used local, "q".
311
312         * lib/mempcpy.c: Include <config.h> before <string.h>.
313         This fixes a compilation error on HP-UX, due to the system's
314         "restrict"-using mempcpy prototype.
315
316 2007-01-26  Bruno Haible  <bruno@clisp.org>
317
318         Small optimization.
319         * lib/javacomp.c: Include c-strstr.h.
320          (is_envjavac_gcj): Use c_strstr instead of strstr.
321         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
322
323 2007-01-26  Bruno Haible  <bruno@clisp.org>
324
325         * MODULES.html.sh (Unicode string functions): Add the new modules.
326
327         * modules/uniconv/u32-strconv-to-locale: New file.
328         * lib/uniconv/u32-strconv-to-locale.c: New file.
329
330         * modules/uniconv/u16-strconv-to-locale: New file.
331         * lib/uniconv/u16-strconv-to-locale.c: New file.
332
333         * modules/uniconv/u8-strconv-to-locale: New file.
334         * lib/uniconv/u8-strconv-to-locale.c: New file.
335
336         * modules/uniconv/u32-strconv-from-locale: New file.
337         * lib/uniconv/u32-strconv-from-locale.c: New file.
338
339         * modules/uniconv/u16-strconv-from-locale: New file.
340         * lib/uniconv/u16-strconv-from-locale.c: New file.
341
342         * modules/uniconv/u8-strconv-from-locale: New file.
343         * lib/uniconv/u8-strconv-from-locale.c: New file.
344
345         * modules/uniconv/u32-strconv-to-enc: New file.
346         * lib/uniconv/u32-strconv-to-enc.c: New file.
347         * modules/uniconv/u32-strconv-to-enc-tests: New file.
348         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
349
350         * modules/uniconv/u16-strconv-to-enc: New file.
351         * lib/uniconv/u16-strconv-to-enc.c: New file.
352         * lib/uniconv/u-strconv-to-enc.h: New file.
353         * modules/uniconv/u16-strconv-to-enc-tests: New file.
354         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
355
356         * modules/uniconv/u8-strconv-to-enc: New file.
357         * lib/uniconv/u8-strconv-to-enc.c: New file.
358         * modules/uniconv/u8-strconv-to-enc-tests: New file.
359         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
360
361         * modules/uniconv/u32-strconv-from-enc: New file.
362         * lib/uniconv/u32-strconv-from-enc.c: New file.
363         * modules/uniconv/u32-strconv-from-enc-tests: New file.
364         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
365
366         * modules/uniconv/u16-strconv-from-enc: New file.
367         * lib/uniconv/u16-strconv-from-enc.c: New file.
368         * modules/uniconv/u16-strconv-from-enc-tests: New file.
369         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
370
371         * modules/uniconv/u8-strconv-from-enc: New file.
372         * lib/uniconv/u8-strconv-from-enc.c: New file.
373         * lib/uniconv/u-strconv-from-enc.h: New file.
374         * modules/uniconv/u8-strconv-from-enc-tests: New file.
375         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
376
377         * modules/uniconv/u32-conv-from-enc: New file.
378         * lib/uniconv/u32-conv-from-enc.c: New file.
379         * modules/uniconv/u32-conv-from-enc-tests: New file.
380         * tests/uniconv/test-u32-conv-from-enc.c: New file.
381
382         * modules/uniconv/u16-conv-from-enc: New file.
383         * lib/uniconv/u16-conv-from-enc.c: New file.
384         * lib/uniconv/u-conv-from-enc.h: New file.
385         * modules/uniconv/u16-conv-from-enc-tests: New file.
386         * tests/uniconv/test-u16-conv-from-enc.c: New file.
387
388         * modules/uniconv/u8-conv-from-enc: New file.
389         * lib/uniconv/u8-conv-from-enc.c: New file.
390         * modules/uniconv/u8-conv-from-enc-tests: New file.
391         * tests/uniconv/test-u8-conv-from-enc.c: New file.
392
393         * modules/uniconv/base: New file.
394         * lib/uniconv.h: New file.
395
396 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
397
398         * doc/gnulib-tool.texi (Initial import): Update to match current
399         behavior with strdup module.
400         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
401         * lib/memmem.h: Remove; all uses removed.  This is now done
402         by <string.h>.
403         * lib/mempcpy.h: Likewise.
404         * lib/memrchr.h: Likewise.
405         * lib/stpcpy.h: Likewise.
406         * lib/stpncpy.h: Likewise.
407         * lib/strcase.h: Likewise.
408         * lib/strchrnul.h: Likewise.
409         * lib/strdup.h: Likewise.
410         * lib/strndup.h: Likewise.
411         * lib/strnlen.h: Likewise.
412         * lib/strpbrk.h: Likewise.
413         * lib/strsep.h: Likewise.
414         * lib/strstr.h: Likewise.
415         * lib/strtok_r.h: Likewise.
416         * lib/string_.h: New file.
417         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
418         Rely on <string.h> instead.
419         * lib/canon-host.c: Likewise.
420         * lib/chdir-long.c: Likewise.
421         * lib/concatpath.c: Likewise.
422         * lib/exclude.c: Likewise.
423         * lib/fchdir.c: Likewise.
424         * lib/getaddrinfo.c: Likewise.
425         * lib/getcwd.c: Likewise.
426         * lib/getsubopt.c: Likewise.
427         * lib/glob.c: Likewise.
428         * lib/hard-locale.c: Likewise.
429         * lib/iconvme.c: Likewise.
430         * lib/javacomp.c: Likewise.
431         * lib/mempcpy.c: Likewise.
432         * lib/memrchr.c: Likewise.
433         * lib/regex_internal.h: Likewise.
434         * lib/stpncpy.c: Likewise.
435         * lib/strcasecmp.c: Likewise.
436         * lib/strchrnul.c: Likewise.
437         * lib/strdup.c: Likewise.
438         * lib/striconv.c: Likewise.
439         * lib/striconveh.c: Likewise.
440         * lib/striconveha.c: Likewise.
441         * lib/strncasecmp.c: Likewise.
442         * lib/strndup.c: Likewise.
443         * lib/strnlen.c: Likewise.
444         * lib/strsep.c: Likewise.
445         * lib/strstr.c: Likewise.
446         * lib/strtok_r.c: Likewise.
447         * lib/userspec.c: Likewise.
448         * lib/w32spawn.h: Likewise.
449         * lib/xstrndup.c: Likewise.
450         * lib/mountlist.c (strstr): Remove decl.
451         * m4/string_h.m4: New file.
452         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
453         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
454         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
455         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
456         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
457         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
458         Set REPLACE_STRCASECMP if necessary.
459         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
460         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
461         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
462         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
463         HAVE_DECL_STRDUP if necessary.
464         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
465         since gl_FUNC_STRNDUP does that now.
466         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
467         Check for decl here...
468         (gl_PREREQ_STRNLEN): ... not here.
469         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
470         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
471         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
472         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
473         necessary.
474         * modules/string: New file.
475         * modules/memmem (Files): Remove special-purpose include file.
476         (Depends-on): Add string.
477         (Include): Include <string.h>, not the removed file.
478         * modules/mempcpy: Likewise.
479         * modules/memrchr: Likewise.
480         * modules/stpcpy: Likewise.
481         * modules/stpncpy: Likewise.
482         * modules/strcase: Likewise.
483         * modules/strchrnul: Likewise.
484         * modules/strdup: Likewise.
485         * modules/strndup: Likewise.
486         * modules/strnlen: Likewise.
487         * modules/strpbrk: Likewise.
488         * modules/strsep: Likewise.
489         * modules/strstr: Likewise.
490         * modules/strtok_r: Likewise.
491         * tests/test-dirname.c: Don't include "strdup.h", since
492         <string.h> now suffices.
493         * tests/test-memmem.c: Don't include "memmem.h", since
494         <string.h> now suffices.
495
496 2007-01-25  Bruno Haible  <bruno@clisp.org>
497
498         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
499         *resultp is 0.
500
501         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
502         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
503         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
504         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
505
506         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
507         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
508         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
509         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
510         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
511         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
512
513 2007-01-24  Bruno Haible  <bruno@clisp.org>
514
515         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
516         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
517         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
518         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
519         gl_FUNC_FTS_CORE.
520         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
521         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
522         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
523         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
524         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
525         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
526         gl_FUNC_FCHOWNAT.
527         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
528         gl_FUNC_STRFTIME.
529         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
530         Reported by Ralf Wildenhues.
531
532 2007-01-24  Bruno Haible  <bruno@clisp.org>
533
534         Drop AC_REQUIRE calls that are redundant with the module dependencies.
535         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
536         gl_GETADDRINFO.
537         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
538         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
539         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
540
541 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
542
543         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
544         Don't use 'exit'; just return from 'main'.
545         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
546
547         * lib/fnmatch_.h: Readjust white space and comments to match
548         glibc, to avoid spurious diffs.
549
550 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
551
552         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
553         2004-12-01 change by Jakub Jelinek, since this code won't compile
554         if !LIBC.  Problem reported by Bob Proulx.
555
556 2007-01-23  Bruno Haible  <bruno@clisp.org>
557
558         * lib/striconveh.c: Include c-strcaseeq.h.
559         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
560         * modules/striconveh (Depends-on): Add c-strcaseeq.
561
562 2007-01-23  Bruno Haible  <bruno@clisp.org>
563
564         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
565
566         * modules/c-strcaseeq: New file.
567         * lib/c-strcaseeq.h: New file.
568
569         * modules/streq: New file.
570         * lib/streq.h: New file.
571
572 2007-01-23  Bruno Haible  <bruno@clisp.org>
573
574         * modules/striconveha-tests: New file.
575         * tests/test-striconveha.c: New file.
576
577         * lib/striconveha.h: Include <stdbool.h>.
578         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
579         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
580         (mem_iconveha_notranslit): Renamed from mem_iconveha.
581         (mem_iconveha): New function.
582         (str_iconveha_notranslit): Renamed from str_iconveha.
583         (str_iconveha): New function.
584         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
585         c-strcase.
586
587 2007-01-23  Bruno Haible  <bruno@clisp.org>
588
589         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
590         encodings without forgiving before trying any encoding with handler.
591         (str_iconveha): Try all encodings without forgiving before trying any
592         encoding with handler.
593
594 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
595
596         Import the following changes from libc.
597
598         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
599
600         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
601
602         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
603
604         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
605         normal_bracket label.
606
607         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
608
609         [BZ #361]
610         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
611         to normal_bracket after fetching the next character.
612
613 2007-01-22  Bruno Haible  <bruno@clisp.org>
614
615         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
616         argument.
617         * lib/striconveh.c (iconv_carefully_1): New function.
618         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
619         argument.
620         (str_cd_iconveh): Update.
621         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
622         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
623         * tests/test-striconveh.c (MAGIC): New macro.
624         (new_offsets): New function.
625         (main): Test call with and without offsets.
626
627 2007-01-22  Bruno Haible  <bruno@clisp.org>
628
629         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
630         * modules/sys_select (Makefile.am): Likewise.
631         * modules/sys_socket (Makefile.am): Likewise.
632         * modules/sys_time (Makefile.am): Likewise.
633
634 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
635
636         * modules/gettimeofday (License): Change from GPL to LGPL, since
637         gettimeofday is a library function.
638
639 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
640
641         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
642
643 2007-01-21  Bruno Haible  <bruno@clisp.org>
644
645         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
646
647 2007-01-21  Bruno Haible  <bruno@clisp.org>
648
649         * modules/striconveha: New file.
650         * lib/striconveha.h: New file.
651         * lib/striconveha.c: New file.
652         * MODULES.html.sh (Internationalization functions): Add striconveha.
653         * lib/striconv.c (str_iconv): Optimize the case of an empty input
654         string.
655         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
656
657 2007-01-21  Bruno Haible  <bruno@clisp.org>
658
659         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
660         * lib/striconveh.c (str_iconveh): Likewise.
661
662 2007-01-21  Bruno Haible  <bruno@clisp.org>
663
664         * lib/striconveh.h (mem_iconveh): New declaration.
665         * lib/striconveh.c (mem_iconveh): New function.
666         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
667
668 2007-01-21  Bruno Haible  <bruno@clisp.org>
669
670         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
671
672         * lib/striconveh.h (mem_cd_iconveh): Change specification.
673         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
674         original result buffer.
675         (str_cd_iconveh): Update.
676         * tests/test-striconveh.c (main): Update.
677
678         * lib/striconv.h (mem_cd_iconv): Change specification.
679         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
680         result buffer.
681         (str_cd_iconv): Update.
682         * tests/test-striconv.c (main): Update.
683
684 2007-01-21  Bruno Haible  <bruno@clisp.org>
685
686         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
687
688 2007-01-20  Jim Meyering  <jim@meyering.net>
689
690         * lib/userspec.c (parse_with_separator): If a user or group string
691         starts with "+", skip the corresponding name-to-ID look-up, since
692         such a look-up must fail: user and group names may not include "+".
693
694 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
695
696         * lib/poll.c: Include sys/time.h and time.h unconditionally,
697         since we now assume the sys_time module.
698         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
699         check for sys/time.h; no longer needed.
700         * modules/poll (Depends-on): Depend on sys_time.
701
702 2007-01-18  Bruno Haible  <bruno@clisp.org>
703
704         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
705         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
706
707         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
708         gettimeofday.
709
710         * tests/test-gettimeofday.c: Include <time.h>.
711         (dummy): Remove variable.
712
713         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
714         gl_HEADER_SYS_TIME_H.
715         (gl_HEADER_SYS_TIME_H): New macro.
716
717         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
718         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
719         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
720         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
721         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
722         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
723         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
724         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
725         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
726         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
727         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
728
729         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
730         last change; it caused a compilation error when cross-compiling to
731         Cygwin.
732
733 2007-01-18  Jim Meyering  <jim@meyering.net>
734
735         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
736         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
737         than the race-prone "test -d sys || mkdir sys".
738         (configure.ac): Use AC_PROG_MKDIR_P.
739         * modules/sys_select: Likewise.
740         * modules/sys_socket: Likewise.
741         * modules/sys_time: Likewise.
742
743 2007-01-18  Eric Blake  <ebb9@byu.net>
744
745         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
746         replace gettimeofday.
747         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
748         name, to avoid infinite recursion.
749
750 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
751
752         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
753         module sys_time.
754         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
755         assume timespec.h defines struct timeval.
756         * lib/settime.c: Likewise.
757         * lib/utimens.c: Likewise.
758         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
759         since we now assume the gettimeofday module.
760         * lib/tempname.c (__gen_tempname): Likewise.
761         * lib/gettimeofday.h: Remove.
762         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
763         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
764         Include <time.h>, for 'time()'.
765         (localtime_buffer_addr): Also use this workaround if
766         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
767         to simplify the uses.  All uses changed.
768         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
769         that #undef is inside {}, and 'const' follows type name consistently.
770         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
771         (gettimeofday): Do not use the maximum possible value for
772         tv->tv_usec, since that might break usages other than ls.c.
773         Instead, we'll leave ls.c alone.  This undoes today's patch
774         by Bruno.  Add a compile-time warning for 1s-clock resolution;
775         we've never observed the problem but might as well keep the
776         canary.
777         * lib/nanosleep.c: Include timespec.h first, for interface check.
778         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
779         now assume the sys_time module.
780         * lib/tempname.c: Likewise.
781         * lib/timespec.h: Likewise.
782         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
783         needed.
784         * lib/strftime.c: Likewise.
785         * lib/timespec.h: Likewise.
786         * lib/posixtm.c: Include posixtm.h first, for interface check.
787         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
788         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
789         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
790         * lib/sys_time_.h: New file.
791         * lib/timespec.h (struct timespec): Use long int, not long.
792         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
793         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
794         Remove obsolescent call to AC_HEADER_TIME.
795         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
796         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
797         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
798         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
799         Likewise.
800         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
801         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
802         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
803         into the sys_time module.  Check for gettimeofday just once.
804         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
805         for gettimeofday signature to just check the signature.  Merely
806         compile it, since linking doesn't test signature.  Improve test for
807         whether gettimeofday.o is actually needed.
808         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
809         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
810         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
811         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
812         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
813         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
814         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
815         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
816         than worrying about sys/time.h.
817         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
818         Don't bother worrying about TIME_WITH_SYS_TIME.
819         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
820         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
821         * m4/sys_time_h.m4: New file.
822         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
823         Don't include sys/time.h.  Return from main rather than exiting.
824         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
825         all uses changed.
826         * modules/gethrxtime (Depends-on): Add sys_time.
827         * modules/gettime (Depends-on): Likewise.
828         * modules/gettimeofday (Depends-on): Likewise.
829         * modules/nanosleep (Depends-on): Likewise.
830         * modules/settime (Depends-on): Likewise.
831         * modules/tempname (Depends-on): Likewise.
832         * modules/utimens (Depends-on): Likewise.
833         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
834         (Include:) Change back to <sys/time.h>.
835         (Maintainer:) Add self.
836         * modules/sys_time: New file.
837         * modules/tempname (Depends-on): Add gettimeofday.
838         * tests/test-gettimeofday.c: Include <sys/time.h>
839         rather than gettimeofday.h.
840
841 2007-01-17  Bruno Haible  <bruno@clisp.org>
842
843         * gnulib-tool (func_get_license): Revert last patch. Instead, let
844         the license default to GPL.
845         (func_create_testdir): Don't complain if a module is LGPL and its
846         tests module depends on GPLed modules.
847
848 2007-01-17  Bruno Haible  <bruno@clisp.org>
849
850         * lib/gettimeofday.c (gettimeofday): Add code for the case
851         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
852         maximum possible value for tv->tv_usec, rather than the minimum one.
853
854 2005-10-08  Martin Lambers  <marlam@marlam.de>
855 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
856 2007-01-16  Bruno Haible  <bruno@clisp.org>
857
858         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
859         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
860         gl_FUNC_GETTIMEOFDAY.
861         (Include): Add gettimeofday.h.
862         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
863         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
864         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
865         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
866         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
867         * lib/gettimeofday.h: New file.
868         * lib/gettimeofday.c: Include <sys/timeb.h>.
869         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
870         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
871         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
872         fall back on time().
873
874         * tests/test-gettimeofday.c: New file.
875         * modules/gettimeofday-tests: New file.
876
877 2007-01-16  Eric Blake  <ebb9@byu.net>
878
879         * modules/fnmatch (Depends-on): Depend on wchar.
880         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
881         * m4/fnmatch.m4: Likewise.
882         * modules/mbchar (Makefile.am): Assume <wchar.h>.
883         * m4/mbchar.m4: Likewise.
884         * modules/mbswidth (Depends-on): Depend on wchar.
885         * lib/mbswidth.c: Assume <wchar.h>.
886         * m4/mbswidth.m4: Likewise.
887         * modules/quotearg (Depends-on): Depend on wchar.
888         * lib/quotearg.c: Assume <wchar.h>.
889         * m4/quotearg.m4: Likewise.
890         * modules/regex (Depends-on): Depend on wchar.
891         * lib/regex_internal.h: Assume <wchar.h>.
892         * m4/regex.m4: Likewise.
893         * modules/stdint (Depends-on): Depend on wchar.
894         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
895         * m4/stdint.m4: Likewise.
896         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
897         * modules/strftime (Depends-on): Depend on wchar.
898         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
899         * modules/strtol (Depends-on): Depend on wchar.
900         * lib/strtol.c: Assume <wchar.h>.
901         * modules/wcwidth (Depends-on): Depend on wchar.
902         * lib/wcwidth.h: Assume <wchar.h>.
903         * m4/wcwidth.m4: Likewise.
904
905 2007-01-16  Bruno Haible  <bruno@clisp.org>
906
907         * modules/csharpexec-script: New, created from...
908         * modules/csharpexec: ... this.
909
910 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
911
912         * modules/javaexec-script: New, created from...
913         * modules/javaexec: ... this.
914
915 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
916
917         * modules/poll (Dependencies): Add sys_select.
918
919 2007-01-15  Jim Meyering  <jim@meyering.net>
920
921         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
922         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
923         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
924         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
925
926 2007-01-15  Bruno Haible  <bruno@clisp.org>
927
928         * modules/striconveh: New file.
929         * lib/striconveh.h: New file.
930         * lib/striconveh.c: New file.
931         * MODULES.html.sh (Internationalization functions): Add striconveh.
932
933         * modules/striconveh-tests: New file.
934         * tests/test-striconveh.c: New file.
935
936 2007-01-15  Bruno Haible  <bruno@clisp.org>
937
938         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
939         not from GNU libiconv or GNU libc.
940
941 2007-01-15  Bruno Haible  <bruno@clisp.org>
942
943         * doc/gnulib-intro.texi (Copyright): Explain the different license
944         terms for module descriptions, autoconf macros, tests, documentation.
945
946 2007-01-14  Bruno Haible  <bruno@clisp.org>
947
948         * modules/striconv-tests: New file.
949         * tests/test-striconv.c: New file.
950
951 2007-01-14  Bruno Haible  <bruno@clisp.org>
952
953         * modules/iconv-tests: New file.
954         * tests/test-iconv.c: New file.
955
956 2007-01-14  Bruno Haible  <bruno@clisp.org>
957
958         * gnulib-tool (func_get_license): For test modules, use the license of
959         the main module.
960
961 2007-01-14  Bruno Haible  <bruno@clisp.org>
962
963         * modules/iconv (Include): Clarify that <iconv.h> can only be included
964         if iconv is found to exist.
965
966 2007-01-14  Bruno Haible  <bruno@clisp.org>
967
968         * modules/c-ctype-tests: New file.
969         * tests/test-c-ctype.c: New file.
970
971 2007-01-14  Bruno Haible  <bruno@clisp.org>
972
973         * modules/binary-io-tests: New file.
974         * tests/test-binary-io.sh: New file.
975         * tests/test-binary-io.c: New file.
976
977 2007-01-14  Bruno Haible  <bruno@clisp.org>
978
979         * modules/array-oset-tests: New file.
980         * tests/test-array_oset.c: New file.
981
982 2007-01-14  Bruno Haible  <bruno@clisp.org>
983
984         * modules/array-list-tests: New file.
985         * tests/test-array_list.c: New file.
986
987 2007-01-14  Bruno Haible  <bruno@clisp.org>
988
989         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
990         and make.
991         Reported by Simon Josefsson in
992         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
993
994 2007-01-14  Bruno Haible  <bruno@clisp.org>
995
996         * modules/allocsa-tests: New file.
997         * tests/test-allocsa.c: New file.
998
999 2007-01-14  Bruno Haible  <bruno@clisp.org>
1000
1001         * modules/fchdir (Depends-on): Add absolute-header.
1002         * modules/unistd (Depends-on): Likewise.
1003
1004 2006-12-30  Bruno Haible  <bruno@clisp.org>
1005
1006         * modules/fchdir: New file.
1007         * modules/unistd (Files): Add lib/unistd_.h.
1008         (Makefile.am): Generate unistd.h from unistd_.h.
1009         * lib/fchdir.c: New file.
1010         * lib/dirent_.h: New file.
1011         * lib/unistd_.h: New file.
1012         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1013         * m4/fchdir.m4: New file.
1014         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1015         (gl_HEADER_UNISTD): Invoke it.
1016         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1017         function.
1018         * lib/backupfile.c (opendir, closedir): Undefine.
1019         * lib/chown.c (open, close): Undefine.
1020         * lib/clean-temp.c (open, close): Undefine.
1021         * lib/copy-file.c (open, close): Undefine.
1022         * lib/execute.c (open, close): Undefine.
1023         * lib/fsusage.c (open, close): Undefine.
1024         * lib/gc-gnulib.c (open, close): Undefine.
1025         * lib/getcwd.c (opendir, closedir): Undefine.
1026         * lib/glob.c (opendir, closedir): Undefine.
1027         * lib/javacomp.c (open, close): Undefine.
1028         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1029         * lib/openat-proc.c (open, close): Undefine.
1030         * lib/pagealign_alloc.c (open, close): Undefine.
1031         * lib/pipe.c (open, close): Undefine.
1032         * lib/progreloc.c (open, close): Undefine.
1033         * lib/savedir.c (opendir, closedir): Undefine.
1034         * lib/utime.c (open, close): Undefine.
1035         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1036
1037 2007-01-10  Bruno Haible  <bruno@clisp.org>
1038
1039         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1040
1041 2007-01-12  Eric Blake  <ebb9@byu.net>
1042
1043         Provide a robust <wchar.h>.  Further simplifications are now
1044         possible in other modules, but not included here.
1045         * modules/wchar: New module.
1046         * m4/wchar.m4: New file.
1047         * lib/wchar_.h: Likewise.
1048         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1049         of the new module.
1050         * MODULES.html.sh (Extended multibyte and wide character utilities):
1051         New section.
1052
1053 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1054
1055         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1056         to a reasonable default for memory allocation.
1057         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1058         file system that reports garbage st_size values for symlinks.
1059         Problem reported by Liyang Hu.
1060
1061 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1062
1063         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1064         Emacs .#* auto-save files).
1065
1066 2007-01-11  Bruno Haible  <bruno@clisp.org>
1067
1068         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1069         directory.
1070
1071 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1072
1073         Use @...@ consistently in lib/wctype_.h.
1074         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1075         on it being set to 1 or 0.
1076         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1077         go back to AC_SUBSTing it.
1078         * modules/wctype (Makefile.am): Undo previous change.
1079
1080 2007-01-10  Eric Blake  <ebb9@byu.net>
1081
1082         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1083         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1084         * modules/wctype (Makefile.am): Likewise.
1085         Reported by Chris McGuire.
1086
1087 2007-01-10  Jim Meyering  <jim@meyering.net>
1088
1089         fts.c: a small readability/maintainability improvement
1090         * lib/fts.c (fts_read): Make this code slightly more readable and
1091         maintainable by hoisting the "sp->fts_cur = p" assignments to
1092         immediately follow the statements that set P.  Derived from
1093         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1094
1095 2007-01-10  Eric Blake  <ebb9@byu.net>
1096
1097         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1098         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1099         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1100         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1101         Reported by Chris McGuire.
1102
1103 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1104
1105         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1106         in sed script.
1107
1108 2007-01-09  Bruno Haible  <bruno@clisp.org>
1109
1110         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1111         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1112         variables.
1113         (func_module): Use them.
1114
1115 2007-01-09  Bruno Haible  <bruno@clisp.org>
1116
1117         * modules/unistr/base: New file.
1118         * lib/unistr.h: New file.
1119
1120         * modules/unistr/u8-to-u16: New file.
1121         * lib/unistr/u8-to-u16.c: New file.
1122
1123         * modules/unistr/u8-to-u32: New file.
1124         * lib/unistr/u8-to-u32.c: New file.
1125
1126         * modules/unistr/u16-to-u8: New file.
1127         * lib/unistr/u16-to-u8.c: New file.
1128
1129         * modules/unistr/u16-to-u32: New file.
1130         * lib/unistr/u16-to-u32.c: New file.
1131
1132         * modules/unistr/u32-to-u8: New file.
1133         * lib/unistr/u32-to-u8.c: New file.
1134
1135         * modules/unistr/u32-to-u16: New file.
1136         * lib/unistr/u32-to-u16.c: New file.
1137
1138         * modules/unistr/u8-check: New file.
1139         * modules/unistr/u16-check: New file.
1140         * modules/unistr/u32-check: New file.
1141         * lib/unistr/u8-check.c: New file.
1142         * lib/unistr/u16-check.c: New file.
1143         * lib/unistr/u32-check.c: New file.
1144
1145         * modules/unistr/u8-chr: New file.
1146         * modules/unistr/u16-chr: New file.
1147         * modules/unistr/u32-chr: New file.
1148         * lib/unistr/u8-chr.c: New file.
1149         * lib/unistr/u16-chr.c: New file.
1150         * lib/unistr/u32-chr.c: New file.
1151
1152         * modules/unistr/u8-cmp: New file.
1153         * modules/unistr/u16-cmp: New file.
1154         * modules/unistr/u32-cmp: New file.
1155         * lib/unistr/u8-cmp.c: New file.
1156         * lib/unistr/u16-cmp.c: New file.
1157         * lib/unistr/u32-cmp.c: New file.
1158
1159         * modules/unistr/u8-cpy: New file.
1160         * modules/unistr/u16-cpy: New file.
1161         * modules/unistr/u32-cpy: New file.
1162         * lib/unistr/u8-cpy.c: New file.
1163         * lib/unistr/u16-cpy.c: New file.
1164         * lib/unistr/u32-cpy.c: New file.
1165         * lib/unistr/u-cpy.h: New file.
1166
1167         * modules/unistr/u8-cpy-alloc: New file.
1168         * modules/unistr/u16-cpy-alloc: New file.
1169         * modules/unistr/u32-cpy-alloc: New file.
1170         * lib/unistr/u8-cpy-alloc.c: New file.
1171         * lib/unistr/u16-cpy-alloc.c: New file.
1172         * lib/unistr/u32-cpy-alloc.c: New file.
1173         * lib/unistr/u-cpy-alloc.h: New file.
1174
1175         * modules/unistr/u8-endswith: New file.
1176         * modules/unistr/u16-endswith: New file.
1177         * modules/unistr/u32-endswith: New file.
1178         * lib/unistr/u8-endswith.c: New file.
1179         * lib/unistr/u16-endswith.c: New file.
1180         * lib/unistr/u32-endswith.c: New file.
1181         * lib/unistr/u-endswith.h: New file.
1182
1183         * modules/unistr/u8-mblen: New file.
1184         * modules/unistr/u16-mblen: New file.
1185         * modules/unistr/u32-mblen: New file.
1186         * lib/unistr/u8-mblen.c: New file.
1187         * lib/unistr/u16-mblen.c: New file.
1188         * lib/unistr/u32-mblen.c: New file.
1189
1190         * modules/unistr/u8-mbtouc: New file.
1191         * modules/unistr/u16-mbtouc: New file.
1192         * modules/unistr/u32-mbtouc: New file.
1193         * lib/unistr/u8-mbtouc.c: New file.
1194         * lib/unistr/u16-mbtouc.c: New file.
1195         * lib/unistr/u32-mbtouc.c: New file.
1196
1197         * modules/unistr/u8-mbtouc-safe: New file.
1198         * modules/unistr/u16-mbtouc-safe: New file.
1199         * modules/unistr/u32-mbtouc-safe: New file.
1200         * lib/unistr/u8-mbtouc-safe.c: New file.
1201         * lib/unistr/u16-mbtouc-safe.c: New file.
1202         * lib/unistr/u32-mbtouc-safe.c: New file.
1203
1204         * modules/unistr/u8-move: New file.
1205         * modules/unistr/u16-move: New file.
1206         * modules/unistr/u32-move: New file.
1207         * lib/unistr/u8-move.c: New file.
1208         * lib/unistr/u16-move.c: New file.
1209         * lib/unistr/u32-move.c: New file.
1210         * lib/unistr/u-move.h: New file.
1211
1212         * modules/unistr/u8-next: New file.
1213         * modules/unistr/u16-next: New file.
1214         * modules/unistr/u32-next: New file.
1215         * lib/unistr/u8-next.c: New file.
1216         * lib/unistr/u16-next.c: New file.
1217         * lib/unistr/u32-next.c: New file.
1218
1219         * modules/unistr/u8-prev: New file.
1220         * modules/unistr/u16-prev: New file.
1221         * modules/unistr/u32-prev: New file.
1222         * lib/unistr/u8-prev.c: New file.
1223         * lib/unistr/u16-prev.c: New file.
1224         * lib/unistr/u32-prev.c: New file.
1225
1226         * modules/unistr/u8-set: New file.
1227         * modules/unistr/u16-set: New file.
1228         * modules/unistr/u32-set: New file.
1229         * lib/unistr/u8-set.c: New file.
1230         * lib/unistr/u16-set.c: New file.
1231         * lib/unistr/u32-set.c: New file.
1232         * lib/unistr/u-set.h: New file.
1233
1234         * modules/unistr/u8-startswith: New file.
1235         * modules/unistr/u16-startswith: New file.
1236         * modules/unistr/u32-startswith: New file.
1237         * lib/unistr/u8-startswith.c: New file.
1238         * lib/unistr/u16-startswith.c: New file.
1239         * lib/unistr/u32-startswith.c: New file.
1240         * lib/unistr/u-startswith.h: New file.
1241
1242         * modules/unistr/u8-stpcpy: New file.
1243         * modules/unistr/u16-stpcpy: New file.
1244         * modules/unistr/u32-stpcpy: New file.
1245         * lib/unistr/u8-stpcpy.c: New file.
1246         * lib/unistr/u16-stpcpy.c: New file.
1247         * lib/unistr/u32-stpcpy.c: New file.
1248         * lib/unistr/u-stpcpy.h: New file.
1249
1250         * modules/unistr/u8-stpncpy: New file.
1251         * modules/unistr/u16-stpncpy: New file.
1252         * modules/unistr/u32-stpncpy: New file.
1253         * lib/unistr/u8-stpncpy.c: New file.
1254         * lib/unistr/u16-stpncpy.c: New file.
1255         * lib/unistr/u32-stpncpy.c: New file.
1256         * lib/unistr/u-stpncpy.h: New file.
1257
1258         * modules/unistr/u8-strcat: New file.
1259         * modules/unistr/u16-strcat: New file.
1260         * modules/unistr/u32-strcat: New file.
1261         * lib/unistr/u8-strcat.c: New file.
1262         * lib/unistr/u16-strcat.c: New file.
1263         * lib/unistr/u32-strcat.c: New file.
1264         * lib/unistr/u-strcat.h: New file.
1265
1266         * modules/unistr/u8-strchr: New file.
1267         * modules/unistr/u16-strchr: New file.
1268         * modules/unistr/u32-strchr: New file.
1269         * lib/unistr/u8-strchr.c: New file.
1270         * lib/unistr/u16-strchr.c: New file.
1271         * lib/unistr/u32-strchr.c: New file.
1272
1273         * modules/unistr/u8-strcmp: New file.
1274         * modules/unistr/u16-strcmp: New file.
1275         * modules/unistr/u32-strcmp: New file.
1276         * lib/unistr/u8-strcmp.c: New file.
1277         * lib/unistr/u16-strcmp.c: New file.
1278         * lib/unistr/u32-strcmp.c: New file.
1279
1280         * modules/unistr/u8-strcpy: New file.
1281         * modules/unistr/u16-strcpy: New file.
1282         * modules/unistr/u32-strcpy: New file.
1283         * lib/unistr/u8-strcpy.c: New file.
1284         * lib/unistr/u16-strcpy.c: New file.
1285         * lib/unistr/u32-strcpy.c: New file.
1286         * lib/unistr/u-strcpy.h: New file.
1287
1288         * modules/unistr/u8-strcspn: New file.
1289         * modules/unistr/u16-strcspn: New file.
1290         * modules/unistr/u32-strcspn: New file.
1291         * lib/unistr/u8-strcspn.c: New file.
1292         * lib/unistr/u16-strcspn.c: New file.
1293         * lib/unistr/u32-strcspn.c: New file.
1294         * lib/unistr/u-strcspn.h: New file.
1295
1296         * modules/unistr/u8-strdup: New file.
1297         * modules/unistr/u16-strdup: New file.
1298         * modules/unistr/u32-strdup: New file.
1299         * lib/unistr/u8-strdup.c: New file.
1300         * lib/unistr/u16-strdup.c: New file.
1301         * lib/unistr/u32-strdup.c: New file.
1302         * lib/unistr/u-strdup.h: New file.
1303
1304         * modules/unistr/u8-strlen: New file.
1305         * modules/unistr/u16-strlen: New file.
1306         * modules/unistr/u32-strlen: New file.
1307         * lib/unistr/u8-strlen.c: New file.
1308         * lib/unistr/u16-strlen.c: New file.
1309         * lib/unistr/u32-strlen.c: New file.
1310         * lib/unistr/u-strlen.h: New file.
1311
1312         * modules/unistr/u8-strmblen: New file.
1313         * modules/unistr/u16-strmblen: New file.
1314         * modules/unistr/u32-strmblen: New file.
1315         * lib/unistr/u8-strmblen.c: New file.
1316         * lib/unistr/u16-strmblen.c: New file.
1317         * lib/unistr/u32-strmblen.c: New file.
1318
1319         * modules/unistr/u8-strmbtouc: New file.
1320         * modules/unistr/u16-strmbtouc: New file.
1321         * modules/unistr/u32-strmbtouc: New file.
1322         * lib/unistr/u8-strmbtouc.c: New file.
1323         * lib/unistr/u16-strmbtouc.c: New file.
1324         * lib/unistr/u32-strmbtouc.c: New file.
1325
1326         * modules/unistr/u8-strncat: New file.
1327         * modules/unistr/u16-strncat: New file.
1328         * modules/unistr/u32-strncat: New file.
1329         * lib/unistr/u8-strncat.c: New file.
1330         * lib/unistr/u16-strncat.c: New file.
1331         * lib/unistr/u32-strncat.c: New file.
1332         * lib/unistr/u-strncat.h: New file.
1333
1334         * modules/unistr/u8-strncmp: New file.
1335         * modules/unistr/u16-strncmp: New file.
1336         * modules/unistr/u32-strncmp: New file.
1337         * lib/unistr/u8-strncmp.c: New file.
1338         * lib/unistr/u16-strncmp.c: New file.
1339         * lib/unistr/u32-strncmp.c: New file.
1340
1341         * modules/unistr/u8-strncpy: New file.
1342         * modules/unistr/u16-strncpy: New file.
1343         * modules/unistr/u32-strncpy: New file.
1344         * lib/unistr/u8-strncpy.c: New file.
1345         * lib/unistr/u16-strncpy.c: New file.
1346         * lib/unistr/u32-strncpy.c: New file.
1347         * lib/unistr/u-strncpy.h: New file.
1348
1349         * modules/unistr/u8-strnlen: New file.
1350         * modules/unistr/u16-strnlen: New file.
1351         * modules/unistr/u32-strnlen: New file.
1352         * lib/unistr/u8-strnlen.c: New file.
1353         * lib/unistr/u16-strnlen.c: New file.
1354         * lib/unistr/u32-strnlen.c: New file.
1355         * lib/unistr/u-strnlen.h: New file.
1356
1357         * modules/unistr/u8-strpbrk: New file.
1358         * modules/unistr/u16-strpbrk: New file.
1359         * modules/unistr/u32-strpbrk: New file.
1360         * lib/unistr/u8-strpbrk.c: New file.
1361         * lib/unistr/u16-strpbrk.c: New file.
1362         * lib/unistr/u32-strpbrk.c: New file.
1363         * lib/unistr/u-strpbrk.h: New file.
1364
1365         * modules/unistr/u8-strrchr: New file.
1366         * modules/unistr/u16-strrchr: New file.
1367         * modules/unistr/u32-strrchr: New file.
1368         * lib/unistr/u8-strrchr.c: New file.
1369         * lib/unistr/u16-strrchr.c: New file.
1370         * lib/unistr/u32-strrchr.c: New file.
1371
1372         * modules/unistr/u8-strspn: New file.
1373         * modules/unistr/u16-strspn: New file.
1374         * modules/unistr/u32-strspn: New file.
1375         * lib/unistr/u8-strspn.c: New file.
1376         * lib/unistr/u16-strspn.c: New file.
1377         * lib/unistr/u32-strspn.c: New file.
1378         * lib/unistr/u-strspn.h: New file.
1379
1380         * modules/unistr/u8-strstr: New file.
1381         * modules/unistr/u16-strstr: New file.
1382         * modules/unistr/u32-strstr: New file.
1383         * lib/unistr/u8-strstr.c: New file.
1384         * lib/unistr/u16-strstr.c: New file.
1385         * lib/unistr/u32-strstr.c: New file.
1386         * lib/unistr/u-strstr.h: New file.
1387
1388         * modules/unistr/u8-strtok: New file.
1389         * modules/unistr/u16-strtok: New file.
1390         * modules/unistr/u32-strtok: New file.
1391         * lib/unistr/u8-strtok.c: New file.
1392         * lib/unistr/u16-strtok.c: New file.
1393         * lib/unistr/u32-strtok.c: New file.
1394         * lib/unistr/u-strtok.h: New file.
1395
1396         * modules/unistr/u8-uctomb: New file.
1397         * modules/unistr/u16-uctomb: New file.
1398         * modules/unistr/u32-uctomb: New file.
1399         * lib/unistr/u8-uctomb.c: New file.
1400         * lib/unistr/u16-uctomb.c: New file.
1401         * lib/unistr/u32-uctomb.c: New file.
1402
1403         * MODULES.html.sh (Unicode string functions): Add the new modules.
1404
1405 2007-01-08  Bruno Haible  <bruno@clisp.org>
1406
1407         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1408         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1409         subdirectories.
1410
1411 2007-01-08  Karl Berry  <karl@gnu.org>
1412
1413         * doc/error.texi: mention that main() fns must set program_name
1414         when progname is used.
1415
1416 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1417
1418         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1419         WCTYPE_H is empty, for the benefit of builds from non-distclean
1420         directories.  Problem reported by Eric Blake in
1421         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1422
1423 2007-01-08  Bruno Haible  <bruno@clisp.org>
1424
1425         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1426         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1427         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1428         PROVIDE_CANONICALIZE_FILENAME_MODE.
1429         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1430
1431 2007-01-08  Bruno Haible  <bruno@clisp.org>
1432
1433         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1434         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1435         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1436         * lib/fts.c: Likewise.
1437         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1438
1439 2006-12-25  Bruno Haible  <bruno@clisp.org>
1440
1441         * modules/utf8-ucs4-safe: New file.
1442         * lib/utf8-ucs4-safe.h: New file.
1443         * lib/unistr/utf8-ucs4-safe.c: New file.
1444
1445         * modules/utf16-ucs4-safe: New file.
1446         * lib/utf16-ucs4-safe.h: New file.
1447         * lib/unistr/utf16-ucs4-safe.c: New file.
1448
1449         * MODULES.html.sh (Unicode string functions): Add the new modules.
1450
1451 2007-01-08  Bruno Haible  <bruno@clisp.org>
1452
1453         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1454         (Depends-on): Add unitypes.
1455         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1456         (u8_mbtouc_aux): Move out to separate file.
1457         (u8_mbtouc): Use ucs4_t, uint8_t types.
1458         * lib/unistr/utf8-ucs4.c: New file.
1459
1460         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1461         (Depends-on): Add unitypes.
1462         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1463         (u16_mbtouc_aux): Move out to separate file.
1464         (u16_mbtouc): Use ucs4_t, uint16_t types.
1465         * lib/unistr/utf16-ucs4.c: New file.
1466
1467         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1468         (Depends-on): Add unitypes.
1469         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1470         (u8_uctomb_aux): Move out to separate file.
1471         (u8_uctomb): Use ucs4_t, uint8_t types.
1472         * lib/unistr/ucs4-utf8.c: New file.
1473
1474         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1475         (Depends-on): Add unitypes.
1476         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1477         (u16_uctomb_aux): Move out to separate file.
1478         (u16_uctomb): Use ucs4_t, uint16_t types.
1479         * lib/unistr/ucs4-utf16.c: New file.
1480
1481 2006-12-25  Bruno Haible  <bruno@clisp.org>
1482
1483         * modules/unitypes: New file.
1484         * lib/unitypes.h: New file.
1485         * MODULES.html.sh (func_all_modules): New section "Unicode string
1486         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1487         this section. Add unitypes.
1488
1489 2007-01-08  Bruno Haible  <bruno@clisp.org>
1490
1491         Avoid variable names that conflict with those from libtool.
1492         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1493         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1494         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1495         library_names_spec to acl_library_names_spec, hardcode_* to
1496         acl_hardcode_*.
1497         Reported by Ralf Wildenhues.
1498
1499 2007-01-08  Bruno Haible  <bruno@clisp.org>
1500
1501         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1502         definition.
1503         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1504         definition.
1505         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1506         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1507         definition.
1508         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1509         definition.
1510         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1511         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1512         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1513         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1514         definition.
1515         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1516         definition.
1517         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1518         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1519         GC_USE_<algorithm>.
1520         * lib/gc-libgcrypt.c: Likewise.
1521         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1522         * modules/gc-arctwo (configure.ac): Likewise.
1523         * modules/gc-des (configure.ac): Likewise.
1524         * modules/gc-hmac-md5 (configure.ac): Likewise.
1525         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1526         * modules/gc-md2 (configure.ac): Likewise.
1527         * modules/gc-md4 (configure.ac): Likewise.
1528         * modules/gc-md5 (configure.ac): Likewise.
1529         * modules/gc-random (configure.ac): Likewise.
1530         * modules/gc-rijndael (configure.ac): Likewise.
1531         * modules/gc-sha1 (configure.ac): Likewise.
1532
1533 2007-01-08  Bruno Haible  <bruno@clisp.org>
1534
1535         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1536         macro definition.
1537         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1538         definition.
1539         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1540         definition.
1541         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1542         * modules/fcntl-safer (configure.ac): Likewise.
1543         * modules/fopen-safer (configure.ac): Likewise.
1544         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1545         GNULIB_FWRITEERROR macro definition.
1546
1547 2007-01-08  Bruno Haible  <bruno@clisp.org>
1548
1549         * m4/gnulib-common.m4: New file.
1550         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1551         (func_get_filelist): Add m4/gnulib-common.m4.
1552
1553 2007-01-08  Bruno Haible  <bruno@clisp.org>
1554
1555         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1556         command.
1557
1558 2007-01-08  Jim Meyering  <jim@meyering.net>
1559
1560         Use a more robust test for a "can't happen" condition.
1561         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1562         narrowed the st_size value.  Presuming the "can't happen" condition
1563         is true, that narrowing could conceivably convert an invalid st_size
1564         value into a valid one.  Instead, use a change based on Matthew
1565         Woehlke's original patch.
1566
1567         Slight readability improvement: use an assert-like macro
1568         in place of literal "abort ()" uses.
1569         * lib/fts.c (fts_assert): Define.
1570         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1571         Use this macro instead of a bare 'abort'.
1572
1573 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1574
1575         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1576         simply work around them.
1577         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1578         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1579         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1580         Don't bother to define as macros, since the standard doesn't require it.
1581         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1582         longer worry about IRIX 5.3.
1583         (HAVE_WCTYPE_CTMP_BUG): Remove.
1584
1585 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1586
1587         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1588         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1589         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1590         Problems reported by Georg Schwarz for IRIX 5.3.
1591
1592         * gnulib-tool (autoconf_minversion): Take the maximum version number
1593         found, not the minimum.  Problem reported by James Youngman.
1594
1595 2007-01-03  Karl Berry  <karl@gnu.org>
1596
1597         * doc/error.texi: new file, explaining interaction with progname.
1598         * doc/gnulib.texi: include it.  Update copyright.
1599
1600 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1601
1602         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1603         AC_CANONICAL_HOST, to improve autobuild outputs.
1604
1605 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1606             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1607
1608         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1609         sockets, server sockets, and other file descriptors.  Count errors
1610         to compute the return value.  Reorder the code a bit to be easier
1611         to follow.  Don't set event bits that were not requested (except
1612         POLLERR and POLLHUP).
1613
1614 2007-01-01  Bruno Haible  <bruno@clisp.org>
1615
1616         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1617
1618 2007-01-03  Jim Meyering  <jim@meyering.net>
1619
1620         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1621
1622 2007-01-02  Bruno Haible  <bruno@clisp.org>
1623
1624         * modules/settime (Include): Require timespec.h.
1625         * modules/nanosleep (Include): Likewise.
1626
1627 2007-01-01  Bruno Haible  <bruno@clisp.org>
1628
1629         * gnulib-tool (func_emit_copyright_notice): Bump year.
1630         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1631
1632 2007-01-01  Bruno Haible  <bruno@clisp.org>
1633
1634         Improve support for OpenBSD.
1635         * build-aux/config.rpath (libname_spec): Export.
1636         (library_names_spec): New variable. Export.
1637         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1638         library_names_spec from the config.rpath output. Locate shared library
1639         through the name pattern in library_names_spec.
1640
1641 2007-01-01  Eric Blake  <ebb9@byu.net>
1642
1643         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1644
1645 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1646
1647         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1648         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1649         assume the C locale, and avoid an "eval" that could cause trouble.
1650         Problem with SORT reported by Bob Proulx.
1651
1652         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1653         Define.  Trivial patch from Henning Nielsen Lund, originally
1654         sent to bug-grep@gnu.org today.
1655
1656 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1657
1658         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1659         struct stat.  Problem reported by Henning Nielsen Lund.
1660         * lib/acl.c: Include acl.h first, to check interface.  Don't
1661         bother to include sys/types.h and sys/stat.h again.
1662
1663 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1664
1665         Import the following change from libc; problem reported by
1666         Sven Verdoolaege.
1667
1668         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1669
1670         [BZ #1373]
1671         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1672
1673 2006-12-28  Jim Meyering  <jim@meyering.net>
1674
1675         * build-aux/announce-gen: Do not assume that the package
1676         builds any of tar.gz, tar.bz2, and .xdelta files.
1677         Suggestion from Simon Josefsson.
1678
1679 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1680
1681         * modules/announce-gen: New file.
1682
1683 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1684
1685         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1686         handles its gotchas now.
1687         * lib/mbswidth.c: Likewise.
1688         * lib/wcwidth.h: Likewise.
1689         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1690         and iswcntrl; the wctype module does this stuff now.
1691         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1692         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1693         * modules/mbchar (Depends-on): Add wctype.
1694         * modules/mbswidth (Depends-on): Likewise.
1695         * modules/wcwidth (Depends-on): Likewise.
1696
1697 2006-12-27  Eric Blake  <ebb9@byu.net>
1698
1699         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1700         module uses more than what <wctype.h> is required to provide.
1701
1702 2006-12-26  Eric Blake  <ebb9@byu.net>
1703
1704         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1705
1706 2006-12-26  Eric Blake  <ebb9@byu.net>
1707
1708         * modules/absolute-header: New module.
1709         * modules/fcntl (Depends-on): Depend on it.
1710         * modules/inttypes (Depends-on): Likewise.
1711         * modules/stdint (Depends-on): Likewise.
1712         * modules/sys_stat (Depends-on): Likewise.
1713         * modules/wctype (Depends-on): Likewise.
1714         * MODULES.html.sh (Support for building libraries and
1715         executables): Document it.
1716
1717 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1718
1719         * gnulib-tool (SED): Remove, undoing previous change.
1720         The problem was that it broke coreutils on Solaris, because
1721         "sed --posix" leaked into a makefile.
1722         (sed): New alias, if 'alias' and GNU sed.
1723
1724 2006-12-24  Jim Meyering  <jim@meyering.net>
1725
1726         Work around an fchownat bug in glibc-2.4:
1727         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1728         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1729         in spite of the -P option.
1730         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1731         New macros.
1732         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1733         * modules/openat (Files): Add lib/fchownat.c.
1734         * lib/openat.c (fchownat): Don't define here.  Move to...
1735         * lib/fchownat.c: ...this new file.
1736
1737 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1738
1739         Fix bug reported by Bruno Haible in
1740         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1741         where quotearg.c didn't compile on Mac OS X 10.2 because it
1742         lacks <wchar.h> and wint_t.
1743         * lib/wctype_.h (__wctype_wint_t): New type.
1744         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1745         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1746         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1747         Arg is now of type __wctype_wint_t, not wint_t.
1748         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1749         substitute HAVE_WINT_T.
1750         * modules/wctype (Files): Add m4/wint_t.m4.
1751         (wctype.h): Substitute HAVE_WINT_T.
1752
1753 2006-12-23  Bruno Haible  <bruno@clisp.org>
1754
1755         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1756
1757 2006-12-23  Bruno Haible  <bruno@clisp.org>
1758
1759         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1760         S_ISLNK.
1761         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1762         mingw.
1763
1764 2006-12-22  Bruno Haible  <bruno@clisp.org>
1765
1766         * lib/copy-file.c: Include acl.h.
1767         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1768         Close the file descriptors only after being done with copy_acl.
1769         * modules/copy-file (Depends-on): Add acl.
1770
1771 2006-12-22  Bruno Haible  <bruno@clisp.org>
1772
1773         * gnulib-tool (SED): New variable.
1774         Use $SED instead of sed everywhere.
1775
1776 2006-12-22  Bruno Haible  <bruno@clisp.org>
1777
1778         * modules/no-c++: New file.
1779         * m4/no-c++.m4: New file.
1780         * MODULES.html.sh (Support for building libraries and executables):
1781         Add no-c++.
1782
1783 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1784
1785         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1786         Include <limits.h>, and use its INT_MAX to rewrite the
1787         j loop so that it does not overflow 'int'.  Problem reported by
1788         Ralf Wildenhues in
1789         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1790         Play it safe by shifting left by 1 rather than multiplying by 2,
1791         as GCC is less likely to optimize this away when the value
1792         is signed (when it assumes overflow leads to undefined behavior).
1793         Also, don't assume time_t uses two's complement.
1794
1795 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1796
1797         * MODULES.html.sh: New module wctype.
1798         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1799         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1800         <wctype.h>, since the new wctype module should fix this.
1801         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1802         the wctype module should arrange for it.
1803         * lib/regex_internal.h: Likewise.
1804         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1805         since the wctype module should handle this now.
1806         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1807         * modules/fnmatch (Depends-on): Add wctype.
1808         * modules/quotearg (Depends-on): Likewise.
1809         * modules/regex (Depends-on): Likewise.
1810
1811 2006-12-19  Bruno Haible  <bruno@clisp.org>
1812
1813         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1814         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1815
1816 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1817
1818         * modules/savewd (Depends-on): Fix dependency on fcntl.
1819
1820 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1821
1822         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1823         conforms to C99, rather than relying on the user's environment
1824         setting of STDINT_H.
1825
1826 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1827         and Eric Blake  <ebb9@byu.net>
1828
1829         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1830         This is more consistent with the other defines here.
1831         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1832         Port to z/OS.  Problem reported by Paul Gilmartin.
1833         Change local vars to use gl_ prefix rather than ac_.
1834         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1835         with other defines.
1836         * modules/double-slash-root: New module.
1837         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1838         (Depends-on): Add double-slash-root.
1839         * MODULES.html.sh (File system functions): Mention new module.
1840
1841 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1842
1843         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1844         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1845         This is for the benefit of gzip, which doesn't do i18n.
1846
1847 2006-12-12  Jim Meyering  <jim@meyering.net>
1848
1849         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1850         Reported by Andreas Schwab <schwab@suse.de>.
1851
1852 2006-12-12  Bruno Haible  <bruno@clisp.org>
1853
1854         Merge these changes.
1855         2006-09-05  Bruno Haible  <bruno@clisp.org>
1856         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1857         iconv_alloc succeeded.
1858         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1859         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1860         test for " && dest " at the end - dest is always != NULL there. Call
1861         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1862         with 2xNULL arguments, also to flush the state storage. Handle the
1863         IRIX iconv behaviour. Realloc the final result, to throw away unused
1864         memory.
1865
1866 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1867
1868         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1869         and fchmodat unconditionally, since glibc 2.4 has them.
1870         Problem reported by Arkadiusz Miskiewicz.
1871
1872 2006-12-10  Bruno Haible  <bruno@clisp.org>
1873
1874         * gnulib-tool (func_import): Show the include files only for those
1875         modules that are copied and specified.
1876         Reported by Karl Berry.
1877
1878 2006-12-08  Jim Meyering  <jim@meyering.net>
1879
1880         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1881         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1882
1883         * build-aux/announce-gen: Add two new options, both optional:
1884         --bootstrap-tools=TOOL_LIST
1885               a comma-separated list of tools, e.g.,
1886               autoconf,automake,bison,gnulib
1887         --gnulib-snapshot-date=DATE
1888               if gnulib is in the bootstrap tool list,
1889               then report this as the snapshot date.
1890               If not specified, use the current date/time.
1891               If you specify a date here, be sure it's UTC.
1892
1893 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1894
1895         * tests/test-argp-2.sh: Fix test to match actual output.
1896         (func_compare): Fix sed script to be portable.
1897
1898 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1899
1900         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1901         workaround for this case.  It is not autoconfigured now; offhand
1902         it's hard to see how to autoconfigure it.
1903
1904 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1905
1906         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1907         a directory that is about to be chowned.  Such a directory's
1908         initial file permissions should permit the owner only and this
1909         should not be changed until after the chown, since the group and
1910         other bits would be incorrect if they granted permission before
1911         the chown.
1912
1913         Fix porting problem for iswctype reported by Georg Schwarz in:
1914         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1915         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1916         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1917         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1918         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1919
1920 2006-12-03  Jim Meyering  <jim@meyering.net>
1921
1922         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1923         p->fts_statp may not yet be defined.
1924         (fts_read): Instead, set it in the caller, once p->fts_statp is
1925         sure to be defined, and corresponds to a top-level directory.
1926         This bug made du -x fail.  Here's the coreutils test case:
1927         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1928         Reported by Mike Frysinger.
1929
1930 2006-12-01  Jim Meyering  <jim@meyering.net>
1931
1932         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1933         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1934         Reported by Simon Josefsson.
1935
1936 2006-11-30  Jim Meyering  <jim@meyering.net>
1937
1938         * m4/warning.m4: Use the all-permissive copyright notice
1939         recommended by RMS (rather than LGPL).
1940         * m4/vararrays.m4: Likewise.
1941         * m4/flexmember.m4: Likewise.
1942
1943 2006-11-29  Bruno Haible  <bruno@clisp.org>
1944
1945         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1946         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1947         using +=.
1948         Reported by Simon Josefsson <simon@josefsson.org>.
1949
1950 2006-11-28  James Youngman <jay@gnu.org>
1951
1952         * README: Advise users that they might find the bug-gnulib@gnu.org
1953         and autotools-announce@gnu.org mailing lists useful.
1954
1955 2006-11-28  Bruno Haible  <bruno@clisp.org>
1956
1957         * m4/ptrdiff_max.m4: Remove file.
1958
1959 2006-11-21  Bruno Haible  <bruno@clisp.org>
1960
1961         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1962         _AC_COMPUTE_INT.
1963         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1964         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1965         _AC_COMPUTE_INT.
1966         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1967         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1968         _AC_COMPUTE_INT.
1969         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1970
1971 2006-11-28  Jim Meyering  <jim@meyering.net>
1972
1973         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
1974         warning from "gcc -Wshadow" about shadowing the builtin.
1975
1976 2006-11-27  Bruno Haible  <bruno@clisp.org>
1977
1978         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
1979         _AC_COMPUTE_INT.
1980         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1981
1982 2006-11-27  Bruno Haible  <bruno@clisp.org>
1983             Paul Eggert  <eggert@cs.ucla.edu>
1984
1985         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
1986
1987 2006-11-26  Bruno Haible  <bruno@clisp.org>
1988
1989         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1990         noinst_LTLIBRARIES.
1991
1992 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
1993             Bruno Haible  <bruno@clisp.org>
1994
1995         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
1996         if compiling with "gcc -ansi".
1997
1998 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
1999
2000         Fix some incompatibilities with gcc -ansi -pedantic.
2001         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2002         if compiling pedantically with GCC, unless it's C99 or later.
2003         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2004         it mishandles gcc -ansi -pedantic as well.
2005         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2006         if gcc -pedantic.
2007         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2008         initializers for struct if -pedantic, unless it's C99 or later.
2009
2010 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2011
2012         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2013         Don't close an fd more than once. Identical atimes indicate
2014         success, not failure.
2015
2016 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2017
2018         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2019
2020 2006-11-23  Jim Meyering  <jim@meyering.net>
2021
2022         * build-aux/announce-gen: New file.  From coreutils.
2023
2024 2006-11-22  Jim Meyering  <jim@meyering.net>
2025
2026         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2027         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2028         (fts_read): Use a temporary to narrow the overused st_size member
2029         before using it in a switch statement.  Reported by Matthew Woehlke.
2030
2031         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2032         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2033
2034 2006-11-20  Bruno Haible  <bruno@clisp.org>
2035
2036         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2037         changequote instead of pairs of brackets.
2038         Reported by Andreas Schwab <schwab@suse.de>.
2039
2040 2006-11-21  Jim Meyering  <jim@meyering.net>
2041
2042         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2043         so as to remain compatible with older compilers.
2044         Patch from Michael Deutschmann.
2045
2046 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2047
2048         * MODULES.html.sh (File system functions): Add openat.
2049
2050         * lib/openat.h (rpl_fstatat): New macro, if
2051         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2052         (fstatat): Define to rpl_fstatat under the same conditions,
2053         unless COMPILING_FSTATAT.
2054         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2055         seems to have the bug.
2056         * lib/fstatat.c: New file.
2057         * modules/openat (Files): Add it.
2058
2059 2006-11-20  Bruno Haible  <bruno@clisp.org>
2060
2061         * Makefile: New file.
2062
2063 2006-11-20  Jim Meyering  <jim@meyering.net>
2064
2065         The beginnings of syntax-related checks for gnulib.
2066         * lib/Makefile: New file.
2067         * lib/t-idcache: New script.  Ensure that the two halves of
2068         idcache.c stay in sync.
2069
2070         * lib/idcache.c: Adjust comments in user- and group- portions to
2071         be more accurate, and to be consistent with one another.
2072
2073 2006-11-20  Jim Meyering  <jim@meyering.net>
2074
2075         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2076         continue using the flexible array member (thus, this module performs
2077         half as many malloc calls), with the addition that...
2078         (getgroup, getuser): Consistently record a non-match via an empty
2079         "name" string, and map an empty string match to a NULL return value.
2080         * modules/idcache (Depends-on): Re-add flexmember.
2081
2082         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2083         (getuidbyname, getgroup, getgidbyname): Likewise.
2084
2085         Use cleaner syntax: NULL rather than 0.
2086         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2087
2088 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2089
2090         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2091         It mishandled the case where the group was missing.
2092         Problem reported by Greg Schafer.
2093         * modules/idcache: Likewise.
2094
2095 2006-11-18  Jim Meyering  <jim@meyering.net>
2096
2097         * check-module (%exempt_header): Add exception for some
2098         conditionally-included headers.
2099
2100         * modules/i-ring (Depends-on): Add verify.
2101         (License): Change to LGPL.
2102
2103 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2104
2105         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2106         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2107         and inttostr.h.  Use snprintf rather than uinttostr, so that
2108         LGPLed code doesn't depend on GPLed.
2109
2110 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2111
2112         * modules/inline (License): Change from GPL to LGPL.
2113
2114 2006-11-17  Jim Meyering  <jim@meyering.net>
2115
2116         * modules/d-type (License): Switch to LGPL.
2117
2118 2006-11-15  Bruno Haible  <bruno@clisp.org>
2119
2120         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2121
2122 2006-11-15  Eric Blake  <ebb9@byu.net>
2123
2124         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2125         the module dependency.
2126
2127 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2128             Bruno Haible  <bruno@clisp.org>
2129
2130         * gnulib-tool (func_create_testdir): Add license consistency check.
2131
2132 2006-11-15  Eric Blake  <ebb9@byu.net>
2133
2134         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2135         random "(cached)" in configure output.
2136
2137 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2138
2139         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2140         test for conforming inttypes.h is both announced and cached.
2141
2142         * MODULES.html.sh (seen_modules, seen_files): New variables.
2143         (func_module): Rewrite to use a few less gnulib-tool and sed
2144         invocations.  Avoid a couple of quadratic algorithms for ...
2145         (missed_modules, missed_files): ... these, with ...
2146         (func_append, func_tmpdir): ... these new functions, from
2147         gnulib-tool.  Analogously, install traps for cleanup.
2148
2149         * tests/test-gc.c (main): Remove unused variables.
2150         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2151
2152 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2153
2154         * modules/inttostr (License): Change to LGPL.
2155
2156 2006-11-14  Eric Blake  <ebb9@byu.net>
2157
2158         * modules/tempname (License): Change to LGPL.
2159
2160 2006-11-14  Eric Blake  <ebb9@byu.net>
2161
2162         * doc/functions.texi (Function Portability): *printf functions on
2163         Cygwin now understand all POSIX size specifiers.
2164
2165 2006-11-14  Bruno Haible  <bruno@clisp.org>
2166
2167         * modules/c-ctype (License): Change to LGPL.
2168
2169 2006-11-12  Bruno Haible  <bruno@clisp.org>
2170
2171         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2172         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2173         for GNOME libraries, for which the include files are installed in
2174         subdirectories of $prefix/include.
2175
2176 2006-11-12  Bruno Haible  <bruno@clisp.org>
2177
2178         * m4/lib-link.m4: Require at least autoconf-2.54.
2179         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2180         name to underscores for the --with option.
2181
2182 2006-11-13  Bruno Haible  <bruno@clisp.org>
2183
2184         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2185         the tests directory.
2186         Reported by Ralf Wildenhues.
2187
2188 2006-11-13  Bruno Haible  <bruno@clisp.org>
2189
2190         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2191         (func_emit_initmacro_end): Undo the override here.
2192         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2193         Works around the famous automake error in coreutils.
2194
2195 2006-11-13  Eric Blake  <ebb9@byu.net>
2196
2197         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2198         element, not its node.
2199
2200 2006-11-12  Bruno Haible  <bruno@clisp.org>
2201
2202         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2203         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2204
2205 2006-11-12  Bruno Haible  <bruno@clisp.org>
2206
2207         * gnulib-tool: New option --local-symlink.
2208         (func_usage): Document it.
2209         (lsymbolic): New variable.
2210         (func_import, func_create_testdir): If --symlink was not specified,
2211         test whether --local-symlink was specified and the file comes from
2212         the local_gnulib_dir.
2213
2214 2006-11-12  Bruno Haible  <bruno@clisp.org>
2215
2216         * gnulib-tool (func_ln): New function.
2217         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2218
2219 2006-11-12  Bruno Haible  <bruno@clisp.org>
2220
2221         Finish support for source files in subdirectories.
2222         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2223         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2224         AUTOMAKE_OPTIONS.
2225         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2226
2227 2006-11-12  Bruno Haible  <bruno@clisp.org>
2228
2229         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2230         EXTRA_lib_SOURCES augmentation.
2231         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2232
2233 2006-11-12  Jim Meyering  <jim@meyering.net>
2234
2235         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2236         file descriptors.  This also averts a failure on systems with
2237         native openat support when a traversed directory lacks "x" access.
2238         * lib/fts_.h: Include "i-ring.h"
2239         (struct FTS) [fts_fd_ring]: New member.
2240         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2241         (FCHDIR): Add parentheses.
2242         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2243         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2244         When descending, rather than simply closing the previous
2245         fts_cwd_fd value, push that file descriptor onto the ring.
2246         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2247         (fts_open): Initialize the new fd_ring member.
2248         (fts_close): Clear the ring.
2249         (fts_safe_changedir): When possible, use our new fd_ring to skip
2250         the diropen and fstat and dev/ino comparison that would normally
2251         accompany a virtual `chdir ("..")'.
2252
2253         * modules/fts (Depends-on): Add i-ring.
2254         * modules/i-ring: New module.
2255         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2256         * m4/i-ring.m4: New file.
2257
2258 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2259
2260         * gnulib-tool (func_create_testdir): Fix replacement of
2261         `build-aux' in configure.ac.  Run autotools in gltests
2262         subdirectory.
2263         (func_create_testdir, func_create_megatestdir, test): There is
2264         no need for '--force' in most autotool invocations in a new
2265         tree.  Actually fail the whole test if any of the tools, or the
2266         configure or make stages fail.
2267
2268         Sync from Automake.
2269         * build-aux/gnupload: Revert last change.  Add pointer to upload
2270         instructions of the GNU Maintenance Instructions.
2271         Suggestion by Karl Berry.
2272
2273 2006-11-10  Jim Meyering  <jim@meyering.net>
2274
2275         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2276
2277 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2278
2279         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2280         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2281         (bind_textdomain_codeset) [! ENABLE_NLS]:
2282         Evaluate all the arguments.  That way, callers get compatible behavior
2283         if the arguments have side effects.  Also, it avoids some GCC
2284         diagnostics in some cases; Joel E. Denny reported problems when Bison
2285         was configured with --enable-gcc-warnigs.
2286
2287 2006-11-10  Jim Meyering  <jim@meyering.net>
2288
2289         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2290         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2291         account.
2292
2293 2006-11-10  Jim Meyering  <jim@meyering.net>
2294
2295         * modules/inline: New file/module.
2296         * modules/xalloc (Files): Remove m4/inline.m4.
2297         (Depends-on): Add inline, instead.
2298         * modules/oset: Likewise.
2299         * modules/list: Likewise.
2300
2301 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2302
2303         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2304         Problem reported by Matthew Woehlke.
2305
2306 2006-11-09  Bruno Haible  <bruno@clisp.org>
2307
2308         * lib/tempname.c (gen_tempname): Remove variant that invokes
2309         __gen_tempname.
2310         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2311         __gen_tempname.
2312
2313 2006-11-08  Bruno Haible  <bruno@clisp.org>
2314
2315         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2316         to 'yes' instead of 'cross-compiling'.
2317
2318 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2319
2320         * lib/quotearg.h (quotearg_free): New decl.
2321         * lib/quotearg.c (quotearg_free): New function.
2322         (slot0, nslots, slotvec0, slotvec):
2323         Now file-scope so that quotearg_free can get at them.
2324
2325 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2326
2327         Sync from Automake.
2328         * build-aux/gnupload: Add missing 'gnu' to example URL.
2329         Report by Karl Berry.
2330
2331 2006-11-08  Bruno Haible  <bruno@clisp.org>
2332
2333         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2334         Suggested by Paul Eggert.
2335
2336 2006-11-08  Jim Meyering  <jim@meyering.net>
2337
2338         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2339         It's already included if !_LIBC.
2340         (fts_safe_changedir): Add a comment.
2341
2342 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2343
2344         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2345         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2346         Matthew Woehlke.
2347
2348         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2349         definitions up, to avoid colliding with change below.
2350         (static_inline) [HAVE_INLINE]: New macro.
2351         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2352         Provide extern decls when !HAVE_INLINE.  Do not define unless
2353         static_inline is defined, either by us or by xmalloc.c.  Use
2354         static_inline rather than static inline.
2355         (XCALLOC): Optimize sizeof(T) = 1 case.
2356         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2357
2358 2006-11-07  Bruno Haible  <bruno@clisp.org>
2359
2360         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2361         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2362         AC_C_INLINE.
2363         * modules/xalloc (Files): Add m4/inline.m4.
2364
2365 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2366
2367         * README: Fix typo.
2368         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2369         (Miscellanous Notes): ...from this.
2370
2371 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2372
2373         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2374         Mention that offsetof should be used instead of sizeof.
2375         From Bruno Haible.
2376
2377 2006-11-07  Bruno Haible  <bruno@clisp.org>
2378
2379         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2380
2381 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2382
2383         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2384         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2385         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2386         (gl_tree_add_before, gl_tree_add_after):
2387         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2388         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2389         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2390         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2391         (gl_linked_add_after, gl_linked_add_at): Likewise.
2392         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2393         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2394         (gl_tree_add_before, gl_tree_add_after): Likewise.
2395         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2396         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2397         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2398
2399 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2400
2401         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2402
2403 2006-11-06  Bruno Haible  <bruno@clisp.org>
2404
2405         * m4/inline.m4: New file.
2406         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2407         * modules/list (Files): Add m4/inline.m4.
2408         * modules/oset (Files): Likewise.
2409
2410 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2411
2412         * lib/idcache.c: Include <stddef.h>, for offsetof.
2413         (struct userid.name): Change from char * to a flexible array member.
2414         All uses changed.
2415         * modules/idcache (Depends-on): Add flexmember.
2416
2417         * MODULES.html.sh (Core language properties): New module flexmember.
2418         * modules/flexmember, m4/flexmember.m4: New files.
2419
2420         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2421         inline functions that are identical with the old xnmalloc_inline,
2422         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2423         that we can avoid some unnecessary integer multiplications and
2424         divisions in the common case where the element size is known at
2425         compile time.
2426         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2427         needed.
2428         (xnboundedmalloc): Remove.
2429         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2430         arguments, for consistency with rest of this header.
2431         (xcharalloc): Rewrite using XNMALLOC.
2432         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2433         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2434         versions have been moved to lib/xalloc.h and renamed to be the
2435         non-*_inline versions.
2436         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2437         and xnrealloc functions, since those functions are now inline and
2438         now call us.
2439         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2440         renaming described above.
2441         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2442         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2443         captures the dependency in AC_C_INLINE.
2444
2445         New module canonicalize-lgpl, proposed by Charles Wilson in
2446         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2447         with a few small changes afterwards.
2448         * MODULES.html.sh (File system functions): New module
2449         canonicalize-lgpl.
2450         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2451         and canonicalize_file_name.
2452         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2453         * modules/canonicalize-lgpl: New files.
2454
2455 2006-11-05  Bruno Haible  <bruno@clisp.org>
2456
2457         * gnulib-tool (func_import, func_create_testdir): Create directories
2458         also for files in subdirectories of lib/.
2459
2460 2006-11-05  Bruno Haible  <bruno@clisp.org>
2461
2462         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2463         ANSI C compliant.
2464
2465 2006-11-03  Bruno Haible  <bruno@clisp.org>
2466
2467         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2468         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2469         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2470         (xnboundedmalloc): New inline function.
2471         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2472         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2473         xmalloc.
2474         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2475         xmalloc.
2476         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2477         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2478         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2479         xmalloc.
2480         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2481         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2482         xmalloc.
2483         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2484         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2485         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2486         xmalloc.
2487         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2488         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2489         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2490         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2491         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2492         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2493         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2494
2495 2006-11-03  Bruno Haible  <bruno@clisp.org>
2496
2497         * lib/c-ctype.h [C++]: Define functions without name mangling.
2498         * lib/fwriteerror.h [C++]: Likewise.
2499         * lib/gcd.h [C++]: Likewise.
2500         * lib/linebreak.h [C++]: Likewise.
2501
2502 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2503
2504         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2505         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2506         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2507         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2508         Check for functions and headers just once.
2509         Check for declaration of canonicalize_file_name.
2510         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2511
2512 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2513
2514         * gnulib-tool (func_import): Fix typo in actioncmd.
2515
2516 2006-11-02  Bruno Haible  <bruno@clisp.org>
2517
2518         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2519         newline sequence in the Makefile.am snippet as a space, like "make"
2520         does.
2521         Reported by Roger Persson <perrog@gmail.com>.
2522
2523 2006-11-01  Bruno Haible  <bruno@clisp.org>
2524
2525         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2526         already declared in <string.h>.
2527         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2528
2529 2006-11-01  Bruno Haible  <bruno@clisp.org>
2530
2531         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2532         * lib/strcase.h: Include <string.h>.
2533         (strcasecmp): Define to rpl_strcasecmp here.
2534
2535 2006-11-01  Bruno Haible  <bruno@clisp.org>
2536
2537         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2538
2539 2006-11-01  Eric Blake  <ebb9@byu.net>
2540
2541         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2542
2543         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2544
2545 2006-10-29  Bruno Haible  <bruno@clisp.org>
2546
2547         Make it compile in C++ mode.
2548         * lib/full-write.c (full_rw): Add a cast.
2549
2550 2006-11-01  Bruno Haible  <bruno@clisp.org>
2551
2552         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2553         be POSIX compliant.
2554         Reported by Roger Persson <perrog@gmail.com>.
2555
2556 2006-11-01  Eric Blake  <ebb9@byu.net>
2557
2558         * lib/getopt_.h: Fix comments.
2559
2560 2006-10-31  Eric Blake  <ebb9@byu.net>
2561
2562         * modules/tmpdir (Depends-on): Add sys_stat.
2563         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2564         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2565         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2566         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2567         tempname.
2568
2569 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2570
2571         Avoid some C++ diagnostics reported by Bruno Haible.
2572         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2573         xmalloc.
2574         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2575         (struct slotvec): Move to top level.
2576         (quotearg_n_options): Rewrite to avoid xmalloc.
2577         * lib/xalloc.h (xcharalloc): New function.
2578         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2579         [defined __cplusplus]: Add function template that provides result
2580         type propagation.  This part of the change is from Bruno Haible.
2581
2582 2006-10-29  Bruno Haible  <bruno@clisp.org>
2583
2584         Make it compile in C++ mode.
2585         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2586         * lib/strnlen1.c (strnlen1): Cast memchr result.
2587         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2588         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2589         (create_temp_dir): Rename local variable 'template'.
2590         (compile_csharp_using_sscli): Add cast.
2591         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2592         * lib/findprog.c (find_in_path): Likewise.
2593         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2594         * lib/wait-process.c (register_slave_subprocess): Likewise.
2595
2596 2006-10-22  Bruno Haible  <bruno@clisp.org>
2597
2598         * modules/tsearch: New file.
2599         * lib/tsearch.h: New file.
2600         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2601         * m4/tsearch.m4: New file.
2602         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2603
2604 2006-10-29  Eric Blake  <ebb9@byu.net>
2605
2606         * lib/arcfour.c: Assume config.h.
2607         * lib/arctwo.c: Likewise.
2608         * lib/base64.c: Likewise.
2609         * lib/check-version.c: Likewise.
2610         * lib/crc.c: Likewise.
2611         * lib/des.c: Likewise.
2612         * lib/gc-gnulib.c: Likewise.
2613         * lib/gc-libgcrypt.c: Likewise.
2614         * lib/gc-pbkdf2-sha1.c: Likewise.
2615         * lib/getaddrinfo.c: Likewise.
2616         * lib/getdelim.c: Likewise.
2617         * lib/getline.c: Likewise.
2618         * lib/hmac-md5.c: Likewise.
2619         * lib/hmac-sha1.c: Likewise.
2620         * lib/iconvme.c: Likewise.
2621         * lib/md2.c: Likewise.
2622         * lib/md4.c: Likewise.
2623         * lib/memxor.c: Likewise.
2624         * lib/read-file.c: Likewise.
2625         * lib/readline.c: Likewise.
2626         * lib/rijndael-alg-fst.c: Likewise.
2627         * lib/rijndael-api-fst.c: Likewise.
2628         * lib/xgetdomainname.c: Likewise.
2629
2630 2006-10-28  Eric Blake  <ebb9@byu.net>
2631
2632         * lib/xstrndup.c: Assume config.h.
2633
2634 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2635
2636         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2637         stat-macros.h is now for our own macros, whereas stat_h is for
2638         macros in the <sys/stat.h> name space.
2639         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2640         (STAT_MACROS_H): Remove.
2641         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2642         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2643         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2644         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2645         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2646         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2647         Move these macros to ...
2648         * lib/stat_.h: here.  Don't include stat-macros.h.
2649         * lib/canonicalize.c: Don't include stat-macros.h.
2650         * lib/chown.c: Likewise.
2651         * lib/euidaccess.c: Likewise.
2652         * lib/file-type.c: Likewise.
2653         * lib/filemode.c: Likewise.
2654         * lib/glob.c: Likewise.
2655         * lib/isapipe.c: Likewise.
2656         * lib/lchown.c: Likewise.
2657         * lib/lstat.c: Likewise.
2658         * lib/mkdir-p.c: Likewise.
2659         * lib/rmdir.c: Likewise.
2660         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2661         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2662         unless mkdir isn't declared, to speed up 'configure'.
2663         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2664         would define all the S_* symbols.
2665         * modules/canonicalize (Depends-on):
2666         Depend on sys_stat, not stat-macros.
2667         * modules/chown: Likewise.
2668         * modules/euidaccess: Likewise.
2669         * modules/filemode: Likewise.
2670         * modules/file-type: Likewise.
2671         * modules/glob: Likewise.
2672         * modules/isapipe: Likewise.
2673         * modules/lchown: Likewise.
2674         * modules/lstat: Likewise.
2675         * modules/mkancesdirs: Likewise.
2676         * modules/rmdir: Likewise.
2677         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2678         * modules/modechange: Likewise.
2679         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2680         (configure.ac): Remove gl_STAT_MACROS.
2681         * modules/sys_stat (Depends-on): Remove stat-macros.
2682
2683 2006-10-27  Bruno Haible  <bruno@clisp.org>
2684
2685         * m4/signed.m4: Remove file.
2686         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2687         invocation.
2688         * modules/vasnprintf (Files): Remove m4/signed.m4.
2689
2690 2006-10-27  Bruno Haible  <bruno@clisp.org>
2691
2692         Update to GNU gettext 0.16.
2693         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2694         m4/inttypes-h.m4, m4/signed.m4.
2695         * m4/gettext.m4: Update to GNU gettext 0.16.
2696         * m4/intl.m4: New file, from GNU gettext.
2697         * m4/intldir.m4: New file, from GNU gettext.
2698         * config/srclist.txt: Update
2699
2700 2006-10-27  Eric Blake  <ebb9@byu.net>
2701
2702         * MODULES.html.sh: Document tempname.
2703         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2704         dependencies.
2705         (Files): Move lib/tempname.c...
2706         * modules/tempname: ...to this new module.
2707         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2708         (gl_PREREQ_TEMPNAME): Move...
2709         * m4/tempname.m4: ...to this new file.
2710         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2711         * modules/sys_stat (Depends-on): Add stat-macros.
2712         * lib/stat_.h (includes): Pick up stat macros.
2713         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2714         if stat macros are broken.
2715         * lib/tempname.c (includes): No need to include "stat-macros.h".
2716         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2717         (direxists, __path_search) [!_LIBC]: Don't compile these in
2718         gnulib; the tmpdir module covers that.
2719         * lib/tempname.h: New file.
2720
2721 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2722
2723         * COPYING: Explain how gnulib-tool converts licence headers.
2724         Almost all wording by Eric Blake.
2725
2726 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2727
2728         * lib/mbchar.h (is_basic_table): Make read-only.
2729         * lib/mbchar.c (is_basic_table): Likewise.
2730         Reported by John Darrington.
2731
2732 2006-10-25  Bruno Haible  <bruno@clisp.org>
2733
2734         * lib/progname.h (set_program_name): Undefine before defining.
2735
2736 2006-10-25  Bruno Haible  <bruno@clisp.org>
2737
2738         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2739         false for non-gcc C++ compilers.
2740         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2741
2742 2006-10-24  Bruno Haible  <bruno@clisp.org>
2743
2744         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2745         iconv implementations like Irix iconv.
2746
2747 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2748
2749         * modules/vararrays: New file.
2750         * m4/vararrays.m4: New file, taken from diffutils.
2751         * MODULES.html.sh: New module vararrays.
2752
2753 2006-10-24  Karl Berry  <karl@gnu.org>
2754
2755         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2756         Don't call GNU Unix.
2757
2758 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2759
2760         * users.txt: Add Libtool.
2761
2762         Sync from Libtool:
2763
2764         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2765
2766         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2767         to gnulib's policy of including config.h unconditionally.
2768
2769 2006-10-24  Bruno Haible  <bruno@clisp.org>
2770
2771         * modules/wcwidth (Files): Add m4/wint_t.m4.
2772         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2773         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2774
2775 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2776
2777         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2778         to pacify GCC with some -W flags enabled.  Problem reported by
2779         Bruno Haible.
2780
2781 2006-10-24  Jim Meyering  <jim@meyering.net>
2782
2783         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2784         Reported by Karl Berry.
2785
2786 2006-10-23  Bruno Haible  <bruno@clisp.org>
2787
2788         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2789
2790 2006-10-24  Bruno Haible  <bruno@clisp.org>
2791
2792         * lib/gl_list.h: Use C comment style, not C++ comment style.
2793
2794 2006-10-23  Eric Blake  <ebb9@byu.net>
2795
2796         * lib/getaddrinfo.c (includes): Add missing include.
2797
2798 2006-10-23  Bruno Haible  <bruno@clisp.org>
2799             Paul Eggert  <eggert@cs.ucla.edu>
2800
2801         Ability to rename obstack_free.
2802         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2803         obstack_free.
2804         (obstack_free): Invoke the __obstack_free macro.
2805         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2806
2807 2006-10-23  Bruno Haible  <bruno@clisp.org>
2808             Paul Eggert  <eggert@cs.ucla.edu>
2809
2810         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2811         __argc, __argv from the declaration. (They are defined as macros on
2812         mingw.)
2813
2814 2006-10-22  Bruno Haible  <bruno@clisp.org>
2815
2816         * doc/gnulib-intro.texi: New file.
2817         * doc/gnulib.texi: Include it.
2818
2819 2006-10-21  Bruno Haible  <bruno@clisp.org>
2820
2821         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2822         "Introduction", "Miscellanous Notes", "Particular Modules".
2823
2824 2006-10-21  Bruno Haible  <bruno@clisp.org>
2825
2826         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2827         Change mostlyclean-local rule to avoid sh syntax error from bash
2828         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2829
2830 2006-10-23  Jim Meyering  <jim@meyering.net>
2831
2832         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2833         in place of snprintf.
2834
2835         * modules/inttostr (Files): Add lib/uinttostr.c.
2836         * lib/uinttostr.c (inttostr): New file/function.
2837         * lib/inttostr.h (uinttostr): Declare.
2838         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2839         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2840         Add uinttostr.
2841         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2842
2843 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2844
2845         * lib/canonicalize.c (ELOOP): Define if not already defined.
2846         Problem reported by Bruno Haible in
2847         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2848
2849 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2850
2851         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2852         Problem reported by Perry Smith and Ville Laurikari.
2853
2854         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2855         uses.
2856
2857 2006-10-19  Bruno Haible  <bruno@clisp.org>
2858
2859         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2860         for mingw.
2861
2862 2006-10-19  Bruno Haible  <bruno@clisp.org>
2863
2864         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2865         Needed for mingw.
2866
2867 2006-10-19  Bruno Haible  <bruno@clisp.org>
2868
2869         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2870
2871 2006-10-19  Bruno Haible  <bruno@clisp.org>
2872
2873         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2874         it.
2875
2876 2006-10-19  Bruno Haible  <bruno@clisp.org>
2877
2878         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2879         invocation.
2880
2881 2006-10-19  Bruno Haible  <bruno@clisp.org>
2882
2883         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2884         mountlist by default.
2885
2886 2006-10-16  Bruno Haible  <bruno@clisp.org>
2887
2888         * lib/c-strstr.c: Include c-strstr.h.
2889
2890 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2891
2892         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2893         in a slash.
2894
2895 2006-10-18  Bruno Haible  <bruno@clisp.org>
2896
2897         * lib/lock.h [C++]: Wrap definitions in extern "C".
2898
2899 2006-10-18  Bruno Haible  <bruno@clisp.org>
2900
2901         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2902         gl_LIBOBJS list.
2903
2904 2006-10-18  Bruno Haible  <bruno@clisp.org>
2905
2906         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2907
2908 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2909
2910         * lib/xstrtol.h: Include gettext.h.
2911         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2912         Problem reported by Eric Blake.
2913         * modules/xstrtol (Depends-on): Add gettext-h.
2914
2915 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2916
2917         * lib/strftime.c (advance): New macro.
2918         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2919         incomplete type, so you can't add 0 to it.  Problem and patch
2920         reported by Eelco Dolstra for dietlibc.
2921
2922 2006-10-18  Jim Meyering  <jim@meyering.net>
2923
2924         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2925         type for a local, and rename it: s/up/user_proc/.
2926
2927 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2928
2929         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2930         READ_UTMP_USER_PROCESS.
2931         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2932
2933 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2934
2935         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2936         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2937
2938 2006-10-17  Eric Blake  <ebb9@byu.net>
2939
2940         * lib/sigprocmask.c (sigprocmask): Fix typo.
2941
2942         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2943
2944         * modules/clean-temp (Makefile.am): Don't add to make output...
2945         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2946         config.h.
2947
2948 2006-10-17  Bruno Haible  <bruno@clisp.org>
2949
2950         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2951         differently if DEFAULT_TEXT_DOMAIN is set.
2952
2953 2006-10-16  Bruno Haible  <bruno@clisp.org>
2954
2955         * lib/clean-temp.c: Include fwriteerror.h.
2956
2957 2006-10-16  Bruno Haible  <bruno@clisp.org>
2958
2959         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2960
2961 2006-10-16  Bruno Haible  <bruno@clisp.org>
2962
2963         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2964         * lib/sigprocmask.h: Include <sys/types.h>.
2965         (sigset_t): Use the system's definition if present.
2966
2967 2006-10-17  Eric Blake  <ebb9@byu.net>
2968
2969         * lib/xvasprintf.c (includes): Assume config.h.
2970         * lib/xasprintf.c (includes): Likewise.
2971
2972 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
2973
2974         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
2975         at least as wide as intmax_t.
2976
2977 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
2978
2979         (Imported from Automake.)
2980         * build-aux/gnupload: Update to version 1.1 of directive file.
2981
2982 2006-10-16  Eric Blake  <ebb9@byu.net>
2983
2984         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
2985         match Automake 1.10a.
2986
2987 2006-10-14  Bruno Haible  <bruno@clisp.org>
2988
2989         * modules/sigprocmask: New file.
2990         * lib/sigprocmask.h: New file.
2991         * lib/sigprocmask.c: New file.
2992         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
2993         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
2994         request sigprocmask.o.
2995         (gl_PREREQ_SIGPROCMASK): New macro.
2996         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
2997         (Depends-on): Add sigprocmask.
2998         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
2999         gt_SIGNALBLOCKING. Test for 'raise' only once.
3000         * lib/fatal-signal.c: Include sigprocmask.h.
3001         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3002         unblock_fatal_signals): Define always.
3003         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3004         sigprocmask.
3005
3006 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3007
3008         Sync from Automake.
3009         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3010         which incorrectly sets the mode of an existing destination
3011         directory.  In some cases the unpatched install-sh could do the
3012         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3013         system.  We hope this is rare in practice, but it's clearly worth
3014         fixing.  Problem reported by Alex Unleashed in
3015         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3016         Also, don't bother to check for -m bugs unless we're using -m;
3017         suggested by Stepan Kasal.
3018
3019 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3020
3021         Sync from Automake.
3022         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3023         `-c' flag, so they appear at the same position as in %FASTDEP%
3024         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3025         which ignores unknown options only after the first non-option.
3026         Bug report against M4 by Nelson H. F. Beebe.
3027
3028 2006-10-13  Jim Meyering  <jim@meyering.net>
3029
3030         Fix a bug in yesterday's change.
3031         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3032         p->fts_statp->st_dev would be used uninitialized.
3033         Ensures that we always call fts_stat on the very first entry.
3034         Miklos Szeredi reported that find -xdev stopped working.
3035
3036 2006-10-12  Bruno Haible  <bruno@clisp.org>
3037
3038         * gnulib-tool (func_get_automake_snippet): Append an automatically
3039         computed EXTRA_DIST augmentation.
3040         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3041         * modules/alloca-opt (Makefile.am): Likewise.
3042         * modules/allocsa (Makefile.am): Likewise.
3043         * modules/arcfour (Makefile.am): Likewise.
3044         * modules/arctwo (Makefile.am): Likewise.
3045         * modules/argmatch (Makefile.am): Likewise.
3046         * modules/argz (Makefile.am): Likewise.
3047         * modules/atexit (Makefile.am): Likewise.
3048         * modules/backupfile (Makefile.am): Likewise.
3049         * modules/byteswap (Makefile.am): Likewise.
3050         * modules/c-strtod (Makefile.am): Likewise.
3051         * modules/c-strtold (Makefile.am): Likewise.
3052         * modules/calloc (Makefile.am): Likewise.
3053         * modules/canon-host (Makefile.am): Likewise.
3054         * modules/canonicalize (Makefile.am): Likewise.
3055         * modules/chdir-long (Makefile.am): Likewise.
3056         * modules/chdir-safer (Makefile.am): Likewise.
3057         * modules/check-version (Makefile.am): Likewise.
3058         * modules/chown (Makefile.am): Likewise.
3059         * modules/cloexec (Makefile.am): Likewise.
3060         * modules/close-stream (Makefile.am): Likewise.
3061         * modules/closeout (Makefile.am): Likewise.
3062         * modules/crc (Makefile.am): Likewise.
3063         * modules/csharpexec (Makefile.am): Likewise.
3064         * modules/cycle-check (Makefile.am): Likewise.
3065         * modules/des (Makefile.am): Likewise.
3066         * modules/dev-ino (Makefile.am): Likewise.
3067         * modules/dirfd (Makefile.am): Likewise.
3068         * modules/dirname (Makefile.am): Likewise.
3069         * modules/dup2 (Makefile.am): Likewise.
3070         * modules/eealloc (Makefile.am): Likewise.
3071         * modules/error (Makefile.am): Likewise.
3072         * modules/euidaccess (Makefile.am): Likewise.
3073         * modules/exclude (Makefile.am): Likewise.
3074         * modules/exitfail (Makefile.am): Likewise.
3075         * modules/fcntl-safer (Makefile.am): Likewise.
3076         * modules/fcntl (Makefile.am): Likewise.
3077         * modules/file-type (Makefile.am): Likewise.
3078         * modules/fileblocks (Makefile.am): Likewise.
3079         * modules/filemode (Makefile.am): Likewise.
3080         * modules/filenamecat (Makefile.am): Likewise.
3081         * modules/fnmatch (Makefile.am): Likewise.
3082         * modules/fopen-safer (Makefile.am): Likewise.
3083         * modules/fpending (Makefile.am): Likewise.
3084         * modules/fprintftime (Makefile.am): Likewise.
3085         * modules/free (Makefile.am): Likewise.
3086         * modules/fsusage (Makefile.am): Likewise.
3087         * modules/ftruncate (Makefile.am): Likewise.
3088         * modules/fts (Makefile.am): Likewise.
3089         * modules/gc-arcfour (Makefile.am): Likewise.
3090         * modules/gc-des (Makefile.am): Likewise.
3091         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3092         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3093         * modules/gc-md4 (Makefile.am): Likewise.
3094         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3095         * modules/gc-sha1 (Makefile.am): Likewise.
3096         * modules/gc (Makefile.am): Likewise.
3097         * modules/getaddrinfo (Makefile.am): Likewise.
3098         * modules/getcwd (Makefile.am): Likewise.
3099         * modules/getdelim (Makefile.am): Likewise.
3100         * modules/getdomainname (Makefile.am): Likewise.
3101         * modules/getgroups (Makefile.am): Likewise.
3102         * modules/gethostname (Makefile.am): Likewise.
3103         * modules/gethrxtime (Makefile.am): Likewise.
3104         * modules/getline (Makefile.am): Likewise.
3105         * modules/getloadavg (Makefile.am): Likewise.
3106         * modules/getlogin_r (Makefile.am): Likewise.
3107         * modules/getndelim2 (Makefile.am): Likewise.
3108         * modules/getopt (Makefile.am): Likewise.
3109         * modules/getpagesize (Makefile.am): Likewise.
3110         * modules/getpass-gnu (Makefile.am): Likewise.
3111         * modules/getpass (Makefile.am): Likewise.
3112         * modules/getsubopt (Makefile.am): Likewise.
3113         * modules/gettime (Makefile.am): Likewise.
3114         * modules/gettimeofday (Makefile.am): Likewise.
3115         * modules/getugroups (Makefile.am): Likewise.
3116         * modules/getusershell (Makefile.am): Likewise.
3117         * modules/glob (Makefile.am): Likewise.
3118         * modules/group-member (Makefile.am): Likewise.
3119         * modules/hard-locale (Makefile.am): Likewise.
3120         * modules/hash (Makefile.am): Likewise.
3121         * modules/hmac-md5 (Makefile.am): Likewise.
3122         * modules/hmac-sha1 (Makefile.am): Likewise.
3123         * modules/human (Makefile.am): Likewise.
3124         * modules/idcache (Makefile.am): Likewise.
3125         * modules/imaxabs (Makefile.am): Likewise.
3126         * modules/imaxdiv (Makefile.am): Likewise.
3127         * modules/inet_ntop (Makefile.am): Likewise.
3128         * modules/inet_pton (Makefile.am): Likewise.
3129         * modules/intprops (Makefile.am): Likewise.
3130         * modules/inttostr (Makefile.am): Likewise.
3131         * modules/inttypes (Makefile.am): Likewise.
3132         * modules/isapipe (Makefile.am): Likewise.
3133         * modules/javaversion (Makefile.am): Likewise.
3134         * modules/lchmod (Makefile.am): Likewise.
3135         * modules/lchown (Makefile.am): Likewise.
3136         * modules/localcharset (Makefile.am): Likewise.
3137         * modules/long-options (Makefile.am): Likewise.
3138         * modules/lstat (Makefile.am): Likewise.
3139         * modules/malloc (Makefile.am): Likewise.
3140         * modules/mathl (Makefile.am): Likewise.
3141         * modules/mbchar (Makefile.am): Likewise.
3142         * modules/md2 (Makefile.am): Likewise.
3143         * modules/md4 (Makefile.am): Likewise.
3144         * modules/md5 (Makefile.am): Likewise.
3145         * modules/memcasecmp (Makefile.am): Likewise.
3146         * modules/memchr (Makefile.am): Likewise.
3147         * modules/memcmp (Makefile.am): Likewise.
3148         * modules/memcoll (Makefile.am): Likewise.
3149         * modules/memcpy (Makefile.am): Likewise.
3150         * modules/memmem (Makefile.am): Likewise.
3151         * modules/memmove (Makefile.am): Likewise.
3152         * modules/mempcpy (Makefile.am): Likewise.
3153         * modules/memrchr (Makefile.am): Likewise.
3154         * modules/memset (Makefile.am): Likewise.
3155         * modules/memxor (Makefile.am): Likewise.
3156         * modules/mkancesdirs (Makefile.am): Likewise.
3157         * modules/mkdir-p (Makefile.am): Likewise.
3158         * modules/mkdir (Makefile.am): Likewise.
3159         * modules/mkdtemp (Makefile.am): Likewise.
3160         * modules/mkstemp (Makefile.am): Likewise.
3161         * modules/mktime (Makefile.am): Likewise.
3162         * modules/modechange (Makefile.am): Likewise.
3163         * modules/mountlist (Makefile.am): Likewise.
3164         * modules/nanosleep (Makefile.am): Likewise.
3165         * modules/obstack (Makefile.am): Likewise.
3166         * modules/openat (Makefile.am): Likewise.
3167         * modules/pagealign_alloc (Makefile.am): Likewise.
3168         * modules/pathmax (Makefile.am): Likewise.
3169         * modules/physmem (Makefile.am): Likewise.
3170         * modules/poll (Makefile.am): Likewise.
3171         * modules/posixtm (Makefile.am): Likewise.
3172         * modules/posixver (Makefile.am): Likewise.
3173         * modules/putenv (Makefile.am): Likewise.
3174         * modules/quote (Makefile.am): Likewise.
3175         * modules/quotearg (Makefile.am): Likewise.
3176         * modules/raise (Makefile.am): Likewise.
3177         * modules/read-file (Makefile.am): Likewise.
3178         * modules/readline (Makefile.am): Likewise.
3179         * modules/readlink (Makefile.am): Likewise.
3180         * modules/readtokens (Makefile.am): Likewise.
3181         * modules/readutmp (Makefile.am): Likewise.
3182         * modules/realloc (Makefile.am): Likewise.
3183         * modules/regex (Makefile.am): Likewise.
3184         * modules/rename-dest-slash (Makefile.am): Likewise.
3185         * modules/rename (Makefile.am): Likewise.
3186         * modules/rijndael (Makefile.am): Likewise.
3187         * modules/rmdir (Makefile.am): Likewise.
3188         * modules/rpmatch (Makefile.am): Likewise.
3189         * modules/safe-read (Makefile.am): Likewise.
3190         * modules/safe-write (Makefile.am): Likewise.
3191         * modules/same-inode (Makefile.am): Likewise.
3192         * modules/same (Makefile.am): Likewise.
3193         * modules/save-cwd (Makefile.am): Likewise.
3194         * modules/savedir (Makefile.am): Likewise.
3195         * modules/setenv (Makefile.am): Likewise.
3196         * modules/settime (Makefile.am): Likewise.
3197         * modules/sha1 (Makefile.am): Likewise.
3198         * modules/sig2str (Makefile.am): Likewise.
3199         * modules/snprintf (Makefile.am): Likewise.
3200         * modules/stat-macros (Makefile.am): Likewise.
3201         * modules/stat-time (Makefile.am): Likewise.
3202         * modules/stdbool (Makefile.am): Likewise.
3203         * modules/stdint (Makefile.am): Likewise.
3204         * modules/stdlib-safer (Makefile.am): Likewise.
3205         * modules/stpcpy (Makefile.am): Likewise.
3206         * modules/stpncpy (Makefile.am): Likewise.
3207         * modules/strcase (Makefile.am): Likewise.
3208         * modules/strcasestr (Makefile.am): Likewise.
3209         * modules/strchrnul (Makefile.am): Likewise.
3210         * modules/strcspn (Makefile.am): Likewise.
3211         * modules/strdup (Makefile.am): Likewise.
3212         * modules/strerror (Makefile.am): Likewise.
3213         * modules/strftime (Makefile.am): Likewise.
3214         * modules/strndup (Makefile.am): Likewise.
3215         * modules/strnlen (Makefile.am): Likewise.
3216         * modules/strpbrk (Makefile.am): Likewise.
3217         * modules/strsep (Makefile.am): Likewise.
3218         * modules/strstr (Makefile.am): Likewise.
3219         * modules/strtod (Makefile.am): Likewise.
3220         * modules/strtoimax (Makefile.am): Likewise.
3221         * modules/strtok_r (Makefile.am): Likewise.
3222         * modules/strtol (Makefile.am): Likewise.
3223         * modules/strtoll (Makefile.am): Likewise.
3224         * modules/strtoul (Makefile.am): Likewise.
3225         * modules/strtoull (Makefile.am): Likewise.
3226         * modules/strtoumax (Makefile.am): Likewise.
3227         * modules/strverscmp (Makefile.am): Likewise.
3228         * modules/sys_socket (Makefile.am): Likewise.
3229         * modules/sys_stat (Makefile.am): Likewise.
3230         * modules/sysexits (Makefile.am): Likewise.
3231         * modules/time_r (Makefile.am): Likewise.
3232         * modules/timegm (Makefile.am): Likewise.
3233         * modules/timespec (Makefile.am): Likewise.
3234         * modules/tmpfile-safer (Makefile.am): Likewise.
3235         * modules/trim (Makefile.am): Likewise.
3236         * modules/unistd-safer (Makefile.am): Likewise.
3237         * modules/unlinkdir (Makefile.am): Likewise.
3238         * modules/unlocked-io (Makefile.am): Likewise.
3239         * modules/userspec (Makefile.am): Likewise.
3240         * modules/utime (Makefile.am): Likewise.
3241         * modules/utimecmp (Makefile.am): Likewise.
3242         * modules/utimens (Makefile.am): Likewise.
3243         * modules/vasnprintf (Makefile.am): Likewise.
3244         * modules/vasprintf (Makefile.am): Likewise.
3245         * modules/vsnprintf (Makefile.am): Likewise.
3246         * modules/xalloc (Makefile.am): Likewise.
3247         * modules/xgetcwd (Makefile.am): Likewise.
3248         * modules/xnanosleep (Makefile.am): Likewise.
3249         * modules/xreadlink (Makefile.am): Likewise.
3250         * modules/xstrtod (Makefile.am): Likewise.
3251         * modules/xstrtol (Makefile.am): Likewise.
3252         * modules/xstrtold (Makefile.am): Likewise.
3253         * modules/yesno (Makefile.am): Likewise.
3254         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3255
3256 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3257
3258         * modules/error (Makefile.am): Distribute files through
3259         EXTRA_DIST, not lib_SOURCES.
3260
3261 2006-10-12  Eric Blake  <ebb9@byu.net>
3262
3263         * modules/error (Makefile.am): Distribute files in /lib.
3264         * modules/obstack (Makefile.am): Likewise.
3265
3266 2006-10-12  Bruno Haible  <bruno@clisp.org>
3267
3268         * modules/acl (Makefile.am): Distribute all files in lib/ through
3269         EXTRA_DIST.
3270         * modules/arcfour (Makefile.am): Likewise.
3271         * modules/arctwo (Makefile.am): Likewise.
3272         * modules/argmatch (Makefile.am): Likewise.
3273         * modules/argz (Makefile.am): Likewise.
3274         * modules/atexit (Makefile.am): Likewise.
3275         * modules/backupfile (Makefile.am): Likewise.
3276         * modules/c-strtod (Makefile.am): Likewise.
3277         * modules/c-strtold (Makefile.am): Likewise.
3278         * modules/calloc (Makefile.am): Likewise.
3279         * modules/canon-host (Makefile.am): Likewise.
3280         * modules/canonicalize (Makefile.am): Likewise.
3281         * modules/chdir-long (Makefile.am): Likewise.
3282         * modules/chdir-safer (Makefile.am): Likewise.
3283         * modules/check-version (Makefile.am): Likewise.
3284         * modules/chown (Makefile.am): Likewise.
3285         * modules/cloexec (Makefile.am): Likewise.
3286         * modules/close-stream (Makefile.am): Likewise.
3287         * modules/closeout (Makefile.am): Likewise.
3288         * modules/crc (Makefile.am): Likewise.
3289         * modules/cycle-check (Makefile.am): Likewise.
3290         * modules/des (Makefile.am): Likewise.
3291         * modules/dirfd (Makefile.am): Likewise.
3292         * modules/dirname (Makefile.am): Likewise.
3293         * modules/dup2 (Makefile.am): Likewise.
3294         * modules/euidaccess (Makefile.am): Likewise.
3295         * modules/exclude (Makefile.am): Likewise.
3296         * modules/exitfail (Makefile.am): Likewise.
3297         * modules/fcntl-safer (Makefile.am): Likewise.
3298         * modules/file-type (Makefile.am): Likewise.
3299         * modules/fileblocks (Makefile.am): Likewise.
3300         * modules/filemode (Makefile.am): Likewise.
3301         * modules/filenamecat (Makefile.am): Likewise.
3302         * modules/fnmatch (Makefile.am): Likewise.
3303         * modules/fopen-safer (Makefile.am): Likewise.
3304         * modules/fpending (Makefile.am): Likewise.
3305         * modules/fprintftime (Makefile.am): Likewise.
3306         * modules/free (Makefile.am): Likewise.
3307         * modules/fsusage (Makefile.am): Likewise.
3308         * modules/ftruncate (Makefile.am): Likewise.
3309         * modules/fts (Makefile.am): Likewise.
3310         * modules/gc (Makefile.am): Likewise.
3311         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3312         * modules/getaddrinfo (Makefile.am): Likewise.
3313         * modules/getcwd (Makefile.am): Likewise.
3314         * modules/getdelim (Makefile.am): Likewise.
3315         * modules/getdomainname (Makefile.am): Likewise.
3316         * modules/getgroups (Makefile.am): Likewise.
3317         * modules/gethostname (Makefile.am): Likewise.
3318         * modules/gethrxtime (Makefile.am): Likewise.
3319         * modules/getline (Makefile.am): Likewise.
3320         * modules/getloadavg (Makefile.am): Likewise.
3321         * modules/getlogin_r (Makefile.am): Likewise.
3322         * modules/getopt (Makefile.am): Likewise.
3323         * modules/getpass (Makefile.am): Likewise.
3324         * modules/getpass-gnu (Makefile.am): Likewise.
3325         * modules/getsubopt (Makefile.am): Likewise.
3326         * modules/gettime (Makefile.am): Likewise.
3327         * modules/gettimeofday (Makefile.am): Likewise.
3328         * modules/getugroups (Makefile.am): Likewise.
3329         * modules/getusershell (Makefile.am): Likewise.
3330         * modules/glob (Makefile.am): Likewise.
3331         * modules/group-member (Makefile.am): Likewise.
3332         * modules/hard-locale (Makefile.am): Likewise.
3333         * modules/hash (Makefile.am): Likewise.
3334         * modules/hmac-md5 (Makefile.am): Likewise.
3335         * modules/hmac-sha1 (Makefile.am): Likewise.
3336         * modules/human (Makefile.am): Likewise.
3337         * modules/idcache (Makefile.am): Likewise.
3338         * modules/imaxabs (Makefile.am): Likewise.
3339         * modules/imaxdiv (Makefile.am): Likewise.
3340         * modules/inet_ntop (Makefile.am): Likewise.
3341         * modules/inet_pton (Makefile.am): Likewise.
3342         * modules/inttostr (Makefile.am): Likewise.
3343         * modules/isapipe (Makefile.am): Likewise.
3344         * modules/lchown (Makefile.am): Likewise.
3345         * modules/long-options (Makefile.am): Likewise.
3346         * modules/lstat (Makefile.am): Likewise.
3347         * modules/malloc (Makefile.am): Likewise.
3348         * modules/mathl (Makefile.am): Likewise.
3349         * modules/mbchar (Makefile.am): Likewise.
3350         * modules/md2 (Makefile.am): Likewise.
3351         * modules/md4 (Makefile.am): Likewise.
3352         * modules/md5 (Makefile.am): Likewise.
3353         * modules/memcasecmp (Makefile.am): Likewise.
3354         * modules/memchr (Makefile.am): Likewise.
3355         * modules/memcmp (Makefile.am): Likewise.
3356         * modules/memcoll (Makefile.am): Likewise.
3357         * modules/memcpy (Makefile.am): Likewise.
3358         * modules/memmem (Makefile.am): Likewise.
3359         * modules/memmove (Makefile.am): Likewise.
3360         * modules/mempcpy (Makefile.am): Likewise.
3361         * modules/memrchr (Makefile.am): Likewise.
3362         * modules/memset (Makefile.am): Likewise.
3363         * modules/memxor (Makefile.am): Likewise.
3364         * modules/mkancesdirs (Makefile.am): Likewise.
3365         * modules/mkdir (Makefile.am): Likewise.
3366         * modules/mkdir-p (Makefile.am): Likewise.
3367         * modules/mkdtemp (Makefile.am): Likewise.
3368         * modules/mkstemp (Makefile.am): Likewise.
3369         * modules/mktime (Makefile.am): Likewise.
3370         * modules/modechange (Makefile.am): Likewise.
3371         * modules/mountlist (Makefile.am): Likewise.
3372         * modules/nanosleep (Makefile.am): Likewise.
3373         * modules/openat (Makefile.am): Likewise.
3374         * modules/pagealign_alloc (Makefile.am): Likewise.
3375         * modules/physmem (Makefile.am): Likewise.
3376         * modules/poll (Makefile.am): Likewise.
3377         * modules/posixtm (Makefile.am): Likewise.
3378         * modules/posixver (Makefile.am): Likewise.
3379         * modules/putenv (Makefile.am): Likewise.
3380         * modules/quote (Makefile.am): Likewise.
3381         * modules/quotearg (Makefile.am): Likewise.
3382         * modules/raise (Makefile.am): Likewise.
3383         * modules/read-file (Makefile.am): Likewise.
3384         * modules/readline (Makefile.am): Likewise.
3385         * modules/readlink (Makefile.am): Likewise.
3386         * modules/readtokens (Makefile.am): Likewise.
3387         * modules/readutmp (Makefile.am): Likewise.
3388         * modules/realloc (Makefile.am): Likewise.
3389         * modules/regex (Makefile.am): Likewise.
3390         * modules/rename (Makefile.am): Likewise.
3391         * modules/rename-dest-slash (Makefile.am): Likewise.
3392         * modules/rijndael (Makefile.am): Likewise.
3393         * modules/rmdir (Makefile.am): Likewise.
3394         * modules/rpmatch (Makefile.am): Likewise.
3395         * modules/safe-read (Makefile.am): Likewise.
3396         * modules/safe-write (Makefile.am): Likewise.
3397         * modules/same (Makefile.am): Likewise.
3398         * modules/save-cwd (Makefile.am): Likewise.
3399         * modules/savedir (Makefile.am): Likewise.
3400         * modules/setenv (Makefile.am): Likewise.
3401         * modules/settime (Makefile.am): Likewise.
3402         * modules/sha1 (Makefile.am): Likewise.
3403         * modules/sig2str (Makefile.am): Likewise.
3404         * modules/snprintf (Makefile.am): Likewise.
3405         * modules/stdlib-safer (Makefile.am): Likewise.
3406         * modules/stpcpy (Makefile.am): Likewise.
3407         * modules/stpncpy (Makefile.am): Likewise.
3408         * modules/strcase (Makefile.am): Likewise.
3409         * modules/strcasestr (Makefile.am): Likewise.
3410         * modules/strchrnul (Makefile.am): Likewise.
3411         * modules/strcspn (Makefile.am): Likewise.
3412         * modules/strdup (Makefile.am): Likewise.
3413         * modules/strerror (Makefile.am): Likewise.
3414         * modules/strftime (Makefile.am): Likewise.
3415         * modules/strndup (Makefile.am): Likewise.
3416         * modules/strnlen (Makefile.am): Likewise.
3417         * modules/strpbrk (Makefile.am): Likewise.
3418         * modules/strsep (Makefile.am): Likewise.
3419         * modules/strstr (Makefile.am): Likewise.
3420         * modules/strtod (Makefile.am): Likewise.
3421         * modules/strtoimax (Makefile.am): Likewise.
3422         * modules/strtok_r (Makefile.am): Likewise.
3423         * modules/strtol (Makefile.am): Likewise.
3424         * modules/strtoll (Makefile.am): Likewise.
3425         * modules/strtoul (Makefile.am): Likewise.
3426         * modules/strtoull (Makefile.am): Likewise.
3427         * modules/strtoumax (Makefile.am): Likewise.
3428         * modules/strverscmp (Makefile.am): Likewise.
3429         * modules/time_r (Makefile.am): Likewise.
3430         * modules/timegm (Makefile.am): Likewise.
3431         * modules/tmpfile-safer (Makefile.am): Likewise.
3432         * modules/unistd-safer (Makefile.am): Likewise.
3433         * modules/unlinkdir (Makefile.am): Likewise.
3434         * modules/userspec (Makefile.am): Likewise.
3435         * modules/utime (Makefile.am): Likewise.
3436         * modules/utimecmp (Makefile.am): Likewise.
3437         * modules/utimens (Makefile.am): Likewise.
3438         * modules/vasnprintf (Makefile.am): Likewise.
3439         * modules/vasprintf (Makefile.am): Likewise.
3440         * modules/vsnprintf (Makefile.am): Likewise.
3441         * modules/xalloc (Makefile.am): Likewise.
3442         * modules/xgetcwd (Makefile.am): Likewise.
3443         * modules/xnanosleep (Makefile.am): Likewise.
3444         * modules/xreadlink (Makefile.am): Likewise.
3445         * modules/xstrtod (Makefile.am): Likewise.
3446         * modules/xstrtol (Makefile.am): Likewise.
3447         * modules/xstrtold (Makefile.am): Likewise.
3448         * modules/yesno (Makefile.am): Likewise.
3449
3450 2006-10-12  Jim Meyering  <jim@meyering.net>
3451
3452         * m4/getloadavg.m4: Revert the change below.
3453
3454         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3455         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3456         fail with a symlink, which is what coreutils' ./bootstrap now
3457         creates by default.
3458
3459 2006-10-12  Bruno Haible  <bruno@clisp.org>
3460
3461         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3462         mingw.
3463         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3464         MSVC and mingw explicitly.
3465
3466 2006-10-11  Simon Josefsson  <jas@extundo.com>
3467             Bruno Haible  <bruno@clisp.org>
3468
3469         Add support for multiple gnulib-tool invocations in the scope of a
3470         single configure.ac file.
3471         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3472         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3473         with the same contents as the _LIBADD variable.
3474         (func_emit_initmacro_start, func_emit_initmacro_end,
3475         func_emit_initmacro_done): New functions.
3476         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3477         gl_LIBOBJS and gl_LTLIBOBJS.
3478
3479 2006-10-11  Bruno Haible  <bruno@clisp.org>
3480
3481         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3482         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3483         autoreconf. Instead, invoke autopoint explicitly but move back the
3484         *.m4 files from gnulib.
3485
3486 2006-10-11  Bruno Haible  <bruno@clisp.org>
3487
3488         * gnulib-tool (func_usage): Make module names after --create-testdir
3489         optional.
3490         (func_create_testdir): If no module was specified, use nearly all
3491         modules.
3492
3493 2006-10-12  Jim Meyering  <jim@meyering.net>
3494
3495         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3496         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3497         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3498         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3499         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3500         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3501         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3502         (fts_set_stat_required): New function.
3503         (fts_open): Defer the calls to fts_stat, if possible or requested.
3504         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3505         into fts_stat itself.
3506         (fts_read): Perform any required (deferred) fts_stat call.
3507         (fts_build): Likewise, for the directory we're about to open and read.
3508         In the readdir loop, carefully decide whether each entry will require
3509         an eventual call to fts_stat, using dirent.d_type info if available.
3510         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3511         a command line argument into this function.  Update all callers.
3512         Map a return value of FTS_DOT to FTS_D for a command line argument.
3513         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3514         Thanks to Miklos Szeredi for his tenacity and for the initial
3515         bug report about "find" failing on a FUSE-based file system.
3516
3517         * lib/fts.c (fts_open): Use consistent indentation.
3518
3519 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3520
3521         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3522         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3523         reported by Jim Meyering.  All uses of cache variables renamed
3524         to match Autoconf's.
3525         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3526         the other one.
3527
3528         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3529         Fix misspelling in diagnostic.
3530
3531 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3532
3533         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3534         defined.  Problem reported by Matthew Woehlke.
3535
3536         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3537         Add support for Tandem NonStop R series.
3538         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3539         Use new macro.
3540
3541         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3542         (has_trailing_slash): Omit size arg; all callers changed.
3543         Omit 'inline', since it doesn't help performance and we'd
3544         need to configure it.
3545         Don't count //, ///, etc. as having a trailing slash.
3546         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3547         (rpl_rename_dest_slash): On failure, use rename's errno rather
3548         than (in some cases) an incorrect or junk errno.
3549         Simplify code by removing need to compute length; this does
3550         cause it to make two passes instead of one over the file name,
3551         but it's worth it.
3552
3553         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3554         change, since Autoconf's version may no longer be appropriate now
3555         that we are using CVS Autoconf's version.  Add support for Tandem.
3556
3557 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3558             Bruno Haible  <bruno@clisp.org>
3559
3560         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3561         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3562         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3563         gl_AC_TYPE_LONG_LONG.
3564
3565         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3566         instead of HAVE_LONG_LONG.
3567         * lib/printf-args.c (printf_fetchargs): Likewise.
3568         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3569         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3570         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3571         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3572         gl_AC_TYPE_LONG_LONG.
3573
3574 2006-10-11  Bruno Haible  <bruno@clisp.org>
3575
3576         * m4/longlong.m4: Add comments.
3577         * m4/ulonglong.m4: Likewise.
3578
3579 2006-10-10  Bruno Haible  <bruno@clisp.org>
3580
3581         Make it possible to #define stpcpy, strdup to aliases.
3582         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3583         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3584
3585 2006-10-10  Bruno Haible  <bruno@clisp.org>
3586
3587         Make it possible to #define gcd to an alias.
3588         * lib/gcd.c: Include config.h.
3589
3590 2006-10-10  Bruno Haible  <bruno@clisp.org>
3591
3592         Make it possible to #define c_isascii to an alias.
3593         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3594         defined. Undefine the macros before defining them, to avoid gcc
3595         warnings.
3596         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3597         define NO_C_CTYPE_MACROS early.
3598
3599 2006-10-10  Bruno Haible  <bruno@clisp.org>
3600
3601         Make it possible to #define set_program_name to an alias.
3602         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3603         ENABLE_RELOCATABLE early.
3604
3605 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3606
3607         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3608         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3609         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3610         More generally, don't assume that 64-bit signed int is available
3611         if unsigned int is, and vice versa.
3612         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3613         unsigned symbols, not on their signed counterparts.
3614         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3615         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3616         (UINT64_C, UINTMAX_C):
3617         Likewise.
3618         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3619         unsigned counterparts.
3620         (Have_long_long, Unsigned): New macros.
3621         (Int): Renamed from INT.
3622         (strtoimax): Use the new macros.
3623         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3624         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3625         * modules/inttypes (inttypes.h): Substitute
3626         HAVE_UNSIGNED_LONG_LONG_INT.
3627         * modules/stdint (stdint.h): Likewise.
3628         (Files): Add m4/ulonglong.m4.
3629
3630 2006-10-10  Bruno Haible  <bruno@clisp.org>
3631
3632         Fix a gcc -Wshadow warning.
3633         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3634         to 'bucket'.
3635         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3636         gl_linked_indexof_from_to): Likewise.
3637         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3638         Likewise.
3639         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3640         Likewise.
3641         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3642         Reported by Eric Blake.
3643
3644 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3645
3646         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3647         for NetBSD.  Problem reported by Bruno Haible.
3648
3649 2006-10-09  Jim Meyering  <jim@meyering.net>
3650
3651         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3652         Patch from Bruno Haible.
3653
3654 2006-10-09  Jim Meyering  <jim@meyering.net>
3655
3656         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3657         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3658         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3659
3660 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3661
3662         Don't include <config.h> twice; this doesn't work in some cases,
3663         e.g., when config.h has "#define intmax_t long long int" and
3664         we include <config.h>, <inttypes.h>, <config.h> in that order.
3665         Problem reported by Matthew Woehlke in:
3666         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3667         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3668         * lib/fts-cycle.c: Don't include config.h.
3669         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3670         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3671         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3672         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3673         inttypes.h.
3674         * lib/xstrtoumax.c: Likewise.
3675         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3676         __strtol and the like, so that this module is more like its siblings.
3677         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3678         Remove; no longer needed now that we assume gnulib inttypes.h.
3679
3680 2006-10-08  Bruno Haible  <bruno@clisp.org>
3681
3682         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3683         option.
3684
3685 2006-10-07  Jim Meyering  <jim@meyering.net>
3686
3687         * modules/inttypes (inttypes.h): Revert what seems to have been
3688         an inadvertent part of today's change: use "|", not "/" in the
3689         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3690
3691 2006-10-07  Bruno Haible  <bruno@clisp.org>
3692
3693         * modules/sublist: New file.
3694
3695 2006-10-07  Bruno Haible  <bruno@clisp.org>
3696
3697         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3698         * modules/argz (argz.h): Likewise.
3699         * modules/arpa_inet (arpa/inet.h): Likewise.
3700         * modules/byteswap (byteswap.h): Likewise.
3701         * modules/configmake (configmake.h): Likewise.
3702         * modules/fcntl (fcntl.h): Likewise.
3703         * modules/fnmatch (fnmatch.h): Likewise.
3704         * modules/getopt (getopt.h): Likewise.
3705         * modules/glob (glob.h): Likewise.
3706         * modules/inttypes (inttypes.h): Likewise.
3707         * modules/netinet_in (netinet/in.h): Likewise.
3708         * modules/poll (poll.h): Likewise.
3709         * modules/stdbool (stdbool.h): Likewise.
3710         * modules/stdint (stdint.h): Likewise.
3711         * modules/sys_select (sys/select.h): Likewise.
3712         * modules/sys_socket (sys/socket.h): Likewise.
3713         * modules/sys_stat (sys/stat.h): Likewise.
3714         * modules/sysexits (sysexits.h): Likewise.
3715         * modules/unistd (unistd.h): Likewise.
3716         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3717         Add a "DO NOT EDIT" comment to the generated file.
3718         (func_import): Likewise for gnulib-comp.m4.
3719
3720 2006-10-07  Bruno Haible  <bruno@clisp.org>
3721
3722         * lib/gl_sublist.h: New file.
3723         * lib/gl_sublist.c: New file.
3724
3725 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3726
3727         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3728         name (relative to the original working directory) and the file
3729         name component (relative to the temporary working directory).  All
3730         callers changed.
3731         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3732         * lib/mkdir-p.c (make_dir_parents): Likewise.
3733         * lib/mkdir-p.h (make_dir_parents): Likewise.
3734
3735 2006-10-06  Eric Blake  <ebb9@byu.net>
3736
3737         Define several macros for use by the clean-temp module.
3738         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3739         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3740         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3741
3742         * lib/clean-temp.h (close_stream_temp): New declaration.
3743         * lib/clean-temp.c (includes): Pull in headers according to what
3744         other modules are in use.
3745         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3746
3747 2006-10-06  Bruno Haible  <bruno@clisp.org>
3748
3749         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3750         instead of fopen, fwriteerror.
3751
3752 2006-10-06  Bruno Haible  <bruno@clisp.org>
3753
3754         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3755         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3756         int.
3757         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3758         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3759         Return an error indicator.
3760         Suggested by Eric Blake.
3761
3762 2006-10-06  Bruno Haible  <bruno@clisp.org>
3763
3764         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3765         Reported by Eric Blake.
3766
3767 2006-10-06  Bruno Haible  <bruno@clisp.org>
3768
3769         * modules/closeout (Description): Mention stderr too.
3770
3771 2006-10-06  Bruno Haible  <bruno@clisp.org>
3772         and Paul Eggert  <eggert@cs.ucla.edu>
3773
3774         * lib/closeout.c (close_stdout): Also close stderr.
3775         * lib/closeout.h: Update comment.
3776
3777 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3778
3779         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3780         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3781         * lib/dirchownmod.c: Include lchown.h.
3782         * lib/lchown.c: Don't include files that lchown.h now includes.
3783         Don't declare chown, since lchown.h now does that.
3784         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3785         (lchown): Define to rpl_chown if lchown is declared but
3786         does not exist.  Declare using a prototype if lchown is not
3787         declared.  Add a copyright notice.
3788         * lib/mkstemp.h: Include <unistd.h>.
3789         * lib/openat.c: Include lchown.h.
3790
3791         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3792         we now test for that separately.
3793         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3794         rather than O_NOFOLLOW, when testing whether it's possible to
3795         avoid a race condition reliably.
3796         * lib/savewd.c (savewd_chdir): Likewise.
3797
3798         Remove macros that are no longer needed now that stdint.h is
3799         reliable.
3800         * lib/fsusage.c (UINTMAX_MAX): Remove.
3801         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3802         * lib/utimecmp.c (SIZE_MAX): Remove.
3803
3804         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3805
3806         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3807         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3808         O_NOATIME works.
3809
3810 2006-10-05  Bruno Haible  <bruno@clisp.org>
3811
3812         * lib/gl_list.h (gl_sortedlist_search_from_to,
3813         gl_sortedlist_indexof_from_to): New declarations.
3814         (gl_list_implementation): New fields sortedlist_search_from_to,
3815         sortedlist_indexof_from_to.
3816         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3817         inline functions.
3818         * lib/gl_list.c (gl_sortedlist_search_from_to,
3819         gl_sortedlist_indexof_from_to): New functions.
3820         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3821         function.
3822         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3823         (gl_array_sortedlist_search_from_to): New function.
3824         (gl_array_list_implementation): Update.
3825         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3826         function.
3827         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3828         (gl_carray_sortedlist_search_from_to): New function.
3829         (gl_carray_list_implementation): Update.
3830         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3831         gl_linked_sortedlist_indexof_from_to): New functions.
3832         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3833         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3834         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3835         gl_tree_sortedlist_indexof_from_to): New functions.
3836         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3837         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3838         Update.
3839         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3840         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3841         Update.
3842
3843 2006-10-05  Bruno Haible  <bruno@clisp.org>
3844
3845         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3846         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3847         (struct gl_list_implementation): Add fields search_from_to,
3848         indexof_from_to. Remove fields search, indexof.
3849         (gl_list_search): Use the search_from_to method.
3850         (gl_list_search_from, gl_list_search_from_to): New functions.
3851         (gl_list_indexof): Use the indexof_from_to method.
3852         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3853         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3854         (gl_list_search_from, gl_list_search_from_to): New functions.
3855         (gl_list_indexof): Use the indexof_from_to method.
3856         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3857         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3858         gl_array_indexof. Add start_index, end_index arguments.
3859         (gl_array_search_from_to): Renamed from gl_array_search. Add
3860         start_index, end_index arguments.
3861         (gl_array_remove, gl_array_list_implementation): Update.
3862         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3863         gl_carray_indexof. Add start_index, end_index arguments.
3864         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3865         start_index, end_index arguments.
3866         (gl_carray_remove, gl_carray_list_implementation): Update.
3867         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3868         gl_linked_search. Add start_index, end_index arguments.
3869         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3870         start_index, end_index arguments.
3871         (gl_linked_remove): Update.
3872         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3873         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3874         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3875         field to 'size_t'.
3876         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3877         gl_tree_search. Add start_index, end_index arguments.
3878         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3879         start_index, end_index arguments.
3880         (gl_tree_remove): Update.
3881         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3882         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3883         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3884         function.
3885         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3886         gl_tree_search. Add start_index, end_index arguments.
3887         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3888         start_index, end_index arguments.
3889         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3890         Update.
3891         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3892
3893 2006-10-05  Bruno Haible  <bruno@clisp.org>
3894
3895         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3896
3897         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3898         fwriteerror_temp): New declarations.
3899         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3900         (descriptors): New variable.
3901         (cleanup): First, close the descriptors.
3902         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3903         fclose_temp, fwriteerror_temp): New functions.
3904
3905 2006-10-04  Jim Meyering  <jim@meyering.net>
3906
3907         * lib/fts.c (fts_open): Tiny comment change.
3908
3909 2006-10-04  Bruno Haible  <bruno@clisp.org>
3910
3911         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3912         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3913         gl_LOCK_BODY.
3914         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3915         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3916         gl_LOCK_EARLY_BODY.
3917         (gl_LOCK): Require gl_LOCK_BODY.
3918
3919 2006-10-04  Bruno Haible  <bruno@clisp.org>
3920
3921         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3922         (gl_oset_search_atleast): New declaration.
3923         (struct gl_oset_implementation): Add field 'search_atleast'.
3924         (gl_oset_search_atleast): New inline function.
3925         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3926         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3927         (gl_array_oset_implementation): Update.
3928         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3929         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3930         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3931
3932 2006-10-04  Bruno Haible  <bruno@clisp.org>
3933
3934         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3935
3936 2006-10-03  Bruno Haible  <bruno@clisp.org>
3937
3938         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3939         from gl_avltreehash_list_implementation.
3940
3941 2006-10-03  Bruno Haible  <bruno@clisp.org>
3942
3943         * lib/gl_oset.c (gl_oset_add): Fix return type.
3944
3945 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3946
3947         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3948
3949 2006-10-02  Eric Blake  <ebb9@byu.net>
3950
3951         * modules/strnlen (Depends-on): Add extensions.
3952
3953 2006-10-02  Eric Blake  <ebb9@byu.net>
3954
3955         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3956         definition in 2.60+.
3957
3958 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3959
3960         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3961         checks.
3962
3963 2006-10-02  Bruno Haible  <bruno@clisp.org>
3964
3965         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3966         to the AUTOMAKE_OPTIONS.
3967         Reported by Jim Meyering.
3968
3969 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3970
3971         Work around bug in Solaris 10 /proc file system:
3972         /proc/self/fd/NNN/.. isn't the parent directory of
3973         the directory whose file descriptor is NNN.  This needs to
3974         be worked around at run time, not compile time, since a
3975         program might be built on Solaris 8, where things work, and
3976         run on Solaris 10.
3977         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
3978         to use the following interface instead:
3979         (OPENAT_BUFFER_SIZE): New macro.
3980         (openat_proc_name): New function.
3981         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
3982         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
3983         Likewise.
3984         * lib/openat-proc.c: New file.
3985         * modules/openat (Files): Add lib/openat-proc.c.
3986         (Depends-on): Add same-inode, stdbool.
3987         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
3988
3989 2006-09-29  Bruno Haible  <bruno@clisp.org>
3990
3991         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
3992         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
3993         argument. Set stdout_closed before testing for ferror, not after.
3994         (fwriteerror, fwriteerror_no_ebadf): New functions.
3995
3996 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3997
3998         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
3999
4000 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4001
4002         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4003         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4004
4005 2006-09-28  Jim Meyering  <jim@meyering.net>
4006
4007         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4008         Include <unistd.h>.
4009
4010 2006-09-28  Bruno Haible  <bruno@clisp.org>
4011
4012         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4013         * modules/linkedhash-list (Depends-on): Likewise.
4014         * modules/rbtreehash-list (Depends-on): Likewise.
4015
4016 2006-09-28  Bruno Haible  <bruno@clisp.org>
4017
4018         * lib/strndup.h: Simplify the redefinition of strndup.
4019         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4020         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4021
4022 2006-09-28  Bruno Haible  <bruno@clisp.org>
4023
4024         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4025         * lib/gl_linkedhash_list.c: Likewise.
4026         * lib/gl_rbtreehash_list.c: Likewise.
4027
4028 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4029
4030         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4031         getaddrinfo.
4032
4033         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4034         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4035         it causes <stdio_ext.h> to cause a compile-time error.
4036         Problem reported by Nelson H. F. Beebe.
4037         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4038         of HAVE_DECL___PENDING.
4039
4040         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4041         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4042         declaration.
4043
4044 2006-09-27  Jim Meyering  <jim@meyering.net>
4045
4046         This file could end up with a definition for a function
4047         named __strndup, rather than rpl_strndup on a system with
4048         incomplete weak_alias support.
4049         * lib/strndup.c (strndup): Rename from __strndup.
4050         Remove #defines that used to map __strndup to strndup.
4051         Don't use K&R prototypes.
4052         Remove LIBC-related code, since this file is not sync'd with glibc.
4053         * lib/strndup.h: Revamp, accordingly.
4054         * m4/strndup.m4: Modernize.
4055
4056 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4057
4058         * modules/savewd (Depends-on): Add 'raise'.
4059         * lib/savewd.c: Include <signal.h>, for 'raise'.
4060
4061 2006-09-26  Jim Meyering  <jim@meyering.net>
4062
4063         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4064         when we detect Darwin 8.7.0's acl_get_file bug.
4065         Rearrange to perform the new (below) run-test while $LIBS
4066         contains any acl-related library.  Set USE_ACL at the end.
4067         (gl_ACL_GET_FILE): New function.
4068
4069 2006-09-26  Eric Blake  <ebb9@byu.net>
4070
4071         * lib/verror.c: Include <config.h> unconditionally.
4072
4073 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4074
4075         * modules/clock-time (Maintainer): Add self.
4076         * modules/getlogin_r (Depends-on): Add extensions.
4077
4078 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4079
4080         * modules/clock-time: New module.
4081         * modules/nanosleep (Depends-on): Add clock-time.
4082         * modules/gethrxtime (Depends-on): Likewise.
4083         * modules/gettime (Depends-on): Likewise.
4084         * modules/settime (Depends-on): Likewise.
4085
4086         * modules/fts-lgpl: Depend on openat.
4087         * modules/mkancesdirs: Depend on savewd.
4088         * modules/mkdir-p: Likewise.
4089
4090 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4091
4092         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4093
4094         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4095         `gl_have_arbitrary_file_name_length_limit' to
4096         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4097         actually works between configure runs.
4098
4099 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4100             Bruno Haible  <bruno@clisp.org>
4101
4102         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4103
4104 2006-09-25  Jim Meyering  <jim@meyering.net>
4105
4106         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4107         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4108
4109 2006-09-25  Eric Blake  <ebb9@byu.net>
4110
4111         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4112         exec's in 2006-09-18 patch when shuffling fds.
4113
4114 2006-09-25  Bruno Haible  <bruno@clisp.org>
4115
4116         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4117         Reported by Jim Meyering.
4118
4119 2006-09-24  Jim Meyering  <jim@meyering.net>
4120
4121         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4122         compare a pointer against a literal "0".  That caused failures with
4123         at least HP-UX's hpcc.
4124
4125 2006-09-22  Simon Josefsson  <jas@extundo.com>
4126
4127         * modules/gc-sha1:
4128         * modules/gc-md4:
4129         * modules/gc-hmac-sha1:
4130         * modules/gc-hmac-md5:
4131         * modules/gc-des:
4132         * modules/gc-arcfour: Distribute more files.
4133
4134 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4135
4136         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4137         (gl_linked_iterator_from_to): Initialize struct completely.
4138         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4139         (gl_tree_iterator_from_to): Likewise
4140         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4141         * lib/gl_array_list.c [lint] (gl_array_iterator)
4142         (gl_array_iterator_from_to): Likewise.
4143         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4144         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4145         (gl_carray_iterator_from_to): Likewise.
4146
4147         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4148         * lib/md4.c (md4_process_block): Remove unused variable.
4149         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4150         parentheses for clarity.
4151
4152 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4153
4154         * modules/bison-i18n (Depends-on): Add gettext.
4155
4156 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4157
4158         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4159         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4160         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4161         also add missing comma that caused broken test.
4162         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4163         stdlib.h, for `abort'.
4164         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4165         variables.
4166         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4167         include unistd.h if present, for `rmdir'.
4168         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4169         variables.
4170         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4171         in the process include standard headers for prototypes.
4172         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4173         gets declared on GNU/Linux.
4174         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4175         unistd.h, for `rmdir'.
4176         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4177
4178         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4179         always true.
4180         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4181
4182         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4183
4184 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4185
4186         * gnulib-tool (func_version): Create output all at once.  This
4187         may help avoid triggering unnecessary SIGPIPEs, and at any
4188         rate it doesn't hurt.
4189
4190 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4191             Bruno Haible  <bruno@clisp.org>
4192
4193         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4194         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4195         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4196
4197         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4198         (gl_FUNC_VASPRINTF): Invoke it.
4199
4200 2006-09-22  Bruno Haible  <bruno@clisp.org>
4201
4202         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4203         getloadavg.c as first argument.
4204
4205 2006-09-22  Bruno Haible  <bruno@clisp.org>
4206
4207         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4208         at the beginning of the gl_INIT macro.
4209         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4210         gl_GETLOADAVG.
4211
4212 2006-09-22  Bruno Haible  <bruno@clisp.org>
4213
4214         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4215         module.
4216         Suggested by Ralf Wildenhues.
4217
4218 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4219
4220         Import this patch from libc:
4221
4222         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4223
4224         * lib/regex_internal.c (re_string_reconstruct): Handle
4225         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4226         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4227         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4228         re_string_context_at.
4229
4230         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4231         now requires it.
4232         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4233         gl_REGEX now does it for us.
4234         (gl_REGEX): Add test taken from
4235         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4236
4237         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4238         Check that large offsets work.  Modernize Autoconf usages.
4239         Prefer "yes" to mean a good thing rather than a bad.
4240         Don't put "#define mkstemp" in config.h, as this might interfere
4241         with standard system headers that "#define mkstemp mkstemp64".
4242
4243         * modules/mkstemp (Depends-on): Add extensions, so that
4244         mkstemp is visible on some platforms.
4245         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4246         (Include): Change to "mkstemp.h" from <stdlib.h>.
4247         (Files): Add mkstemp.h.
4248
4249         * lib/mkstemp.h: New file, since some standard headers
4250         #define mkstemp.
4251         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4252         Include "mkstemp.h".
4253         Make the _LIBC code resemble glibc original more,
4254         e.g., use K&R style.
4255         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4256         (mkstemp): Remove, since mkstemp.h does this for us.
4257         * lib/stdlib--.h: Include mkstemp.h.
4258
4259         Import this patch from libc:
4260
4261         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4262
4263         * lib/tempname.c (__gen_tempname): Change attempts_min
4264         into a macro.  Use preprocessor to decide how to initialize
4265         attempts [Coverity CID 67].
4266
4267 2006-09-20  Bruno Haible  <bruno@clisp.org>
4268
4269         * lib/mkdtemp.c: Import from libc.
4270         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4271                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4272                 attempts_min into a macro.  Use preprocessor to decide how to
4273                 initialize attempts [Coverity CID 67].
4274         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4275                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4276                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4277
4278 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4279
4280         * gnulib-tool (func_exit): New function, to allow to pass the
4281         exit status portably through the trap.  Use everywhere.
4282         (--help, --version): Signal a write error.
4283         (trap): catch SIGPIPE, for write errors.
4284         Exit at the end of the trap, with the correct exit status.
4285
4286 2006-09-19  Karl Berry  <karl@gnu.org>
4287
4288         * doc/gnulib.texi: note about the license texinfo files.
4289
4290 2006-09-19  Eric Blake  <ebb9@byu.net>
4291
4292         * gnulib-tool: Avoid space-tab.
4293
4294 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4295
4296         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4297         that prevented coreutils 6.1 from building.  Problem reported
4298         by Petter Reinholdtsen.
4299
4300 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4301
4302         * gnulib-tool (avoidlist): Fix typo that broke options like
4303         --avoid=lock that are used by coreutils bootstrap.
4304
4305 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4306
4307         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4308         more systematically.
4309
4310 2006-09-18  Jim Meyering  <jim@meyering.net>
4311
4312         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4313
4314 2006-09-18  Bruno Haible  <bruno@clisp.org>
4315
4316         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4317
4318 2006-09-18  Bruno Haible  <bruno@clisp.org>
4319
4320         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4321         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4322         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4323         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4324         * m4/gettext.m4: Require autoconf >= 2.52.
4325         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4326         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4327         of gl_cv_header_inttypes_h.
4328
4329 2006-09-18  Bruno Haible  <bruno@clisp.org>
4330
4331         * lib/javaversion.c: Include configmake.h.
4332
4333 2006-09-18  Bruno Haible  <bruno@clisp.org>
4334
4335         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4336         avoid that the while loops be executed in a subshell.
4337
4338 2006-09-18  Bruno Haible  <bruno@clisp.org>
4339
4340         * MODULES.html.sh (func_module): Break long lines.
4341         Suggested by Bruce Korb <bkorb@gnu.org>.
4342
4343 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4344
4345         Speed up by a factor of 1.12.
4346         * gnulib-tool (nl): New variable.
4347         (func_import): Rewrite include directive extraction to only read each
4348         directive once.
4349
4350 2006-09-17  Bruno Haible  <bruno@clisp.org>
4351
4352         * modules/javaversion (Makefile.am): Remove DEFS setting.
4353         (Depends-on): Add configmake, for PKGDATADIR definition.
4354
4355 2006-09-17  Bruno Haible  <bruno@clisp.org>
4356
4357         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4358
4359 2006-09-17  Bruno Haible  <bruno@clisp.org>
4360
4361         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4362         (func_modules_transitive_closure, func_modules_add_dummy,
4363         func_modules_to_filelist, func_import, func_create_testdir,
4364         func_create_megatestdir, ...): Use it wherever possible.
4365         Suggested by Ralf Wildenhues.
4366
4367 2006-09-16  Karl Berry  <karl@gnu.org>
4368
4369         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4370         to avoid sectioning errors.
4371         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4372         [ifinfo]: blank line after @center-ed titles.
4373         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4374         Spell FSF address consistently with others.
4375         (These changes approved by rms.)
4376
4377 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4378
4379         Speed up by a factor of 1.61.
4380         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4381         already checked module names again.
4382
4383 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4384
4385         Speed up by a factor of 1.13.
4386         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4387         for new_files, and the input to func_add_or_update.
4388
4389 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4390
4391         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4392         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4393
4394 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4395
4396         * modules/mkancesdirs (Depends-on): Add fcntl.
4397         * modules/savewd: New file.
4398         * MODULES.html.sh (File system functions): Add savewd.
4399
4400         * modules/configmake (Makefile.am): Add support for the
4401         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4402
4403 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4404
4405         * m4/savewd.m4: New file.
4406
4407 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4408
4409         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4410         (dirchownmod): New arg FD.  All callers changed.
4411         Use FD rather than opening the directory ourself, as opening is
4412         now the caller's responsibility.
4413         * lib/dirchownmod.h: Likewise.
4414         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4415         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4416         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4417         (test_dir): Remove.
4418         (mkancesdirs): Return length of prefix of FILE that has already
4419         been made, or -2 if there is a child doing the work.  Redo
4420         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4421         ".", and treat ".." specially since it might stray back into
4422         already-created areas.  Use a subprocess if necessary.  New arg
4423         WD; all users changed.  MAKE_DIR function should now return 1
4424         if it creates a directory that is not readable.  Return -2 if
4425         a child process is spun off.
4426         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4427         Adjust signature to match code.
4428         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4429         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4430         all users changed.
4431         * lib/savewd.c, lib/savewd.h: New files.
4432
4433 2006-09-15  Jim Meyering  <jim@meyering.net>
4434
4435         * modules/rename-dest-slash: New module.
4436         * MODULES.html.sh (posix_compat): Add it here.
4437
4438         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4439
4440 2006-09-15  Jim Meyering  <jim@meyering.net>
4441
4442         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4443         file.
4444
4445         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4446
4447 2006-09-15  Jim Meyering  <jim@meyering.net>
4448
4449         * lib/rename-dest-slash.c (has_trailing_slash): Use
4450         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4451         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4452         test before testing whether SRC is a directory.
4453         Suggestions from Bruno Haible.
4454
4455         Avoid a warning about an unused variable.
4456         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4457         into the #ifdef block where it's used.
4458
4459         * lib/rename-dest-slash.c: New file.
4460
4461 2006-09-14  Bruno Haible  <bruno@clisp.org>
4462
4463         * lib/allocsa.c: Include <config.h> unconditionally.
4464         * lib/asnprintf.c: Likewise.
4465         * lib/asprintf.c: Likewise.
4466         * lib/c-strcasecmp.c: Likewise.
4467         * lib/c-strcasestr.c: Likewise.
4468         * lib/c-strncasecmp.c: Likewise.
4469         * lib/c-strstr.c: Likewise.
4470         * lib/classpath.c: Likewise.
4471         * lib/clean-temp.c: Likewise.
4472         * lib/concatpath.c: Likewise.
4473         * lib/copy-file.c: Likewise.
4474         * lib/csharpcomp.c: Likewise.
4475         * lib/csharpexec.c: Likewise.
4476         * lib/execute.c: Likewise.
4477         * lib/fatal-signal.c: Likewise.
4478         * lib/findprog.c: Likewise.
4479         * lib/fwriteerror.c: Likewise.
4480         * lib/gl_array_list.c: Likewise.
4481         * lib/gl_array_oset.c: Likewise.
4482         * lib/gl_avltree_list.c: Likewise.
4483         * lib/gl_avltree_oset.c: Likewise.
4484         * lib/gl_avltreehash_list.c: Likewise.
4485         * lib/gl_carray_list.c: Likewise.
4486         * lib/gl_linked_list.c: Likewise.
4487         * lib/gl_linkedhash_list.c: Likewise.
4488         * lib/gl_list.c: Likewise.
4489         * lib/gl_oset.c: Likewise.
4490         * lib/gl_rbtree_list.c: Likewise.
4491         * lib/gl_rbtree_oset.c: Likewise.
4492         * lib/gl_rbtreehash_list.c: Likewise.
4493         * lib/imaxabs.c: Likewise.
4494         * lib/imaxdiv.c: Likewise.
4495         * lib/javacomp.c: Likewise.
4496         * lib/javaexec.c: Likewise.
4497         * lib/javaversion.c: Likewise.
4498         * lib/linebreak.c: Likewise.
4499         * lib/localcharset.c: Likewise.
4500         * lib/lock.c: Likewise.
4501         * lib/mbchar.c: Likewise.
4502         * lib/mbswidth.c: Likewise.
4503         * lib/mkdtemp.c: Likewise.
4504         * lib/pipe.c: Likewise.
4505         * lib/printf-args.c: Likewise.
4506         * lib/printf-parse.c: Likewise.
4507         * lib/progname.c: Likewise.
4508         * lib/progreloc.c: Likewise.
4509         * lib/readlink.c: Likewise.
4510         * lib/sh-quote.c: Likewise.
4511         * lib/stpcpy.c: Likewise.
4512         * lib/stpncpy.c: Likewise.
4513         * lib/strcasecmp.c: Likewise.
4514         * lib/strcasestr.c: Likewise.
4515         * lib/strcspn.c: Likewise.
4516         * lib/striconv.c: Likewise.
4517         * lib/strncasecmp.c: Likewise.
4518         * lib/strnlen1.c: Likewise.
4519         * lib/strstr.c: Likewise.
4520         * lib/strtok_r.c: Likewise.
4521         * lib/tls.c: Likewise.
4522         * lib/tmpdir.c: Likewise.
4523         * lib/unicodeio.c: Likewise.
4524         * lib/unsetenv.c: Likewise.
4525         * lib/vasnprintf.c: Likewise.
4526         * lib/vasprintf.c: Likewise.
4527         * lib/wait-process.c: Likewise.
4528         * lib/xallocsa.c: Likewise.
4529         * lib/xsetenv.c: Likewise.
4530         * lib/xstriconv.c: Likewise.
4531
4532 2006-09-13  Simon Josefsson  <jas@extundo.com>
4533
4534         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4535         that internally, suggested by Ralf Wildenhues
4536         <Ralf.Wildenhues@gmx.de>.
4537
4538 2006-09-13  Simon Josefsson  <jas@extundo.com>
4539
4540         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4541         @LIBOBJS@.
4542         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4543
4544 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4545
4546         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4547         longer worry about uses that don't define HAVE_CONFIG_H.
4548         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4549         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4550         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4551         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4552         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4553         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4554         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4555         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4556         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4557         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4558         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4559         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4560         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4561         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4562         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4563         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4564         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4565         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4566         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4567         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4568         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4569         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4570         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4571         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4572         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4573         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4574         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4575         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4576         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4577         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4578         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4579         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4580         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4581         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4582         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4583         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4584         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4585         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4586         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4587         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4588         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4589         Likewise.
4590
4591 2006-09-13  Eric Blake  <ebb9@byu.net>
4592
4593         * lib/getopt.c: Fix typo in last commit.
4594
4595 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4596
4597         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4598         dgettext.
4599
4600 2006-09-12  Jim Meyering  <jim@meyering.net>
4601
4602         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4603         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4604         Reported by Nelson H. F. Beebe.
4605
4606 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4607
4608         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4609         program_invocation_name and program_invocation_short_name are
4610         initialized.
4611         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4612         and program_invocation_short_name to argp.h, so they are visible
4613         to user programs.
4614         * lib/argp.h: Likewise
4615
4616 2006-09-10  Bruno Haible  <bruno@clisp.org>
4617
4618         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4619         m4/inttypes_h.m4, m4/uintmax_t.m4.
4620
4621 2006-09-10  Bruno Haible  <bruno@clisp.org>
4622
4623         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4624         gl_AC_TYPE_UINTMAX_T.
4625
4626 2006-09-10  Bruno Haible  <bruno@clisp.org>
4627
4628         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4629
4630 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4631
4632         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4633         convention.  Text proposed by Bruno Haible.
4634         (struct argp_option): Document the use of N_() wrappers.
4635
4636         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4637         '\v', and translate the two parts separately, instead of feeding
4638         the whole string to gettext.  This allows to exclude
4639         '\v' from the strings visible to the translator by writing doc
4640         strings as N_("..") "\v" N_("..").
4641
4642 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4643
4644         * config/srclist.txt: Undo latest change; the bug was fixed.
4645
4646 2006-09-09  Bruno Haible  <bruno@clisp.org>
4647
4648         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4649         assignments if building a library without libtool.
4650         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4651         in func_emit_lib_Makefile_am.
4652         (func_import): When building a static library libfoo.a, arrange to
4653         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4654         (func_create_testdir): Likewise.
4655         * modules/gc (configure.ac, Makefile.am): If building statically,
4656         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4657         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4658         * modules/striconv (configure.ac, Makefile.am): Likewise.
4659         Based on a suggestion by Ralf Wildenhues.
4660
4661 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4662
4663         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4664         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4665         Also:
4666
4667         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4668         Add year_2050_test to catch glibc bug 2821
4669         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4670
4671         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4672         Prefer #ifdef to #if.
4673
4674         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4675         Return from 'main' instead of calling 'exit'.
4676
4677 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4678
4679         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4680         returned the maximum time_t value rather than (time_t) -1.
4681         Problem originally reported by William Bardwell
4682         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4683
4684         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4685         Moved to here ...
4686         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4687         ... from here.
4688
4689 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4690
4691         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4692         2821 is fixed.
4693
4694 2006-09-08  Jim Meyering  <jim@meyering.net>
4695
4696         Don't make generated files read-only.  That would bother too many
4697         people.  However, do retain the ability to work when targets are
4698         read-only: remove the destination and temporary files before writing
4699         them (when generated via sed or echo), or by using the -f option for
4700         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4701         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4702         * modules/byteswap, modules/configmake, modules/fcntl:
4703         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4704         * modules/localcharset, modules/netinet_in, modules/poll:
4705         * modules/stdbool, modules/stdint, modules/sys_select:
4706         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4707
4708 2006-09-08  Jim Meyering  <jim@meyering.net>
4709
4710         Avoid new build failure on FreeBSD 6.0.
4711         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4712         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4713         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4714
4715 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4716
4717         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4718
4719 2006-09-07  Jim Meyering  <jim@meyering.net>
4720
4721         Fix global typo in last change: use chmod u-w, not chmod u-x.
4722         Spotted by Paul Eggert and Bruce Korb.
4723         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4724         * modules/byteswap, modules/configmake, modules/fcntl:
4725         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4726         * modules/localcharset, modules/netinet_in, modules/poll:
4727         * modules/stdbool, modules/stdint, modules/sys_select:
4728         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4729
4730 2006-09-06  Jim Meyering  <jim@meyering.net>
4731
4732         Make generated files be read-only.
4733         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4734         Ensure that each generated file is now read-only.
4735         * modules/argz: Likewise.
4736         * modules/arpa_inet: Likewise.
4737         * modules/byteswap: Likewise.
4738         * modules/configmake: Likewise.
4739         * modules/fcntl: Likewise.
4740         * modules/fnmatch: Likewise.
4741         * modules/getopt: Likewise.
4742         * modules/glob: Likewise.
4743         * modules/inttypes: Likewise.
4744         * modules/netinet_in: Likewise.
4745         * modules/poll: Likewise.
4746         * modules/stdbool: Likewise.
4747         * modules/stdint: Likewise.
4748         * modules/sys_select: Likewise.
4749         * modules/sys_socket: Likewise.
4750         * modules/sys_stat: Likewise.
4751         * modules/sysexits: Likewise.
4752         * modules/localcharset: Same as above, but continue using temporary
4753         file named "t-$@" (why different?) rather than the "$@-t" used
4754         everywhere else.
4755
4756         * modules/sysexits (Makefile.am): Replace literal occurrences
4757         of "sysexit.h" more readable, and more consistent, "$@".
4758
4759 2006-09-06  Bruno Haible  <bruno@clisp.org>
4760
4761         * modules/striconv: New file.
4762         * modules/xstriconv: New file.
4763         * MODULES.html.sh (Internationalization functions): Add striconv,
4764         xstriconv.
4765
4766 2006-09-06  Bruno Haible  <bruno@clisp.org>
4767
4768         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4769         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4770         not using libtool correctly.
4771
4772 2006-09-06  Bruno Haible  <bruno@clisp.org>
4773
4774         * lib/striconv.h: New file.
4775         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4776         iconvstring.c.
4777         * lib/xstriconv.h: New file.
4778         * lib/xstriconv.c: New file.
4779
4780 2006-09-06  Bruno Haible  <bruno@clisp.org>
4781
4782         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4783         lib_..._LDFLAGS.
4784
4785 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4786
4787         * lib/argz_.h: Sync from Libtool.
4788
4789         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4790                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4791
4792         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4793
4794 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4795
4796         * modules/trim: New file.
4797
4798 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4799
4800         * lib/trim.h: New file.
4801         * lib/trim.c: New file.
4802
4803 2006-09-05  Bruno Haible  <bruno@clisp.org>
4804
4805         * MODULES.html.sh (String handling): Add trim.
4806
4807 2006-09-04  Karl Berry  <karl@gnu.org>
4808
4809         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4810         until next release.
4811
4812 2006-09-03  Bruno Haible  <bruno@clisp.org>
4813
4814         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4815         correctly.
4816
4817 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4818
4819         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4820         not gl_GETLOADAVG.  Omit unneeded semicolons.
4821         Problems reported by Ralf Wildenhues in
4822         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4823         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4824         at the end, which is the usual gnulib style.
4825
4826         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4827         of doing all the work ourselves.
4828         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4829         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4830
4831 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4832
4833         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4834         Problem reported by Ralf Wildenhues in
4835         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4836
4837         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4838         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4839
4840 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4841
4842         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4843         yesterday's patch by changing test -n to test -z.
4844
4845 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4846
4847         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4848         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4849         the former is now obsolescent.
4850
4851         * modules/chdir-long (Depends-on): Add fcntl.
4852
4853 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4854
4855         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4856         obsolescent, and programs should use gnulib instead.
4857         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4858         but with prefixes changed.
4859
4860 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4861
4862         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4863         or stdbool.h, because they might not exist while configuring.
4864
4865         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4866         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4867         does that for us.
4868         (O_DIRECTORY): Remove.
4869
4870 2006-08-31  Eric Blake  <ebb9@byu.net>
4871
4872         * gnulib-tool: Don't let emacs change spaces to TAB.
4873
4874 2006-08-31  Bruno Haible  <bruno@clisp.org>
4875
4876         * gnulib-tool: When calling func_import more than once, do it in a
4877         subshell.
4878         Reported by Eric Blake <ebb9@byu.net>.
4879
4880 2006-08-31  Bruno Haible  <bruno@clisp.org>
4881
4882         * gnulib-tool (nl): Remove variable.
4883         (sed_transform_lib_file): Use more robust test for config-h module.
4884         (func_import): Fix typo in 2006-08-25 patch.
4885
4886 2006-08-31  Bruno Haible  <bruno@clisp.org>
4887
4888         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4889         specified, augment Makefile.am variables instead of assigning them.
4890
4891 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4892
4893         Work around a bug in both the Linux and SunOS 64-bit kernels:
4894         nanosleep mishandles sleeps for longer than 2**31 seconds.
4895         Problem reported by Frank v Waveren in
4896         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4897         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4898         Check for nanosleep bug.
4899         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4900
4901 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4902
4903         Work around a bug in both the Linux and SunOS 64-bit kernels:
4904         nanosleep mishandles sleeps for longer than 2**31 seconds.
4905         Problem reported by Frank v Waveren in
4906         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4907         * lib/nanosleep.c (BILLION): New constant.
4908         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4909         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4910         implementation.
4911
4912 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4913
4914         * modules/nanosleep (Depends-on): Add gettime.
4915
4916 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4917         and Simon Josefsson  <jas@extundo.com>
4918         and Oskar Liljeblad  <oskar@osk.mine.nu>
4919
4920         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4921         * gnulib-tool (func_import): New license type 'unmodifiable license
4922         text'.
4923         * modules/fdl: Use it.  Longer description.
4924         * module/gpl, module/lgpl: New files.
4925
4926 2006-08-30  Jim Meyering  <jim@meyering.net>
4927
4928         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4929         shadowing the parameter.
4930
4931 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4932
4933         Sync from Libtool:
4934
4935         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4936
4937         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4938         sharing with gnulib.  Report by Eric Blake.
4939
4940 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4941
4942         * modules/isapipe: New file.
4943         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4944
4945 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4946
4947         * modules/configmake (Makefile.am): Add a comment, and omit
4948         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4949         by Bruno Haible.
4950
4951 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4952
4953         * m4/isapipe.m4: New file.
4954
4955 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4956
4957         * lib/isapipe.c, lib/isapipe.h: New files.
4958
4959 2006-08-29  Jim Meyering  <jim@meyering.net>
4960
4961         * modules/configmake (Makefile.am): Make configmake.h depend on
4962         Makefile.  Otherwise, a stale configmake.h could hang around.
4963
4964 2006-08-29  Eric Blake  <ebb9@byu.net>
4965
4966         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4967         resolution of upstream bug 3044.
4968
4969 2006-08-29  Bruno Haible  <bruno@clisp.org>
4970
4971         * modules/localcharset (Depends-on): Add configmake.
4972         (Makefile.am): Remove setting of LIBDIR through DEFS.
4973
4974 2006-08-29  Bruno Haible  <bruno@clisp.org>
4975
4976         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
4977         defined.
4978
4979 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
4980
4981         * modules/fcntl: New file.
4982         * modules/chdir-safer (Depends-on): Add fcntl.
4983         * modules/fts: Likewise.
4984         * modules/mkdir-p: Likewise.
4985
4986         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
4987         This undoes the most recent change, since we're now addressing the
4988         problem in a different way.
4989
4990         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
4991         into output, since the output might be called Makefile.am even
4992         if $makefile_name is something different.
4993         (func_import): Use $makefile_am rather than
4994         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
4995         empty.
4996
4997         * modules/inttypes (Files): Add m4/inttypes-h.m4.
4998
4999 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5000
5001         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5002         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5003         recent change to stdint.m4, since we're now addressing the problem in a
5004         different way.
5005
5006 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5007
5008         * m4/fcntl_h.m4: New file.
5009
5010 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5011
5012         * lib/fcntl_.h: New file.
5013         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5014         the fcntl module.
5015         * lib/dirchownmod.c: Likewise.
5016         * lib/fts.c: Likewise.
5017
5018         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5019         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5020         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5021         just before including <inttypes.h>, to avoid circular inclusion.
5022
5023 2006-08-28  Jim Meyering  <jim@meyering.net>
5024
5025         * doc/visibility.texi: Actually read and correct the grammar of the
5026         sentence affected by yesterday's change.
5027
5028 2006-08-28  Eric Blake  <ebb9@byu.net>
5029
5030         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5031         needs wrapper.
5032
5033 2006-08-28  Eric Blake  <ebb9@byu.net>
5034
5035         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5036
5037 2006-08-28  Eric Blake  <ebb9@byu.net>
5038
5039         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5040
5041 2006-08-28  Bruno Haible  <bruno@clisp.org>
5042
5043         * modules/c-strstr: New file, from GNU gettext.
5044         * MODULES.html.sh (String handling): Add c-strstr.
5045
5046 2006-08-28  Bruno Haible  <bruno@clisp.org>
5047
5048         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5049         macros.
5050         Reported by Eric Blake.
5051
5052 2006-08-28  Bruno Haible  <bruno@clisp.org>
5053
5054         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5055         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5056         * lib/vasprintf.c: Include errno.h, limits.h.
5057         (EOVERFLOW): New fallback definition.
5058         (vasprintf): Test here whether the string length is > INT_MAX.
5059         * lib/vsnprintf.c: Include errno.h, limits.h.
5060         (EOVERFLOW): New fallback definition.
5061         (vsnprintf): Fix bug when generated string was too long for the buffer.
5062         Test here whether the string length is > INT_MAX.
5063
5064 2006-08-28  Bruno Haible  <bruno@clisp.org>
5065
5066         * lib/inttypes_.h (SCNX*): Remove definitions.
5067         Reported by Eric Blake.
5068
5069 2006-08-28  Bruno Haible  <bruno@clisp.org>
5070
5071         * lib/c-strstr.h: New file, from GNU gettext.
5072         * lib/c-strstr.c: New file, from GNU gettext.
5073
5074 2006-08-28  Bruno Haible  <bruno@clisp.org>
5075
5076         * gnulib-tool: Reorder some statements.
5077
5078 2006-08-28  Bruno Haible  <bruno@clisp.org>
5079
5080         * gnulib-tool: New option --makefile-name.
5081         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5082         $makefile_name.
5083         (func_import): Write $makefile_name to the cache file, and read it from
5084         there unless explicitly specified. Use $makefile_name as file name
5085         instead of Makefile.am. Adjust the recommendations accordingly.
5086
5087 2006-08-28  Bruno Haible  <bruno@clisp.org>
5088
5089         * gnulib-tool (func_verify_module): Check against misapplying patch.
5090
5091 2006-08-28  Bruno Haible  <bruno@clisp.org>
5092
5093         * gnulib-tool (func_relativize, func_relconcat): New functions.
5094         Give an error if --local-dir is given with --update.
5095         Remove trailing slashes from $local_gnulib_dir.
5096         (func_import): Store the relativized $local_gnulib_dir in
5097         gnulib-cache.m4, and read it from there if not specified explicitly.
5098
5099 2006-08-28  Bruno Haible  <bruno@clisp.org>
5100
5101         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5102         is the current directory. Respect also $local_gnulib_dir.
5103
5104 2006-08-28  Bruno Haible  <bruno@clisp.org>
5105             Simon Josefsson  <jas@extundo.com>
5106
5107         BeOS portability.
5108         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5109
5110 2006-08-27  Jim Meyering  <jim@meyering.net>
5111
5112         * doc/visibility.texi: Remove duplicate word: "pointer".
5113
5114 2006-08-26  Bruno Haible  <bruno@clisp.org>
5115
5116         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5117         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5118         (Makefile.am): Create inttypes.h from inttypes_.h.
5119         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5120
5121         * modules/imaxabs: New file.
5122
5123         * modules/imaxdiv: New file.
5124
5125 2006-08-26  Bruno Haible  <bruno@clisp.org>
5126
5127         * m4/inttypes.m4: New file.
5128         * m4/_inttypes_h.m4: Remove file.
5129         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5130         PRI_MACROS_BROKEN.
5131         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5132
5133         * m4/imaxabs.m4: New file.
5134
5135         * m4/imaxdiv.m4: New file.
5136
5137 2006-08-26  Bruno Haible  <bruno@clisp.org>
5138
5139         * lib/inttypes_.h: New file.
5140         * lib/inttypes.h: Remove file.
5141         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5142
5143         * lib/imaxabs.c: New file.
5144
5145         * lib/imaxdiv.c: New file.
5146
5147 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5148
5149         New config-h module, so that "make" output needn't be cluttered
5150         by -DHAVE_CONFIG_H.
5151         * MODULES.html.sh (Support for building libraries and executables):
5152         Add config-h.
5153         * modules/config-h: New file.
5154         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5155         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5156         the config-h module is used.
5157
5158         New configmake module, so that "make" output needn't be cluttered
5159         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5160         * MODULES.html.sh (Support for building libraries and executables):
5161         Add configmake.
5162         * modules/configmake: New file.
5163
5164 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5165
5166         * m4/config-h.m4: New file.
5167
5168 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5169
5170         * config/srclist.txt: Add elisp-comp.
5171
5172 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5173
5174         * MODULES.html.sh (Support for building libraries and executables):
5175         Add elisp-comp.
5176         * build-aux/elisp-comp: New file.
5177         * modules/elisp-comp: New file.
5178
5179 2006-08-24  Bruno Haible  <bruno@clisp.org>
5180
5181         * gnulib-tool (func_create_testdir): Use non-default values of
5182         sourcebase and m4base.
5183
5184 2006-08-24  Bruno Haible  <bruno@clisp.org>
5185
5186         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5187         HTML structure.
5188
5189 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5190
5191         * modules/openat (Depends-on): Add lchown.
5192
5193 2006-08-23  Bruno Haible  <bruno@clisp.org>
5194
5195         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5196         of gl_LOCK_EARLY instead of gl_LOCK.
5197
5198 2006-08-23  Bruno Haible  <bruno@clisp.org>
5199
5200         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5201         on OSF/1 to no.
5202         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5203
5204 2006-08-23  Bruno Haible  <bruno@clisp.org>
5205
5206         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5207         as unusable.
5208
5209         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5210         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5211         (gl_LOCK): New macro.
5212
5213 2006-08-22  Simon Josefsson  <jas@extundo.com>
5214
5215         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5216         to md5 module.
5217
5218 2006-08-22  Simon Josefsson  <jas@extundo.com>
5219
5220         * MODULES.html.sh: Add "Support for maintaining and release
5221         projects".
5222
5223         * build-aux/gnupload: New file, from coreutils.
5224
5225 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5226
5227         Avoid the need for AC_LIBSOURCES in m4 macros.
5228         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5229         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5230         * modules/check-version (EXTRA_DIST): Add check-version.h.
5231         * modules/crc (EXTRA_DIST): Add crc.h.
5232         * modules/des (EXTRA_DIST): Add des.h.
5233         * modules/gc (EXTRA_DIST): Add gc.h.
5234         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5235         * modules/getline (EXTRA_DIST): Add getline.h.
5236         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5237         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5238         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5239         * modules/md2 (EXTRA_DIST): Add md2.h.
5240         * modules/md4 (EXTRA_DIST): Add md4.h.
5241         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5242         * modules/read-file (EXTRA_DIST): Add read-file.h.
5243         * modules/readline (EXTRA_DIST): Add readline.h.
5244         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5245         rijndael-api-fst.h.
5246
5247 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5248
5249         * m4/rijndael.m4 (gl_ARCFOUR):
5250         * m4/arctwo.m4 (gl_ARCTWO):
5251         * m4/check-version.m4 (gl_CHECK_VERSION):
5252         * m4/crc.m4 (gl_CRC):
5253         * m4/des.m4 (gl_DES):
5254         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5255         * m4/gc.m4 (gl_GC):
5256         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5257         * m4/getline.m4 (gl_FUNC_GETLINE):
5258         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5259         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5260         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5261         * m4/md2.m4 (gl_MD2):
5262         * m4/md4.m4 (gl_MD4):
5263         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5264         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5265         * m4/readline.m4 (gl_FUNC_READLINE):
5266         * m4/rijndael.m4 (gl_RIJNDAEL):
5267         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5268         to get the necessary .h files and whatnot.
5269
5270 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5271
5272         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5273         gnulib rather than the other way around.
5274         * config/srclistvars.sh (COREUTILS): Remove.
5275
5276 2006-08-22  Jim Meyering  <jim@meyering.net>
5277
5278         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5279
5280         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5281
5282 2006-08-22  Eric Blake  <ebb9@byu.net>
5283
5284         * modules/regexprops-generic: New file.
5285         * MODULES.html.sh (Support for building documentation): List it.
5286
5287 2006-08-22  Eric Blake  <ebb9@byu.net>
5288
5289         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5290         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5291         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5292         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5293
5294 2006-08-22  Bruno Haible  <bruno@clisp.org>
5295
5296         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5297         and lib_LTLIBRARIES like the other lib_* variables.
5298
5299 2006-08-22  Bruno Haible  <bruno@clisp.org>
5300
5301         * build-aux/x-to-1.in: New file, from GNU gettext.
5302
5303 2006-08-22  Bruno Haible  <bruno@clisp.org>
5304
5305         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5306         <utmpx.h> exists.
5307
5308 2006-08-22  Bruno Haible  <bruno@clisp.org>
5309
5310         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5311         <utmpx.h> exists.
5312
5313 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5314
5315         BeOS portability.
5316         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5317         exist.
5318         Problem reported by Bruno Haible.
5319
5320 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5321
5322         Avoid the need for AC_LIBSOURCES in m4 macros.
5323         * modules/acl (EXTRA_DIST): Add acl.h.
5324         * modules/argmatch (Files): Add m4/argmatch.m4.
5325         (configure.ac): Add gl_ARGMATCH.
5326         (EXTRA_DIST): Renamed from lib_SOURCES, for
5327         consistency with the other modules.  Remove argmatch.c.
5328         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5329         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5330         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5331         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5332         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5333         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5334         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5335         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5336         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5337         * modules/closeout (EXTRA_DIST): Add closeout.h.
5338         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5339         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5340         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5341         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5342         dirname.h; remove basename.c and stripslash.c.
5343         * modules/exclude (EXTRA_DIST): Add exclude.h.
5344         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5345         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5346         * modules/file-type (EXTRA_DIST): Add file-type.h.
5347         * modules/filemode (EXTRA_DIST): Add filemode.h.
5348         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5349         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5350         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5351         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5352         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5353         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5354         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5355         * modules/getdate (EXTRA_DIST): Add getdate.c.
5356         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5357         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5358         * modules/getpass (EXTRA_DIST): Add getpass.h.
5359         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5360         * modules/group-member (EXTRA_DIST): Add group-member.h.
5361         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5362         * modules/hash (EXTRA_DIST): Add hash.h.
5363         * modules/human (EXTRA_DIST): Add human.h.
5364         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5365         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5366         * modules/lchown (EXTRA_DIST): Add lchown.h.
5367         * modules/long-options (EXTRA_DIST): Add long-options.h.
5368         * modules/lstat (EXTRA_DIST): Add lstat.h.
5369         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5370         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5371         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5372         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5373         * modules/memxor (EXTRA_DIST): Add memxor.h.
5374         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5375         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5376         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5377         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5378         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5379         * modules/physmem (EXTRA_DIST): Add physmem.h.
5380         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5381         * modules/posixver (EXTRA_DIST): Add posixver.h.
5382         * modules/quote (EXTRA_DIST): Add quote.h.
5383         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5384         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5385         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5386         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5387         regex_internal.h regexec.c.
5388         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5389         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5390         * modules/same (EXTRA_DIST): Add same.h.
5391         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5392         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5393         * modules/savedir (EXTRA_DIST): Add savedir.h.
5394         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5395         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5396         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5397         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5398         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5399         * modules/strdup (EXTRA_DIST): Add strdup.h.
5400         * modules/strftime (EXTRA_DIST): Add strftime.h.
5401         * modules/strndup (EXTRA_DIST): Add strndup.h.
5402         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5403         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5404         * modules/time_r (EXTRA_DIST): Add time_r.h.
5405         * modules/timespec (EXTRA_DIST): Add timespec.h.
5406         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5407         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5408         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5409         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5410         * modules/userspec (EXTRA_DIST): Add userspec.h.
5411         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5412         * modules/utimens (EXTRA_DIST): Add utimens.h.
5413         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5414         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5415         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5416         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5417         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5418         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5419         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5420         * modules/yesno (EXTRA_DIST): Add yesno.h.
5421
5422 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5423
5424         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5425
5426         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5427         * m4/dev-ino.m4, same-inode.m4: Remove.
5428
5429         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5430         * m4/acl.m4 (AC_FUNC_ACL):
5431         * m4/backupfile.m4 (gl_BACKUPFILE):
5432         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5433         * m4/canon-host.m4 (gl_CANON_HOST):
5434         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5435         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5436         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5437         * m4/cloexec.m4 (gl_CLOEXEC):
5438         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5439         * m4/closeout.m4 (gl_CLOSEOUT):
5440         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5441         * m4/dirname.m4 (gl_DIRNAME):
5442         * m4/exclude.m4 (gl_EXCLUDE):
5443         * m4/exitfail.m4 (gl_EXITFAIL):
5444         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5445         * m4/file-type.m4 (gl_FILE_TYPE):
5446         * m4/filemode.m4 (gl_FILEMODE):
5447         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5448         * m4/fpending.m4 (gl_FUNC_FPENDING):
5449         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5450         * m4/fts.m4 (gl_FUNC_FTS):
5451         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5452         * m4/getdate.m4 (gl_GETDATE):
5453         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5454         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5455         * m4/getpass.m4 (gl_FUNC_GETPASS):
5456         * m4/gettime.m4 (gl_GETTIME):
5457         * m4/getugroups.m4 (gl_GETUGROUPS):
5458         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5459         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5460         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5461         * m4/hash.m4 (gl_HASH):
5462         * m4/idcache.m4 (gl_IDCACHE):
5463         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5464         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5465         * m4/long-options.m4 (gl_LONG_OPTIONS):
5466         * m4/lstat.m4 (gl_FUNC_LSTAT):
5467         * m4/md5.m4 (gl_MD5):
5468         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5469         * m4/memcoll.m4 (gl_MEMCOLL):
5470         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5471         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5472         * m4/memxor.m4 (gl_MEMXOR):
5473         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5474         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5475         * m4/modechange.m4 (gl_MODECHANGE):
5476         * m4/mountlist.m4 (gl_MOUNTLIST):
5477         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5478         * m4/openat.m4 (gl_FUNC_OPENAT):
5479         * m4/pathmax.m4 (gl_PATHMAX):
5480         * m4/physmem.m4 (gl_PHYSMEM):
5481         * m4/posixtm.m4 (gl_POSIXTM):
5482         * m4/posixver.m4 (gl_POSIXVER):
5483         * m4/quote.m4 (gl_QUOTE):
5484         * m4/quotearg.m4 (gl_QUOTEARG):
5485         * m4/readtokens.m4 (gl_READTOKENS):
5486         * m4/readutmp.m4 (gl_READUTMP):
5487         * m4/regex.m4 (gl_REGEX):
5488         * m4/safe-read.m4 (gl_SAFE_READ):
5489         * m4/safe-write.m4 (gl_SAFE_WRITE):
5490         * m4/same.m4 (gl_SAME):
5491         * m4/save-cwd.m4 (gl_SAVE_CWD):
5492         * m4/savedir.m4 (gl_SAVEDIR):
5493         * m4/settime.m4 (gl_SETTIME):
5494         * m4/sha1.m4 (gl_SHA1):
5495         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5496         * m4/stat-macros.m4 (gl_STAT_MACROS):
5497         * m4/stat-time.m4 (gl_STAT_TIME):
5498         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5499         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5500         * m4/strdup.m4 (gl_FUNC_STRDUP):
5501         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5502         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5503         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5504         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5505         * m4/time_r.m4 (gl_TIME_R):
5506         * m4/timespec.m4 (gl_TIMESPEC):
5507         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5508         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5509         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5510         * m4/userspec.m4 (gl_USERSPEC):
5511         * m4/utimecmp.m4 (gl_UTIMECMP):
5512         * m4/utimens.m4 (gl_UTIMENS):
5513         * m4/xalloc.m4 (gl_XALLOC):
5514         * m4/xgetcwd.m4 (gl_XGETCWD):
5515         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5516         * m4/xreadlink.m4 (gl_XREADLINK):
5517         * m4/xstrtod.m4 (gl_XSTRTOD):
5518         * m4/yesno.m4 (gl_YESNO):
5519         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5520         to get the necessary .h files and whatnot.
5521
5522 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5523             Bruno Haible  <bruno@clisp.org>
5524
5525         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5526         /bin/sh understanding of '!' conditional negation.
5527
5528 2006-08-21  Jim Meyering  <jim@meyering.net>
5529
5530         * modules/openat (Depends-on): Really alphabetize.
5531
5532         * modules/acl (Depends-on): Add error and quote.
5533
5534         * check-module (find_included_lib_files): Add at-func.c to the
5535         ok-to-include-more-than-once white list.
5536
5537         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5538
5539 2006-08-21  Bruno Haible  <bruno@clisp.org>
5540
5541         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5542         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5543         Reported by Martin Lambers <marlam@marlam.de>.
5544
5545 2006-08-21  Bruno Haible  <bruno@clisp.org>
5546
5547         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5548         specify an installation location, don't emit a noinst_LIBRARIES or
5549         noinst_LTLIBRARIES assignment.
5550
5551 2006-08-21  Bruno Haible  <bruno@clisp.org>
5552
5553         BeOS portability.
5554         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5555         BeOS has mbrtowc() but no <wctype.h>.
5556
5557 2006-08-21  Bruno Haible  <bruno@clisp.org>
5558
5559         BeOS portability.
5560         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5561         exist.
5562
5563 2006-08-21  Bruno Haible  <bruno@clisp.org>
5564
5565         BeOS portability.
5566         * lib/mbchar.h: Include <wctype.h> only if it exists.
5567
5568 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5569
5570         Remove files that are no longer needed by their respective modules.
5571         * m4/obstack.m4: Remove.
5572         * m4/strerror_r.m4: Remove.
5573         * m4/uint32_t.m4: Remove.
5574         * m4/uintptr_t.m4: Remove.
5575         * m4/ullong_max.m4: Remove.
5576         * m4/xstrtoimax.m4: Remove.
5577         * m4/xstrtoumax.m4: Remove.
5578
5579         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5580         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5581         dependencies now capture this.
5582
5583         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5584         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5585         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5586         * m4/human.m4 (gl_HUMAN): Likewise.
5587         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5588         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5589
5590         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5591
5592         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5593         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5594         stdint.
5595         * m4/human.m4 (gl_HUMAN): Likewise.
5596         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5597         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5598         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5599         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5600         * m4/xstrtol (gl_XSTRTOL): Likewise.
5601
5602         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5603         AC_TYPE_LONG_LONG_INT.
5604         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5605         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5606         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5607         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5608
5609         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5610         on stdbool.
5611
5612         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5613         (gl_PREREQ_XSTRTOUL): Remove.
5614
5615         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5616
5617         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5618         mode.
5619
5620 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5621
5622         Add and change modules to make it easier for coreutils to use
5623         gnulib-tool.
5624         * modules/backupfile (Files): Remove m4/d-ino.m4.
5625         (Depends-on): Add d-ino.
5626         * modules/cycle-check (Depends-on): Add stdint.
5627         (lib_SOURCES): Add cycle-check.h.
5628         * modules/d-ino: New module.
5629         * modules/d-type: New module.
5630         * modules/error (Files): Remove m4/strerror_r.m4.
5631         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5632         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5633         m4/inttypes_h.m4, m4/uintmax_t.m4.
5634         (Depends-on): Add stdint.
5635         (lib_SOURCES): Add fsusage.h.
5636         * modules/getcwd (Files): Remove d-ino.m4.
5637         (Depends-on): Add d-ino.
5638         * modules/getndelim2 (Depends-on): Add stdint.
5639         * modules/glob (Files): Remove m4/d-type.m4.
5640         (Depends-on): Add d-type.
5641         * modules/host-os: New module.
5642         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5643         m4/inttypes_h.m4, m4/uintmax_t.m4.
5644         * Depends-on: Add stdint.
5645         (lib_SOURCES): Add human.h.
5646         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5647         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5648         m4/uintmax_t.m4, m4/ulonglong.m4.
5649         (Depends-on): Add stdint.
5650         (EXTRA_DIST): Add inttostr.h.
5651         * modules/lchmod: New module.
5652         * modules/link-follow: New module.
5653         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5654         (Depends-on): Add lchmod.
5655         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5656         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5657         (Depends-on): Add stdint.
5658         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5659         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5660         (Depends-on): Add stdint.
5661         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5662         * modules/perl: New module.
5663         * modules/regex (Depends-on): Add stdint.
5664         * modules/rmdir-errno: New module.
5665         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5666         m4/intmax_t.m4.
5667         (Depends-on): Add stdint.
5668         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5669         m4/uintmax_t.m4.
5670         (Depends-on): Add stdint.
5671         * modules/unlink-busy: New module.
5672         * modules/utimecmp (Depends-on): Add stdint.
5673         * modules/uptime: New module.
5674         * modules/winsz-ioctl: New module.
5675         * modules/winsz-termios: New module.
5676         * modules/xnanosleep (Depends-on): Add nanosleep.
5677         * modules/ullong_max: Remove.
5678         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5679         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5680         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5681         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5682         (Depends-on): Add inttypes.
5683         (lib_SOURCES): Add xstrtol.h.
5684         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5685         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5686         * MODULES.html.sh: Move 'assert' into the assert section.
5687         Move 'dummy' into the linking section.
5688         Remove ullong_max.
5689         Add section for compatibility checks for POSIX:2001 functions,
5690         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5691         winsz-ioctl, and winsz-termios into it.
5692         Add lchmod.
5693         Add top-level Misc section and put host-os, perl, and uptime
5694         into it.
5695
5696 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5697
5698         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5699         now assume the stdint module.  Do not include inttypes.h.
5700         * lib/fsusage.h: Likewise.
5701         * lib/getndelim2.c: Likewise.
5702         * lib/human.h: Likewise.
5703         * lib/inttostr.h: Likewise.
5704         * lib/obstack.c: Likewise.
5705         * lib/regex_internal.h: Likewise.
5706         * lib/tempname.c: Likewise.
5707         * lib/utimecmp.c: Likewise.
5708         * lib/xstrtol.h: Likewise.
5709
5710         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5711
5712         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5713         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5714         * lib/xtime.h: Likewise.
5715
5716 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5717
5718         * modules/openat (Files): Add lib/fchmodat.c.
5719         Fixes problem reported by Jay Youngman.
5720
5721 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5722
5723         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5724         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5725
5726 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5727             Bruno Haible  <bruno@clisp.org>
5728
5729         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5730         and is a script that invokes bison. Tighten the code. Add comments.
5731
5732 2006-08-18  Jim Meyering  <jim@meyering.net>
5733
5734         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5735         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5736         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5737         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5738
5739 2006-08-18  Bruno Haible  <bruno@clisp.org>
5740
5741         * modules/bison-i18n: New file.
5742         * MODULES.html.sh (Internationalization functions): Add it.
5743
5744 2006-08-18  Bruno Haible  <bruno@clisp.org>
5745
5746         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5747         sys/statvfs.h. When getmntinfo was found, check its declaration and
5748         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5749
5750 2006-08-18  Bruno Haible  <bruno@clisp.org>
5751
5752         * m4/bison-i18n.m4: New file, from bison.
5753
5754 2006-08-18  Bruno Haible  <bruno@clisp.org>
5755
5756         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5757         (ME_DUMMY): Treat "kernfs" as a dummy.
5758         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5759
5760 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5761
5762         Update from coreutils.
5763
5764         2006-08-15  Jim Meyering  <jim@meyering.net>
5765
5766         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5767
5768         2006-01-17  Jim Meyering  <jim@meyering.net>
5769
5770         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5771
5772         2006-01-11  Jim Meyering  <jim@meyering.net>
5773
5774         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5775         Check for the lchmod function.
5776
5777 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5778
5779         Update from coreutils.
5780
5781         * lib/__fpending.h: Add copyright notice.
5782         * lib/fprintftime.h: Likewise.
5783         * lib/savedir.c: Use (C) in copyright notice.
5784         * lib/savedir.h: Likewise.
5785
5786         2006-08-15  Jim Meyering  <jim@meyering.net>
5787
5788         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5789         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5790         in support of the EXPECTED_ERRNO macro.
5791         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5792         definitions.  Instead, define the appropriate symbols and include
5793         "at-func.c".
5794         * lib/mkdirat.c (mkdirat): Likewise.
5795         * lib/fchmodat.c (fchmodat): Likewise.
5796         (ENOSYS): Remove definition.
5797         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5798         it.  Don't include "unistd--.h" -- it wasn't ever used.
5799
5800         2006-01-17  Jim Meyering  <jim@meyering.net>
5801
5802         Rewrite fts.c not to change the current working directory,
5803         by using openat, fstatat, fdopendir, etc..
5804
5805         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5806         (HAVE_OPENAT_SUPPORT): Define.
5807         [_LIBC] (fchdir): Don't undef or define; no longer used.
5808         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5809         Now, this `function' always succeeds, and consumes its file descriptor
5810         parameter -- so callers must not close such FDs.  Update callers.
5811         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5812         (diropen): Add parameter, SP.  Adjust all callers.
5813         Implement using diropen_fd, rather than open.
5814         (fts_open): Initialize new member, fts_cwd_fd.
5815         Remove fts_rft-setting code.
5816         (fts_close): Close fts_cwd_fd, if necessary.
5817         (__opendir2): Define in terms of opendir or opendirat,
5818         depending on whether the FST_NOCHDIR flag is set.
5819         (fts_build): Since fts_safe_changedir consumes its FD, and since
5820         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5821         and close the dup'd file descriptor upon failure.
5822         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5823         (fts_safe_changedir): Tweak semantics to reflect that this function
5824         now calls cwd_advance_fd and hence consumes its FD argument.
5825         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5826         [struct FTS] (fts_rft): Remove now-unused member.
5827         [struct FTS] (fts_cycle.state): Improve comment.
5828
5829         * lib/openat.c (openat_needs_fchdir): New function.
5830         * lib/openat.h (openat_needs_fchdir): Declare it.
5831
5832 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5833
5834         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5835         Problem and fix reported by Pádraig Brady in
5836         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5837
5838 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5839
5840         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5841
5842 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5843
5844         * lib/memcoll.c (memcoll): Optimize for the common case where the
5845         arguments are bytewise equal.
5846
5847 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5848
5849         * doc/regexprops-generic.texi: Add a copyright notice.
5850
5851 2006-08-15  Bruno Haible  <bruno@clisp.org>
5852
5853         * modules/tmpdir (License): Change to LGPL.
5854
5855 2006-08-15  Bruno Haible  <bruno@clisp.org>
5856
5857         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5858         module.
5859
5860 2006-08-14  Simon Josefsson  <jas@extundo.com>
5861
5862         * config/srclist.txt: Add gnupload.
5863
5864 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5865
5866         Change copyright notice from LGPL 2 to GPL 2, since that's the
5867         standard form used in the gnulib repository.
5868         * tests/test-lock.c: Likewise.
5869         * tests/test-stdint.c: Likewise.
5870         * tests/test-tls.c: Likewise.
5871
5872         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5873         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5874         Add copyright notice.
5875
5876         * check-module: Add copyright notice.  Output a copyright
5877         notice if "--version" is specified.
5878         * modules/COPYING: New file.
5879         * tests/test-getaddrinfo.c: Add copyright notice.
5880         * tests/test-verify.c: Likewise.
5881
5882 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5883
5884         Change copyright notice from LGPL 2 to GPL 2, since that's the
5885         standard form used in the gnulib repository.
5886         * lib/lock.c: LGPL -> GPL.
5887         * lib/lock.h: Likewise.
5888         * lib/strnlen1.c: Likewise.
5889         * lib/strnlen1.h: Likewise.
5890         * lib/tls.c: Likewise.
5891         * lib/tls.h: Likewise.
5892         * lib/tmpdir.c: Likewise.
5893
5894         * lib/TODO: Remove; this belongs only in coreutils.
5895
5896 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5897
5898         Add copyright notices to long-enough files that lack them, since
5899         otherwise the files aren't clearly free.  Use the same notice that
5900         getdate.texi already uses.
5901         * doc/alloca-opt.texi: Add copyright notice.
5902         * doc/alloca.texi: Likewise.
5903         * doc/ctime.texi: Likewise.
5904         * doc/functions.texi: Likewise.
5905         * doc/gcd.texi: Likewise.
5906         * doc/gnulib-tool.texi: Likewise.
5907         * doc/inet_ntoa.texi: Likewise.
5908         * doc/visibility.texi: Likewise.
5909
5910         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5911         * doc/quote.texi: Add copyright notice.
5912
5913         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5914         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5915         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5916         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5917         is now obsolete, and give a pointer to the Sun list.
5918         Add copyright notice.
5919
5920 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5921
5922         * config/srclistvars.sh: Add copyright notice.
5923
5924 2006-08-14  Eric Blake  <ebb9@byu.net>
5925
5926         Import the following change from libc:
5927
5928         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5929
5930         Upstream bug 2997.
5931         * lib/misc/error.c: Add space between program name and message if file
5932         name is missing.
5933
5934 2006-08-12  Karl Berry  <karl@gnu.org>
5935
5936         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5937         remove, these originate in gnulib now.
5938
5939 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5940
5941         * doc/Makefile (standards.info standards.html standards.dvi):
5942         Also depend on make-stds.texi.
5943
5944 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5945
5946         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5947         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5948
5949         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5950         in wchar_t.  Problem reported by Eric Blake.
5951
5952         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5953         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5954         Also, help the compiler to keep LEN in a register.
5955
5956 2006-08-11  Eric Blake  <ebb9@byu.net>
5957
5958         * users.txt: Sort.  Add tar.
5959
5960 2006-08-11  Bruno Haible  <bruno@clisp.org>
5961
5962         * users.txt: New file.
5963
5964 2006-08-11  Bruno Haible  <bruno@clisp.org>
5965
5966         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5967         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5968
5969 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5970
5971         * modules/snprintf (Depends-on): Remove minmax.
5972         (Maintainer): Add self and Bruno.
5973
5974 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5975
5976         * lib/.cppi-disable: Add snprintf.h, socket_.h.
5977         * lib/snprintf.c: Include <errno.h> and <limits.h>.
5978         (EOVERFLOW): Define if the system does not.
5979         Do not include "minmax.h"; it wasn't used.
5980         (snprintf): Don't assume size_t promotes to an unsigned type.
5981         Fix bug when generated string was too long for the buffer: the
5982         buffer's contents are supposed to be the initial prefix of the
5983         output.  Don't assume vasnprintf returns EOVERFLOW if the size
5984         exceeds INT_MAX; do the check ourselves.
5985
5986         Import the following changes from libc:
5987
5988         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
5989
5990         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
5991         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
5992         set wc to the byte which couldn't be converted.
5993         (re_string_reconstruct): Don't clear valid_raw_len before calling
5994         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
5995         tip_context using re_string_context_at.
5996
5997         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
5998
5999         * lib/posix/regex.h: g++ still cannot handled [restrict].
6000
6001         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6002
6003         * lib/posix/regex.h: Remove special handling for VMS.
6004
6005 2006-08-10  Jim Meyering  <jim@meyering.net>
6006
6007         * modules/same-inode: New module.
6008         * modules/dev-ino: New module.
6009         * modules/cycle-check: Depend on these modules, rather than simply
6010         including their .h files.
6011         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6012         required via m4/cycle-check.m4.
6013         * modules/same: Depend on new same-inode module, rather than
6014         including same-inode.h.
6015         * modules/chdir-safer: New file.
6016
6017         * modules/chown (Depends-on): Add stat-macros.
6018
6019 2006-08-10  Jim Meyering  <jim@meyering.net>
6020
6021         * m4/cycle-check.m4: New file.
6022         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6023         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6024
6025 2006-08-10  Eric Blake  <ebb9@byu.net>
6026
6027         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6028         in from original proposal.
6029
6030 2006-08-10  Eric Blake  <ebb9@byu.net>
6031         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6032
6033         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6034         namespace.
6035
6036 2006-08-10  Bruno Haible  <bruno@clisp.org>
6037
6038         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6039         as well.
6040
6041 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6042
6043         Sync from coreutils.
6044
6045         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6046
6047         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6048         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6049
6050 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6051
6052         * modules/restrict: Remove; no longer needed now that we assume
6053         Autoconf 2.59 or later.
6054         * MODULES.html.sh: Remove 'restrict'.
6055         * modules/argp (Depends-on): Remove 'restrict'.
6056         * modules/base64 (Depends-on): Likewise.
6057         * modules/gc (Depends-on): Likewise.
6058         * modules/getaddrinfo (Depends-on): Likewise.
6059         * modules/glob (Depends-on): Likewise.
6060         * modules/inet_ntop (Depends-on): Likewise.
6061         * modules/inet_pton (Depends-on): Likewise.
6062         * modules/memxor (Depends-on): Likewise.
6063         * modules/regex (Depends-on): Likewise.
6064         * modules/strtok_r (Depends-on): Likewise.
6065         * modules/time_r (Depends-on): Likewise.
6066
6067 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6068
6069         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6070         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6071         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6072         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6073         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6074         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6075         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6076         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6077
6078         Merge from coreutils.
6079         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6080         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6081         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6082         * m4/time_r.m4 (gl_TIME_R): Likewise.
6083
6084 2006-08-09  Karl Berry  <karl@gnu.org>
6085
6086         * config/srclist.txt: no more gettext-tools, per Bruno.
6087
6088 2006-08-08  Eric Blake  <ebb9@byu.net>
6089
6090         * modules/verror: New module.
6091         * MODULES.html.sh: Document it.
6092
6093 2006-08-08  Eric Blake  <ebb9@byu.net>
6094
6095         * lib/verror.h, lib/verror.c: New files.
6096
6097 2006-08-08  Eric Blake  <ebb9@byu.net>
6098
6099         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6100         verror_at_line output complies with GNU Coding Standards even when
6101         file is NULL.
6102
6103 2006-08-07  Bruno Haible  <bruno@clisp.org>
6104
6105         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6106         versions of AIX.
6107         Reported by Ralf Wildenhues.
6108
6109 2006-08-07  Bruno Haible  <bruno@clisp.org>
6110
6111         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6112         in an AC_DEFUN. Needed so that the autoconf snippets can use
6113         AC_REQUIRE.
6114
6115 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6116
6117         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6118         Initialize pkgdata_DATA.
6119         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6120         overriding it.
6121
6122 2006-08-06  Eric Blake  <ebb9@byu.net>
6123
6124         * lib/error.h: Fold in some upstream changes from glibc.
6125         * lib/error.c: Likewise.
6126
6127 2006-08-04  Bruno Haible  <bruno@clisp.org>
6128
6129         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6130         Make the mostlyclean-local rule depend on mostlyclean-generic.
6131         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6132
6133 2006-07-31  Bruno Haible  <bruno@clisp.org>
6134
6135         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6136         <stdlib.h>, <string.h>.
6137
6138 2006-07-30  Bruno Haible  <bruno@clisp.org>
6139
6140         * modules/readlink (License): Change to LGPL.
6141
6142 2006-07-30  Bruno Haible  <bruno@clisp.org>
6143
6144         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6145         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6146         set PKGDATADIR to point to it.
6147
6148 2006-07-30  Bruno Haible  <bruno@clisp.org>
6149
6150         * modules/csharpexec (configure.ac): Comment out macro invocation.
6151         * modules/javaexec (configure.ac): Likewise.
6152         * modules/javacomp-script (configure.ac): Likewise.
6153
6154         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6155
6156 2006-07-30  Bruno Haible  <bruno@clisp.org>
6157
6158         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6159         linked-list.
6160
6161 2006-07-30  Bruno Haible  <bruno@clisp.org>
6162
6163         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6164
6165 2006-07-30  Bruno Haible  <bruno@clisp.org>
6166
6167         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6168         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6169         get removed.
6170
6171 2006-07-29  Bruno Haible  <bruno@clisp.org>
6172
6173         Make it possible for gnulib-tool to work with locally modified or
6174         augmented gnulib repositories.
6175         * gnulib-tool (func_usage): Document --local-dir option.
6176         (local_gnulib_dir): New variable.
6177         Handle --local-dir option.
6178         (func_lookup_file): New function.
6179         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6180         (func_get_description, func_get_filelist, func_get_description,
6181         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6182         func_get_automake_snippet, func_get_include_directive,
6183         func_get_license, func_get_maintainer): Use func_lookup_file.
6184         (func_import, func_create_testdir): Use func_lookup_file.
6185
6186 2006-07-29  Bruno Haible  <bruno@clisp.org>
6187
6188         * modules/setenv (Depends-on): Add unistd.
6189
6190 2006-07-29  Bruno Haible  <bruno@clisp.org>
6191
6192         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6193
6194 2006-07-29  Bruno Haible  <bruno@clisp.org>
6195
6196         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6197
6198 2006-07-29  Bruno Haible  <bruno@clisp.org>
6199
6200         * gnulib-tool (import, update): If there is no Makefile.am, look at
6201         aclocal.m4, instead of bailing out.
6202
6203 2006-07-29  Bruno Haible  <bruno@clisp.org>
6204
6205         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6206         Categorize the options by when they are useful.
6207
6208 2006-07-29  Bruno Haible  <bruno@clisp.org>
6209
6210         * gnulib-tool (func_usage): Document option --no-libtool.
6211         Handle option --no-libtool.
6212         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6213         for changed semantics of $libtool variable.
6214         (func_import): Likewise. If libtool is not used, show this through
6215         an option --no-libtool.
6216         (func_create_testdir): Update.
6217
6218 2006-07-29  Bruno Haible  <bruno@clisp.org>
6219
6220         * gnulib-tool (func_import): Extend error message about missing
6221         --doc-base.
6222
6223 2006-07-29  Bruno Haible  <bruno@clisp.org>
6224
6225         * gnulib-tool (func_import): Don't create the $docbase directory if
6226         there is no file to store there.
6227
6228 2006-07-29  Bruno Haible  <bruno@clisp.org>
6229
6230         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6231         relevant, look for configure.ac there, not in the current directory.
6232         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6233
6234 2006-07-29  Bruno Haible  <bruno@clisp.org>
6235
6236         * gnulib-tool (SORT): New variable.
6237         (func_usage): Undocument --assume-autoconf option.
6238         Remove --assume-autoconf option handling.
6239         (autoconf_minversion): Determine from the contents of configure.ac.
6240         (func_import): Remove autoconf_minversion handling.
6241         Suggested by Eric Blake.
6242
6243 2006-07-29  Bruno Haible  <bruno@clisp.org>
6244
6245         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6246
6247 2006-07-29  Bruno Haible  <bruno@clisp.org>
6248
6249         * config/srclist.txt (*setenv.[ch]): Remove rules.
6250
6251 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6252
6253         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6254
6255 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6256
6257         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6258         arpa/inet.h.
6259
6260 2006-07-28  Simon Josefsson  <jas@extundo.com>
6261
6262         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6263         * modules/inet_pton (Depends-on): Likewise.
6264
6265 2006-07-28  Simon Josefsson  <jas@extundo.com>
6266
6267         * m4/netinet_in_h.m4: New file.
6268
6269 2006-07-28  Simon Josefsson  <jas@extundo.com>
6270
6271         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6272         #include's.
6273
6274 2006-07-28  Simon Josefsson  <jas@extundo.com>
6275
6276         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6277         #include's.
6278
6279 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6280
6281         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6282         setgid on directories only if they set these bits.
6283         * lib/modechange.h: Remove obsolete comment about masks.
6284
6285 2006-07-28  Eric Blake  <ebb9@byu.net>
6286
6287         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6288         macro expansion.
6289
6290 2006-07-28  Bruno Haible  <bruno@clisp.org>
6291
6292         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6293
6294 2006-07-28  Bruno Haible  <bruno@clisp.org>
6295
6296         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6297
6298 2006-07-28  Bruno Haible  <bruno@clisp.org>
6299
6300         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6301         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6302         Define fallbacks.
6303         Avoids link error on FreeBSD 4.x.
6304         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6305
6306         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6307         encoding.
6308         * lib/mbswidth.c (iswcntrl): Likewise.
6309
6310 2006-07-27  Bruno Haible  <bruno@clisp.org>
6311
6312         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6313         test.
6314
6315 2006-07-27  Bruno Haible  <bruno@clisp.org>
6316
6317         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6318         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6319         defined.
6320
6321 2006-07-26  Eric Blake  <ebb9@byu.net>
6322
6323         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6324
6325 2006-07-26  Eric Blake  <ebb9@byu.net>
6326
6327         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6328         like mingw that lack mkstemp.
6329         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6330         avoid compilation warning on mingw.
6331
6332 2006-07-26  Bruno Haible  <bruno@clisp.org>
6333
6334         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6335         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6336         INT_FAST*_MIN, INTPTR_MIN.
6337
6338 2006-07-25  Bruno Haible  <bruno@clisp.org>
6339
6340         * modules/version-etc (Depends-on): Add stdarg.
6341
6342 2006-07-25  Bruno Haible  <bruno@clisp.org>
6343
6344         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6345         complex commands.
6346
6347 2006-07-25  Bruno Haible  <bruno@clisp.org>
6348
6349         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6350         defined in <stdarg.h> or config.h.
6351
6352 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6353
6354         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6355         (gl_STDIO_SAFER): Remove.
6356
6357 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6358
6359         * MODULES.html.sh (File stream based Input/Output):
6360         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6361         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6362         * modules/fopen-safer, modules/tmpfile-safer: New files.
6363         * modules/stdio-safer: Remove.
6364
6365 2006-07-24  Bruno Haible  <bruno@clisp.org>
6366
6367         * modules/tmpdir: New file.
6368         * MODULES.html.sh (File system functions): Add it.
6369
6370 2006-07-24  Bruno Haible  <bruno@clisp.org>
6371
6372         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6373         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6374
6375 2006-07-24  Bruno Haible  <bruno@clisp.org>
6376
6377         * modules/clean-temp: New file.
6378
6379 2006-07-24  Bruno Haible  <bruno@clisp.org>
6380
6381         * m4/tmpdir.m4: New file, from GNU gettext.
6382
6383 2006-07-24  Bruno Haible  <bruno@clisp.org>
6384
6385         * lib/tmpdir.h: New file, from GNU gettext.
6386         * lib/tmpdir.c: New file, from GNU gettext.
6387
6388 2006-07-24  Bruno Haible  <bruno@clisp.org>
6389
6390         * lib/clean-temp.h: New file, from GNU gettext.
6391         * lib/clean-temp.c: New file, from GNU gettext.
6392
6393 2006-07-23  Eric Blake  <ebb9@byu.net>
6394
6395         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6396         (Depends-on): Add binary-io.
6397
6398 2006-07-23  Eric Blake  <ebb9@byu.net>
6399
6400         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6401
6402 2006-07-23  Eric Blake  <ebb9@byu.net>
6403
6404         * lib/tmpfile-safer.c: New file.
6405         * lib/stdio-safer.h (fopen_safer): Add prototype.
6406         * lib/stdio--.h (tmpfile): Make safer.
6407
6408 2006-07-23  Bruno Haible  <bruno@clisp.org>
6409
6410         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6411         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6412         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6413         gl_linked_remove_at): Use it.
6414
6415 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6416         and Simon Josefsson <jas@extundo.com>
6417
6418         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6419
6420         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6421
6422 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6423
6424         * modules/close-stream: New file.
6425         * modules/closeout (Description): Make it clear that it exits
6426         with a diagnostic on error.
6427         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6428         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6429
6430 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6431
6432         * m4/close-stream.m4: New file.
6433
6434 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6435
6436         * lib/close-stream.c, lib/close-stream.h: New files.
6437
6438 2006-07-22  Bruno Haible  <bruno@clisp.org>
6439
6440         Merge from GNU gettext 0.15.
6441
6442         2006-05-01  Bruno Haible  <bruno@clisp.org>
6443
6444                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6445
6446         2006-07-22  Bruno Haible  <bruno@clisp.org>
6447
6448                 * modules/javaversion: New file.
6449                 * MODULES.html.sh (Java): Add javaversion.
6450
6451         2006-03-12  Bruno Haible  <bruno@clisp.org>
6452
6453                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6454
6455         2005-12-04  Bruno Haible  <bruno@clisp.org>
6456
6457                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6458                 (untested).
6459
6460         2006-06-21  Bruno Haible  <bruno@clisp.org>
6461
6462                 Avoid warnings from recent versions of mcs.
6463                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6464                 -o, -L, -r any more. Use options documented since mcs-1.0
6465                 instead. Similarly for -g.
6466
6467         2005-12-04  Bruno Haible  <bruno@clisp.org>
6468
6469                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6470                 .resources, not .resource.
6471
6472         2005-07-09  Bruno Haible  <bruno@clisp.org>
6473
6474                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6475                 add a .dll suffix.
6476                 Reported by Mark Junker <mjscod@gmx.de>.
6477
6478         2006-07-22  Bruno Haible  <bruno@clisp.org>
6479
6480                 * modules/gettext: Upgrade to gettext-0.15.
6481                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6482                 m4/visibility.m4.
6483                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6484
6485 2006-07-22  Bruno Haible  <bruno@clisp.org>
6486
6487         Merge from GNU gettext 0.15.
6488
6489         2006-03-25  Bruno Haible  <bruno@clisp.org>
6490
6491                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6492
6493         2006-07-21  Bruno Haible  <bruno@clisp.org>
6494
6495                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6496                 "1.1".
6497
6498         2006-05-09  Bruno Haible  <bruno@clisp.org>
6499
6500                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6501                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6502                 for the conftestver execution.
6503
6504         2006-05-01  Bruno Haible  <bruno@clisp.org>
6505
6506                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6507                 optional target-version argument. Verify that the compiler
6508                 groks source of the specified source-version, or add -source
6509                 option as necessary. Verify that the compiler produces
6510                 bytecode in the specified target-version, or add -target and
6511                 -source options as necessary. Make the result of the test
6512                 available as variable CONF_JAVAC. Also log error output in
6513                 config.log.
6514
6515         2006-03-11  Bruno Haible  <bruno@clisp.org>
6516
6517                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6518
6519         2006-05-09  Bruno Haible  <bruno@clisp.org>
6520
6521                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6522                 CLASSPATH_SEPARATOR to a semicolon.
6523
6524         2006-03-12  Bruno Haible  <bruno@clisp.org>
6525
6526                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6527                 available as variable CONF_JAVA, for subsequent autoconf
6528                 tests. Also log error output in config.log.
6529
6530         2006-07-19  Bruno Haible  <bruno@clisp.org>
6531
6532                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6533                 that getline works on glibc2 systems. Needed to avoid trouble
6534                 in relocatable.c.
6535                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6536
6537         2005-12-04  Bruno Haible  <bruno@clisp.org>
6538
6539                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6540                 launcher (untested).
6541
6542         2005-12-04  Bruno Haible  <bruno@clisp.org>
6543
6544                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6545
6546         2006-07-22  Bruno Haible  <bruno@clisp.org>
6547
6548                 * gettext.m4: Update from GNU gettext-0.15.
6549                 * nls.m4: Likewise.
6550                 * po.m4: Likewise.
6551                 * inttypes-pri.m4: Likewise.
6552                 * inttypes-h.m4: Renamed from inttypes.m4.
6553                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6554
6555 2006-07-22  Bruno Haible  <bruno@clisp.org>
6556
6557         Merge from GNU gettext 0.15.
6558
6559         2005-07-05  Bruno Haible  <bruno@clisp.org>
6560
6561                 * printf-args.c (printf_fetchargs): Work around broken
6562                 definition of wint_t on mingw.
6563
6564         2005-02-12  Bruno Haible  <bruno@clisp.org>
6565
6566                 * xallocsa.h: Add extern "C" for C++.
6567
6568         2006-05-17  Bruno Haible  <bruno@clisp.org>
6569
6570                 Cygwin portability.
6571                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6572
6573         2006-04-30  Bruno Haible  <bruno@clisp.org>
6574
6575                 * progreloc.c: Include <mach-o/dyld.h> if available.
6576                 (find_executable): Use _NSGetExecutablePath when possible.
6577
6578         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6579
6580                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6581                 function.
6582
6583         2005-12-29  Bruno Haible  <bruno@clisp.org>
6584
6585                 * progreloc.c (set_program_name_and_installdir): Fix
6586                 compilation error.
6587
6588         2005-12-04  Bruno Haible  <bruno@clisp.org>
6589
6590                 Cygwin portability.
6591                 * progreloc.c: Include <windows.h> also on Cygwin.
6592                 (find_executable): Add support for Cygwin.
6593                 (set_program_name_and_installdir): Handle also platforms with
6594                 nonempty EXEEXT.
6595
6596         2006-07-11  Bruno Haible  <bruno@clisp.org>
6597
6598                 * javacomp.c: Fix a comment.
6599                 Reported by Jim Meyering.
6600
6601         2006-04-30  Bruno Haible  <bruno@clisp.org>
6602
6603                 * javacomp.h (compile_java_class): Add source_version,
6604                 target_version arguments.
6605                 * javacomp.c: Rewritten to choose only a compiler that
6606                 respects the specified source_version and target_version.
6607
6608         2006-06-27  Bruno Haible  <bruno@clisp.org>
6609
6610                 Assume correct S_ISDIR macro.
6611                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6612
6613         2006-07-22  Bruno Haible  <bruno@clisp.org>
6614
6615                 * javaversion.h: New file, from GNU gettext.
6616                 * javaversion.c: New file, from GNU gettext.
6617                 * javaversion.java: New file, from GNU gettext.
6618                 * javaversion.class: New file, from GNU gettext.
6619
6620         2006-05-17  Bruno Haible  <bruno@clisp.org>
6621
6622                 Cygwin portability.
6623                 * javaexec.c (execute_java_class): Test for jview program
6624                 also on Cygwin.
6625
6626         2006-04-09  Bruno Haible  <bruno@clisp.org>
6627
6628                 * fatal-signal.c: Don't include string.h.
6629                 (at_fatal_signal): Use a copying loop instead of memcpy.
6630
6631         2005-12-04  Bruno Haible  <bruno@clisp.org>
6632
6633                 * csharpexec.c: Add support for 'clix' launcher (untested).
6634                 (execute_csharp_using_sscli): New function.
6635                 (execute_csharp_program): Call it.
6636
6637         2006-06-21  Bruno Haible  <bruno@clisp.org>
6638
6639                 Avoid warnings from recent versions of mcs.
6640                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6641                 -o, -L, -r any more. Use options documented since mcs-1.0
6642                 instead. Similarly for -g.
6643
6644         2005-07-09  Bruno Haible  <bruno@clisp.org>
6645
6646                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6647                 add a .dll suffix.
6648                 Reported by Mark Junker <mjscod@gmx.de>.
6649
6650         2006-06-17  Bruno Haible  <bruno@clisp.org>
6651
6652                 * config.charset: Update for NetBSD 3.0.
6653
6654         2006-05-17  Bruno Haible  <bruno@clisp.org>
6655
6656                 Cygwin portability.
6657                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6658
6659         2006-05-16  Bruno Haible  <bruno@clisp.org>
6660
6661                 * localcharset.c [CYGWIN]: Include <windows.h>.
6662                 (get_charset_aliases): For Cygwin, return the same CPxxx
6663                 aliases list as under WIN32.
6664                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6665                 the environment variables. Fall back to GetACP().
6666
6667         2006-04-05  Bruno Haible  <bruno@clisp.org>
6668
6669                 * config.charset: Update Juan Manuel Guerrero's address.
6670
6671         2005-02-12  Bruno Haible  <bruno@clisp.org>
6672
6673                 * allocsa.h: Add extern "C" for C++.
6674
6675         2005-02-10  Bruno Haible  <bruno@clisp.org>
6676
6677                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6678                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6679
6680         2006-07-22  Bruno Haible  <bruno@clisp.org>
6681
6682                 * gettext.h: Update to GNU gettext-0.15.
6683
6684 2006-07-22  Bruno Haible  <bruno@clisp.org>
6685
6686         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6687         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6688         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6689
6690 2006-07-21  Eric Blake  <ebb9@byu.net>
6691
6692         * modules/stdlib-safer: New file.
6693         * MODULES.html.sh (File stream based Input/Output): Add
6694         stdlib-safer.
6695
6696 2006-07-21  Eric Blake  <ebb9@byu.net>
6697
6698         * lib/stdlib-safer.h: New file from coreutils, required by
6699         stdlib--.h.
6700
6701 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6702
6703         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6704
6705 2006-07-20  Bruno Haible  <bruno@clisp.org>
6706
6707         * gnulib-tool: Recognize new option --assume-autoconf.
6708         (autoconf_minversion): New variable.
6709         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6710
6711 2006-07-20  Bruno Haible  <bruno@clisp.org>
6712
6713         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6714
6715 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6716
6717         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6718         Reindent and repaginate.
6719
6720 2006-07-19  Derek Price  <derek@ximbiot.com>
6721
6722         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6723         Correct grammar.
6724
6725 2006-07-17  Bruno Haible  <bruno@clisp.org>
6726
6727         * modules/list: New file.
6728         * modules/array-list: New file.
6729         * modules/carray-list, modules/carray-list-tests: New files.
6730         * modules/linked-list, modules/linked-list-tests: New files.
6731         * modules/avltree-list, modules/avltree-list-tests: New files.
6732         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6733         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6734         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6735         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6736         * modules/oset: New file.
6737         * modules/array-oset: New file.
6738         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6739         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6740         * tests/test-carray_list.c: New file.
6741         * tests/test-linked_list.c: New file.
6742         * tests/test-avltree_list.c: New file.
6743         * tests/test-rbtree_list.c: New file.
6744         * tests/test-linkedhash_list.c: New file.
6745         * tests/test-avltreehash_list.c: New file.
6746         * tests/test-rbtreehash_list.c: New file.
6747         * tests/test-avltree_oset.c: New file.
6748         * tests/test-rbtree_oset.c: New file.
6749         * MODULES.html.sh (Container data structures): New section.
6750
6751 2006-07-17  Bruno Haible  <bruno@clisp.org>
6752
6753         * m4/gl_list.m4: New file.
6754
6755 2006-07-17  Bruno Haible  <bruno@clisp.org>
6756
6757         * lib/gl_list.h: New file.
6758         * lib/gl_list.c: New file.
6759         * lib/gl_array_list.h: New file.
6760         * lib/gl_array_list.c: New file.
6761         * lib/gl_carray_list.h: New file.
6762         * lib/gl_carray_list.c: New file.
6763         * lib/gl_linked_list.h: New file.
6764         * lib/gl_linked_list.c: New file.
6765         * lib/gl_anylinked_list1.h: New file.
6766         * lib/gl_anylinked_list2.h: New file.
6767         * lib/gl_avltree_list.h: New file.
6768         * lib/gl_avltree_list.c: New file.
6769         * lib/gl_anyavltree_list1.h: New file.
6770         * lib/gl_anyavltree_list2.h: New file.
6771         * lib/gl_rbtree_list.h: New file.
6772         * lib/gl_rbtree_list.c: New file.
6773         * lib/gl_anyrbtree_list1.h: New file.
6774         * lib/gl_anyrbtree_list2.h: New file.
6775         * lib/gl_anytree_list1.h: New file.
6776         * lib/gl_anytree_list2.h: New file.
6777         * lib/gl_linkedhash_list.h: New file.
6778         * lib/gl_linkedhash_list.c: New file.
6779         * lib/gl_anyhash_list1.h: New file.
6780         * lib/gl_anyhash_list2.h: New file.
6781         * lib/gl_avltreehash_list.h: New file.
6782         * lib/gl_avltreehash_list.c: New file.
6783         * lib/gl_rbtreehash_list.h: New file.
6784         * lib/gl_rbtreehash_list.c: New file.
6785         * lib/gl_anytreehash_list1.h: New file.
6786         * lib/gl_anytreehash_list2.h: New file.
6787
6788         * lib/gl_oset.h: New file.
6789         * lib/gl_oset.c: New file.
6790         * lib/gl_array_oset.h: New file.
6791         * lib/gl_array_oset.c: New file.
6792         * lib/gl_avltree_oset.h: New file.
6793         * lib/gl_avltree_oset.c: New file.
6794         * lib/gl_rbtree_oset.h: New file.
6795         * lib/gl_rbtree_oset.c: New file.
6796         * lib/gl_anytree_oset.h: New file.
6797
6798 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6799
6800         * m4/mkancesdirs.m4: New file.
6801         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6802         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6803         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6804         it.
6805
6806 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6807
6808         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6809         * lib/mkancesdirs.h: New files.
6810         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6811         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6812         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6813         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6814         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6815         callers changed.  Revamp internals significantly, by not
6816         attempting to create directories that are temporarily more
6817         permissive than the final results.  Do not attempt to use
6818         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6819         This removes some race conditions, fixes some bugs, and simplifies
6820         things.  Use new dirchownmod function to do owner and mode changes.
6821         * lib/mkdir-p.h: Likewise.
6822         * lib/modechange.c (octal_to_mode): New function.
6823         (struct mode_change): New member mentioned.
6824         (make_node_op_equals): New arg mentioned.  All callers changed.
6825         (mode_compile): Keep track of which mode bits the user has explicitly
6826         mentioned.
6827         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6828         New arg PMODE_BITS, to keep track of which mode bits the user
6829         mentioned; it treats S_ISUID and S_ISGID speciall.
6830         All callers changed.
6831         * lib/modechange.h: Likewise.
6832
6833 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6834
6835         * MODULES.html.sh: Add mkancestors.
6836         * modules/mkancesdirs: New module.
6837         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6838         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6839         The chdir-safer and afs files are now orphans; I'll remove them
6840         unless someone speaks up.
6841         Add lib/dirchownmod.c, lib/dirchownmod.h.
6842         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6843         Add lchown, mkancesdirs.
6844         (Maintainer): Add self.
6845
6846 2006-07-15  Karl Berry  <karl@gnu.org>
6847
6848         * gnulib-tool: help message wording/arrangement.
6849
6850 2006-07-14  Simon Josefsson  <jas@extundo.com>
6851
6852         * doc/gnulib.texi (Libtool and Windows): New section.
6853
6854 2006-07-12  Simon Josefsson  <jas@extundo.com>
6855
6856         * modules/gendocs (License): Fix license, approved by Karl.
6857
6858 2006-07-12  Eric Blake  <ebb9@byu.net>
6859
6860         * MODULES.html.sh: Add gendocs.
6861
6862 2006-07-11  Eric Blake  <ebb9@byu.net>
6863
6864         * modules/fdl: New module, to install doc/fdl.texi.
6865         * MODULES.html.sh: Add new section for documentation modules.
6866         * gnulib-tool: Avoid space-tab.
6867         (--doc-base): New option, to manage files from doc.
6868
6869 2006-07-11  Eric Blake  <ebb9@byu.net>
6870
6871         * m4/absolute-header.m4: Fix comments to match recent change.
6872
6873 2006-07-11  Eric Blake  <ebb9@byu.net>
6874
6875         * gnulib-tool: List --doc-base before --tests-base.
6876
6877 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6878
6879         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6880
6881 2006-07-11  Bruno Haible  <bruno@clisp.org>
6882
6883         * README: Mention where to put documentation.
6884
6885 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6886
6887         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6888
6889 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6890
6891         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6892         to stdint.m4.
6893
6894 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6895
6896         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6897         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6898         "no/such/file/stdint.h" when there is no such file, so that
6899         the resulting C code can be parsed by dodgy compilers.
6900         Problems reported by Bob Proulx.
6901
6902 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6903
6904         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6905         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6906         macros into the GNU _D_EXACT_NAMLEN.
6907         * lib/savedir.c:  Likewise.
6908         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6909
6910 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6911         and Paul Eggert  <eggert@cs.ucla.edu>
6912
6913         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6914         * m4/savedir.m4:
6915         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6916         macros into the GNU _D_EXACT_NAMLEN.
6917
6918 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6919
6920         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6921         around the absolute name, to work around a problem with the HP-UX
6922         11.23 native C compiler, reported by Bob Proulx.
6923
6924 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6925
6926         * doc/maintain.texi, make-stds.texi: Sync from
6927         <http://savannah.gnu.org/projects/gnustandards>.
6928
6929 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6930
6931         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6932
6933 2006-07-09  Jim Meyering  <jim@meyering.net>
6934
6935         * m4/glob.m4: Remove a doubled word in a comment.
6936
6937 2006-07-09  Jim Meyering  <jim@meyering.net>
6938
6939         * lib/argp-pv.c: Remove a doubled word in a comment.
6940         * lib/check-version.c (check_version): Likewise.
6941         * lib/javacomp.c (compile_java_class): Likewise.
6942
6943 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6944
6945         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6946         for the benefit of people using Autoconf 2.60.  If you want to
6947         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6948         (or m4/onceonly.m4, if pre-2.57) manually.
6949
6950 2006-07-08  Jim Meyering  <jim@meyering.net>
6951
6952         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6953         comment.
6954         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6955         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6956         comment.
6957
6958 2006-07-08  Jim Meyering  <jim@meyering.net>
6959
6960         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6961
6962 2006-07-07  Simon Josefsson  <jas@extundo.com>
6963
6964         * tests/test-crc.c: Change expected crc value, the test vector
6965         were probably computed using the old broken crc.c?
6966
6967 2006-07-06  Simon Josefsson  <jas@extundo.com>
6968
6969         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6970         now the canonical place for the M4 file).
6971
6972         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
6973         from the sys_socket dependency now.
6974
6975         * modules/inet_pton (Files): Ditto.
6976
6977         * modules/inet_ntop (Files): Ditto.
6978
6979 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
6980
6981         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
6982         not gl_PREREQ_GETUSERSHELL.
6983
6984 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6985
6986         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
6987         with only one argument, for Autoconf 2.60.
6988         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
6989         expand to nothing, so add a shell command to avoid syntax error.
6990         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6991
6992 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6993
6994         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
6995
6996 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
6997
6998         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
6999         no longer needed.  Check for isblank decl.
7000         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7001         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7002         of existence.
7003
7004 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7005
7006         * lib/getloadavg.c: Use __VMS, not VMS.
7007         * lib/getopt.c: Likewise.
7008         * lib/getpagesize.h: Likewise.
7009         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7010         and probably does not work.
7011
7012 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7013
7014         * lib/.cppi-disable: Add wcwidth.
7015         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7016         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7017         (ISGRAPH): Remove.  All uses changed to isgraph.
7018         (FOLD) [!defined _LIBC]: Remove special case.
7019         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7020         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7021         HAVE_ISBLANK.
7022         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7023         case.
7024
7025 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7026
7027         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7028         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7029         brackets.  Other minor changes to suppress some compiler
7030         warnings.
7031
7032 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7033         and Paul Eggert  <eggert@cs.ucla.edu>
7034
7035         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7036         of invoking obsolescent AC_HEADER_DIRENT macro.
7037         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7038         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7039         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7040         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7041         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7042         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7043         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7044         * m4/readdir.m4: Remove; no longer needed.
7045
7046 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7047         and Paul Eggert  <eggert@cs.ucla.edu>
7048
7049         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7050         Don't worry about this obsolete case any more.
7051         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7052         directories.
7053         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7054         worry about this obsolete case any more.
7055         * lib/fts.c: Likewise.
7056         * lib/getcwd.c: Likewise.
7057         * lib/glob.h: Likewise.
7058         * lib/savedir.c: Likewise.
7059
7060 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7061
7062         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7063         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7064         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7065         needed.
7066         All uses removed.
7067         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7068         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7069         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7070         needed.
7071         * m4/getdate.m4 (gl_GETDATE): Likewise.
7072         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7073         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7074         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7075         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7076         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7077         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7078         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7079         needed.
7080
7081 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7082
7083         * lib/memcasecmp.c: Include <limits.h>.
7084         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7085         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7086         Don't assume isdigit succeeds only on '0' through '9'.
7087
7088 2006-07-05  Eric Blake  <ebb9@byu.net>
7089
7090         * modules/getaddrinfo (Depends-on): Add snprintf.
7091
7092 2006-07-05  Eric Blake  <ebb9@byu.net>
7093
7094         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7095         to avoid 'header present but could not be compiled' on cygwin.
7096
7097 2006-07-05  Eric Blake  <ebb9@byu.net>
7098
7099         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7100         missing from netdb.h.
7101         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7102
7103 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7104
7105         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7106         no longer needed.
7107         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7108         * m4/getdate.m4 (gl_GETDATE): Likewise.
7109         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7110         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7111         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7112         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7113         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7114
7115 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7116
7117         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7118         All uses of is_space replaced by isspace.
7119         * lib/exit.h: Don't talk about STDC_HEADERS.
7120         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7121         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7122         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7123         replaced by isprint etc.
7124         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7125         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7126         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7127         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7128         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7129         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7130
7131 2006-07-05  Bruno Haible  <bruno@clisp.org>
7132
7133         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7134         the function exists, before testing against AIX.
7135         Reported by Martin Lambers <marlam@marlam.de>.
7136
7137 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7138
7139         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7140         From Mark D. Baushke.
7141
7142 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7143
7144         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7145         to the absolute name, not just one, to bypass Sun C 5.8's
7146         "warning: #include of /usr/include/... may be non-portable".
7147
7148 2006-07-04  Eric Blake  <ebb9@byu.net>
7149
7150         * modules/dirname-tests: New test module.
7151         * tests/test-dirname.c: New file, replacing dirname.c
7152         TEST_DIRNAME section that was recently deleted.
7153
7154 2006-07-04  Bruno Haible  <bruno@clisp.org>
7155
7156         Assume ANSI C header files and <ctype.h> functions.
7157         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7158         (mbsnwidth): Use isprint, iscntrl instead.
7159
7160 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7161
7162         Merge from coreutils.
7163         * MODULES.html.sh: Add xstrtold.
7164         * modules/xstrtold: New file.
7165         * modules/cycle-check (Files): Add lib/same-inode.h.
7166         * modules/dirname (Files): Add m4/double-slash-root.m4.
7167         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7168         * modules/mkdir-p (Files): Add lib/same-inode.h.
7169         * modules/same (Files): Add lib/same-inode.h.
7170
7171 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7174         This is to keep the terminology clean; POSIX talks about
7175         "absolute pathnames", not "full pathnames", but the GNU
7176         Coding Standards say to use "path" for something else;
7177         so use "absolute" to keep both sides happy.
7178         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7179         Set gl_absolute_header, not gl_full_header_path.
7180         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7181         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7182         All uses changed.
7183
7184         Merge from coreutils.
7185
7186         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7187
7188         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7189         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7190         want to require the building of c-strtod.o.
7191         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7192         needs -lm directly.
7193         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7194
7195         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7196
7197         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7198         --as-needed option if available.  Problem reported by Albert Chin in
7199         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7200         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7201         cc merely issues a bunch of annoying warnings for --as-needed
7202         (this problem was reported by Bob Proulx).  Also, try linking with
7203         -lm to detect a bug in binutils 2.16 (this problem was reported
7204         by Ralf Wildenhues).
7205
7206         2006-06-18  Jim Meyering  <jim@meyering.net>
7207
7208         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7209         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7210         macro.
7211         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7212         also check for glibc-2.4's abort-inducing bug.
7213
7214         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7215         Low-probability clean-up should be to use rmdir to get rid of
7216         the just-created directory, not unlink.
7217
7218         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7219         configure fail, and request a bug report to inform us about it.
7220         Add a comment that, barring reports to the contrary, in 2007 we'll
7221         assume ftruncate is universally available.
7222
7223         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7224
7225         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7226
7227         2006-03-12  Jim Meyering  <jim@meyering.net>
7228
7229         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7230         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7231         * m4/same.m4 (gl_SAME): Likewise.
7232         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7233
7234         2006-03-11  Eric Blake  <ebb9@byu.net>
7235
7236         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7237         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7238         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7239         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7240
7241 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7242
7243         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7244         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7245         reported by Mark D. Baushke, one in
7246         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7247
7248         Merge from coreutils.
7249
7250         * lib/.cppi-disable: Add stdint_.h.
7251         * lib/.cvsignore: Add stdint.h.
7252
7253         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7254
7255         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7256         both double and long double versions.
7257         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7258         * lib/xstrtold.c: New file.
7259         * lib/xstrtod.h (xstrtold): New decl.
7260
7261         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7262
7263         * lib/filemode.c (setst): Remove.
7264         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7265         (arguably) clearer, and the generated code is a bit smaller on my
7266         Debian GNU/Linux stable x86 host.
7267
7268         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7269
7270         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7271         Assume that filemode.h includes sys/types.h and sys/stat.h.
7272         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7273         (ftypelet): Reorder to put common cases first, for efficiency.
7274         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7275         to do 'M'.
7276         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7277         of 10, for compatibility with FreeBSD.  All callers changed.
7278         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7279         types that can't be deduced solely from st_mode.  First arg is now a
7280         const pointer.
7281         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7282         (strmode): Renamed from mode_string.
7283         (filemodestring): New decl.
7284         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7285         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7286         needed.
7287         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7288
7289         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7290
7291         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7292         fsusage.h now does that.  Include fsusage.h first, to test interface.
7293         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7294         at most one method (the old code could have generated decls that
7295         didn't conform to C89, not that this was ever exercised).
7296         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7297
7298         2006-03-19  Jim Meyering  <jim@meyering.net>
7299
7300         Work even in a chroot where d_ino values for entries in "/"
7301         don't match the stat.st_ino values for the same names.
7302         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7303         number, iterate through all entries again, using lstat instead.
7304         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7305         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7306
7307         * lib/getcwd.c (__getcwd): Clarify a comment.
7308         Use memcpy in place of a call to strcpy.
7309
7310         2006-03-12  Jim Meyering  <jim@meyering.net>
7311
7312         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7313         matches that of the current directory (which we're about to chdir ".."
7314         out of), then save the dev-ino of the parent, instead.
7315
7316         * lib/same-inode.h (SAME_INODE): New file/macro.
7317         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7318         Include "same-inode.h", instead.
7319         * lib/same.c: Likewise.
7320         * lib/cycle-check.h: Include "same-inode.h".
7321         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7322         * lib/cycle-check.c (SAME_INODE): Remove definition.
7323         * lib/root-dev-ino.h: Include "same-inode.h".
7324
7325         2006-03-11  Eric Blake  <ebb9@byu.net>
7326
7327         * lib/same.c (same_name): s/base_name/last_component/
7328         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7329         * lib/filenamecat.c (file_name_concat): Likewise.
7330
7331         2006-03-11  Eric Blake  <ebb9@byu.net>,
7332                     Paul Eggert  <eggert@cs.ucla.edu>
7333
7334         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7335         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7336         drive prefix.
7337         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7338         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7339         (last_component): New method.
7340         * lib/dirname.c (dir_len): Determine when drive letters need a
7341         subsequent slash.  Preserve // when it is special.
7342         (dir_name): Don't append dot when drive letter is absolute.
7343         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7344         * lib/basename.c (base_name): New semantics - malloc the result.
7345         Preserve // when it is special.  Preserve relative files that look
7346         like drive letters.
7347         (base_len): Preserve // when it is special.
7348         (last_component): New method, similar to old base_name semantics.
7349         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7350         base_name.  Strip redundant slashes from ///.
7351
7352 2006-07-03  Jim Meyering  <jim@meyering.net>
7353
7354         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7355         macro is used before the first cycle_check call.
7356
7357 2006-07-03  Eric Blake  <ebb9@byu.net>
7358
7359         * modules/dirname (Depends-on): Add xstrndup.
7360
7361 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7362
7363         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7364         test cases, so that config.log is a bit easier to follow.
7365
7366 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7367
7368         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7369         both are 64 bits, since this seems to be the tradition, and this
7370         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7371         we ever run into a host that prefers long long to long in this
7372         case, we'll need another configure-time test.  Problem reported by
7373         Jim Meyering.
7374
7375 2006-07-02  Eric Blake  <ebb9@byu.net>
7376
7377         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7378
7379 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7380
7381         * modules/inttypes (Depends-on): No longer depends on stdint.
7382         * modules/stdint (Description): Say more about assumptions.
7383         Say that the fast types might differ.  Say macros are used.
7384         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7385         (Makefile.am): Revise list of substituted symbols to match
7386         new stdint.m4.
7387         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7388         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7389         * tests/test-stdint.c (verify_same_types)
7390         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7391         the code conforms to C99/C89.
7392         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7393         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7394
7395 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7396
7397         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7398         but fix a bug, by requiring at least 64 bits.
7399         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7400         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7401         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7402         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7403
7404         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7405         changes.  Make 2.59 a prerequisite.  Check and substitute for
7406         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7407         inttypes.h.  Do not use special include files; just use the
7408         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7409         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7410         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7411         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7412         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7413         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7414         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7415         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7416         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7417         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7418         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7419         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7420         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7421         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7422         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7423         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7424         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7425         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7426         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7427         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7428         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7429         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7430         not check for things that C99 does not require, e.g., int8_t.  If
7431         a test isn't needed unless <stdint.h> isn't working, and is
7432         unlikely to be needed for any other reason, then don't do it
7433         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7434         size_t, since we assume C89 freestanding at least.  Do not check
7435         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7436         the right thing even if the types are not defined.  Instead use:
7437         (gl_STDINT_TYPE_PROPERTIES): New macro.
7438         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7439         testing whether <sys/types.h> clashes, as Autoconf does this for
7440         us now.  All uses removed.
7441         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7442         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7443         (gl_CHECK_TYPE_SAME):
7444         Remove; no longer needed.
7445         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7446         exists, since we'll return 0 anyway in that case.
7447         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7448
7449 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7450
7451         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7452         possible collision with system files.
7453         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7454         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7455         WCHAR_MIN and WCHAR_MAX in this case.
7456         (<stddef.h>): Do not include; no longer needed.
7457         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7458         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7459         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7460         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7461         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7462         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7463         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7464         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7465         !defined(__c99))]: Include in this case too, since it's harmless
7466         now.
7467         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7468         dangerous to do so.
7469         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7470         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7471         (_STDINT_MIN, _STDINT_MAX): New macros.
7472         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7473         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7474         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7475         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7476         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7477         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7478         macros, not typedefs; this simplifies things quite a bit.
7479         Use long int for all types narrower than int64_t.
7480         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7481         Define in terms of long long int or int64_t or long int,
7482         not int64_t or int32_t.  This saves some compile-time testing.
7483         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7484         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7485         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7486         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7487         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7488         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7489         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7490         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7491         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7492         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7493         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7494         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7495         undef any previous version and define our own version, for
7496         simplicity and consistency with the new macros for types.
7497         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7498         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7499         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7500         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7501         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7502         @WINT_T_SUFFIX@ to keep things simple here.
7503         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7504         Simplify by assuming typical 8/16/32/64 host, since we're
7505         already doing that elsewhere anyway.
7506         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7507         and assume long long int is 64 bits if available.  This
7508         speeds up 'configure'.
7509
7510 2006-07-01  Eric Blake  <ebb9@byu.net>
7511
7512         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7513         Reported by Andreas Buening.
7514
7515 2006-07-01  Eric Blake  <ebb9@byu.net>
7516
7517         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7518
7519 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7520
7521         * lib/getaddrinfo.c: fixed typo
7522
7523 2006-06-29  Jim Meyering  <jim@meyering.net>
7524
7525         * modules/strftime (Maintainer): Add my name, since with the
7526         FPRINTFTIME changes strftime.c has forked from glibc.
7527
7528 2006-06-29  Eric Blake  <ebb9@byu.net>
7529
7530         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7531
7532 2006-06-29  Eric Blake  <ebb9@byu.net>
7533
7534         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7535
7536 2006-06-29  Eric Blake  <ebb9@byu.net>
7537
7538         * lib/stat_.h: New file.
7539
7540 2006-06-29  Eric Blake  <ebb9@byu.net>
7541
7542         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7543         unused static function.
7544
7545 2006-06-29  Eric Blake  <ebb9@byu.net>
7546
7547         * doc/functions.texi (Function Portability): Document missing lstat
7548         on mingw.
7549
7550 2006-06-29  Eric Blake  <ebb9@byu.net>
7551
7552         * MODULES.html.sh: Add sys_stat.
7553         * modules/sys_stat: New module.
7554         * modules/mkstemp (Depends-on): Add sys_stat.
7555
7556 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7557
7558         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7559
7560 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7561
7562         * m4/c-bs-a.m4: Removed.
7563
7564 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7565
7566         * lib/strftime.c: Assume strftime() exists.
7567
7568 2006-06-29  Derek Price  <derek@ximbiot.com>
7569
7570         * modules/c-bs-a: Removed - \a is C89.
7571         * MODULES.html.sh: Remove c-bs-a.
7572
7573 2006-06-29  Bruno Haible  <bruno@clisp.org>
7574
7575         * modules/wcwidth (License): Change to LGPL.
7576
7577 2006-06-28  Simon Josefsson  <jas@extundo.com>
7578
7579         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7580         on _WIN32.
7581
7582         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7583         getnameinfo.
7584
7585 2006-06-28  Simon Josefsson  <jas@extundo.com>
7586
7587         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7588
7589 2006-06-28  Simon Josefsson  <jas@extundo.com>
7590
7591         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7592         functions there.  It will succeed on Windows XP, but on Windows
7593         2000 and (presumably) earlier, it will fail, and use the internal
7594         re-implementation.
7595         (use_win32_p): New function.
7596         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7597         Support AI_NUMERICSERV to disable getservbyname.
7598         (getnameinfo): New function, only supports
7599         NI_NUMERICHOST|NI_NUMERICSERV for now.
7600
7601         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7602         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7603         getnameinfo.
7604
7605 2006-06-28  Eric Blake  <ebb9@byu.net>
7606
7607         * modules/wcwidth: New file.
7608         * modules/mbchar (Depends-on): Add wcwidth.
7609         * modules/mbswidth (Depends-on): Add wcwidth.
7610         * MODULES.html.sh: Add wcwidth.
7611
7612 2006-06-28  Eric Blake  <ebb9@byu.net>
7613
7614         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7615         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7616
7617 2006-06-28  Eric Blake  <ebb9@byu.net>
7618
7619         * lib/xvasprintf.h: Fix comments.
7620
7621 2006-06-28  Eric Blake  <ebb9@byu.net>
7622
7623         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7624         * lib/mbswidth.c (wcwidth): Move from here...
7625         * lib/wcwidth.h: ...to this new file.
7626
7627 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7628
7629         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7630
7631         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7632         it's obsolete.
7633         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7634
7635 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7636
7637         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7638         Autoconf 2.60 says this stuff was obsolete.
7639
7640 2006-06-28  Bruno Haible  <bruno@clisp.org>
7641
7642         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7643
7644 2006-06-28  Bruno Haible  <bruno@clisp.org>
7645
7646         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7647         gt_TYPE_WCHAR_T.
7648
7649 2006-06-28  Bruno Haible  <bruno@clisp.org>
7650
7651         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7652         declaration for wcwidth.
7653         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7654
7655 2006-06-28  Bruno Haible  <bruno@clisp.org>
7656
7657         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7658         (mkdir): Define using _mkdir.
7659
7660 2006-06-28  Bruno Haible  <bruno@clisp.org>
7661
7662         * lib/getaddrinfo.h: Fix POSIX URL.
7663         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7664         _WIN32.
7665         (use_win32_p): Make static.
7666         (getaddrinfo): Reject service name if it is empty or does not consist
7667         solely of decimal digits, or if its value is > 65535.
7668         (getnameinfo): Remove useless casts.
7669
7670 2006-06-27  Simon Josefsson  <jas@extundo.com>
7671
7672         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7673         Eggert and Martin Lambers.
7674
7675 2006-06-27  Simon Josefsson  <jas@extundo.com>
7676
7677         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7678         Eggert and Martin Lambers.
7679
7680 2006-06-27  Bruno Haible  <bruno@clisp.org>
7681
7682         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7683         result to 0, not to empty.
7684         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7685
7686 2006-06-27  Bruno Haible  <bruno@clisp.org>
7687
7688         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7689
7690 2006-06-26  Simon Josefsson  <jas@extundo.com>
7691
7692         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7693         present.
7694
7695 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7696
7697         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7698         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7699         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7700
7701 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7702
7703         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7704
7705 2006-06-26  Bruno Haible  <bruno@clisp.org>
7706
7707         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7708
7709 2006-06-26  Bruno Haible  <bruno@clisp.org>
7710
7711         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7712
7713 2006-06-26  Bruno Haible  <bruno@clisp.org>
7714
7715         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7716         SGI C compiler in pre-C99 mode.
7717         Suggested by Mark D. Baushke and Larry Jones.
7718
7719 2006-06-26  Bruno Haible  <bruno@clisp.org>
7720
7721         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7722         WCHAR_MAX.
7723         Reported by Mark D. Baushke and Larry Jones.
7724
7725 2006-06-26  Bruno Haible  <bruno@clisp.org>
7726
7727         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7728         in pre-C99 mode.
7729         Suggested by Mark D. Baushke and Larry Jones.
7730
7731 2006-06-23  Simon Josefsson  <jas@extundo.com>
7732             Bruno Haible  <bruno@clisp.org>
7733
7734         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7735         Emit mostlyclean-local rule.
7736         (func_emit_tests_Makefile_am): Likewise.
7737         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7738
7739 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7740
7741         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7742
7743 2006-06-23  Bruno Haible  <bruno@clisp.org>
7744
7745         * tests/test-stdint.c: Update to match ISO C 99 Technical
7746         Corrigendum 1.
7747
7748 2006-06-23  Bruno Haible  <bruno@clisp.org>
7749
7750         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7751
7752 2006-06-23  Bruno Haible  <bruno@clisp.org>
7753
7754         * lib/stdint_.h: Treat IRIX like OpenBSD.
7755
7756 2006-06-23  Bruno Haible  <bruno@clisp.org>
7757
7758         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7759         ISO C 99 Technical Corrigendum 1.
7760
7761 2006-06-22  Simon Josefsson  <jas@extundo.com>
7762
7763         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7764         MinGW.
7765
7766 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7767
7768         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7769         needed.  Some compiler complained about some of them.  Problem reported
7770         by Larry Jones in
7771         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7772
7773 2006-06-21  Simon Josefsson  <jas@extundo.com>
7774
7775         * tests/test-getaddrinfo.c: New file.
7776
7777         * modules/getaddrinfo-tests: New file.
7778
7779         * MODULES.html.sh: Add inet_pton.
7780
7781         * modules/inet_pton: New file.
7782
7783 2006-06-21  Simon Josefsson  <jas@extundo.com>
7784
7785         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7786         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7787         of using the (limited) gnulib implementation on Windows XP.
7788
7789         * m4/inet_pton.m4: New file.
7790
7791 2006-06-21  Simon Josefsson  <jas@extundo.com>
7792
7793         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7794         variable.
7795
7796         * lib/socket_.h: Don't define WINVER.
7797
7798         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7799         slightly modified to work in gnulib.
7800
7801 2006-06-21  Simon Josefsson  <jas@extundo.com>
7802
7803         * doc/gnulib.texi (Windows sockets): Add.
7804
7805 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7806
7807         * lib/read-file.c (fread_file): Start with buffer allocation of
7808         0 bytes rather than 1 byte; this simplifies the code.
7809         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7810         code to free buffer and save/restore errno.
7811         (internal_read_file): Remove unused local.
7812
7813 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7814
7815         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7816         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7817         Problem reported by Denis Excoffier in
7818         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7819
7820 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7821
7822         * modules/sys_socket, modules/socklen: Include sys/types since
7823         FreeBSD 4.x's sys/socket.h needs it.
7824
7825 2006-06-19  Simon Josefsson  <jas@extundo.com>
7826
7827         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7828
7829 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7830
7831         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7832
7833 2006-06-19  Bruno Haible  <bruno@clisp.org>
7834
7835         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7836         and FULL_PATH_INTTYPES_H in angle brackets.
7837         Reported by Mark D. Baushke <mdb@gnu.org>.
7838
7839 2006-06-17  Eric Blake  <ebb9@byu.net>
7840
7841         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7842         errno.
7843
7844 2006-06-17  Bruno Haible  <bruno@clisp.org>
7845
7846         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7847         <sys/inttypes.h>.
7848
7849 2006-06-17  Bruno Haible  <bruno@clisp.org>
7850
7851         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7852         whether errno is declared. Assume <errno.h> declares errno.
7853
7854 2006-06-17  Bruno Haible  <bruno@clisp.org>
7855
7856         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7857
7858 2006-06-17  Bruno Haible  <bruno@clisp.org>
7859
7860         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7861         problem on Solaris 2.5.1.
7862
7863 2006-06-16  Eric Blake  <ebb9@byu.net>
7864
7865         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7866         * lib/unicodeio.c [!defined errno]: Likewise.
7867         * lib/strtol.c [!defined errno]: Likewise.
7868         * lib/strtod.c [!defined errno]: Likewise.
7869
7870 2006-06-15  Eric Blake  <ebb9@byu.net>
7871
7872         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7873
7874 2006-06-15  Eric Blake  <ebb9@byu.net>
7875
7876         * config/srclist.txt (ssize_t.m4): Lose sync.
7877
7878 2006-06-15  Bruno Haible  <bruno@clisp.org>
7879
7880         * modules/stdint (Files): Include m4/full-header-path.m4,
7881         m4/size_max.m4, m4/wchar_t.m4.
7882         (Makefile.am): Many more substitutions.
7883         * modules/stdint-tests: New file.
7884         * tests/test-stdint.c: New file.
7885
7886 2006-06-15  Bruno Haible  <bruno@clisp.org>
7887
7888         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7889         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7890         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7891         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7892         gl_CHECK_TYPE_SAME): New macros.
7893
7894 2006-06-15  Bruno Haible  <bruno@clisp.org>
7895
7896         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7897
7898 2006-06-15  Bruno Haible  <bruno@clisp.org>
7899
7900         * lib/stdint_.h: Rewritten to be fully auto-configured.
7901         Fixes bug on HP-UX/IA64.
7902
7903 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7904
7905         * lib/getdate.y (__attribute__): Don't define if already defined.
7906         Problem reported by Larry Jones.
7907         * lib/utimens.c (__attribute__): Likewise.
7908
7909 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7910
7911         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7912         reported by Andreas Schwab.
7913
7914 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7915             Bruno Haible  <bruno@clisp.org>
7916
7917         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7918         check for the declaration of strnlen and a run test that exposes the
7919         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7920         rpl_strndup.
7921
7922 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7923             Bruno Haible  <bruno@clisp.org>
7924
7925         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7926
7927 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7928
7929         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7930         compile test, for Tru64 4.0D.
7931
7932 2006-05-28  Karl Berry  <karl@gnu.org>
7933
7934         * config/srclist.txt (printf-args.c): lose sync.
7935
7936 2006-05-26  Martin Lambers  <marlam@marlam.de>
7937
7938         * lib/getpass.c: Updates the test for the native W32 API, and adds
7939         missing includes, thus fixing compilation warnings.
7940
7941 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7942
7943         * lib/exclude.c (exclude_fnmatch): New function.
7944         (excluded_file_name): Call exclude_fnmatch.
7945         * lib/exclude.h (excluded_file_name): New prototype
7946
7947 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7948
7949         * lib/tempname.c (small_open, large_open): New macros.
7950         (__open, __open64) [!_LIBC]: Remove.
7951         (__gen_tempname): Use small_open and large_open instead of __open
7952         and __open64.  This fixes a portability bug on HP-UX 11.11i
7953         reported by Simon Wing-Tang in
7954         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7955
7956 2006-05-24  Bruno Haible  <bruno@clisp.org>
7957
7958         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7959         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7960         Reported by Thorsten Maerz <torte@netztorte.de> via
7961         Aaron Stone <aaron@serendipity.cx>.
7962
7963 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7964
7965         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7966         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7967         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7968         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7969         not really conditional on the cache.
7970         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7971
7972 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7973
7974         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
7975         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
7976         (my_usleep): Don't mishandle maximum value.
7977
7978 2006-05-19  Jim Meyering  <jim@meyering.net>
7979
7980         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
7981
7982 2006-05-17  Bruno Haible  <bruno@clisp.org>
7983
7984         Cygwin portability.
7985         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
7986
7987 2006-05-17  Bruno Haible  <bruno@clisp.org>
7988
7989         * lib/stdint_.h: Fix recognition of Cygwin.
7990
7991 2006-05-15  Bruno Haible  <bruno@clisp.org>
7992
7993         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
7994         on libtool patch by Ralf Wildenhues.
7995
7996 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
7997
7998         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
7999         test for C99 conformance; (bool) 0.5 is an integer constant
8000         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8001         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8002
8003 2006-05-11  Simon Josefsson  <jas@extundo.com>
8004
8005         * m4/xvasprintf.m4: Fix obvious typo.
8006
8007 2006-05-11  Jim Meyering  <jim@meyering.net>
8008
8009         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8010         James Lemley.
8011
8012 2006-05-10  Simon Josefsson  <jas@extundo.com>
8013
8014         * lib/md4.c: Typo fix, update copyright years.
8015         (K1, K2): Don't use L because it turn computations into 64-bit on
8016         64-bit platforms.
8017
8018 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8019
8020         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8021         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8022         unwanted sign propagation, e.g., on hosts with 64-bit int.
8023         There still are some problems with reeelly weird theoretical hosts
8024         (e.g., 33-bit int) but it's not worth worrying about now.
8025         * lib/sha1.c (rol): Likewise.
8026         (K1, K2, K3, K4): Remove unnecessary L suffix.
8027
8028 2006-05-10  Bruno Haible  <bruno@clisp.org>
8029
8030         * lib/des.c: Cast to avoid warnings.
8031
8032 2006-05-09  Bruno Haible  <bruno@clisp.org>
8033
8034         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8035         (Depends-on): Depend also on xsize, stdarg.
8036         (configure.ac): Add gl_XVASPRINTF.
8037
8038 2006-05-09  Bruno Haible  <bruno@clisp.org>
8039
8040         * m4/xvasprintf.m4: New file.
8041
8042 2006-05-09  Bruno Haible  <bruno@clisp.org>
8043
8044         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8045         (EOVERFLOW): Define fallback value.
8046         (xstrcat): New function.
8047         (xvasprintf): Recognize the special case of a string concatenation.
8048
8049 2006-05-08  Eric Blake  <ebb9@byu.net>
8050
8051         * gnulib-tool (func_version): Base copyright year on CVS date.
8052         (func_emit_copyright_notice): New function.
8053         (func_emit_lib_Makefile_am): Use it.
8054         (func_emit_tests_Makefile_am): Likewise.
8055         (func_import): Likewise.
8056
8057 2006-05-08  Bruno Haible  <bruno@clisp.org>
8058
8059         * modules/stdarg: New file.
8060         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8061
8062 2006-05-08  Bruno Haible  <bruno@clisp.org>
8063
8064         * m4/stdarg.m4: New file, from GNU gettext.
8065
8066 2006-05-08  Bruno Haible  <bruno@clisp.org>
8067
8068         * config/srclist.txt (build-aux/config.rpath): different from latest
8069         release.
8070
8071 2006-05-08  Bruno Haible  <bruno@clisp.org>
8072
8073         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8074
8075 2006-05-05  Jim Meyering  <jim@meyering.net>
8076
8077         * m4/warning.m4: New file, derived from bison's file by the same name.
8078
8079 2006-05-03  Bruno Haible  <bruno@clisp.org>
8080
8081         * lib/stdint_.h: Shorter URL.
8082         * lib/inttypes.h: Likewise.
8083
8084 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8085
8086         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8087
8088 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8089
8090         * lib/verify.h: Document the internals better.  Most of this change
8091         was written by Bruno Haible.
8092
8093 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8094
8095         * doc/verify.texi: New file, partly based on a proposal by
8096         Bruno Haible.
8097
8098 2006-05-02  Bruno Haible  <bruno@clisp.org>
8099
8100         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8101         test from here...
8102         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8103
8104 2006-04-29  Bruno Haible  <bruno@clisp.org>
8105
8106         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8107         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8108
8109 2006-04-29  Bruno Haible  <bruno@clisp.org>
8110
8111         * gnulib-tool: Make --update option actually work.
8112
8113 2006-04-29  Bruno Haible  <bruno@clisp.org>
8114
8115         * doc/gcd.texi: New file.
8116         * doc/gnulib.texi: Include it.
8117
8118 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8119
8120         * lib/getdate.y (get_date): When adding relative date, start with the
8121         initial time, not with the result of the first mktime call.
8122
8123 2006-04-25  Bruno Haible  <bruno@clisp.org>
8124
8125         * gnulib-tool (func_import): Output the include directives in three
8126         blocks, sorted separately.
8127         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8128
8129 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8130
8131         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8132         to define main with arguments, for C++.  Reported by Eric Blake.
8133         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8134         Prefer 'int main ()' to 'int main (void)', for C++.
8135         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8136         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8137         for 'main', for C99 and C++.
8138
8139 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8140
8141         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8142         Don't assume that exit status -1 is valid.
8143         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8144         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8145         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8146         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8147         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8148         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8149         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8150         functions can be used without declaring them, or that you can
8151         exit with status -1.
8152         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8153
8154 2006-04-24  Karl Berry  <karl@gnu.org>
8155
8156         * config/srclist.txt (longdouble.m4): sync lost.
8157
8158 2006-04-24  Eric Blake  <ebb9@byu.net>
8159
8160         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8161
8162 2006-04-24  Bruno Haible  <bruno@clisp.org>
8163
8164         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8165         poll() implementation in AIX.
8166         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8167
8168 2006-04-24  Bruno Haible  <bruno@clisp.org>
8169
8170         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8171         assigned exactly once.
8172
8173 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8174             Bruno Haible  <bruno@clisp.org>
8175
8176         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8177         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8178         for AM_CPPFLAGS.
8179
8180 2006-04-23  Bruno Haible  <bruno@clisp.org>
8181
8182         * modules/copy-file: Depend on unistd.
8183         * modules/execute: Likewise.
8184         * modules/fatal-signal: Likewise.
8185         * modules/findprog: Likewise.
8186         * modules/mkdtemp : Likewise.
8187         * modules/pipe: Likewise.
8188         * modules/wait-process: Likewise.
8189
8190 2006-04-23  Bruno Haible  <bruno@clisp.org>
8191
8192         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8193         condition was already detected.
8194         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8195
8196 2006-04-23  Bruno Haible  <bruno@clisp.org>
8197
8198         * lib/copy-file.c: Include <unistd.h> unconditionally.
8199         * lib/execute.c: Likewise.
8200         * lib/fatal-signal.c: Likewise.
8201         * lib/findprog.c: Likewise.
8202         * lib/mkdtemp.c: Likewise.
8203         * lib/pipe.h: Likewise.
8204         * lib/pipe.c: Likewise.
8205         * lib/wait-process.h: Likewise.
8206
8207 2006-04-23  Bruno Haible  <bruno@clisp.org>
8208
8209         * gnulib-tool (func_usage): Fix --import description. Document
8210         --update.
8211         (func_import): Create temporary file in a temporary directory, if
8212         --dry-run is specified. Silence errors from 'grep' when there are no
8213         m4 files in $m4dir.
8214         (func_create_testdir): Silence errors from 'grep' when there are no
8215         m4 files in $m4dir.
8216         Reported by Karl Berry <karl@freefriends.org>.
8217
8218 2006-04-20  Bruno Haible  <bruno@clisp.org>
8219
8220         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8221         one argument, so that the code will be portable to Autoconf 2.60.
8222         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8223         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8224         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8225
8226 2006-04-19  Derek Price  <derek@ximbiot.com>
8227             Eric Blake  <ebb9@byu.net>
8228
8229         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8230         rather than "/full/path.h".  Update comment to match.  Shorten &
8231         generalize m4_translit call via AS_TR_CPP.
8232
8233 2006-04-19  Derek Price  <derek@ximbiot.com>
8234             Eric Blake  <ebb9@byu.net>
8235
8236         * lib/inttypes.h: Correct grammar in comment.
8237
8238 2006-04-18  Derek Price  <derek@ximbiot.com>
8239             Paul Eggert  <eggert@cs.ucla.edu>
8240
8241         * modules/inttypes: New file.
8242         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8243
8244 2006-04-18  Derek Price  <derek@ximbiot.com>
8245             Paul Eggert  <eggert@cs.ucla.edu>
8246
8247         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8248         New files.
8249
8250 2006-04-18  Derek Price  <derek@ximbiot.com>
8251             Paul Eggert  <eggert@cs.ucla.edu>
8252
8253         * lib/inttypes.h: New file.
8254         * lib/strtoimax.c: Assume <inttypes.h>.
8255
8256 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8257
8258         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8259         isn't mounted.  Problem reported by Kir Kolyshkin.
8260
8261 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8262
8263         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8264         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8265         Derek R. Price.
8266         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8267         implementation.
8268
8269 2006-04-12  Eric Blake  <ebb9@byu.net>
8270
8271         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8272         is now done automatically by the corresponding Autoconf macro.
8273
8274 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8275
8276         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8277         time_r.h.
8278
8279 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8280
8281         Merge regex changes from libc, removing some of our
8282         POSIX-conformance changes that were rejected and redoing them in a
8283         less-intrusive way.
8284
8285         * lib/regcomp.c (re_compile_internal, init_dfa):
8286         Length arg is now size_t, not Idx.  All uses changed.
8287         (peek_token): Forward decl now says internal_function.
8288         (__re_error_msgid, __re_error_msgid_idx):
8289         Now static rather than extern with attribute_hidden.
8290         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8291         For some reason libc prefers K&R style defns for external functions.
8292         (regerror) [!defined _LIBC]: Likewise.
8293         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8294         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8295         (build_range_exp, build_collating_symbol):
8296         Use K&R-style defn.
8297         (re_compile_fastmap): Use '\0' to memset, not 0.
8298         (utf8_sb_map): Make the calculations more obvious.
8299         (init_dfa, parse_bracket_exp, build_charclass_op):
8300         Call calloc and cast result, as glibc does.
8301         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8302         (build_range_exp, build_collating_symbol):
8303         Now internal functions.
8304
8305         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8306
8307         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8308         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8309         Don't depend on VMS; depend on __VMS instead, for POSIX
8310         namespace cleanness.
8311         (regoff_t): Define to ssize_t, not long int.
8312
8313         Remove the REG_ macros named below.  Instead, make the old names
8314         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8315         __USE_GNU_REGEX.
8316         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8317         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8318         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8319         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8320         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8321         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8322         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8323         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8324         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8325         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8326         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8327         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8328         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8329         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8330         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8331         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8332         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8333         (REG_NREGS):
8334         Remove.  All uses replaced by the old RE_* names.
8335         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8336         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8337         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8338         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8339         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8340         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8341         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8342         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8343         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8344         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8345         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8346         Don't bother having these macros be independent of each others'
8347         values, since they no longer exist in the POSIX name space.
8348
8349         Rename the following member names back to their old names,
8350         unless !__USE_GNU_REGEX.  All uses changed back.
8351         (buffer): Renamed from re_buffer.
8352         (allocated): Renamed from re_allocated.
8353         (used): Renamed from re_used.
8354         (syntax): Renamed from re_syntax.
8355         (fastmap): Renamed from re_fastmap.
8356         (translate): Renamed from re_translate.
8357         (can_be_null): Renamed from re_can_be_null.
8358         (regs_allocated): Renamed from re_regs_allocated.
8359         (fastmap_accurate): Renamed from re_fastmap_accurate.
8360         (no_sub): Renamed from re_no_sub.
8361         (not_bol): Renamed from re_not_bol.
8362         (not_eol): Renamed from re_not_eol.
8363         (newline_anchor): Renamed from re_newline_anchor.
8364         (num_regs): Renamed from rm_num_regs.
8365         (start): Renamed from rm_start.
8366         (end): Renamed from rm_end.
8367
8368         (free_state): Move up a bit.
8369
8370         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8371         #define to be empty.
8372         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8373         when that is what is intended.
8374         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8375         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8376         (MAX): New macro.
8377         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8378         All uses changed back to re_malloc, etc.  It's now the caller's
8379         responsibility to check for overflow; all callers changed.
8380         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8381         (re_x2nrealloc): Remove.
8382         (free_state): Remove decl.
8383
8384         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8385         (re_set_registers, re_exec):
8386         Use K&R-style defn.
8387
8388         2006-01-31  Roland McGrath  <roland@redhat.com>
8389
8390         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8391         Reported by Mike Frysinger <vapier@gentoo.org>.
8392
8393         2006-01-15  Andreas Jaeger  <aj@suse.de>
8394
8395         [BZ #1950]
8396         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8397         build_wcs_upper_buffer change.
8398         (build_wcs_upper_buffer): Change return type.
8399
8400         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8401
8402         * lib/regex_internal.h: Include <stdint.h> if available.
8403
8404         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8405
8406         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8407
8408         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8409
8410         * lib/regcomp.c: Adjust for changed secondary hash function.
8411
8412         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8413
8414         * lib/regex.h: Pretty printing.
8415         Clean up namespace a bit.
8416
8417         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8418
8419         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8420         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8421
8422         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8423                     Ulrich Drepper  <drepper@redhat.com>
8424
8425         [BZ #1302]
8426         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8427         changed.
8428         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8429
8430         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8431
8432         [BZ #281]
8433         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8434         * lib/regcomp.c: Remove unnecessary uses of
8435         unsigned RE_TRANSLATE_TYPE.
8436         * lib/regex_internal.h: Likewise.
8437         * lib/regex_internal.c: Likewise.
8438         * lib/regexec.c: Likewise.
8439         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8440
8441         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8442
8443         * lib/regexec.c (find_recover_state): Remove unnecessary
8444         initialization.
8445         (transit_state_bkref): Make DFA a const pointer.
8446         (get_subexp): Likewise.
8447         (check_arrival): Likewise.
8448         (update_cur_sifted_state): Likewise.
8449         (re_search_internal): Likewise.
8450         (prune_impossible_nodes): Likewise.
8451         (acquire_init_state_context): Likewise.
8452         (proceed_next_node): Likewise.
8453         (set_regs): Likewise.
8454         (free_fail_stack_return): Likewise.
8455         (check_arrival_expand_ecl): Mark DFA parameter as const.
8456         (check_arrival_expand_ecl_sub): Likewise.
8457         (check_subexp_limits): Likewise.
8458         (sub_epsilon_src_nodes):  Likewise.
8459         (add_epsilon_src_nodes):  Likewise.
8460         (merge_state_array): Likewise.
8461         (update_regs): Likewise.
8462         (build_trtable): Likewise.
8463         (sift_states_backward): Mark MCTX parameter as const.
8464         (build_sifted_states): Likewise.
8465         (update_cur_sifted_state): Likewise.
8466         (sift_states_mkref): Likewise.
8467         (check_arrival_expand_ecl): Mark eclosure as const.
8468         (check_dst_limits_calc_pos_1): Likewise.
8469         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8470         pointer.
8471
8472         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8473
8474         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8475         (transit_state_sb): Likewise.
8476         (transit_state_mb): Likewise.
8477         (sift_states_iter_mb): Likewise.
8478         (check_arrival_add_next_nodes): Likewise.
8479         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8480         [_LIBC] (re_search_2_stub): Use mempcpy.
8481
8482         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8483         mbrtowc for very simple UTF-8 case.
8484
8485         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8486         a pointer-to-const.
8487         (re_acquire_state_context): Likewise.
8488         * lib/regex_internal.h: Adjust prototypes.
8489
8490         * lib/regex.c: Prevent using C++ compilers.
8491
8492         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8493         (re_acquire_state_context): Likewise.
8494
8495 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8496
8497         * modules/regex (Depends-on): Add ssize_t.
8498
8499 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8500
8501         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8502         translation table.
8503
8504 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8505
8506         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8507
8508 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8509             Bruno Haible  <bruno@clisp.org>
8510
8511         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8512         <sys/types.h> and <inttypes.h>.
8513
8514 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8515
8516         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8517         `__error_t_defined', so argp.h will not typedef the former.
8518
8519 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8520
8521         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8522         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8523         glibc names.  Even if glibc is changed to conform to POSIX, the
8524         traditional names will be available anyway, since regex depends on
8525         the extensions module.  Also, fix a longstanding typo in the
8526         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8527         reported by Emanuele Giaquinta.  Also, change sense of cached
8528         variable, so that the message makes sense.
8529
8530 2006-03-24  Simon Josefsson  <jas@extundo.com>
8531
8532         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8533         including some doc fixes.
8534         (base64_encode_alloc): Fix +1 bug on allocation failures.
8535
8536 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8537
8538         * lib/base64.c (base64_encode): Do not read past end of array with
8539         unsanitized input on systems with CHAR_BIT > 8.
8540
8541 2006-03-24  Eric Blake  <ebb9@byu.net>
8542
8543         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8544
8545 2006-03-22  Karl Berry  <karl@gnu.org>
8546
8547         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8548         * config/srclistvars.sh (COREUTILS): new var.
8549
8550 2006-03-17  Jim Meyering  <jim@meyering.net>
8551
8552         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8553         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8554
8555 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8556
8557         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8558         no longer needs it.  Instead, check that regoff_t is as least
8559         as wide as ptrdiff_t.
8560
8561         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8562         so that our regex.h stays compatible with the installed regex.
8563         This is helpful for installers who configure --without-included-regex.
8564         Problem reported by Emanuele Giaquinta.
8565
8566 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8567
8568         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8569         Typedef to long int, not to off_, as POSIX will likely change
8570         in that direction.
8571
8572 2006-03-15  Eric Blake  <ebb9@byu.net>
8573
8574         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8575
8576 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8577
8578         * lib/argp-help.c (validate_uparams): Fix typo
8579         * lib/argp-parse.c (argp_default_options): Consistently begin help
8580         messages with a lowercase letter.
8581
8582 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8583
8584         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8585         overrun buffers and shouldn't be used (much as gets shouldn't be
8586         used).
8587         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8588
8589 2006-03-08  Simon Josefsson  <jas@extundo.com>
8590
8591         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8592         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8593
8594 2006-03-08  Simon Josefsson  <jas@extundo.com>
8595
8596         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8597         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8598
8599 2006-03-08  Simon Josefsson  <jas@extundo.com>
8600
8601         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8602         signal that configure disabled the device.
8603
8604 2006-03-08  Simon Josefsson  <jas@extundo.com>
8605
8606         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8607         languages.
8608
8609 2006-03-07  Simon Josefsson  <jas@extundo.com>
8610
8611         * modules/getopt (Depends-on): Add unistd.
8612
8613         * modules/unistd: New file.
8614
8615 2006-03-07  Simon Josefsson  <jas@extundo.com>
8616
8617         * modules/gc-random: New file.
8618
8619 2006-03-07  Simon Josefsson  <jas@extundo.com>
8620
8621         * m4/unistd_h.m4: New file.
8622
8623 2006-03-07  Simon Josefsson  <jas@extundo.com>
8624
8625         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8626         test to be side-effect free by storing the result in the cache
8627         variable gl_cv_lib_readline, and moving the assignment of
8628         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8629         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8630
8631 2006-03-07  Simon Josefsson  <jas@extundo.com>
8632
8633         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8634         error on missing devices (the functions will return an error).
8635
8636         * m4/gc.m4: Move random stuff to gc-random.m4
8637
8638 2006-03-07  Simon Josefsson  <jas@extundo.com>
8639
8640         * lib/unistd_.h: New file.
8641
8642 2006-03-07  Simon Josefsson  <jas@extundo.com>
8643
8644         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8645
8646 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8647
8648         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8649         Problem reported by Juan Manuel Guerrero.
8650
8651 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8652
8653         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8654         the unistd module.
8655         * lib/getlogin_r.c: Likewise.
8656         * lib/getlogin_r.h: Likewise.
8657         * lib/glob.c: Likewise.
8658         * lib/pagealign_alloc.c: Likewise.
8659         * lib/unistd_.h: Remove; no longer needed.
8660
8661 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8662
8663         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8664         Add unistd.
8665         * modules/c-stack (Depends-on): Add unistd.
8666         * modules/getlogin_r: Likewise.
8667         * modules/glob: Likewise.
8668         * modules/pagealign_alloc: Likewise.
8669         * modules/unistd (Files): Remove lib/unistd_.h.
8670         (EXTRA_DIST): Remove.
8671         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8672         need unistd_.h.
8673         (MOSTLYCLEANFILES): Remove unistd.h-t.
8674
8675 2006-03-03  Simon Josefsson  <jas@extundo.com>
8676
8677         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8678
8679 2006-03-03  Simon Josefsson  <jas@extundo.com>
8680
8681         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8682         libidn and bison.
8683
8684 2006-03-03  Simon Josefsson  <jas@extundo.com>
8685
8686         * build-aux/maint.mk: Add indent target.
8687
8688 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8689
8690         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8691         our replacement poll.h in any case, to avoid a differing
8692         declaration from a system header.  Seen on AIX.
8693
8694 2006-03-01  Simon Josefsson  <jas@extundo.com>
8695
8696         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8697         <kasal@ucw.cz>.
8698
8699 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8700
8701         * modules/gettime (Depends-on): Add extensions module.
8702         * modules/nanosleep (Depends-on): Likewise.
8703         * modules/settime (Depends-on): Likewise.
8704
8705 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8706
8707         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8708         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8709         pedantically.
8710         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8711         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8712
8713         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8714         not "==".  Reported by Ralf Wildenhues.
8715
8716 2006-03-01  Karl Berry  <karl@gnu.org>
8717
8718         * doc/Copyright/request-*: new files, synced from gnuorg.
8719
8720 2006-03-01  Karl Berry  <karl@gnu.org>
8721
8722         * config/srclist.txt (Copyright/*): new entries.
8723
8724 2006-02-28  Simon Josefsson  <jas@extundo.com>
8725
8726         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8727
8728 2006-02-27  Simon Josefsson  <jas@extundo.com>
8729
8730         * lib/base64.h: Indent #define's.  From Jim Meyering
8731         <jim@meyering.net>.
8732
8733 2006-02-27  Jim Meyering  <jim@meyering.net>
8734
8735         Revert the change of 2006-02-24, so these files can continue
8736         to be sync'd from gettext.
8737         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8738         of `config.h'.
8739
8740 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8741
8742         * modules/intprops: New file.
8743         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8744         Add intprops.
8745         * modules/getloadavg (Files): Remove lib/intprops.h.
8746         (Depends-on): Add intprops.
8747         * modules/human: Likewise.
8748         * modules/inttostr: Likewise.
8749         * modules/openat: Likewise.
8750         * modules/sig2str: Likewise.
8751         * modules/userspec: Likewise.
8752         * modules/utimecmp: Likewise.
8753         * modules/xnanosleep: Likewise.
8754         * modules/xstrtol: Likewise.
8755
8756 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8757
8758         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8759         * modules/lock-tests (TESTS): Use $(EXEEXT).
8760         * modules/tls-tests: Likewise.
8761         * modules/argp-tests: Likewise.
8762         (check_PROGRAMS): New var, replacing...
8763         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8764
8765 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8766
8767         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8768         `config.h'.
8769
8770 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8771
8772         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8773
8774 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8775
8776         Sync from coreutils.
8777         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8778         gl_CHDIR_SAFER.
8779
8780 2006-02-22  Jim Meyering  <jim@meyering.net>
8781
8782         Sync from coreutils.
8783         * m4/chdir-safer.m4: New file.
8784
8785 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8786
8787         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8788         AT_FDCWD exceeds INT_MAX.
8789         * lib/openat.h (AT_FDCWD): Likewise.
8790
8791 2006-02-17  Eric Blake  <address@hidden>
8792
8793         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8794
8795 2006-02-16  Simon Josefsson  <jas@extundo.com>
8796
8797         * modules/getaddrinfo (Depends-on): Add sys_socket.
8798
8799 2006-02-15  Simon Josefsson  <jas@extundo.com>
8800
8801         * build-aux/maint.mk: Add dsyntax-check rule.
8802
8803 2006-02-15  Eric Blake  <ebb9@byu.net>
8804
8805         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8806         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8807         'present but cannot compile' warnings on cygwin.
8808         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8809         use ws2tcpip.h if sys/socket.h works.
8810         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8811         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8812
8813 2006-02-14  Simon Josefsson  <jas@extundo.com>
8814
8815         * modules/maintainer-makefile (Files): Rename.
8816
8817         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8818         and (the local) Makefile.cfg to maint-cfg.mk.
8819
8820         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8821         to the latter.
8822
8823         * modules/maintainer-makefile: New module.
8824
8825         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8826         severaly stripped to make it possible to build it up from scratch
8827         with reliable tests.
8828
8829         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8830         fixes to permit overriding the default actions when configure and
8831         makefile are not available.
8832
8833 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8834
8835         Sync from coreutils.
8836         * modules/lstat (Depends-on): Don't depend on xalloc.
8837         (License): Change from GPL to LGPL, since this is now simply a
8838         replacement for a libc function.
8839
8840 2006-02-14  Jim Meyering  <jim@meyering.net>
8841
8842         Sync from coreutils.
8843
8844         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8845         failure on deficient systems, and simplify gnulib lgpl dependencies.
8846         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8847         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8848
8849         * lib/xalloc-die.c: Remove unused definition of N_.
8850
8851 2006-02-14  Jim Meyering  <jim@meyering.net>
8852
8853         Sync from coreutils.
8854         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8855         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8856         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8857         double-quote uses of that variable, to accommodate the rare case in
8858         which getmntent is available in none of the libraries checked.  This
8859         happens at least on FreeBSD 5.0.
8860
8861 2006-02-13  Simon Josefsson  <jas@extundo.com>
8862
8863         * gnulib-tool (Usage): Fix --import, from
8864         karl@freefriends.org (Karl Berry).
8865
8866 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8867
8868         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8869
8870 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8871
8872         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8873         "autoupdate" on 2005-12-12.
8874
8875 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8876
8877         * modules/closeout (Depends-on): Remove atexit.
8878
8879 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8880
8881         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8882         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8883
8884 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8885
8886         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8887         __EXTENSIONS__ if this causes compilation to fail.  Problem
8888         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8889         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8890
8891 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8892
8893         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8894         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8895         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8896         All uses changed.
8897
8898 2006-01-26  Simon Josefsson  <jas@extundo.com>
8899
8900         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8901         prototype is visible on mingw32.
8902
8903         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8904         for mingw32.
8905
8906         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8907         mingw32).
8908
8909 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8910
8911         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8912         attempt to open for write; this always fails, at least on POSIX
8913         hosts.  This reinstates the 2006-01-09 change, which was
8914         inadvertently removed.
8915
8916 2006-01-26  Bruno Haible  <bruno@clisp.org>
8917
8918         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8919         Reported by Paul Eggert.
8920
8921 2006-01-26  Bruno Haible  <bruno@clisp.org>
8922             Paul Eggert  <eggert@cs.ucla.edu>
8923
8924         * lib/stdbool_.h (_Bool)
8925         [(! (defined __cplusplus || defined __BEOS__)
8926           && !defined __GNUC__
8927           && !(defined __HP_cc || defined __xlc__
8928                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8929                || defined __sgi))]:
8930         #define to signed char in these cases too; this simplifies
8931         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8932         etc., separately) and makes it more conservative.
8933
8934 2006-01-25  Simon Josefsson  <jas@extundo.com>
8935
8936         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8937         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8938         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8939
8940 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8941
8942         * lib/argp-namefrob.h: Bugfix. Remove stray #
8943
8944 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8945
8946         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8947         so that we test the test.
8948         Check for yet another HP-UX cc bug involving *bool |= bool.
8949
8950 2006-01-25  Karl Berry  <karl@gnu.org>
8951
8952         * config/srclist.txt (vasnprintf.c): sync lost.
8953
8954 2006-01-25  Jim Meyering  <jim@meyering.net>
8955
8956         Sync from the stable (b5) branch of coreutils:
8957
8958         * lib/fts.c (fts_children): Don't let close() clobber errno from
8959         failed fchdir().
8960
8961         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8962         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8963         a dangling symlink.  That can also happen at least for ELOOP.
8964         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8965         FYI, this bug predates the inclusion of fts.c in coreutils.
8966
8967         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8968         in their own block, so pre-c99 compilers don't object.
8969
8970         Avoid the double-free (first in fts_read, second in fts_close) that
8971         would occur when an `active' directory is made inaccessible (e.g.,
8972         via chmod a-x) during a traversal.
8973         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
8974         before returning.  Reproduce this failure by
8975         mkdir -p a/b; cd a; chmod a-x . b
8976         Reported by Stavros Passas.
8977
8978 2006-01-25  Jim Meyering  <jim@meyering.net>
8979
8980         * lib/fileblocks.c: Remove more useless parentheses.
8981         * lib/readutmp.h: Likewise.
8982
8983 2006-01-25  Bruno Haible  <bruno@clisp.org>
8984
8985         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
8986         warnings.
8987         Reported by Paul Eggert.
8988
8989 2006-01-25  Bruno Haible  <bruno@clisp.org>
8990
8991         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
8992         rid of a trap command. For Solaris sh.
8993         Reported by Mark D. Baushke <mdb@gnu.org>.
8994
8995 2006-01-24  Simon Josefsson  <jas@extundo.com>
8996
8997         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
8998         Bruno.
8999
9000 2006-01-24  Karl Berry  <karl@gnu.org>
9001
9002         * config/srclist.txt (argp-namefrob.h): sync lost.
9003
9004 2006-01-24  Jim Meyering  <jim@meyering.net>
9005
9006         * modules/openat (Files): Add lib/intprops.h.
9007         From Mark D. Baushke.
9008
9009 2006-01-24  Jim Meyering  <jim@meyering.net>
9010
9011         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9012         Reported by Mark D. Baushke.
9013
9014 2006-01-24  Jim Meyering  <jim@meyering.net>
9015
9016         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9017
9018 2006-01-24  Bruno Haible  <bruno@clisp.org>
9019
9020         * modules/strnlen (Maintainer): Change from glibc to all.
9021
9022 2006-01-24  Bruno Haible  <bruno@clisp.org>
9023
9024         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9025         Patch by Paul Eggert.
9026
9027 2006-01-24  Bruno Haible  <bruno@clisp.org>
9028
9029         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9030         already has it.
9031         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9032         2005-11-26.
9033
9034         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9035         'signed char' to avoid problems with the built-in _Bool type.
9036         Reported by Paul Eggert on 2005-11-26.
9037
9038 2006-01-24  Bruno Haible  <bruno@clisp.org>
9039
9040         * gnulib-tool (func_import): Avoid constructing complicated sed
9041         expressions inside backquote.
9042         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9043
9044 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9045
9046         These changes imported from libc.
9047         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9048         test and two separate function calls.
9049         * lib/strndup.c (__strndup): Add libc_hidden_def.
9050
9051 2006-01-23  Simon Josefsson  <jas@extundo.com>
9052
9053         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9054         Remove the test_*_SOURCES variable: automake infers it by default.
9055         * modules/tls-tests: Likewise.
9056
9057 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9058
9059         Work around porting bugs reported by Dieter in
9060         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9061         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9062         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9063         Include "getopt.h" first, to check interface.
9064         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9065         !HAVE_DECL_GETENV.
9066         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9067         (__strndup): Revert to K&R-style function dfns, the glibc style.
9068         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9069         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9070         Include strnlen.h first, to get prototype properly.
9071         (strnlen): Renamed from __strnlen.
9072         Remove weak alias.
9073
9074 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9077
9078 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9079
9080         * config/srclist.txt: Adjust to reflect glibc reorganization.
9081         This affects only comments.
9082
9083 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9084
9085          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9086          Reported by Bruce Korb <bkorb@gnu.org>.
9087
9088 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9089
9090         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9091         to pacify gcc -Wswitch-default.
9092
9093 2006-01-22  Bruno Haible  <bruno@clisp.org>
9094
9095         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9096         temporary buffer for sprintf, take into account the precision also
9097         for 'd', 'i', 'u', 'o', 'x', 'X'.
9098
9099 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9100
9101         * modules/argp-tests: New module
9102         * tests/test-argp.c: New file
9103         * tests/test-argp-2.sh: New file
9104
9105 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9106
9107         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9108         (__argp_base_name): Removed
9109         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9110         typo.
9111         (__argp_base_name): Provide macro definition or extern declaration
9112         depending on the configuration
9113
9114 2006-01-20  Simon Josefsson  <jas@extundo.com>
9115
9116         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9117
9118 2006-01-20  Simon Josefsson  <jas@extundo.com>
9119
9120         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9121
9122 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9123
9124         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9125         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9126         Suggested by Bruno Haible.
9127
9128 2006-01-20  Karl Berry  <karl@gnu.org>
9129
9130         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9131         until changes propagate, I guess.
9132
9133 2006-01-19  Simon Josefsson  <jas@extundo.com>
9134
9135         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9136
9137 2006-01-19  Simon Josefsson  <jas@extundo.com>
9138
9139         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9140
9141 2006-01-19  Simon Josefsson  <jas@extundo.com>
9142
9143         * gnulib-tool: Set check_PROGRAMS.
9144
9145         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9146         modules/des-tests, modules/gc-arcfour-tests,
9147         modules/gc-arctwo-tests, modules/gc-des-tests,
9148         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9149         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9150         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9151         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9152         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9153         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9154         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9155         test_*_SOURCES.
9156
9157 2006-01-18  Simon Josefsson  <jas@extundo.com>
9158
9159         * modules/socklen (Depends-on): Depend on sys_socket.
9160
9161 2006-01-18  Simon Josefsson  <jas@extundo.com>
9162
9163         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9164         modules/des-tests, modules/gc-arcfour-tests,
9165         modules/gc-arctwo-tests, modules/gc-des-tests,
9166         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9167         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9168         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9169         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9170         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9171         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9172         $(EXEEXT) to automake TESTS variable, for mingw32.
9173
9174 2006-01-17  Simon Josefsson  <jas@extundo.com>
9175
9176         * modules/socklen (Include): Need sys/socket.h.
9177
9178 2006-01-17  Bruno Haible  <bruno@clisp.org>
9179
9180         * modules/ssize_t (Include): Add <sys/types.h>.
9181
9182 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9183
9184         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9185         it's not portable and it doesn't work with cross-compiles.
9186         Problem reported by Bruno Haible.  Fix missing-$ typo in
9187         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9188         -zignore from being used with Sun's C compiler.
9189
9190 2006-01-12  Simon Josefsson  <jas@extundo.com>
9191
9192         * lib/base64.c: Fix warning, reported by Bruno Haible
9193         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9194
9195 2006-01-12  Bruno Haible  <bruno@clisp.org>
9196
9197         * modules/ldd: New file.
9198         * build-aux/ldd.sh.in: New file.
9199         * MODULES.html.sh (Support for building libraries and executables): Add
9200         ldd.
9201
9202 2006-01-12  Bruno Haible  <bruno@clisp.org>
9203
9204         * m4/ldd.m4: New file.
9205
9206 2006-01-12  Bruno Haible  <bruno@clisp.org>
9207
9208         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9209         endless loop while replacing $auxdir with build-aux.
9210
9211 2006-01-11  Simon Josefsson  <jas@extundo.com>
9212
9213         * lib/stdint_.h (SIZE_MAX): Add missing (.
9214
9215 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9216
9217         Sync from coreutils.
9218         * lib/md5.c: Fix commentary typos.
9219         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9220         * lib/md5.h (__attribute__): Remove; unused.
9221         * lib/sha1.c: Fix commentary to match md5 better.
9222         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9223         so that we don't need to worry about alignment.  All uses changed.
9224         This merges the 2005-10-28 md5 change into sha1.
9225
9226 2006-01-11  Jim Meyering  <jim@meyering.net>
9227
9228         Sync from coreutils.
9229         * lib/md5.c (OP): Fix spacing.
9230
9231 2006-01-11  Bruno Haible  <bruno@clisp.org>
9232
9233         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9234         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9235         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9236
9237 2006-01-11  Bruno Haible  <bruno@clisp.org>
9238
9239         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9240         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9241         the "early" section as well.
9242
9243 2006-01-11  Bruno Haible  <bruno@clisp.org>
9244
9245         Avoid "ar: no archive members specified" error on MacOS X.
9246         * gnulib-tool (func_modules_add_dummy): New function.
9247         (func_import, func_create_testdir): Invoke it.
9248
9249 2006-01-11  Bruno Haible  <bruno@clisp.org>
9250
9251         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9252         with $auxdir in AC_CONFIG_FILES statements.
9253
9254 2006-01-11  Bruno Haible  <bruno@clisp.org>
9255
9256         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9257         Initialize also noinst_HEADERS to empty.
9258
9259 2006-01-11  Bruno Haible  <bruno@clisp.org>
9260
9261         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9262         variables.
9263         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9264         autoreconf.
9265
9266 2006-01-11  Bruno Haible  <bruno@clisp.org>
9267
9268         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9269         overridable by the user.
9270         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9271
9272 2006-01-10  Simon Josefsson  <jas@extundo.com>
9273
9274         * modules/sys_socket: New file.
9275
9276 2006-01-10  Simon Josefsson  <jas@extundo.com>
9277
9278         * m4/sys_socket_h.m4: New file.
9279
9280 2006-01-10  Simon Josefsson  <jas@extundo.com>
9281
9282         * lib/socket_.h: New file.
9283
9284 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9285
9286         * modules/readutmp (Maintainer): Add myself.
9287
9288 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9289
9290         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9291         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9292         People who are still concerned with buggy memcmp implementations
9293         can invoke gl_FUNC_MEMCMP themselves.
9294
9295 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9296
9297         * lib/regex_internal.h (BITSET_WORD_BITS):
9298         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9299         preprocessor mishandles large unsigned values as if they were signed.
9300         Problem reported by Claudio Fontana in
9301         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9302
9303 2006-01-10  Jim Meyering  <jim@meyering.net>
9304
9305         Avoid the double-free (first in fts_read, second in fts_close) that
9306         would occur when an `active' directory is made inaccessible (e.g.,
9307         via chmod a-x) during a traversal.
9308         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9309         before returning.  Reproduce this failure by
9310         mkdir -p a/b; cd a; chmod a-x . b
9311         Reported by Stavros Passas.
9312
9313         Sync from coreutils.
9314         * lib/sha1.c: Tweak grammar in a comment.
9315
9316 2006-01-10  Jim Meyering  <jim@meyering.net>
9317
9318         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9319         Patch by Joerg Sonnenberger.
9320
9321 2006-01-10  Bruno Haible  <bruno@clisp.org>
9322
9323         * modules/readutmp: Depend on module free.
9324         * modules/strtok_r: Depend on module restrict.
9325
9326 2006-01-10  Bruno Haible  <bruno@clisp.org>
9327
9328         * modules/gettext (configure.ac): Add an invocation of
9329         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9330
9331 2006-01-10  Bruno Haible  <bruno@clisp.org>
9332
9333         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9334         Reported by Werner Lemberg <wl@gnu.org>.
9335
9336 2006-01-10  Bruno Haible  <bruno@clisp.org>
9337
9338         * lib/localcharset.c: Update from GNU gettext.
9339
9340 2006-01-10  Bruno Haible  <bruno@clisp.org>
9341
9342         * lib/argp.h (__const): Remove macro. Use const instead.
9343         * lib/argp-fmtstream.h (__const): Likewise.
9344         * lib/glob_.h (__const): Remove macro.
9345         * lib/glob-libc.h: Use const instead of __const.
9346
9347 2006-01-10  Bruno Haible  <bruno@clisp.org>
9348
9349         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9350         variable.
9351         Needed to avoid an automake error regarding the 'gettext' module.
9352
9353 2006-01-09  Simon Josefsson  <jas@extundo.com>
9354
9355         * modules/inet_ntop (Depends-on): Add restrict.
9356
9357 2006-01-09  Simon Josefsson  <jas@extundo.com>
9358
9359         * modules/gc-rijndael-tests (License): Put under LGPL.
9360
9361         * modules/gc-des-tests (License): Likewise.
9362
9363         * modules/gc-arcfour-tests (License): Likewise.
9364
9365         * modules/gc-arctwo-tests (License): Likewise.
9366
9367         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9368
9369         * modules/gc-hmac-sha1-tests (Files): Likewise.
9370
9371         * modules/gc-hmac-md5-tests (License): Likewise.
9372
9373         * modules/gc-sha1-tests (License): Likewise.
9374
9375         * modules/gc-md5-tests (License): Likewise.
9376
9377         * modules/gc-md4-tests (License): Likewise.
9378
9379         * modules/gc-md2-tests (License): Likewise.
9380
9381         * modules/gc-tests (License): Likewise.
9382
9383         * modules/des-tests (License): Likewise.
9384
9385         * modules/md4-tests (License): Likewise.
9386
9387         * modules/md2-tests (License): Likewise.
9388
9389 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9390
9391         Sync from coreutils:
9392
9393         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9394         * modules/lib-ignore: New file.
9395         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9396         chdir-safer.m4, lchmod.m4.
9397         * modules/openat: Add mkdirat.c, openat-priv.h.
9398
9399 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9400
9401         Sync from coreutils.
9402         * m4/lib-ignore.m4: New file.
9403         * m4/lchmod.m4: New file.
9404
9405 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9406
9407         Sync from coreutils.
9408         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9409         for write access: POSIX says that must fail.
9410         * lib/fts.c (diropen): Likewise.
9411         * lib/save-cwd.c (save_cwd): Likewise.
9412         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9413         well, for minor improvements on hosts that lack O_DIRECTORY.
9414         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9415         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9416         Fall back on chown if open failed with EACCES.
9417
9418         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9419         Report an error at compile-time if only a 1-second nominal clock
9420         resolution is found.
9421
9422         * lib/lchmod.h: New file.
9423         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9424         (make_dir_parents): Use lchown rather than chown, and
9425         lchmod rather than chmod.
9426
9427         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9428         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9429         "proc" reported by n0dalus.
9430
9431         * lib/mountlist.c: Include <limits.h>.
9432         (dev_from_mount_options)
9433         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9434         New function.  It no longer assumes "dev=" has the System V meaning
9435         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9436         (read_file_system_list)
9437         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9438         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9439         dev= in that case.
9440
9441         * lib/posixtm.h (PDS_PRE_2000): New macro.
9442         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9443         allow_century.  All usages changed.  Reject dates outside the range
9444         1969-1999 if PDS_PRE_2000 is used.
9445
9446 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9447
9448         Sync from coreutils.
9449         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9450         (Time of day items): Mention the possibility of leap seconds.
9451         Problem reported by Dr. David Alan Gilbert.
9452
9453 2006-01-09  Jim Meyering  <jim@meyering.net>
9454
9455         Sync from coreutils.
9456
9457         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9458
9459         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9460
9461         * lib/modechange.c (mode_compile): Reject an invalid mode string
9462         that starts with an octal digit.  From Andreas Gruenbacher.
9463
9464         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9465         and dup to open_safer and dup_safer, respectively.
9466         (openat_permissive): Fix typo in comment.
9467
9468         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9469         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9470         (_): Remove; no longer needed.
9471         (openat): Renamed from rpl_openat; no need for rpl_openat
9472         since openat.h renames openat for us.
9473         Replace most of the body with a call to openat_permissive,
9474         to avoid duplicate code.
9475         Port to (probably hypothetical) environments were mode_t is
9476         wider than int.
9477         (openat_permissive): Require mode arg, so that we can check
9478         types better.  Put it just after flags.  Change cwd failure
9479         indicator from pointer-to-bool to pointer-to-errno-value.
9480         All callers changed.
9481         Invoke openat_save_fail and/or openat_restore_fail if
9482         cwd_errno is null, so that openat can call us.
9483         (openat_permissive, fdopendir, fstatat, unlinkat):
9484         Simplify errno handling to avoid some duplicate code,
9485         as it's OK to set errno on success.
9486         * lib/openat.h: Revamp code so that function macros depend on
9487         __OPENAT_PREFIX only, not also on AT_FDCWD.
9488         (openat_ro): Remove.  Caller changed to use openat_permissive.
9489         (openat_permissive): Now a macro, if not a function.
9490         (openat_restore_fail, openat_save_fail): Now always functions,
9491         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9492
9493         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9494         and openat.c.
9495         * lib/mkdirat.c: Include openat-priv.h.
9496         Remove definitions of macros defined therein.
9497         * lib/openat.c: Likewise.
9498
9499         * lib/mkdirat.c (mkdirat): New file and function.
9500         * lib/openat.h (mkdirat): Declare.
9501
9502         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9503
9504         * lib/openat.h (openat_permissive): Declare.
9505         (openat_ro): Define.
9506
9507         * lib/openat.c (EXPECTED_ERRNO): New macro.
9508         (openat_permissive): New function -- used in remove.c rewrite.
9509         (all functions): Set errno just before returning, only if there
9510         was an actual failure.
9511         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9512
9513         Emulate openat-family functions using Linux's procfs, if possible.
9514         Idea and some code based on Ulrich Drepper's glibc changes.
9515
9516         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9517         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9518         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9519         before falling back on save_cwd and restore_cwd.
9520         (fdopendir, fstatat, unlinkat): Likewise.
9521
9522         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9523         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9524
9525         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9526         as second argument to va_arg.  Otherwise, some versions of gcc
9527         warn that `if this code is reached, the program will abort'.
9528
9529 2006-01-09  Jim Meyering  <jim@meyering.net>
9530
9531         Sync from coreutils.
9532         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9533         Require openat-priv.h.
9534
9535 2006-01-09  Bruno Haible  <bruno@clisp.org>
9536
9537         * modules/strnlen (Include): Use strnlen.h.
9538
9539 2006-01-09  Bruno Haible  <bruno@clisp.org>
9540
9541         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9542
9543 2006-01-09  Bruno Haible  <bruno@clisp.org>
9544
9545         * lib/sysexit_.h (EX_OK): New macro.
9546         Suggested by Martin Lambers <marlam@marlam.de>.
9547
9548 2006-01-09  Bruno Haible  <bruno@clisp.org>
9549
9550         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9551         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9552
9553 2006-01-09  Bruno Haible  <bruno@clisp.org>
9554
9555         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9556         numbers.
9557
9558 2006-01-09  Bruno Haible  <bruno@clisp.org>
9559
9560         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9561         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9562         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9563         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9564
9565 2006-01-09  Bruno Haible  <bruno@clisp.org>
9566
9567         * build-aux/javacomp.sh.in: New file, moved from lib/.
9568         * modules/javacomp-script (Files): Update.
9569         (configure.ac): Add AC_CONFIG_FILES invocation.
9570         (EXTRA_DIST): Remove variable.
9571
9572         * build-aux/javaexec.sh.in: New file, moved from lib/.
9573         * modules/javaexec (Files): Update.
9574         (configure.ac): Add AC_CONFIG_FILES invocation.
9575         (EXTRA_DIST): Remove javaexec.sh.in.
9576
9577         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9578         * modules/csharpcomp-script (Files): Update.
9579         (configure.ac): Add AC_CONFIG_FILES invocation.
9580         (EXTRA_DIST): Remove variable.
9581
9582         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9583         * modules/csharpexec (Files): Update.
9584         (configure.ac): Add AC_CONFIG_FILES invocation.
9585         (EXTRA_DIST): Remove csharpexec.sh.in.
9586
9587 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9588
9589         Sync from coreutils.
9590
9591         Add POSIX ACL support
9592         * lib/acl.h (copy_acl, set_acl): Add declarations.
9593         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9594         systems other than Linux.
9595         (chmod_or_fchmod): New function: use fchmod when possible,
9596         and chmod otherwise.
9597         (file_has_acl): Add a POSIX ACL implementation, with a
9598         Linux-specific subcase.
9599         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9600         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9601         acls are unsupported.
9602         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9603         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9604         are unsupported.
9605
9606 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9607
9608         Sync from coreutils.
9609         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9610
9611 2006-01-07  Bruno Haible  <bruno@clisp.org>
9612
9613         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9614         gl_EARLY.
9615
9616 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9617
9618         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9619         Problem reported for Mingw by Mark Junker.
9620
9621 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9622
9623         * README: Gnulib normally doesn't generate a tarball.
9624
9625 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9626
9627         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9628         long int, not int, for nanosecond counts, so that people who are
9629         used to POSIX struct timespec won't be surprised.  Reported by Jim
9630         Meyering.
9631
9632 2005-12-28  Bruno Haible  <bruno@clisp.org>
9633
9634         * build-aux/config.rpath: Update from GNU gettext.
9635
9636 2005-12-16  Jim Meyering  <jim@meyering.net>
9637
9638         * modules/fprintftime: New module.
9639         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9640
9641 2005-12-16  Jim Meyering  <jim@meyering.net>
9642
9643         * m4/fprintftime.m4: New file.
9644
9645 2005-12-16  Jim Meyering  <jim@meyering.net>
9646
9647         * lib/fprintftime.c, lib/fprintftime.h: New files.
9648
9649 2005-12-15  Simon Josefsson  <jas@extundo.com>
9650
9651         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9652         new m4/socklen.m4.
9653
9654 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9655
9656         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9657         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9658
9659 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9660
9661         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9662         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9663         struct uparams is valid. Fall back to the default values if it is
9664         not.
9665
9666 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9667
9668         * modules/argp (Files): Add argp-pin.c
9669         (Depends-on): dirname
9670         (lib_SOURCES): Add argp-pin.c
9671
9672 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9673
9674         * m4/argp.m4:  Check if program_invocation_name and
9675         program_invocation_short_name are declared and define appropriate
9676         macros if they are not.
9677
9678 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9679
9680         * lib/argp-help.c (__argp_base_name): New function
9681         (__argp_short_program_name): Rewrite using __argp_base_name
9682         * lib/argp-namefrob.h: Define program_invocation_name and
9683         program_invocation_short_name if requested
9684         (__argp_base_name): Add prototype
9685         * lib/argp-parse.c (argp_def): Use gettext wrappers
9686         (argp_default_parser): Use __argp_base_name
9687         * lib/argp-pin.c: New file. Defines program_invocation_name and
9688         program_invocation_short_name on systems that lack them.
9689
9690 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9691
9692         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9693         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9694         porting problem reported by Georg Schwarz in
9695         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9696
9697 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9698
9699         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9700         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9701         porting problem reported by Georg Schwarz in
9702         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9703
9704 2005-12-05  Bruno Haible  <bruno@clisp.org>
9705
9706         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9707         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9708         Reported by Mark Junker <mjscod@gmx.de>.
9709
9710 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9711
9712         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9713         Use implementation from Albert Chin, with some
9714         comments/corrections by Stepan Kasal and myself.
9715
9716 2005-12-02  Bruno Haible  <bruno@clisp.org>
9717
9718         * gnulib-tool (func_import): Accept GPLed build tool modules when
9719         --lgpl is given.
9720         * modules/csharpcomp-script: New file.
9721         * modules/csharpcomp: Depend on it.
9722         * modules/javacomp-script: New file.
9723         * modules/javacomp: Depend on it.
9724         Suggested by Simon Josefsson.
9725
9726 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9727
9728         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9729         statement, to work around an HP-UX 10.20 compiler bug reported by
9730         Peter O'Gorman.
9731
9732 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9733
9734         * modules/savedir (Depends-on): Add openat.
9735
9736 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9737
9738         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9739         (uintmax_t) [defined uintmax_t]: Do not declare.
9740         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9741         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9742         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9743         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9744         sake of portability to weird hosts that C allows (though we don't
9745         know of any practical examples).
9746
9747         * lib/savedir.h (fdsavedir): New decl.
9748         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9749         contains most of the former guts of savedir.
9750         (savedir): Use savedirstream.
9751         Include "openat.h".
9752
9753 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9754
9755         * modules/obstack (Files): Add m4/ulonglong.m4.
9756         Problem reported by Davide Angelocola.
9757
9758 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9759
9760         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9761         coreutils no longer futzes with rounding modes.
9762
9763 2005-11-14  Jim Meyering  <jim@meyering.net>
9764
9765         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9766         replacement of mkstemp.
9767
9768 2005-11-10  Simon Josefsson  <jas@extundo.com>
9769
9770         * lib/readline.c: Remove EOL.
9771
9772 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9773
9774         * modules/gethrxtime (Depends-on): Add gettime.
9775
9776 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9777
9778         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9779         or gettimeofday; no longer needed.
9780
9781 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9784         time business.
9785         (gethrxtime) [! (HAVE_NANOUPTIME
9786         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9787         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9788         our own approximation.
9789
9790 2005-11-08  Eric Blake  <ebb9@byu.net>
9791
9792         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9793
9794 2005-11-08  Eric Blake  <ebb9@byu.net>
9795
9796         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9797
9798 2005-11-04  Bruno Haible  <bruno@clisp.org>
9799
9800         * gnulib-tool: Implement --update mode.
9801
9802 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9803
9804         Fix porting problem reported by Theodoros V. Kalamatianos.
9805         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9806         Don't assume that futimes failing means we must fail.
9807
9808 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9809
9810         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9811         variables to suggest the intended function of the PATH_MAX check.
9812
9813 2005-10-30  Kean Johnston  <jkj@sco.com>
9814
9815         Trivial changes to support SCO systems.
9816         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9817         as PATH_MAX.
9818         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9819         where __ptr is null when no I/O is pending.
9820
9821 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9822
9823         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9824         leave errno alone.  Problem reported by Dmitry V. Levin.
9825
9826 2005-10-28  Simon Josefsson  <jas@extundo.com>
9827
9828         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9829         Test more.
9830
9831         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9832
9833         * modules/md2, modules/md2-tests: New files.
9834
9835 2005-10-28  Simon Josefsson  <jas@extundo.com>
9836
9837         * m4/inet_ntop.m4: More tests.
9838
9839         * m4/gc-md2.m4, md2.m4: New file.
9840
9841 2005-10-28  Simon Josefsson  <jas@extundo.com>
9842
9843         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9844         "restrict" keywords, as per POSIX.  Protect the function
9845         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9846         Don't use K&R prototypes.  Check the sprintf return values.
9847         Re-define EAFNOSUPPORT if not present.  Indent.
9848
9849         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9850         suggested by Bruno Haible <bruno@clisp.org>.
9851
9852         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9853
9854         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9855
9856         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9857         libgcrypt).
9858
9859         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9860
9861         * lib/md2.h, lib/md2.c: New files.
9862
9863 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9864
9865         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9866         errno alone.  Problem reported by Frederic Jolliton.
9867
9868 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9869
9870         * modules/verify (License): Change from GPL to LGPL.  This is a
9871         tiny module and there are apparently near-equivalents that are
9872         under the BSD license.
9873
9874 2005-10-24  Simon Josefsson  <jas@extundo.com>
9875
9876         * modules/sha1: Relicense to LGPL.
9877
9878 2005-10-24  Simon Josefsson  <jas@extundo.com>
9879
9880         * lib/md4.h: Shrink buffer size, now that we changed the type.
9881
9882 2005-10-23  Simon Josefsson  <jas@extundo.com>
9883
9884         * gnulib-tool (func_import): Fix --tests-base.
9885
9886 2005-10-22  Simon Josefsson  <jas@extundo.com>
9887
9888         * modules/arcfour (Depends-on): Need stdint.
9889
9890 2005-10-22  Simon Josefsson  <jas@extundo.com>
9891
9892         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9893         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9894
9895 2005-10-22  Simon Josefsson  <jas@extundo.com>
9896
9897         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9898         suggested by Bruno Haible <bruno@clisp.org>.
9899
9900 2005-10-22  Simon Josefsson  <jas@extundo.com>
9901
9902         * lib/crc.h: Include stddef.h, for size_t.
9903
9904 2005-10-22  Simon Josefsson  <jas@extundo.com>
9905
9906         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9907         arcfour_context struct (simplify test vector testing in GNU
9908         Shishi).
9909
9910 2005-10-21  Simon Josefsson  <jas@extundo.com>
9911
9912         * modules/des, modules/des-tests: New files.
9913
9914         * modules/gc-des, modules/gc-des-tests: New files.
9915
9916         * tests/test-des.c, tests/test-gc-des.c: New file.
9917
9918 2005-10-21  Simon Josefsson  <jas@extundo.com>
9919
9920         * modules/arctwo, modules/arctwo-tests: New files.
9921
9922         * tests/test-arctwo.c: New file.
9923
9924         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9925
9926         * tests/test-gc-arctwo.c: New file.
9927
9928 2005-10-21  Simon Josefsson  <jas@extundo.com>
9929
9930         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9931         Bruno Haible <bruno@clisp.org>.
9932
9933         * m4/gc-des.m4: New file.
9934
9935 2005-10-21  Simon Josefsson  <jas@extundo.com>
9936
9937         * m4/arctwo.m4: New file.
9938
9939         * m4/gc-arctwo.m4: New file.
9940
9941 2005-10-21  Simon Josefsson  <jas@extundo.com>
9942
9943         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9944         block.
9945
9946 2005-10-21  Simon Josefsson  <jas@extundo.com>
9947
9948         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9949         <bruno@clisp.org>.
9950
9951         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9952
9953         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9954         Bruno Haible <bruno@clisp.org>.
9955
9956         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9957         <bruno@clisp.org>.
9958
9959 2005-10-21  Simon Josefsson  <jas@extundo.com>
9960
9961         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9962
9963 2005-10-21  Simon Josefsson  <jas@extundo.com>
9964
9965         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9966
9967 2005-10-21  Simon Josefsson  <jas@extundo.com>
9968
9969         * lib/des.h, lib/des.c: New files.
9970
9971         * lib/gc-gnulib.c: Support DES.c
9972
9973 2005-10-21  Simon Josefsson  <jas@extundo.com>
9974
9975         * lib/arctwo.h, lib/arctwo.c: New files.
9976
9977         * lib/gc-gnulib.c: Support ARCTWO.
9978
9979 2005-10-21  Simon Josefsson  <jas@extundo.com>
9980
9981         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
9982         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9983
9984 2005-10-21  Simon Josefsson  <jas@extundo.com>
9985
9986         * gnulib-tool (func_import, func_create_testdir): Define automake
9987         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
9988         Makefile.am snippet),
9989         suggested by Bruno Haible <bruno@clisp.org>.
9990
9991         * modules/gc (Makefile.am): Use it.
9992
9993 2005-10-21  Bruno Haible  <bruno@clisp.org>
9994
9995         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
9996         patch.
9997
9998 2005-10-19  Simon Josefsson  <jas@extundo.com>
9999
10000         * tests/test-gc-rijndael.c: New file.
10001
10002         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10003
10004 2005-10-19  Simon Josefsson  <jas@extundo.com>
10005
10006         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10007         interface too.
10008
10009 2005-10-19  Simon Josefsson  <jas@extundo.com>
10010
10011         * tests/test-gc-arcfour.c: New file.
10012
10013         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10014
10015 2005-10-19  Simon Josefsson  <jas@extundo.com>
10016
10017         * modules/gc-md4, modules/gc-md4-tests: New file.
10018
10019         * tests/test-gc-md4.c: New file.
10020
10021 2005-10-19  Simon Josefsson  <jas@extundo.com>
10022
10023         * m4/gc-md4.m4: New file.
10024
10025 2005-10-19  Simon Josefsson  <jas@extundo.com>
10026
10027         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10028         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10029         <kasal@ucw.cz>.
10030
10031 2005-10-19  Simon Josefsson  <jas@extundo.com>
10032
10033         * m4/gc-arcfour.m4: New file.
10034
10035         * m4/gc-rijndael.m4: New file.
10036
10037 2005-10-19  Simon Josefsson  <jas@extundo.com>
10038
10039         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10040
10041 2005-10-19  Simon Josefsson  <jas@extundo.com>
10042
10043         * lib/gc-gnulib.c: Support ARCFOUR.
10044
10045 2005-10-19  Simon Josefsson  <jas@extundo.com>
10046
10047         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10048         support.
10049
10050         * lib/gc.h: Add ECB enum type.
10051
10052         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10053
10054 2005-10-18  Simon Josefsson  <jas@extundo.com>
10055
10056         * tests/test-md5.c: New file.
10057
10058         * modules/md5-tests: New file.
10059
10060 2005-10-18  Simon Josefsson  <jas@extundo.com>
10061
10062         * tests/test-md4.c: New file.
10063
10064         * modules/md4, modules/md4-tests: New files.
10065
10066 2005-10-18  Simon Josefsson  <jas@extundo.com>
10067
10068         * m4/md4.m4: New file.
10069
10070 2005-10-18  Simon Josefsson  <jas@extundo.com>
10071
10072         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10073
10074 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10075
10076         * gnulib-tool (func_create_testdir): Omit the second check whether
10077         BUILT_SOURCES in nonempty.
10078
10079 2005-10-17  Simon Josefsson  <jas@extundo.com>
10080
10081         * tests/test-rijndael.c: New file.
10082
10083 2005-10-17  Simon Josefsson  <jas@extundo.com>
10084
10085         * modules/sha1: Depend on stdint instead of md5.
10086
10087         * modules/md5: Depend on stdint, remove uint32_t.
10088
10089 2005-10-17  Simon Josefsson  <jas@extundo.com>
10090
10091         * modules/gc-sha1-tests: New file.
10092
10093         * tests/test-gc-sha1.c: New file.
10094
10095 2005-10-17  Simon Josefsson  <jas@extundo.com>
10096
10097         * m4/md5.m4: Remove call to uint32_t.m4.
10098
10099 2005-10-17  Simon Josefsson  <jas@extundo.com>
10100
10101         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10102
10103         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10104         md5.h.
10105
10106         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10107
10108         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10109
10110 2005-10-17  Simon Josefsson  <jas@extundo.com>
10111
10112         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10113
10114 2005-10-17  Simon Josefsson  <jas@extundo.com>
10115
10116         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10117
10118 2005-10-17  Simon Josefsson  <jas@extundo.com>
10119
10120         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10121
10122         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10123
10124 2005-10-17  Bruno Haible  <bruno@clisp.org>
10125
10126         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10127         that it can also be used in a test.
10128
10129 2005-10-16  Bruno Haible  <bruno@clisp.org>
10130
10131         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10132         TESTS_ENVIRONMENT, so that individual tests can augment it.
10133
10134         * gnulib-tool (func_create_testdir): Use an intermediate target for
10135         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10136         macros, like $(ALLOCA_H), which cannot be passed through the command
10137         line.
10138
10139 2005-10-15  Simon Josefsson  <jas@extundo.com>
10140
10141         * modules/rijndael-tests: New file.
10142
10143         * modules/rijndael: New file.
10144
10145 2005-10-15  Simon Josefsson  <jas@extundo.com>
10146
10147         * m4/rijndael.m4: New file.
10148
10149 2005-10-15  Simon Josefsson  <jas@extundo.com>
10150
10151         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10152
10153         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10154
10155 2005-10-14  Simon Josefsson  <jas@extundo.com>
10156
10157         * tests/test-arcfour.c: New file.
10158
10159         * modules/arcfour, modules/arcfour-tests: New files.
10160
10161 2005-10-14  Simon Josefsson  <jas@extundo.com>
10162
10163         * m4/arcfour.m4: New file.
10164
10165 2005-10-14  Simon Josefsson  <jas@extundo.com>
10166
10167         * lib/arcfour.h, lib/arcfour.c: New files.
10168
10169 2005-10-14  Roland McGrath  <roland@redhat.com>
10170
10171         Import from libc.  [BZ #1331]
10172         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10173         macro argument.
10174         Reported by Matej Vela <vela@debian.org>.
10175
10176 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10177
10178         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10179         include <wchar.h>; no longer needed.
10180
10181 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10182
10183         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10184
10185 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10186         and  Ulrich Drepper  <drepper@redhat.com>
10187
10188         Import from libc.
10189         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10190         instead of inline stream orientation test and two separate
10191         function calls.  Pay no attention to USE_IN_LIBIO.
10192
10193 2005-10-13  Simon Josefsson  <jas@extundo.com>
10194
10195         * modules/gc-hmac-md5-tests: New file.
10196
10197         * tests/test-gc-hmac-sha1.c: New file.
10198
10199         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10200
10201         * modules/gc-hmac-md5-tests: New file.
10202
10203         * tests/test-gc-md5.c: New file.
10204
10205         * modules/gc-md5-tests: New file.
10206
10207 2005-10-13  Simon Josefsson  <jas@extundo.com>
10208
10209         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10210         Move memory allocation outside of loop.
10211
10212 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10213
10214         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10215         intermediate directory is in a read-only file system.  Problem
10216         reported by Eric Blake.
10217
10218 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10219
10220         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10221
10222 2005-10-12  Simon Josefsson  <jas@extundo.com>
10223
10224         * tests/test-hmac-sha1.c: New file.
10225
10226         * modules/hmac-sha1-tests: New file.
10227
10228         * modules/hmac-sha1: New file.
10229
10230 2005-10-12  Simon Josefsson  <jas@extundo.com>
10231
10232         * modules/gc-sha1: New file.
10233
10234 2005-10-12  Simon Josefsson  <jas@extundo.com>
10235
10236         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10237
10238         * tests/test-gc-pbkdf2-sha1.c: New file.
10239
10240 2005-10-12  Simon Josefsson  <jas@extundo.com>
10241
10242         * modules/gc-md5, modules/gc-hmac-md5: New files.
10243
10244         * modules/gc (Files): Remove md5, memxor and hmac files.
10245
10246 2005-10-12  Simon Josefsson  <jas@extundo.com>
10247
10248         * m4/gc-pbkdf2-sha1.m4: New file.
10249
10250         * m4/gc-hmac-sha1.m4: New file.
10251
10252         * m4/gc-sha1: New file.
10253
10254         * m4/hmac-sha1.m4: New file.
10255
10256 2005-10-12  Simon Josefsson  <jas@extundo.com>
10257
10258         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10259
10260         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10261
10262 2005-10-12  Simon Josefsson  <jas@extundo.com>
10263
10264         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10265         suggested by Bruno Haible <bruno@clisp.org>.
10266
10267 2005-10-12  Simon Josefsson  <jas@extundo.com>
10268
10269         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10270
10271 2005-10-12  Simon Josefsson  <jas@extundo.com>
10272
10273         * lib/gc-pbkdf2-sha1.c: New file.
10274
10275         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10276
10277 2005-10-12  Simon Josefsson  <jas@extundo.com>
10278
10279         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10280
10281         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10282
10283 2005-10-12  Simon Josefsson  <jas@extundo.com>
10284
10285         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10286         GC_USE_HMAC_MD5, respectively.
10287
10288         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10289         (gc_md5): Fix typo.
10290
10291         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10292
10293         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10294
10295         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10296
10297 2005-10-12  Bruno Haible  <bruno@clisp.org>
10298
10299         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10300         Reported by Stepan Kasal <kasal@ucw.cz>.
10301
10302 2005-10-11  Simon Josefsson  <jas@extundo.com>
10303
10304         * tests/test-crc.c: New file.
10305
10306         * modules/crc, modules/crc-tests: New files.
10307
10308 2005-10-11  Simon Josefsson  <jas@extundo.com>
10309
10310         * m4/crc.m4: New file.
10311
10312 2005-10-11  Simon Josefsson  <jas@extundo.com>
10313
10314         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10315
10316         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10317
10318         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10319
10320 2005-10-11  Simon Josefsson  <jas@extundo.com>
10321
10322         * lib/crc.h, lib/crc.c: New files.
10323
10324         * lib/gc.h (gc_hash_buffer): Add doc.
10325
10326 2005-10-11  Bruno Haible  <bruno@clisp.org>
10327
10328         * modules/c-strcasestr: New file.
10329         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10330
10331 2005-10-11  Bruno Haible  <bruno@clisp.org>
10332
10333         * modules/c-strcase: New file.
10334         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10335
10336 2005-10-11  Bruno Haible  <bruno@clisp.org>
10337
10338         * lib/strcasecmp.c: Include limits.h.
10339         (strcasecmp): Avoid integer overflow on exotic platforms.
10340         * lib/strncasecmp.c: Include limits.h.
10341         (strncasecmp): Avoid integer overflow on exotic platforms.
10342         Reported by Paul Eggert.
10343
10344 2005-10-11  Bruno Haible  <bruno@clisp.org>
10345
10346         * lib/c-strcasestr.h: New file, from GNU gettext.
10347         * lib/c-strcasestr.c: New file, from GNU gettext.
10348
10349 2005-10-11  Bruno Haible  <bruno@clisp.org>
10350
10351         * lib/c-strcase.h: New file, from GNU gettext.
10352         * lib/c-strcasecmp.c: New file, from GNU gettext.
10353         * lib/c-strncasecmp.c: New file, from GNU gettext.
10354
10355 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10356
10357         * modules/mempcpy (License): GPL -> LGPL.
10358         * modules/strchrnul (License): Likewise.
10359         * modules/sysexits (License): Likewise.
10360
10361 2005-10-08  Simon Josefsson  <jas@extundo.com>
10362
10363         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10364
10365 2005-10-07  Simon Josefsson  <jas@extundo.com>
10366
10367         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10368
10369 2005-10-06  Simon Josefsson  <jas@extundo.com>
10370
10371         * tests/test-hmac-md5.c: New file.
10372
10373         * modules/hmac-md5-tests: New file.
10374
10375         * modules/hmac-md5: New file.
10376
10377 2005-10-06  Simon Josefsson  <jas@extundo.com>
10378
10379         * m4/hmac-md5.m4: New file.
10380
10381         * m4/memxor.m4: Require gl_C_RESTRICT.
10382
10383 2005-10-06  Simon Josefsson  <jas@extundo.com>
10384
10385         * lib/memxor.c (memxor): Avoid casts and warnings.
10386
10387 2005-10-06  Simon Josefsson  <jas@extundo.com>
10388
10389         * lib/hmac-md5.c: New file.
10390
10391         * lib/hmac.h: New file.
10392
10393 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10394
10395         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10396         promotes to int, not unsigned int, to catch the AIX 5.3
10397         compiler bug.
10398
10399 2005-10-05  Simon Josefsson  <jas@extundo.com>
10400
10401         * modules/memxor: New file.
10402
10403         * modules/iconv (Files): Move config.rpath to havelib, it is used
10404         there.
10405
10406         * modules/havelib (Files): Add config.rpath.
10407
10408 2005-10-05  Simon Josefsson  <jas@extundo.com>
10409
10410         * m4/memxor.m4: New file.
10411
10412 2005-10-05  Simon Josefsson  <jas@extundo.com>
10413
10414         * lib/memxor.c (memxor): Fix compiler error.
10415
10416         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10417         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10418
10419         * lib/memxor.h, lib/memxor.c: New files.
10420
10421         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10422         we assume all systems have it, suggested by Jim Meyering
10423         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10424         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10425         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10426         same reasons.
10427
10428 2005-10-05  Simon Josefsson  <jas@extundo.com>
10429
10430         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10431
10432 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10433
10434         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10435         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10436         needed, since the source code now assumes these .h files.
10437
10438 2005-10-05  Derek Price  <derek@ximbiot.com>
10439
10440         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10441
10442 2005-10-05  Bruno Haible  <bruno@clisp.org>
10443
10444         * modules/stdint (License): Change to LGPL.
10445
10446 2005-10-04  Simon Josefsson  <jas@extundo.com>
10447
10448         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10449         D. Baushke" <mdb@gnu.org>.
10450
10451 2005-10-04  Bruno Haible  <bruno@clisp.org>
10452
10453         * lib/verify.h (verify_true): Provide alternative definition for C++.
10454
10455 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10456
10457         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10458         (SSIZE_MAX): New macro, if not already defined.
10459         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10460         than 2 GiB.
10461
10462 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10463
10464         Sync from coreutils.
10465         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10466         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10467         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10468         ULLONG_MAX doesn't work with 2.7.2.1.
10469
10470 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10471
10472         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10473         From Ben Pfaff.
10474
10475         * modules/exclude (Depends-on): Depend on verify.
10476         * modules/strtoimax (Depends-on): Likewise.
10477         * modules/utimecmp (Depends-on): Likewise.
10478
10479 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10480
10481         * lib/exclude.c: Include verify.h.
10482         (verify): Remove.  All callers changed to use verify.h's version.
10483         * lib/strtoimax.c: Likewise.
10484         * lib/utimecmp.c: Likewis.e
10485
10486         Sync from coreutils.
10487         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10488         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10489         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10490         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10491         bother returning ENOSYS if settimeofday or stime fails; just let
10492         them return whatever errno they want to return.
10493         * lib/utimens.c: Include unistd.h, for dup2.
10494         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10495         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10496
10497 2005-10-02  Jim Meyering  <jim@meyering.net>
10498
10499         Sync from coreutils.
10500         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10501         from glibc-2.2.5 that fails for read-only files.
10502
10503 2005-10-02  Jim Meyering  <jim@meyering.net>
10504
10505         Sync from coreutils.
10506         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10507         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10508         `#if HAVE_CONFIG_H'.
10509         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10510         Remove AT_FDCWD test.
10511         Do not consume the fd unless successful.
10512         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10513         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10514         block, so that we don't even try to compile it if settimeofday is
10515         available.  This works around a compilation failure on OSF1 V5.1,
10516         due to stime requiring a `long int*' while tv_sec is `int'.
10517
10518 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10519
10520         Sync from coreutils.
10521         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10522         against `yes', rather than just testing for nonempty.
10523
10524 2005-10-01  Simon Josefsson  <jas@extundo.com>
10525
10526         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10527         and Darwin.
10528
10529         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10530         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10531         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10532         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10533         Check if struct addrinfo is declared.
10534
10535 2005-10-01  Simon Josefsson  <jas@extundo.com>
10536
10537         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10538         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10539         AI_* and EAI_* definitions.  Protect function declarations.
10540
10541 2005-10-01  Jim Meyering  <jim@meyering.net>
10542
10543         Sync from coreutils.
10544
10545         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10546         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10547         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10548         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10549         in the inet and nsl libraries.  Required on Solaris 5.7.
10550
10551 2005-10-01  Jim Meyering  <jim@meyering.net>
10552
10553         Sync from coreutils.
10554         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10555         in the inet and nsl libraries.  Required on Solaris 5.7.
10556
10557 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10558
10559         * lib/getdelim.c (getdelim): Remove unused variables.
10560
10561 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10562
10563         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10564         so that the code works even with ancient cpp.  Portability problem
10565         with GCC 2.7.2.1 reported by Thomas M.Ott.
10566
10567 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10568
10569         * modules/regex (Depends-on): Add strcase.
10570
10571         * modules/gethostname (Licence): Change from GPL to LGPL, since
10572         gethostname.c is a trivial implementation of a standard library
10573         function.
10574         * modules/poll (License): Change from GPL to LGPL, since it's
10575         derived from LGPL code.
10576
10577 2005-09-27  Jim Meyering  <jim@meyering.net>
10578
10579         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10580         HAVE_CONFIG_H.
10581
10582         * lib/intprops.h (signed_type_or_expr__): Define.
10583         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10584         for unsigned types.
10585
10586 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10587
10588         * lib/verify.h (verify_expr): Remove, replacing with:
10589         (verify_true): New macro that returns true instead of void.
10590         (verify_type__): Remove.
10591         (verify): Use verify_true rather than verify_type__.
10592
10593 2005-09-26  Bruno Haible  <bruno@clisp.org>
10594
10595         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10596         is necessary.
10597         (lib_SOURCES): Remove mbchar.c.
10598         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10599         (Files): Add m4/mbrtowc.m4.
10600         * modules/mbiter: Likewise.
10601         * modules/mbuiter: Likewise.
10602
10603 2005-09-26  Bruno Haible  <bruno@clisp.org>
10604
10605         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10606         compile mbchar.c if they are not both present.
10607         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10608         * m4/mbiter.m4 (gl_MBITER): Likewise.
10609         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10610         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10611         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10612
10613 2005-09-25  Jim Meyering  <jim@meyering.net>
10614
10615         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10616         also uses socklen_t.
10617
10618 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10619
10620         * lib/utimens.c (ENOSYS): Define if not already defined.
10621         (futimens): Support having a null PATH if the file descriptor
10622         is nonnegative.
10623
10624         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10625         Remove.
10626         (__attribute): Define to empty unless GCC 3.1 or later.
10627         This works around a core dump on OpenBSD 3.4, which has GCC
10628         2.95.3, which dumps core when given __attribute__(()).  It also
10629         simplifies other tests, since we really don't want to bother with
10630         worrying about which ancient version of GCC supported what.
10631         Original problem reported by Yoann Vandoorselaere, with part of
10632         the fix suggested by Derek Price.
10633
10634 2005-09-24  Jim Meyering  <jim@meyering.net>
10635
10636         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10637         so we can once again use a positive bitfield width of 1 -- now we
10638         don't have to explain why we were using a bitfield width of 2.
10639
10640 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10641
10642         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10643         and similarly for the other external symbols.  Problem reported
10644         by James Gallager.
10645
10646         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10647         bug reported by Jim Meyering.
10648
10649         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10650         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10651         not needed, since socklen is a prerequisite module.
10652
10653 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10654
10655         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10656         Problem reported by Eric Blake.
10657         (getaddrinfo): Initialize se so that it's not garbage.
10658         Redo internal storage allocation so that it doesn't make unportable
10659         assumptions about alignment.
10660         Fix a memory leak.
10661
10662         * lib/utimens.c (futimens): Use futimesat if available.
10663         Prefer it to futimes since it doesn't have the futimes bug.
10664
10665         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10666         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10667         Instead, declare a function that returns a pointer to an array,
10668         and use verify_type__ to declare the size of the array.
10669         Problem and germ of a solution reported by Bruno Haible.
10670         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10671         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10672
10673 2005-09-23  Jim Meyering  <jim@meyering.net>
10674
10675         Sync from coreutils.
10676         Correct build failure (socklen_t not defined) on at least
10677         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10678         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10679
10680 2005-09-23  Jim Meyering  <jim@meyering.net>
10681
10682         * modules/getaddrinfo (Depends-on): Add socklen.
10683
10684 2005-09-23  Bruno Haible  <bruno@clisp.org>
10685
10686         * tests/test-verify.c: New file.
10687
10688 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10689
10690         Sync from coreutils.
10691
10692         * modules/argmatch (Depends-on): Add verify.
10693         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10694         unistd-safer.
10695         * modules/save-cwd (Depends-on): Likewise.
10696
10697         * modules/openat (Files): Add lib/openat-die.c.
10698         (Depends-on): Remove error, exitfail.
10699         Add dirname.
10700
10701         * modules/verify: New file.
10702         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10703         with "verify" module.
10704
10705 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10706
10707         Sync from coreutils.
10708
10709         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10710         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10711         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10712         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10713         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10714         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10715         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10716         Don't bother checking for string.h, stdlib.h, unistd.h.
10717         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10718         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10719         module's job.
10720         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10721         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10722
10723         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10724         (gl_GETDATE): Use it.
10725
10726         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10727
10728 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10729
10730         Sync from coreutils.
10731
10732         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10733         stat-time.h.
10734         * lib/argmatch.h: Include verify.h
10735         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10736         (ARGMATCH_ASSERT): Remove; unused.
10737         * lib/canonicalize.c: Assume STDC_HEADERS.
10738         * lib/exclude.c: Include "strcase.h".
10739         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10740         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10741         and stdio-safer.h.
10742         (getusershell): Call fopen, not fopen_safer.
10743         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10744         Do not include unistd-safer.h.
10745         (save_cwd): Don't call fd_safer; no longer needed
10746         now that we include fcntl--.h.
10747
10748         * lib/getdate.y (relative_time): New type.
10749         (RELATIVE_TIME_0): New constant.
10750         (parser_control): Use relative_time instead of doing it ourselves.
10751         (%union): Add new relative_time rel member.
10752         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10753         Now typeless.
10754         (relunit, relunit_snumber): Now of type rel.
10755         (zone, rel, relunit, get_date): Adjust to above changes.
10756
10757         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10758         Do not include unistd-safer.h.
10759         (getloadavg): Don't call fd_safer; no longer needed
10760         now that we include fcntl--.h.
10761
10762         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10763         (make_dir_parents): Treat ENOSYS like EEXIST.
10764
10765         Improve quality of diagnostics on restore_cwd failure.
10766         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10767         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10768         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10769         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10770         each time through the loop.  Do not diagnose restore_cwd failure;
10771         that is the caller's job (and perhaps the caller does not care).
10772
10773         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10774         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10775         If the file already exists but is not a directory, don't bother
10776         to try to make its parents.
10777         Close potential file descriptor leak if we can't chdir("/") (!).
10778         Don't always return true if chdir($PWD) fails; return true only
10779         if the requested action was done successfully (except for the
10780         chdir($PWD)).
10781         Don't log final directory unless we actually made it.
10782         Refactor to avoid duplicate code to fix up permissions.
10783         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10784
10785         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10786         to make it a bit faster and (I hope) clearer.
10787         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10788         Fix bug in formats like %2N.
10789
10790         * lib/verify.h: New file.
10791
10792 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10793
10794         Sync from coreutils.
10795         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10796
10797 2005-09-22  Jim Meyering  <jim@meyering.net>
10798
10799         Sync from coreutils.
10800
10801         * m4/lstat.m4 (gl_FUNC_LSTAT):
10802         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10803         Remove obsolete comment.
10804         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10805         * m4/xstrtod.m4: Likewise.
10806
10807         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10808
10809 2005-09-22  Jim Meyering  <jim@meyering.net>
10810
10811         Sync from coreutils.
10812
10813         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10814
10815         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10816         the .tm_year member, since otherwise gcc-4.0 would now warn about
10817         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10818
10819         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10820         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10821
10822         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10823         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10824         when run in a time zone for which daylight savings time is in effect
10825         for the starting date.
10826
10827         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10828         stop us from restricting permissions of just-created absolute-named
10829         directories.
10830         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10831         to restore initial working directory.
10832         * lib/mkdir-p.c (make_dir_parents): New parameter:
10833         different_working_dir, to tell caller if/when we change the working
10834         directory and are unable to return to the initial one.
10835         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10836         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10837         `return false'.  This fixes a bug introduced on 2004-07-30.
10838
10839         * lib/openat.c (fdopendir): Be sure to close the supplied
10840         file descriptor before returning.  This makes our replacement
10841         implementation a little closer to Solaris's, where fdopendir
10842         ties the file descriptor to the returned DIR* pointer.
10843         * lib/openat.c (unlinkat): New function.
10844         * lib/openat.h (unlinkat): Add prototype.
10845         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10846         (openat_restore_fail): Rename from openat_restore_die.
10847         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10848
10849         Provide an alternative to exiting immediately upon save_cwd or
10850         restore_cwd failure.  Now, an application can arrange e.g.,
10851         to perform a longjump in that case.
10852         * lib/openat.c: Include dirname.h.
10853         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10854         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10855         and openat_restore_die rather than calling error directly.
10856         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10857
10858         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10859         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10860         define.
10861
10862         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10863         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10864                             int utc, int nanoseconds);
10865         Background:
10866         date should not have to allocate a megabyte of virtual memory to
10867         handle a format argument like +%1048575T.  When implemented with
10868         strftime, it must allocate such a buffer, use strftime to fill it
10869         in, print it, then free it.
10870         With fprintftime, it simply prints everything and exits.
10871         With no need for memory allocation, that's one fewer way to fail.
10872         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10873         optional field width, not before, so we accept %9:z, not %:9z.
10874         (my_strftime): Be sure to use L_('x') for literals.
10875
10876         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10877         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10878         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10879         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10880         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10881         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10882         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10883         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10884         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10885         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10886         * lib/xgethostname.c, lib/xreadlink.c:
10887         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10888
10889         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10890         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10891         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10892         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10893         and don't include <sys/file.h>).
10894
10895 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10896
10897         Sync from coreutils.
10898
10899         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10900         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10901         [!LDAV_DONE]: Avoid unused variable warning.
10902
10903 2005-09-21  Bruno Haible  <bruno@clisp.org>
10904
10905         * lib/unicodeio.h (unicode_to_mb): New declaration.
10906
10907 2005-09-20  Derek Price  <derek@ximbiot.com>
10908
10909         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10910         getaddrinfo.h.
10911
10912 2005-09-20  Bruno Haible  <bruno@clisp.org>
10913
10914         * gnulib-tool: Remove trailing slashes from the values specified for
10915         --source-base, --m4-base, --tests-base, --aux-dir.
10916         Suggested by Simon Josefsson <jas@extundo.com>.
10917
10918 2005-09-20  Bruno Haible  <bruno@clisp.org>
10919
10920         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10921         func_modules_to_filelist, func_import, func_create_testdir): Make all
10922         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10923         change when gnulib-tool is invoked in a different locale.
10924
10925 2005-09-19  Simon Josefsson  <jas@extundo.com>
10926
10927         * m4/socklen.m4: Fix typo.
10928
10929 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10930
10931         Use a consistent style for including <config.h>.
10932         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10933         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10934         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10935         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10936         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10937         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10938         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10939         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10940         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10941         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10942         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10943         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10944         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10945         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10946         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10947         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10948         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10949         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10950         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10951         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10952         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10953         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10954         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10955         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10956         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10957         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10958         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10959         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10960         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10961         lib/xstrtoumax.c, lib/yesno.c:
10962         Standardize inclusion of config.h.
10963         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10964         lib/inttostr.h:  Removed inclusion of config.h from header files.
10965         * lib/inttostr.c:  Adjusted in-tree users.
10966         * lib/timespec.h: Remove superfluous warning to include config.h.
10967         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10968         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10969         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10970         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10971         config.h with HAVE_CONFIG_H.
10972
10973 2005-09-19  Jim Meyering  <jim@meyering.net>
10974
10975         * modules/pathmax (License): Change to LGPL.
10976
10977 2005-09-19  Derek Price  <derek@ximbiot.com>
10978
10979         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
10980
10981 2005-09-19  Bruno Haible  <bruno@clisp.org>
10982
10983         * gnulib-tool (import): Provide default for --tests-base.
10984
10985 2005-09-19  Bruno Haible  <bruno@clisp.org>
10986
10987         * doc/quote.texi: New file, extracted from gnulib.texi.
10988         * doc/ctime.texi: New file, extracted from gnulib.texi.
10989         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
10990         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
10991         * doc/gnulib.texi: Include them.
10992
10993 2005-09-18  Bruno Haible  <bruno@clisp.org>
10994
10995         Portability fix.
10996         * gnulib-tool (func_readlink): New function.
10997         (func_ln_if_changed): Use it.
10998
10999 2005-09-18  Bruno Haible  <bruno@clisp.org>
11000
11001         * gnulib-tool: Support --with-tests also with --import.
11002         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11003         (func_import): Use variables $testsbase and $inctests. Emit a
11004         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11005         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11006         SUBDIRS += $testsdir.
11007         (func_create_testdir): Update.
11008
11009 2005-09-18  Bruno Haible  <bruno@clisp.org>
11010
11011         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11012         instead of $dry_run.
11013         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11014         (func_ln_if_changed): Don't handle dry-run here.
11015         (func_import): In dry-run mode, detect more precisely which actions
11016         would be performed, and don't use "...ing" verbs.
11017
11018 2005-09-18  Bruno Haible  <bruno@clisp.org>
11019
11020         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11021         (func_import): Use join on two temporary files instead of three nested
11022         loops, in order to determine which files are new or old.
11023
11024 2005-09-18  Bruno Haible  <bruno@clisp.org>
11025
11026         * gnulib-tool (func_import): Comment out code that spits out the
11027         new files with --dry-run.
11028
11029 2005-09-18  Bruno Haible  <bruno@clisp.org>
11030
11031         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11032
11033 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11034
11035         * lib/stat-time.h: New file.
11036         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11037         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11038         in a different way.
11039         (timespec_cmp): New function.
11040         * lib/utimecmp.c: Include stat-time.h.
11041         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11042         members exist, not on the obsolescent ST_MTIM_NSEC.
11043         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11044
11045 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11046
11047         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11048
11049 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11050
11051         * MODULES.html.sh (File system functions): Add stat-time.
11052         * modules/stat-time: New file.
11053         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11054         is now done in a different way, by the stat-time module.
11055         * modules/utimecmp (Depends-on): Add stat-time.
11056
11057 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11058
11059         * m4/st_mtim.m4: Remove.  Superseded by...
11060         * m4/stat-time.m4: New file.
11061         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11062         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11063
11064 2005-09-15  Derek Price  <derek@ximbiot.com>
11065
11066         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11067
11068 2005-09-15  Derek Price  <derek@ximbiot.com>
11069
11070         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11071         * lib/regex_internal.c: Ditto, using this...
11072         (__GNUC_PREREQ): ...new macro.
11073         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11074         using...
11075         (__GNUC_PREREQ): ...this new macro.
11076
11077         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11078
11079 2005-09-15  Derek Price  <derek@ximbiot.com>
11080             Paul Eggert  <eggert@cs.ucla.edu>
11081
11082         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11083         changes, consolidating in...
11084         * lib/regex_internal.h: ...this file.
11085
11086 2005-09-13  Jim Meyering  <jim@meyering.net>
11087
11088         * lib/canon-host.c: Filter through gnu indent and reword comments
11089         slightly.
11090         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11091
11092 2005-09-13  Derek Price  <derek@ximbiot.com>
11093
11094         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11095         failure.
11096         Reported by Jim Meyering  <jim@meyering.net>.
11097
11098 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11099
11100         * lib/base64.c: Typo.
11101         (base64_encode): Put b64str in initialized data section.
11102
11103 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11104
11105         Merge glibc and coreutils changes into gnulib, plus a few
11106         extra fixes.
11107         * lib/md5.c: Use #error rather than a string.
11108         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11109         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11110         (__attribute__): Define to empty for non recent-GCC.
11111         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11112         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11113         Renamed from their non-__ counterparts, with new macros replacing
11114         them if not _LIBC.  Add __THROW attribute.
11115         (rol): Remove.
11116         (struct md5_ctx): Align buffer if using GCC.
11117         * lib/sha1.h (struct sha1_ctx): Likewise.
11118         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11119         The old name was backwards.
11120         (NOTSWAP): Remove; not used.
11121         (rol): New macro, moved here from md5.h.
11122         (sha1_process_block): Remove a FIXME that doesn't make sense.
11123
11124 2005-09-12  Derek Price  <derek@ximbiot.com>
11125
11126         Return usable errors from canon-host.
11127         * lib/canon-host.h: New file.
11128         * lib/canon-host.c (canon_host): Wrap...
11129         (canon_host_r): ...this new function, which now relies exclusively on
11130         getaddrinfo.
11131         (ch_strerror): New function.
11132         (last_cherror): New global.
11133         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11134         interface.
11135         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11136         void *.
11137         (freeaddrinfo): Free ai->ai_canonname when set.
11138
11139 2005-09-12  Derek Price  <derek@ximbiot.com>
11140
11141         Make canon-host require getaddrinfo.
11142         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11143         AC_LIBSOURCE canon-host.h.  Call...
11144         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11145         gl_GETADDRINFO.
11146         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11147
11148 2005-09-12  Derek Price  <derek@ximbiot.com>
11149
11150         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11151         LGPL.
11152         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11153
11154 2005-09-12  Derek Price  <derek@ximbiot.com>
11155
11156         * lib/gai_strerror.c: Include config.h when available.  Include
11157         getaddrinfo.h before other headers to test interface.
11158         Reported by Larry Jones <lawrence.jones@ugs.com>.
11159
11160 2005-09-12  Derek Price  <derek@ximbiot.com>
11161             Paul Eggert  <eggert@cs.ucla.edu>
11162
11163         * modules/glob (Files): Add glob-libc.h.
11164
11165 2005-09-12  Derek Price  <derek@ximbiot.com>
11166             Paul Eggert  <eggert@cs.ucla.edu>
11167
11168         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11169         glob_.h, glob-libc.h.
11170         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11171
11172 2005-09-12  Derek Price  <derek@ximbiot.com>
11173             Paul Eggert  <eggert@cs.ucla.edu>
11174
11175         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11176         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11177         protecting things that should be done only in gnulib contexts.
11178         * lib/glob_.h: New file, containing only the glob things needed for
11179         gnulib.
11180         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11181         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11182         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11183         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11184         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11185         and to respect the namespace rules better.
11186
11187 2005-09-08  Simon Josefsson  <jas@extundo.com>
11188
11189         * modules/socklen: New file.
11190
11191 2005-09-08  Simon Josefsson  <jas@extundo.com>
11192
11193         * m4/socklen.m4: New file.
11194
11195 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11196
11197         * modules/utimens (Files): Add m4/utimbuf.m4, since
11198         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11199         Reported by Sergey Poznyakoff.
11200
11201 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11202
11203         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11204         definitions, since that's the preferred style in glibc.
11205         Fix a minor spacing issue, and update copyright notice to match
11206         glibc's.
11207
11208 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11209
11210         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11211
11212 2005-09-06  Simon Josefsson  <jas@extundo.com>
11213
11214         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11215         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11216
11217 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11218
11219         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11220         warning.
11221
11222 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11223
11224         * config/srclist.txt: Add glibc bug 1302.
11225
11226 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11227
11228         Change bitset word type from unsigned int to unsigned long int,
11229         as this has better performance on typical 64-bit hosts.
11230         Port bitset code to hosts with unusual word sizes.
11231         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11232         (build_collating_symbol):
11233         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11234         argument is a bitset.  This is merely a style issue, but it makes
11235         it clearer that an entire array is expected.
11236         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11237         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11238         Port to the case where bitset_word is not the same as unsigned int.
11239         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11240         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11241         Likewise.
11242         * lib/regexec.c (check_dst_limits_calc_pos_1,
11243         check_subexp_matching_top):
11244         (build_trtable, group_nodes_into_DFAstates):
11245         Likewise.
11246         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11247         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11248         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11249         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11250         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11251         * lib/regcomp.c (optimize_subexps, lower_subexp):
11252         Work even if bitset_word has holes in its bitwise representation.
11253         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11254         * lib/regexec.c (check_dst_limits_calc_pos_1,
11255         check_subexp_matching_top):
11256         Likewise.
11257         * lib/regex_internal.c (re_string_reconstruct):
11258         Don't assume UCHAR_MAX == 255.
11259         * lib/regex_internal.h (bitset_set_all): Likewise.
11260         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11261         All uses changed.
11262         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11263         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11264         All uses changed.
11265         (BITSET_WORD_MAX): New macro.
11266         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11267         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11268         (bitset_empty, bitset_copy):
11269         Prefer sizeof (bitset) to multiplying it out ourselves.
11270         (bitset_not_merge): Remove; unused.
11271         (bitset_contain): Return bool, not unsigned int with one bit on.
11272         All callers changed.
11273         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11274         alignment than re_node_set; do this by defining a new internal
11275         type struct dests_alloc and using it to allocate memory.
11276
11277 2005-09-05  Bruno Haible  <bruno@clisp.org>
11278
11279         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11280         links.
11281
11282 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11283
11284         * modules/size_max (Makefile.am): Add size_max.h
11285
11286 2005-09-04  Derek Price  <derek@ximbiot.com>
11287
11288         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11289
11290 2005-09-03  Simon Josefsson  <jas@extundo.com>
11291
11292         * gnulib-tool: Fix typo.
11293
11294 2005-09-03  Simon Josefsson  <jas@extundo.com>
11295
11296         * config/srclist.txt: Add glibc bug 1293.
11297
11298 2005-09-03  Derek Price  <derek@ximbiot.com>
11299
11300         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11301         From Larry Jones <lawrence.jones@ugs.com>.
11302
11303 2005-09-02  Simon Josefsson  <jas@extundo.com>
11304
11305         * modules/socklen: New file.
11306
11307 2005-09-02  Simon Josefsson  <jas@extundo.com>
11308
11309         * modules/havelib: New module.
11310
11311         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11312         Use havelib.
11313
11314 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         Check for arithmetic overflow when calculating sizes, to prevent
11317         some buffer-overflow issues.  These patches are conservative, in the
11318         sense that when I couldn't determine whether an overflow was possible,
11319         I inserted a run-time check.
11320         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11321         macros.
11322         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11323         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11324         (re_xnrealloc, re_x2nrealloc): New inline functions.
11325         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11326         parse_bracket_exp):
11327         (build_equiv_class, build_charclass): Check for arithmetic overflow
11328         in size expression calculations.
11329         * lib/regex_internal.c (re_string_realloc_buffers):
11330         (build_wcs_upper_buffer, re_node_set_add_intersect):
11331         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11332         (re_dfa_add_node, register_state): Likewise.
11333         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11334         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11335         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11336         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11337
11338 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11339
11340         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11341         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11342
11343 2005-09-02  Bruno Haible  <bruno@clisp.org>
11344
11345         Support for lib vs. lib64 distinction on biarch platforms.
11346         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11347         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11348         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11349
11350 2005-09-02  Bruno Haible  <bruno@clisp.org>
11351
11352         * gnulib-tool (import): In the other first-use case, provide defaults
11353         as well.
11354
11355 2005-09-02  Bruno Haible  <bruno@clisp.org>
11356
11357         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11358         patches not yet found in the latest gettext release.
11359
11360 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11361
11362         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11363         to avoid a collision with bits/local_lim.h in glibc.
11364         All uses changed.  Problem reported by Dmitry V. Levin in
11365         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11366
11367         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11368         bugs in int versus size_t comparisons.
11369         (re_string_context_at): Fix bug where the code assumed that
11370         Idx is signed.
11371
11372         Use bool where appropriate.
11373         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11374         All callers changed.
11375         (calc_eclosure_iter): Likewise, for ROOT arg.
11376         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11377         (build_charclass_op): Likewise, for NON_MATCH arg.
11378         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11379         (re_string_construct_common): Likewise, for ICASE arg.
11380         * lib/regexec.c (re_search_2_stub, re_search_stub):
11381         Likewise, for RET_LEN arg.
11382         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11383         (set_regs): Likewise, for FL_BACKTRACK arg.
11384         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11385         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11386         (calc_eclosure_iter, parse_bracket_exp):
11387         Use bool for internal variables that are booleans.
11388         * lib/regexec.c (re_search_internal, check_matching,
11389         proceed_next_node):
11390         (set_regs, build_sifted_states, sift_states_bkref):
11391         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11392         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11393         (find_collation_sequence_value):
11394         Likewise.
11395         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11396         (re_node_set_compare):
11397         Return bool, not int. All callers changed.
11398         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11399         (build_trtable, check_node_accept): Likewise.
11400         * lib/regex_internal.h: Include stdbool.h.
11401
11402         Fix bugs uncovered when converting to bool.
11403         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11404         failure instead of charging ahead blindly.
11405         * lib/regex_internal.c (register_state): Likewise.
11406         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11407         for freeing internal storage.
11408         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11409         bitset pieces used as boolean, to avoid undefined behavior
11410         on hosts that do int overflow checking.
11411
11412 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11413
11414         * config/srclist.txt: Add glibc bugs 1285-1287.
11415
11416 2005-09-01  Jim Meyering  <jim@meyering.net>
11417
11418         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11419         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11420         Require gl_STAT_MACROS, too.
11421
11422 2005-09-01  Bruno Haible  <bruno@clisp.org>
11423
11424         * gnulib-tool (import): In the first-use case, provide defaults.
11425
11426 2005-09-01  Bruno Haible  <bruno@clisp.org>
11427
11428         * gnulib-tool (func_import): Remove the .tmp files.
11429
11430 2005-09-01  Bruno Haible  <bruno@clisp.org>
11431
11432         * gnulib-tool (func_import): Fix handling of symbolic links.
11433
11434 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11435
11436         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11437         old glibc regex code mishandles strings longer than 2**31 bytes.
11438         This patch fixes this when the regex code is used in gnulib
11439         (i.e., outside glibc).
11440
11441         This patch should not affect the use of the regex code inside
11442         glibc.  No doubt this problem also needs to be handled for glibc
11443         as well, but the result will be an incompatible change to the
11444         glibc ABI, and the old ABI will have to be supported too.  That
11445         can be the the subject for another patch.
11446
11447         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11448         governing whether the rest of this patch is active.  By default,
11449         the macro is disabled and the patch has no effect.
11450         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11451         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11452         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11453         (re_match_2, re_set_registers): Use the new types.
11454         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11455         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11456         New macros.
11457         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11458         (re_string_context_at, bin_tree_t, re_dfastate_t):
11459         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11460         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11461         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11462         (re_string_char_size_at, re_string_wchar_at):
11463         (re_string_elem_size_at):
11464         Use the new types and macros to port to 64-bit hosts.
11465         Use unsigned types for internal values, so that the code
11466         mostly works even for arrays larger than SSIZE_MAX.
11467         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11468         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11469         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11470         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11471         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11472         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11473         (calc_inveclosure, parse_dup_op, build_range_exp):
11474         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11475         (fetch_number, create_token_tree, mark_opt_subexp):
11476         Likewise.
11477         * lib/regex_internal.c (re_string_construct_common,
11478         create_ci_newstate):
11479         (create_cd_newstate, re_string_allocate, re_string_construct):
11480         (re_string_realloc_buffers, build_wcs_upper_buffer):
11481         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11482         (re_string_reconstruct, re_string_peek_byte_case):
11483         (re_string_fetch_byte_case, re_string_context_at):
11484         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11485         (re_node_set_init_copy, re_node_set_add_intersect):
11486         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11487         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11488         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11489         (re_acquire_state, re_acquire_state_context, register_state):
11490         Likewise.
11491         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11492         search_cur_bkref_entry):
11493         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11494         (re_search_internal, re_search_2_stub, re_search_stub)
11495         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11496         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11497         (update_cur_sifted_state, check_dst_limits):
11498         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11499         (check_subexp_limits, sift_states_bkref, merge_state_array):
11500         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11501         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11502         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11503         (expand_bkref_cache, check_node_accept_bytes):
11504         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11505         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11506         (acquire_init_state_context, check_halt_node_context):
11507         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11508         (sift_states_backward, clean_state_log_if_needed):
11509         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11510         (find_recover_state, transit_state_sb, transit_state_mb):
11511         (transit_state_bkref, build_trtable, match_ctx_clean):
11512         Likewise.
11513         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11514         to work around an assumption that REG_MISSING is negative.
11515
11516         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11517         (seek_collating_symbol_entry) [defined _LIBC]:
11518         (lookup_collation_sequence_value) [defined _LIBC]:
11519         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11520         Use prototypes rather than old-style function definitions.
11521         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11522         (transit_state_sb) [0]:
11523         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11524
11525         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11526         rm_eo.
11527
11528         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11529         (optimize_subexps, lower_subexp):
11530         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11531         since the signed shift might overflow.  Use 1u<<31 instead.
11532         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11533         Likewise.
11534         * lib/regexec.c (check_dst_limits_calc_pos_1,
11535         check_subexp_matching_top): Likewise.
11536
11537         * lib/regcomp.c (optimize_subexps, lower_subexp):
11538         Use CHAR_BIT rather than 8, for clarity.
11539         * lib/regexec.c (check_dst_limits_calc_pos_1):
11540         (check_subexp_matching_top): Likewise.
11541         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11542         have to worry about portability issues when shifting it left.
11543         Remove no-longer-needed test for table_size > 0.
11544         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11545         in a word, as the resulting behavior is undefined.
11546         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11547         in one case, a <= should have been an <, and in another case the
11548         whole test was missing.
11549         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11550         the standard name CHAR_BIT.
11551         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11552         this is not true on one's complement and signed-magnitude hosts.
11553
11554         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11555         next_last_offset.
11556         (struct re_dfa_t): Remove unused member states_alloc.
11557         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11558
11559 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11560
11561         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11562         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11563         and large-file glibc and in 32-bit large-file Solaris.
11564
11565 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11566
11567         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11568         lengths fit in regoff_t; this isn't true if regoff_t is the same
11569         width as size_t.
11570         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11571         (= START + RANGE) instead of RANGE.  This avoids overflow
11572         problems when regoff_t is the same width as size_t.
11573         All callers changed.
11574         (re_search_2_stub): Check for overflow when adding the
11575         sizes of the two strings.
11576         (re_search_stub): Check for overflow when adding START
11577         to RANGE; if it occurs, substitute the extreme value.
11578
11579 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11580
11581         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11582
11583 2005-08-31  Jim Meyering  <jim@meyering.net>
11584
11585         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11586         a pointer-to-const.
11587         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11588         (register_state): Likewise.
11589         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11590         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11591         (group_nodes_into_DFAstates): Likewise.
11592
11593 2005-08-31  Jim Meyering  <jim@meyering.net>
11594
11595         * check-module: Add a FIXME comment.
11596
11597 2005-08-31  Eric Blake  <ebb9@byu.net>
11598
11599         * modules/unistd-safer (Files): Add unistd--.h.
11600         * modules/stdio-safer (Files): Add stdio--.h.
11601
11602 2005-08-31  Derek Price  <derek@ximbiot.com>
11603
11604         * lib/getdelim.c (getdelim): Return EOF on EOF.
11605         Reported by Larry Jones <lawrence.jones@ugs.com>.
11606
11607 2005-08-31  Bruno Haible  <bruno@clisp.org>
11608
11609         Avoid unnecessary diffs in the generated lib/Makefile.am.
11610         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11611         the generated files.
11612         (func_import): Don't set cmd.
11613
11614 2005-08-31  Bruno Haible  <bruno@clisp.org>
11615
11616         * lib/strstr.c: Include <stddef.h>, for NULL.
11617         * lib/strcasestr.c: Likewise.
11618         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11619
11620 2005-08-31  Bruno Haible  <bruno@clisp.org>
11621
11622         * gnulib-tool: New option --macro-prefix.
11623         (func_import): Use macro_prefix.
11624         (import): Handle option --macro-prefix.
11625
11626 2005-08-31  Bruno Haible  <bruno@clisp.org>
11627
11628         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11629         Also use new variables cached_lgpl, cached_libtool.
11630
11631 2005-08-31  Bruno Haible  <bruno@clisp.org>
11632
11633         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11634         always instantiating them.
11635
11636 2005-08-31  Bruno Haible  <bruno@clisp.org>
11637
11638         * gnulib-tool (func_import): Read the previous cached settings
11639         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11640         earlier added by gnulib but are now dropped. Warn when a gnulib file
11641         overwrites a non-gnulib file.
11642
11643 2005-08-31  Bruno Haible  <bruno@clisp.org>
11644
11645         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11646         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11647         projects that don't keep autogenerated files in CVS. Put into
11648         actioncmd only the specified modules, not the transitive closure.
11649
11650 2005-08-31  Bruno Haible  <bruno@clisp.org>
11651
11652         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11653         Create directories that shall be filled.
11654         (import): Don't look for gl_* macros in configure.ac. Recurse across
11655         all directories containing a gnulib-cache.m4 files, if meaningful.
11656
11657 2005-08-31  Bruno Haible  <bruno@clisp.org>
11658
11659         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11660         (import): Set seen_libtool when we see gl_LIBTOOL.
11661
11662 2005-08-31  Bruno Haible  <bruno@clisp.org>
11663
11664         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11665         declaration macro definitions from generated gnulib.m4.
11666
11667 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11668
11669         * lib/iconvme.h: Add prototype for iconv_alloc.
11670
11671 2005-08-29  Simon Josefsson  <jas@extundo.com>
11672
11673         * lib/iconvme.c: Fix errno.
11674
11675 2005-08-29  Bruno Haible  <bruno@clisp.org>
11676
11677         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11678         that it works when the directory contains spaces.
11679
11680 2005-08-29  Bruno Haible  <bruno@clisp.org>
11681
11682         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11683
11684 2005-08-29  Bruno Haible  <bruno@clisp.org>
11685
11686         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11687         Emit more advice.
11688
11689 2005-08-29  Bruno Haible  <bruno@clisp.org>
11690         and Stepan Kasal  <kasal@ucw.cz>
11691
11692         * check-module: If more parameters are given, check each of them
11693         separately; add more exceptions, as noted by Jim Meyering.
11694         (check_module): New procedure.
11695         (%exempt_header): Now contains all exceptions.
11696
11697 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11698
11699         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11700
11701 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11702
11703         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11704
11705 2005-08-28  Bruno Haible  <bruno@clisp.org>
11706
11707         * m4/gnulib-tool.m4: New file.
11708
11709 2005-08-27  Jim Meyering  <jim@meyering.net>
11710
11711         * modules/unistd-safer (Files): Add pipe-safer.c.
11712         * modules/fcntl-safer (Files): Add creat-safer.c.
11713
11714 2005-08-27  Jim Meyering  <jim@meyering.net>
11715
11716         * m4/stdlib-safer.m4: New file.  From coreutils.
11717         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11718         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11719         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11720         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11721         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11722
11723 2005-08-27  Jim Meyering  <jim@meyering.net>
11724
11725         * lib/fopen-safer.c: Merge minor changes from coreutils.
11726         * lib/dup-safer.c: Likewise.
11727         * lib/fd-safer.c: Likewise.
11728
11729         Merge from coreutils.
11730         * lib/stdio--.h: New file.
11731         * lib/stdlib--.h: New file.
11732         * lib/mkstemp-safer.c: New file.
11733
11734         GNU tar needs these.
11735         * lib/pipe-safer.c: New file.
11736         * lib/creat-safer.c: New file.
11737         * lib/fcntl--.h (creat): Define to creat_safer.
11738         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11739         * lib/unistd--.h (pipe): Define to pipe_safer.
11740         * lib/unistd-safer.h: Declare pipe_safer.
11741
11742 2005-08-26  Simon Josefsson  <jas@extundo.com>
11743
11744         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11745         Haible <bruno@clisp.org>.
11746
11747 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11748
11749         * lib/regex_internal.h: Remove all references to
11750         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11751         or better.
11752         (bitset_not, bitset_merge, bitset_not_merge):
11753         (bitset_mask, re_string_allocate, re_string_construct):
11754         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11755         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11756         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11757         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11758         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11759         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11760         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11761         (re_acquire_state_context):
11762         Remove unnecessary forward decls.
11763         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11764         Put __attribute at function definition,
11765         now that the function decl has been removed.
11766         * lib/regex_internal.c (re_string_peek_byte_case):
11767         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11768         Likewise.
11769
11770 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11771
11772         * m4/regex.m4: Add AC_PREREQ(2.50).
11773         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11774
11775 2005-08-25  Simon Josefsson  <jas@extundo.com>
11776
11777         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11778         __fsetlocking.
11779
11780 2005-08-25  Simon Josefsson  <jas@extundo.com>
11781
11782         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11783         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11784         GLIBC specific code.
11785
11786 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11787
11788         Make regex safe for g++.  This fixes one real bug (an "err"
11789         that should have been "*err").  g++ problem reported by
11790         Sam Steingold.
11791         * lib/regex_internal.h (re_calloc): New macro, consistent with
11792         re_malloc etc.  All callers of calloc changed to use re_calloc.
11793         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11794         not int.  All callers changed.
11795         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11796         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11797         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11798         (find_recover_state): Change "err" to "*err"; this fixes what
11799         appears to be a real bug.
11800         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11801         versus int.
11802
11803 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11804
11805         * modules/regex (Depends-on): Add malloc, since the code
11806         assumes that !malloc(0) means failure.
11807
11808 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11809
11810         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11811
11812         alloca modernization/simplification for regex.
11813         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11814         needs to be at the start of the file, and can be moved into
11815         regex_internal.h and simplified.
11816         * lib/regex_internal.h: Include <alloca.h>.
11817         (__libc_use_alloca) [!defined _LIBC]: New macro.
11818         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11819         now works outside glibc.
11820
11821 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11822
11823         * config/srclist.txt: Add glibc bugs 1241, 1245.
11824
11825 2005-08-25  Jim Meyering  <jim@meyering.net>
11826
11827         * lib/open-safer.c: Include <config.h>.
11828         Otherwise, we'd lose LARGEFILE support in any file using
11829         e.g. "fcntl--.h"
11830
11831 2005-08-25  Bruno Haible  <bruno@clisp.org>
11832
11833         * m4/minmax.m4: Require autoconf 2.52.
11834         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11835         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11836         alternatives of translit over the alphabet.
11837         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11838
11839 2005-08-24  Simon Josefsson  <jas@extundo.com>
11840
11841         * tests/test-getpass.c: New file.
11842
11843 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11844
11845         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11846         for GNU regex features.
11847
11848 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11849
11850         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11851         * lib/regex.h (regerror): Likewise.
11852
11853         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11854         requires this.  (The code never needed it.)
11855
11856         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11857         All uses of recently-renamed identifiers changed to use the new,
11858         POSIX-compliant names.  The code will build and run just fine
11859         without these changes, but it's better to eat our own dog food
11860         and use the standard-conforming names.
11861
11862         * lib/regex.h: Fix a multitude of POSIX name space violations.
11863         These changes have an effect only for programs that define
11864         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11865         do not change anything for programs compiled in the normal way.
11866         Also, there is no effect on the ABI.
11867
11868         (_REGEX_SOURCE): New macro.
11869         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11870         defined and _GNU_SOURCE is not; this fixes a name space violation.
11871
11872         Rename the following macros to obey POSIX requirements.
11873         The old names are still visible as macros if _REGEX_SOURCE is defined.
11874         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11875         RE_BACKSLASH_ESCAPE_IN_LISTS.
11876         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11877         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11878         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11879         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11880         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11881         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11882         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11883         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11884         (REG_INTERVALS): renamed from RE_INTERVALS.
11885         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11886         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11887         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11888         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11889         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11890         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11891         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11892         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11893         RE_UNMATCHED_RIGHT_PAREN_ORD.
11894         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11895         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11896         (REG_DEBUG): renamed from RE_DEBUG.
11897         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11898         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11899         unusual, since we can't clash with the POSIX REG_ICASE.
11900         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11901         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11902         (REG_NO_SUB): renamed from RE_NO_SUB.
11903         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11904         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11905         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11906         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11907         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11908         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11909         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11910         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11911         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11912         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11913         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11914         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11915         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11916         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11917         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11918         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11919         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11920         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11921         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11922         (REG_FIXED): Renamed from REGS_FIXED.
11923         (REG_NREGS): Renamed from RE_NREGS.
11924
11925         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11926         of other REG_* macros, since POSIX says the user is allowed to
11927         #undef these macros selectively.
11928
11929         (reg_errcode_t): Update comment stating what other tables need
11930         to be consistent.
11931
11932         Rename the following enum values to obey POSIX requirements.
11933         The old names are still visible as macros.
11934         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11935         is not defined, since GNU is supposed to be a superset of POSIX as
11936         much as possible, and since we want reg_errcode_t to be a signed
11937         type for implementation consistency.
11938         (_REG_NOERROR): Renamed from REG_NOERROR.
11939         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11940         (_REG_BADPAT): Renamed from REG_BADPAT.
11941         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11942         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11943         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11944         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11945         (_REG_EBRACK): Renamed from REG_EBRACK.
11946         (_REG_EPAREN): Renamed from REG_EPAREN.
11947         (_REG_EBRACE): Renamed from REG_EBRACE.
11948         (_REG_BADBR): Renamed from REG_BADBR.
11949         (_REG_ERANGE): Renamed from REG_ERANGE.
11950         (_REG_ESPACE): Renamed from REG_ESPACE.
11951         (_REG_BADRPT): Renamed from REG_BADRPT.
11952         (_REG_EEND): Renamed from REG_EEND.
11953         (_REG_ESIZE): Renamed from REG_ESIZE.
11954         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11955         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11956         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11957         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11958         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11959
11960         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11961         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11962         changed.  But support the old name if the new one is not defined
11963         and if _REGEX_SOURCE.
11964
11965         Change the following member names in struct re_pattern_buffer.
11966         The old names are still supported if !_REGEX_SOURCE.
11967         The new names are always supported, regardless of _REGEX_SOURCE.
11968         (re_buffer): Renamed from buffer.
11969         (re_allocated): Renamed from allocated.
11970         (re_used): Renamed from used.
11971         (re_syntax): Renamed from syntax.
11972         (re_fastmap): Renamed from fastmap.
11973         (re_translate): Renamed from translate.
11974         (re_can_be_null): Renamed from can_be_null.
11975         (re_regs_allocated): Renamed from regs_allocated.
11976         (re_fastmap_accurate): Renamed from fastmap_accurate.
11977         (re_no_sub): Renamed from no_sub.
11978         (re_not_bol): Renamed from not_bol.
11979         (re_not_eol): Renamed from not_eol.
11980         (re_newline_anchor): Renamed from newline_anchor.
11981
11982         Change the following member names in struct re_registers.
11983         The old names are still supported if !_REGEX_SOURCE.
11984         The new names are always supported, regardless of _REGEX_SOURCE.
11985         (rm_num_regs): Renamed from num_regs.
11986         (rm_start): Renamed from start.
11987         (rm_end): Renamed from end.
11988
11989         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
11990         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
11991         Prepend __ to parameter names.
11992
11993         Undo yesterday's changes.
11994
11995 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11996
11997         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
11998         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
11999         lib/regex.c.
12000
12001 2005-08-24  Jim Meyering  <jim@meyering.net>
12002
12003         Sync from coreutils.
12004         * m4/fcntl-safer.m4: New file.
12005
12006         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12007         and object files for this module.
12008
12009 2005-08-24  Jim Meyering  <jim@meyering.net>
12010
12011         Sync from coreutils.
12012         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12013
12014 2005-08-24  Jim Meyering  <jim@meyering.net>
12015
12016         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12017         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12018
12019 2005-08-24  Jim Meyering  <jim@meyering.net>
12020
12021         * modules/fcntl-safer: New module.
12022         * modules/fts (Depends-on): Add fcntl-safer.
12023         * MODULES.html.sh (File descriptor based Input/Output):
12024         Add fcntl-safer.
12025
12026 2005-08-24  Bruno Haible  <bruno@clisp.org>
12027
12028         Support for unit test modules.
12029         * modules/README: Mention tests modules.
12030         * modules/TEMPLATE-TESTS: New file.
12031         * gnulib-tool: New options --extract-tests-module, --with-tests and
12032         --tests-base (unused for the moment).
12033         (testsbase, inctests): New variables.
12034         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12035         (func_verify_module): Exclude TEMPLATE-TESTS.
12036         (func_verify_nontests_module, func_verify_tests_module): New functions.
12037         (func_get_dependencies): Add implicit dependency for tests modules.
12038         (func_get_tests_module): New function.
12039         (func_modules_transitive_closure): When --with-tests was specified,
12040         include the unit tests as well, unless explicitly avoided.
12041         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12042         (func_emit_tests_Makefile_am): New function.
12043         (func_create_testdir): When --with-tests was specified, emit a
12044         tests/ directory.
12045         * MODULES.html.sh (Future developments): Update.
12046
12047 2005-08-24  Bruno Haible  <bruno@clisp.org>
12048
12049         * modules/tls-tests: New file.
12050         * tests/test-tls.c: New file, from GNU gettext.
12051
12052 2005-08-24  Bruno Haible  <bruno@clisp.org>
12053
12054         * modules/lock-tests: New file.
12055         * tests/test-lock.c: New file, from GNU gettext.
12056
12057 2005-08-24  Bruno Haible  <bruno@clisp.org>
12058
12059         * lib/lock.h: Add multiple inclusion guard.
12060         * lib/tls.h: Add multiple inclusion guard.
12061
12062 2005-08-24  Bruno Haible  <bruno@clisp.org>
12063
12064         * gnulib-tool: Add support for the --aux-dir option to
12065         --create-testdir, --create-megatestdir, --test, --megatest.
12066         (func_create_testdir, func_create_megatestdir): Optionally emit a
12067         AC_CONFIG_AUX_DIR directive.
12068         (create-testdir, create-megatestdir, test, megatest): Provide a
12069         default value for $auxdir.
12070
12071 2005-08-24  Bruno Haible  <bruno@clisp.org>
12072
12073         * gnulib-tool (import): Use compound statement instead of subshell
12074         where possible.
12075
12076 2005-08-24  Bruno Haible  <bruno@clisp.org>
12077
12078         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12079
12080 2005-08-24  Bruno Haible  <bruno@clisp.org>
12081
12082         * gnulib-tool (func_version): Update.
12083
12084 2005-08-24  Bruno Haible  <bruno@clisp.org>
12085
12086         * gnulib-tool (func_import, func_create_testdir,
12087         func_create_megatestdir): Quote all autoconf macro arguments.
12088
12089 2005-08-24  Bruno Haible  <bruno@clisp.org>
12090
12091         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12092         option --force, because --force causes the aclocal.m4 of each
12093         subdirectory to be newer than the corresponding config.h.in.
12094
12095 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12096
12097         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12098         All contents moved to gl_REGEX.
12099         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12100         assume that it does.
12101
12102 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12103
12104         * lib/regex.h (REG_NOSYS)
12105         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12106         Define, since POSIX requires it as of 2001.
12107         (_REG_ENOSYS)
12108         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12109         New private symbol, used to keep the enum signed in all cases.
12110         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12111         Youngman in
12112         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12113
12114         * lib/regex_internal.c (re_string_skip_chars, register_state):
12115         (calc_state_hash):
12116         Remove forward decls; no longer needed now that we use prototypes.
12117         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12118         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12119         (clean_state_log_if_needed): Likewise.
12120
12121 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12122
12123         * config/srclist.txt: Add glibc bugs 1231-1233.
12124
12125 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12126
12127         Fix problems reported by Sam Steingold in
12128         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12129         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12130         assumed that reg_errcode_t is a signed type, which is not
12131         necessarily true if _XOPEN_SOURCE is not defined.
12132         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12133         since some compilers warn about it otherwise.
12134
12135 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12136
12137         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12138         (init_word_char, create_initial_state, duplicate_node_closure):
12139         (fetch_token, peek_token_bracket, build_range_exp):
12140         (build_collating_symbol): Remove forward decls; no longer needed
12141         now that we use prototypes.
12142
12143         * lib/regcomp.c:
12144         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12145         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12146         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12147         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12148         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12149         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12150         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12151         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12152         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12153         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12154         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12155         (build_charclass, build_charclass_op, fetch_number, create_tree):
12156         (create_token_tree, mark_opt_subexp, duplicate_tree):
12157         Use prototypes rather than old-style definitions.
12158
12159         * lib/regex_internal.c:
12160         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12161         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12162         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12163         (re_string_reconstruct, re_string_peek_byte_case):
12164         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12165         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12166         (re_node_set_init_copy, re_node_set_add_intersect):
12167         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12168         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12169         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12170         (re_acquire_state, re_acquire_state_context, register_state):
12171         (create_ci_newstate, create_cd_newstate, free_state):
12172         Likewise.
12173         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12174         re_search_2):
12175         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12176         (re_search_internal, prune_impossible_nodes):
12177         (acquire_init_state_context, check_matching, static):
12178         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12179         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12180         (update_regs, sift_states_backward, build_sifted_states):
12181         (clean_state_log_if_needed, merge_state_array):
12182         (update_cur_sifted_state, add_epsilon_src_nodes):
12183         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12184         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12185         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12186         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12187         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12188         (check_arrival, check_arrival_add_next_nodes):
12189         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12190         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12191         (check_node_accept_bytes, check_node_accept, extend_buffers):
12192         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12193         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12194         (sift_ctx_init):
12195         Likewise.
12196
12197         * lib/regex_internal.h:
12198         (re_string_allocate, re_string_construct, re_string_reconstruct):
12199         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12200         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12201         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12202         (re_string_context_at, re_string_peek_byte_case):
12203         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12204         is defined, since we now use prototypes always.
12205
12206         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12207         C89 or better.  All uses removed.
12208
12209 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12210
12211         * config/srclist.txt: Add glibc bugs 1220-1227.
12212
12213 2005-08-20  Jim Meyering  <jim@meyering.net>
12214
12215         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12216         of unused local, dfa.
12217
12218 2005-08-20  Bruno Haible  <bruno@clisp.org>
12219
12220         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12221
12222 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12223
12224         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12225         (re_node_set_insert_last, re_dfa_add_node):
12226         Rename local variables to avoid GCC shadowing warnings.
12227
12228 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12229
12230         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12231         [defined lint]: Suppress bogus uninitialized-variable warnings.
12232
12233         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12234         and let the caller return REG_ESPACE if out of space.  This
12235         removes an uninitialied-variable warning with GCC 4.0.1, and also
12236         avoids taking the address of a local variable.  All callers
12237         changed.
12238
12239 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12240
12241         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12242         $LIBCSRC/posix/regexec.c.
12243         Add glibc bug 1217 for regcomp.c.
12244
12245 2005-08-19  Jim Meyering  <jim@meyering.net>
12246
12247         * lib/regexec.c (proceed_next_node): Redo local variables to
12248         avoid GCC shadowing warnings.
12249
12250 2005-08-18  Bruno Haible  <bruno@clisp.org>
12251
12252         * lib/strstr.c (strstr): Fix return value in multibyte case.
12253         * lib/strcasestr.c (strcasestr): Likewise.
12254
12255 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12256
12257         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12258
12259 2005-08-17  Jim Meyering  <jim@meyering.net>
12260
12261         Make the %s format (seconds since the epoch) work for a negative
12262         number and when used with a zero-padded field width, e.g. %015s.
12263
12264         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12265         label so that it precedes the code to set `digits'.  Otherwise,
12266         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12267         print `00-22'.  Now, it prints `-0022', as it should.
12268
12269 2005-08-17  Bruno Haible  <bruno@clisp.org>
12270
12271         * modules/strstr (Files): Add m4/mbrtowc.m4.
12272         (Depends-on): Add mbuiter.
12273
12274 2005-08-17  Bruno Haible  <bruno@clisp.org>
12275
12276         * modules/strcasestr: New file.
12277         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12278         strcasestr.
12279
12280 2005-08-17  Bruno Haible  <bruno@clisp.org>
12281
12282         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12283
12284 2005-08-17  Bruno Haible  <bruno@clisp.org>
12285
12286         * modules/mbuiter: New file.
12287         * MODULES.html.sh (Extended multibyte and wide character utilities):
12288         Add mbuiter.
12289
12290 2005-08-17  Bruno Haible  <bruno@clisp.org>
12291
12292         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12293         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12294
12295 2005-08-17  Bruno Haible  <bruno@clisp.org>
12296
12297         * m4/strcasestr.m4: New file.
12298
12299 2005-08-17  Bruno Haible  <bruno@clisp.org>
12300
12301         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12302         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12303
12304 2005-08-17  Bruno Haible  <bruno@clisp.org>
12305
12306         * lib/strcasestr.h: New file.
12307         * lib/strcasestr.c: New file.
12308
12309 2005-08-17  Bruno Haible  <bruno@clisp.org>
12310
12311         * lib/strcasecmp.c: Use mbuiter.h.
12312
12313 2005-08-17  Bruno Haible  <bruno@clisp.org>
12314
12315         * lib/mbuiter.h: New file.
12316
12317 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12318
12319         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12320         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12321         and gl_GETOPT are both invoked via different paths (as happens
12322         with GNU tar CVS because it uses both argp and getopt), the former
12323         wins.
12324
12325 2005-08-16  Bruno Haible  <bruno@clisp.org>
12326
12327         * modules/tls: New file.
12328         * MODULES.html.sh (Multithreading): Add tls.
12329
12330 2005-08-16  Bruno Haible  <bruno@clisp.org>
12331
12332         * modules/strnlen1: New file.
12333         * MODULES.html.sh (String handling): Add strnlen1.
12334
12335 2005-08-16  Bruno Haible  <bruno@clisp.org>
12336
12337         * modules/strcase (Files): Add m4/mbrtowc.m4.
12338         (Depends-on): Add strnlen1, mbchar.
12339
12340 2005-08-16  Bruno Haible  <bruno@clisp.org>
12341
12342         * modules/mbiter: New file.
12343         * MODULES.html.sh (Extended multibyte and wide character utilities):
12344         Add mbiter.
12345
12346 2005-08-16  Bruno Haible  <bruno@clisp.org>
12347
12348         * modules/mbfile: New file.
12349         * MODULES.html.sh (Extended multibyte and wide character utilities):
12350         Add mbfile.
12351
12352 2005-08-16  Bruno Haible  <bruno@clisp.org>
12353
12354         * modules/mbchar: New file.
12355         * MODULES.html.sh (Extended multibyte and wide character utilities):
12356         New section.
12357
12358 2005-08-16  Bruno Haible  <bruno@clisp.org>
12359
12360         * m4/tls.m4: New file, from GNU gettext.
12361
12362 2005-08-16  Bruno Haible  <bruno@clisp.org>
12363
12364         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12365         always.
12366         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12367
12368 2005-08-16  Bruno Haible  <bruno@clisp.org>
12369
12370         * m4/mbiter.m4: New file.
12371
12372 2005-08-16  Bruno Haible  <bruno@clisp.org>
12373
12374         * m4/mbfile.m4: New file.
12375
12376 2005-08-16  Bruno Haible  <bruno@clisp.org>
12377
12378         * m4/mbchar.m4: New file.
12379
12380 2005-08-16  Bruno Haible  <bruno@clisp.org>
12381
12382         * lib/tls.h: New file, from GNU gettext.
12383         * lib/tls.c: New file, from GNU gettext.
12384
12385 2005-08-16  Bruno Haible  <bruno@clisp.org>
12386
12387         * lib/strnlen1.h: New file.
12388         * lib/strnlen1.c: New file.
12389
12390 2005-08-16  Bruno Haible  <bruno@clisp.org>
12391
12392         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12393         (mbi_init): Update.
12394         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12395         NUL byte, not after it.
12396
12397 2005-08-16  Bruno Haible  <bruno@clisp.org>
12398
12399         * lib/strcase.h (strcasecmp): Add note in comments.
12400         * lib/strncasecmp.c: Use code from strcasecmp.c.
12401         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12402         (strcasecmp): Work correctly in multibyte locales.
12403
12404 2005-08-16  Bruno Haible  <bruno@clisp.org>
12405
12406         * lib/mbiter.h: New file.
12407
12408 2005-08-16  Bruno Haible  <bruno@clisp.org>
12409
12410         * lib/mbfile.h: New file.
12411
12412 2005-08-16  Bruno Haible  <bruno@clisp.org>
12413
12414         * lib/mbchar.h: New file.
12415         * lib/mbchar.c: New file.
12416
12417 2005-08-16  Bruno Haible  <bruno@clisp.org>
12418
12419         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12420         the valid ones. Makes the comparison operations transitive:
12421         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12422         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12423
12424 2005-08-15  Simon Josefsson  <jas@extundo.com>
12425
12426         * modules/ssize_t (License): Change to 'unlimited'.
12427
12428         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12429
12430 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12431
12432         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12433         Add comments for each pending glibc patch.
12434
12435 2005-08-15  Bruno Haible  <bruno@clisp.org>
12436
12437         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12438         __cplusplus is defined.
12439
12440 2005-08-14  Jim Meyering  <jim@meyering.net>
12441
12442         Sync from coreutils.
12443
12444         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12445         Use the hash-table-based cycle-detection code not just when
12446         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12447         Reported by James Youngman in
12448         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12449         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12450         FTS_TIGHT_CYCLE_CHECK.
12451         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12452         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12453         once again.
12454         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12455         * lib/fts.c (fd_safer): Remove decl.
12456         Include fcntl--.h rather than unistd-safer.h
12457         (fts_safe_changedir): Don't call fd_safer; no longer needed
12458         now that we include fcntl--.h.
12459
12460 2005-08-12  Simon Josefsson  <jas@extundo.com>
12461
12462         * modules/getndelim2: Use ssize_t module.
12463         * modules/getnline: Likewise.
12464         * modules/safe-read: Likewise.
12465         * modules/xreadlink: Likewise.
12466
12467         * modules/ssize_t: New file.
12468
12469 2005-08-12  Simon Josefsson  <jas@extundo.com>
12470
12471         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12472
12473 2005-08-12  Simon Josefsson  <jas@extundo.com>
12474
12475         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12476         ssize_t.
12477
12478 2005-08-12  Simon Josefsson  <jas@extundo.com>
12479
12480         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12481         readline, getdelim and check_version.
12482         (Support for systems lacking ISO C 99: Sizes of integer types):
12483         Add size_max.
12484
12485 2005-08-12  Bruno Haible  <bruno@clisp.org>
12486
12487         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12488
12489 2005-08-11  Simon Josefsson  <jas@extundo.com>
12490
12491         * modules/readline: New file.
12492
12493         * modules/strnlen (Files): Add strnlen.h.
12494
12495 2005-08-11  Simon Josefsson  <jas@extundo.com>
12496
12497         * m4/readline.m4: New file.
12498
12499 2005-08-11  Simon Josefsson  <jas@extundo.com>
12500
12501         * lib/readline.h, readline.c: New file.
12502
12503 2005-08-11  Simon Josefsson  <jas@extundo.com>
12504
12505         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12506         gl_AVOID.
12507
12508 2005-08-11  Bruno Haible  <bruno@clisp.org>
12509
12510         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12511
12512 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12513
12514         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12515
12516 2005-08-10  Simon Josefsson  <jas@extundo.com>
12517
12518         * tests/test-iconvme.c: New file.
12519
12520 2005-08-10  Simon Josefsson  <jas@extundo.com>
12521
12522         * m4/strnlen.m4: New file.
12523
12524         * m4/strndup.m4: Don't check for strnlen declaration, done in
12525         strnlen.m4.
12526
12527 2005-08-10  Simon Josefsson  <jas@extundo.com>
12528
12529         * lib/strndup.c: Use strnlen.h.
12530
12531         * lib/strnlen.h: New file.
12532
12533 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12534
12535         * README: Typos.
12536
12537 2005-08-02  Simon Josefsson  <jas@extundo.com>
12538
12539         * modules/readline: New file.
12540
12541 2005-08-02  Simon Josefsson  <jas@extundo.com>
12542
12543         * modules/getdelim: New file.
12544
12545         * modules/getline: Rewrite, don't use getndelim2.
12546
12547 2005-08-02  Simon Josefsson  <jas@extundo.com>
12548
12549         * m4/getline.m4: Separate out getdelim stuff into separate module.
12550
12551         * m4/getdelim.m4: New file.
12552
12553 2005-08-02  Simon Josefsson  <jas@extundo.com>
12554
12555         * lib/getline.h, getline.c: Rewrite.
12556
12557         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12558
12559 2005-07-31  Bruno Haible  <bruno@clisp.org>
12560
12561         * lib/lock.h (gl_lock_initializer): New macro.
12562         (gl_lock_define_initialized): Use it.
12563         (gl_rwlock_initializer): New macro.
12564         (gl_rwlock_define_initialized): Use it.
12565         (gl_recursive_lock_initializer): New macro.
12566         (gl_recursive_lock_define_initialized): Use it.
12567
12568 2005-07-30  Karl Berry  <karl@gnu.org>
12569
12570         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12571         Report from Ben Pfaff, regarding getopt.
12572
12573 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12574
12575         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12576         normal way.
12577         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12578         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12579         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12580         (gl_GETOPT): Use the new macros.  Most of the implementation
12581         is moved to the new macros.  This is for programs like Emacs
12582         that don't want all the functionality of gl_GETOPT.
12583
12584 2005-07-26  Bruno Haible  <bruno@clisp.org>
12585
12586         * m4/lock.m4: Update from GNU gettext.
12587
12588 2005-07-26  Bruno Haible  <bruno@clisp.org>
12589
12590         * lib/lock.h: Update from GNU gettext.
12591         * lib/lock.c: Update from GNU gettext.
12592
12593 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12594
12595         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12596         obsolescent AC_TRY_RUN.  Include the default includes files, for
12597         'exit'.
12598
12599 2005-07-24  Bruno Haible  <bruno@clisp.org>
12600
12601         * modules/visibility: New file.
12602         * MODULES.html.sh (Misc): Add visibility.
12603
12604 2005-07-24  Bruno Haible  <bruno@clisp.org>
12605
12606         * m4/visibility.m4: New file.
12607
12608 2005-07-24  Bruno Haible  <bruno@clisp.org>
12609
12610         * doc/visibility.texi: New file.
12611
12612 2005-07-22  Bruno Haible  <bruno@clisp.org>
12613
12614         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12615         $(ALLOCA_H), redundant through BUILT_SOURCES.
12616         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12617         redundant through BUILT_SOURCES.
12618         * modules/byteswap (Makefile.am): Remove explicit dependency on
12619         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12620         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12621         $(FNMATCH_H), redundant through BUILT_SOURCES.
12622         * modules/getopt (Makefile.am): Remove explicit dependency on
12623         $(GETOPT_H), redundant through BUILT_SOURCES.
12624         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12625         redundant through BUILT_SOURCES.
12626         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12627         redundant through BUILT_SOURCES.
12628         * modules/stdbool (Makefile.am): Remove explicit dependency on
12629         $(STDBOOL_H), redundant through BUILT_SOURCES.
12630         * modules/stdint (Makefile.am): Remove explicit dependency on
12631         $(STDINT_H), redundant through BUILT_SOURCES.
12632         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12633         Remove explicit dependency on $(SYSEXITS_H).
12634         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12635
12636 2005-07-18  Simon Josefsson  <jas@extundo.com>
12637
12638         * lib/check-version.c (check_version): Accept identical versions too.
12639
12640 2005-07-18  Bruno Haible  <bruno@clisp.org>
12641
12642         * modules/lock: New file.
12643         * MODULES.html.sh (Multithreading): New section.
12644
12645 2005-07-18  Bruno Haible  <bruno@clisp.org>
12646
12647         * m4/lock.m4: New file, from GNU gettext.
12648
12649 2005-07-18  Bruno Haible  <bruno@clisp.org>
12650
12651         * lib/lock.h: New file, from GNU gettext.
12652         * lib/lock.c: New file, from GNU gettext.
12653
12654 2005-07-18  Bruno Haible  <bruno@clisp.org>
12655
12656         * lib/lock.h (gl_once_t): New type.
12657         (gl_once_define, gl_once): New macros.
12658         * lib/lock.c (fresh_once): New variable.
12659         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12660         functions.
12661
12662 2005-07-16  Simon Josefsson  <jas@extundo.com>
12663
12664         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12665         workaround, suggested by Bruno.
12666
12667 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12668
12669         * modules/xalloc (Depends-on): Add xalloc-die.
12670         * modules/xvasprintf (Depends-on): Add xalloc-die.
12671
12672 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12673
12674         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12675         with a minor change.
12676
12677 2005-07-15  Bruno Haible  <bruno@clisp.org>
12678
12679         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12680         When using lib/poll.c, define poll as rpl_poll.
12681
12682 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12683
12684         * modules/argp (Depends-on): Remove unlocked-io.
12685
12686 2005-07-14  Derek Price  <derek@ximbiot.com>
12687
12688         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12689         for glob symlink bug.
12690
12691 2005-07-14  Bruno Haible  <bruno@clisp.org>
12692
12693         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12694         Instead, test for *_unlocked function declarations directly.
12695
12696 2005-07-11  Simon Josefsson  <jas@extundo.com>
12697
12698         * modules/size_max: New file.
12699
12700         * modules/xsize: Depend on size_max module for size_max.m4.
12701
12702 2005-07-11  Simon Josefsson  <jas@extundo.com>
12703
12704         * lib/size_max.h: New file.
12705
12706 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12707
12708         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12709         copyright symbol and the year.
12710         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12711         (version_etc_va): Use parameterized copyright notice.
12712         Reword to conform to the current GNU coding standards.
12713
12714 2005-07-11  Karl Berry  <karl@gnu.org>
12715
12716         * doc/gnulib.texi (Quoting): new node.
12717         (Initial import): more info, from Patrice.
12718
12719 2005-07-11  Bruno Haible  <bruno@clisp.org>
12720
12721         * gnulib-tool (func_usage): Document option --avoid.
12722         (Command line options): Handle --avoid.
12723         (func_acceptable): New function.
12724         (func_modules_transitive_closure): Use it.
12725
12726 2005-07-11  Bruno Haible  <bruno@clisp.org>
12727
12728         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12729         Reported by Jim Meyering.
12730
12731 2005-07-10  Bruno Haible  <bruno@clisp.org>
12732
12733         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12734         Needed when size_t is smaller than 'unsigned int'.
12735         Reported by Paul Eggert.
12736
12737 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12738
12739         * modules/argp (Depends-on): Add unlocked-io
12740
12741 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12742
12743         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12744         block of defines.
12745
12746 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12747
12748         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12749         fix now.
12750
12751 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12752         and Paul Eggert  <eggert@cs.ucla.edu>
12753
12754         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12755         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12756
12757 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12758
12759         * modules/regex (Files): Add lib/regex_internal.c,
12760         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12761         (Depends-on): Add extensions.
12762         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12763
12764 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12765
12766         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12767         pathconf.
12768         * m4/same.m4 (gl_SAME): Likewise.
12769         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12770
12771         * m4/regex.m4: Adjust to new libc regex implementation.
12772         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12773         all the .c and .h parts of (the new) regex.
12774         Quote the m4 stuff better.
12775         Check for RE_ICASE bug of old gnulib.
12776         Check for REG_STARTEND of recent libc.
12777         Rename local variables from jm_* to gl_*.
12778         Quote operand of "test -f".
12779         Say "recent enough" version of libc, not "version 2".
12780         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12781         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12782         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12783         Remove check for btowc, isascii.
12784         Require AM_LANGINFO_CODESET.
12785
12786 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12787
12788         * lib/regex.c, regex.h: Sync from libc.
12789         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12790         * lib/regexec.c:
12791         New files, synced from libc, except that regex_internal.h
12792         currently has a small porting fix.
12793
12794 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12795
12796         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12797         regex_internal.c, regexec.c.
12798         Add regex_internal.h too, but as a comment, since the libc version
12799         is currently broken in gnulib mode.
12800
12801 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12802
12803         Support programs like Emacs that use gnulib but not gettext.
12804         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12805         * modules/gettext-h: New file.
12806         * modules/gettext (Files): Remove lib/gettext.h.
12807         (Depends-on): Add gettext-h.
12808         (Makefile.am): Remove lib_SOURCES.
12809         * modules/argmatch, modules/c-stack, modules/closeout:
12810         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12811         * modules/execute, modules/file-type, modules/getaddrinfo:
12812         * modules/getopt, modules/human, modules/javacomp:
12813         * modules/javaexec, modules/mkdir-p, modules/obstack:
12814         * modules/openat, modules/pagealign_alloc, modules/pipe:
12815         * modules/quotearg, modules/regex, modules/rpmatch:
12816         * modules/unicodeio, modules/userspec, modules/version-etc:
12817         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12818         * modules/xsetenv:
12819         Depend on gettext-h, not gettext.
12820
12821 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12822
12823         * gnulib-tool (func_import): Add support for 'public domain' license.
12824         * modules/alloca, modules/atexit, modules/memmove:
12825         Now public domain, not GPL.
12826         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12827         * modules/realloc, modules/strerror, modules/strtod:
12828         Now LGPL, not GPL.
12829
12830 2005-07-05  Bruno Haible  <bruno@clisp.org>
12831
12832         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12833         autoconf CVS. Needed for mingw.
12834
12835 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12836
12837         Remove the dependency of the strftime module on the tzset module.
12838         * modules/strftime (Depends-on): Remove dependency on tzset.
12839
12840 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12841
12842         Remove the dependency of the strftime module on the tzset module.
12843         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12844         gl_FUNC_TZSET_CLOBBER.
12845
12846 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12847
12848         Remove the dependency of the strftime module on the tzset module.
12849         * lib/strftime.c (my_strftime)
12850         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12851         Copy the input structure, to work around some of the bug with
12852         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12853         Solaris releases, you should also use the tzset module, but we won't
12854         require it as a dependency any more since we don't want LGPLed code
12855         to depend on GPLed code.
12856
12857 2005-07-02  Jim Meyering  <jim@meyering.net>
12858
12859         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12860         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12861         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12862         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12863
12864 2005-07-02  Jim Meyering  <jim@meyering.net>
12865
12866         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12867
12868 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12869
12870         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12871         declares only 'struct timespec;' (!).
12872
12873 2005-07-01  Jim Meyering  <jim@meyering.net>
12874
12875         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12876         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12877         * lib/save-cwd.c, tempname.c:
12878         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12879         and don't include <sys/file.h>).
12880
12881 2005-06-29  Jim Meyering  <jim@meyering.net>
12882
12883         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12884         type name.  Use the variable name instead.
12885         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12886         Likewise.
12887
12888 2005-06-28  Simon Josefsson  <jas@extundo.com>
12889
12890         * modules/check-version (Files): Add check-version.m4.
12891
12892 2005-06-28  Simon Josefsson  <jas@extundo.com>
12893
12894         * m4/check-version.m4: New file, suggested by Jim Meyering
12895         <jim@meyering.net>.
12896
12897 2005-06-28  Simon Josefsson  <jas@extundo.com>
12898
12899         * lib/check-version.h, lib/check-version.c: New files.
12900
12901 2005-06-28  Simon Josefsson  <jas@extundo.com>
12902
12903         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12904         collision with global variable.  Better indentation.  Don't
12905         increment buffer pointer beyond buffer end.  Based on comments
12906         from Paul Eggert <eggert@cs.ucla.edu>.
12907
12908         * lib/base64.h: Indent.
12909
12910 2005-06-28  Simon Josefsson  <jas@extundo.com>
12911
12912         * doc/gnulib.texi (Library version handling): New section.
12913
12914 2005-06-28  Jim Meyering  <jim@meyering.net>
12915
12916         * check-module (find_included_lib_files): Hard-code another
12917         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12918         but modules/fts-lgpl (correctly) does not list those files.
12919
12920         * modules/canonicalize (Files): Add lib/pathmax.h.
12921
12922 2005-06-25  Simon Josefsson  <jas@extundo.com>
12923
12924         * modules/check-version: New file.
12925
12926 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12927
12928         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12929         initializer of struct addrinfo, as an indication that we don't
12930         care how many members the structure has.
12931
12932 2005-06-24  Derek Price  <derek@ximbiot.com>
12933         and Bruno Haible  <bruno@clisp.org>
12934
12935         Remove stat module & update lstat.
12936         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12937         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12938         * m4/stat.m4: Remove this file.
12939
12940 2005-06-24  Derek Price  <derek@ximbiot.com>
12941         and Bruno Haible  <bruno@clisp.org>
12942
12943         Remove stat module & update lstat.
12944         * lib/stat.c: Remove this file...
12945         (slash_aware_lstat): ...moving this content and its support...
12946         * lib/lstat.c (rpl_lstat): ...into here.
12947         * lib/lstat.h: New file.
12948
12949 2005-06-24  Derek Price  <derek@ximbiot.com>
12950         and Bruno Haible  <bruno@clisp.org>
12951
12952         Remove stat module & update lstat.
12953         * config/srclist.txt (libc sources): Remove stat.
12954
12955 2005-06-24  Derek Price  <derek@ximbiot.com>
12956         and Bruno Haible  <bruno@clisp.org>
12957
12958         Remove stat module & update lstat.
12959         * MODULES.html.sh (stat): Remove.
12960         * MODULES.html: Regenerated.
12961         * modules/lstat (Description): Correct function name.
12962         (Files): Add "lstat.h".
12963         (Depends-on): Remove stat, add xalloc, stat-macros.
12964         * modules/stat: Remove this file.
12965         (Include): Add "lstat.h", remove <sys/stat.h>.
12966
12967 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12968
12969         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12970         (ranged_convert): Don't save conversion in a temporary struct.
12971         This causes a warning with GCC 4.0.0, and anyway in the typical
12972         case it's not worth the extra 100 bytes or so of code.
12973         (ranged_convert, __mktime_internal): When calling a function via a
12974         pointer P, use P () rather than (*P) (), as we now assume C89 or
12975         better.
12976
12977 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
12978
12979         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
12980         "who -r" failed to give output.  Problem reported by Tim Waugh.
12981
12982         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
12983         (xcalloc): Use it to avoid needless tests.
12984         Problem reported by Jim Meyering.
12985
12986 2005-06-20  Derek Price  <derek@ximbiot.com>
12987
12988         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
12989         unnecessary for Autoconfs > 2.59c.
12990
12991 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12992
12993         * lib/argp.h (__option_is_short): Check upper limit of
12994         __key. Isprint() requires its argument to have the value
12995         of an unsigned char or EOF.
12996
12997 2005-06-16  Jim Meyering  <jim@meyering.net>
12998
12999         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13000         when either N or S is zero.
13001
13002 2005-06-16  Derek Price  <derek@ximbiot.com>
13003
13004         * m4/bison.m4: Declare YACC & YFLAGS precious.
13005
13006 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13007
13008         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13009         multibyte string or pattern, fall back on unibyte matching.
13010         Problem reported by James Youngman.
13011
13012 2005-06-08  Bruno Haible  <bruno@clisp.org>
13013
13014         * modules/csharpcomp: New file.
13015         * MODULES.html.sh (C#): Add csharpcomp.
13016
13017 2005-06-08  Bruno Haible  <bruno@clisp.org>
13018
13019         * m4/csharpcomp.m4: New file, from GNU gettext.
13020
13021 2005-06-08  Bruno Haible  <bruno@clisp.org>
13022
13023         * lib/csharpcomp.h: New file, from GNU gettext.
13024         * lib/csharpcomp.c: New file, from GNU gettext.
13025         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13026
13027 2005-06-08  Bruno Haible  <bruno@clisp.org>
13028
13029         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13030         warning on mingw.
13031
13032 2005-06-07  Derek Price  <derek@ximbiot.com>
13033
13034         Sync from CVS.
13035         * lib/glob_.h: Indent nested #ifdef.
13036
13037 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         Sync from coreutils.
13040         Use "file name" when talking about file names, instead of "filename"
13041         or "path", as per the GNU coding standards.
13042         * lib/mkdir-p.c: Renamed from makepath.c.
13043         (make_dir_parents): Renamed from make_path.  All callers changed.
13044         * lib/mkdir-p.h: Likewise.  All includers changed.
13045         * lib/filenamecat.c: Renamed from path-concat.c.
13046         (file_name_concat): Renamed from path_concat.  All callers changed.
13047         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13048         * lib/filenamecat.h: Likewise.  All includers changed.
13049         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13050         in comments or local variable names.
13051         * lib/basename.c: Likewise.
13052         * lib/canonicalize.c, canonicalize.h: Likewise.
13053         * lib/dirname.c, dirname.h: Likewise.
13054         * lib/euidaccess.c: Likewise.
13055         * lib/exclude.c: Likewise
13056         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13057         * lib/fsusage.c, fsuage.h: Likewise.
13058         * lib/fts.c, fts_.h: Likewise.
13059         * lib/getcwd.c: Likewise.
13060         * lib/getloadavg.c: Likewise.
13061         * lib/mkstemp.c: Likewise.
13062         * lib/mountlist.c, mountlist.h: Likewise.
13063         * lib/openat.c, openat.h: Likewise.
13064         * lib/readlink-stub.c: Likewise.
13065         * lib/readutmp.c, readutmp.h: Likewise.
13066         * lib/rename.c: Likewise.
13067         * lib/rmdir.c: Likewise.
13068         * lib/same.c: Likewise.
13069         * lib/savedir.c: Likewise.
13070         * lib/stripslash.c: Likewise.
13071         * lib/tempname.c: Likewise.
13072         * lib/xreadlink.c: Likewise.
13073         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13074         All uses changed.
13075         * lib/exclude.h: Likewise.
13076
13077         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13078         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13079         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13080         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13081         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13082         files have been getting away with it for years (MORE/BSD 4.3
13083         is extinct now).
13084         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13085         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13086
13087         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13088         Define to 256, not 255, as per modern POSIX.
13089
13090 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13091
13092         Sync from coreutils.
13093         Use "file name" when talking about file names, instead of "filename"
13094         or "path", as per the GNU coding standards.
13095         * MODULES.html.sh: mkdir-p renamed from makepath.
13096         filenamecat renamed from path-concat.
13097         * modules/filenamecat: Renamed from modules/path-concat.
13098         (Files): filenamecat.h and filenamecat.c renamed from
13099         path-concat.h and path-concat.c.
13100         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13101         (Include): filenamecat.h, not path-concat.h.
13102         * modules/mkdir-p: Renamed from modules/makepath.
13103         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13104         makepath.c.
13105         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13106         (Include): mkdir-p.h, not makepath.h.
13107
13108 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         Sync from coreutils.
13111         * m4/mkdir-p.m4: Renamed from makepath.m4.
13112         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13113         Rename files from makepath.c to mkdir-p.c, and from
13114         makepath.h to mkdir-p.h.
13115         * m4/filenamecat.m4: Renamed from path-concat.m4.
13116         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13117         Rename files from path-concat.c to filenamecat.c,
13118         and from path-concat.h to filenamecat.h.
13119         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13120         "file name" in local variables or comments.
13121         * m4/rename.m4: Likewise.
13122
13123 2005-06-01  Bruno Haible  <bruno@clisp.org>
13124
13125         * modules/csharpexec: New file.
13126         * MODULES.html.sh (C#): New section.
13127
13128 2005-06-01  Bruno Haible  <bruno@clisp.org>
13129
13130         * m4/csharp.m4: New file, from GNU gettext.
13131         * m4/csharpexec.m4: New file, from GNU gettext.
13132
13133 2005-06-01  Bruno Haible  <bruno@clisp.org>
13134
13135         * lib/csharpexec.h: New file, from GNU gettext.
13136         * lib/csharpexec.c: New file, from GNU gettext.
13137         * lib/csharpexec.sh.in: New file, from GNU gettext.
13138
13139 2005-05-31  Derek Price  <derek@ximbiot.com>
13140             Paul Eggert  <eggert@cs.ucla.edu>
13141
13142         Sync from cvs.
13143         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13144
13145 2005-05-31  Derek Price  <derek@ximbiot.com>
13146             Paul Eggert  <eggert@cs.ucla.edu>
13147
13148         Sync from cvs.
13149         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13150
13151 2005-05-29  Derek Price  <derek@ximbiot.com>
13152
13153         * config/srclist.txt (glob_.h, glob.c): Add these files.
13154
13155 2005-05-29  Derek Price  <derek@ximbiot.com>
13156
13157         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13158         * modules/glob: New file.
13159         * modules/getlogin_r: Add link to POSIX spec in description.
13160
13161 2005-05-29  Derek Price  <derek@ximbiot.com>
13162             Paul Eggert  <eggert@cs.ucla.edu>
13163
13164         * m4/glob.m4: New file.
13165
13166 2005-05-29  Derek Price  <derek@ximbiot.com>
13167             Paul Eggert  <eggert@cs.ucla.edu>
13168
13169         * lib/glob_.h, lib/glob.c: New files.
13170
13171 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13172
13173         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13174         * modules/fts-lgpl (Depends-on): Remove gettext.
13175
13176 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13177
13178         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13179         and don't require gt_INTTYPES_PRI.
13180
13181 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13182
13183         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13184
13185         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13186         the configuration hassle isn't worth it.
13187         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13188         (LONGEST_MODIFIER, PRIuMAX): Remove.
13189
13190 2005-05-27  Bruno Haible  <bruno@clisp.org>
13191
13192         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13193
13194 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13195
13196         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13197         _POSIX_PTHREAD_SEMANTICS for Solaris.
13198
13199 2005-05-25  Derek Price  <derek@ximbiot.com>
13200
13201         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13202
13203 2005-05-25  Derek Price  <derek@ximbiot.com>
13204             Paul Eggert  <eggert@cs.ucla.edu>
13205
13206         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13207         * lib/getlogin_r.c, getlogin_r.h: New files.
13208
13209 2005-05-25  Bruno Haible  <bruno@clisp.org>
13210             Derek Price  <derek@ximbiot.com>
13211
13212         * lib/getlogin_r.h: Simplify API documentation.
13213
13214 2005-05-23  Derek Price  <derek@ximbiot.com>
13215
13216         * modules/minmax (Files): Add m4/minmax.m4.
13217         (configure.ac): Add gl_MINMAX.
13218
13219 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13220
13221         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13222         so that unistd-safer.h (GPL'ed code) need not be included.
13223
13224 2005-05-22  Bruno Haible  <bruno@clisp.org>
13225
13226         * m4/minmax.m4: New file.
13227         Based on a patch by Derek Price <derek@ximbiot.com>.
13228
13229 2005-05-22  Bruno Haible  <bruno@clisp.org>
13230
13231         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13232         (INT64_MIN): Fix definition.
13233         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13234
13235         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13236         NEED_SIGNED_INT_TYPES.
13237
13238         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13239         HAVE_SYSTEM_INTTYPES.
13240
13241 2005-05-22  Bruno Haible  <bruno@clisp.org>
13242
13243         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13244         Also include <sys/param.h> if it defines MIN, MAX.
13245         Based on a patch by Derek Price <derek@ximbiot.com>.
13246
13247 2005-05-21  Jim Meyering  <jim@meyering.net>
13248
13249         * modules/fts (Files): Add m4/inttypes-pri.m4.
13250         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13251
13252 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13253
13254         New fts module.
13255         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13256         (setup_dir, free_dir): New functions.
13257         (enter_dir, leave_dir): Define trivial
13258         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13259         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13260         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13261         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13262         Move to fts-cycle.c.
13263         (fts_open): Use setup_dir.
13264         (fts_close): Use free_dir.
13265         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13266         This adds a label and some gotos, but the alternatives were messier.
13267         Check for memory allocation failure when entering a dir.
13268         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13269         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13270         (FTS): New member fts_cycle, that is a union that contains the
13271         old active_dir_ht and cycle_state.  All uses changed to mention
13272         fts_cycle.ht and fts_cycle.state.
13273         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13274         fts.c, with the following changes:
13275         (setup_dir, free_dir): New functions.
13276         (enter_dir): Now returns bool.  Return true if successful, false
13277         if memory exhausted.  All callers changed.
13278         Do not bother partly cleaning up on
13279         memory allocation failure; that is free_dir's job.
13280         However, free ad if hash_insert fails, to avoid memory leak.
13281         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13282         fts->fts_options to see which union member to use.
13283
13284 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13285
13286         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13287         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13288
13289 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13290
13291         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13292
13293 2005-05-20  Jim Meyering  <jim@meyering.net>
13294
13295         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13296         Now a macro, to pacify GCC.
13297
13298 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13299
13300         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13301         of -1.
13302
13303 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13304
13305         * lib/chown.c (rpl_chown): Return -1 on failure.
13306
13307 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13308
13309         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13310         Don't check for stddef.h.
13311         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13312         don't use its results.
13313         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13314         since we include them unconditionally.  Don't require
13315         AM_STDBOOL_H, since stdbool is a prerequisite.
13316         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13317         since we assume C89 or better.
13318         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13319         as we don't use their results.
13320         Don't check for fchdir, memmove, memset, strrchr, as we use
13321         them unconditionally.
13322         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13323         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13324
13325 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13326
13327         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13328         Include <stddef.h> unconditionally, since we assume C89 now.
13329         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13330         * lib/fts.c: Include fts_.h first, to check interface.
13331         Do not include intprops.h; no longer needed.
13332         Include cycle-check.h and hash.h, since fts_.h no longer does.
13333         Remove unnecessary casts of closedir to void.
13334         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13335         decide whether to decrement nlinks.
13336         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13337         (FTS): Use struct hash_table * instead of Hash_table, so that
13338         we no longer need to include hash.h here.
13339
13340 2005-05-18  Jim Meyering  <jim@meyering.net>
13341
13342         * modules/dirfd (License): Change to LGPL.  Most of the code
13343         is already in the public domain.
13344
13345 2005-05-18  Jim Meyering  <jim@meyering.net>
13346
13347         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13348         Reported by Yoann Vandoorselaere.
13349
13350 2005-05-17  Jim Meyering  <jim@meyering.net>
13351
13352         * m4/fts.m4: New file, from coreutils.
13353
13354 2005-05-17  Jim Meyering  <jim@meyering.net>
13355
13356         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13357
13358 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13359
13360         Sync from coreutils.
13361         * m4/unlinkdir.m4: New file.
13362
13363 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13364
13365         Sync from coreutils.
13366         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13367         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13368         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13369         White space changes only.
13370         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13371         special.
13372         * lib/yesno.c: Include getline.h, not ctype.h.
13373         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13374         Use getline to remove arbitrary restriction on response length.
13375
13376 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13377
13378         * config/srclist-update: Spell out "Street" in FSF postal
13379         mail address; this is the style the FSF seems to prefer.
13380
13381         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13382         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13383         this updates FSF postal mail address.
13384
13385         Sync from coreutils.
13386         * modules/unlinkdir: New file.
13387         * modules/yesno (Depends-on): Add getline.
13388         * MODULES.html.sh (File system functions): Add unlinkdir.
13389
13390 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13393         lib/strsep.h:
13394         Change the initial comment to refer to GPL, not LGPL.
13395         gnulib-tool will change it to LGPL as needed.
13396
13397         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13398         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13399         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13400         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13401         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13402         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13403         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13404         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13405         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13406         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13407         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13408         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13409         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13410         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13411         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13412         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13413         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13414         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13415         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13416         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13417         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13418         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13419         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13420         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13421         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13422         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13423         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13424         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13425         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13426         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13427         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13428         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13429         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13430         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13431         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13432         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13433         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13434         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13435         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13436         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13437         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13438         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13439         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13440         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13441         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13442         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13443         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13444         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13445         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13446         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13447         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13448         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13449         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13450         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13451         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13452         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13453         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13454         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13455         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13456         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13457         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13458         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13459         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13460         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13461         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13462         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13463         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13464         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13465         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13466         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13467         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13468         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13469         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13470         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13471         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13472         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13473         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13474         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13475         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13476         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13477         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13478         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13479         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13480         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13481         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13482         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13483         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13484         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13485         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13486         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13487         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13488         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13489         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13490         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13491         lib/yesno.c, lib/yesno.h:
13492         Update FSF postal mail address.
13493
13494 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13495
13496         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13497         tests/test-memmem.c, tests/test-stpncpy.c:
13498         Update FSF postal mail address.
13499
13500 2005-05-13  Bruno Haible  <bruno@clisp.org>
13501
13502         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13503         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13504         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13505         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13506         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13507         Add support for 64-bit integers in the MSVC compiler.
13508
13509 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13510
13511         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13512
13513 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13514
13515         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13516
13517 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13518
13519         * doc/getdate.texi (General date syntax): Don't say that date
13520         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13521         Problem reported by Nic Ferrier.
13522
13523 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13524
13525         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13526         specified in ai_socktype. Fix invalid ai_protocol
13527         check. ai_protocol is usually set to 0 or depending on
13528         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13529         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13530         ai_socktype / ai_protocol in the returned addrinfo structure.
13531
13532 2005-05-10  Simon Josefsson  <jas@extundo.com>
13533
13534         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13535         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13536
13537 2005-05-10  Karl Berry  <karl@gnu.org>
13538
13539         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13540         (from http://www.gnu.org/licenses).
13541         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13542         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13543         fdl.texi suffices.
13544
13545 2005-05-10  Karl Berry  <karl@gnu.org>
13546
13547         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13548         (COPYING.DOC): remove.
13549
13550         * config/srclist-update: new FSF address.
13551
13552 2005-05-10  Derek Price  <derek@ximbiot.com>
13553
13554         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13555         possible.
13556
13557 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13558             Bruno Haible  <bruno@clisp.org>
13559
13560         * modules/inet_ntop: New file.
13561         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13562         inet_ntop.
13563
13564 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13565             Bruno Haible  <bruno@clisp.org>
13566
13567         * m4/inet_ntop.m4: New file.
13568
13569 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13570             Bruno Haible  <bruno@clisp.org>
13571
13572         * lib/inet_ntop.h: New file.
13573         * lib/inet_ntop.c: New file, from glibc with modifications.
13574
13575 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13576
13577         * modules/time_r (License): Change to LGPL.
13578         * modules/extensions (License): Change to LGPL.  Actually,
13579         the license is more permissive than that, but currently gnulib-tool
13580         doesn't know how to handle more-permissive licenses.
13581
13582         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13583         Problem reported by Dave Love.
13584
13585 2005-05-08  Jim Meyering  <jim@meyering.net>
13586
13587         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13588         blank.
13589
13590 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13591
13592         * modules/argmatch (Depends-on): Add stdbool.
13593         * modules/backupfile (Depends-on): Likewise.
13594         * modules/chdir-long (Depends-on): Likewise.
13595         * modules/closeout (Depends-on): Likewise.
13596         * modules/cycle-check (Depends-on): Likewise.
13597         * modules/dirname (Depends-on): Likewise.
13598         * modules/fnmatch (Depends-on): Likewise.
13599         * modules/fsusage (Depends-on): Likewise.
13600         * modules/fwriteerror (Depends-on): Likewise.
13601         * modules/getcwd (Depends-on): Likewise.
13602         * modules/getloadavg (Depends-on): Likewise.
13603         * modules/hard-locale (Depends-on): Likewise.
13604         * modules/makepath (Depends-on): Likewise.
13605         * modules/mountlist (Depends-on): Likewise.
13606         * modules/nanosleep (Depends-on): Likewise.
13607         * modules/posixtm (Depends-on): Likewise.
13608         * modules/quotearg (Depends-on): Likewise.
13609         * modules/readtokens (Depends-on): Likewise.
13610         * modules/readtokens0 (Depends-on): Likewise.
13611         * modules/readutmp (Depends-on): Likewise.
13612         * modules/save-cwd (Depends-on): Likewise.
13613         * modules/strftime (Depends-on): Likewise.
13614         * modules/userspec (Depends-on): Likewise.
13615         * modules/utimecmp (Depends-on): Likewise.
13616         * modules/xgetcwd (Depends-on): Likewise.
13617         * modules/xnanosleep (Depends-on): Likewise.
13618         * modules/xstrtod (Depends-on): Likewise.
13619         * modules/yesno (Depends-on): Likewise.
13620
13621 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13622
13623         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13624         needless checks.
13625
13626 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13627
13628         Merge from coreutils.  Among other things,
13629         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13630         * lib/fd-safer.c: New file.
13631         * lib/fcntl-safer.h, open-safer.c: Remove.
13632         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13633         * lib/dup-safer.c: Include unistd-safer.h first.
13634         Don't include errno.h.
13635         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13636         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13637         * lib/file-type.c: Rely on file-type.h change.
13638         * lib/getloadavg.c: Include unistd-safer.h.
13639         (getloadavg): Use safer open.
13640         * lib/getusershell.c: Include "stdio-safer.h".
13641         (getusershell): Use safer fopen.
13642         * lib/long-options.c (long_options): Use NULL rather than 0.
13643         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13644         'free'.
13645         * lib/modechange.c: Likewise.
13646         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13647         (MODE_DONE): New constant.
13648         (struct mode_change): Remove 'next' member.
13649         (make_node_op_equals): New function; like the old one of the
13650         same name, except it allocates an array.
13651         (mode_compile, mode_create_from_ref): Use it.
13652         (mode_compile): Allocate result as an array, not a linked list.
13653         Parse octal string ourself, so that we catch mistakes like "+0".
13654         (mode_adjust): Arg is an array, not a linked list.
13655         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13656         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13657         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13658         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13659         Remove.  This is now stat-macros.h's job.
13660         (talloc): Remove.  All callers replaced by xalloc, so that
13661         our invokers don't have to worry about reporting memory failures.
13662         (make_node_op_equals): Remove.
13663         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13664         New constants.
13665         (struct mode_change): Moved here from modechange.h.
13666         (mode_append_entry): Remove.
13667         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13668         apps to have incorrect behavior.  Use simpler algorithm for head
13669         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13670         Detect more invalid usages rather than having somewhat-random behavior.
13671         Don't insert an "a=" action, as that leads to incorrect behavior.
13672         (mode_compile, mode_create_from_ref): Return NULL on error instead
13673         of an enum, since now there's only one way to have an error.  All
13674         callers changed.
13675         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13676         at the correct time.  Simplify calculation of "+u" and its ilk.
13677         Don't mishandle "+X".
13678         (mode_free): Remove "register" and localize decls.
13679         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13680         (struct mode_change): Move to modechange.c; callers don't
13681         need to see this stuff.
13682         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13683         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13684         (mode_change, mode_adjust): Reflect the new signatures noted above.
13685         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13686         that might redefine system include files.
13687         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13688         (my_usleep): Use NULL rather than (void *) 0.
13689         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13690         Use siginterrupt to specify that system calls should be interrupted.
13691         (rpl_nanosleep): Move initialization of suspended closer to call of
13692         my_usleep.
13693         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13694         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13695         (desirable_utmp_entry): New function.
13696         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13697         using x2nrealloc, to simplify logic.
13698         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13699         size calculation.  Do not assume utmp file is a regular file.
13700         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13701         (READ_UTMP_CHECK_PIDS): New constant.
13702         * lib/save-cwd.c: Include unistd-safer.h.
13703         (save_cwd): Use fd_safer.
13704         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13705         [!_LIBC] Include "stat-macros.h" instead.
13706         * lib/unistd-safer.h (fd_safer): New decl.
13707
13708 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13709
13710         * modules/getloadavg (Depends-on): Add unistd-safer.
13711         * modules/getusershell (Depends-on): Add stdio-safer.
13712         * modules/lstat (Depends-on): Remove xalloc.
13713         * modules/mkstemp (Depends-on): Add stat-macros.
13714         * modules/modechange (Depends-on): Remove xstrtol.
13715         Add stat-macros, xalloc.
13716         * modules/save-cwd (Depends-on): Add unistd-safer.
13717         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13718         * modules/unistd-safer (Files): Add lib/fd-safer.c
13719         (Makefile.am): Remove lib_SOURCES.
13720
13721         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13722         Remove fcntl-safer; unistd-safer supersedes it.
13723
13724 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13725
13726         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13727         AC_HEADER_STAT.
13728         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13729         (gl_PREREQ_CHOWN): Remove.
13730         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13731         it.  Don't require AC_HEADER_STAT.
13732         (gl_PREREQ_LSTAT): Remove.
13733         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13734         Don't require AC_HEADER_STAT.
13735         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13736         (gl_PREREQ_RMDIR): Remove.
13737         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13738         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13739         the stat-macros module a prerequisite.
13740         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13741         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13742         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13743         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13744         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13745         variable names.
13746         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13747         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13748         variable prefixes.
13749         * m4/fcntl-safer.m4: Remove.
13750         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13751         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13752         Invoke gl_PREREQ_FD_SAFER.
13753         (gl_PREREQ_FD_SAFER): New macro.
13754         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13755         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13756         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13757         Remove duplicate call to AC_LIBOBJ(readutmp).
13758         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13759
13760         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13761         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13762
13763 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13764
13765         * MODULES.html.sh (Misc): Add byteswap.
13766
13767 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13768
13769         * modules/getcwd (Depends-on): Add extensions.
13770         * modules/openat (Depends-on): Likewise.
13771
13772 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13773
13774         * modules/byteswap: New file.
13775
13776 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13777
13778         * m4/byteswap.m4: New file.
13779
13780 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13781
13782         * lib/byteswap_.h: New file.
13783
13784 2005-04-25  Karl Berry  <karl@gnu.org>
13785
13786         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13787
13788 2005-04-25  Albert Chin  <china@thewrittenword.com>
13789
13790         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13791         Toolkit C bug.
13792
13793 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13794
13795         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13796         (func_ln_if_changed) Remove forcibly for no error message
13797         in case file does not exist.
13798
13799 2005-04-19  Simon Josefsson  <jas@extundo.com>
13800
13801         * gnulib-tool (Options): Make --symlink mean --symbolic.
13802
13803 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13804
13805         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13806
13807 2005-04-16  Simon Josefsson  <jas@extundo.com>
13808
13809         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13810
13811 2005-04-15  Simon Josefsson  <jas@extundo.com>
13812
13813         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13814
13815 2005-04-15  Simon Josefsson  <jas@extundo.com>
13816
13817         * gnulib-tool: Rename --symlink to --symbolic.
13818
13819 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13820
13821         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13822         symbolic links to files instead of copying/moving.  Add --aux-dir,
13823         specifying directory relative --dir where auxiliary build tools
13824         are placed.
13825
13826 2005-04-14  Bruno Haible  <bruno@clisp.org>
13827
13828         * modules/allocsa (License): Change to LGPL.
13829         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13830
13831 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13832
13833         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13834         that "UTC +1 second" continues to work.  Problem reported
13835         by Dmitry V. Levin.
13836         (relunit_snumber): New rule.
13837         (relunit): Use it.
13838
13839 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13840
13841         * lib/getdate.y (universal_time_zone_table): New constant.
13842         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13843         universal_time_zone_table.
13844         (lookup_zone): Prefer universal_time_zone_table to
13845         local_time_zone_table, so that "GMT" time stamps are allowed in
13846         London during the summer.  Problem reported by Ian Abbott.
13847
13848 2005-04-12  Jim Meyering  <jim@meyering.net>
13849
13850         * lib/human.c (humblock): Set *options even when returning due to
13851         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13852         warning from gcc-4.
13853
13854 2005-04-09  Jim Meyering  <jim@meyering.net>
13855
13856         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13857         -Wuninitialized: initialize tm0.tm_year.
13858
13859 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13862         count, since there's no maximum.  All uses changed.
13863         Add member dsts_seen.
13864         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13865         not being INT_MAX.
13866         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13867         Use pc_rels_seen to decide whther a date is absolute.
13868
13869         * lib/getdate.y (number): Don't overwrite year.
13870         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13871         check.
13872
13873 2005-04-02  Simon Josefsson  <jas@extundo.com>
13874
13875         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13876         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13877
13878 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13879
13880         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13881         where no absolute path name can be longer than PATH_MAX.
13882
13883 2005-03-27  Jim Meyering  <jim@meyering.net>
13884
13885         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13886
13887 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13888
13889         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13890         "one's complement" -> "ones' complement" in comment, as per Knuth.
13891         "value of type" -> "type or expression" in comment.
13892         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13893
13894 2005-03-26  Jim Meyering  <jim@meyering.net>
13895
13896         Comment nits.
13897         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13898         Correct typos: s/or/of/.
13899
13900 2005-03-26  Jim Meyering  <jim@meyering.net>
13901
13902         * modules/check-include-files: Move to ../ and rename to...
13903         * check-module: ...this.
13904
13905 2005-03-25  Jim Meyering  <jim@meyering.net>
13906
13907         * modules/xvasprintf (Files): Add xalloc.h.
13908
13909 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13910
13911         * modules/gettext (Files): config/config.rpath ->
13912         build-aux/config.rpath
13913         * modules/iconv (Files): Likewise.
13914         Problem reported by Oskar Liljeblad.
13915
13916 2005-03-23  Jim Meyering  <jim@meyering.net>
13917
13918         * modules/check-include-files: New script to check for
13919         missing dependencies, multiple includes, etc.
13920
13921         * modules/c-strtold (Depends-on): Add xalloc.
13922         * modules/c-strtod (Depends-on): Add xalloc.
13923         * modules/hash (Depends-on): Add xalloc.
13924         (Files): Remove lib/xalloc.h.
13925
13926         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13927         * modules/userspec (Files): Add lib/inttostr.h.
13928
13929 2005-03-23  Jim Meyering  <jim@meyering.net>
13930
13931         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13932
13933 2005-03-22  Jim Meyering  <jim@meyering.net>
13934
13935         * modules/stat-macros: New module.
13936         * modules/canonicalize, modules/euidaccess, modules/file-type,
13937         * modules/filemode, modules/lchown, modules/makepath,
13938         * modules/rmdir, modules/stat: Depend on new stat-macros module
13939         rather than listing lib/stat-macros.h manually.
13940         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13941
13942 2005-03-22  Jim Meyering  <jim@meyering.net>
13943
13944         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13945
13946 2005-03-22  Bruno Haible  <bruno@clisp.org>
13947
13948         * config/srclist.txt: Replace target directory 'config' with
13949         'build-aux'.
13950         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13951         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13952         ../build-aux/.
13953
13954 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13955
13956         * modules/chdir-long (Depends-on): Add mempcpy.
13957
13958         * modules/acl, modules/backupfile, modules/c-strtod,
13959         modules/c-strtold, modules/canon-host, modules/canonicalize,
13960         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13961         modules/exclude, modules/exitfail, modules/file-type,
13962         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13963         modules/getdate, modules/getline, modules/getpagesize,
13964         modules/getpass, modules/getugroups, modules/group-member,
13965         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13966         modules/inttostr, modules/long-options, modules/makepath,
13967         modules/md5, modules/memcasecmp, modules/memcoll,
13968         modules/modechange, modules/mountlist, modules/path-concat,
13969         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13970         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13971         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
13972         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
13973         modules/strftime, modules/strndup, modules/strverscmp,
13974         modules/timespec, modules/unlocked-io, modules/userspec,
13975         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
13976         modules/yesno:
13977         Remove lib_SOURCES line from Makefile.am section, as this is now
13978         done automatically by the corresponding Autoconf macro.
13979
13980 2005-03-21  Jim Meyering  <jim@meyering.net>
13981
13982         Changes imported from coreutils.
13983
13984         * lib/cycle-check.c: Don't include xalloc.h.
13985
13986         * lib/path-concat.c: Don't include assert.h.
13987         (path_concat): Remove assertion that would have triggered
13988         for ABASE starting with more than one slash.
13989         Reported by Andreas Schwab.
13990
13991         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
13992         properly when ABASE is an absolute file name.
13993         Correct the description of this function.
13994         Include <assert.h>.
13995         Add an assertion and a test driver.
13996         This fixes a bug introduced on 2004-07-02.
13997         Andreas Schwab reported the resulting failure of cp --parents:
13998         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
13999
14000 2005-03-21  Jim Meyering  <jim@meyering.net>
14001
14002         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14003         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14004
14005 2005-03-21  Jim Meyering  <jim@meyering.net>
14006         and  Paul Eggert  <eggert@cs.ucla.edu>
14007
14008         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14009         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14010         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14011         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14012         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14013         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14014         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14015         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14016         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14017         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14018         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14019         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14020         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14021         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14022         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14023         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14024         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14025         for these modules.
14026
14027 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14028
14029         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14030         (which shouldn't happen), generate nothing instead of returning 0
14031         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14032
14033 2005-03-16  Bruno Haible  <bruno@clisp.org>
14034
14035         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14036         HAVE_LONGLONG_64BIT.
14037
14038 2005-03-16  Bruno Haible  <bruno@clisp.org>
14039
14040         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14041         HAVE_LONGLONG_64BIT.
14042
14043 2005-03-16  Bruno Haible  <bruno@clisp.org>
14044
14045         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14046         HAVE_LONGLONG_64BIT.
14047
14048 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14049
14050         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14051         reliably distinguish strftime failure from empty output on POSIX
14052         hosts.
14053
14054 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14055
14056         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14057         (iconv_string): Don't guess a size-zero buffer, as that might cause
14058         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14059         result would be 'too large', where 'too large' is (heuristically)
14060         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14061         overflow concerns.  This will prevent some unwanted malloc failures
14062         when the inputs are very large.
14063
14064 2005-03-15  Karl Berry  <karl@gnu.org>
14065
14066         * config/srclist.txt (config.rpath): from gettext.
14067         * config/config.rpath: update.
14068
14069 2005-03-15  Bruno Haible  <bruno@clisp.org>
14070
14071         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14072         to 'negate'.
14073
14074         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14075         variable.
14076
14077         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14078         results.
14079
14080 2005-03-14  Simon Josefsson  <jas@extundo.com>
14081
14082         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14083         <fx@gnu.org>.
14084
14085 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14086
14087         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14088         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14089         intprops.h.
14090         * lib/strtol.c: Likewise.
14091
14092 2005-03-14  Jim Meyering  <jim@meyering.net>
14093
14094         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14095         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14096         to be nonzero so that we (and caller) can detect the difference
14097         between a valid zero-length expansion and an error return, even
14098         when the underlying strftime fails before writing anything into
14099         that location.
14100
14101 2005-03-14  Bruno Haible  <bruno@clisp.org>
14102
14103         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14104         Update from GNU gettext 0.14.3.
14105
14106 2005-03-10  Jim Meyering  <jim@meyering.net>
14107
14108         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14109
14110 2005-03-10  Jim Meyering  <jim@meyering.net>
14111
14112         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14113         so that this module works on systems without fchdir.
14114
14115 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14116
14117         Factor int-properties macros into a single file, except for
14118         glibc-related files.
14119         * lib/intprops.h: New file.
14120         * lib/getloadavg.c: Include it instead of limits.h.
14121         (INT_STRLEN_BOUND): Remove.
14122         * lib/human.c: Include intprops.h.
14123         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14124         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14125         302/1000.
14126         * lib/inttostr.h: Include intprops.h instead of limits.h.
14127         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14128         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14129         for consistency with intprops.h.
14130         (time_t_is_integer, twos_complement_arithmetic): Use them.
14131         * lib/sig2str.h: Include <signal.h>, intprops.h.
14132         (INT_STRLEN_BOUND): Remove.
14133         * lib/strftime.c (TYPE_SIGNED): Remove.
14134         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14135         * lib/strtol.c: Adjust comments to match intprops.h.
14136         * lib/userspec.c: Include intprops.h.
14137         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14138         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14139         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14140         instead of rolling our own expressions.
14141         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14142
14143         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14144         instead of int.
14145         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14146         the right thing even if adding 1900 would overflow.  Similarly
14147         for tm_mon + 1 and tm_yday + 1.
14148         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14149         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14150         (DO_SIGNED_NUMBER): New macro.
14151         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14152
14153 2005-03-07  Bruno Haible  <bruno@clisp.org>
14154
14155         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14156
14157 2005-03-07  Bruno Haible  <bruno@clisp.org>
14158
14159         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14160
14161 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14162
14163         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14164         (func_import): Only replace files via --import when they have actually
14165         changed.
14166
14167 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14168
14169         * m4/mmap-anon.m4: New file.
14170         * m4/pagealign_alloc.m4: New file.
14171
14172 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14173             Bruno Haible  <bruno@clisp.org>
14174
14175         * modules/pagealign_alloc: New file.
14176         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14177
14178 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14179             Bruno Haible  <bruno@clisp.org>
14180
14181         * lib/pagealign_alloc.h: New file.
14182         * lib/pagealign_alloc.c: New file.
14183
14184 2005-03-03  Bruno Haible  <bruno@clisp.org>
14185
14186         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14187         Use an all-permissive copyright notice, recommended by RMS.
14188
14189 2005-03-02  Bruno Haible  <bruno@clisp.org>
14190
14191         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14192         of AIX, the replacement has to be done only after <string.h> is
14193         included, therefore not in config.h. stpncpy.h does the replacement,
14194         and stpncpy.c uses it.
14195
14196 2005-03-02  Bruno Haible  <bruno@clisp.org>
14197
14198         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14199         stpncpy.c uses it.
14200
14201 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14202
14203         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14204         The workaround isn't strictly needed for POSIX conformance, and
14205         it's too much of a pain to configure and maintain.  We'll ask
14206         people to fix their kernels instead.
14207         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14208         (NANOSLEEP_BUG_WORKAROUND): Remove.
14209         (xnanosleep): Remove the workaround.
14210
14211 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14212
14213         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14214         Reported by Derek Price.
14215         (Include): Add "timespec.h".
14216
14217         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14218
14219 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14220
14221         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14222         to detect nanosleep bug.
14223
14224 2005-03-01  Bruno Haible  <bruno@clisp.org>
14225
14226         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14227
14228 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14229
14230         * modules/gethrxtime: New file.
14231         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14232         (Depends-on): Add gethrxtime.
14233         (configure.ac): Add gl_XNANOSLEEP.
14234         (Makefile.am): Remove lib_SOURCES line.
14235
14236 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14237
14238         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14239         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14240
14241 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14242
14243         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14244         * lib/timespec.h (gettime): Return void, since it always
14245         succeeds now.  All uses changed.
14246         * lib/gettime.c (gettime) Likewise.
14247         [HAVE_NANOTIME]: Prefer nanotime.
14248         Assume gettimeofday succeeds, as POSIX requires.
14249         Assime time () succeeds, since other code already does.
14250         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14251         (timespec_subtract): Remove.
14252         (NANOSLEEP_BUG_WORKAROUND): New constant.
14253         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14254         things considerably.  Use it only on GNU/Linux hosts, since the
14255         workaround shouldn't be needed elsewhere.
14256
14257 2005-02-24  Bruno Haible  <bruno@clisp.org>
14258
14259         * modules/gettext (Files): Add m4/glibc2.m4.
14260
14261 2005-02-24  Bruno Haible  <bruno@clisp.org>
14262
14263         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14264         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14265         * m4/progtest.m4:
14266         Update from GNU gettext 0.14.2.
14267         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14268
14269 2005-02-24  Bruno Haible  <bruno@clisp.org>
14270
14271         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14272         * lib/config.charset: Update from GNU gettext 0.14.2.
14273
14274 2005-02-24  Bruno Haible  <bruno@clisp.org>
14275
14276         * lib/gettext.h: Update from GNU gettext 0.14.2.
14277
14278 2005-02-23  Simon Josefsson  <jas@extundo.com>
14279
14280         * m4/iconvme.m4: New file.
14281
14282 2005-02-23  Jim Meyering  <jim@meyering.net>
14283
14284         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14285         change.
14286         Thanks to Bruno Haible for catching it.
14287
14288 2005-02-22  Simon Josefsson  <jas@extundo.com>
14289
14290         * modules/iconvme: New file.
14291
14292         * MODULES.html.sh: Add iconvme.
14293
14294 2005-02-22  Simon Josefsson  <jas@extundo.com>
14295
14296         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14297
14298 2005-02-22  Simon Josefsson  <jas@extundo.com>
14299
14300         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14301
14302 2005-02-22  Jim Meyering  <jim@meyering.net>
14303
14304         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14305         s/ifndef/ifdef/.
14306
14307 2005-02-20  Neil Conway  <neilc@samurai.com>
14308
14309         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14310         returned by OSX/Darwin if the specified buffer is not large
14311         enough for the hostname.
14312
14313 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14314
14315         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14316         pass it to _help, otherwise the latter coredumps trying to
14317         dereference state.root_argp.
14318
14319 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * modules/chdir-long (Depends-on): Add memrchr.
14322         * modules/memrchr (Files): Add lib/memrchr.h.
14323         (Include): "memrchr.h".
14324
14325 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14326
14327         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14328
14329 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14330
14331         * lib/memrchr.h: New file.
14332         * lib/chdir-long.c: Include it.
14333         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14334         Don't bother including stddef.h.
14335
14336 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14337
14338         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14339         inclusion.
14340         Include <sys/types.h>, for dev_t.
14341         (ME_DUMMY, ME_REMOTE): Move from here....
14342         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14343         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14344         Dmitry V. Levin.
14345         Include mountlist.h first, to test the interface.
14346
14347 2005-01-29  Bruno Haible  <bruno@clisp.org>
14348
14349         * lib/progname.c (program_name): Initialize.
14350         Needed when linking statically on MacOS X.
14351
14352 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14353
14354         Sync from coreutils.
14355         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14356         (Depends-on): Add c-strtod.
14357         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14358
14359 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14360
14361         Sync from coreutils.
14362         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14363
14364         Remove files that are specific to coreutils.
14365         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14366
14367 2005-01-28  Bruno Haible  <bruno@clisp.org>
14368
14369         * modules/javacomp: New file.
14370         * MODULES.html.sh (Java): Add javacomp.
14371
14372 2005-01-28  Bruno Haible  <bruno@clisp.org>
14373
14374         * m4/javacomp.m4: New file, from GNU gettext.
14375
14376 2005-01-28  Bruno Haible  <bruno@clisp.org>
14377
14378         * lib/javacomp.sh.in: New file, from GNU gettext.
14379         * lib/javacomp.h: New file, from GNU gettext.
14380         * lib/javacomp.c: New file, from GNU gettext.
14381
14382 2005-01-26  Simon Josefsson  <jas@extundo.com>
14383
14384         * lib/gai_strerror.c: Use GPL in header.
14385
14386 2005-01-26  Bruno Haible  <bruno@clisp.org>
14387
14388         * modules/javaexec: New file.
14389         * MODULES.html.sh (Java): Add javaexec.
14390
14391 2005-01-26  Bruno Haible  <bruno@clisp.org>
14392
14393         * m4/javaexec.m4: New file, from GNU gettext.
14394
14395 2005-01-26  Bruno Haible  <bruno@clisp.org>
14396
14397         * lib/javaexec.sh.in: New file, from GNU gettext.
14398         * lib/javaexec.h: New file, from GNU gettext.
14399         * lib/javaexec.c: New file, from GNU gettext.
14400
14401 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14402
14403         * modules/lchown (Depends-on): Remove lchown.h
14404
14405 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14406
14407         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14408         must be defined if the header file was not found, in order
14409         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14410
14411 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14412
14413         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14414         initializers for struct pentry_state.
14415         (__argp_error): Check return value of __asprintf
14416         (__argp_failure): Translate error message
14417
14418         * lib/argp-parse.c: Removed braces around the expansion of N_()
14419
14420 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14421
14422         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14423         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14424         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14425         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14426         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14427         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14428         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14429         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14430         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14431         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14432         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14433         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14434         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14435         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14436         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14437         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14438         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14439         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14440         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14441         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14442         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14443         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14444         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14445         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14446         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14447         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14448         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14449         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14450         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14451         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14452         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14453         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14454         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14455         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14456         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14457         Use an all-permissive copyright notice, recommended by RMS.
14458
14459 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14460
14461         * modules/chdir-long (Depends-on): Remove mempcpy.
14462
14463 2005-01-21  Jim Meyering  <jim@meyering.net>
14464
14465         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14466         same value as for Solaris 9.
14467
14468         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14469         component length.  This included changing the parameter to be
14470         of type `char *' rather than `char const *'.
14471         * lib/chdir-long.h (chdir_long): Update prototype.
14472
14473         * lib/openat.c (fdopendir, fstatat): New functions.
14474         * lib/openat.h: Include headers required for use of DIR and struct
14475         stat.
14476         [AT_SYMLINK_NOFOLLOW]: Define.
14477         (fdopendir, fstatat): Add prototypes.
14478
14479 2005-01-21  Bruno Haible  <bruno@clisp.org>
14480
14481         * modules/classpath: New file.
14482         * MODULES.html.sh (Java): Add classpath.
14483
14484 2005-01-21  Bruno Haible  <bruno@clisp.org>
14485
14486         * lib/classpath.h: New file, from GNU gettext.
14487         * lib/classpath.c: New file, from GNU gettext.
14488
14489 2005-01-20  Simon Josefsson  <jas@extundo.com>
14490
14491         * modules/version-etc-fsf: New file.
14492
14493 2005-01-20  Simon Josefsson  <jas@extundo.com>
14494
14495         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14496         * lib/version-etc.c: Remove version_etc_copyright.
14497         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14498         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14499
14500 2005-01-20  Simon Josefsson  <jas@extundo.com>
14501
14502         * lib/base64.h (isbase64): Add.
14503
14504         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14505         using a unsigned prototype, don't inline.
14506         (base64_decode): Use it.
14507
14508 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14509
14510         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14511         it.
14512
14513 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14514
14515         * lib/save-cwd.c (save_cwd): Remove code to support the case
14516         where fchdir is missing or flaky.
14517
14518 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14519
14520         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14521
14522 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14523
14524         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14525         AC_LIBSOURCES now does this.
14526         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14527         with new ullong_max module.
14528
14529 2005-01-19  Bruno Haible  <bruno@clisp.org>
14530
14531         * modules/sh-quote: New file.
14532         * MODULES.html.sh (Executing programs): Add sh-quote.
14533
14534 2005-01-19  Bruno Haible  <bruno@clisp.org>
14535
14536         * lib/sh-quote.h: New file, from GNU gettext.
14537         * lib/sh-quote.c: New file, from GNU gettext.
14538
14539 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14540
14541         Merge from coreutils.
14542         * m4/ullong_max.m4: New file.
14543         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14544         (gl_MACROS): Assume localeconv exists.
14545
14546 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         Merge changes from coreutils, as described below in several
14549         changelogs dated today.
14550
14551         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14552         (O_DIRECTORY): Remove; not needed here, since "." must be
14553         a directory.  All uses removed.
14554         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14555         universal on Suns, and we also need to test for IRIX.
14556         Revamp code to use 'if' rather than '#if'.
14557         Avoid unnecessary comparison of cwd->desc to 0.
14558
14559         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14560         for known valid error numbers rather than observed invalid ones.
14561
14562 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14563
14564         * modules/ullong_max: New file.
14565
14566         * modules/chdir-long, modules/openat: New files.
14567         * modules/save-cwd (Depends-on): Depend on chdir-long.
14568         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14569
14570 2005-01-18  Jim Meyering  <jim@meyering.net>
14571
14572         Merge from coreutils.
14573         * m4/chdir-long.m4, m4/openat.m4: New files.
14574         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14575         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14576         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14577         is sane and DOES follow symlinks.  Besides, testing 20 different
14578         systems found no broken chown implementations.
14579         Prompted by a change in rsync's copy of this macro.
14580         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14581
14582         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14583
14584         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14585         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14586         NULL-means-set-to-current-time semantics.
14587         Remove temporary file immediately, rather than waiting
14588         for configure's at-exit trap code to do it.
14589
14590 2005-01-18  Jim Meyering  <jim@meyering.net>
14591
14592         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14593
14594         * lib/utimens.c (futimens): Account for the fact that futimes
14595         can also fail with errno == ENOSYS or errno == ENOENT.
14596         Patch from Dmitry V. Levin.
14597
14598         Change the name of the robust chdir function from chdir to chdir_long.
14599         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14600         (restore_cwd): Use chdir_long, not chdir.
14601         * lib/chdir-long.c: Renamed from chdir.c.
14602         * lib/chdir-long.h: Renamed from chdir.h.
14603         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14604         Hurd.
14605
14606 2005-01-18  Bruno Haible  <bruno@clisp.org>
14607
14608         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14609         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14610         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14611         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14612         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14613         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14614         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14615         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14616         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14617         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14618         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14619         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14620         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14621         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14622         Use an all-permissive copyright notice, recommended by RMS.
14623
14624 2005-01-18  Bob Proulx  <bob@proulx.com>
14625
14626         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14627         simplify offsetof() macro construct to avoid compile failure with
14628         native HP-UX 11.0 ANSI C compiler.
14629
14630 2005-01-17  Bruno Haible  <bruno@clisp.org>
14631
14632         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14633         redundant because stpncpy.m4 takes care of it.
14634
14635 2005-01-17  Bruno Haible  <bruno@clisp.org>
14636
14637         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14638
14639 2005-01-17  Bruno Haible  <bruno@clisp.org>
14640
14641         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14642         used.
14643
14644 2005-01-17  Bruno Haible  <bruno@clisp.org>
14645
14646         * lib/fwriteerror.h (fwriteerror): Change specification to include
14647         fclose.
14648         * lib/fwriteerror.c: Include <stdbool.h>.
14649         (fwriteerror): At the end, close the file stream. Record whether
14650         stdout was already closed.
14651
14652 2005-01-17  Bruno Haible  <bruno@clisp.org>
14653
14654         * lib/execute.c (environ): Declare if needed.
14655         * lib/pipe.c (environ): Likewise.
14656         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14657
14658 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14659
14660         * modules/argp: Depend on vsnprintf
14661
14662 2005-01-10  Jim Meyering  <jim@meyering.net>
14663
14664         * modules/closeout (Depends-on): Add atexit.
14665
14666 2005-01-06  Bruno Haible  <bruno@clisp.org>
14667
14668         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14669
14670 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14671
14672         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14673         definitions to be after all include files, to avoid collisions.
14674         Problem reported by Bob Proulx.
14675
14676 2005-01-04  Jim Meyering  <jim@meyering.net>
14677
14678         Changes imported from coreutils.
14679         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14680         as the mkstemp template, use a temporary directory and an
14681         8.3-friendly template to avoid trouble on systems like DJGPP.
14682         Reported by Juan M. Guerrero via Stepan Kasal.
14683         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14684         close. Remove the temporary directory right away, rather than waiting
14685         for configure's at-exit trap code to do it.
14686         Suggestion from Stepan Kasal.
14687
14688 2005-01-01  Simon Josefsson  <jas@extundo.com>
14689
14690         * gnulib-tool: Print #include directives when --import'ing.
14691
14692 2004-12-28  Simon Josefsson  <jas@extundo.com>
14693
14694         * tests/test-base64.c: Include required header files.  Remove
14695         unused variables.
14696
14697 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14698
14699         * modules/error (Depends-on): Remove gettext.
14700
14701 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14702
14703         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14704         not needed.  This removes a dependency on the gettext module.
14705         [defined _LIBC]: Do not include <libintl.h>; not needed.
14706
14707 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14708
14709         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14710         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14711
14712 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14713
14714         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14715         HAVE_DECL_STRTOLD.
14716
14717 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14718
14719         * modules/getdate (Depends-on): Remove alloca-opt.
14720
14721 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14722
14723         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14724
14725 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14726
14727         * lib/argp-parse.c: Include <stddef.h>.
14728         (alignof, alignto): New macros.
14729         (parser_init): Don't assume that void * is aligned sufficiently
14730         for struct option.
14731
14732         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14733         need to extend the stack.
14734         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14735         large.
14736
14737 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14738
14739         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14740
14741 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14742
14743         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14744         (2004-10-24) change.  Apparently this was a false alarm.
14745
14746         * modules/getdate: Depend on alloca-opt, not alloca.
14747
14748 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14749
14750         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14751         Remove now-obsolete comment about AIX.
14752         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14753         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14754         (YYMAXDEPTH): New macro.
14755
14756 2004-12-18  Simon Josefsson  <jas@extundo.com>
14757
14758         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14759
14760 2004-12-18  Bruno Haible  <bruno@clisp.org>
14761
14762         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14763
14764 2004-12-18  Bruno Haible  <bruno@clisp.org>
14765
14766         * lib/fatal-signal.c (fatal_signals): Make non-const.
14767         (init_fatal_signals): New function.
14768         (uninstall_handlers, install_handlers): Ignore signals that were set to
14769         SIG_IGN.
14770         (at_fatal_signal): Call init_fatal_signals.
14771         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14772         SIG_IGN.
14773         Reported by Paul Eggert.
14774
14775 2004-12-18  Bruno Haible  <bruno@clisp.org>
14776
14777         * doc/alloca.texi: New file.
14778         * doc/alloca-opt.texi: New file.
14779
14780 2004-12-17  Jim Meyering  <jim@meyering.net>
14781
14782         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14783         Otherwise, install-sh could exit with improper exit status when
14784         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14785
14786 2004-12-16  Simon Josefsson  <jas@extundo.com>
14787
14788         * tests/test-base64.c: Add license.
14789
14790 2004-12-15  Stepan Kasal  <address@hidden>
14791
14792         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14793
14794 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14795
14796         * modules/getcwd (Files): Add m4/d-ino.m4.
14797         Suggested by Mark D. Baushke.
14798
14799 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14800
14801         * lib/getdate.y (textint): New member "negative".
14802         (time_zone_hhmm): New function.
14803         Expect 14 shift-reduce conflicts, not 13.
14804         (o_colon_minutes): New rule.
14805         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14806         (yylex): Set the "negative" member of signed numbers.
14807
14808 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         * doc/getdate.texi (Time of day items, Time zone items):
14811         Describe new formats +00:00, UTC+00:00.
14812
14813 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14814
14815         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14816         spurious "-l"s.  Problem reported by Stepan Kasal.
14817
14818 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14819
14820         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14821         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14822
14823 2004-12-04  Simon Josefsson  <jas@extundo.com>
14824
14825         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14826         Vandoorselaere <yoann@prelude-ids.org>.
14827
14828 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14829
14830         Changes imported from coreutils.
14831         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14832         exist.
14833         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14834
14835 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14836
14837         Changes imported from coreutils.
14838         * lib/hard-locale.c: Assume <locale.h> exists.
14839         Include "strdup.h".
14840         (GLIBC_VERSION): New macro.
14841         (hard_locale): Assume setlocale exists.
14842         Rewrite to avoid #ifdef.
14843         Use strdup rather than malloc + strcpy.
14844         * lib/human.c: Assume <locale.h> exists.
14845         (human_readable): Assume localeconv exists.
14846
14847 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14848
14849         * modules/hard-locale (Depends-on): Add strdup.
14850
14851 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14852
14853         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14854         convert T2, not T.  (Imported from libc.)
14855
14856 2004-11-30  Simon Josefsson  <jas@extundo.com>
14857
14858         * modules/restrict (License): Change to LGPL.
14859
14860 2004-11-30  Simon Josefsson  <jas@extundo.com>
14861
14862         * m4/restrict.m4: Add copyright and copying conditions.
14863
14864 2004-11-30  Simon Josefsson  <jas@extundo.com>
14865
14866         * m4/base64.m4: New file.
14867
14868 2004-11-30  Simon Josefsson  <jas@extundo.com>
14869
14870         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14871         base64.
14872
14873         * tests/test-base64.c: New file.
14874
14875         * modules/base64: New file.
14876
14877 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14878
14879         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14880         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14881
14882         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14883
14884 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14885
14886         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14887         (__getcwd.c): Don't restore errno; glibc doesn't.
14888         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14889         first, falling back to our code only if its results look suspicious.
14890         Ensure that the resulting buffer is only as large as necessary.
14891
14892         * lib/readutmp.c: Include readutmp.h first.
14893         Include <errno.h>, since readutmp.h no longer does that.
14894         * lib/readutmp.h: Don't include <errno.h>,
14895         <sys/param.h>, <time.h>; not needed to establish interface.
14896         (errno): Remove decl.
14897         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14898         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14899         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14900
14901 2004-11-28  Simon Josefsson  <jas@extundo.com>
14902
14903         * lib/base64.h, base64.c: New file.
14904
14905 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14906
14907         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14908
14909 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14910
14911         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14912         (Depends-on): Remove pathmax, same.  Add mempcpy.
14913         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14914         (Makefile.am): Append getcwd.h to lib_SOURCES.
14915         (Include): Add getcwd.h.
14916         (Maintainer): Change from Jim Meyering to "all, glibc",
14917         since getdate now uses intended-for-glibc code.
14918         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14919         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14920
14921 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14922
14923         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14924         HP's ANSI C compiler.
14925         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14926         Declaring int functions causes warnings on some modern systems and
14927         shouldn't be needed to compile on ancient ones.
14928         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14929         defined.
14930
14931         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14932         with the following changes.
14933         (__set_errno): Parenthesize properly.
14934         Include <stdbool.h>.
14935         (MIN, MAX, MATCHING_INO): New macros.
14936         (__getcwd): Define with prototype, not K&R form.
14937         Use heuristics to allocate default buffer on stack if possible.
14938         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14939         behavior, and to avoid the PATH_MAX limit when computing
14940         ../../../../...
14941         Use MATCHING_INO to compare inode number to file.
14942         Check for arithmetic overflow in size calculations.
14943         Fix bug in reallocation of dot array that caused getcwd to fail
14944         on directories nested deeper than 75.
14945         Be more careful about saving errno on error.
14946         Do not use realloc; use only free+malloc, as this is a bit
14947         more flexible and avoids a needless copy operation.
14948         Do not inspect st_dev and st_ino for symbolic links; POSIX
14949         doesn't specify the latter.
14950         Check for closedir errors.
14951         Avoid needless casts.
14952         Use "#ifdef weak_alias" around weak_alias, to be like other
14953         glibc code.
14954         The following changes to getcwd.c have effect only when used in
14955         gnulib; they have no effect inside glibc proper.
14956         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14957         as alloca isn't used.
14958         (alloca, __alloca): Likewise.
14959         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14960         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14961         unconditionally, as gnulib assumes C89 or better.
14962         Do not include <sys/param.h>.
14963         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14964         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14965         better.
14966         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14967         Include <dirent.h> in a way that is compatible with modern Autoconf.
14968         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14969         New macros, if not already defined.
14970         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14971         Use "_LIBC", not "defined _LIBC", for consistency.
14972         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
14973         a mempcpy module.
14974         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
14975         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
14976         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
14977         credit only to Jim Meyering and adjust the copyright dates.
14978         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
14979         <stdlib.h>, <unistd.h>, "pathmax.h".
14980         Instead, include "xgetcwd.h" (first) and "getcwd.h".
14981         (INITIAL_BUFFER_SIZE): Remove.
14982         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
14983
14984 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14985
14986         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
14987         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
14988         Use the _ONCE methods, for efficiency.
14989         Check for fcntl.h.  In test program, include <errno.h>
14990         and <fcntl.h> if available.  Remove old K&R cruft from
14991         test program.  Check for common errors in GNU/Linux,
14992         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
14993         don't do AC_LIBOBJ, as that's getcwd.m4's job.
14994         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
14995         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
14996         name accordingly.
14997         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
14998         accommodate new getcwd.c.
14999         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15000         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15001         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15002         that's all we need now.
15003
15004 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15005
15006         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15007         argp-parse.c depends on getopt internals, that means we should
15008         always use our getopt, to be on the safe side.
15009         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15010         order not to spoil the result of an eventual previous invocation
15011         of gl_GETOPT_SUBSTITUTE.
15012
15013 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15014
15015         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15016         redefinition warnings. To avoid them, include the defines
15017         in `#if !defined __need_getopt ... #endif'. The only place
15018         where __getopt_argv_const is used is in definitions
15019         of getopt_long and getopt_long_only below, which are as well
15020         protected by `#ifndef __need_getopt'.
15021         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15022         __need_getopt after including <stdio.h> and <unistd.h> These
15023         headers might have defined it.
15024
15025 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15026
15027         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15028
15029 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15030
15031         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15032         (futimens): New function, which uses futimes if available.
15033         (futimens, utimens): Support timespec==NULL, with same semantics
15034         as utime and utimens.
15035         * lib/utimens.h (futimens): New decl.
15036
15037 2004-11-23  Jim Meyering  <jim@meyering.net>
15038
15039         * lib/getopt_.h: Remove trailing blanks.
15040
15041 2004-11-23  Jim Meyering  <jim@meyering.net>
15042
15043         * lib/__fpending.c: Add comment.
15044
15045 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15046
15047         * modules/canonicalize (Depends-on): Add xreadlink.
15048         Problem reported by James Youngman.
15049
15050 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15051
15052         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15053         New macros.
15054         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15055         optopt): Use them instead of invoking ## directly; otherwise, the
15056         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15057
15058 2004-11-19  Bruno Haible  <bruno@clisp.org>
15059
15060         * lib/strtok_r.c: Move comments from here...
15061         * lib/strtok_r.h: ... to here.
15062
15063 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15064
15065         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15066         implementations that mishandle size_t overflow.
15067
15068 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15069
15070         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15071         might fail.  Problem reported by Yoann Vandoorselaere.
15072         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15073         implementations that mishandle size_t overflow.
15074
15075 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15076
15077         * modules/canon-host (Depends-on): Add strdup.
15078
15079 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15080
15081         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15082
15083 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15084
15085         * lib/canon-host.c: Include "strdup.h".
15086         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15087         Use strdup instead of malloc/strcpy to duplicate strings.
15088
15089         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15090         (human_space_before_unit): New constant.
15091         * lib/human.c (human_readable): Support it.
15092
15093         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15094         (xgetcwd): Set errno correctly when failing.
15095         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15096         the failure is actually due to a PATH_MAX problem.
15097
15098         Further getopt changes to make it more likely that glibc will
15099         buy the changes back.
15100         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15101         (getopt): Use it, so to preserve glibc semantic
15102         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15103         when compiling for libc.
15104         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15105         (getopt_long, getopt_long_only): Use it.
15106
15107         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15108         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15109         (getopt): Argv is now char * const *, as per standard.
15110         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15111         not char *__getopt_argv_const *.
15112         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15113         _getopt_long_only_r): Likewise.
15114         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15115         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15116         _getopt_long_r, _getopt_long_only_r): Likewise.
15117         * lib/getopt_.h (__getopt_argv_const): Remove.
15118         (getopt): Argv is now char * const *, as per standard.
15119
15120         * lib/getdate.y (tORDINAL): New token.
15121         (day, relunit): Allow it for relative times.
15122         (relative_time_table): Use tORDINAL for ordinals.
15123
15124 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15125
15126         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15127         Document that "second" isn't allowed as an ordinal number.
15128
15129 2004-11-16  Jim Meyering  <jim@meyering.net>
15130
15131         * modules/closeout (Depends-on): Add fpending.
15132
15133 2004-11-15  Jim Meyering  <jim@meyering.net>
15134
15135         * lib/closeout.c: Include "__fpending.h" once again.
15136         Include <stdbool.h>.
15137         (close_stdout): Don't fail just because stdout was closed initially,
15138         since some programs don't write to stdout in the normal course of
15139         operation (other than --version and --help), and we don't want this
15140         function to make e.g. `touch file >&-' fail.
15141         But do fail if it was closed and someone has tried to write to it.
15142         E.g., `printf foo >&-' must fail.
15143
15144 2004-11-13  Jim Meyering  <jim@meyering.net>
15145
15146         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15147
15148 2004-11-12  Simon Josefsson  <jas@extundo.com>
15149
15150         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15151         small doc fix is still pending.
15152
15153 2004-11-11  Simon Josefsson  <jas@extundo.com>
15154
15155         * modules/strtok_r: New file.
15156
15157         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15158         strtok_r.
15159
15160 2004-11-11  Simon Josefsson  <jas@extundo.com>
15161
15162         * m4/strtok_r.m4: New file.
15163
15164         * m4/getopt.m4: Replace opterr.
15165
15166 2004-11-11  Simon Josefsson  <jas@extundo.com>
15167
15168         * lib/strtok_r.h, strtok_r.c: New file.
15169
15170 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15171
15172         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15173         of replacing opterr, getopt, etc.  This should handle the
15174         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15175
15176 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15177
15178         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15179         we can stop lying to compilers about the constness of argv when we
15180         are compiled outside glibc.
15181         (getopt, getopt_long, getopt_long_only): Use it.
15182         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15183         _getopt_internal, getopt): Likewise.
15184         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15185         _getopt_long_only_r): Likewise.
15186         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15187         _getopt_long_r, _getopt_long_only_r): Likewise.
15188
15189         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15190         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15191         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15192         the other external symbols.
15193         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15194         declaration, since the above renaming now works around collisions.
15195
15196 2004-11-11  Jim Meyering  <jim@meyering.net>
15197
15198         * lib/linebreak.c: Remove trailing blanks.
15199         * lib/alloca_.h: Likewise.
15200         * lib/acosl.c: Likewise.
15201         * lib/euidaccess.c: Likewise.
15202         * lib/allocsa.h: Likewise.
15203
15204 2004-11-10  Simon Josefsson  <jas@extundo.com>
15205
15206         * m4/getaddrinfo.m4: New file.
15207
15208 2004-11-10  Simon Josefsson  <jas@extundo.com>
15209
15210         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15211
15212 2004-11-10  Simon Josefsson  <jas@extundo.com>
15213
15214         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15215         getaddrinfo.
15216
15217         * modules/getaddrinfo: New file.
15218
15219 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15220
15221         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15222
15223 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15224
15225         * lib/mktime.c (SHR): New macro, which is a portable
15226         substitute for >> that should work even on Crays.
15227         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15228         Problem reported by Mark D. Baushke in
15229         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15230         * lib/getdate.y (SHR): Likewise.
15231         (tm_diff): Use it.
15232         * lib/strftime.c (SHR): Likewise.
15233         (tm_diff): Use it.
15234         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15235         quote_these_too, so that right shifts are well defined.  All uses
15236         changed.
15237
15238 2004-11-10  Jim Meyering  <jim@meyering.net>
15239
15240         Ensure that no close failure goes unreported.
15241         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15242         return early when it seems there's nothing to flush.
15243         Don't include __fpending.h.
15244
15245 2004-11-10  Jim Meyering  <jim@meyering.net>
15246
15247         * modules/closeout (Depends-on): Remove fpending.
15248
15249 2004-11-10  Jim Meyering  <jim@meyering.net>
15250
15251         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15252
15253 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15254
15255         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15256         gl_FUNC_STRFTIME.
15257         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15258         and AC_REQUIRE when possible, to avoid duplicate checks.
15259         Check for <wchar.h>.
15260
15261 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15262
15263         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15264
15265 2004-11-09  Bruno Haible  <bruno@clisp.org>
15266
15267         * m4/sockpfaf.m4: New file.
15268
15269 2004-11-05  Bruno Haible  <bruno@clisp.org>
15270
15271         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15272         Reported by Mark D. Baushke <mdb@cvshome.org>.
15273
15274 2004-11-04  Bruno Haible  <bruno@clisp.org>
15275
15276         2004-09-11  Bruno Haible  <bruno@clisp.org>
15277                 * allocsa.valgrind: New file.
15278         2004-02-06  Bruno Haible  <bruno@clisp.org>
15279                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15280                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15281                 Reported by Christopher Seip <chris.seip@hp.com>.
15282
15283 2004-11-04  Bruno Haible  <bruno@clisp.org>
15284
15285         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15286         (Makefile.am): Distribute it.
15287
15288 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15289
15290         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15291         with errno == ERANGE if the buffer is too small.
15292         Problem reported by Mark D. Baushke.
15293
15294 2004-11-03  Albert Chin  <china@thewrittenword.com>
15295             Paul Eggert  <eggert@cs.ucla.edu>
15296
15297         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15298         equivalent, substitute $ac_type for equivalent type rather than
15299         blindly using uint32_t *always* which won't work if uint32_t is not
15300         available.  Define _UINT32_T to work around typedef of uint32_t if
15301         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15302         2.5.1.
15303
15304 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15305
15306         * m4/jm-macros.m4: Sync from coreutils.
15307         (gl_MACROS): Check for mbrlen, for pathchk.
15308         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15309
15310 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15311
15312         * lib/xreadlink.c (MAXSIZE): New macro.
15313         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15314         size does not exceed MAXSIZE.  Avoid cast.
15315         As suggested by Mark D. Baushke in
15316         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15317         if readlink fails with buffer size just under MAXSIZE, try again
15318         with MAXSIZE.
15319
15320 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15321
15322         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15323
15324 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15325         and  Paul Eggert  <eggert@cs.ucla.edu>
15326
15327         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15328         (get_date): Overparenthesize to avoid GCC warning.
15329
15330 2004-11-02  Bruno Haible  <bruno@clisp.org>
15331
15332         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15333         returns void.
15334
15335 2004-11-02  Bruno Haible  <bruno@clisp.org>
15336
15337         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15338         function returns void.
15339
15340 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15341
15342         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15343         fflush_unlocked, flockfile, funlockfile, funlockfile,
15344         fputs_unlocked, putc_unlocked.
15345
15346 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15347
15348         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15349         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15350         already declared.
15351
15352 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15353
15354         * modules/getdate (Files): Add doc/getdate.texi.
15355         (Depends-on): Add setenv, xalloc.
15356
15357 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15358
15359         * lib/getdate.y: Add support for TZ="foo" within a date string.
15360         Fix some bugs near time_t boundaries.  Reject dates with
15361         out-of-range components, e.g., "Sept 31".
15362         Include <stdlib.h>, "setenv.h", "xalloc.h".
15363         (ISDIGIT_LOCALE): Remove; unused.
15364         Note that the TZ and time functions used here are not reentrant.
15365         (mktime_ok, get_tz): New functions.
15366         (TZBUFSIZE): New constant.
15367         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15368         This requires that we sometimes generate our own TZ="XXX..." setting.
15369
15370 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15371
15372         * doc/getdate.texi: New file, from coreutils with modifications for
15373         the new TZ parsing.
15374
15375 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15376
15377         * lib/mktime.c (not_equal_tm): Remove redundant check.
15378
15379 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15380
15381         * modules/regex (lib_SOURCES): Add regex.c.
15382         Reported by James Youngman in
15383         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15384
15385 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15386
15387         * lib/getdate.y: Use Bison 1.875 features, and some minor
15388         code cleanups.  This change does not affect semantics.
15389         Don't include <stdlib.h>; no longer needed.
15390         Don't include unlocked-io.h; only the "#if TEST" code uses
15391         stdio, and performance isn't crucial there.
15392         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15393         Bison 1.875 features as described below.
15394         All uses of "PC." replaced by "pc->".
15395         (YYSTYPE): Add a forward declaration.
15396         (yylex, yyerror): Use full prototypes in forward decls.
15397         Use "%pure-parser" rather than obsolescent "%pure_parser".
15398         Use %parse-param and %lex-param instead of obsolescent
15399         YYPARSE_PARAM and YYLEX_PARAM.
15400         (meridian_table, month_and_day_table, time_units_table,
15401         relative_time_table, time_zone_table, military_table,
15402         lookup_zone, lookup_word, get_date):
15403         Use NULL instead of 0 where appropriate.
15404         (to_hour): Avoid abort (), to avoid a dependency on
15405         stdlib.h.
15406         (yyerror, yylex): Now accepts parser_control * arg.
15407         (main) [TEST]: Use '\0' rather than 0 for char.
15408
15409 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15410
15411         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15412
15413 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15414
15415         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15416         It's now the caller's responsibility to handle the case where
15417         !HAVE_GETPAGESIZE && !defined getpagesize.
15418
15419         * lib/mktime.c (leapyear): Arg is long int, not int.
15420
15421 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15422
15423         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15424
15425 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15426
15427         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15428         missing.  Problem reported by James Youngman.
15429
15430 2004-10-16  Simon Josefsson  <jas@extundo.com>
15431
15432         * gnulib-tool: Fix comments.  Fix parse problem.
15433         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15434
15435 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15436
15437         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15438         implementation of getopt_long.  Problem reported by Alexander Taler in:
15439         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15440
15441 2004-10-15  Bruno Haible  <bruno@clisp.org>
15442
15443         * gnulib-tool: Untabify. Initialize supplied_libname.
15444         (func_usage): More homogenous output.
15445         (func_modules_transitive_closure, func_modules_to_filelist,
15446         func_emit_lib_Makefile_am): New functions.
15447         (func_import): New function, extracted from big case statement. Use
15448         func_get_license, func_modules_transitive_closure,
15449         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15450         opt_lgpl. Don't use test -a, as it's not portable.
15451         (func_create_testdir): Use func_modules_transitive_closure,
15452         func_modules_to_filelist, func_emit_lib_Makefile_am.
15453
15454 2004-10-15  Bruno Haible  <bruno@clisp.org>
15455
15456         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15457
15458 2004-10-15  Bruno Haible  <bruno@clisp.org>
15459
15460         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15461         the portions belonging to each module.
15462         Suggested by Derek Robert Price <derek@ximbiot.com>.
15463
15464 2004-10-12  Simon Josefsson  <jas@extundo.com>
15465
15466         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15467         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15468         to real functions.
15469
15470 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15471
15472         * modules/vsnprintf: New file.
15473
15474 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15475
15476         * m4/vsnprintf.m4: New file.
15477
15478 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15479
15480         * lib/vsnprintf.h: New file.
15481         * lib/vsnprintf.c: New file.
15482
15483 2004-10-11  Bruno Haible  <bruno@clisp.org>
15484
15485         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15486         vsnprintf.
15487
15488 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15489
15490         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15491
15492 2004-10-07  Bruno Haible  <bruno@clisp.org>
15493
15494         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15495         fits into the provided buffer.
15496
15497 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15498
15499         * lib/diacrit.c, diacrit.h: Add GPL notice.
15500
15501         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15502         notice.
15503         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15504         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15505         This avoids a potential constant-folding bug.
15506
15507 2004-10-05  Bruno Haible  <bruno@clisp.org>
15508
15509         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15510         for the declaration of strsep.
15511
15512 2004-10-05  Bruno Haible  <bruno@clisp.org>
15513
15514         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15515
15516 2004-10-04  Simon Josefsson  <jas@extundo.com>
15517
15518         * modules/memmem: New file.
15519         * tests/test-memmem.c: New file.
15520         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15521
15522 2004-10-04  Simon Josefsson  <jas@extundo.com>
15523
15524         * m4/memmem.m4: New file.
15525
15526 2004-10-04  Simon Josefsson  <jas@extundo.com>
15527
15528         * lib/memmem.h: New file.
15529         * lib/memmem.c: New file, taken from glibc.
15530
15531 2004-10-04  Simon Josefsson  <jas@extundo.com>
15532
15533         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15534         '#ifdef USE_UNLOCKED_IO'.
15535
15536 2004-10-04  Simon Josefsson  <jas@extundo.com>
15537
15538         * config/srclist.txt: Add memmem from glibc.
15539
15540 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15541
15542         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15543
15544         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15545         modules/exclude, modules/getdate, modules/getline,
15546         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15547         modules/getusershell, modules/linebuffer, modules/md5,
15548         modules/mountlist, modules/posixtm, modules/readtokens,
15549         modules/readutmp, modules/regex, modules/sha1,
15550         modules/version-etc, modules/yesno:
15551         Remove dependency on unlocked-io.
15552
15553 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15554
15555         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15556
15557         * m4/unlocked-io.m4: Add copyright notice.
15558         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15559
15560 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15563         * lib/xmalloc.c (xmemdup): Likewise.
15564         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15565         XFREE): Remove these long-obsolescent macros.
15566         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15567         * lib/xstrdup.c: Remove.
15568
15569         * lib/regex.c (re_comp): Cast gettext return value to char *,
15570         Problem reported by Martin Neitzel via Mark D. Baushke.
15571
15572 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15573
15574         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15575         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15576         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15577         regex.c, sha1.c, version-etc.c, yesno.c:
15578         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15579         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15580         the includer's responsibility.
15581
15582         Sync from coreutils.
15583
15584         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15585         points to the start of a string, as the C Standard says the
15586         resulting behavior is undefined.
15587
15588         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15589         simple -> simple_backups, numbered_existing ->
15590         numbered_existing_backups, numbered -> numbered_backups
15591         to avoid shadowing problems.  All uses changed.
15592         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15593         * lib/backupfile.c (check_extension, numbered_backup):
15594         Rename locals to avoid shadowing 'basename'.
15595         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15596         once.
15597
15598         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15599         * lib/.cvsignore: Add getopt.h.
15600
15601 2004-10-04  Bruno Haible  <bruno@clisp.org>
15602
15603         * modules/README: New file.
15604         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15605         not a module.
15606
15607 2004-10-02  Jim Meyering  <jim@meyering.net>
15608
15609         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15610
15611 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15612
15613         * modules/strsep: New file.
15614
15615 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15616
15617         * m4/strsep.m4: New file.
15618
15619 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15620
15621         * lib/strsep.h: New file.
15622         * lib/strsep.c: New file.
15623
15624 2004-10-01  Simon Josefsson  <jas@extundo.com>
15625
15626         * lib/snprintf.c (snprintf): Handle size==0.
15627
15628 2004-10-01  Simon Josefsson  <jas@extundo.com>
15629             Bruno Haible  <bruno@clisp.org>
15630
15631         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15632         (snprintf): Declare 'args'.
15633
15634 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15635
15636         * lib/snprintf.c: Remove comments as to why each header is needed.
15637
15638 2004-10-01  Bruno Haible  <bruno@clisp.org>
15639
15640         * MODULES.html.sh: Add strsep.
15641
15642 2004-09-30  Simon Josefsson  <jas@extundo.com>
15643
15644         * modules/snprintf: New file.
15645
15646 2004-09-30  Simon Josefsson  <jas@extundo.com>
15647
15648         * m4/snprintf.m4: New file.
15649
15650 2004-09-30  Simon Josefsson  <jas@extundo.com>
15651
15652         * lib/snprintf.h, lib/snprintf.c: New files.
15653
15654 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15655
15656         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15657         (hol_entry_help): Never translate an empty string.
15658         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15659         * lib/argp.h (OPTION_NO_TRANS): New option.
15660
15661 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * modules/argp (Maintainer): Replace Simon Josefsson
15664         by Sergey Poznyakoff.
15665
15666 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15669         changes merged back into glibc.
15670
15671 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15672
15673         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15674
15675 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15676
15677         * lib/xvasprintf.c: Include xalloc.h.
15678         (xvasprintf): Use xalloc_die, not xmalloc_die.
15679
15680 2004-09-29  Bruno Haible  <bruno@clisp.org>
15681
15682         * modules/alloca-opt: New file, derived from modules/alloca.
15683         * modules/allocsa: Depend on alloca-opt instead of alloca.
15684         * modules/setenv: Likewise.
15685         * modules/vasnprintf: Likewise.
15686         * MODULES.html.sh: Add alloca-opt.
15687
15688 2004-09-28  Simon Josefsson  <jas@extundo.com>
15689
15690         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15691         LGPL, and to replace license template from GPL to LGPL.
15692
15693 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15694
15695         * modules/dummy: Change license to LGPL.
15696
15697 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15698
15699         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15700
15701 2004-09-24  Simon Josefsson  <jas@extundo.com>
15702
15703         * modules/minmax (License): Change from GPL to LGPL.
15704
15705 2004-09-23  Simon Josefsson  <jas@extundo.com>
15706
15707         * gnulib-tool (--import): Typo.
15708
15709 2004-09-23  Simon Josefsson  <jas@extundo.com>
15710
15711         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15712
15713 2004-09-22  Bruno Haible  <bruno@clisp.org>
15714
15715         * modules/*: Add 'License' field.
15716         * gnulib-tool: Accept --extract-license option.
15717         (func_get_license): New function.
15718
15719 2004-09-21  Bruno Haible  <bruno@clisp.org>
15720
15721         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15722         Reported by Simon Josefsson.
15723
15724 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15725
15726         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15727         gl_AC_TYPE_LONG_LONG.
15728
15729 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15730
15731         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15732
15733 2004-09-18  Simon Josefsson  <jas@extundo.com>
15734         and  Paul Eggert  <eggert@cs.ucla.edu>
15735
15736         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15737         calls with autoreconf.  Define GL_LIB.
15738
15739 2004-09-14  Karl Berry  <karl@gnu.org>
15740
15741         * config/srclist.txt: unsync setenv.c, sigh.
15742
15743 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15744
15745         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15746         Problem reported by Bruno Haible in:
15747         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15748
15749 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15750
15751         * config/srclist.txt: Comment out argp-pvh.c.
15752
15753 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15756         in case some system header has #define'd it.  Problem reported by
15757         Soeren D. Schulze in
15758         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15759
15760 2004-09-09  Karl Berry  <karl@gnu.org>
15761
15762         * regex.[ch]: delete from the root.  These were supposed to be
15763                 synced with emacs cvs, but this has not happened for about
15764                 a year, and anyway nothing else uses emacs regex.[ch].
15765                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15766                 lib/regex[.ch] is untouched.
15767
15768 2004-09-09  Bruno Haible  <bruno@clisp.org>
15769
15770         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15771
15772 2004-09-09  Bruno Haible  <bruno@clisp.org>
15773
15774         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15775         modifications.
15776         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15777
15778 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15779
15780         * modules/xvasprintf: New file.
15781         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15782
15783 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15784
15785         * lib/xvasprintf.h: New file.
15786         * lib/xvasprintf.c: New file.
15787         * lib/xasprintf.c: New file.
15788
15789 2004-09-08  Bruno Haible  <bruno@clisp.org>
15790
15791         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15792
15793 2004-09-08  Bruno Haible  <bruno@clisp.org>
15794
15795         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15796         length is > INT_MAX.
15797         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15798         more.
15799
15800 2004-09-08  Bruno Haible  <bruno@clisp.org>
15801
15802         * lib/stdint_.h: New file, taken from GNU clisp.
15803
15804 2004-09-08  Bruno Haible  <bruno@clisp.org>
15805             Oskar Liljeblad  <oskar@osk.mine.nu>
15806
15807         * modules/stdint: New file.
15808         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15809
15810 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15811
15812         Import from coreutils.
15813         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15814         strings on unbounded length.  alloca's performance benefits aren't
15815         that important here.
15816         (V_STRDUP): Remove.
15817         (parse_with_separator): New function, with most of the internals
15818         of the old parse_user_spec.  Allow user to omit both user and group,
15819         for compatibility with FreeBSD.
15820         Clone only the user name, not the entire spec.
15821         Do not set *uid, *gid unless entirely successful.
15822         Avoid memory leak in some failing cases.
15823         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15824         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15825         (parse_user_spec): Rewrite to use parse_with_separator.
15826
15827 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15828
15829         * modules/userspec: Don't depend on alloca.
15830
15831 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15832
15833         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15834
15835 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15836
15837         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15838         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15839         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15840
15841 2004-08-16  Simon Josefsson  <jas@extundo.com>
15842
15843         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15844         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15845         Add --dry-run for --import.
15846         Let user provided command line parameters override configure.ac
15847         settings.
15848
15849 2004-08-12  Simon Josefsson  <jas@extundo.com>
15850
15851         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15852         as discussed with Paul Eggert in threads rooted at
15853         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15854         and
15855         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15856         Before, the test was empty, and relied on ELIDE_CODE in source
15857         code.)
15858         (gl_PREREQ_GETOPT): New macro.
15859         (gl_GETOPT): Use them.
15860
15861 2004-08-12  Simon Josefsson  <jas@extundo.com>
15862
15863         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15864         * lib/getopt_.h: Renamed from getopt.h.
15865
15866 2004-08-12  Simon Josefsson  <jas@extundo.com>
15867
15868         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15869         Change default library name from libfoo to libgnu.
15870         Now, if you have a configure.ac that says:
15871                 gl_SOURCE_BASE(gl)
15872                 gl_M4_BASE(gl/m4)
15873                 gl_MODULES(error getopt etcetera)
15874                 gl_INIT
15875         you can import all you need by running:
15876                 ../gnulib/gnulib-tool --import
15877
15878         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15879         (Makefile.am): Rewrite, use logic from argz.
15880         (Include): Use <getopt.h> instead of "getopt.h".
15881
15882 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15883
15884         * modules/argp (Files): Add m4/unlocked-io.m4.
15885         (Depends-on): Add extensions.
15886
15887 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15888
15889         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15890         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15891         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15892         Check for program_invocation_name, program_invocation_short_name,
15893         flockfile, funlockfile, features.h, _getopt_long_only_r.
15894
15895 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15896
15897         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15898         its complicated substitute.
15899         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15900         and program_invocation_name.
15901         (__argp_basename) [!_LIBC]: Remove; the only use was
15902         replaced by its body.
15903         (__argp_short_program_name): Change condition from
15904         !defined __argp_short_program_name to
15905         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15906         to match argp-namefrob.h.
15907         (__argp_failure): Don't assume strerror_r returns char *.
15908         * lib/argp-parse.c (N_): Define unconditionally.
15909         (argp_default_options): Fill out initializers with 0 to avoid
15910         gcc warnings.
15911
15912 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15913
15914         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15915         getopt1.c.
15916
15917 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15918
15919         Merge from coreutils.
15920
15921         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15922
15923         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15924         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15925
15926 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15927
15928         Merge from coreutils.
15929
15930         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15931         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15932         for Reliant Unix 5.43.
15933
15934         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15935         (union fooround): Use uintmax_t, not long int.
15936         The rest is a merge from libc:
15937         [defined _LIBC]: Include <shlib-compat.h>.
15938         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15939
15940         * lib/settime.c (settime): Recode to avoid warning with
15941         Sun Forte C 6U2.
15942
15943         * lib/strverscmp.c: Convert to UTF-8.
15944
15945 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15946
15947         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15948         m4/uintmax_t.m4.
15949
15950 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15951
15952         * modules/xalloc-die: New file.
15953         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15954
15955         * modules/md5 (Files): Add m4/uint32_t.m4.
15956         * modules/sha1: Renamed from modules/sha.
15957         (Files):
15958         Rename lib/sha.h to lib/sha1.h.
15959         Rename lib/sha.c to lib/sha1.c.
15960         Rename m4/sha.m4 to m4/sha1.m4.
15961         (lib_SOURCES): Likewise.
15962         (configure.ac): Rename gl_SHA to gl_SHA1.
15963         (Include): sha.h -> sha1.h.
15964
15965 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15966
15967         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15968         * m4/sha1.m4: Renamed from sha.m4.
15969         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15970
15971 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15972
15973         * lib/obstack.h (obstack_empty_p):
15974         Don't assume that chunk->contents is suitably aligned.
15975         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
15976         Likewise. Problem reported by Benno in
15977         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
15978
15979         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
15980         readable.  This could be improved further but it'd take some work.
15981
15982 2004-08-08  Simon Josefsson  <jas@extundo.com>
15983
15984         * modules/xgethostname (Depends-on): Remove exit and error (not
15985         used).
15986
15987         * modules/getpass-gnu: Add getpass.h.
15988         (Depends-on): Add stdbool.
15989         * modules/getpass: Add getpass.h.
15990
15991 2004-08-08  Simon Josefsson  <jas@extundo.com>
15992
15993         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
15994         Check getpass declaration.
15995
15996 2004-08-08  Simon Josefsson  <jas@extundo.com>
15997
15998         * lib/xgethostname.c: Don't include error.h (not used).
15999
16000         * lib/getpass.h: Add.
16001         * lib/getpass.c: Include getpass.h first.
16002
16003 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16004
16005         * lib/xalloc-die.c: New file.
16006         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16007         All uses removed.
16008         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16009         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16010         xalloc-die.c.
16011         (_, N_, xalloc_die): Move to xalloc-die.c.
16012         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16013         so that we needn't mess with xalloc_msg_memory_exhausted.
16014
16015         * lib/sha1.h: Renamed from sha.h.
16016         (SHA1_H): Renamed from _SHA_H.
16017         (sha1_ctx): Renamed from sha_ctx.
16018         (sha1_init_ctx): Renamed from sha_init_ctx.
16019         (sha1_process_block): Renamed from sha_process_block.
16020         (sha1_process_bytes): Renamed from sha_process_bytes.
16021         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16022         (sha1_read_ctx): Renamed from sha_read_ctx.
16023         (sha1_stream): Renamed from sha_stream.
16024         (sha1_buffer): Renamed from sha_buffer.
16025         * lib/sha1.c: Likewise; renamed from sha.c.
16026         Do not include <sys/types.h>.
16027         Include <stddef.h> rather than <stdlib.h>.
16028
16029 2004-08-08  Bruno Haible  <bruno@clisp.org>
16030
16031         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16032         FILESYSTEM_PREFIX_LEN.
16033         * lib/progreloc.c: Likewise.
16034         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16035
16036 2004-08-06  Simon Josefsson  <jas@extundo.com>
16037
16038         * modules/progname (Depends-on): Don't depend on stdbool.
16039
16040 2004-08-06  Simon Josefsson  <jas@extundo.com>
16041
16042         * modules/getsubopt: New file.
16043         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16044         getsubopt.
16045
16046 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16047
16048         More merge from coreutils.
16049
16050         * m4/utimens.m4, m4/utimecmp.m4: New files.
16051         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16052         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16053         prereq.m4, sha.m4: Import changes from coreutils.
16054
16055 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16056
16057         More merge from coreutils.
16058         * modules/raise, modules/readtokens0, modules/utimens:
16059         * modules/utimecmp, module/xnanosleep: New files.
16060         * modules/strftime: Add lib/strftime.h.
16061         Change include from <time.h> to "strftime.h".
16062         * modules/yesno: Add lib/yesno.h.
16063         * modules/backupfile: Remove lib/addext.c.
16064         * modules/euidaccess: Add stat-macros.h.
16065         * modules/canonicalize, modules/euidaccess,
16066         modules/filemode, modules/lchown, modules/makepath,
16067         modules/rmdir, modules/stat: Likewise.
16068
16069 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16070
16071         Merge from tar.
16072         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16073         SIZE_MAX is a valid preprocessor constant.
16074         (__argp_basename): Change from "#ifndef _LIBC"
16075         to "#ifndef __argp_short_program_name", so that
16076         we don't compile these functions for tar.
16077
16078         More merges from coreutils.
16079         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16080         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16081         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16082         * lib/addext.c: Remove; no longer needed.
16083         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16084         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16085         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16086         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16087         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16088         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16089         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16090         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16091         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16092         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16093         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16094         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16095         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16096         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16097         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16098         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16099         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16100         Import changes from coreutils.
16101
16102 2004-08-05  Simon Josefsson  <jas@extundo.com>
16103
16104         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16105
16106 2004-08-05  Simon Josefsson  <jas@extundo.com>
16107
16108         * m4/getsubopt.m4: New file.
16109
16110 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16111
16112         Merge from coreutils.
16113
16114         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16115         * m4/getcwd-path-max.m4: New files.
16116
16117         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16118         FILESYSTEM_PREFIX_LEN ->
16119         FILE_SYSTEM_PREFIX_LEN.
16120         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16121         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16122         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16123         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16124
16125         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16126         prerequisite modules now handle the DOS stuff.
16127         Don't check for unistd.h.
16128
16129 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16130
16131         Merge from coreutils.
16132
16133         * lib/.gdb-history: Remove; this doesn't belong here.
16134
16135         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16136         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16137         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16138         * lib/getcwd.c: New files.
16139
16140         * lib/dirname.h: Include <stdbool.h>.
16141         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16142         for consistency with POSIX terminology.  All uses changed.
16143         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16144         (strip_trailing_slashes): Use bool for booleans.
16145         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16146
16147         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16148         sometimes returns a positive errno value even when it succeeds.
16149         (print_errno_message) [!LIBC]: Fall back on strerror if
16150         __strerror_r fails.
16151
16152         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16153         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16154         (longest_relative_suffix): New function.
16155         (path_concat): Use it.  Assume first argument is not NULL.
16156         Port to DOS.  Omit redundant separators.
16157         Report an error instead of returning NULL.
16158         Use mempcpy instead of memcpy.
16159         (xpath_concat): Remove: not declared or used.
16160
16161         * lib/same.h: Include <stdbool.h>
16162         (same_name): Return bool, not int.
16163         * lib/same.c (same_name): Likewise.
16164         (errno): Don't declare; we assume C89 or better now.
16165
16166         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16167         if not already defined.
16168
16169         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16170         * lib/dup-safer.c (errno): Likewise.
16171
16172 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         Merge from coreutils.
16175         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16176         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16177         * modules/path-concat: Don't depend on strdup.
16178
16179 2004-08-03  Simon Josefsson  <jas@extundo.com>
16180
16181         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16182         * lib/progname.h: Don't include stdbool.h.
16183
16184 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16185
16186         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16187         * MODULES.html.sh (func_all_modules): Remove fatal.
16188
16189 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16190
16191         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16192
16193 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16194
16195         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16196         working.
16197
16198 2004-08-02  Simon Josefsson  <jas@extundo.com>
16199
16200         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16201         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16202         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16203
16204 2004-08-01  Simon Josefsson  <jas@extundo.com>
16205
16206         * lib/xgetdomainname.c: Include stdlib.h, for free().
16207
16208 2004-07-19  Bruno Haible  <bruno@clisp.org>
16209
16210         * MODULES.html.sh (func_all_modules): Add dummy.
16211
16212 2004-07-16  Simon Josefsson  <jas@extundo.com>
16213
16214         * modules/dummy: New file.
16215
16216 2004-07-16  Simon Josefsson  <jas@extundo.com>
16217
16218         * lib/dummy.c: New file.
16219
16220 2004-07-16  Bruno Haible  <bruno@clisp.org>
16221
16222         * lib/backupfile.h: Add extern "C" for C++.
16223         * lib/closeout.h: Likewise.
16224         * lib/copy-file.h: Likewise.
16225         * lib/findprog.h: Likewise.
16226         * lib/full-write.h: Likewise.
16227         * lib/pathname.h: Likewise.
16228         * lib/progname.h: Likewise.
16229         * lib/stpcpy.h: Likewise.
16230         * lib/stpncpy.h: Likewise.
16231         * lib/strcase.h: Likewise.
16232         * lib/strstr.h: Likewise.
16233         * lib/xalloc.h: Likewise.
16234
16235         * lib/mbswidth.h: Add extern "C" for C++.
16236         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16237
16238 2004-07-13  Robert Millan  <robertmh@gnu.org>
16239
16240         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16241
16242 2004-07-09  Simon Josefsson  <jas@extundo.com>
16243
16244         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16245         failed without this.)
16246
16247 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16248
16249         * modules/chown (Files): Add lib/fchown-stub.c, since
16250         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16251
16252 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16253
16254         * lib/fchown-stub.c: New file.
16255
16256 2004-06-24  Jim Meyering  <jim@meyering.net>
16257
16258         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16259
16260 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16261
16262         * modules/argz: Omit "#include".
16263
16264         * MODULES.html.sh (func_all_modules): Add calloc, to match
16265         2004-06-01 addition of calloc module.
16266
16267 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16268
16269         * m4/argz.m4: New file, which is autoupdated from libtool.
16270
16271 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16272
16273         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16274         libtool.
16275
16276 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16277
16278         * config/srclist-update: Don't insist on "USA." before the
16279         close-comment, as libtool omits the period and puts the */ on a
16280         separate line.
16281         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16282         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16283
16284 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16285
16286         * modules/argz: New file.
16287         * MODULES.html.sh (func_all_modules): Add argz.
16288
16289 2004-06-12  Jim Meyering  <jim@meyering.net>
16290         and  Paul Eggert  <eggert@cs.ucla.edu>
16291
16292         * modules/hash (Files): Add lib/xalloc.h.
16293         * modules/pipe (Depends-on): Add wait-process.
16294         * modules/stat (Depends-on): Add xalloc.
16295         * modules/userspec (Files): Add lib/userspec.h.
16296         * modules/xstrto
16297
16298         Upgrade from gettext-0.13.
16299         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16300         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16301         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16302
16303 2004-06-10  Jim Meyering  <jim@meyering.net>
16304
16305         * lib/calloc.c: New file.
16306
16307 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16308
16309         * lib/getdate.y (yylex): Allow space between sign and number.
16310         Problem reported by Dan Jacobson.
16311
16312 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16313
16314         Merge from coreutils CVS.
16315
16316         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16317         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16318         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16319         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16320         xstrtol.m4: Fix copyright date and/or serial number.
16321
16322         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16323         See if we need an fchown replacement.
16324         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16325         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16326         and use the replacement function if we detect either defect.
16327
16328         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16329         gl_UTIMECMP.
16330
16331 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16332         and  Jim Meyering  <jim@meyering.net>
16333
16334         Merge from coreutils CVS.
16335
16336         * lib/stat-macros.h: New file, with contents from file-type.h
16337         and coreutils' system.h.
16338         * lib/file-type.c: Include "stat-macros.h".
16339         * lib/file-type.h (file_type): Move all macro definitions to new file,
16340         stat-macros.h.
16341
16342         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16343         Wrap old code with this conditional.
16344         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16345         function that does not dereference symlinks.
16346         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16347
16348         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16349         dependency problems.
16350         (xreadlink): Accept new arg SIZE, for efficiency.
16351         All decls and uses changed.
16352         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16353
16354         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16355         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16356
16357         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16358         sysexits.h.
16359
16360 2004-06-01  Jim Meyering  <jim@meyering.net>
16361
16362         * m4/calloc.m4: New file.
16363
16364 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16365
16366         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16367         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16368         Also, fix a typo in a diagnostic.
16369
16370 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16371
16372         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16373         or AC_FUNC_REALLOC.
16374
16375 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16376
16377         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16378         macros to be defined.
16379         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16380         the allocator returns NULL because the requested size is zero.
16381
16382 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16383
16384         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16385         var.  Add comment explaining why libc still defines it.  This
16386         merges the following patch from glibc:
16387         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16388
16389 2004-05-20  Andreas Schwab  <schwab@suse.de>
16390
16391         * m4/free.m4: Replace free if it not known to work, not the other
16392         way round.
16393
16394 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16395
16396         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16397         present in glibc since revision 1.1 of this file.
16398         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16399         obstack_alignment_mask, obstack_alloc, obstack_base,
16400         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16401         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16402         obstack_grow0, obstack_init, obstack_int_grow,
16403         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16404         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16405         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16406         nonexistent functions.
16407
16408 2004-05-18  Karl Berry  <karl@gnu.org>
16409
16410         * config/srclist.txt: break link for vasnprintf.c.
16411
16412 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16413
16414         Port obstack to the AS/400, where pointers are 16 bytes wide and
16415         you cannot cast an integer to a valid pointer.  This patch is
16416         currently waiting to be integrated into glibc; see
16417         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16418
16419         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16420         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16421         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16422         (struct obstack): temp member is now a union of a pointer and
16423         an integer, instead of an integer.  All integer uses changed.
16424         This does not affect the physical layout of struct obstack,
16425         except on hosts (like the AS/400) where the size or alignment of
16426         void * is greater than that of ptrdiff_t.
16427         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16428         __STDC__)]: Store temporary in pointer member of union, not
16429         integer member.
16430         * lib/obstack.c: Include <stddef.h>, for offsetof.
16431         (struct fooalign): Remove; it doesn't need a name.
16432         (union fooround): Change double to long double, and add void *.
16433         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16434         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16435         not a macro.  Hence the values are always int; so remove all
16436         casts-to-int in uses.
16437
16438 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16439
16440         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16441         we can get this patch merged into glibc.
16442
16443 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16444             Paul Eggert  <eggert@cs.ucla.edu>
16445
16446         * m4/argp: Depend on alloca.
16447
16448 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16449             Paul Eggert  <eggert@cs.ucla.edu>
16450
16451         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16452         freecoding.
16453
16454 2004-05-17  Bruno Haible  <bruno@clisp.org>
16455
16456         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16457         precision that consists of a '.' followed by an empty digit string.
16458         Patch by Tor Lillqvist <tml@iki.fi>.
16459
16460 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16461
16462         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16463         for backward compatibility with older code.  We need our own
16464         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16465         it under some other name, and our alloca.h will define it.
16466
16467 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16468             Derek Price  <derek@ximbiot.com>
16469
16470         * lib/alloca.c: Include <alloca.h>, to get our interface.
16471         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16472         include <alloca.h> first.  Use C89 prototype for alloca; this
16473         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16474         Use #elif for simplicity, since we can assume C89 now.
16475         Don't try to source the system alloca.h since it will not be found
16476         and to prevent recursively including its replacement.
16477         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16478         * lib/regex.c: Likewise.
16479
16480 2004-05-16  Derek Price  <derek@ximbiot.com>
16481             Paul Eggert  <eggert@cs.ucla.edu>
16482
16483         getline cleanup.  This changes the getndelim2 API: both order of
16484         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16485         no delimiter).
16486
16487         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16488         interface does that.
16489         (getline): Always use getdelim, so that we don't have two
16490         copies of this code.
16491         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16492         if available.
16493         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16494         (GETNDELIM2_MAXIMUM): New macro.
16495         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16496         instead of the old practice of delim2==0.  All callers changed.
16497         Return -1 on overflow, instead of returning junk.
16498         Do not set *linesize unless allocation succeeds.
16499         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16500         that we include sys/types.h.
16501         * lib/getnline.h: Likewise.
16502         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16503         (getndelim2): Reorder arguments.
16504         * lib/getnline.c (getnline, getndelim):
16505         Don't discard the NMAX argument.
16506         (getnline): Invoke getndelim, to avoid code duplication.
16507         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16508         of (size_t) -1 by callers of the getnline family.
16509
16510 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16511
16512         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16513         Check for gettimeofday.
16514         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16515         Check for settimeofday, stime.
16516
16517 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16518
16519         * lib/nanosleep.c (suspended): Change its type from int to
16520         sig_atomic_t volatile.
16521         (first_call): Make it private to rpl_nanosleep, and have it
16522         be zero initially as that's a bit faster.
16523         (my_usleep): Round up fractional times instead of truncating them,
16524         as this is the usual meaning for 'sleep'.
16525
16526         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16527         doesn't work.
16528         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16529         (ENOSYS): Define if not defined.
16530         (settime): Fall back on stime if it exists and settimeofday fails.
16531         But don't bother with fallbacks if a method fails with errno == EPERM.
16532
16533 2004-05-11  Jim Meyering  <jim@meyering.net>
16534
16535         Prior to this change, the save_cwd caller required read access to the
16536         current directory on most systems (ones with the fchdir function).
16537
16538         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16539         fails, try write-only, and finally, resort to using xgetcwd.
16540
16541 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16542
16543         * lib/obstack.c, obstack.h: Import changes from libc.
16544
16545 2004-04-28  Bruno Haible  <bruno@clisp.org>
16546
16547         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16548         also implicitly appends .exe to executables.
16549         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16550         accepts Windows pathnames.
16551         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16552         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16553         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16554         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16555         Reported by Derek Robert Price <derek@ximbiot.com>.
16556
16557 2004-04-21  Karl Berry  <karl@gnu.org>
16558
16559         * config/srclist.txt (localcharset.c): break sync.
16560
16561 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16562
16563         * m4/host-os.m4: Add a copyright notice.
16564
16565 2004-04-20  Jim Meyering  <jim@meyering.net>
16566
16567         Change UTILS_ to gl_ in AC_DEFINE'd names.
16568         Change utils_- and jm_-prefixed variables, too.
16569         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16570         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16571         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16572
16573         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16574         Don't emit trailing blanks.
16575         Also rename jm_-prefixed variables to have gl_ prefix.
16576
16577         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16578         Also rename jm_-prefixed variables to have gl_ prefix.
16579
16580         * m4/jm-macros.m4: Reflect the renamings.
16581         * m4/prereq.m4: Likewise.
16582
16583 2004-04-20  Jim Meyering  <jim@meyering.net>
16584
16585         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16586         memory.
16587
16588 2004-04-20  Jim Meyering  <jim@meyering.net>
16589             Bruno Haible  <bruno@clisp.org>
16590
16591         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16592         memory when realloc fails.
16593
16594 2004-04-19  Jim Meyering  <jim@meyering.net>
16595
16596         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16597         now that readutmp.c may call `free (0)'.
16598
16599 2004-04-19  Bruno Haible  <bruno@clisp.org>
16600
16601         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16602         * m4/inttypes_h.m4: Likewise.
16603         * m4/stdint_h.m4: Likewise.
16604         * m4/intmax_t.m4: Likewise.
16605         * m4/uintmax_t.m4: Likewise.
16606
16607 2004-04-18  Jim Meyering  <jim@meyering.net>
16608
16609         * m4/prereq.m4: Don't forbid jm_ prefix.
16610
16611         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16612         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16613         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16614         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16615         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16616         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16617         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16618         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16619         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16620         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16621         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16622         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16623         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16624         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16625         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16626         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16627         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16628         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16629         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16630
16631 2004-04-18  Jim Meyering  <jim@meyering.net>
16632
16633         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16634         failure, don't leak memory and do call END_UTMP_ENT.
16635
16636 2004-04-16  Jim Meyering  <jim@meyering.net>
16637
16638         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16639         coreutils' stat program.
16640         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16641
16642 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16643
16644         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16645         C89.
16646         (CHAR_BIT): Remove, since we assume C89.
16647         Include <stdint.h> if available, as per current Autoconf CVS advice.
16648
16649 2004-03-31  Jim Meyering  <jim@meyering.net>
16650
16651         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16652         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16653         * m4/xalloc.m4: Likewise.
16654
16655 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16656
16657         Merge from coreutils.
16658
16659         * m4/inttostr.m4: New file.
16660         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16661         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16662         Require gl_CLOCK_TIME.
16663         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16664
16665 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16666
16667         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16668         not bool, to be more consistent with Unix conventions.
16669         Suggested by Bruno Haible.
16670
16671         Merge from coreutils.
16672
16673         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16674         * lib/umaxtostr.c: New files.
16675
16676         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16677         the usual <time.h> dance.
16678         (get_date): Change signature to support fractional time stamps.
16679         All callers changed.
16680         * lib/getdate.y: Include "getdate.h" first, as we can now
16681         assume C89 and don't need to worry about 'const'.
16682         Similarly, include "unlocked-io.h" near start, not in middle.
16683         Include <limits.h>.
16684         (textint.value): Use long int rather than int.
16685         (textint.digits): Use size_t rather than int.
16686         (BILLION, LOG10_BILLION): New constants.
16687         (parser_control): New member rel_ns.  Members day_ordinal,
16688         time_zone, month, day, hour, minutes, rel_year, rel_month,
16689         rel_day, rel_hour, rel_minutes, rel_seconds
16690         are now long int, not int.  Member seconds is now struct timespec,
16691         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16692         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16693         not int.
16694         (%union.intval): Now long int, not int.
16695         New member timespec.
16696         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16697         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16698         (spec): Now is a timespec or an item list.
16699         (timespec, items): New nonterminals.
16700         (time, rel, relunit, number, get_date):
16701         Add support for fractional seconds.
16702         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16703         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16704         (to_hour): First arg is now long int, not int.
16705         (to_year): Returns long int, not int.
16706         Don't treat year -70 like 70.
16707         (tm_diff): Returns long int, not int.
16708         (lookup_word): Use bool instead of int when appropriate.
16709         (yylex): Use size_t for count, not int.
16710         Detect overflow when parsing large integer constants.
16711         Add support for fractions.
16712         (get_date): Make pointers 'const' if possible.
16713         Use more-portable code to detect integer overflow.
16714         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16715         Don't use ctime; it's not reliable if the year has >4 digits.
16716
16717         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16718         This is for compatibility with BSD.
16719
16720         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16721         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16722         From coreutils' system.h.
16723
16724         * lib/userspec.c: Don't include "posixver.h".
16725         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16726         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16727         compatible extension.  Simplify code by removing a boolean int
16728         that was always nonzero if a string was nonnull.
16729
16730 2004-03-30  Jim Meyering  <jim@meyering.net>
16731
16732         Merge from coreutils.
16733
16734         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16735         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16736         on some systems one must include <grp.h> before it.
16737         Reported by Christian Krackowizer.
16738
16739 2004-03-30  Jim Meyering  <jim@meyering.net>
16740
16741         Merge from coreutils.
16742
16743         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16744
16745         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16746         an empty input stream.
16747
16748         * lib/readtokens.c: Include <stdbool.h>.
16749         (readtoken): Use `size_t' rather than int/long.
16750         All callers adjusted.
16751         Use `bool' rather than `int' where appropriate.
16752         Use memset rather than an explicit loop.
16753         Use x2nrealloc rather than xrealloc.
16754         Allow the use of `\0' as a delimiter.
16755         (readtokens): Likewise.
16756         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16757
16758 2004-03-30  Jim Meyering  <jim@meyering.net>
16759
16760         * m4/realloc.m4: Remove file, since now it does no more than
16761         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16762         the `configure.ac' section of module/realloc.
16763         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16764
16765 2004-03-30  Bruno Haible  <bruno@clisp.org>
16766
16767         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16768         nonnull.
16769
16770 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16771
16772         Merge changes to getloadavg.c from coreutils and Emacs.
16773
16774         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16775         Define to an expression, not to the empty string.
16776         Include cloexec.h and xalloc.h.
16777         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16778         Use set_cloexec_flag rather than rolling our own.
16779         * lib/cloexec.c, lib/cloexec.h: New files.
16780
16781 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16782
16783         * m4/cloexec.m4: New file.
16784
16785 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16786
16787         * lib/getopt.h: Sync with libc CVS.
16788
16789 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16790             Bruno Haible  <bruno@clisp.org>
16791
16792         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16793         mbswidth.
16794
16795 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16796             Bruno Haible  <bruno@clisp.org>
16797
16798         * lib/mbswidth.h: Include <wchar.h> only if
16799         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16800         <wchar.h>.
16801         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16802
16803 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16804
16805         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16806         Sync with libc CVS.
16807         * lib/getopt_int.h: New file, also synced from libc.
16808
16809 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16810
16811         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16812         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16813         Bring back getopt.c, getopt.h, getopt1.c.
16814
16815 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16816
16817         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16818         All uses changed.  Check for sa_sigaction member; this fixes
16819         a bug first reported by Jason Andrade in
16820         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16821
16822 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16823
16824         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16825         '#if' expressions.  Unlike the code it replaces, it does not
16826         depend on (defined _SC_PAGESIZE).  However, it does depend on
16827         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16828         first reported by Jason Andrade in
16829         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16830
16831 2004-02-25  Simon Josefsson  <jas@extundo.com>
16832
16833         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16834
16835 2004-02-25  Simon Josefsson  <jas@extundo.com>
16836
16837         * lib/strdup.h: New file.
16838         * lib/strdup.c: Include it.
16839         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16840         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16841
16842 2004-02-23  Karl Berry  <karl@gnu.org>
16843
16844         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16845         (from fencepost.gnu.org:/gd/gnuorg).
16846
16847 2004-02-23  Karl Berry  <karl@gnu.org>
16848
16849         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16850         * config/srclist.txt: add maintain/standards documents.
16851
16852 2004-02-18  Bruno Haible  <bruno@clisp.org>
16853
16854         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16855         Reported by Derek Robert Price <derek@ximbiot.com>.
16856
16857 2004-02-16  Karl Berry  <karl@gnu.org>
16858
16859         * config/mkinstalldirs, install-sh: update from automake.
16860
16861 2004-02-06  Karl Berry  <karl@gnu.org>
16862
16863         * m4/po.m4: update from gettext 0.14.1.
16864
16865 2004-02-06  Karl Berry  <karl@gnu.org>
16866
16867         * lib/config.charset: update from gettext 0.14.1.
16868
16869 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16870
16871         Add comments and code, prompted by suggestions from Bruno Haible
16872         for sh-quote.
16873         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16874         describing the enum quoting_style values.
16875         * lib/quotearg.c (quotearg_alloc): New function.
16876         (quotearg_buffer_restyled): Treat lone { and } as special.
16877         Treat = as special.  Work around bug with older shells
16878         that "see" a '\' that is really the 2nd byte of a multibyte char.
16879         Quote empty string with shell_quoting_style.
16880
16881 2004-02-03  Bruno Haible  <bruno@clisp.org>
16882
16883         * m4/pipe.m4: New file, from GNU gettext.
16884
16885 2004-02-03  Bruno Haible  <bruno@clisp.org>
16886
16887         * lib/pipe.h: New file, from GNU gettext.
16888         * lib/pipe.c: New file, from GNU gettext.
16889
16890 2004-01-27  Bruno Haible  <bruno@clisp.org>
16891
16892         * m4/execute.m4: New file, from GNU gettext.
16893
16894 2004-01-27  Bruno Haible  <bruno@clisp.org>
16895
16896         * lib/execute.h: New file, from GNU gettext.
16897         * lib/execute.c: New file, from GNU gettext.
16898         * lib/w32spawn.h: New file, from GNU gettext.
16899
16900 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16901
16902         Merge from diffutils.
16903
16904         * lib/file-type.c (file_type): Add typed memory objects.
16905         * lib/file-type.h (S_TYPEISTMO): New macro.
16906
16907         * lib/c-stack.h (c_stack_action): Remove argv argument.
16908         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16909         (die): Don't calculate message unless segv_action returns.
16910         (get_stack_location, min_address_from_argv, max_address_from_argv,
16911         volatile stack_base, volatile_stack_size): Remove.
16912         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16913         that every segmentation violation is a stack overflow.  (Ouch!)
16914         See Debian bug 136249 (still outstanding) for more info about why
16915         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16916
16917 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16918
16919         Exit-status fix from coreutils.
16920
16921         Use exit_failure consistently in place of EXIT_FAILURE,
16922         so that program exit statuses are consistent on failure.
16923
16924         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16925         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16926         * lib/argmatch.h: Comment fix to match the above.
16927         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16928         Now a macro referring to exit_failure, instead of a separate
16929         variable.  Include "exitfail.h" to get it.
16930         * lib/xstrtol.h: Include "exitfail.h".
16931         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16932
16933         * lib/long-options.c (parse_long_options): Use prototype
16934         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16935         for clarity.
16936
16937 2004-01-21  Jim Meyering  <jim@meyering.net>
16938
16939         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16940         so as not to conflict with a different-sized __mktime_internal
16941         function in GNU libc.
16942         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16943         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16944
16945 2004-01-20  Karl Berry  <karl@gnu.org>
16946
16947         * config/config.guess: update from config.
16948
16949         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16950
16951 2004-01-20  Bruno Haible  <bruno@clisp.org>
16952
16953         Safer stack allocation.
16954         * lib/setenv.c: Include allocsa.h.
16955         (alloca): Remove fallback definition.
16956         (freea): Remove macro.
16957         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16958         instead of freea.
16959
16960 2004-01-20  Bruno Haible  <bruno@clisp.org>
16961
16962         * m4/eealloc.m4: New file, from GNU gettext.
16963
16964 2004-01-20  Bruno Haible  <bruno@clisp.org>
16965
16966         * m4/allocsa.m4: New file, from GNU gettext.
16967
16968 2004-01-20  Bruno Haible  <bruno@clisp.org>
16969
16970         * lib/xallocsa.h: New file, from GNU gettext.
16971         * lib/xallocsa.c: New file, from GNU gettext.
16972
16973 2004-01-20  Bruno Haible  <bruno@clisp.org>
16974
16975         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
16976
16977 2004-01-20  Bruno Haible  <bruno@clisp.org>
16978
16979         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
16980         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
16981         specially.
16982
16983 2004-01-20  Bruno Haible  <bruno@clisp.org>
16984
16985         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
16986         patch.
16987
16988 2004-01-20  Bruno Haible  <bruno@clisp.org>
16989
16990         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
16991
16992 2004-01-20  Bruno Haible  <bruno@clisp.org>
16993
16994         * lib/eealloc.h: New file.
16995
16996 2004-01-20  Bruno Haible  <bruno@clisp.org>
16997
16998         * lib/binary-io.h: Avoid warnings on Cygwin.
16999
17000 2004-01-20  Bruno Haible  <bruno@clisp.org>
17001
17002         * lib/allocsa.h: New file, from GNU gettext.
17003         * lib/allocsa.c: New file, from GNU gettext.
17004
17005 2004-01-18  Karl Berry  <karl@gnu.org>
17006
17007         * doc/gpl.texi, doc/lgpl.texi: new files.
17008
17009 2004-01-18  Karl Berry  <karl@gnu.org>
17010
17011         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17012         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17013
17014 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17015
17016         Merge from coreutils.
17017
17018         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17019         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17020         (gl_DEFAULT_POSIX2_VERSION): Move
17021         the documentation from 'configure' into 'config.hin',
17022         so that 'configure --help' isn't burdened by it and
17023         we don't have to worry about its formatting there.
17024         Reword the documentation so that it's more succinct
17025         and can be run together into a single paragraph.
17026         * m4/same.m4 (gl_SAME): Check for pathconf.
17027
17028 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17029
17030         Merge from coreutils.
17031
17032         * lib/posixver.c: Include posixver.h.
17033
17034         * lib/same.c: Include <stdbool.h>, <limits.h>.
17035         (_POSIX_NAME_MAX): Define if not defined.
17036         (MIN): New macro.
17037         (same_name): If file names are silently truncated, report
17038         that the file names are the same if they are the same after
17039         the silent truncation.
17040
17041         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17042         conversion function.
17043         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17044         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17045         longer needed.
17046
17047 2004-01-15  Jim Meyering  <jim@meyering.net>
17048
17049         Merge from coreutils.
17050
17051         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17052         if no library is required.
17053         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17054         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17055         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17056         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17057         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17058         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17059         value, $ac_cv_search_crypt, if it's "none required".
17060         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17061         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17062         not gl_FUNC_GETLOADAVG.
17063         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17064         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17065
17066 2004-01-15  Jim Meyering  <jim@meyering.net>
17067
17068         Merge from coreutils.
17069
17070         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17071         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17072         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17073
17074         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17075         optional configure-time default.
17076
17077         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17078
17079         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17080
17081 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17082
17083         Merge from coreutils.
17084
17085         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17086         value, $ac_cv_search_nanosleep, if it's "none required".
17087
17088 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17089
17090         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17091         with like-named macro in fnmatch.c.
17092         (EXT): Use an internal constant instead.
17093
17094         Merge fnmatch patches from glibc.
17095         * lib/fnmatch.c (mbsinit): Remove define.
17096         Add libc_hidden_ver (__fnmatch, fnmatch).
17097         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17098         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17099
17100 2004-01-14  Karl Berry  <karl@gnu.org>
17101
17102         * config/install-sh: update from automake.
17103
17104 2004-01-13  Karl Berry  <karl@gnu.org>
17105
17106         * config/install-sh: update from automake.
17107
17108 2004-01-09  Karl Berry  <karl@gnu.org>
17109
17110         * config/install-sh: update from automake.
17111
17112 2004-01-05  Karl Berry  <karl@gnu.org>
17113
17114         * config/config.{sub,guess}: update from config.
17115
17116 2003-12-31  Karl Berry  <karl@gnu.org>
17117
17118         * config/depcomp: update from automake.
17119
17120 2003-12-14  Karl Berry  <karl@gnu.org>
17121
17122         * lib/config.charset: update from gettext-runtime.
17123
17124 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17125
17126         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17127         Bug reported by Alfred M. Szmidt.
17128
17129 2003-12-03  Bruno Haible  <bruno@clisp.org>
17130
17131         * m4/gettext.m4: Upgrade from gettext-0.13.
17132         * m4/po.m4: Upgrade from gettext-0.13.
17133         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17134         * m4/intmax.m4: New file, from gettext-0.13.
17135         * m4/printf-posix.m4: New file, from gettext-0.13.
17136
17137 2003-11-29  Karl Berry  <karl@gnu.org>
17138
17139         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17140
17141 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17142             Bruno Haible  <bruno@clisp.org>
17143
17144         * lib/printf-parse.h: Don't include sys/types.h.
17145         (ARG_NONE): New macro.
17146         (char_directive): Change type of *arg_index fields to size_t.
17147         * lib/printf-parse.c: Don't include sys/types.h.
17148         (SSIZE_MAX): Remove macro.
17149         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17150         Remove unnecessary overflow check.
17151         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17152         fields.
17153
17154 2003-11-25  Bruno Haible  <bruno@clisp.org>
17155
17156         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17157
17158 2003-11-25  Bruno Haible  <bruno@clisp.org>
17159
17160         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17161         gt_TYPE_SSIZE_T.
17162
17163 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17164
17165         * modules/alloca: Remove dependency on xalloc.
17166
17167 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17168
17169         * lib/alloca.c: Remove dependency on xalloc module.
17170         (xalloc_die): Remove.
17171         (memory_full) [!defined emacs]: New macro.
17172         [!defined emacs]: Don't include xalloc.h.
17173         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17174         address arithmetic overflows.  Change datatypes a bit to avoid
17175         unnecessary casts.
17176
17177 2003-11-22  Jim Meyering  <jim@meyering.net>
17178
17179         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17180         s/size/size_t/.
17181
17182 2003-11-21  Karl Berry  <karl@gnu.org>
17183
17184         * config/config.{sub,guess}: update from config.
17185
17186 2003-11-18  Karl Berry  <karl@gnu.org>
17187
17188         * config/config.{sub,guess}: update from config.
17189
17190         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17191
17192 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17193
17194         * README: Mention that S+T cannot overflow if S is the size of
17195         an existing object and T is sufficiently small.
17196
17197 2003-11-17  Jim Meyering  <jim@meyering.net>
17198
17199         On systems without utime and without a utimes function capable of
17200         dealing with a NULL struct utimbuf* argument, this utime replacement
17201         could -- in unusual circumstances -- leak a file descriptor.
17202         * lib/utime.c: Include <unistd.h> and <errno.h>.
17203         (utime_null): Be sure to close `fd' and to preserve errno.
17204         Reported by Geoff Collyer via Arnold Robbins.
17205
17206 2003-11-17  Bruno Haible  <bruno@clisp.org>
17207
17208         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17209         (Depends-on): Add xsize.
17210
17211 2003-11-17  Bruno Haible  <bruno@clisp.org>
17212
17213         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17214
17215 2003-11-17  Bruno Haible  <bruno@clisp.org>
17216
17217         * lib/vasnprintf.c (alloca): Remove fallback definition.
17218         (freea): Remove definition.
17219         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17220         Reported by Paul Eggert.
17221
17222 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17223             Bruno Haible  <bruno@clisp.org>
17224
17225         Protect against address arithmetic overflow.
17226         * lib/printf-args.h: Include stddef.h.
17227         (arguments): Change type of field 'count' to size_t.
17228         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17229         'unsigned int' where appropriate.
17230         * lib/printf-parse.h: Include sys/types.h.
17231         (char_directive): Change type of *arg_index fields to ssize_t.
17232         (char_directives): Change type of fields 'count', max_*_length to
17233         size_t.
17234         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17235         (SSIZE_MAX): Define fallback value.
17236         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17237         instead of 'int' where appropriate. Check a_allocated, d_allocated
17238         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17239         * lib/vasnprintf.c: Include xsize.h.
17240         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17241         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17242         overflow. Avoid wraparound when converting a width or precision from
17243         decimal to binary.
17244
17245 2003-11-16  Bruno Haible  <bruno@clisp.org>
17246
17247         Update from GNU gettext.
17248         * lib/printf-parse.c: Generalize to it can be compiled for wide
17249         strings.
17250         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17251         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17252         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17253         SNPRINTF): New macros.
17254         Don't include <alloca.h> if the file is used inside libintl.
17255         (local_wcslen): New function, for Solaris 2.5.1.
17256         (VASNPRINTF): Use it instead of wcslen.
17257
17258 2003-11-16  Bruno Haible  <bruno@clisp.org>
17259
17260         * lib/xsize.h (xmax): New function.
17261         (xsum, xsum3, xsum4): Declare as "pure" functions.
17262
17263 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17264
17265         * modules/xalloc (Files): Undo latest change, since xalloc.h
17266         no longer needs SIZE_MAX or PTRDIFF_MAX.
17267
17268 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17269
17270         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17271         gl_PTRDIFF_MAX.
17272
17273 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17274
17275         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17276         "return", to pacify some unknown compiler.  Problem reported
17277         by Joerg Schilling.
17278
17279 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17280
17281         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17282         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17283         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17284         heuristic is just as accurate as far as we know, and it removes a
17285         dependency on size_max.m4 and ptrdiff_max.m4.
17286
17287 2003-11-11  Bruno Haible  <bruno@clisp.org>
17288
17289         * modules/xsize (Files): Add m4/size_max.m4.
17290         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17291
17292 2003-11-11  Bruno Haible  <bruno@clisp.org>
17293
17294         * m4/size_max.m4: New file.
17295         * m4/ptrdiff_max.m4: New file.
17296         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17297         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17298         (gl_XALLOC): Invoke it.
17299
17300 2003-11-11  Bruno Haible  <bruno@clisp.org>
17301
17302         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17303         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17304         defined.
17305
17306 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17307
17308         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17309         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17310         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17311         From Bruno Haible.
17312         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17313         not (size_t) -1, since it's defined here.
17314
17315 2003-11-09  Karl Berry  <karl@gnu.org>
17316
17317         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17318
17319 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17320
17321         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17322         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17323         Reject sizes of exactly SIZE_MAX bytes.
17324         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17325         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17326
17327 2003-11-05  Bruno Haible  <bruno@clisp.org>
17328
17329         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17330         SIZE_MAX defined in <limits.h> on Solaris.
17331
17332 2003-11-04  Jim Meyering  <jim@meyering.net>
17333
17334         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17335         variable names, rather than @VAR@.
17336         * modules/poll: Likewise.
17337
17338 2003-11-04  Bruno Haible  <bruno@clisp.org>
17339
17340         * modules/xsize: New file.
17341         * modules/linebreak: Depend on xsize.
17342         * MODULES.html.sh (func_all_modules): Add xsize.
17343
17344 2003-11-04  Bruno Haible  <bruno@clisp.org>
17345
17346         * m4/xsize.m4: New file.
17347
17348 2003-11-04  Bruno Haible  <bruno@clisp.org>
17349
17350         * lib/xsize.h: New file.
17351         * lib/linebreak.c: Include xsize.h.
17352         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17353         argument for overflow.
17354         Suggested by Paul Eggert.
17355
17356 2003-11-03  Karl Berry  <karl@gnu.org>
17357
17358         * config/config.{guess,sub}: update from config.
17359
17360 2003-11-03  Jim Meyering  <jim@meyering.net>
17361
17362         * modules/userspec (lib_SOURCES): Add userspec.h.
17363         (Include): Add "userspec.h".
17364         Improve description.
17365
17366 2003-11-03  Jim Meyering  <jim@meyering.net>
17367
17368         * lib/userspec.c: Include "userspec.h".
17369         * lib/userspec.h: New file.
17370
17371 2003-11-03  Bruno Haible  <bruno@clisp.org>
17372
17373         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17374
17375 2003-11-03  Bruno Haible  <bruno@clisp.org>
17376
17377         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17378         available, to avoid (extremely rare) race condition.
17379         Suggested by Paul Eggert.
17380
17381 2003-11-02  Karl Berry  <karl@gnu.org>
17382
17383         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17384
17385 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17386
17387         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17388         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17389         (read_filesystem_list): Set and use me_type_malloced.
17390         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17391         whatever the type happens to be), for brevity and consistency.
17392         Check for size calculation overflow on Alphas running OSF/1.
17393
17394 2003-10-31  Jim Meyering  <jim@meyering.net>
17395
17396         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17397
17398         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17399
17400 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17401             Bruno Haible  <bruno@clisp.org>
17402
17403         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17404         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17405
17406 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17407
17408         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17409         netbsd*-gnu*.  Suggested by Robert Millan.
17410
17411 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17412
17413         * modules/group-member: Depend on stdbool.
17414
17415 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17416
17417         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17418
17419 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17420
17421         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17422         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17423         after the 'gnu' in these cases.  This fixes some bugs in the
17424         previous change, and is based on suggestions by Robert Millan.
17425
17426 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17427
17428         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17429         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17430         no longer needed.
17431         * lib/quotearg.c (quotearg_n_options): Use it.
17432         * lib/group-member.c: Include <stdbool.h>.
17433         (free_group_info): Arg is now const *; don't free arg.
17434         (get_group_info): Now returns bool and accepts struct group_info *,
17435         rather than returning a malloc'ed struct group_info *.
17436         All uses changed.  Check for overflow in internal size calculation.
17437
17438         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17439         rather than xmalloc/xrealloc.
17440         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17441         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17442         conformance bug: the old code used a pointer after freeing the
17443         storage that it addressed.
17444         * lib/hash.c (hash_initialize): Simplify the code by using
17445         xalloc_oversized rather than doing it by hand.
17446         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17447         the buffer preserved.  Use free and xmalloc instead.
17448         * lib/quotearg.c (quotearg_n_options): Likewise.
17449         Use a simpler test for size overflow.  Don't use xalloc_oversized
17450         because unsigned int might be wider than size_t (!); this suggests
17451         that we should switch from unsigned int to size_t for slot numbers.
17452
17453 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17454
17455         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17456         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17457         NetBSD kernels.  Requested by Richard Stallman.
17458
17459 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17460
17461         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17462         to allocate the returned structure.  Do not allocate a subarray,
17463         as x2nrealloc will do that.
17464         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17465         instead of xnrealloc.
17466         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17467
17468 2003-10-27  Bruno Haible  <bruno@clisp.org>
17469
17470         * lib/stdbool_.h: Better support for BeOS.
17471
17472 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17473
17474         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17475         now uses inline.
17476
17477 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17478
17479         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17480         callers that want to do their own size-overflow checking.  Include
17481         <stdbool.h>, since xalloc_oversized returns bool.
17482         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17483         to use xalloc_oversized.
17484
17485         Add two functions x2realloc, x2nrealloc, for programs that grow
17486         arrays dynamically by doubling their sizes.
17487         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17488         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17489         New functions.
17490
17491         Port to C99 semantics for 'inline' of external functions.
17492         Bug reported by Bruno Haible.
17493         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17494         with the old contents of xnmalloc.
17495         (xnmalloc, xmalloc): Use it.
17496         (xnrealloc_inline): New static inline function,
17497         with the old contents of xnrealloc.
17498         (xnrealloc, xrealloc): Use it.
17499
17500         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17501         that.
17502
17503 2003-10-26  Karl Berry  <karl@gnu.org>
17504
17505         * config/srclist.txt (COPYING.DOC): no longer available from
17506         /gd/gnuorg; don't know where the ultimate source is.
17507
17508 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17509
17510         Fix several address-calculation bugs in the hash modules,
17511         plus some minor code cleanup.
17512
17513         * lib/hash.h: Include <stdbool.h>, for bool.
17514         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17515         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17516         hash_get_n_entries, hash_get_max_bucket_length,
17517         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17518         hash_rehash): Use size_t rather than unsigned.
17519         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17520         hash_get_n_buckets_used, hash_get_n_entries,
17521         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17522         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17523         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17524         Likewise.
17525         (SIZE_MAX): Define if not defined.
17526         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17527         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17528         hash_print):
17529         Use const * when possible.
17530         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17531         (check_tuning): Fix bug: if tuning parameters were very close to
17532         0 or 1, rounding errors could have caused subscript violations.
17533         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17534         (hash_initialize): Add 'fail:' label
17535         to free table and return NULL, and use it to simplify code.
17536         Use calloc rather than clearing the storage ourself.
17537         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17538         buffer size calculations.
17539         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17540         Include <stddef.h>, for size_t.
17541         * lib/hash-pjw.c (hash_pjw): Likewise.
17542         Switch to method described by Bruno Haible.
17543         Include <limits.h>, for CHAR_BIT.
17544         (SIZE_BITS): New macro.
17545
17546 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17547
17548         * m4/getline.m4 (AM_FUNC_GETLINE):
17549         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17550         hosts.  Problem reported by Derek Robert Price in
17551         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17552         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17553         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17554
17555 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17556
17557         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17558         ceiling the allocation at NMAX bytes rather than silently
17559         discarding input bytes before NMAX is reached.  This makes
17560         a difference only if NMAX exceeds SIZE_MAX / 2.
17561
17562         * lib/obstack.c: Merge from glibc.
17563         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17564         Add libc_hidden_def (_obstack_newchunk).
17565         (_obstack_free) [! defined _LIBC]: Remove.
17566         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17567         a clone of the function body.
17568         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17569         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17570
17571         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17572         glibc.
17573         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17574         arg to memcpy.
17575
17576         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17577         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17578         Don't use lvalue casts, as GCC plans to remove support for them
17579         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17580         was also present in the non-GCC version, indicating that this
17581         code had always been buggy and had never been widely used.
17582         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17583         Use the fast variant of each macro, rather than copying the
17584         definiens of the fast variant; that way, we'll be more likely to
17585         catch future bugs in the fast variants.
17586
17587 2003-10-20  Bruno Haible  <bruno@clisp.org>
17588
17589         * modules/wait-process: New file.
17590         * MODULES.html.sh (func_all_modules): Add wait-process.
17591
17592 2003-10-20  Bruno Haible  <bruno@clisp.org>
17593
17594         * m4/wait-process.m4: New file.
17595
17596 2003-10-20  Bruno Haible  <bruno@clisp.org>
17597
17598         * lib/wait-process.h: New file, from GNU gettext.
17599         * lib/wait-process.c: New file, from GNU gettext.
17600
17601 2003-10-19  Jim Meyering  <jim@meyering.net>
17602
17603         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17604         HPUX 10.20.
17605
17606 2003-10-18  Karl Berry  <karl@gnu.org>
17607
17608         * config/config.guess: update from config.
17609
17610 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17611
17612         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17613         (getgroups): First arg is int, not size_t.
17614         Don't let 'free' mangle errno.
17615
17616 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17617
17618         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17619
17620 2003-10-16  Karl Berry  <karl@gnu.org>
17621
17622         * config/config.{guess,sub}: update from config.
17623
17624 2003-10-16  Jim Meyering  <jim@meyering.net>
17625
17626         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17627         memcpy.
17628
17629 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17630
17631         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17632         (SIZE_MAX): Remove.
17633         (new_exclude, add_exclude_file): Initial size no longer needs to
17634         be a power of 2.
17635         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17636         our own address arithmetic overflow checking.
17637
17638         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17639         (fnmatch): Do not alloca more than 2000 wide characters;
17640         instead, use malloc for large buffers.
17641         Check for address arithmetic overflow, and return -1
17642         with errno set to ENOMEM in that case.
17643         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17644         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17645         instead, return -1.  Check for address arithmetic overflow.
17646
17647 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17648
17649         Handle invalid suffixes and overflow independently, so that
17650         callers can treat them independently as needed.  Fix some bugs in
17651         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17652         suffix for a human-readable blocksize.  The major caller-visible
17653         change is the addition of a new
17654         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17655         that both overflow and suffix chars were found.
17656
17657         * lib/human.c (humblock): Don't check separately for invalid suffix
17658         char; that is xstrtoumax's job (now that its bug is fixed).
17659         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17660         INTMAX_MAX]: New macros.
17661         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17662         TYPE_MAXIMUM): New macros.
17663         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17664         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17665         if overflow occurs, as it's what __strtol does and it's more useful
17666         in practice.
17667         (__xstrtol): If __strtol reports some error other than ERANGE,
17668         reflect it to the caller as LONGINT_INVALID.  If it reports
17669         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17670         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17671         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17672         value.
17673         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17674         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17675         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17676         [defined UINTMAX_MAX]: New macros.
17677
17678 2003-10-14  Bruno Haible  <bruno@clisp.org>
17679
17680         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17681
17682 2003-10-14  Bruno Haible  <bruno@clisp.org>
17683
17684         * m4/sig_atomic_t: New file, from GNU gettext.
17685         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17686
17687 2003-10-14  Bruno Haible  <bruno@clisp.org>
17688
17689         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17690         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17691         Also use volatile where needed.
17692
17693 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17694
17695         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17696         Change maintainer from Bruno Haible to 'all'.
17697
17698 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17699
17700         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17701
17702 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17703
17704         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17705         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17706         and define in terms of the other primitives.
17707         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17708         (SIZE_MAX): Define if not already defined.
17709         (array_size_overflow): New function.
17710         (xalloc_die): Abort instead of exiting if 'error' returns.
17711         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17712         (xmalloc, xrealloc): Use them.
17713         (xcalloc): Check for address arithmetic overflow.
17714         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17715         a bit faster than strcpy.
17716
17717 2003-10-10  Simon Josefsson  <jas@extundo.com>
17718
17719         * modules/argp (Depends-on): Add restrict and strcase.
17720
17721 2003-10-10  Simon Josefsson  <jas@extundo.com>
17722
17723         * m4/argp.m4: Add AC_C_INLINE.
17724
17725 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17726
17727         Merge getpass from libc, plus a few fixes.
17728
17729         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17730         Include <stdbool.h>.
17731         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17732         __fsetlocking to empty.
17733         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17734         do include <bits/libc-lock.h>.
17735         Do not include <fcntl.h>; not needed.
17736         [_LIBC]: Include <wchar.h>.
17737         (NOTCANCEL_MODE): New macro.
17738         (flockfile, funlockfile) [_LIBC]: New macros.
17739         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17740         [!_LIBC]: New macros.
17741         (call_fclose): New function.
17742         (getpass): Use it.  Save tty stream separately; this simplifies the
17743         code and makes it more reliable if stdin happens to equal stdout.
17744         Invoke __fsetlocking on tty.
17745         Handle thread cancellation if needed.
17746         Namespace cleanup (use __tcgetattr, __getline).
17747         Use bool for Booleans.
17748         [USE_IN_LIBIO]: Handle wide streams.
17749         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17750         stream might go where.
17751
17752         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17753         doesn't have to include <stdio.h> before us.
17754         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17755         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17756         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17757         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17758         if not declared, so that we can use getpass.c code from libc without
17759         rewriting it.
17760         (flockfile, ftrylockfile, funlockfile): New macros.
17761
17762 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17763
17764         * modules/getpass: Depend on stdbool.
17765
17766 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17767
17768         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17769
17770 2003-10-07  Karl Berry  <karl@gnu.org>
17771
17772         * config/config.{guess,sub}: update from config.
17773
17774 2003-10-06  Jim Meyering  <jim@meyering.net>
17775             Bruno Haible  <bruno@clisp.org>
17776
17777         This lets translators provide better translations for the
17778         "Written by ..." part of --version output.
17779         * lib/version-etc.h: Include stdarg.h.
17780         (version_etc_copyright): Declare as readonly.
17781         (version_etc): Make this function variadic with a NULL-terminated list
17782         of author name strings.
17783         (version_etc_va): New declaration.
17784         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17785         (version_etc_copyright): Declare as readonly.
17786         (version_etc_va): New function. Provide a different translatable string
17787         for each possible number of authors < 10. Abbreviate when there are 10
17788         authors or more.
17789         (version_etc): Make this function variadic. Call version_etc_va.
17790         Suggestion from Gary V. Vaughan.
17791
17792         * lib/long-options.h (parse_long_options): Change prototype: the
17793         authors string is moved to the end and becomes variadic.
17794         * lib/long-options.c: Include stdarg.h.
17795         (parse_long_options): Make this function variadic, too.
17796         Call version_etc_va, not version_etc.
17797
17798 2003-10-06  Bruno Haible  <bruno@clisp.org>
17799
17800         * modules/version-etc-2: Remove file.
17801         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17802
17803 2003-10-06  Bruno Haible  <bruno@clisp.org>
17804
17805         * modules/fatal-signal: New file.
17806         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17807
17808 2003-10-06  Bruno Haible  <bruno@clisp.org>
17809
17810         * m4/fatal-signal.m4: New file.
17811         * m4/signalblocking.m4: New file, from GNU gettext.
17812
17813 2003-10-06  Bruno Haible  <bruno@clisp.org>
17814
17815         * lib/version-etc-2.h: Remove file.
17816         * lib/version-etc-2.c: Remove file.
17817
17818 2003-10-06  Bruno Haible  <bruno@clisp.org>
17819
17820         * lib/fatal-signal.h: New file, from GNU gettext.
17821         * lib/fatal-signal.c: New file, from GNU gettext.
17822
17823 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17824
17825         * README: Rework advice for preventing empty .o files.
17826         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17827         not <sys/types.h>.
17828
17829 2003-10-04  Karl Berry  <karl@gnu.org>
17830
17831         * lib/argp*: update from libc.
17832
17833 2003-10-04  Karl Berry  <karl@gnu.org>
17834
17835         * config/config.{guess,sub}: update from config.
17836
17837 2003-10-02  Bruno Haible  <bruno@clisp.org>
17838
17839         * modules/lchown (Include): Add lchown.h.
17840         * modules/time_r (Include): Use "..." syntax.
17841         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17842
17843 2003-10-01  Simon Josefsson  <jas@extundo.com>
17844
17845         * MODULES.html.sh (func_all_modules): Move gethostname from section
17846         'based on' to section 'lacking' POSIX:2001.
17847
17848 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17849
17850         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17851         to output mode on the same stream.
17852
17853 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17854
17855         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17856         Fix arg typo in previous patch.
17857
17858 2003-09-28  Jim Meyering  <jim@meyering.net>
17859
17860         * lib/error.c: Correct cpp indentation.
17861
17862 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17863
17864         * modules/free: New file.
17865
17866 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17867
17868         * m4/free.m4: New file.
17869
17870 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17871
17872         * lib/minmax.h (MIN, MAX)
17873         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17874         Omit the special code that used __typeof__, since we worry that
17875         it could be more trouble than it's worth.  See:
17876         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17877         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17878
17879         * lib/free.c: New file.
17880
17881 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17882
17883         Trivial fixes to Makefile.am parts of module listings.
17884         * modules/strstr: Append strstr.h to lib_SOURCES.
17885         * modules/strcase: Likewise, for strcase.h.
17886
17887 2003-09-27  Karl Berry  <karl@gnu.org>
17888
17889         * config/mkinstalldirs: update from automake.
17890
17891 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17892
17893         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17894         (error_tail): Do not loop, reallocating temporary buffer, since
17895         the output cannot contain more wide characters than the input
17896         contains bytes, the size must be big enough already.  This avoids
17897         one potential size overflow calculation.  Check for size overflow
17898         when calculating temporary buffer size.  Free temporary buffer
17899         when done, if it was allocated with malloc; this plugs a memory
17900         leak.  Remove casts from void * to pointers, that are no longer
17901         needed now that we're assuming C89 or better.
17902
17903         Merge error changes from glibc.
17904
17905         * lib/error.c, error.h: Update copyright notice header to match glibc.
17906         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17907         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17908         Disable cancellation while printing error.
17909         * lib/error.h: Prepend __ to parameter names.
17910
17911 2003-09-26  Jim Meyering  <jim@meyering.net>
17912
17913         * lib/error.c (error_tail): Move some declarations
17914         into inner scope where the local variables are used.
17915
17916 2003-09-26  Bruno Haible  <bruno@clisp.org>
17917
17918         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17919         stpncpy().
17920         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17921
17922 2003-09-26  Bruno Haible  <bruno@clisp.org>
17923
17924         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17925         (stpncpy): Define as alias for gnu_stpncpy.
17926         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17927
17928 2003-09-25  Simon Josefsson  <jas@extundo.com>
17929
17930         * lib/xgetdomainname.h: New file.
17931         * lib/xgetdomainname.c: New file.
17932
17933 2003-09-25  Simon Josefsson  <jas@extundo.com>
17934             Bruno Haible  <bruno@clisp.org>
17935
17936         * modules/getdomainname: New file.
17937         * modules/xgetdomainname: New file.
17938         * MODULES.html.sh (func_all_modules): Add getdomainname,
17939         xgetdomainname.
17940
17941 2003-09-25  Simon Josefsson  <jas@extundo.com>
17942             Bruno Haible  <bruno@clisp.org>
17943
17944         * m4/getdomainname.m4: New file.
17945
17946 2003-09-25  Simon Josefsson  <jas@extundo.com>
17947             Bruno Haible  <bruno@clisp.org>
17948
17949         * lib/getdomainname.h: New file.
17950         * lib/getdomainname.c: New file.
17951
17952 2003-09-25  Karl Berry  <karl@gnu.org>
17953
17954         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17955
17956 2003-09-25  Karl Berry  <karl@gnu.org>
17957
17958         * config/install-sh: update from automake.
17959
17960 2003-09-25  Bruno Haible  <bruno@clisp.org>
17961
17962         * modules/version-etc-2: New file, from modules/version-etc with
17963         modifications.
17964         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17965
17966 2003-09-25  Bruno Haible  <bruno@clisp.org>
17967
17968         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17969         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17970
17971 2003-09-24  Simon Josefsson  <jas@extundo.com>
17972
17973         * modules/xgethostname: Add xgethostname.h.
17974
17975 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17976
17977         * lib/linebuffer.c (freebuffer): Don't free the argument, just
17978         the buffer associated with the argument.  Bug reported by
17979         Simon Josefsson.
17980
17981 2003-09-24  Paul Eggert  <eggert@twinsun.com>
17982
17983         * README: Document assumptions that 'int' is at least 32 bits
17984         wide, that integer arithmetic is 2's complement without overflow,
17985         that there are no holes in integer values, that adding sizes of
17986         two nonoverlapping objects can't overflow, and that all-bits-zero
17987         yields scalar zero.  Fix spelling and capitalization typos.
17988
17989 2003-09-19  Karl Berry  <karl@gnu.org>
17990
17991         * lib/argp.h: update from libc.
17992
17993 2003-09-17  Paul Eggert  <eggert@twinsun.com>
17994
17995         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
17996         to avoid spurious warnings like "AC_RUN_IFELSE was called before
17997         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
17998
17999 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18000
18001         * gnulib-tool: Use "test -h", not "test -L", for portability
18002         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18003         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18004         (sed_extract_prog): Issue s commands one-by-one, rather than
18005         using \| in one s command.
18006
18007 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18008
18009         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18010         input error, instead of returning NULL the next time we are called
18011         (and therefore losing track of errno).
18012
18013 2003-09-16  Bruno Haible  <bruno@clisp.org>
18014
18015         * gnulib-tool (func_create_testdir): Warn about duplicated
18016         dependencies.
18017
18018 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18019
18020         * modules/argmatch, modules/fatal, modules/obstack,
18021         modules/xalloc, modules/xgethostname: Sort dependencies by
18022         importance, not alphabetically.
18023
18024 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18025
18026         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18027         fails, so that the caller gets the proper errno.
18028
18029         * lib/readutmp.c (read_utmp): Likewise.
18030         Check for fstat error.  Close stream and free storage
18031         when failing.
18032
18033 2003-09-14  Karl Berry  <karl@gnu.org>
18034
18035         * config/srclist.txt (strdup.c): disable for c89 changes.
18036
18037 2003-09-14  Jim Meyering  <jim@meyering.net>
18038
18039         * lib/getloadavg.c: Correct cpp indentation.
18040         * lib/strdup.c: Likewise.
18041         * lib/vasnprintf.c: Likewise.
18042
18043 2003-09-14  Bruno Haible  <bruno@clisp.org>
18044
18045         * modules/fwriteerror: New file.
18046         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18047
18048 2003-09-14  Bruno Haible  <bruno@clisp.org>
18049
18050         * lib/fwriteerror.h: New file.
18051         * lib/fwriteerror.c: New file.
18052
18053 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18054
18055         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18056         modules/xgethostname, modules/xalloc: Depend on exit.
18057
18058 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18059
18060         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18061
18062         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18063         and AC_MINIX, too, so that their extensions are available.
18064
18065         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18066         This macro has been superseded by gl_BACKUPFILE.
18067
18068         More patches to assume C89 or better.
18069
18070         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18071
18072         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18073         unconditionally.
18074         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18075         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18076         Include <string.h>, <stdlib.h> unconditionally.
18077         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18078         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18079         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18080         headers or for string.h.
18081         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18082         or strtoul.
18083
18084         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18085         headers.
18086         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18087         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18088         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18089         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18090         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18091         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18092         memcpy, memset.
18093         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18094         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18095         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18096         strtol.
18097         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18098         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18099         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18100         strtoul.
18101
18102 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18103
18104         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18105         * lib/obstack.c [!defined _LIBC]: Likewise.
18106         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18107         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18108         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18109
18110         More changes to assume C89 or better.
18111
18112         * lib/error.c (error_tail): Assume vprintf.
18113
18114         * lib/argmatch.c (getenv): Remove decl.
18115         * lib/progreloc.c (get_full_program_name): Define via prototype.
18116         * lib/setenv.c (clearenv): Likewise.
18117         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18118         needed.
18119         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18120         (malloc, memcpy): Remove decls.
18121         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18122         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18123         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18124         (memcpy): Remove macro.
18125         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18126         (__P): Remove.  All uses removed.
18127         (PTR): Remove.  All uses changed to void *.
18128         (CHAR_BIT, NULL): Remove.
18129         (spaces, zeros, memset_space, memset_zero)
18130         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18131         Remove.
18132         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18133         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18134         Define with prototype.
18135         Remove now-unnecessary prototype decl.
18136         (extra_args_spec): Assume ANSI C.  All uses changed.
18137         (extra_args_spec_iso): Remove.
18138         (my_strftime, emacs_strftimeu): Define via prototype.
18139         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18140         unconditionally.
18141         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18142         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18143         (strtoul, strtol): Remove decls.
18144         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18145         LONG_MAX): Remove.
18146         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18147         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18148         (LOCALE_PARAM_PROTO): New macro.
18149         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18150         (INTERNAL (strtol), strtol): Define with a prototype.
18151         (PARAMS): Remove.  All uses removed.
18152         * lib/tempname.c: Include <string.h> unconditionally.
18153         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18154         * lib/xgethostname.c (main): Define with a prototype.
18155         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18156         Include <stdlib.h> unconditionally.
18157         (calloc, malloc, realloc, free): Remove decls.
18158         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18159         Include <stdlib.h> unconditionally.  Sort include file names.
18160         (strtod): Remove.
18161         (xstrtod): Define with a prototype.
18162         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18163         (strtol, strtoul): Remove decls.
18164
18165 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18166
18167         More patches to assume C89 or better.
18168         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18169         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18170         string.h, memchr, STDC_HEADERS.
18171
18172 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18173
18174         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18175         Include <stdlib.h>, <string.h> unconditionally.
18176         Remove now-unnecessary cast to char *.
18177         * lib/strnlen.c: Include <string.h> unconditionally.
18178         * lib/yesno.c (yesno): Define with a prototype.
18179
18180 2003-09-11  Bruno Haible  <bruno@clisp.org>
18181
18182         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18183
18184 2003-09-10  Jim Meyering  <jim@meyering.net>
18185
18186         * lib/error.c: Correct indentation of cpp directives.
18187
18188 2003-09-10  Bruno Haible  <bruno@clisp.org>
18189
18190         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18191         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18192         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18193         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18194         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18195         <stdlib.h> and <string.h> checks.
18196         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18197         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18198
18199 2003-09-10  Bruno Haible  <bruno@clisp.org>
18200
18201         * lib/strcspn.c: Include <string.h> unconditionally.
18202         * lib/strpbrk.c: Include <string.h> unconditionally.
18203         * lib/strstr.c: Include <string.h> unconditionally.
18204         * lib/unicodeio.c: Include <string.h> unconditionally.
18205         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18206         * lib/unsetenv.c: Likewise.
18207         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18208         * lib/yesno.c: Include <stdlib.h> unconditionally.
18209         (rpmatch): Add prototype.
18210
18211 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18212
18213         More patches to assume C89 or better.
18214         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18215         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18216         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18217         or for string.h.
18218         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18219         stdlib.h.
18220         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18221         C headers.
18222         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18223         string.h.
18224         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18225         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18226         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18227         or for string.h.
18228         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18229         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18230         C headers.
18231         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18232         memcpy.
18233         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18234         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18235         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18236         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18237         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18238         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18239         string.h, free.
18240         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18241         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18242         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18243         C headers, or for string.h.
18244         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18245         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18246         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18247         headers, memory.h, stdlib.h, string.h, strings.h.
18248         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18249         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18250         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18251         strchr.
18252         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18253         headers, memory.h, string.h.
18254         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18255         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18256         free.
18257         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18258         headers.
18259         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18260         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18261         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18262         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18263         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18264
18265 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18266
18267         More K&R removal.
18268
18269         * lib/acosl.c (main): Use a prototype.
18270         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18271         tanl.c: Likewise.
18272
18273         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18274
18275         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18276         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18277         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18278         with a prototype.
18279         * lib/getopt.c (const): Remove macro.
18280         Include <string.h> unconditionally.
18281         (my_index): Remove; all uses changed to strchr.
18282         (strlen): Remove decl.
18283         (exchange): Remove forward decl; no longer needed.
18284         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18285         Define with prototype.
18286         * lib/getopt1.c (const): Remove macro.
18287         (getopt_long, getopt_long_only, main): Define with prototype.
18288
18289         * lib/getugroups.c: Include <string.h> unconditionally.
18290
18291         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18292         (getusershell, setusershell, endusershell, readname, main):
18293         Define with prototypes.
18294
18295         * lib/group-member.c: Include group-member.h first.
18296         Include <stdlib.h> unconditionally.
18297
18298         * lib/hard-locale.c: Include hard-locale.h first.
18299         Include <stdlib.h>, <string.h> unconditionally.
18300
18301         * lib/hash.c (free, malloc): Remove decls.
18302         Include <stdlib.h> unconditionally.
18303
18304         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18305         (getenv): Do not declare.
18306
18307         * lib/idcache.c: Include <string.h> unconditionally.
18308
18309         * lib/long-options.c: Include long-options.h first, to test interface.
18310         Include <stdlib.h> unconditionally.
18311
18312         * lib/makepath.c: Include makepath.h first, to test interface.
18313         Include <stdlib.h> and <string.h> unconditionally.
18314
18315         * lib/linebuffer.c: Include <stdlib.h>.
18316         (free): Remove decl.
18317
18318         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18319         stddef.h. rpl_malloc returns void *, not char *.
18320         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18321         prototype.
18322
18323         * lib/md5.h: Include <limits.h> unconditionally.
18324         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18325         (__P): Remove; all uses removed.
18326         * lib/md5.c: Include "md5.h" first.
18327         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18328         md5_buffer, md5_process_bytes, md5_process_block):
18329         Define with prototypes.
18330         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18331         * lib/sha.c: Include "sha.h" first.
18332         Include <stdlib.h>, <string.h> unconditionally.
18333
18334         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18335         * lib/memcmp.c (__ptr_t): Likewise.
18336         * lib/memrchr.c (__ptr_t): Likewise.
18337         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18338         Include <string.h> unconditionally.
18339         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18340         * lib/memchr.c: Include <stdlib.h> unconditionally.
18341         * lib/memchr.c (LONG_MAX): Remove.
18342         * lib/memrchr.c (LONG_MAX): Likewise.
18343         * lib/memchr.c (__memchr): Define via a prototype.
18344         * lib/memrchr.c (__memrchr): Likewise.
18345         * lib/memcmp.c (__P): Remove, and remove all uses.
18346         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18347         Remove forward decls; no longer needed.
18348         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18349         Use types required by C89 in prototype.
18350
18351         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18352         * lib/savedir.c: Likewise.
18353         * lib/mkdir.c (free): Remove decl.
18354         * lib/rmdir.c (rmdir): Define with a prototype.
18355         * lib/savedir.c: Include savedir.h first, to test interface.
18356
18357         * lib/mktime.c (STDC_HEADERS): Remove.
18358         Include <stdlib.h>, <string.h> unconditionally.
18359
18360         * lib/modechange.c: Include <stdlib.h> unconditionally.
18361         (malloc): Remove decl.
18362
18363         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18364         (free): Remove decl.
18365
18366         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18367         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18368         (This type really should be intptr_t, but that's a C99ism.)
18369         (_obstack_memcpy): Remove: all uses changed to memcpy.
18370         Include <string.h> unconditionally.
18371         (struct obstack): Assume __STDC__ for types of members
18372         chunkfun, freefun, extra_arg.
18373         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18374         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18375         obstack_begin, obstack_specify_allocation,
18376         obstack_specify_allocation_with_arg, obstack_chunkfun,
18377         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18378         Remove unprototyped decls and the macros that use them.
18379         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18380         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18381         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18382         (defined __STDC__ && __STDC__)]:
18383         Remove nonprototyped code.
18384         Include <stdlib.h> unconditionally.
18385         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18386         _obstack_allocated_p, _obstack_free, obstack_free,
18387         _obstack_memory_used, print_and_abort):
18388         Define using prototypes.
18389         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18390         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18391         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18392         obstack_next_free, obstack_object_size, obstack_room) [0]:
18393         Remove unused, unprototyped code.
18394
18395         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18396
18397         * lib/physmem.c (physmem_total, physmem_available, main): Define
18398         with prototypes.
18399
18400         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18401         (main): Define with a prototype.
18402
18403         * lib/posixver.c (getenv): Remove decl.
18404
18405         * lib/putenv.c (malloc): Returns void *, not char *.
18406         Include <string.h> unconditionally.
18407         (strchr, memcpy, NULL): Do not define.
18408
18409         * lib/readtokens.c: Include readtokens.h first, to test interface.
18410         Include <stdlib.h>, <string.h> unconditionally.
18411         (init_tokenbuffer): Define with a prototype.
18412
18413         * lib/regex.c (PARAMS): Remove.  All uses removed.
18414         All uses of _RE_ARGS removed, too.
18415         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18416         unconditionally.
18417         (bzero): Assume memset exists.
18418         (memcmp, memcpy, NULL): Remove.
18419         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18420         char, or assignments to local vars of type signed char.
18421         (init_syntax_once, PREFIX(extract_number_and_incr),
18422         PREFIX(print_partial_compiled_pattern),
18423         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18424         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18425         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18426         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18427         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18428         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18429         wcs_compile_range, byte_compile_range, truncate_wchar,
18430         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18431         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18432         count_mbs_length, wcs_re_match_2_internal,
18433         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18434         PREFIX(alt_match_null_string_p),
18435         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18436         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18437         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18438         now-unnecessary declaration, if any.
18439         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18440         regcomp, regexec):
18441         Remove now-unnecessary casts among pointer types.
18442         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18443
18444         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18445         (free): Remove decl.
18446
18447         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18448
18449         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18450         (free): Remove decl.
18451
18452         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18453         * lib/xgetcwd.c: Likewise.
18454
18455         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18456         (free): Remove decl.
18457
18458         * lib/strchrnul.c (strchrnul): Define with a prototype.
18459         Fix bug: c_in was not converted to char before searching.
18460
18461         The following changes are not K&R related:
18462
18463         * lib/group-member.h: Include <sys/types.h>, so that this file is
18464         self-contained.
18465         * lib/makepath.h: Likewise.
18466
18467         * lib/getusershell.c (readname, default_index, line_size, readname):
18468         Use size_t, not int, for sizes.
18469         (readname): If the size overflows, report an error instead of
18470         looping forever.
18471
18472 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18473
18474         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18475         libc.
18476
18477 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18478
18479         * README: New section: portability guidelines.
18480
18481 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18482
18483         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18484         C89 spec.
18485
18486 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18487
18488         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18489
18490 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18491
18492         Assume C89 or better; remove K&R cruft.
18493         A few of these changes were first proposed by Derek Robert Price
18494         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18495
18496         * lib/addext.c: Include <string.h> unconditionally.
18497         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18498         Don't declare getenv or malloc.
18499
18500         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18501         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18502         (NULL): Remove.
18503         (find_stack_direction, alloca): Use prototypes.
18504
18505         * lib/atexit.c (atexit): Define using a prototype.
18506
18507         * lib/basename.c, dirname.c, stripslash.c:
18508         Include <string.h> unconditionally.
18509
18510         * lib/bcopy.c: Include <stddef.h>.
18511         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18512
18513         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18514
18515         * lib/error.h (error, error_at_line, error_print_progname)
18516         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18517         * lib/error.c: Include error.h first, to check interface.
18518         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18519         (VA_START): Remove; all uses changeed to va_start.
18520         (exit, strerror): Remove decls.
18521         (error_print_progname): Prototype uncondionally.
18522         Don't include <errno.h>; no longer needed.
18523         (private_strerror): Remove.
18524         (error_tail): Always define.
18525         (error, error_at_line): Assume C89 or better; always use prototypes.
18526         * lib/fatal.c: Include "fatal.h" first, to test interface.
18527         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18528         (VA_START): Remove; all uses changed to va_start.
18529         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18530         this case.
18531         (exit): Remove decl.
18532         (fatal): Prototype unconditionally.  Assume va_start works.
18533         Abort at end, to pacify gcc.
18534
18535         * lib/euidaccess.c (main): Define with a prototype.
18536
18537         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18538
18539         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18540
18541         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18542         prototypes.
18543         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18544         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18545         (getenv): Remove decl.
18546         (fnmatch): Define using a prototype.
18547         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18548         (FCT): Define using a prototype.
18549
18550         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18551
18552         * lib/gethostname.c: Include <stddef.h>.
18553         (gethostname): Define with prototype.  Length is size_t, not int.
18554
18555 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18556
18557         Assume C89 or better; remove K&R cruft.
18558         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18559         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18560         string.h, getenv, malloc.
18561         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18562         headers.
18563         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18564         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18565         do not check for strerror.
18566         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18567         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18568         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18569         do not check for doprnt or vprintf.
18570         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18571         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18572
18573 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18574
18575         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18576         getversion.c should have been removed then, but was accidentally
18577         preserved.
18578
18579         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18580         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18581
18582 2003-09-08  Karl Berry  <karl@gnu.org>
18583
18584         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18585                 config, forget about prep.
18586
18587         * config/depcomp, missing: update from automake.
18588
18589 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18590
18591         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18592         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18593
18594 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18595
18596         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18597         copy_tm_result.  Bug reported by Simon Josefsson in
18598         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18599
18600 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18601
18602         * m4/time_r.m4: New file.
18603         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18604         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18605         is. Check for timegm declaration.
18606         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18607         Do not check for gmtime_r.
18608         Replace mktime if __mktime_internal does not exist and if mktime
18609         hasn't been replaced already.
18610
18611 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18612
18613         * lib/time_r.c, lib/time_r.h: New files.
18614
18615         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18616         __localtime_r.
18617         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18618         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18619
18620         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18621         __gmtime_r.
18622         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18623         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18624         Include <time_r.h>.
18625
18626         * lib/timegm.c: Switch to glibc implementation, with the following
18627         changes:
18628         [defined HAVE_CONFIG_H]: Include <config.h>.
18629         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18630         (__mktime_internal) [!defined _LIBC]: New decl.
18631         (__gmtime_r) [!defined _LIBC]: New macro and function.
18632         (timegm): Use a prototype, since gnulib assumes C89.
18633         Do not bother declaring tmp to be const, as it's not really usefu.
18634         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18635         (timegm): Declare only if HAVE_DECL_TIMEGM.
18636
18637 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18638
18639         * MODULES.html.sh (func_all_modules): Add time_r.
18640         * modules/time_r: New file.
18641         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18642         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18643
18644 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18645
18646         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18647         Bug reported by Lute Kamstra in
18648         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18649
18650         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18651         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18652         course with correspondingly smaller numbers for tomorrow and
18653         yesterday.  From Tadayoshi Funaba.  Originally installed into
18654         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18655         coreutils merge?).
18656
18657 2003-08-31  Simon Josefsson  <jas@extundo.com>
18658
18659         * modules/timegm: New file.
18660         * MODULES.html.sh (func_all_modules): Add timegm.
18661
18662 2003-08-31  Simon Josefsson  <jas@extundo.com>
18663
18664         * m4/timegm.m4: New file.
18665
18666 2003-08-31  Simon Josefsson  <jas@extundo.com>
18667
18668         * lib/timegm.h: New file.
18669         * lib/timegm.c: New file.  Based on
18670         wget-1.8.2/src/http.c:mktime_from_utc.
18671
18672 2003-08-31  Karl Berry  <karl@gnu.org>
18673
18674         * lib/argp.h: update from libc.
18675
18676 2003-08-28  Bruno Haible  <bruno@clisp.org>
18677
18678         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18679         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18680         followed by '#define fnmatch fnmatch_posix' gives an error.
18681
18682 2003-08-28  Bruno Haible  <bruno@clisp.org>
18683
18684         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18685         warning on QNX, which defines O_BINARY to 000000.
18686
18687 2003-08-27  Jim Meyering  <jim@meyering.net>
18688
18689         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18690         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18691         would fail after 32.  Reported by Danny Levinson.  Details here:
18692         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18693
18694 2003-08-24  Bruno Haible  <bruno@clisp.org>
18695
18696         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18697         MSVC7 <stdio.h> is included later.
18698
18699 2003-08-22  Simon Josefsson  <jas@extundo.com>
18700
18701         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18702
18703 2003-08-20  Karl Berry  <karl@gnu.org>
18704
18705         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18706
18707 2003-08-20  Bruno Haible  <bruno@clisp.org>
18708
18709         * modules/progname: New file.
18710         * MODULES.html.sh (func_all_modules): Add progname.
18711
18712 2003-08-20  Bruno Haible  <bruno@clisp.org>
18713
18714         * lib/progname.h: New file, from GNU gettext.
18715         * lib/progname.c: New file, from GNU gettext.
18716         * lib/progreloc.c: New file, from GNU gettext.
18717
18718 2003-08-19  Jim Meyering  <jim@meyering.net>
18719
18720         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18721         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18722
18723 2003-08-19  Bruno Haible  <bruno@clisp.org>
18724
18725         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18726         more.
18727
18728 2003-08-19  Bruno Haible  <bruno@clisp.org>
18729
18730         * lib/xstrdup.c: Assume <string.h> exists.
18731
18732 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18733
18734         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18735         in makefile rules.
18736
18737 2003-08-18  Jim Meyering  <jim@meyering.net>
18738
18739         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18740         * m4/lib-ld.m4: Likewise.
18741
18742 2003-08-18  Jim Meyering  <jim@meyering.net>
18743
18744         * lib/setenv.h: Indent nested cpp directive.
18745         * lib/vasnprintf.c: Remove trailing blanks.
18746
18747 2003-08-17  Simon Josefsson  <jas@extundo.com>
18748
18749         * modules/xstrndup: New file.
18750         * MODULES.html.sh (func_all_modules): Add xstrndup.
18751
18752 2003-08-17  Simon Josefsson  <jas@extundo.com>
18753
18754         * modules/argp: Fix autoconf macro name. Add more dependencies.
18755
18756 2003-08-17  Simon Josefsson  <jas@extundo.com>
18757
18758         * m4/xstrndup.m4: New file.
18759
18760 2003-08-17  Simon Josefsson  <jas@extundo.com>
18761
18762         * m4/argp.m4: New file.
18763
18764 2003-08-17  Simon Josefsson  <jas@extundo.com>
18765             Bruno Haible  <bruno@clisp.org>
18766
18767         * lib/xstrndup.h: New file.
18768         * lib/xstrndup.c: New file.
18769
18770 2003-08-17  Bruno Haible  <bruno@clisp.org>
18771
18772         * modules/strndup (Files, Include): Add lib/strndup.h.
18773
18774 2003-08-17  Bruno Haible  <bruno@clisp.org>
18775
18776         * modules/euidaccess (Files): Add lib/euidaccess.h.
18777
18778 2003-08-17  Bruno Haible  <bruno@clisp.org>
18779
18780         * lib/strndup.h: New file.
18781
18782 2003-08-17  Bruno Haible  <bruno@clisp.org>
18783
18784         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18785         like AC_GNU_SOURCE.
18786         * modules/extensions (configure.ac): Comment out the invocation of
18787         gl_USE_SYSTEM_EXTENSIONS.
18788
18789 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18790
18791         Merges from coreutils, etc.
18792         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18793         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18794         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18795         fixing a typo.
18796         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18797         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18798
18799 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18800
18801         Document merge from coreutils.
18802         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18803         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18804         * modules/utime: Add m4/utimes-null.m4.
18805
18806 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18807
18808         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18809         space, undoing this 2003-08-12 change:
18810         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18811
18812 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18813
18814         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18815         strtoul.c from libc, undoing this 2003-08-12 change:
18816         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18817
18818 2003-08-16  Jim Meyering  <jim@meyering.net>
18819
18820         Merges from coreutils.
18821         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18822         prefix.  Adjust cache variables similarly.  Create 500 rather than
18823         just 300 files, to exercise bug on Darwin6.5, too.
18824         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18825         $missing_dir.
18826         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18827         AM_SYS_POSIX_TERMIOS.
18828         Reported by mkc@mathdogs.com.
18829         Also change use of $am_cv_sys_posix_termios
18830         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18831         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18832         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18833         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18834         in /proc/mounts until it finds one with matching device number.  This
18835         is unnecessary when the FILE argument *is* a mount point.  No stat call
18836         is necessary in that case.  So, disable the statvfs-testing code on
18837         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18838         as RedHat bug# 84846.
18839         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18840         to 1MB, so as not to render systems with no stack size limit (e.g.,
18841         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18842         Include <unistd.h>.  On some systems,
18843         it is required for the definition of _SC_PAGESIZE.
18844
18845 2003-08-16  Jim Meyering  <jim@meyering.net>
18846
18847         Merge from coreutils.
18848         * lib/xstrtoimax.c: #else #if -> #elif.
18849         * lib/xstrtoumax.c: Likewise.
18850
18851 2003-08-16  Jim Meyering  <jim@meyering.net>
18852
18853         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18854         * m4/utimes.m4: Removed.
18855         * m4/utimes-null.m4: Renamed from utimes.m4.
18856
18857         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18858         to 1MB, so as not to render systems with no stack size limit (e.g.,
18859         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18860         Include <unistd.h>.  On some systems,
18861         it is required for the definition of _SC_PAGESIZE.
18862
18863 2003-08-16  Jim Meyering  <jim@meyering.net>
18864         and Paul Eggert  <eggert@cs.ucla.edu>
18865
18866         Merges from coreutils, etc.
18867
18868         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18869         using the latest version from cvs.  This avoids problems with #line
18870         directives using a vendor (Sun) compiler.
18871         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18872         Don't set GETGROUPS_LIB here; now it's
18873         done via getgroups.m4's wrapper function.
18874         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18875         rather than just in sh-util/configure.in, so that the
18876         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18877         same.
18878         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18879         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18880         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18881         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18882         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18883         Remove code that is now done by the newly-required macros.
18884         Append $(EXEEXT) to DF_PROG.
18885         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18886         Do not invoke or require the following here,
18887         since prereq.m4 or some gnulib .m4 now does this for us:
18888         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18889         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18890         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18891         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18892         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18893         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18894         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18895         AC_FUNC_OBSTACK.
18896         Do not replace the following functions, as this is now the job
18897         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18898         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18899         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18900         atexit getpass, strdup, getpagesize.
18901         Replace 'raise'.
18902         Do not check for the following functions, as this is now the job
18903         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18904         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18905         setregid.
18906         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18907         Check for sys/sysctl.h.
18908         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18909         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18910         of checking for ssize_t ourselves.
18911
18912         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18913         Require every macro that gnulib/modules/* suggests for us.
18914         (jm_PREREQ_ADDEXT): New macro.
18915         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18916         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18917
18918         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18919         (gl_PHYSMEM): Use it.
18920         Also check for `table' function.
18921         Check for new headers and functions.
18922         Add check for sys/sysmp.h.
18923         With suggestions from Kaveh Ghazi.
18924         Ignore headers that are present but cannot be compiled.  This
18925         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18926         C 5.4.
18927
18928 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18929
18930         Document merge from coreutils.
18931         * modules/userspec: Depend on posixver.
18932         * modules/strftime: Depend on tzset.
18933
18934 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18935
18936         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18937         rather than tab, after '#' in shell-script copyright notices.
18938         Suggested by Bruno Haible.
18939
18940 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18941
18942         * config/srclist-update: Use three spaces, rather than tab, after '#'
18943         in shell-script copyright notices.  Suggested by Bruno Haible.
18944         Remove unnecessary parenthesization in regular expression.
18945
18946 2003-08-15  Jim Meyering  <jim@meyering.net>
18947
18948         Merge from coreutils.
18949         * lib/xgethostname.c: Include <stdlib.h>.
18950         (xghostname): Don't exit for anything other than memory-related
18951         failure; just return NULL.
18952         * lib/userspec.c: Include "posixver.h".
18953         (parse_user_spec): Accept `.' as a separator only
18954         in pre-POSIX-200112 mode.
18955         * lib/strtoimax.c: Use #elif rather than #else #if.
18956         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18957         Remove function, now that we can rely on a working tzset function.
18958         [!_LIBC]: Ensure that the required autoconf test has been run.
18959         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18960         Use underlying_strftime for %r.
18961         * lib/sha.c: Merge in some clean-up and optimization changes from
18962         glibc.
18963         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18964         Ensure that it is a multiple of 64.
18965         Rearrange loop exit tests so as to avoid performing an
18966         additional fread after encountering an error or EOF.
18967         * lib/realloc.c: Update copyright date.
18968
18969 2003-08-15  Jim Meyering  <jim@meyering.net>
18970         and Paul Eggert  <eggert@twinsun.com>
18971
18972         Merge from coreutils.
18973         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
18974         member but strut utmpx does not.  Needed for AIX 4.3.3.
18975         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
18976
18977 2003-08-15  Jim Meyering  <jim@meyering.net>
18978         and Paul Eggert  <eggert@cs.ucla.edu>
18979
18980         Merges from coreutils, etc.
18981         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
18982         Require gl_FUNC_TZSET_CLOBBER.
18983         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
18984         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
18985         members.
18986
18987 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18988
18989         Help the merge from coreutils.
18990         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
18991         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
18992         * m4/tzset.m4: Use it too.
18993
18994 2003-08-14  Paul Eggert  <eggert@twinsun.com>
18995
18996         * modules/tzset: New file.
18997
18998 2003-08-14  Jim Meyering  <jim@meyering.net>
18999
19000         Merges from coreutils.
19001         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19002         variable names, rather than @FNMATCH_H@.
19003         * modules/alloca: Likewise for $(ALLOCA_H).
19004
19005         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19006         the three copies of the literal target, `fnmatch.h'.
19007         * modules/alloca (alloca.h): Likewise.
19008
19009 2003-08-14  Jim Meyering  <jim@meyering.net>
19010
19011         Merge from coreutils.
19012         * m4/tzset.m4: New file.
19013         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19014         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19015         otherwise, AIX 5.1 systems would end up using the latter.
19016         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19017         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19018         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19019         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19020
19021 2003-08-14  Jim Meyering  <jim@meyering.net>
19022
19023         Merge from coreutils.
19024         * lib/obstack.h: Whitespace changes.
19025         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19026         and xcalloc return values.
19027         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19028         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19029         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19030         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19031         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19032         error from mntctl.
19033         Use mntctl's return value to drive the entry-processing loop, since
19034         we can't rely on the value of the vmt_length member in the last
19035         entry.  On some systems doing so could result in exhausting
19036         virtual memory.  Based in part on a patch from Mike Jetzer.
19037
19038 2003-08-14  Jim Meyering  <jim@meyering.net>
19039         and Paul Eggert  <eggert@twinsun.com>
19040
19041         Merges from coreutils, plus other fixes.
19042         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19043         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19044         for credits and details.  Thanks to Kaveh Ghazi for helping
19045         to keep these files in sync.
19046         (ARRAY_SIZE): Define it.
19047         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19048         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19049         (memcasecmp): Don't assume size_t fits in unsigned int.
19050         Remove casts and duplicate code.
19051         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19052         (memcpy): Remove definition.
19053         Merge in some clean-up and optimization changes from glibc.
19054         [BLOCKSIZE]: Move definition to top of file.
19055         Ensure that it is a multiple of 64.
19056         Rearrange loop exit tests so as to avoid performing an
19057         additional fread after encountering an error or EOF.
19058         * lib/md5.h (md5_uintptr): Define.
19059         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19060         return to the initial working directory.  Preserve errno
19061         for caller.
19062         * lib/idcache.c: Include "xalloc.h".
19063         (xmalloc, xrealloc): Remove decls.
19064         (getuser): Remove casts no longer required in C89.
19065         * lib/human.c: Include stdio.h, for sprintf.
19066         * lib/group-member.c: Include "xalloc.h".
19067         (xmalloc, xrealloc): Remove decls.
19068         (get_group_info): Remove casts no longer required in C89.
19069         * lib/getusershell.c (readname): Remove casts no longer required in
19070         C89.
19071         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19072         * lib/getline.c: Whitespace fix, from coreutils.
19073
19074 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19075
19076         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19077         Check for isascii.
19078
19079         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19080         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19081         Undo previous (whitespace-only) change.
19082
19083 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19084
19085         * lib/exclude.c: Include <ctype.h>
19086         (IN_CTYPE_DOMAIN): New macro.
19087         (is_space): New fn.
19088         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19089         and empty lines.
19090
19091         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19092         Undo previous (whitespace-only) change.
19093
19094 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19095
19096         * config/srclist-update: Change update back to the old behavior,
19097         leaving whitespace alone.  Use one 'sed' command rather than a
19098         pipeline.
19099         (fixlicense): Now a variable, not a function.
19100         (remove_trailing_blanks): Remove.
19101         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19102         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19103         Undo previous (whitespace-only) change.
19104
19105 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19106
19107         Merge from coreutils.
19108         * modules/euidaccess: Add lib_SOURCES, include for new
19109         file euidaccess.h
19110
19111 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19112
19113         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19114         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19115         Normalize leading white space and remove trailing white space.
19116
19117         Merge from coreutils
19118         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19119
19120         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19121         0.12.1.  These files are now being upgraded automatically by
19122         ../config/srclist-update.
19123
19124 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19125
19126         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19127         Normalize leading white space and remove trailing white space.
19128         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19129         notice, as per ../config/srclist-update.
19130
19131         Merge from coreutils.
19132         * lib/euidaccess.h: New file.
19133         * lib/euidaccess.c: Include it.
19134         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19135         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19136         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19137
19138 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19139
19140         * config/srclist-update: Add copyright notice.
19141         (remove_id_lines, remove_trailing_blanks): New constants.
19142         (fixfile): Use them to normalize spacing a bit in copied files.
19143         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19144         Normalize leading white space and remove trailing white space.
19145
19146         * config/texinfo.tex: Sync with texinfo.
19147
19148         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19149         strtoul.c from libc, to merge coreutils whitespace changes.
19150
19151         * config/srclist.txt: Get the following m4 files from gettext:
19152         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19153         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19154         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19155         wint_t.m4.
19156
19157 2003-08-12  Karl Berry  <karl@gnu.org>
19158
19159         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19160         been made.
19161
19162 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19163
19164         * modules/gnu-source, m4/gnu-source.m4:
19165         Remove; we're assuming Autoconf 2.54 or later now.
19166         Suggested by Bruno Haible.
19167         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19168
19169 2003-08-11  Bruno Haible  <bruno@clisp.org>
19170
19171         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19172
19173 2003-08-11  Bruno Haible  <bruno@clisp.org>
19174
19175         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19176         (vasnprintf): Use it instead of wcslen.
19177
19178 2003-08-11  Bruno Haible  <bruno@clisp.org>
19179
19180         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19181         value to ensure that _Bool promotes to int. Use #define for _Bool when
19182         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19183
19184 2003-08-10  Karl Berry  <karl@gnu.org>
19185
19186         * lib/regex.h: update from libc (whitespace fix).
19187
19188 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19189
19190         Merge some files from coreutils.  These changes were
19191         originally made by Jim Meyering.
19192         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19193         many older Unixes require this.
19194         * lib/alloca.c (alloca): Remove cast to argument of free;
19195         no longer needed in C89.
19196         * lib/alloca_.h, regex.h: Fix white space to match
19197         what GNU indent does.
19198
19199 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19200
19201         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19202         apparently Emacs's Unicode mode got confused before my 2003-08-05
19203         checkin.
19204
19205 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19206
19207         * m4/extensions.m4: New file.
19208         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19209         Require gl_USE_SYSTEM_EXTENSIONS.
19210         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19211         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19212
19213 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19214
19215         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19216         * modules/extensions, modules/gnu-source: New files.
19217         * modules/timespec, modules/unlocked-io: Depend on extensions.
19218
19219 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19220
19221         * modules/restrict: New file.
19222         * MODULES.html.sh (func_all_modules): Add restrict.
19223         * modules/regex: Depend on restrict.
19224
19225 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19226
19227         * m4/restrict.m4: New file.
19228         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19229
19230 2003-08-07  Bruno Haible  <bruno@clisp.org>
19231
19232         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19233         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19234
19235 2003-08-07  Bruno Haible  <bruno@clisp.org>
19236
19237         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19238         makes the module 'getndelim2' compatible with the module 'getline'.
19239
19240 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19241
19242         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19243         byte with "\201" to avoid glitches when editing that source file
19244         with multi-gnome-terminal.
19245
19246 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19247
19248         * lib/bumpalloc.h: Remove.
19249
19250 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19251
19252         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19253         * modules/bumpalloc: Remove.
19254
19255 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19256
19257         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19258         GNU coding style.
19259
19260         Merge from coreutils.
19261         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19262         1. From glibc.
19263         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19264         from Karl Berry, implemented by Jim Meyering.
19265         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19266         from Dmitry V. Levin.
19267         Remove anachronistic cast of xrealloc.
19268         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19269         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19270         type. Otherwise, it wouldn't compile with at least /bin/cc on
19271         ymp-cray-unicos9.0.2.X.
19272         Combine two mostly-identical uses of alloca into one.
19273         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19274
19275 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19276
19277         [From Emacs.]
19278
19279         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19280         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19281         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19282         obsolete NLIST_NAME_UNION.
19283         [__GNU__]: Undef BSD and FSCALE.
19284         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19285
19286 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19287
19288         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19289         an enum type, so that it's guaranteed to promote to int.  See:
19290         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19291
19292 2003-08-03  Karl Berry  <karl@gnu.org>
19293
19294         * config/depcomp: update from automake.
19295
19296 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19297
19298         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19299         (strerror): Don't assume that a printable int fits in 14 bytes.
19300
19301 2003-07-31  Bruno Haible  <bruno@clisp.org>
19302
19303         * modules/getpass-gnu: New file.
19304         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19305
19306 2003-07-31  Bruno Haible  <bruno@clisp.org>
19307
19308         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19309
19310 2003-07-24  Karl Berry  <karl@gnu.org>
19311
19312         * config/missing: update from automake.
19313
19314 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19315             Bruno Haible  <bruno@clisp.org>
19316
19317         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19318         * lib/getline.c (getline, getdelim): Likewise.
19319         Remove _GNU_SOURCE define; now it's defined in config.h through
19320         m4/getline.m4.
19321
19322 2003-07-23  Karl Berry  <karl@gnu.org>
19323
19324         * config/config.sub: update from prep.
19325
19326 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19327
19328         * modules/xalloc (Depends-on): Add exitfail.
19329         * modules/xmemcoll: Likewise.
19330
19331 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19332
19333         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19334         over-parenthesization in macros.
19335
19336         Sync with coreutils.
19337
19338         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19339         required by C99.
19340
19341         Use `exit_failure' for xalloc and xmemcoll instead of their own
19342         private exit-failure variables.
19343         * lib/xalloc.h (xalloc_exit_failure): Remove.
19344         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19345         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19346         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19347         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19348         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19349
19350 2003-07-20  Jim Meyering  <jim@meyering.net>
19351
19352         * modules/closeout (Depends-on): Add exitfail.
19353         Suggestion from Bruno Haible.
19354
19355 2003-07-19  Karl Berry  <karl@gnu.org>
19356
19357         * config/config.sub: update from prep.
19358
19359 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19360
19361         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19362         Remove.
19363         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19364         to test that it can stand by itself.  Include "exitfail.h".
19365         Clients should set exit_failure instead.
19366         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19367
19368 2003-07-18  Bruno Haible  <bruno@clisp.org>
19369
19370         * modules/getndelim2: New file.
19371         * modules/getline: Share files with module getndelim2.
19372         * modules/getnline: Depend on getndelim2 instead of sharing files with
19373         it. Add getnline.c to lib_SOURCES.
19374         * MODULES.html.sh (func_all_modules): Add getndelim2.
19375
19376 2003-07-18  Bruno Haible  <bruno@clisp.org>
19377
19378         * m4/getndelim2.m4: New file.
19379         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19380         invoke gl_PREREQ_GETNDELIM2.
19381         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19382         gl_PREREQ_GETNDELIM2.
19383         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19384         gl_GETNDELIM2.
19385
19386 2003-07-18  Bruno Haible  <bruno@clisp.org>
19387
19388         * lib/getndelim2.h: New file.
19389         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19390         getndelim2.h.
19391         (getndelim2): Make non-static. Change return type to ssize_t.
19392         * lib/getline.h: Change argument names.
19393         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19394         * lib/getnline.c: Include getndelim2.h.
19395
19396 2003-07-18  Andreas Schwab  <schwab@suse.de>
19397
19398         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19399
19400 2003-07-17  Karl Berry  <karl@gnu.org>
19401
19402         * config/config.sub: update from prep.
19403
19404 2003-07-17  Bruno Haible  <bruno@clisp.org>
19405
19406         * modules/getnline: New file.
19407         * modules/getline: Add lib/getndelim2.c to source file list.
19408         * MODULES.html.sh (func_all_modules): Add getnline.
19409
19410 2003-07-17  Bruno Haible  <bruno@clisp.org>
19411
19412         * m4/getnline.m4: New file.
19413
19414 2003-07-17  Bruno Haible  <bruno@clisp.org>
19415
19416         * m4/Makefile.am.in: Remove file.
19417         * m4/Makefile.am: Remove file.
19418         * m4/Makefile.in: Remove file.
19419
19420 2003-07-17  Bruno Haible  <bruno@clisp.org>
19421
19422         * lib/getnline.h: New file.
19423         * lib/getnline.c: New file.
19424         * lib/getndelim2.c: New file, extracted from getline.c.
19425         (getndelim2): Renamed from getdelim2, with added nmax argument.
19426         * lib/getline.c: Include getndelim2.c.
19427         (getdelim2): Moved out to getndelim2.c.
19428         (getline, getdelim): Update.
19429
19430 2003-07-17  Bruno Haible  <bruno@clisp.org>
19431
19432         * lib/Makefile.am: Remove file.
19433         * lib/Makefile.in: Remove file.
19434
19435 2003-07-17  Bruno Haible  <bruno@clisp.org>
19436
19437         * configure.in: Remove file.
19438         * Makefile.in: Remove file.
19439
19440 2003-07-17  Bruno Haible  <bruno@clisp.org>
19441
19442         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19443
19444 2003-07-16  Karl Berry  <karl@gnu.org>
19445
19446         * config/srclist-update: was running fixlicense twice, which caused
19447                 texinfo.tex to be nullified for some reason.  Simplify,
19448                 $gplsrc is no longer needed as far as I can see?
19449
19450 2003-07-16  Jim Meyering  <jim@meyering.net>
19451
19452         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19453
19454 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19455
19456         * config/srclist.txt: Get the following files from gettext-runtime/intl
19457         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19458         ref-del.sin.  From Bruno Haible.
19459         * config/srclist-update (fixfile): Change grep pattern again, since the
19460         previous fix didn't work (there was another trailing $).  Use
19461         '[$]' to escape the $s.
19462
19463 2003-07-15  Karl Berry  <karl@gnu.org>
19464
19465         * lib/vasnprintf.c: update from gettext.
19466
19467 2003-07-15  Karl Berry  <karl@gnu.org>
19468
19469         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19470         gets expanded when surrounded by '$'.
19471
19472 2003-07-15  Jim Meyering  <jim@meyering.net>
19473
19474         * modules/save-cwd: Don't depend on error.  From Derek Price.
19475
19476 2003-07-15  Jim Meyering  <jim@meyering.net>
19477
19478         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19479
19480 2003-07-14  Simon Josefsson  <jas@extundo.com>
19481
19482         * modules/mempcpy: New file.
19483         * MODULES.html.sh (func_all_modules): Add mempcpy.
19484
19485 2003-07-14  Simon Josefsson  <jas@extundo.com>
19486
19487         * m4/mempcpy.m4: New file.
19488
19489 2003-07-14  Simon Josefsson  <jas@extundo.com>
19490
19491         * lib/mempcpy.h: New file.
19492         * lib/mempcpy.c: New file.
19493
19494 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19495
19496         * modules/getdate, modules/posixtm: Depend on mktime.
19497
19498 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19499
19500         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19501         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19502         unicodeio.c, unicodeio.h, unlocked-io.h:
19503         Switch from LGPL to GPL.
19504
19505 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19506
19507         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19508         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19509         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19510         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19511         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19512         updated automatically by ../config/srclist-update.  This changes
19513         their license from LPGL to GPL.
19514
19515 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19516
19517         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19518         assumed to refer to the root of the most recent stable gettext version.
19519         * config/srclistvars.sh: Add defaults for eggert.
19520         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19521         Match "This program" as well as "The program".  This is needed
19522         for gettext.
19523
19524 2003-07-14  Jim Meyering  <jim@meyering.net>
19525
19526         Don't emit diagnostics.  Let callers do that.
19527         * lib/save-cwd.c: Don't include "error.h".
19528         (save_cwd): Don't call error.  Ensure that errno is valid
19529         when returning nonzero.
19530
19531         * lib/save-cwd.h (restore_cwd): Update prototype.
19532         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19533         Simplify.  Don't call error upon failure.  Let callers do that.
19534         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19535         when auditing is enabled.  But don't bother updating the #if.
19536
19537 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19538
19539         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19540         it breaks C++ compilation.
19541         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19542
19543 2003-07-10  Simon Josefsson  <jas@extundo.com>
19544
19545         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19546
19547 2003-07-10  Jim Meyering  <jim@meyering.net>
19548
19549         * m4/clock_time.m4: Remove trailing blank.
19550         * m4/intmax_t.m4: Likewise.
19551
19552 2003-07-10  Jim Meyering  <jim@meyering.net>
19553
19554         * lib/vasnprintf.c: Remove trailing blanks.
19555         Make cpp indentation consistent.
19556
19557 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19558
19559         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19560         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19561         Switch from LGPL to GPL.
19562
19563 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19564
19565         * config/srclist.txt: Sort sublists.  Add
19566         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19567         that differ from gnulib for one reason or another; we'd like this list
19568         to be smaller but for now let's document what we have.
19569
19570 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19571
19572         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19573         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19574         and sweeter "eval x=$x".
19575         * config/srclist.txt: Get lib/argp* from glibc.
19576
19577 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19578
19579         * lib/mktime.c: Fix some boundary cases and remove need for floating
19580         point.
19581
19582         Issue a compile-time diagnostic if time_t is floating point, or if
19583         two's complement arithmetic is not in effect, or if arithmetic
19584         right shift does not propagate the sign.  These assumptions were
19585         all in the original code but they weren't checked.
19586
19587         (TIME_T_MIDPOINT, verify): New macros.
19588         (__isleap): Remove; it has integer overflow problems.
19589         (leapyear): New function, without those problems.
19590         (ydhms_tm_diff): Remove; splitting into two parts.
19591         (ydhms_diff): New function, containing the arithmetic part of
19592         the old ydhms_tm_diff function.  Issue a compile-time
19593         diagnostic if we are not using C99 integer division.
19594         Avoid casts when possible.
19595         (guess_time_tm): New function, containing the checking part of
19596         the old ydhms_tm_diff function.  Return the new value, rather than
19597         the difference between it and the old.  Accept a new argument T
19598         so that *T specifies the old value.  Check for overflow in the result.
19599
19600         (__mktime_internal): Use a time_t offset, not a long int offset.
19601         This undoes the 2003-06-04 change, which is no longer needed now
19602         that we have better overflow checking.
19603         (localtime_offset): Likewise.
19604
19605         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19606         and long are 64-bit but int is only 32-bit.
19607         (ydhms_diff): Use long int to store year1 and yday1.
19608         Issue a compile-time diagnostic if long int is not wide enough.
19609
19610         (__mktime_internal): Use long int to store adjusted year and yday.
19611         Use plain C rather than preprocessor commands, if that doesn't
19612         affect efficiency.
19613         Check for overflow (and try to repair) after each probe
19614         rather than checking only at the very end.  This avoids some bugs
19615         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19616         does not equal GMT offset at maximum time).
19617         Use integer to check for overflow rather than floating point; this
19618         is more portable to non-IEEE hosts, and is a tad faster.
19619         When we detect that we are oscillating between two values,
19620         don't check whether tm_isdst has the requested value, since
19621         we already know the answer.  When tm_isdst has the wrong value,
19622         use a different heuristic to find the right one, based on the
19623         extreme values actually observed in practice in tz2003a,
19624         rather than the (overly optimistic) "previous 3 calendar quarters".
19625
19626         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19627         "T const" to accommodate glibc style.
19628         (check_result): Use less-confusing report format.  "long" -> "long int.
19629         (main): Likewise.
19630         Don't loop if the iteration overflows time_t.
19631         Allow a negative step in the iteration.
19632
19633 2003-07-06  Karl Berry  <karl@gnu.org>
19634
19635         * config/depcomp: update from automake.
19636         * config/config.sub: update from prep.
19637
19638 2003-07-03  Karl Berry  <karl@gnu.org>
19639
19640         * config/config.guess: update from prep.
19641
19642 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19643
19644         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19645         xreadlink.c now includes it unconditionally.
19646
19647 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19648
19649         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19650         having it depend on HAVE_SYS_TYPES_H.
19651
19652 2003-07-01  Bruno Haible  <bruno@clisp.org>
19653
19654         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19655         <sys/types.h> should be sufficient.
19656         Reported by Paul Eggert.
19657
19658 2003-06-26  Karl Berry  <karl@gnu.org>
19659
19660         * config/depcomp: update from automake.
19661
19662 2003-06-26  Bruno Haible  <bruno@clisp.org>
19663
19664         * modules/human: Depend on module stdbool.
19665
19666 2003-06-25  Bruno Haible  <bruno@clisp.org>
19667
19668         * modules/readlink: New file.
19669         * modules/xreadlink: Depend on it.
19670         * MODULES.html.sh (func_all_modules): Add readlink.
19671
19672 2003-06-25  Bruno Haible  <bruno@clisp.org>
19673
19674         * m4/readlink.m4: New file.
19675
19676 2003-06-25  Bruno Haible  <bruno@clisp.org>
19677
19678         * lib/readlink.c: New file.
19679
19680 2003-06-22  Karl Berry  <karl@gnu.org>
19681
19682         * config/srclist.txt: update mkinstalldirs from automake.
19683         * config/mkinstalldirs: update.
19684
19685 2003-06-22  Bruno Haible  <bruno@clisp.org>
19686
19687         Portability to mingw32.
19688         * m4/ssize_t.m4: New file, from GNU gettext.
19689         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19690         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19691
19692 2003-06-22  Bruno Haible  <bruno@clisp.org>
19693
19694         * modules/safe-read: Add m4/ssize_t.m4.
19695         * modules/xreadlink: Add m4/ssize_t.m4.
19696
19697 2003-06-20  Bruno Haible  <bruno@clisp.org>
19698
19699         Assume C89, so PARAMS isn't needed.
19700         * lib/unicodeio.h (PARAMS): Remove.
19701         * lib/unicodeio.c: Don't use PARAMS.
19702
19703 2003-06-18  Karl Berry  <karl@gnu.org>
19704
19705         * config/config.{guess,sub}: update from prep.
19706
19707 2003-06-18  Jim Meyering  <jim@meyering.net>
19708
19709         Merge changes from coreutils.
19710         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19711         Remove explicit declarations of xmalloc and realloc.
19712         Include xalloc.h.
19713         (read_utmp): Remove anachronistic cast of xmalloc.
19714
19715 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19716
19717         Assume C89, so PARAMS isn't needed.
19718         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19719         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19720         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19721         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19722         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19723         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19724         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19725         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19726         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19727         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19728         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19729         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19730         no longer needed. Anyway, config.h should always be included before any
19731         other file.
19732
19733 2003-06-11  Simon Josefsson  <jas@extundo.com>
19734
19735         * modules/sysexits: New file.
19736         * MODULES.html.sh (func_all_modules): Add sysexits.
19737
19738 2003-06-11  Simon Josefsson  <jas@extundo.com>
19739
19740         * lib/sysexit_.h: New file.
19741
19742 2003-06-11  Derek Price  <derek@ximbiot.com>
19743
19744         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19745         necessary.
19746
19747 2003-06-11  Bruno Haible  <bruno@clisp.org>
19748
19749         * m4/sysexits.m4: New file.
19750
19751 2003-06-10  Simon Josefsson  <jas@extundo.com>
19752
19753         * lib/argp.h: New file, from glibc.
19754         * lib/argp-ba.c: New file, from glibc.
19755         * lib/argp-eexst.c: New file, from glibc.
19756         * lib/argp-fmtstream.c: New file, from glibc.
19757         * lib/argp-fmtstream.h: New file, from glibc.
19758         * lib/argp-fs-xinl.c: New file, from glibc.
19759         * lib/argp-help.c: New file, from glibc.
19760         * lib/argp-namefrob.h: New file, from glibc.
19761         * lib/argp-parse.c: New file, from glibc.
19762         * lib/argp-pv.c: New file, from glibc.
19763         * lib/argp-pvh.c: New file, from glibc.
19764         * lib/argp-xinl.c: New file, from glibc.
19765
19766 2003-06-10  Simon Josefsson  <jas@extundo.com>
19767
19768         * modules/strchrnul: New file.
19769
19770 2003-06-10  Simon Josefsson  <jas@extundo.com>
19771
19772         * modules/argp: New file.
19773
19774 2003-06-10  Simon Josefsson  <jas@extundo.com>
19775
19776         * m4/strchrnul.m4: New file.
19777
19778 2003-06-10  Simon Josefsson  <jas@extundo.com>
19779
19780         * lib/strchrnul.h: New file.
19781         * lib/strchrnul.c: New file.
19782
19783 2003-06-10  Bruno Haible  <bruno@clisp.org>
19784
19785         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19786
19787 2003-06-07  Karl Berry  <karl@gnu.org>
19788
19789         * config/config.{guess,sub}: update from prep.
19790
19791 2003-06-07  Jim Meyering  <jim@meyering.net>
19792
19793         * modules/strtod: Use $(...) notation, not @...@ for
19794         AC_REPLACE'd variables.
19795         * modules/localcharset: Likewise.
19796
19797 2003-06-07  Jim Meyering  <jim@meyering.net>
19798
19799         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19800         in place of my name in the copyright comment.
19801         Remove definition and uses of __P.
19802
19803         From coreutils.
19804         * lib/stat.c: Don't declare xmalloc explicitly.
19805         Instead, include "xalloc.h".
19806         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19807         xrealloc, and xcalloc return values.
19808         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19809         Improve comment.
19810         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19811
19812 2003-06-07  Bruno Haible  <bruno@clisp.org>
19813
19814         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19815         avoid AC_CONFIG_LINKS.
19816         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19817         fnmatch.h, to avoid AC_CONFIG_LINKS.
19818         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19819
19820 2003-06-07  Bruno Haible  <bruno@clisp.org>
19821
19822         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19823         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19824         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19825         directory.
19826         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19827         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19828         directory.
19829
19830 2003-06-06  Jim Meyering  <jim@meyering.net>
19831
19832         Merge from coreutils.
19833         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19834         Consolidate declarations and initializations of *_base* locals.
19835
19836         Merge from coreutils.
19837         This avoids a core dump on systems without GNU putenv,
19838         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19839         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19840         (unsetenv): New static function, from GNU libc.
19841         (rpl_putenv): Use it.
19842
19843         * lib/modechange.c: Remove trailing blanks.
19844
19845         Merge from coreutils.
19846         * lib/fsusage.c: Remove declaration of statfs.
19847         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19848
19849         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19850
19851 2003-06-06  Jim Meyering  <jim@meyering.net>
19852
19853         * lib/stdbool_.h: Renamed from stdbool.h.in.
19854
19855 2003-06-06  Jim Meyering  <jim@meyering.net>
19856             Bruno Haible  <bruno@clisp.org>
19857
19858         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19859         Adjust Makefile.am snippet not to redirect directly to target.
19860         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19861
19862 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19863
19864         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19865         mismatch, look in future quarters as well as past.  This fixes a
19866         bug when processing fall-backwards gaps immediately after a long
19867         period of daylight-saving time.
19868
19869         * lib/mktime.c: Assume freestanding C89 or better.
19870         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19871         (__P): Remove; not used.
19872         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19873         (mktime, not_equal_tm, print_tm, check_result,
19874         main): Use prototypes.  Use const * where appropriate.
19875         (main): Fix typo in testing code that uncovered by above changes.
19876         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19877
19878 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19879
19880         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19881         locale.h, localeconv.  This merges changes from coreutils.
19882
19883         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19884         It can be removed after the next Autoconf is released.
19885         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19886         needed.
19887
19888 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19889
19890         * lib/mktime.c: Fix Debian bug 177940
19891         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19892         (localtime_offset): Now long int, not time_t, because we want it
19893         to be guaranteed to be signed.  All uses changed.
19894         (__mktime_internal): If overflow would occur when adding offset,
19895         don't add it.
19896
19897         Merge 'human' changes from coreutils.  Rewrite to support
19898         locale-specific notations like thousands separators.
19899         * lib/human.c: Simplify authorship notice.
19900         Include human.h immediately after config.h.
19901         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19902         <limits.h>: Do not include, since human.h does.
19903         (SIZE_MAX, UINTMAX_MAX): New macros.
19904         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19905         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19906         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19907         (power_letter): Renamed from suffixes.
19908         (generate_suffix_backwards): Remove.
19909         (adjust_value): Now takes int style (because of human.h changes)
19910         and long double value (for greater precision on some platforms).
19911         (group_number): New function.
19912         (human_readable): Use it.  Use integer options, not enum.
19913         Put the options before the sizes in the arg list.
19914         Support all the new options.
19915         The old human_readable function has been removed;
19916         use inttostr.h instead.
19917         (human_readable, default_block_size, humblock):
19918         Use uintmax_t, not int, for block sizes.
19919         (human_readable_inexact, block_size_types): Remove.
19920         (block_size_opts): New constant.
19921         (human_options): Renamed from human_block_size, with new signature
19922         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19923         * lib/human.h: Add copyright and authorship notice.
19924         Include <limits.h> and <stdbool.h> unconditionally.
19925         (PARAMS): Remove.  All uses removed.
19926         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19927         (enum human_inexact_style): Remove tag; now a nameless enum.
19928         (human_floor, human_ceiling, human_round_to_even): Now have
19929         values 2, 0, 1 rather than -1, 1, 0.
19930         (human_group_digits, human_suppress_point_zero, human_autoscale,
19931         human_base_1024, human_SI, human_B): New constants.
19932         (human_readable_inexact, human_block_size): Remove.
19933         (human_readable): Size args are now uintmax_t, not int.
19934         (human_options): New decl.
19935
19936         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19937         unnecessary now that we assume C89 or better.  This change
19938         imported from coreutils.
19939
19940         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19941         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19942         in the 2003-05-30 sync from glibc.
19943
19944         .h files should stand alone, but we shouldn't include <sys/types.h>
19945         if we can get away with just <stddef.h>.
19946
19947         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19948         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19949         rather than <sys/types.h>, as we merely need size_t.
19950         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19951         to get size_t.
19952         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19953         Include <stdio.h>, to get FILE.
19954         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19955         memcasecmp.h has included <stddef.h> and all we need is size_t.
19956         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19957         our interface, instead of including <sys/types.h>
19958
19959 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19960
19961         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19962         now, as glibc mktime is buggy on non-glibc systems.
19963
19964 2003-06-03  Karl Berry  <karl@gnu.org>
19965
19966         * config/config.sub: update from prep.
19967
19968 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19969
19970         [from coreutils]
19971         Fix some minor time-related bugs with POSIX time arguments.
19972         Some valid time stamps were being rejected (notably -1, and
19973         time stamps before 1900 on 64-bit hosts).  And some invalid
19974         time stamps were being accepted, e.g. September 31.
19975
19976         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
19977         that we can return (time_t) -1 successfully.
19978         * lib/posixtm.c: Likewise.
19979         [HAVE_STDBOOL_H]: Include <stdbool.h>.
19980         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
19981         (t): Remove static var.
19982         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
19983         of static var.  All uses changed.
19984         (year): Do not reject years before 1900; they can occur with
19985         64-bit time_t.
19986         (posix_time_parse): Do not check for out-of-range components;
19987         that is now the caller's responsibility, since our checks were
19988         only approximations.
19989         (posixtime): Use mktime to check for out-of-range components,
19990         since it knows them exactly.
19991         If mktime returns (time_t) -1, check whether an error actually occurred
19992         by invoking localtime on -1.
19993         (main) [TEST_POSIXTIME]: Check for input data errors, and report
19994         posixtime failures better.
19995         Improve the test data (in comments only).
19996
19997 2003-06-02  Karl Berry  <karl@gnu.org>
19998
19999         * config/mkinstalldirs (version): new variable.
20000         (--version): new option.
20001         (usage): improve message.
20002
20003 2003-05-30  Karl Berry  <karl@gnu.org>
20004
20005         * lib/mktime.c: update from libc.
20006
20007 2003-05-30  Bruno Haible  <bruno@clisp.org>
20008
20009         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20010         * config/config.rpath: Upgrade to gettext-0.12.1.
20011
20012 2003-05-30  Bruno Haible  <bruno@clisp.org>
20013
20014         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20015         * m4/nls.m4: New file, from gettext-0.12.1.
20016         * m4/po.m4: New file, from gettext-0.12.1.
20017         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20018
20019 2003-05-30  Bruno Haible  <bruno@clisp.org>
20020
20021         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20022         * lib/localcharset.h: Likewise.
20023         * lib/localcharset.c: Likewise.
20024
20025 2003-05-29  Karl Berry  <karl@gnu.org>
20026
20027         * config/config.rpath: update from gettext.
20028
20029 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20030
20031         Assume the headers required for C89 freestanding compilers.
20032         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20033         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20034         * m4/human.m4 (gl_HUMAN): Likewise.
20035         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20036         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20037         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20038         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20039         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20040         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20041
20042 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20043
20044         Assume the headers required for C89 freestanding compilers.
20045         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20046         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20047         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20048         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20049         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20050         define, since <limits.h> is guaranteed to do that.
20051         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20052         * lib/exclude.c: Include <stdbool.h> unconditionally.
20053         * lib/tempname.c: Include <stddef.h> unconditionally.
20054         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20055         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20056         <stddef.h> does that.
20057         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20058         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20059         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20060         needed.
20061         * lib/xstrtol.c: Likewise.
20062         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20063         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20064
20065         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20066         warnings on some platforms.
20067
20068         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20069         arbitrarily.
20070
20071 2003-05-26  Jim Meyering  <jim@meyering.net>
20072
20073         Merge in a change from coreutils:
20074         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20075         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20076         that condition, rather than `-1' which is slightly misleading.
20077         Change the name of the cache variable to have the gl_ prefix.
20078         Prompted by a patch from Richard Dawe for DJGPP.
20079
20080 2003-05-24  Karl Berry  <karl@gnu.org>
20081
20082         * config/config.guess: update from prep.
20083
20084 2003-05-22  Karl Berry  <karl@gnu.org>
20085
20086         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20087
20088 2003-05-20  Karl Berry  <karl@gnu.org>
20089
20090         * config/config.guess: update from prep.
20091
20092 2003-05-18  Karl Berry  <karl@gnu.org>
20093
20094         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20095         might actually be set by the user.
20096
20097         * config/depcomp, install-sh, mdate-sh: update from automake.
20098
20099 2003-05-17  Bruno Haible  <bruno@clisp.org>
20100
20101         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20102         invalid expansion for AC_EGREP_CPP.
20103         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20104         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20105         Suggested by Akim Demaille <akim@epita.fr> in
20106         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20107
20108 2003-05-12  Jim Meyering  <jim@meyering.net>
20109
20110         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20111         the space-padded-by-default conversion specifiers, %e, %k, %l.
20112
20113 2003-05-12  Bruno Haible  <bruno@clisp.org>
20114
20115         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20116         the string is longer than 4 KB.
20117
20118 2003-05-11  Karl Berry  <karl@gnu.org>
20119
20120         * config/config.{guess,sub}: update from prep.
20121
20122 2003-05-09  Bruno Haible  <bruno@clisp.org>
20123
20124         * modules/error: Add m4/strerror_r.m4 to file list.
20125
20126 2003-05-03  Bruno Haible  <bruno@clisp.org>
20127
20128         Upgrade to Unicode-4.0.
20129         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20130         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20131         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20132         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20133         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20134         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20135         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20136         Change width of U+E0100..U+E01EF from 1 to 0.
20137
20138 2003-04-25  Jim Meyering  <jim@meyering.net>
20139
20140         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20141         of type size_t, not int.
20142
20143 2003-04-25  Bruno Haible  <bruno@clisp.org>
20144
20145         * lib/copy-file.c: Include <stddef.h>, for size_t.
20146
20147 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20148
20149         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20150         code which expansion is under static control.  Patch imported from
20151         Akim Demaille's patch to Bison; see
20152         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20153
20154 2003-04-14  Bruno Haible  <bruno@clisp.org>
20155
20156         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20157
20158 2003-04-11  Jim Meyering  <jim@meyering.net>
20159
20160         Merge changes from Coreutils.
20161
20162         2003-03-22  Jim Meyering  <jim@meyering.net>
20163
20164         * lib/strftime.c (widen): Cast alloca return value to proper type.
20165
20166         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20167
20168         From GNU libc.
20169         * lib/strftime.c (my_strftime): Handle very large width
20170         specifications for numeric values correctly.  Improve checks for
20171         overflow.
20172
20173         2003-01-19  Jim Meyering  <jim@meyering.net>
20174
20175         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20176         definitions.
20177         (nl_get_alt_digit) [! defined my_strftime]: Define.
20178         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20179         _nl_get_alt_digit and _nl_get_walt_digit.
20180
20181         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20182         libc. These changes have no effect outside of _LIBC.
20183
20184 2003-04-10  Bruno Haible  <bruno@clisp.org>
20185
20186         * modules/findprog: New file.
20187         * MODULES.html.sh (func_all_modules): Add it.
20188
20189 2003-04-10  Bruno Haible  <bruno@clisp.org>
20190
20191         * m4/findprog.m4: New file.
20192         * m4/eaccess.m4: New file.
20193
20194 2003-04-10  Bruno Haible  <bruno@clisp.org>
20195
20196         * lib/findprog.h: New file, from GNU gettext.
20197         * lib/findprog.c: New file, from GNU gettext.
20198
20199 2003-04-05  Jim Meyering  <jim@meyering.net>
20200
20201         Merge changes from Coreutils.
20202
20203         * lib/exclude.h (PARAMS): Remove definition and uses.
20204         * lib/exclude.c: Remove uses of `PARAMS'.
20205
20206         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20207         Add test-cases for DOS filenames. Declare program_name.
20208         (main): Set up program_name.  Patch by Rich Dawe.
20209
20210         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20211         error from mntctl.
20212         Use mntctl's return value to drive the entry-processing loop, since
20213         we can't rely on the value of the vmt_length member in the last
20214         entry.  On some systems doing so could result in exhausting
20215         virtual memory.  Based in part on a patch from Mike Jetzer.
20216
20217 2003-04-04  Bruno Haible  <bruno@clisp.org>
20218
20219         * modules/linebreak: New file.
20220         * MODULES.html.sh (func_all_modules): Add it.
20221
20222 2003-04-04  Bruno Haible  <bruno@clisp.org>
20223
20224         * m4/linebreak.m4: New file.
20225
20226 2003-04-04  Bruno Haible  <bruno@clisp.org>
20227
20228         * lib/linebreak.h: New file, from GNU gettext.
20229         * lib/linebreak.c: New file, from GNU gettext with slight
20230         modifications.
20231         * lib/lbrkprop.h: New file, from GNU gettext.
20232
20233 2003-04-03  Bruno Haible  <bruno@clisp.org>
20234
20235         * modules/utf8-ucs4: New file.
20236         * modules/utf16-ucs4: New file.
20237         * modules/ucs4-utf8: New file.
20238         * modules/ucs4-utf16: New file.
20239         * MODULES.html.sh (func_all_modules): Add them.
20240
20241 2003-04-03  Bruno Haible  <bruno@clisp.org>
20242
20243         * m4/utf-ucs4.m4: New file.
20244         * m4/ucs4-utf.m4: New file.
20245
20246 2003-04-03  Bruno Haible  <bruno@clisp.org>
20247
20248         * lib/utf8-ucs4.h: New file, from GNU gettext.
20249         * lib/utf16-ucs4.h: New file, from GNU gettext.
20250         * lib/ucs4-utf8.h: New file, from GNU gettext.
20251         * lib/ucs4-utf16.h: New file, from GNU gettext.
20252
20253 2003-04-02  Bruno Haible  <bruno@clisp.org>
20254
20255         * modules/binary-io: New file.
20256         * MODULES.html.sh (func_all_modules): Add it.
20257
20258 2003-04-02  Bruno Haible  <bruno@clisp.org>
20259
20260         * lib/binary-io.h: New file, from GNU gettext.
20261
20262 2003-04-01  Bruno Haible  <bruno@clisp.org>
20263
20264         * modules/pathname: New file.
20265         * MODULES.html.sh (func_all_modules): Add it.
20266
20267 2003-04-01  Bruno Haible  <bruno@clisp.org>
20268
20269         * lib/pathname.h: New file, from GNU gettext.
20270         * lib/concatpath.c: New file, from GNU gettext.
20271
20272 2003-03-30  Bruno Haible  <bruno@clisp.org>
20273
20274         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20275
20276 2003-03-30  Bruno Haible  <bruno@clisp.org>
20277
20278         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20279         function chown() doesn't exist.
20280
20281 2003-03-28  Bruno Haible  <bruno@clisp.org>
20282
20283         * modules/copy-file: New file.
20284         * MODULES.html.sh (func_all_modules): Add it.
20285
20286 2003-03-28  Bruno Haible  <bruno@clisp.org>
20287
20288         * m4/copy-file.m4: New file.
20289
20290 2003-03-28  Bruno Haible  <bruno@clisp.org>
20291
20292         * lib/copy-file.h: New file, from GNU gettext.
20293         * lib/copy-file.c: New file, from GNU gettext.
20294
20295 2003-03-18  Jim Meyering  <jim@meyering.net>
20296
20297         * lib/quote.c (quote_n): Fix typo in comment.
20298
20299 2003-03-18  Bruno Haible  <bruno@clisp.org>
20300
20301         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20302         checking.
20303         * m4/onceonly_2_57.m4: Likewise.
20304
20305 2003-03-17  Bruno Haible  <bruno@clisp.org>
20306
20307         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20308         (m4_quote): Remove macro.
20309         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20310
20311 2003-03-14  Jim Meyering  <jim@meyering.net>
20312
20313         Merge changes from Coreutils.
20314         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20315         to be const, in order to avoid warnings.
20316         (obstack_room): Likewise.
20317         (obstack_empty_p): Likewise.
20318
20319 2003-03-14  Bruno Haible  <bruno@clisp.org>
20320
20321         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20322         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20323
20324 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20325
20326         Merge changes from Bison.
20327         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20328         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20329         when compiling Bison 1.875's `bitset bset = obstack_alloc
20330         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20331         * lib/hash.c: Include <stdbool.h> unconditionally.
20332
20333 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20334
20335         * m4/onceonly.m4 (m4_quote): New macro.
20336         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20337         Quote AC_FOREACH variable-expansions properly.
20338
20339 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20340
20341         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20342
20343 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20344
20345         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20346         Reported by Bruce Becker; see:
20347         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20348
20349 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20350             Bruno Haible  <bruno@clisp.org>
20351
20352         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20353         Reported by John Hughes, see
20354         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20355
20356 2003-02-20  Bruno Haible  <bruno@clisp.org>
20357
20358         * MODULES.html.sh (func_all_modules): Add poll.
20359
20360 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20361
20362         * modules/poll: New file.
20363
20364 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20365
20366         * lib/poll_.h: New file.
20367         * lib/poll.c: New file.
20368
20369 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20370
20371         * m4/poll.m4: New file.
20372
20373 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20374
20375         * modules/mathl: New file.
20376
20377 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20378
20379         * lib/mathl.h: New file.
20380         * lib/acosl.c: New file.
20381         * lib/asinl.c: New file.
20382         * lib/atanl.c: New file.
20383         * lib/ceill.c: New file.
20384         * lib/cosl.c: New file.
20385         * lib/expl.c: New file.
20386         * lib/floorl.c: New file.
20387         * lib/frexpl.c: New file.
20388         * lib/ldexpl.c: New file.
20389         * lib/logl.c: New file.
20390         * lib/sincosl.c: New file.
20391         * lib/sinl.c: New file.
20392         * lib/sqrtl.c: New file.
20393         * lib/tanl.c: New file.
20394         * lib/trigl.c: New file.
20395         * lib/trigl.h: New file.
20396
20397 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20398
20399         * m4/mathl.m4: New file.
20400
20401 2003-02-18  Bruno Haible  <bruno@clisp.org>
20402
20403         * MODULES.html.sh (func_all_modules): Add mathl.
20404
20405 2003-02-17  Bruno Haible  <bruno@clisp.org>
20406
20407         * modules/mkdtemp: New module.
20408         * MODULES.html.sh (func_all_modules): Add it.
20409
20410 2003-02-17  Bruno Haible  <bruno@clisp.org>
20411
20412         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20413
20414 2003-02-17  Bruno Haible  <bruno@clisp.org>
20415
20416         * lib/mkdtemp.h: New file, from GNU gettext.
20417         * lib/mkdtemp.c: New file, from GNU gettext.
20418
20419 2003-02-02  Jim Meyering  <jim@meyering.net>
20420
20421         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20422         e.g. glibc-2.2.93.
20423
20424 2003-01-31  Bruno Haible  <bruno@clisp.org>
20425
20426         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20427         'rpl_rename'.
20428         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20429         'rpl_strnlen'.
20430         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20431         'rpl_strtod'.
20432         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20433         'rpl_utime'.
20434
20435 2003-01-31  Bruno Haible  <bruno@clisp.org>
20436
20437         * lib/rename.c: #undef rename before defining rpl_rename.
20438         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20439
20440 2003-01-30  Bruno Haible  <bruno@clisp.org>
20441
20442         * modules/vasnprintf, modules/vasprintf: New modules.
20443         * MODULES.html.sh (func_all_modules): Add them.
20444
20445 2003-01-30  Bruno Haible  <bruno@clisp.org>
20446
20447         * m4/signed.m4: New file, from GNU gettext.
20448         * m4/longdouble.m4: New file, from GNU gettext.
20449         * m4/wchar_t.m4: New file, from GNU gettext.
20450         * m4/wint_t.m4: New file, from GNU gettext.
20451         * m4/vasnprintf.m4: New file.
20452         * m4/vasprintf.m4: New file.
20453
20454 2003-01-30  Bruno Haible  <bruno@clisp.org>
20455
20456         * lib/printf-args.h: New file, from GNU gettext.
20457         * lib/printf-args.c: New file, from GNU gettext.
20458         * lib/printf-parse.h: New file, from GNU gettext.
20459         * lib/printf-parse.c: New file, from GNU gettext.
20460         * lib/vasnprintf.h: New file, from GNU gettext.
20461         * lib/vasnprintf.c: New file, from GNU gettext.
20462         * lib/asnprintf.c: New file, from GNU gettext.
20463         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20464         * lib/vasprintf.c: New file, from GNU gettext.
20465         * lib/asprintf.c: New file, from GNU gettext.
20466
20467 2003-01-29  Bruno Haible  <bruno@clisp.org>
20468
20469         * modules/stpncpy: New module.
20470         * MODULES.html.sh (func_all_modules): Add it.
20471
20472 2003-01-29  Bruno Haible  <bruno@clisp.org>
20473
20474         * m4/stpncpy.m4: New file.
20475
20476 2003-01-29  Bruno Haible  <bruno@clisp.org>
20477
20478         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20479         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20480
20481 2003-01-28  Bruno Haible  <bruno@clisp.org>
20482
20483         * modules/c-ctype: New module.
20484         * MODULES.html.sh (func_all_modules): Add it.
20485
20486 2003-01-28  Bruno Haible  <bruno@clisp.org>
20487
20488         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20489         Paul Eggert.
20490         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20491         Paul Eggert.
20492
20493 2003-01-27  Bruno Haible  <bruno@clisp.org>
20494
20495         * modules/xsetenv: New module.
20496         * MODULES.html.sh (func_all_modules): Add it.
20497
20498 2003-01-27  Bruno Haible  <bruno@clisp.org>
20499
20500         * lib/xsetenv.h: New file, from GNU gettext.
20501         * lib/xsetenv.c: New file, from GNU gettext.
20502
20503 2003-01-23  Jim Meyering  <jim@meyering.net>
20504
20505         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20506         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20507
20508 2003-01-23  Bruno Haible  <bruno@clisp.org>
20509
20510         * modules/minmax: New module.
20511         * MODULES.html.sh (func_all_modules): Add it.
20512
20513 2003-01-23  Bruno Haible  <bruno@clisp.org>
20514
20515         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20516         Eggert.
20517
20518 2003-01-22  Bruno Haible  <bruno@clisp.org>
20519
20520         * modules/exit: New module.
20521         * MODULES.html.sh (func_all_modules): Add it.
20522
20523 2003-01-22  Bruno Haible  <bruno@clisp.org>
20524
20525         * lib/exit.h: New file, from GNU gettext.
20526
20527 2003-01-19  Bruno Haible  <bruno@clisp.org>
20528
20529         * gnulib-tool: Recognize option --extract-maintainer.
20530         (func_get_maintainer): New function.
20531         * modules/*: Add Maintainer entry.
20532
20533 2003-01-16  Jim Meyering  <jim@meyering.net>
20534
20535         * m4/regex.m4: The `regex' struct is both input and output.
20536         Initialize it before each use.  Patch by Tim Waugh.
20537
20538 2003-01-16  Bruno Haible  <bruno@clisp.org>
20539
20540         * MODULES.html.sh: Add a table of contents. Add the module name as
20541         leftmost column. Add hyperlinks.
20542
20543 2003-01-15  Bruno Haible  <bruno@clisp.org>
20544
20545         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20546
20547 2003-01-15  Bruno Haible  <bruno@clisp.org>
20548
20549         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20550         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20551         suffix.
20552
20553 2003-01-15  Bruno Haible  <bruno@clisp.org>
20554
20555         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20556
20557 2003-01-15  Bruno Haible  <bruno@clisp.org>
20558
20559         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20560         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20561
20562 2003-01-14  Jim Meyering  <jim@meyering.net>
20563
20564         * lib/same.c (same_name): Tweak a comment.
20565
20566 2003-01-14  Bruno Haible  <bruno@clisp.org>
20567
20568         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20569         when a string comparison is sufficient.
20570
20571 2003-01-14  Bruno Haible  <bruno@clisp.org>
20572
20573         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20574         'unsigned int'.
20575
20576 2003-01-14  Bruno Haible  <bruno@clisp.org>
20577
20578         * lib/hash-pjw.c: Add comment about low quality of this function.
20579
20580 2003-01-13  Bruno Haible  <bruno@clisp.org>
20581
20582         * modules/stpcpy: Distribute lib/stpcpy.h.
20583         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20584
20585 2003-01-13  Bruno Haible  <bruno@clisp.org>
20586
20587         * modules/*: Add a description.
20588         * modules/strpbrk: Fix Makefile.am snippet.
20589         * modules/strtoimax: Fix dependencies.
20590         * modules/strtoumax: Likewise.
20591
20592 2003-01-13  Bruno Haible  <bruno@clisp.org>
20593
20594         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20595         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20596         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20597
20598 2003-01-13  Bruno Haible  <bruno@clisp.org>
20599
20600         * gnulib-tool (func_create_testdir): Store config/* files in the main
20601         directory.
20602         * config.rpath: Move to ...
20603         * config/config.rpath: ... here.
20604         * modules/gettext: Contains config/config.rpath, not config.rpath.
20605         * modules/iconv: Likewise.
20606
20607 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20608
20609         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20610         to avoid collisions with libcurses and libreadline.
20611
20612         * m4/getstr.m4: Remove.
20613         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20614
20615 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20616
20617         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20618         to avoid collisions with libcurses and libreadline.
20619
20620         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20621         * lib/getstr.h, getstr.c: Remove.
20622         * lib/getline.c: Include "getline.h", to check interface.
20623         Move body of old getstr.c here: this defines MIN_CHUNK and
20624         declares getdelim2, which is renamed from getstr.
20625         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20626
20627         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20628         All uses changed.
20629         * lib/linebuffer.h: Likewise.
20630         (readline): Remove backward-compatibility macro.
20631
20632 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20633
20634         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20635         to avoid collisions with libcurses and libreadline.
20636         * getstr: Remove.
20637         * MODULES.html.sh: Remove getstr.
20638         * modules/getline: Depend on unlocked-io, not getstr.
20639
20640 2003-01-12  Jim Meyering  <jim@meyering.net>
20641
20642         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20643
20644 2003-01-10  Bruno Haible  <bruno@clisp.org>
20645
20646         * modules/alloca: Change Makefile.am requirements. Simplify Include
20647         requirements. Add lib/alloca_.h to file list.
20648
20649 2003-01-10  Bruno Haible  <bruno@clisp.org>
20650
20651         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20652
20653 2003-01-10  Bruno Haible  <bruno@clisp.org>
20654
20655         * lib/alloca_.h: New file.
20656         * lib/getdate.y: Unconditionally include alloca.h.
20657         * lib/makepath.c: Likewise.
20658         * lib/setenv.c: Likewise.
20659         * lib/userspec.c: Likewise.
20660
20661 2003-01-09  Karl Berry  <karl@gnu.org>
20662
20663         * MODULES.html.sh: include `dirname $0` in PATH, to find
20664         gnulib-tool.
20665
20666 2003-01-09  Bruno Haible  <bruno@clisp.org>
20667
20668         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20669         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20670
20671 2003-01-09  Bruno Haible  <bruno@clisp.org>
20672
20673         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20674
20675 2003-01-09  Bruno Haible  <bruno@clisp.org>
20676
20677         * lib/stdbool.h.in: New file.
20678
20679 2003-01-09  Bruno Haible  <bruno@clisp.org>
20680
20681         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20682         * MODULES.html.sh: Likewise.
20683
20684 2003-01-08  Jim Meyering  <jim@meyering.net>
20685
20686         * lib/full-write.c: Undefine and define-away `const' after inclusion
20687         of errno.h, not before.  Suggestion from Bruno Haible.
20688
20689 2003-01-08  Bruno Haible  <bruno@clisp.org>
20690
20691         * modules/full-read: Depend on full-write.
20692
20693 2003-01-08  Bruno Haible  <bruno@clisp.org>
20694
20695         * lib/safe-read.c: Include specification header first, to ensure its
20696         selfcontainedness.
20697         * lib/full-write.c: Likewise.
20698
20699 2003-01-07  Jim Meyering  <jim@meyering.net>
20700
20701         * lib/full-write.c: Rework so that it may serve to define full_read,
20702         too.
20703         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20704
20705 2003-01-07  Bruno Haible  <bruno@clisp.org>
20706
20707         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20708         <inttypes.h>.
20709         * lib/xstrtol.h: Likewise.
20710         * lib/xstrtoimax.c: Likewise.
20711         * lib/xstrtoumax.c: Likewise.
20712         * lib/human.h: Likewise.
20713
20714         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20715         on systems that have <inttypes.h> but not <stdint.h>.
20716
20717 2003-01-07  Bruno Haible  <bruno@clisp.org>
20718
20719         * MODULES.html.sh: Add copyright notice.
20720         (missed_files): Omit CVS directory entries.
20721         (func_module): Make it work with sed-3.02.
20722         * MODULES.txt: Remove file.
20723
20724 2003-01-06  Jim Meyering  <jim@meyering.net>
20725
20726         * lib/version-etc.c: Update year in translatable copyright string.
20727
20728 2003-01-03  Karl Berry  <karl@gnu.org>
20729
20730         * config/config.{guess,sub}: update from prep.
20731
20732 2003-01-02  Karl Berry  <karl@gnu.org>
20733
20734         * doc/COPYING.DOC: belatedly updated to 1.2.
20735
20736 2003-01-01  Karl Berry  <karl@gnu.org>
20737
20738         * gnulib-tool (func_verify_module): report module name $module in
20739         error message, not $1.
20740         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20741         be created, only if it doesn't exist.
20742         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20743
20744 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20745
20746         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20747
20748 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20749
20750         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20751         memcmp if strcoll doesn't work.
20752
20753 2002-12-31  Bruno Haible  <bruno@clisp.org>
20754
20755         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20756         nonempty.
20757
20758 2002-12-31  Bruno Haible  <bruno@clisp.org>
20759
20760         * lib/memcoll.c (STRCOLL): New macro.
20761         (memcoll): Use it.
20762
20763 2002-12-31  Bruno Haible  <bruno@clisp.org>
20764
20765         * lib/localcharset.h: New file.
20766         * lib/localcharset.c: Include it.
20767         * lib/unicodeio.c: Likewise.
20768
20769 2002-12-31  Bruno Haible  <bruno@clisp.org>
20770
20771         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20772         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20773
20774 2002-12-31  Bruno Haible  <bruno@clisp.org>
20775
20776         * lib/getline.h: Include <stddef.h>, for size_t.
20777
20778         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20779         * lib/unicodeio.c: Don't include <stddef.h>.
20780
20781 2002-12-31  Bruno Haible  <bruno@clisp.org>
20782
20783         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20784         HAVE_TM_ZONE.
20785
20786 2002-12-24  Karl Berry  <karl@gnu.org>
20787
20788         * config/config.guess: update from prep.
20789
20790 2002-12-24  Bruno Haible  <bruno@clisp.org>
20791
20792         General infrasructure.
20793         * m4/README: Rewritten.
20794         * m4/onceonly.m4: New file.
20795         * m4/onceonly_2_57.m4: New file.
20796
20797         Module atexit.
20798         * m4/atexit.m4: New file.
20799
20800         Module strtod.
20801         * m4/strtod.m4: New file.
20802
20803         Module strtol.
20804         * m4/strtol.m4: New file.
20805
20806         Module strtoul.
20807         * m4/strtoul.m4: New file.
20808
20809         Module memchr.
20810         * m4/memchr.m4: New file.
20811
20812         Module memcmp.
20813         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20814         (jm_FUNC_MEMCMP): Invoke it.
20815
20816         Module memcpy.
20817         * m4/memcpy.m4: New file.
20818
20819         Module memmove.
20820         * m4/memmove.m4: New file.
20821
20822         Module memset.
20823         * m4/memset.m4: New file.
20824
20825         Module strcspn.
20826         * m4/strcspn.m4: New file.
20827
20828         Module strpbrk.
20829         * m4/strpbrk.m4: New file.
20830
20831         Module strstr.
20832         * m4/strstr.m4: New file.
20833
20834         Module strerror.
20835         * m4/strerror.m4: New file.
20836
20837         Module mktime.
20838         * m4/mktime.m4: Renamed from jm-mktime.m4.
20839         (gl_PREREQ_MKTIME): New macro.
20840         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20841
20842         Module malloc.
20843         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20844         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20845         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20846
20847         Module realloc.
20848         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20849         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20850         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20851
20852         Module strftime.
20853         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20854         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20855         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20856         gl_TM_GMTOFF.
20857         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20858
20859         Module xalloc.
20860         * m4/xalloc.m4: New file.
20861
20862         Module alloca.
20863         * m4/alloca.m4: New file.
20864
20865         Module putenv.
20866         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20867         (jm_FUNC_PUTENV): Invoke it.
20868
20869         Module setenv.
20870         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20871         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20872         when invoked twice.
20873         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20874         gt_FUNC_SETENV.
20875
20876         Module memrchr.
20877         * m4/memrchr.m4: New file.
20878
20879         Module stpcpy.
20880         * m4/stpcpy.m4: New file.
20881
20882         Module strcase.
20883         * m4/strcase.m4: New file.
20884
20885         Module strdup.
20886         * m4/strdup.m4: New file.
20887
20888         Module strnlen.
20889         * m4/strnlen.m4: New file.
20890
20891         Module strndup.
20892         * m4/strndup.m4: New file.
20893
20894         Module xstrtod.
20895         * m4/xstrtod.m4: New file.
20896
20897         Module xstrtol.
20898         * m4/xstrtol.m4: New file.
20899
20900         Module getdate.
20901         * m4/getdate.m4: New file.
20902
20903         Module unlocked-io.
20904         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20905         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20906         * m4/jm-glibc-io.m4n: Remove file.
20907
20908         Module long-options.
20909         * m4/long-options.m4: New file.
20910
20911         Module md5.
20912         * m4/md5.m4: New file.
20913
20914         Module sha.
20915         * m4/sha.m4: New file.
20916
20917         Module getstr.
20918         * m4/getstr.m4: New file.
20919
20920         Module getline.
20921         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20922         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20923         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20924         simply getline. Infoke gl_PREREQ_GETLINE.
20925
20926         Module obstack.
20927         * m4/obstack.m4: New file.
20928
20929         Module hash.
20930         * m4/hash.m4: New file.
20931
20932         Module readtokens.
20933         * m4/readtokens.m4: New file.
20934
20935         Module strverscmp.
20936         * m4/strverscmp.m4: New file.
20937
20938         Module stdbool.
20939         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20940         OSF/1.
20941
20942         Module strtoll.
20943         * m4/strtoll.m4: New file.
20944
20945         Module strtoull.
20946         * m4/strtoull.m4: New file.
20947
20948         Module strtoimax.
20949         * m4/strtoimax.m4: New file.
20950
20951         Module strtoumax.
20952         * m4/strtoumax.m4: New file.
20953
20954         Module xstrtoimax.
20955         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20956         jm_AC_PREREQ_XSTRTOIMAX.
20957         Moved the strtol prerequisites to strtol.m4.
20958         Moved the strtoll prerequisites to strtoll.m4.
20959         Moved the strtoimax prerequisites to strtoimax.m4.
20960
20961         Module xstrtoumax.
20962         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20963         jm_AC_PREREQ_XSTRTOUMAX.
20964         Moved the strtoul prerequisites to strtoul.m4.
20965         Moved the strtoull prerequisites to strtoull.m4.
20966         Moved the strtoumax prerequisites to strtoumax.m4.
20967
20968         Module chown.
20969         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20970         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20971
20972         Module dup2.
20973         * m4/dup2.m4: New file.
20974
20975         Module ftruncate.
20976         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
20977         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
20978
20979         Module getgroups.
20980         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
20981         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
20982
20983         Module gettimeofday.
20984         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
20985         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
20986         gl_PREREQ_GETTIMEOFDAY.
20987
20988         Module mkdir.
20989         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
20990         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
20991
20992         Module mkstemp.
20993         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
20994         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
20995         jm_AC_TYPE_UINTMAX_T.
20996         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
20997
20998         Module stat.
20999         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21000         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21001
21002         Module lstat.
21003         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21004         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21005
21006         Module timespec.
21007         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21008         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21009         * m4/st_mtim.m4: Indentation.
21010
21011         Module nanosleep.
21012         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21013         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21014         gl_PREREQ_NANOSLEEP.
21015
21016         Module regex.
21017         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21018         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21019         (gl_REGEX): New macro.
21020
21021         Module rename.
21022         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21023         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21024
21025         Module rmdir.
21026         * m4/rmdir.m4: New file.
21027
21028         Module utime.
21029         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21030         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21031         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21032
21033         Module dirname.
21034         * m4/dirname.m4: New file.
21035
21036         Module getopt.
21037         * m4/getopt.m4: New file.
21038
21039         Module unistd-safer.
21040         * m4/unistd-safer.m4: New file.
21041
21042         Module fnmatch.
21043         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21044         declaration.
21045         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21046         (gl_FUNC_FNMATCH_POSIX): New macro.
21047         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21048         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21049         simply fnmatch.
21050
21051         Module exclude.
21052         * m4/exclude.m4: New file.
21053
21054         Module human.
21055         * m4/human.m4: New file.
21056
21057         Module acl.
21058         * m4/acl.m4: Nop.
21059
21060         Module backupfile.
21061         * m4/backupfile.m4: New file.
21062         * m4/d-ino.m4: Indentation.
21063
21064         Module fsusage.
21065         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21066         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21067         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21068
21069         Module dirfd.
21070         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21071         requirements.
21072
21073         Module euidaccess.
21074         * m4/euidaccess.m4: New file.
21075
21076         Module file-type.
21077         * m4/file-type.m4: New file.
21078
21079         Module fileblocks.
21080         * m4/fileblocks.m4: New file.
21081
21082         Module filemode.
21083         * m4/filemode.m4: New file.
21084
21085         Module isdir.
21086         * m4/isdir.m4: New file.
21087
21088         Module lchown.
21089         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21090         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21091
21092         Module makepath.
21093         * m4/makepath.m4: New file.
21094
21095         Module modechange.
21096         * m4/modechange.m4: New file.
21097
21098         Module mountlist.
21099         * m4/mountlist.m4: New file.
21100         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21101         Indentation.
21102
21103         Module path-concat.
21104         * m4/path-concat.m4: New file.
21105
21106         Module pathmax.
21107         * m4/pathmax.m4: New file.
21108
21109         Module same.
21110         * m4/same.m4: New file.
21111
21112         Module save-cwd.
21113         * m4/save-cwd.m4: New file.
21114
21115         Module savedir.
21116         * m4/savedir.m4: New file.
21117
21118         Module xgetcwd.
21119         * m4/xgetcwd.m4: New file.
21120         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21121
21122         Module xreadlink.
21123         * m4/xreadlink.m4: New file.
21124
21125         Module safe-read.
21126         * m4/safe-read.m4: New file.
21127
21128         Module safe-write.
21129         * m4/safe-write.m4: New file.
21130
21131         Module closeout.
21132         * m4/closeout.m4: New file.
21133
21134         Module stdio-safer.
21135         * m4/stdio-safer.m4: New file.
21136
21137         Module getpass.
21138         * m4/getpass.m4: New file.
21139
21140         Module getugroups.
21141         * m4/getugroups.m4: New file.
21142
21143         Module group-member.
21144         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21145         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21146
21147         Module idcache.
21148         * m4/idcache.m4: New file.
21149
21150         Module userspec.
21151         * m4/userspec.m4: New file.
21152
21153         Module gettime.
21154         * m4/clock_time.m4: New file.
21155         * m4/gettime.m4: New file.
21156
21157         Module settime.
21158         * m4/settime.m4: New file.
21159
21160         Module posixtm.
21161         * m4/posixtm.m4: New file.
21162
21163         Module gethostname.
21164         * m4/gethostname.m4: New file.
21165
21166         Module canon-host.
21167         * m4/canon-host.m4: New file.
21168
21169         Module gettext.
21170         * m4/codeset.m4: New file, from gettext-0.11.5.
21171         * m4/gettext.m4: New file, from gettext-0.11.5.
21172         * m4/glibc21.m4: New file, from gettext-0.11.5.
21173         * m4/iconv.m4: New file, from gettext-0.11.5.
21174         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21175         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21176         * m4/inttypes.m4: New file, from gettext-0.11.5.
21177         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21178         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21179         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21180         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21181         * m4/lib-link.m4: New file, from gettext-0.11.5.
21182         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21183         * m4/progtest.m4: New file, from gettext-0.11.5.
21184         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21185         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21186         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21187
21188         Module localcharset.
21189         * m4/localcharset.m4: New file.
21190
21191         Module hard-locale.
21192         * m4/hard-locale.m4: New file.
21193
21194         Module mbswidth.
21195         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21196         onceonly macros.
21197         * m4/mbrtowc.m4: Add comment.
21198
21199         Module memcasecmp.
21200         * m4/memcasecmp.m4: New file.
21201
21202         Module memcoll.
21203         * m4/memcoll.m4: New file.
21204
21205         Module unicodeio.
21206         * m4/unicodeio.m4: New file.
21207
21208         Module rpmatch.
21209         * m4/rpmatch.m4: New file.
21210
21211         Module yesno.
21212         * m4/yesno.m4: New file.
21213
21214         Module exitfail.
21215         * m4/exitfail.m4: New file.
21216
21217         Module c-stack.
21218         * m4/c-stack.m4 (gl_C_STACK): New macro.
21219         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21220
21221         Module error.
21222         * m4/error.m4 (gl_ERROR): New macro.
21223         (jm_PREREQ_ERROR): Use onceonly macros.
21224
21225         Module fatal.
21226         * m4/fatal.m4: New file.
21227
21228         Module getloadavg.
21229         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21230         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21231
21232         Module getpagesize.
21233         * m4/getpagesize.m4: New file.
21234
21235         Module getusershell.
21236         * m4/getusershell.m4: New file.
21237
21238         Module physmem.
21239         * m4/physmem.m4: New file.
21240
21241         Module posixver.
21242         * m4/posixver.m4: New file.
21243
21244         Module quotearg.
21245         * m4/quotearg.m4: New file.
21246
21247         Module quote.
21248         * m4/quote.m4: New file.
21249
21250         Module readutmp.
21251         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21252
21253         Module sig2str.
21254         * m4/sig2str.m4: New file.
21255
21256         Other.
21257         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21258         ulonglong.m4.
21259         * m4/intmax_t.m4: New file.
21260         * m4/d-type.m4: Indentation.
21261         * m4/jm-macros.m4: Update.
21262         * m4/prereq.m4 (jm_PREREQ): Update.
21263         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21264         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21265         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21266         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21267         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21268         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21269         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21270         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21271         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21272         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21273         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21274         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21275         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21276         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21277         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21278         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21279         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21280         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21281         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21282
21283 2002-12-24  Bruno Haible  <bruno@clisp.org>
21284
21285         * MODULES.txt: Update according to m4/ changes.
21286
21287         Module gettext.
21288         * config.rpath: New file, from gettext-0.11.5.
21289
21290         * modules/*: New module descriptions.
21291         * gnulib-tool: New file.
21292         * MODULES.html.sh: New file.
21293
21294 2002-12-21  Karl Berry  <karl@gnu.org>
21295
21296         * doc/fdl.texi: update to version 1.2.
21297
21298 2002-12-19  Karl Berry  <karl@gnu.org>
21299
21300         * config/config.guess: update from prep.
21301
21302 2002-12-18  Bruno Haible  <bruno@clisp.org>
21303
21304         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21305         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21306
21307 2002-12-17  Bruno Haible  <bruno@clisp.org>
21308
21309         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21310         stdlib.h, string.h.
21311
21312 2002-12-17  Bruno Haible  <bruno@clisp.org>
21313
21314         * lib/canon-host.c (strdup): Remove unused declaration.
21315
21316         * lib/fsusage.c: Include full_read.h.
21317         (get_fs_usage): Use full_read instead of safe_read.
21318
21319         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21320
21321 2002-12-12  Karl Berry  <karl@gnu.org>
21322
21323         * config/config.guess: update from prep.
21324
21325 2002-12-11  Bruno Haible  <bruno@clisp.org>
21326
21327         * m4/setenv.m4: New file, from gettext-0.11.5.
21328
21329 2002-12-11  Bruno Haible  <bruno@clisp.org>
21330
21331         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21332         not unsetenv().
21333         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21334         modifications:
21335
21336         2002-12-11  Bruno Haible  <bruno@clisp.org>
21337
21338                 * setenv.c (alloca): Fall back to malloc.
21339                 (freea): New macro.
21340                 (setenv): Use freea() to free memory allocated with alloca().
21341
21342         2002-11-13  Bruno Haible  <bruno@clisp.org>
21343
21344                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21345                 function declarations.
21346                 * unsetenv.c (unsetenv): Likewise.
21347
21348         2002-03-04  Bruno Haible  <bruno@clisp.org>
21349
21350                 Portability to AIX 4.3.3.
21351                 * unsetenv.c: New file, extracted from setenv.c.
21352                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21353
21354         2001-12-20  Bruno Haible  <bruno@clisp.org>
21355
21356                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21357                 use malloc instead. For SunOS 4.
21358
21359         2001-12-11  Bruno Haible  <bruno@clisp.org>
21360
21361                 * setenv.c: Declare alloca.
21362                 (compar_fn_t): New typedef.
21363                 (KNOWN_VALUE, STORE_VALUE): Use it.
21364
21365         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21366         setenv.h.
21367
21368 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21369
21370         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21371         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21372         Choose values that are less likely to collide with system fnmatch
21373         options.
21374         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21375         defined (e.g., a pure POSIX system).
21376         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21377         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21378
21379 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21380
21381         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21382         a pain in practice to deal with generated m4 files.  This change
21383         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21384
21385         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21386         and jm-glibc-io.m4, as they are no longer a special case.
21387         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21388         kludge and the auto-generation stuff.  Check only whether the
21389         functions are declared, not whether they exist, since older hosts
21390         that don't declare the functions can't use the optimization anyway.
21391
21392 2002-12-06  Jim Meyering  <jim@meyering.net>
21393
21394         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21395
21396         Merge in changes from libc's misc/error.c, in preparation
21397         for the merge of gnulib's changes back into libc.
21398
21399         * lib/error.c (_): Define only if not already defined.
21400         Move definition to follow all #include directives.
21401         Include unlocked-io.h only if !_LIBC.
21402         [_LIBC]: Include <libio/libioP.h>.
21403         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21404         (fflush): Tweak definition to use INTUSE.
21405         (putc): Define.
21406
21407 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21408
21409         * lib/alloca.c [defined emacs]: Include "lisp.h".
21410         (xalloc_die) [defined emacs]: New macro.
21411         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21412         [! defined emacs]: Include <xalloc.h>.
21413         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21414         (pointer): Typedef to POINTER_TYPE *.
21415         (malloc): Remove decl; we now always use xmalloc.
21416         (alloca): Use old-style definition, since Emacs needs this.
21417         Check for arithmetic overflow when computing combined size.
21418
21419 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21420
21421         Do not generate unlocked-io.h automatically, since it's easier to
21422         maintain it by hand.
21423
21424         * lib/unlocked-io.h: New file, from GNU diffutils,
21425         but with proper copyright notice and attribution.
21426         * lib/gen-uio: Remove.
21427         * lib/Makefile.am: Add copyright notice.
21428         (libfetish_a_SOURCES): Add unlocked-io.h.
21429         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21430         (DISTCLEANFILES, io_functions): Remove macros.
21431         (EXTRA_DIST): Remove gen_uio.
21432         (unlocked-io.h): Remove rule.
21433
21434 2002-12-04  Jim Meyering  <jim@meyering.net>
21435
21436         Reflect the fact that stat.c and lstat.c are no longer generated.
21437         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21438         (DISTCLEANFILES): Likewise.
21439         (EXTRA_DIST): Likewise.
21440         (all_local): Don't depend on stat.c or lstat.c.
21441         (stat.c, lstat.c): Remove rules.
21442         (EXTRA_DIST): Remove xstat.in.
21443
21444         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21445         * lib/stat.c: New file.  Contents mostly from xstat.in.
21446         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21447         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21448
21449         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21450         too.
21451         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21452
21453 2002-12-03  Jim Meyering  <jim@meyering.net>
21454
21455         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21456         but not semantics, to minimize the differences between these two files.
21457         (safe_read): Change comment to mention SAFE_READ_ERROR.
21458
21459         * lib/safe-read.c (IS_EINTR): Define.
21460         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21461
21462 2002-12-02  Jim Meyering  <jim@meyering.net>
21463
21464         * lib/safe-read.c (EINTR): Define.
21465         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21466         (INT_MAX): Provide fallback.
21467         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21468
21469         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21470
21471 2002-12-02  Bruno Haible  <bruno@clisp.org>
21472
21473         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21474         Define, taken from safe-read.c.
21475         (INT_MAX): Provide fallback.
21476         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21477         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21478
21479         * lib/safe-read.c (EINTR): Remove definition.
21480         (safe_read): Don't use EINTR if it is absent.
21481
21482 2002-12-01  Jim Meyering  <jim@meyering.net>
21483
21484         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21485         zero.
21486         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21487
21488 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21489
21490         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21491         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21492         with `if (! (value < limit)) abort ();', for readability.
21493
21494 2002-11-26  Karl Berry  <karl@gnu.org>
21495
21496         * lib/strdup.c: copy from libc again, with jim's ok.
21497         * lib/.cppi-disable: re-add strdup.c
21498
21499 2002-11-25  Karl Berry  <karl@gnu.org>
21500
21501         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21502         instead of "strtol.c".
21503
21504 2002-11-25  Karl Berry  <karl@gnu.org>
21505
21506         * config/install-sh: update from automake for variable quoting, $0 in
21507         error msgs, etc.
21508
21509         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21510         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21511         entry.
21512
21513 2002-11-25  Jim Meyering  <jim@meyering.net>
21514
21515         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21516
21517 2002-11-24  Karl Berry  <karl@gnu.org>
21518
21519         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21520         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21521
21522 2002-11-24  Jim Meyering  <jim@meyering.net>
21523
21524         Update from coreutils:
21525
21526         * lib/mktime.c: Merge in changes from libc.
21527
21528         Avoid a link-time failure on some Linux systems.
21529         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21530         (otherwise).
21531         (__mon_yday): Declare with the STATIC attribute.
21532         (__mktime_internal): Likewise.
21533         Based on a report from Greg Schafer.
21534
21535 2002-11-23  Jim Meyering  <jim@meyering.net>
21536
21537         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21538         Use `unsigned', not `int', as type of index.
21539
21540         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21541
21542         * lib/fsusage.c: Remove unneeded parentheses around operands of
21543         `defined'.
21544
21545 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21546
21547         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21548         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21549         so that we can be included first.
21550         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21551         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21552         No need to include stddef.h or sys/types.h any more.
21553         Surround local include files with "", not "<>".
21554         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21555         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21556         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21557         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21558         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21559         (ISPRINT): Remove; no longer needed now that we assume C89.
21560
21561         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21562         Preserve errno.
21563
21564         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21565         quotearg_char): Use SIZE_MAX rather than
21566         (size_t) -1 when we are talking about "infinity".
21567
21568         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21569
21570 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21571
21572         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21573         hint that one should use `if (! x) abort ();' rather than `assert
21574         (x);', and anyway it's one less thing to worry about configuring.
21575         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21576         hash_rehash, hash_insert): Use abort rather than assert.
21577
21578 2002-11-22  Bruno Haible  <bruno@clisp.org>
21579
21580         * lib/safe-read.h: Assume C89. Add comments.
21581         (safe_read): Change return type to size_t.
21582         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21583         byte counts > SSIZE_MAX correctly.
21584         * lib/safe-write.h: New file.
21585         * lib/safe-write.c: New file.
21586         * lib/full-read.h: New file.
21587         * lib/full-read.c: New file.
21588         * lib/full-write.h: Assume C89. Add comments.
21589         * lib/full-write.c: Include safe-write.h.
21590         (full_write): Rewritten to use safe_write.
21591         Suggested by Jim Meyering and Paul Eggert.
21592
21593 2002-11-21  Jim Meyering  <jim@meyering.net>
21594
21595         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21596
21597         Merge in changes from the coreutils.
21598
21599         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21600         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21601         <stdint.h>.
21602         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21603         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21604         int.  Work more efficiently if X is the same width as uintmax_t.
21605         Do not compare X to -1, to avoid bogus compiler warning.
21606         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21607         Don't assume that f_frsize and f_bsize are the same type.
21608
21609         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21610         warning on FreeBSD.
21611
21612         * lib/makepath.c (make_path): Restore umask *before* creating the final
21613         component.
21614         (make_path): Minor reformatting.
21615
21616         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21617         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21618         HAVE_MALLOC/HAVE_REALLOC.
21619
21620         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21621         dummy ones.  At least on GNU/Linux systems, `auto' means something
21622         else.
21623         From Michael Stone.
21624
21625 2002-11-21  Bruno Haible  <bruno@clisp.org>
21626
21627         Remove case insensitive option matching.
21628         * lib/argmatch.h (argcasematch): Remove declaration.
21629         (ARGCASEMATCH): Remove macro.
21630         (__xargmatch_internal): Remove case_sensitive argument.
21631         (XARGMATCH): Update.
21632         (XARGCASEMATCH): Remove macro.
21633         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21634         case_sensitive argument.
21635         (argcasematch): Remove function.
21636         (__xargmatch_internal): Remove case_sensitive argument.
21637         (main): Use XARGMATCH instead of XARGCASEMATCH.
21638
21639         * lib/xmalloc.c: Change compile-time error message. Add comment about
21640         required autoconf version.
21641
21642 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21643
21644         Merge argmatch cleanups from Bison.  Assume C89.
21645
21646         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21647         Include stdlib.h, for EXIT_FAILURE.
21648         Always include <string.h>, since we assume C89.
21649         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21650         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21651         Include <stddef.h> instead, since it's all we need for size_t.
21652         (PARAMS): Remove.  All uses removed.
21653         (ARRAY_CARDINALITY): Do not bother to #undef.
21654         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21655         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21656         Remove unnecessary parentheses.
21657         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21658         Insert necessary parentheses.
21659         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21660         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21661
21662 2002-11-19  Bruno Haible  <bruno@clisp.org>
21663
21664         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21665         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21666
21667         * lib/mbswidth.h (PARAMS): Remove macro.
21668         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21669         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21670
21671         * lib/gcd.h (PARAMS): Remove macro.
21672         (gcd): Use ANSI C function declarations.
21673         * lib/gcd.c (gcd): Likewise.
21674
21675 2002-11-15  Bruno Haible  <bruno@clisp.org>
21676
21677         * lib/strcspn.c: Include <stddef.h>.
21678         (strcspn): Use ANSI C function declaration. Change return type to
21679         size_t. Use NULL.
21680         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21681         (strpbrk): Use NULL.
21682         * lib/strpbrk.h (PARAMS): Remove macro.
21683         (strpbrk): Use ANSI C function declaration.
21684         * lib/strstr.c: Don't include <sys/types.h>.
21685         * lib/strstr.h (PARAMS): Remove macro.
21686         (strstr): Use ANSI C function declarations.
21687
21688 2002-11-14  Karl Berry  <karl@gnu.org>
21689
21690         * config/mkinstalldirs: `do' on separate line, instead of
21691         `for var; do'.
21692
21693 2002-11-06  Bruno Haible  <bruno@clisp.org>
21694
21695         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21696         * lib/gcd.c (gcd): Likewise.
21697
21698 2002-11-05  Bruno Haible  <bruno@clisp.org>
21699
21700         * lib/gcd.h: New file, from gettext-0.11.5.
21701         * lib/gcd.c: New file, from gettext-0.11.5.
21702
21703 2002-11-05  Bruno Haible  <bruno@clisp.org>
21704
21705         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21706         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21707         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21708         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21709
21710         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21711         <libintl.h>.
21712         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21713         <libintl.h>.
21714
21715         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21716         * lib/human.c: Include gettext.h instead of <libintl.h>.
21717         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21718         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21719         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21720         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21721         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21722         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21723         (textdomain): Remove definition.
21724         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21725
21726         * lib/long-options.c: Remove include of <libintl.h> and definition of
21727         _.
21728         * lib/same.c: Remove include of <libintl.h> and definition of _.
21729
21730 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21731
21732         * lib/config.charset: A few additions for Solaris.
21733
21734 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21735
21736         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21737         * lib/localcharset.c (locale_charset): Declare as extern "C".
21738
21739 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21740
21741         * lib/config.charset: msdos in uk_UA uses CP1125.
21742
21743 2002-11-04  Bruno Haible  <bruno@clisp.org>
21744
21745         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21746         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21747         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21748         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21749         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21750
21751 2002-11-04  Bruno Haible  <bruno@clisp.org>
21752
21753         * lib/localcharset.c (locale_charset): Don't return an empty string.
21754
21755 2002-11-04  Bruno Haible  <bruno@clisp.org>
21756
21757         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21758         aliases.
21759
21760 2002-11-04  Bruno Haible  <bruno@clisp.org>
21761
21762         * lib/config.charset: Update for newest glibc. Add canonical names
21763         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21764
21765 2002-11-04  Bruno Haible  <bruno@clisp.org>
21766
21767         * lib/config.charset: Add support for NetBSD.
21768
21769 2002-11-04  Bruno Haible  <bruno@clisp.org>
21770
21771         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21772
21773 2002-11-01  Bruno Haible  <bruno@clisp.org>
21774
21775         * configure.in: Add AC_CONFIG_AUX_DIR call.
21776         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21777         test/Makefile.
21778         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21779
21780 2002-09-28  Karl Berry  <karl@gnu.org>
21781
21782         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21783         installed automake until the next release, since changes have been
21784         made.
21785
21786 2002-09-25  Karl Berry  <karl@gnu.org>
21787
21788         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21789         * lib/getopt*: copy from libc/posix.
21790         * lib/gettext.h: copy from gettext.
21791         * lib/.cppi-disable: add strdup.c, gettext.h.
21792
21793 2002-09-25  Karl Berry  <karl@gnu.org>
21794
21795         * config/srclist.txt: enable gettext.h check.
21796         * config/config.{guess,sub}: update from prep.
21797         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21798                 from automake 1.6.3.
21799         See srclist*.
21800
21801 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21802
21803         * regex.c (PATFETCH): Remove the translating fetch.
21804         (PATFETCH_RAW): Rename to PATFETCH.
21805         (set_image_of_range): New fun.
21806         (SET_RANGE_TABLE_WORK_AREA): Use it.
21807         (regex_compile): Don't translate the pattern chars so eagerly.
21808         Only do it when inserting an `exactn' bytecode or when handling
21809         a char-range.
21810         (mutually_exclusive_p): Avoid empty statement.
21811
21812 2002-07-06  Jim Meyering  <meyering@lucent.com>
21813
21814         * m4/README: Don't mention Makefile.am.in.
21815         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21816
21817 2002-07-01  Jim Meyering  <meyering@lucent.com>
21818
21819         * lib/c-stack.c: Include sys/time.h.
21820         From Volker Borchert.
21821
21822 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21823
21824         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21825
21826 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21827
21828         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21829         New macro.  Use it uniformly instead of
21830         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21831         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21832         reported by Vin Shelton.
21833
21834 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21835
21836         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21837         Do not assume SA_SIGINFO behavior.
21838         Bug reported by Jim Meyering on NetBSD 1.5.2.
21839
21840 2002-06-22  Jim Meyering  <meyering@lucent.com>
21841
21842         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21843         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21844
21845         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21846         now that configure.ac uses AC_GNU_SOURCE.
21847         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21848         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21849
21850         Update to latest tools.  Suggestions from Paul Eggert.
21851         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21852         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21853         * m4/fnmatch.m4: Likewise.
21854         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21855         to AC_HEADER_STDBOOL
21856
21857 2002-06-22  Jim Meyering  <meyering@lucent.com>
21858
21859         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21860         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21861
21862 2002-06-22  Jim Meyering  <meyering@lucent.com>
21863
21864         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21865
21866         * lib/exitfail.c, exitfail.h: Likewise.
21867         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21868
21869         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21870         of fnmatch.h.
21871         (EXTRA_DIST): Add fnmatch_loop.c.
21872         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21873
21874         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21875         * lib/fnmatch.c: Update from diffutils-2.8.2.
21876         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21877         * lib/fnmatch.h: Remove file.
21878
21879 2002-06-21  Jim Meyering  <meyering@lucent.com>
21880
21881         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21882         * m4/mbrtowc.m4: Likewise.
21883
21884         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21885         * m4/mbswidth.m4: Reflect name change:
21886         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21887         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21888
21889         * m4/lib-link.m4: Update from gettext-0.11.2.
21890         * m4/gettext.m4: Likewise.
21891
21892         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21893         From Alfred M. Szmidt.
21894
21895 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21896
21897         * lib/file-type.h: Report an error if neither S_ISREG nor
21898         S_IFREG is defined, instead of using a test specific to glibc
21899         2.2.  This should be safe, since POSIX requires S_ISREG and
21900         Unix Version 7 had S_IFREG.  We don't need to check for
21901         <sys/types.h> since we don't use any symbols that it defines.
21902
21903 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21904
21905         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21906         $@-t, so that each temporary file name is unique and valid in the first
21907         8 characters, for operation under DOS.
21908
21909 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21910
21911         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21912
21913 2002-06-15  Jim Meyering  <meyering@lucent.com>
21914
21915         Work even with DJGPP 2.03, which lacks support for symlinks.
21916         From Richard Dawe.
21917         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21918         is defined.
21919         * lib/lchown.c (S_ISLNK): Likewise.
21920
21921 2002-06-15  Jim Meyering  <meyering@lucent.com>
21922
21923         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21924         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21925         have been included before this file.
21926
21927 2002-06-14  Jim Meyering  <meyering@lucent.com>
21928
21929         * lib/file-type.h: Use the version from diffutils-2.8.2.
21930         * lib/file-type.c: Likewise.
21931
21932 2002-06-07  Jim Meyering  <meyering@lucent.com>
21933
21934         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21935         They're needed at least for NetBSD 1.5.2.
21936         ($statxfs_includes): Include those same headers.
21937         ($statxfs_includes): Include sys/vfs.h if available.
21938         ($statxfs_includes): Likewise for sys/statvfs.h.
21939         Check for the following members in both structs statfs and statvfs:
21940         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21941
21942 2002-06-01  Jim Meyering  <meyering@lucent.com>
21943
21944         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21945         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21946
21947 2002-05-28  Jim Meyering  <meyering@lucent.com>
21948
21949         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21950         Reported by Volker Borchert.
21951
21952 2002-05-27  Jim Meyering  <meyering@lucent.com>
21953
21954         Fix a problem seen only on nonconforming systems whereby ls.c's
21955         use of localtime, and then of gettimeofday would cause trouble:
21956         the localtime call used to initialize rpl_gettimeofday's save
21957         mechanism would clobber ls's current local time information so
21958         that in any long listing the first file would always be listed
21959         with date 1970-01-01.  Analysis by Volker Borchert.
21960
21961         * lib/gettimeofday.c (localtime): Undefine.
21962         (rpl_localtime): New function.
21963
21964 2002-05-27  Jim Meyering  <meyering@lucent.com>
21965
21966         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21967         localtime.
21968
21969         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21970         use the replacement function; it wouldn't resolve at link time.
21971         Reported by Volker Borchert.
21972
21973 2002-05-22  Jim Meyering  <meyering@lucent.com>
21974
21975         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
21976         file-type.h.
21977         * lib/file-type.h: New file.
21978         * lib/file-type.c (file_type): New file/function.  Extracted from
21979         diffutils.
21980
21981 2002-04-30  Jim Meyering  <meyering@lucent.com>
21982
21983         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
21984
21985 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21986
21987         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
21988
21989 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21990
21991         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
21992         Do not check for alloca.h (no longer used) or stdbool.h (was never
21993         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
21994
21995 2002-04-29  Paul Eggert  <eggert@twinsun.com>
21996
21997         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
21998
21999 2002-04-29  Jim Meyering  <meyering@lucent.com>
22000
22001         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22002         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22003         Use AC_FUNC_STRNLEN here instead.
22004
22005         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22006         With autoconf-2.53a, it's part of AC_PROG_CC.
22007
22008 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22009
22010         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22011         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22012
22013 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22014
22015         * lib/sig2str.h, lib/sig2str.c: New files.
22016         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22017
22018 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22019
22020         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22021         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22022         of 127, since 64 is the largest conceivable number for ancient
22023         nonstandard hosts.
22024         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22025
22026 2002-04-28  Jim Meyering  <meyering@lucent.com>
22027
22028         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22029
22030 2002-04-24  Jim Meyering  <meyering@lucent.com>
22031
22032         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22033         (jm_PREREQ): Use it.
22034
22035         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22036         mach/mach.h fcntl.h.
22037         Check for this function: setlocale.
22038
22039 2002-04-24  Jim Meyering  <meyering@lucent.com>
22040
22041         * lib/gettext.h: New file, from Gettext.
22042         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22043         (libfetish_a_SOURCES): Add gettext.h.
22044
22045 2002-04-16  Jim Meyering  <meyering@lucent.com>
22046
22047         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22048         ut_pid, ut_id, ut_exit.
22049
22050 2002-04-16  Jim Meyering  <meyering@lucent.com>
22051
22052         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22053         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22054         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22055
22056 2002-04-12  Jim Meyering  <meyering@lucent.com>
22057
22058         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22059         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22060         existence of the getmntinfo function.  Needed for Darwin 5.3.
22061
22062         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22063         This is necessary at least on Darwin 5.3.
22064
22065         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22066         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22067         strnlen.o in the library, and that makes some versions of ranlib
22068         object.
22069
22070 2002-04-12  Jim Meyering  <meyering@lucent.com>
22071
22072         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22073
22074 2002-04-09  Jim Meyering  <meyering@lucent.com>
22075
22076         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22077         to be more precise.  Rather than saying we're checking whether the
22078         function `works', say what we're testing.
22079         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22080         Reported by Bruno Haible.
22081
22082 2002-03-10  Jim Meyering  <meyering@lucent.com>
22083
22084         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22085         Suggestion from Santiago Vila.
22086
22087 2002-03-08  Jim Meyering  <meyering@lucent.com>
22088
22089         * lib/rename.c: Mention that this wrapper is needed also on
22090         mips-dec-ultrix4.4 systems.
22091
22092 2002-03-02  Jim Meyering  <meyering@lucent.com>
22093
22094         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22095         not HAVE_CLOCK_SETTIME.
22096
22097 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22098
22099         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22100         Check for clock_settime.
22101
22102 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22103
22104         * lib/nanosleep.h: Rename to....
22105         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22106
22107         * lib/gettime.c: New file.
22108         * lib/settime.c: New file.
22109         * lib/stime.c: Remove.
22110
22111         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22112         timespec.h.  Remove nanosleep.h.
22113
22114 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22115
22116         * m4/acl.m4: New file.
22117         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22118         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22119
22120 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22121
22122         * lib/acl.c, lib/acl.h: New files.
22123         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22124
22125 2002-02-24  Jim Meyering  <meyering@lucent.com>
22126
22127         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22128         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22129         cause trouble.  Reported by Nelson Beebe.
22130
22131 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22132
22133         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22134         compilers that don't know that xalloc_die never returns.
22135
22136 2002-02-20  Jim Meyering  <meyering@lucent.com>
22137
22138         * lib/getdate.c: Regenerate using bison-1.33.
22139
22140 2002-02-17  Jim Meyering  <meyering@lucent.com>
22141
22142         * config/config.guess (main): Don't use `head -1'; it's no longer
22143         portable. Use `sed 1q' instead.
22144
22145 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22146
22147         * m4/codeset.m4: Upgrade to gettext-0.11.
22148         * m4/gettext.m4: Upgrade to gettext-0.11.
22149         * m4/glibc21.m4: Upgrade to gettext-0.11.
22150         * m4/iconv.m4: Upgrade to gettext-0.11.
22151         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22152         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22153         * m4/lib-ld.m4: New file, from gettext-0.11.
22154         * m4/lib-link.m4: New file, from gettext-0.11.
22155         * m4/lib-prefix.m4: New file, from gettext-0.11.
22156         * m4/progtest.m4: Upgrade to gettext-0.11.
22157
22158 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22159
22160         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22161         (jm_PREREQ): Use it.
22162
22163 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22164
22165         * lib/posixver.c, lib/posixver.h: New files.
22166         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22167
22168 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22169             Bruno Haible  <bruno@clisp.org>
22170
22171         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22172         (fwrite_success_callback): New declaration.
22173         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22174         print_unicode_char. Call failure callback instead of error.
22175         (fwrite_success_callback): New function.
22176         (exit_failure_callback): New function.
22177         (fallback_failure_callback): New function.
22178         (print_unicode_char): Call unicode_to_mb.
22179
22180 2002-01-26  Jim Meyering  <meyering@lucent.com>
22181
22182         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22183         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22184
22185 2002-01-26  Jim Meyering  <meyering@lucent.com>
22186
22187         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22188
22189 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22190
22191         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22192
22193 2002-01-22  Jim Meyering  <meyering@lucent.com>
22194
22195         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22196         Otherwise, some versions of automake would omit the rule that makes
22197         Makefile from Makefile.in.
22198
22199 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22200
22201         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22202         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22203         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22204         (memcoll): Set errno to zero if there is no error.
22205
22206         * lib/quotearg.c (quotearg_buffer_restyled):
22207         Fix bug with quoting buffers containing NUL when backslashing escapes.
22208         This bug was exposed by the other changes in this patch.
22209         (quotearg_n_options): New arg ARGSIZE.
22210         All callers changed.
22211         (quoting_options_from_style): New function.
22212         (quotearg_n_style): Use it.
22213         (quotearg_n_style_mem): New function.
22214
22215         * lib/quotearg.h (quotearg_n_style_mem): New function.
22216
22217 2002-01-19  Jim Meyering  <meyering@lucent.com>
22218
22219         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22220         Remove useless quotes: DF_PROG="df".
22221         * m4/strnlen.m4: New file.
22222
22223 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22224
22225         * lib/backupfile.c (ISDIGIT): Comment fix.
22226         * lib/getdate.y (ISDIGIT): Likewise.
22227         * lib/posixtm.c (ISDIGIT, year): Likewise.
22228         * lib/strverscmp.c (ISDIGIT): Likewise.
22229         * lib/userspec.c (ISDIGIT): Likewise.
22230
22231 2002-01-16  Jim Meyering  <meyering@lucent.com>
22232
22233         * lib/getdate.y: Add three semicolons, each just before a closing
22234         brace. Bison (as of version 1.31) no longer papers over that mistake.
22235
22236 2002-01-05  Jim Meyering  <meyering@lucent.com>
22237
22238         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22239
22240 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22241
22242         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22243         not silently exit merely because the output buffer happens to
22244         have nothing pending.
22245
22246 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22247
22248         See the big note in ../ChangeLog.
22249         * lib/human.c (suffixes): Prefer K to k for 1024.
22250         (generate_suffix_backwards): New function.
22251         (human_readable_inexact): Use it.
22252         * lib/xstrtol.c (__xstrtol): If there is no number but there
22253         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22254         Accept 'K' as well as 'k'.
22255
22256 2001-12-15  Jim Meyering  <meyering@lucent.com>
22257
22258         * lib/regex.h (__restrict_arr): Update from libc.
22259
22260         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22261         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22262         (STREQ): Define.
22263
22264 2001-12-14  Jim Meyering  <meyering@lucent.com>
22265
22266         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22267         Suggestion from Bruno Haible.
22268
22269 2001-12-10  Jim Meyering  <meyering@lucent.com>
22270
22271         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22272         xrealloc, Instead, include "xalloc.h".
22273         (initbuffer): Don't cast xmalloc return value to char*.
22274         (readline): Reword comment.
22275         Don't cast xrealloc return value to char*
22276         Return NULL, not 0.
22277
22278 2001-12-09  Jim Meyering  <meyering@lucent.com>
22279
22280         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22281         about `signed and unsigned type in conditional expression'.
22282         * lib/posixtm.c (posix_time_parse): Likewise.
22283
22284         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22285
22286         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22287         to avoid a pedantic warning.
22288
22289         * lib/getstr.c: Don't include assert.h.
22290         (getstr): Remove warning-evoking assertions.
22291         Return -1 if offset parameter is out of bounds.
22292         Change the type of a local from int to size_t.
22293
22294         * lib/strftime.c (my_strftime_localtime_r): Include this function
22295         definition in the `#if ! HAVE_TM_GMTOFF' block.
22296
22297         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22298         Include xalloc.h instead.
22299
22300 2001-12-02  Jim Meyering  <meyering@lucent.com>
22301
22302         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22303         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22304         included.
22305
22306         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22307         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22308
22309 2001-11-30  Akim Demaille  <akim@epita.fr>
22310
22311         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22312         before being defined.
22313
22314 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22315
22316         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22317         First arg is int, not unsigned.
22318         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22319         (SIZE_MAX, UINT_MAX): New macros.
22320         (quotearg_n_options): Abort if N is negative.
22321         Avoid overflow check on hosts where size_t is 64 bits and int
22322         is 32 bits, as overflow is impossible there.
22323         Fix off-by-one typo that caused unnecessary reallocation.
22324
22325 2001-11-27  Jim Meyering  <meyering@lucent.com>
22326
22327         * lib/tempname.c: Merge with version from libc.
22328         * lib/regex.c: Likewise.
22329
22330         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22331         systems for which STDC_HEADERS is 0, it was not included, resulting in
22332         a warning about an integer-to-pointer conversion problem with getenv.
22333         Reported by Volker Borchert.
22334
22335 2001-11-26  Jim Meyering  <meyering@lucent.com>
22336
22337         * lib/gtod.h: Remove file.
22338         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22339         * lib/gettimeofday.c: Don't include gtod.h.
22340         (GTOD_init): Remove function.
22341         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22342         Suggestion from Volker Borchert.
22343
22344 2001-11-23  Jim Meyering  <meyering@lucent.com>
22345
22346         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22347         it.
22348         * lib/hash.c (struct hash_table): Define it here instead.
22349
22350 2001-11-22  Jim Meyering  <meyering@lucent.com>
22351
22352         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22353
22354 2001-11-20  Jim Meyering  <meyering@lucent.com>
22355
22356         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22357         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22358
22359 2001-11-19  Jim Meyering  <meyering@lucent.com>
22360
22361         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22362         directory.  Use "conftestXXXXXX" as the template.
22363         Suggestion from Paul Eggert.
22364
22365         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22366         immediately, so the test doesn't mistakenly hit the max-open-files
22367         limit.
22368
22369 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22370
22371         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22372         (TEMPORARIES): New macro.
22373         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22374         removes an artificial limitation (e.g. HP-UX 10.20, where
22375         TMP_MAX is 17576).
22376
22377 2001-11-18  Jim Meyering  <meyering@lucent.com>
22378
22379         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22380
22381 2001-11-18  Jim Meyering  <meyering@lucent.com>
22382
22383         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22384         on SunOS 4.
22385
22386         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22387         files will be created before anything else.
22388
22389 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22390
22391         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22392         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22393
22394 2001-11-17  Jim Meyering  <meyering@lucent.com>
22395
22396         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22397         Prompted by a report from Bob Proulx.
22398
22399         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22400         Instead, require UTILS_FUNC_MKSTEMP.
22401
22402 2001-11-17  Jim Meyering  <meyering@lucent.com>
22403
22404         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22405         Now, that's done as part of AC_FUNC_STRTOD.
22406
22407 2001-11-17  Jim Meyering  <meyering@lucent.com>
22408
22409         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22410         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22411         rather than group writable.  Patch by Juan F. Codagnone.
22412
22413         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22414         xrealloc, Instead, include "xalloc.h".
22415
22416         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22417         Remove explicit declarations of xmalloc, xrealloc,
22418         and xstrdup.  Instead, include "xalloc.h".
22419
22420         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22421         unlocked-io.h.
22422         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22423         Likewise.
22424         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22425
22426         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22427         Reported by Padraig Brady.
22428
22429         * lib/mkstemp.c: #undef mkstemp.
22430         Include config.h.
22431         (rpl_mkstemp): Rename from mkstemp.
22432         Protoize.
22433
22434 2001-11-16  Jim Meyering  <meyering@lucent.com>
22435
22436         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22437         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22438         determine the amount of total physical memory, use pstat_getstatic.
22439         HPUX-11 doesn't define _SC_PHYS_PAGES.
22440         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22441         If sysconf couldn't be used to determine the amount of available
22442         physical memory, use both pstat_getstatic and pstat_getdynamic.
22443         Based on a patch from Bob Proulx.
22444
22445 2001-11-10  Jim Meyering  <meyering@lucent.com>
22446
22447         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22448         (jm_PREREQ): Use it.
22449
22450 2001-11-09  Jim Meyering  <meyering@lucent.com>
22451
22452         * m4/jm-macros.m4: Require autoconf-2.52f.
22453         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22454         Use these AC_-prefixed names, not the AM_-prefixed ones.
22455
22456         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22457
22458 2001-11-05  Jim Meyering  <meyering@lucent.com>
22459
22460         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22461
22462 2001-11-04  Jim Meyering  <meyering@lucent.com>
22463
22464         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22465         $DEFS.
22466
22467 2001-11-03  Jim Meyering  <meyering@lucent.com>
22468
22469         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22470         of AC_DEFUN.
22471
22472         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22473         know the name of the variable in the macro definition.
22474
22475 2001-11-03  Jim Meyering  <meyering@lucent.com>
22476
22477         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22478         in argmatch_to_argument call.
22479
22480         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22481         argument.
22482
22483         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22484         e.g., a fault due to an attempt to free a NULL pointer.
22485
22486 2001-11-01  Jim Meyering  <meyering@lucent.com>
22487
22488         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22489         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22490
22491 2001-11-01  Jim Meyering  <meyering@lucent.com>
22492
22493         * lib/dirfd.c, lib/dirfd.h: New files.
22494         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22495
22496         * lib/hash.c (hash_print) [TESTING]: Clean up.
22497
22498 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22499
22500         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22501         to avoid a warning if -Wall.
22502
22503 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22504
22505         * README: New file
22506         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22507         (per RMS's instructions, this is now the canonical source)
22508         * lgpl/, gpl/: New directories.
22509
22510 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22511
22512         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22513
22514 2001-10-21  Jim Meyering  <meyering@lucent.com>
22515
22516         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22517         this code would end up calling gettext even in packages built
22518         with --disable-nls.
22519         * lib/getopt.c (_): Likewise.
22520         * lib/regex.c (_): Likewise.
22521
22522 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22523
22524         * m4/error.m4 (jm_PREREQ_ERROR):
22525         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22526         AC_FUNC_STRERROR_R does that.
22527         Check for strerror declaration.
22528
22529         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22530         are supposed to have them these days.
22531         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22532         Merge changes from latest Autoconf CVS.
22533         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22534         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22535         POSIX decided to standardize on the int flavor of strerror_r.
22536
22537 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22538
22539         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22540         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22541         Use strerror_r that is only a macro, even if it is not a function.
22542         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22543         (private_strerror): Use prototypes, not old-style function definition.
22544         (print_errno_message): New function.
22545         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22546         char*-flavored one.
22547         (error_tail, error, error_at_line): Use it.
22548
22549 2001-10-11  Jim Meyering  <meyering@lucent.com>
22550
22551         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22552         and quote_n (1, ... to avoid clobbering a buffer.
22553
22554 2001-10-05  Jim Meyering  <meyering@lucent.com>
22555
22556         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22557         hash-pjw.h.
22558         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22559         * lib/hash-pjw.h: New file.
22560
22561 2001-09-30  Jim Meyering  <meyering@lucent.com>
22562
22563         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22564         `struct fsstat' has the `f_fstypename' member.
22565         Use that to define FS_TYPE, which is now used to make
22566         the getfsstat link test tighter.
22567
22568 2001-09-30  Jim Meyering  <meyering@lucent.com>
22569
22570         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22571         Include <sys/ucred.h>, for Apple Darwin.
22572         Include sys/mount.h and sys/fs_types.h only if available.
22573         (FS_TYPE): Define.
22574         (read_filesystem_list): Use FS_TYPE.
22575
22576 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22577
22578         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22579         a boolean context.
22580
22581 2001-09-29  Jim Meyering  <meyering@lucent.com>
22582
22583         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22584         [one-argument getmntent function]): Include stdio.h before mntent.h.
22585         SunOS 4.1.x needs it for the declaration of `FILE'.
22586         Patch by Volker Borchert.
22587
22588         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22589         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22590         sys/fs_types.h, and make the link-test for getfsstat guard #include
22591         directives with appropriate #if HAVE_*_H tests so that we can
22592         detect getfsstat on Apple Darwin1.3.7 systems.
22593         Reported by Nelson Beebe.
22594         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22595
22596 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22597
22598         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22599         #defines strtoimax.  Also treat the other strto* functions
22600         like strtoimax.
22601
22602         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22603         Check for strtoul and strtoumax,
22604         as those declarations are made even in the signed case.
22605         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22606         Likewise, for strtol and strtoimax.
22607
22608 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22609
22610         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22611         #defines strtoimax.  Also treat the other strto* functions
22612         like strtoimax.
22613
22614         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22615         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22616         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22617
22618 2001-09-26  Jim Meyering  <meyering@lucent.com>
22619
22620         Most macros in unlocked-io.h had the wrong number of arguments.
22621         * lib/gen-uio: New script.
22622         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22623         * lib/unlocked-io.hin: Remove file.
22624         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22625         rather than trying to embed it here.
22626         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22627         Reported by Padraig Brady.
22628
22629 2001-09-25  Volker Borchert  <bt@teknon.de>
22630
22631         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22632         `result'.
22633
22634 2001-09-24  Jim Meyering  <meyering@lucent.com>
22635
22636         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22637
22638 2001-09-23  Jim Meyering  <meyering@lucent.com>
22639
22640         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22641         instead of the mere test for existence of mntent.h.  The latter
22642         would get a false-positive on AIX 3.4 systems.
22643         In the outer getmntent if-block, don't die if neither of the getmntent
22644         tests succeeds.  Instead, just fall through and continue with the
22645         remaining tests.
22646
22647 2001-09-23  Jim Meyering  <meyering@lucent.com>
22648
22649         * lib/mountlist.c: Remove useless parentheses in #if directives.
22650         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22651         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22652
22653 2001-09-22  Jim Meyering  <meyering@lucent.com>
22654
22655         * m4/gettext.m4: New file.  From gettext.
22656         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22657         * m4/progtest.m4: Likewise
22658         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22659         * m4/glibc21.m4: Likewise.
22660
22661         * m4/libintl.m4: Remove.  No longer used.
22662
22663 2001-09-22  Jim Meyering  <meyering@lucent.com>
22664
22665         * lib/localcharset.c: Update from latest gettext.
22666         * lib/config.charset: Likewise.
22667
22668 2001-09-20  Jim Meyering  <meyering@lucent.com>
22669
22670         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22671         strtoimax.
22672         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22673         strtoumax.
22674
22675 2001-09-20  Jim Meyering  <meyering@lucent.com>
22676
22677         * lib/xstrtol.c (strtoimax): Guard declaration with
22678         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22679         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22680         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22681         (strtoumax): Likewise, for completeness (it wasn't necessary).
22682
22683 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22684
22685         * lib/strtoimax.c (HAVE_LONG_LONG):
22686         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22687         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22688         to work around bug in IBM C compiler.
22689
22690 2001-09-17  Jim Meyering  <meyering@lucent.com>
22691
22692         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22693         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22694         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22695         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22696         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22697         whenever the right hand side need not be expanded by the shell.
22698
22699 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22700
22701         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22702         library.  It's not correct, as some older glibcs are buggy.
22703         fnmatch wasn't fixed until glibc 2.2.
22704
22705         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22706         special shell magic here.
22707
22708 2001-09-16  Jim Meyering  <meyering@lucent.com>
22709
22710         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22711         * m4/jm-macros.m4: Require it.
22712
22713 2001-09-16  Jim Meyering  <meyering@lucent.com>
22714
22715         * lib/mkdir.c: New file.
22716
22717 2001-09-15  Jim Meyering  <meyering@lucent.com>
22718
22719         * m4/jm-macros.m4: Check for help2man.
22720
22721 2001-09-11  Jim Meyering  <meyering@lucent.com>
22722
22723         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22724         The body, by Paul Eggert, was moved here from configure.in.
22725         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22726
22727 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22728
22729         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22730         (jm_PREREQ): Use it.
22731
22732 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22733
22734         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22735         Use ssize_t, not int, to store result of readlink.
22736         Check for ssize_t overflow as well as size_t overflow,
22737         as POSIX says the result of readlink is implementation-defined
22738         when ssize_t overflows.
22739         Remove unnecessary cast to char*.
22740         Use free+malloc instead of realloc, as the storage doesn't need
22741         to be preserved and it's clearer and can be more efficient that way.
22742         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22743         * lib/xreadlink.h (xreadlink): Update prototype.
22744
22745 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22746
22747         * lib/xgetcwd.c: Revert some of the previous change; intead,
22748         fix the HAVE_GETCWD_NULL code to behave more like the
22749         !HAVE_GETCWD_NULL code used to.
22750
22751         Include "xalloc.h".
22752         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22753         invoke xalloc_die.
22754
22755 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22756
22757         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22758         sys/param.h, as pathmax.h includes them.
22759
22760 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22761
22762         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22763         (jm_PREREQ_XGETCWD): New macro.
22764
22765         * m4/getcwd.m4: New file.
22766
22767 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22768
22769         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22770         like the HAVE_GETCWD_NULL code.
22771         Include pathmax.h if not HAVE_GETCWD.
22772         Do not include xalloc.h.
22773         (INITIAL_BUFFER_SIZE): New symbol.
22774         Do not use xmalloc / xrealloc, since the caller is responsible for
22775         handling errors.  Preserve errno around `free' during failure.
22776         Do not overrun buffer when using getwd.
22777
22778 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22779
22780         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22781         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22782         getcwd (NULL, 0).
22783
22784 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22785
22786         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22787         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22788         spotted by Jim Meyering.
22789
22790 2001-09-03  Jim Meyering  <meyering@lucent.com>
22791
22792         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22793         failure.
22794
22795 2001-09-02  Jim Meyering  <meyering@lucent.com>
22796
22797         * lib/error.c: Update from GNU libc.
22798
22799 2001-09-01  Jim Meyering  <meyering@lucent.com>
22800
22801         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22802         Used by df.
22803
22804 2001-09-01  Jim Meyering  <meyering@lucent.com>
22805
22806         * lib/xreadlink.c: New file.
22807         * lib/xreadlink.h: New file.
22808         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22809         xreadlink.h.
22810
22811         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22812         doesn't conflict with sparc Solaris 7's definition in
22813         /usr/include/sys/int_types.h.
22814
22815         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22816         files.
22817         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22818         and strncasecmp as r-values.  Unixware didn't have declarations.
22819
22820 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22821
22822         * lib/xstrtol.h: Add copyright notice.
22823         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22824         LONGINT_INVALID_SUFFIX_CHAR.
22825
22826 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22827
22828         * lib/xstrtol.c (strtoimax): New decl.
22829
22830 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22831
22832         * lib/xgetcwd.c: Don't include pathmax.h.
22833         Include stdlib.h and unistd.h if available.
22834         Include xalloc.h.
22835         (xmalloc, xstrdup, free): Remove decls.
22836         (xgetcwd): Don't assume sizes fit in unsigned.
22837         Check for overflow when computing sizes.
22838         Simplify reallocation code.
22839
22840 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22841
22842         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22843         a directory's st_size can have an arbitrary value, so the old
22844         usage could waste an arbitrary amount of memory.  All uses
22845         changed.
22846         * lib/savedir.h: Update prototype.
22847
22848 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22849
22850         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22851
22852         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22853         old strtoimax.c.
22854
22855         Also, make the following further changes to make this file's
22856         configuration more similar to that of strtol.c:
22857         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22858         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22859         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22860         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22861         changed to signed values.
22862
22863         And make the following changes as well:
22864         Fix copyright notice, as 1999 was missing.
22865         (verify): New macro.
22866         (strtoimax): Check sizes at compile-time, not run-time.
22867         Prefer strtol to strtoll if both work.
22868         (main): Remove; it was not that useful and was a pain to maintain.
22869
22870         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22871
22872 2001-08-31  Jim Meyering  <meyering@lucent.com>
22873
22874         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22875         Use an initial, malloc'd, buffer of length 128 rather than
22876         a statically allocated one of length 1024.
22877
22878 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22879
22880         Simplify code, partly by assuming autoconf 2.52 semantics.
22881
22882         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22883
22884         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22885         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22886         All uses removed.
22887         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22888         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22889         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22890         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22891         jm_AC_HEADER_INTTYPES_H.
22892         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22893
22894         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22895
22896         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22897         Quote first arg of AC_DEFUN.
22898         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22899         since they are needed to parse the include file even if we need
22900         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22901         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22902         but with opposite signedness.
22903
22904 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22905
22906         Merge 'exclude' changes from tar 1.13.22.
22907         This fixes one or two unlikely storage allocation overflow bugs,
22908         but doesn't change user-visible behavior otherwise.
22909
22910 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22911
22912         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22913         (jm_PREREQ_EXCLUDE): New macro.
22914
22915 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22916
22917         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22918         tm to be declared.
22919
22920 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22921
22922         * lib/hash.c: Remove '2001' from copyright notice.
22923
22924 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22925
22926         * lib/full-write.h: New file.
22927         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22928         * lib/full-write.c: Correct credits, as cccp.c no longer
22929         exists and anyway it was so heavily changed from the old cccp
22930         code as to be unrecognizable.  Include full-write.h.
22931         (full_write) Return size_t, with short writes meaning failure.
22932         All callers changed.  This fixes a bug with large buffers
22933         on 64-bit hosts.
22934         * lib/utime.c: Include full-write.h.
22935
22936 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22937
22938         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22939         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22940         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22941         Include if available.
22942         (<xalloc.h>): Include
22943         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22944         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22945         collide with FNM macros.
22946         (struct patopts): New struct.
22947         (struct exclude): Use it, as exclude patterns now come with options.
22948         (new_exclude): Support above changes.
22949         (new_exclude, add_exclude_file):
22950         Initial size must now be a power of two to simplify overflow checking.
22951         (free_exclude, fnmatch_no_wildcards): New function.
22952         (excluded_filename): No longer requires options arg, as the options
22953         are determined by add_exclude.  Now returns bool, not int.
22954         (excluded_filename, add_exclude):
22955         Add support for the fancy new exclusion options.
22956         (add_exclude, add_exclude_file): Now takes int options arg.
22957         Check for arithmetic overflow when computing sizes.
22958         (add_exclude_file): xrealloc might modify errno, so don't
22959         realloc until after errno might be used.
22960
22961         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22962         New macros.
22963         (free_exclude): New decl.
22964         (add_exclude, add_exclude_file): Now takes int options arg.
22965         (excluded_filename): No longer requires options arg, as the options
22966         are determined by add_exclude.  Now returns bool, not int.
22967
22968 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22969
22970         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22971
22972 2001-08-27  Jim Meyering  <meyering@lucent.com>
22973
22974         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
22975
22976         * lib/version-etc.c (N_): Remove definition.
22977         Revert most of last change.
22978         Instead, simply don't mark the `Copyright...' string for translation.
22979         Based on advice from Paul Eggert.
22980
22981         * lib/strtoxmax.c: Tweak comment.
22982
22983 2001-08-26  Jim Meyering  <meyering@lucent.com>
22984
22985         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
22986
22987         * m4/xstrtoimax.m4: New file.
22988         * m4/xstrtoumax.m4: Add comments explaining why we
22989         AC_REPLACE_FUNCS(strtol).
22990
22991 2001-08-26  Jim Meyering  <meyering@lucent.com>
22992
22993         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
22994         of copyright with `%s' so translators don't get an untranslated
22995         message in 2002.
22996         (COPYRIGHT_YEAR): Define.
22997         (version_etc): Use fprintf rather than fputs.
22998         Suggestion from Ulrich Drepper.
22999
23000         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23001
23002         * lib/strtoll.c: New file, from GNU libc.
23003         * lib/xstrtoimax.c: New file.
23004
23005         * lib/xstrtol.h: Add xstrtoimax.
23006         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23007         * lib/strtoimax.c: New file.  Likewise, but first define
23008         STRTOUXMAX_SIGNED.
23009
23010         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23011         ...
23012         * lib/strtoxmax.c: ... then renamed to this.
23013
23014 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23015
23016         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23017         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23018         (jm_AC_TYPE_INTMAX_T): New macro.
23019         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23020
23021         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23022
23023         * m4/longlong.m4: Renamed from ulonglong.m4.
23024         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23025         * m4/uintmax_t.m4: Removed.
23026
23027 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23028
23029         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23030         Port to Solaris 8, where 'sed' requires a space after the 'r'
23031         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23032         Redirect output to $tmp just once.
23033
23034 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23035
23036         * lib/addext.c (<errno.h>): Include.
23037         (errno): Declare if not defined.
23038         (addext): Work correctly when pathconf returns -1 and leaves
23039         errno alone because there is no limit.  Also, work even if
23040         pathconf returns a value greater than SIZE_MAX.
23041
23042 2001-08-12  Jim Meyering  <meyering@lucent.com>
23043
23044         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23045         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23046         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23047         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23048         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23049         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23050         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23051         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23052         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23053         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23054         utime.m4, utimes.m4, xstrtoumax.m4:
23055         Quote the first argument in each use of AC_DEFUN.
23056
23057 2001-08-12  Jim Meyering  <meyering@lucent.com>
23058
23059         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23060         Simply `return getcwd (NULL, 0);'.
23061         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23062         Use 1300 as initial value for length, not PATH_MAX.
23063
23064         * lib/pathmax.h: Clean up cpp syntax.
23065
23066 2001-08-12  Jim Meyering  <meyering@lucent.com>
23067
23068         * lib/gettimeofday.c: New file.
23069         * lib/gtod.h: New file.
23070         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23071
23072 2001-08-05  Jim Meyering  <meyering@lucent.com>
23073
23074         * m4/jm-macros.m4: Require autoconf-2.52.
23075
23076 2001-08-04  Jim Meyering  <meyering@lucent.com>
23077
23078         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23079         stmt, to get in sync with glibc.
23080
23081 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23082
23083         The following changes are from gettext 0.10.39 as maintained by
23084         Bruno Haible.
23085
23086         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23087         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23088         with inverted sense.  All uses changed.
23089
23090         * lib/mbswidth.c: Don't include <limits.h>.
23091         Include <stdlib.h> and <string.h> unconditionally.
23092         (iswcntrl, mbsinit, ISCNTRL): New macros.
23093         (mbsnwidth): Use K&R style function declarations.
23094         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23095         can optimize it when MB_CUR_MAX == 1.
23096         The width of control characters is zero, not 1.
23097
23098 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23099
23100         The following changes are from gettext 0.10.39 as maintained by
23101         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23102
23103         * m4/codeset.m4: Upgrade to serial AM1.
23104         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23105         all uses changed.  Quote first arg of AC_DEFUN.
23106         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23107
23108         * m4/iconv.m4: Upgrade to serial AM2.
23109         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23110         Add --with-libconv-prefix.
23111         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23112         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23113         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23114         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23115         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23116
23117         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23118         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23119         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23120         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23121         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23122         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23123         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23124         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23125         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23126
23127         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23128         string.h any more.
23129
23130         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23131         not the default value.
23132
23133         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23134         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23135         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23136         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23137         Also check for iswcntrl, used for wcwidth fallback.
23138         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23139         to Autoconf 2.13.
23140
23141 2001-08-03  Jim Meyering  <meyering@lucent.com>
23142
23143         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23144         as it was in the original.  Reported by Paul Eggert.
23145
23146 2001-07-16  Jim Meyering  <meyering@lucent.com>
23147
23148         * m4/gettimeofday.m4: New file.
23149         Prompted by a report from Bernhard Baehr.
23150
23151 2001-07-15  Jim Meyering  <meyering@lucent.com>
23152
23153         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23154         stuff. Now it's in ../Makefile.cfg.
23155
23156 2001-07-15  Jim Meyering  <meyering@lucent.com>
23157
23158         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23159         (BUILT_SOURCES): Add unlocked-io.h.
23160         (io_functions): Define.
23161         (unlocked-io.h): New rule.
23162         (DISTCLEANFILES): Add unlocked-io.h.
23163         (all-local): Depend on unlocked-io.h, to ensure it is created.
23164
23165         * lib/unlocked-io.hin: New file
23166
23167         * lib/regex.c: Update from glibc.
23168
23169 2001-07-05  Jim Meyering  <meyering@lucent.com>
23170
23171         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23172         recommendation.
23173         (libfetish_a_SOURCES): Put all .h files here instead.
23174         Remove a thus-exposed (better checks in automake) duplicate and
23175         two unnecessary .h files.
23176
23177 2001-07-04  Jim Meyering  <meyering@lucent.com>
23178
23179         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23180         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23181         distcheck failure.
23182
23183 2001-07-02  Jim Meyering  <meyering@lucent.com>
23184
23185         The following changes were prompted by suggestions from Bruno Haible.
23186
23187         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23188         is now generated.
23189         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23190         definition of EXTRA_DIST.
23191         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23192         ensure that the generated file is created/updated whenever the list
23193         of $(unlocked_functions) is changed.
23194         (jm-glibc-io.m4): New rule.
23195         (unlocked-io.h): New rule -- currently unused.
23196
23197 2001-06-24  Jim Meyering  <meyering@lucent.com>
23198
23199         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23200         unmatched right bracket, rather than kludging it with an extra,
23201         falsely-matching quote in a comment.  Patch by Akim Demaille.
23202
23203 2001-06-11  Jim Meyering  <meyering@lucent.com>
23204
23205         * lib/regex.c: Update from GNU libc.
23206
23207 2001-05-27  Jim Meyering  <meyering@lucent.com>
23208
23209         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23210         Check for ut_type in struct utmp.
23211
23212 2001-05-27  Jim Meyering  <meyering@lucent.com>
23213
23214         * lib/readutmp.h (UT_TYPE): Define.
23215
23216 2001-05-24  Jim Meyering  <meyering@lucent.com>
23217
23218         * lib/argmatch.c: Include "quote.h".
23219         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23220         quote function.  Reported by Göran Uddeborg.
23221
23222 2001-05-22  Jim Meyering  <meyering@lucent.com>
23223
23224         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23225         now that we use the package-supplied version unconditionally.
23226         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23227
23228 2001-05-21  Jim Meyering  <meyering@lucent.com>
23229
23230         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23231         shell syntax errors.
23232
23233 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23234
23235         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23236
23237 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23238
23239         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23240         Don't bother to check library strftime, since
23241         we'll be using our own my_strftime function anyway.
23242         Define my_strftime instead of strftime.
23243
23244 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23245
23246         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23247         which is not yet declared.
23248
23249 2001-05-15  Jim Meyering  <meyering@lucent.com>
23250
23251         * m4/regex.m4: Use proper quoting so brackets appear in the test
23252         program.
23253         Reported by, and with help from, Bruno Haible.
23254
23255 2001-05-13  Jim Meyering  <meyering@lucent.com>
23256
23257         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23258         undefined.
23259
23260 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23261
23262         dirname code cleanup.  base_name now behaves more compatibly
23263         with POSIX basename when given file names that have trailing
23264         slashes, and similarly for dir_name.  Add new primitives
23265         base_len and dir_len.  Put the directory-name-related decls
23266         into dirname.h.
23267
23268         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23269         * lib/backupfile.c (base_name): Likewise.
23270         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23271         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23272         * lib/makepath.c (strip_trailing_slashes): Likewise.
23273         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23274         ISSLASH): Likewise.
23275         * lib/rename.c (strip_trailing_slashes): Likewise.
23276         * lib/same.c (base_name): Likewise.
23277         * lib/stripslash.c (ISSLASH): Likewise.
23278
23279         * lib/addext.c: Include <dirname.h> after size_t is defined.
23280         * lib/backupfile.c: Likewise.
23281
23282         * lib/addext.c (addext): Use base_len to trim redundant
23283         trailing slashes instead of doing it ourselves.
23284         But do not trim the last slash if it is not redundant.
23285
23286         * lib/backupfile.c (find_backup_file_name,
23287         max_backup_version): Use base_len instead of rolling it ourselves.
23288         Handle the case of "" and (on DOS) "C:" correctly.
23289
23290         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23291         needed. Include <string.h>, <dirname.h>.
23292         (base_name): Allow file names ending in slashes, other than names
23293         that are all slashes.  In this case, return the basename followed
23294         by the slashes.  This is more general, and can be used in places
23295         where the original base_name purposely had an assertion failure.
23296         (base_len): New function.
23297
23298         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23299         Do not include <assert.h>; no longer needed.
23300         Include xalloc.h.
23301         (memrchr): Remove decl.
23302         (dir_name_r): Remove.
23303         (dir_len): Renamed from dirlen.  All callers changed.
23304         Rewrite in terms of base_name, for simplicity and consistency.
23305         (dir_name): Never return NULL.  All callers changed.
23306         Do not include <stdlib.h> in test program; no longer needed.
23307         return 0; is fine for test program.
23308
23309         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23310         New macros.
23311         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23312
23313         * lib/path-concat.c (path_concat): Use base_len to compute
23314         base length, not strlen; this means we cannot rely on memcpy
23315         to null-terminate.
23316
23317         * lib/same.c (STREQ): Remove.
23318         (same_name): Handle the case where the basename ends in trailing '/'.
23319
23320         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23321         a slash was stripped.  Do not strip the last slash after a
23322         file system prefix.
23323
23324 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23325
23326         * lib/Makefile.am (libfetish_a_SOURCES):
23327         Add strftime.c, since we now compile it on all hosts.
23328
23329         * lib/strftime.c (my_strftime):
23330         Define to nstrftime if emacs, but only if my_strftime is not defined.
23331         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23332         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23333         Add one more extra argument: a nanoseconds value.
23334         All uses changed.
23335         (ns): New macro.
23336         (my_strftime function): Add %N format.
23337         (emacs_strftimeu): Renamed from emacs_strftime,
23338         with extra ut argument.
23339
23340 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23341
23342         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23343
23344 2001-04-21  Jim Meyering  <meyering@lucent.com>
23345
23346         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23347         doesn't interfere.
23348
23349 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23350
23351         * m4/ftruncate.m4: Check for chsize.
23352         Link with ftruncate.o unconditionally if ftruncate is missing.
23353         This was required when cross-compiling to i586-mingw32msvc.
23354
23355 2001-04-08  Jim Meyering  <meyering@lucent.com>
23356
23357         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23358         recomputed; that's necessary when the offset spans a DST transition.
23359         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23360
23361 2001-04-02  Jim Meyering  <meyering@lucent.com>
23362
23363         * lib/regex.h, regex.c: Update from GNU libc.
23364
23365 2001-03-24  Jim Meyering  <meyering@lucent.com>
23366
23367         * m4/jm-macros.m4: Require autoconf-2.49d.
23368
23369 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23370
23371         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23372
23373 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23374
23375         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23376
23377 2001-03-17  Jim Meyering  <meyering@lucent.com>
23378
23379         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23380         now that the version in autoconf is equivalent.
23381         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23382
23383         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23384         Suggestion from Akim Demaille.
23385
23386         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23387         (jm_PREREQ_TEMPNAME): New function.
23388
23389 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23390
23391         * lib/tempname.c (uint64_t): Define to uintmax_t if
23392         not defined, and if UINT64_MAX is not defined.
23393         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23394         Reported by John David Anglin.
23395
23396 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23397
23398         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23399         resolve alias if codeset is empty.
23400         * lib/config.charset (BeOS): Use wildcard syntax.
23401
23402 2001-03-13  Jim Meyering  <meyering@lucent.com>
23403
23404         * lib/path-concat.c (path_concat)
23405         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23406         concatenating e.g., `C:' and `foo'.
23407         From Bruno Haible.
23408
23409 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23410
23411         * lib/localcharset.c (locale_charset): Don't use
23412         setlocale(LC_CTYPE,NULL). Don't return NULL.
23413         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23414
23415 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23416
23417         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23418         support for DOS/DJGPP.
23419
23420 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23421
23422         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23423         lacks mkstemp.  Compile our own tempname.c if we compile our own
23424         mkstemp.c, as mkstemp relies on tempname.
23425
23426 2001-03-01  Jim Meyering  <meyering@lucent.com>
23427
23428         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23429         AH_VERBATIM really does output its argument verbatim.
23430
23431 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23432
23433         * lib/Makefile.am (libfetish_a_SOURCES):
23434         Add dup-safer.c, fopen-safer.c.
23435         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23436
23437         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23438         * lib/unistd-safer.h: New files.
23439
23440 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23441
23442         The mkstemp replacement is taken from glibc 2.2.2, with some
23443         portability fixes for use outside glibc, as follows:
23444
23445         * lib/tempname.c (struct_stat64): New macro.
23446         (direxists, __gen_tempname): Use it.
23447         This avoids a portability problem with Solaris 8.
23448
23449         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23450         (<stddef.h>, <stdint.h>, <string.h>):
23451         Include only if STDC_HEADERS || _LIBC.
23452         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23453         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23454         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23455         (__set_errno): Define this macro if <errno.h> doesn't.
23456         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23457         Define these macros if <stdio.h> doesn't.
23458         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23459         Define these macros if <sys/stat.h>
23460         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23461         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23462         __xstat64): Define if not _LIBC.
23463         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23464         (__gen_tempname): Invoke gettimeofday only if
23465         HAVE_GETTIMEOFDAY || _LIBC;
23466         otherwise, fall back on plain "time".
23467         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23468
23469         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23470
23471         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23472
23473 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23474
23475         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23476
23477 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23478
23479         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23480         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23481         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23482         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23483
23484 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23485
23486         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23487         Remove workaround macros for hosts that have mbrtowc but not
23488         mbstate_t, as we now insist on proper declarations for both
23489         before using mbrtowc.
23490
23491 2001-02-17  Jim Meyering  <meyering@lucent.com>
23492
23493         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23494         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23495         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23496         UnixWare 7.1.1.
23497
23498         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23499         rather than AC_CACHE_VAL.
23500
23501 2001-02-17  Jim Meyering  <meyering@lucent.com>
23502
23503         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23504         around included file name.
23505
23506         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23507
23508         * lib/strftime.c: Update from GNU libc (the only changes were to
23509         comments).
23510
23511 2001-02-17  Jim Meyering  <meyering@lucent.com>
23512
23513         * lib/regex.c: Update from libc.
23514
23515 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23516
23517         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23518         clash.
23519
23520 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23521
23522         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23523         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23524         Reported by Mark Hounschell via Paul Eggert.
23525
23526 2001-02-07  Jim Meyering  <meyering@lucent.com>
23527
23528         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23529
23530 2001-02-05  Jim Meyering  <meyering@lucent.com>
23531
23532         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23533         it includes the patch required for `large file' support with at least
23534         HP-UX's 10.20 /bin/cc.
23535
23536 2001-02-03  Jim Meyering  <meyering@lucent.com>
23537
23538         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23539         AS_IF, now that it works once again (mysteriously).
23540         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23541
23542 2001-01-30  Jim Meyering  <meyering@lucent.com>
23543
23544         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23545         * m4/chown.m4: Rename conftestchown to conftest.chown.
23546         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23547         s/conftestdir2/conftest.d2/.
23548         * m4/utimes.m4: s/conftestdata/conftest.data/
23549         Inspired by Pavel Roskin's change in autoconf.
23550
23551 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23552
23553         * lib/config.charset: Update for FreeBSD 4.2.
23554
23555 2001-01-27  Jim Meyering  <meyering@lucent.com>
23556
23557         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23558         a use of AS_IF.
23559         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23560
23561 2001-01-26  Jim Meyering  <meyering@lucent.com>
23562
23563         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23564         quotearg.c includes it.
23565
23566 2001-01-26  Jim Meyering  <meyering@lucent.com>
23567
23568         * lib/quotearg.c: Include stddef.h.
23569         * lib/quote.c: Include stddef.h.
23570         Reported by Axel Kittenberger.
23571
23572         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23573         line in double quotes so that it evokes a better diagnostic.
23574         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23575         Reported by Axel Kittenberger.
23576
23577 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23578
23579         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23580         as if it was a `charset'.
23581
23582 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23583
23584         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23585         has const.
23586
23587 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23588
23589         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23590         to avoid a warning.  Add back 'const' to inptr.
23591
23592 2001-01-20  Jim Meyering  <meyering@lucent.com>
23593
23594         Be sure that headers are checked before used in code compiled
23595         for the type checks.
23596         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23597         In place of that, invoke jm_CHECK_ALL_TYPES.
23598         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23599         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23600         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23601         The check for ssize_t was mistakenly run before the test for unistd.h.
23602
23603         The configure-time check for stdbool.h was missing.
23604         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23605         (jm_PREREQ_HASH): New function.
23606
23607 2001-01-17  Jim Meyering  <meyering@lucent.com>
23608
23609         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23610         for autoconf-2.49c.
23611         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23612
23613 2001-01-16  Jim Meyering  <meyering@lucent.com>
23614
23615         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23616         From Bruno Haible.
23617
23618 2001-01-14  Jim Meyering  <meyering@lucent.com>
23619
23620         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23621         foo and bar.  Create conftestdir/ in the script, not in the C code.
23622         Remove directories in the script, not in the C code.
23623         Remove conftestdir{,2} before trying to create the directory.
23624         Make the entire configure script fail if the mkdir fails.
23625
23626 2001-01-14  Jim Meyering  <meyering@lucent.com>
23627
23628         * lib/rename.c: New file.  From Volker Borchert.
23629         Include stdlib.h, string.h or strings.h, and xalloc.h.
23630         Use strip_trailing_slashes rather than open-coding it.
23631
23632 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23633
23634         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23635
23636 2001-01-03  Jim Meyering  <meyering@lucent.com>
23637
23638         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23639         of local `inptr' to avoid warning with some system declarations of
23640         iconv.
23641
23642 2001-01-02  Volker Borchert  <bt@teknon.de>
23643
23644         * m4/rename.m4: New file.
23645         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23646
23647 2001-01-01  Jim Meyering  <meyering@lucent.com>
23648
23649         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23650         even on systems with utmpx.h.  It's necessary for the declaration of
23651         utmp's ut_user member.  Reported by Andreas Jaeger.
23652
23653         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23654         available. They are required for the declarations of getgrgid and
23655         getpwuid resp.
23656         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23657         Reported by Andreas Jaeger.
23658
23659 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23660
23661         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23662         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23663         so `make install' also works in VPATH builds.
23664
23665 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23666
23667         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23668         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23669         can be used in subdirectories.
23670
23671 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23672
23673         * lib/modechange.c: Do not assume that mode_t uses the
23674         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23675         the other-execute bit of FOO even if S_IXOTH != 1.
23676
23677         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23678         WOTH, XOTH, ALLM): New macros.
23679         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23680          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23681         Use them.
23682         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23683         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23684         (mode_compile):
23685         No need to use uintmax_t; unsigned long is long enough.
23686         Don't bother to get suffix since we don't use it.
23687
23688 2000-12-26  Jim Meyering  <meyering@lucent.com>
23689
23690         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23691         better with autoheader.
23692
23693 2000-12-24  Jim Meyering  <meyering@lucent.com>
23694
23695         * lib/hash.c (is_prime): Return explicit boolean values.
23696         (hash_get_first): Return NULL to appease Irix5.6's 89.
23697         Reported by Nelson Beebe.
23698
23699 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23700
23701         * lib/localcharset.c (locale_charset): Add support for Win32.
23702
23703 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23704
23705         * lib/physmem.h, lib/physmem.c: New files.
23706
23707         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23708         (noinst_HEADERS): Add physmem.h.
23709
23710         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23711         't' for compatibility with Solaris 8 sort.
23712
23713 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23714
23715         * lib/config.charset: Add support for BeOS.
23716
23717 2000-12-17  Jim Meyering  <meyering@lucent.com>
23718
23719         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23720         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23721
23722 2000-12-16  Jim Meyering  <meyering@lucent.com>
23723
23724         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23725         N and M) would have treated it like `chown N:N FILE'.
23726
23727         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23728
23729 2000-12-16  Jim Meyering  <meyering@lucent.com>
23730
23731         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23732         SHELLS_FILE to a file name that's useful on djgpp systems.
23733         Include stdlib.h.
23734         (ADDITIONAL_DEFAULT_SHELLS): Define.
23735         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23736         Based mostly on a patch from Prashant TR.
23737
23738 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23739
23740         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23741         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23742         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23743
23744 2000-12-08  Andreas Schwab  <schwab@suse.de>
23745
23746         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23747         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23748
23749 2000-12-07  Jim Meyering  <meyering@lucent.com>
23750
23751         * lib/stripslash.c (ISSLASH): Define.
23752         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23753         `/'.
23754         From Prashant TR.
23755
23756         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23757         (dir_name_r): Declare this function as static.
23758         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23759         manifest itself on a name containing a mix of slashes and
23760         backslashes.
23761         Make this function work with names starting with a DOS-style
23762         drive letter and colon prefix.
23763         (dir_name): Append `.' if necessary.
23764         Based mostly on patches from Prashant TR and Eli Zaretskii.
23765
23766         * lib/dirname.h (dir_name_r): Remove prototype.
23767
23768 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23769
23770         * m4/off_t-format.m4: Remove this file.
23771         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23772
23773 2000-12-06  Jim Meyering  <meyering@lucent.com>
23774
23775         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23776         replacement strtoull, we may well need the replacement strtoul, too.
23777         Check for declarations of strtoul and strtoull.
23778         Check for strtol.  Mainly as a cue to cause automake to include
23779         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23780         Check for limits.h -- strtol.c needs it.
23781
23782 2000-12-05  Jim Meyering  <meyering@lucent.com>
23783
23784         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23785
23786 2000-12-04  Jim Meyering  <meyering@lucent.com>
23787
23788         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23789         Also include memory.h, stdlib.h, unistd.h if appropriate.
23790         Reported by Andreas Jaeger (conflicting declaration of malloc).
23791
23792 2000-12-02  Jim Meyering  <meyering@lucent.com>
23793
23794         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23795         * m4/jm-macros.m4 (jm_MACROS): require it.
23796
23797 2000-12-02  Jim Meyering  <meyering@lucent.com>
23798
23799         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23800
23801 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23802
23803         * lib/memrchr.c: Include <config.h> before any system include file.
23804
23805 2000-11-30  Jim Meyering  <meyering@lucent.com>
23806
23807         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23808
23809 2000-11-30  Jim Meyering  <meyering@lucent.com>
23810
23811         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23812
23813 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23814
23815         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23816
23817 2000-11-26  Jim Meyering  <meyering@lucent.com>
23818
23819         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23820
23821 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23822
23823         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23824         size of (size_t) -1; it's not portable.
23825
23826 2000-11-17  Jim Meyering  <meyering@lucent.com>
23827
23828         * lib/strstr.c: Update from GNU libc.
23829
23830 2000-11-17  Akim Demaille  <akim@epita.fr>
23831
23832         * lib/obstack.h: Formatting changes.
23833         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23834         prevent type checking.
23835         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23836         cast the value to (void *): assigning a `foo *' to a `void *'
23837         variable is valid.
23838         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23839
23840 2000-11-16  Jim Meyering  <meyering@lucent.com>
23841
23842         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23843
23844 2000-11-11  Jim Meyering  <meyering@lucent.com>
23845
23846         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23847
23848 2000-11-10  Jim Meyering  <meyering@lucent.com>
23849
23850         * lib/obstack.h: Update from GNU libc.
23851         * lib/obstack.c: Likewise.
23852
23853 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23854
23855         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23856
23857 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23858
23859         * lib/getusershell.c (setusershell): Use rewind rather than
23860         fseek/fseeko, to avoid configuration hassles with fseeko.
23861         Don't bother opening SHELLS_FILE if shellstream is NULL;
23862         it's not necessary.
23863
23864 2000-11-05  Jim Meyering  <meyering@lucent.com>
23865
23866         * lib/makepath.h (make_dir): Declare.
23867         * lib/makepath.c (make_dir): Remove `static' attribute.
23868         Tweak a comment.
23869
23870 2000-11-04  Jim Meyering  <meyering@lucent.com>
23871
23872         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23873
23874 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23875
23876         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23877         last one in a bucket, advance to the next bucket.
23878
23879 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23880
23881         * lib/fnmatch.c: Do not comment out all the code if we are using
23882         the GNU C library, because in some cases we are replacing buggy
23883         code in the GNU C library itself.
23884
23885 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23886
23887         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23888         (regex_compile): Catch bogus \(\1\).
23889
23890 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23891
23892         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23893         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23894         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23895
23896 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23897
23898         * lib/error.h, getline.h, modechange.h:
23899         Remove "2000" from Copyright line, as the file hasn't been
23900         changed this year other than in the copyright notice.
23901
23902         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23903         was changed this year.
23904
23905 2000-10-29  Jim Meyering  <meyering@lucent.com>
23906
23907         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23908         renaming.
23909         * m4/ls-mntd-fs.m4: Likewise
23910
23911 2000-10-29  Jim Meyering  <meyering@lucent.com>
23912
23913         * lib/xstat.in: Fix grammar in comment.
23914
23915 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23916
23917         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23918         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23919         doesn't define __restrict_arr.
23920
23921 2000-10-28  Jim Meyering  <meyering@lucent.com>
23922
23923         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23924         (jm_PREREQ_MEMCHR): New function.
23925
23926 2000-10-28  Jim Meyering  <meyering@lucent.com>
23927
23928         * lib/memchr.c: Update from libc.
23929         Adjust for portability:
23930         [HAVE_STDLIB_H]: Include stdlib.h.
23931         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23932         Undef __memchr, too.
23933         [!weak_alias]: Define __memchr to memchr.
23934
23935         * lib/regex.c: Update from libc.
23936         * lib/regex.h: Likewise.
23937         * lib/getopt1.c: Likewise.
23938         * lib/memcmp.c: Likewise.
23939
23940         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23941         Avoid using fseek, when possible -- it's broken by design.
23942         Patch by Ulrich Drepper.
23943
23944 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23945
23946         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23947         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23948         Giving in to popular pressure to shut up the compiler with casts.
23949
23950 2000-10-26  Jim Meyering  <meyering@lucent.com>
23951
23952         * lib/strftime.c: Update from libc.
23953
23954 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23955
23956         * regex.c: More `unsigned char' -> `re_char' changes.
23957         Also change several `int' into `re_wchar_t'.
23958         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23959         (PUSH_FAILURE_POINTER): Don't cast any more.
23960         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23961         We want GCC to complain, since this piece of code makes
23962         re_match non-reentrant, which *should* be fixed.
23963         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23964         (EXTEND_BUFFER): Use RETALLOC.
23965         (SET_LIST_BIT): Don't cast.
23966         (re_wchar_t): New type.
23967         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23968         that those two functions will always properly return.
23969         (IMMEDIATE_QUIT_CHECK): Cast to void.
23970         (analyse_first): Use recursion rather than an explicit stack.
23971         (re_compile_fastmap): Can't fail anymore.
23972         (re_search_2): Don't check re_compile_fastmap for failure.
23973         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
23974         Now also sets the new value (passed in a new argument).
23975         (re_match_2_internal): Use it.
23976         Also, use a new var `reg' of type size_t when looping through regs
23977         rather than reuse the inappropriate `mcnt'.
23978
23979 2000-10-25  Jim Meyering  <meyering@lucent.com>
23980
23981         * lib/obstack.c: Update from libc.
23982
23983 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
23984
23985         * regex.c (regex_compile): Change the way of handling a range from
23986         a char less than 256 to a char not less than 256.
23987
23988 2000-10-24  Andrew Innes  <andrewi@gnu.org>
23989
23990         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
23991         NT-Emacs only.
23992         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
23993         so that re_search functions only quit when callers expect them to.
23994
23995 2000-10-23  Jim Meyering  <meyering@lucent.com>
23996
23997         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
23998         wrong.  That set_locale call must not have any side effects.
23999         From Paul Eggert.
24000
24001 2000-10-22  Jim Meyering  <meyering@lucent.com>
24002
24003         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24004         [CYCLIC]: Remove now-unused definition.
24005
24006         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24007         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24008         Suggestion from Ulrich Drepper.
24009
24010 2000-10-21  Jim Meyering  <meyering@lucent.com>
24011
24012         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24013         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24014         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24015
24016 2000-10-21  Jim Meyering  <meyering@lucent.com>
24017
24018         * lib/dirname.c (memrchr): Declare if necessary.
24019         (dir_name): Remove the restriction that there be no
24020         trailing slashes.  Now, this code skips past them, effectively
24021         ignoring them.
24022         [TEST_DIRNAME] (main): New unit tests.
24023
24024         * lib/memrchr.c: New file from GNU libc.
24025         Undef __memrchr, too.
24026         [!weak_alias]: Define __memrchr to memrchr.
24027         Guard weak_alias use with `#ifdef weak_alias'.
24028
24029 2000-10-21  Jim Meyering  <meyering@lucent.com>
24030
24031         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24032         (dir_name): Use dir_name_r.
24033         * lib/dirname.h (dir_name_r): Declare it.
24034
24035 2000-10-17  Jim Meyering  <meyering@lucent.com>
24036
24037         * lib/quote.h (PARAMS): Define and use.
24038         Reported by Akim Demaille.
24039
24040         * lib/getopt.c: Update from libc.
24041
24042 2000-10-16  Jim Meyering  <meyering@lucent.com>
24043
24044         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24045         setlocale.
24046         From Jan Fedak.
24047
24048 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24049
24050         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24051
24052 2000-09-25  Jim Meyering  <meyering@lucent.com>
24053
24054         * lib/md5.h (rol): Define (from GnuPG).
24055
24056         * lib/sha.c: Give credit (GnuPG) where due.
24057         (M): Use rol rather than open-coding it.
24058         Add a FIXME comment.
24059
24060 2000-09-21  Jim Meyering  <meyering@lucent.com>
24061
24062         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24063         Reported by Michael Stone.
24064
24065 2000-09-20  Jim Meyering  <meyering@lucent.com>
24066
24067         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24068         (noinst_HEADERS): Add sha.h.
24069         Based on code from Scott G. Miller and from GnuPG.
24070
24071 2000-09-18  Jim Meyering  <meyering@lucent.com>
24072
24073         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24074         LIBS. Otherwise, everyone ends up linking with -lelf for some
24075         configurations.
24076         Reported by Mike Stone.
24077
24078 2000-09-15  Jim Meyering  <meyering@lucent.com>
24079
24080         * lib/regex.c: Update from libc.
24081
24082 2000-09-10  Jim Meyering  <meyering@lucent.com>
24083
24084         * lib/getopt.c (_getopt_internal): Update from glibc.
24085
24086 2000-09-09  Jim Meyering  <meyering@lucent.com>
24087
24088         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24089         think it should be used as a general replacement for isascii.
24090         * lib/fnmatch.c: Likewise.
24091         * lib/mbswidth.c: Likewise
24092         * lib/regex.c: Likewise.
24093
24094         Don't use atoi.
24095         * lib/userspec.c: Include sys/param.h and limits.h.
24096         Include xstrtol.h.
24097         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24098         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24099         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24100         UID, GID.  Check range.
24101
24102 2000-09-06  Jim Meyering  <meyering@lucent.com>
24103
24104         * lib/getopt.c (_getopt_internal): Update from glibc.
24105
24106 2000-08-30  Jim Meyering  <meyering@lucent.com>
24107
24108         * lib/strftime.c: Merge in changes from GNU libc.
24109
24110 2000-08-26  Jim Meyering  <meyering@lucent.com>
24111
24112         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24113         * m4/fpending.m4: New file.
24114
24115 2000-08-26  Jim Meyering  <meyering@lucent.com>
24116
24117         * lib/closeout.c: Include "__fpending.h".
24118         (close_stdout_status): Return right away if there's nothing to flush.
24119
24120         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24121         * lib/__fpending.c: New file.
24122         * lib/__fpending.h: New file.
24123
24124 2000-08-20  Jim Meyering  <meyering@lucent.com>
24125
24126         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24127         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24128         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24129
24130 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24131
24132         Improve fileutils installation on systems where running
24133         programs (like install) can't be unlinked.
24134         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24135         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24136
24137 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24138
24139         Standardize on "memory exhausted" instead of "Memory exhausted"
24140         or "virtual memory exhausted".
24141         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24142         "virtual memory exhausted".
24143         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24144         our own message.
24145         * lib/userspec.c (parse_user_spec): Likewise.
24146         * lib/bumpalloc.h: comment fix
24147         * lib/same.c, userspec.c: Include xalloc.h.
24148
24149         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24150         not char *const and pointing to a constant array.
24151         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24152         (xrealloc): Comment fix.
24153
24154         * lib/userspec.c (parse_user_spec):
24155         Don't translate a message until just before returning,
24156         to avoid unnecessary translation.
24157
24158 2000-08-07  Jim Meyering  <meyering@lucent.com>
24159
24160         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24161         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24162         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24163         getgroups.c, gethostname.c, getopt.h, group-member.c,
24164         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24165         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24166         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24167         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24168         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24169         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24170         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24171         yesno.c: Back out Copyright date changes for each file with no change
24172         this year.  This eases coordination with other programs using the same
24173         source code modules.  From Paul Eggert.
24174
24175 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24176
24177         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24178         not char, for compatibility with glibc 2.1.3 strftime.c.
24179
24180 2000-08-03  Greg McGary  <greg@mcgary.org>
24181
24182         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24183         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24184         (EXTEND_BUFFER): Use them.
24185
24186 2000-08-01  Jim Meyering  <meyering@lucent.com>
24187
24188         * lib/dirname.c (ISSLASH): Define.
24189         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24190         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24191         both `\' and `/' may be use as path separators.
24192         Based on a patch from Prashant TR.
24193
24194 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24195
24196         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24197         slot vector a constant, since it might get modified.
24198
24199 2000-07-31  Jim Meyering  <meyering@lucent.com>
24200
24201         * lib/xmalloc.c: Use `virtual memory exhausted', not
24202         `Memory exhausted'.
24203         * lib/obstack.c (print_and_abort): Likewise.
24204
24205 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24206
24207         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24208         buffer, so that the caller can always quote one small
24209         component of a "memory exhausted" message in slot 0.
24210         From a suggestion by Jim Meyering.
24211
24212 2000-07-30  Jim Meyering  <meyering@lucent.com>
24213
24214         * lib/makepath.c (make_path): Quote the other instance, too.
24215
24216         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24217         (STATIC_BUF_SIZE): Define.
24218         (quotearg_n_options): Use only statically allocated storage when
24219         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24220         than STATIC_BUF_SIZE.
24221
24222 2000-07-29  Jim Meyering  <meyering@lucent.com>
24223
24224         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24225         * lib/dirname.c (dir_name): Likewise.
24226
24227         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24228         `/'.
24229
24230         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24231         (dir_name): Assert that there are no trailing slashes.
24232
24233 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24234
24235         * lib/mbswidth.h (mbswidth): Add a flags argument.
24236         (mbswidth): New declaration.
24237         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24238         * lib/mbswidth.c (mbswidth): Add a flags argument.
24239         (mbsnwidth): New function.
24240
24241 2000-07-24  Jim Meyering  <meyering@lucent.com>
24242
24243         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24244
24245 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24246
24247         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24248
24249 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24250
24251         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24252         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24253         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24254         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24255         invoke multibyte primitives.
24256
24257 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24258
24259         * lib/quotearg.c:
24260         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24261         so that mbstate_t is always defined.
24262
24263         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24264         be 1 in at least one GCC installation, and this configuration
24265         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24266         performance on hosts that have mbrtowc but have only unibyte
24267         locales, but I assume these hosts are rare.
24268
24269 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24270
24271         * lib/mbswidth.c (_XOPEN_SOURCE):
24272         Don't define; this causes problems on Solaris 7.
24273         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24274
24275 2000-07-23  Jim Meyering  <meyering@lucent.com>
24276
24277         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24278         too: getgrgid, getpwuid, getuid.
24279
24280 2000-07-23  Jim Meyering  <meyering@lucent.com>
24281
24282         * lib/basename.c (base_name): Add an assertion.
24283
24284 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24285
24286         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24287         shadow its mbsinit function.
24288
24289 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24290
24291         * lib/mbswidth.h: New file.
24292         * lib/mbswidth.c: New file.
24293         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24294         (noinst_HEADERS): Add mbswidth.h.
24295
24296 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24297
24298         * lib/config.charset: Add support for FreeBSD. Improve support for
24299         HP-UX and IRIX 6.
24300
24301 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24302
24303         * m4/mbswidth.m4: New file.
24304         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24305
24306 2000-07-15  Jim Meyering  <meyering@lucent.com>
24307
24308         * lib/makepath.c: Include quote.h.
24309         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24310         corresponding argument in a `quote (...)' call.
24311         Give better diagnostics.
24312
24313         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24314         (noinst_HEADERS): Add quote.h.
24315
24316         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24317         from tar's src/misc.c.
24318         * lib/quote.h: New file.  Prototypes for same.
24319
24320 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24321
24322         From a suggestion by Bruno Haible.
24323         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24324         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24325         to decide whether to define the BeOS workaround macro;
24326         this adjusts to the change to AC_MBSTATE_T.
24327
24328 2000-07-14  Jim Meyering  <meyering@lucent.com>
24329
24330         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24331         jm_AC_TYPE_UINTMAX_T.
24332
24333 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24334
24335         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24336
24337         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24338         quotearg_buffer_restyled): Add support for
24339         clocale_quoting_style.  Undo previous change to
24340         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24341         and "{RIGHT QUOTATION MARK}" msgids.
24342
24343 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24344
24345         From a suggestion by Bruno Haible.
24346         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24347         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24348         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24349         and mbstate_t, to a single-part test that simply defines mbstate_t.
24350         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24351         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24352
24353 2000-07-10  Jim Meyering  <meyering@lucent.com>
24354
24355         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24356
24357         * m4/gnu-source.m4: Output to confdefs.h directly.
24358         Suggestion from Akim Demaille.
24359
24360 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24361
24362         The old behavior of quoting `like this' doesn't look good with
24363         newer, ISO-style fonts.  See:
24364         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24365
24366         Instead, quote "like this" by default.  Let the translator
24367         tailor the locale-specific quoting behavior by providing
24368         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24369
24370         * lib/quotearg.c (N_): New macro.
24371         (gettext_default): New function.
24372         (quotearg_buffer_restyled): Use
24373         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24374         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24375
24376 2000-07-09  Jim Meyering  <meyering@lucent.com>
24377
24378         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24379         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24380
24381         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24382         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24383
24384 2000-07-09  Jim Meyering  <meyering@lucent.com>
24385
24386         * lib/Most files: Update copyright dates to include 2000.
24387
24388 2000-07-08  Jim Meyering  <meyering@lucent.com>
24389
24390         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24391         if not defined.
24392         (xgethostname): Remove now-unnecessary #ifdef.
24393         Move declaration of `err' into loop where it's used.
24394
24395 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24396         and Bruno Haible  <haible@clisp.cons.org>
24397
24398         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24399         only if the test for an object-type mbstate_t fails.  This
24400         prevents us from mistakenly reporting that mbstate_t is a
24401         system object type after we "#define mbstate_t int" to work
24402         around its lack.
24403
24404 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24405         and Bruno Haible  <haible@clisp.cons.org>
24406
24407         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24408
24409 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24410
24411         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24412         to strerror_r.
24413         Include <ctype.h> for use of isalpha.
24414
24415 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24416
24417         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24418         by allocating a larger buffer. Test the gethostname return value for
24419         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24420         returns an error and ENAMETOOLONG isn't defined.
24421
24422 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24423
24424         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24425         dimension.
24426
24427 2000-07-04  Jim Meyering  <meyering@lucent.com>
24428
24429         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24430         of the deprecated AC_CHECKING.
24431
24432 2000-07-04  Jim Meyering  <meyering@lucent.com>
24433
24434         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24435         Reported by Bruno Haible.
24436
24437 2000-07-04  Jim Meyering  <meyering@lucent.com>
24438
24439         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24440         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24441         lacks mbrtowc.
24442
24443 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24444
24445         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24446         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24447
24448 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24449         and Bruno Haible  <haible@clisp.cons.org>
24450
24451         * lib/quotearg.c (mbrtowc):
24452         Assign to *pwc, and return 1 only if result is nonzero.
24453         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24454
24455 2000-07-03  Jim Meyering  <meyering@lucent.com>
24456
24457         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24458
24459 2000-07-03  Jim Meyering  <meyering@lucent.com>
24460
24461         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24462         This is necessary to get a definition of e.g., UTMP_FILE on
24463         HP-UX 10.20.
24464         From Bob Proulx.
24465
24466 2000-07-02  Jim Meyering  <meyering@lucent.com>
24467
24468         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24469
24470         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24471         AC_LIBOBJ(function_name).
24472         * m4/chown.m4: Likewise.
24473         * m4/fnmatch.m4: Likewise.
24474         * m4/ftruncate.m4: Likewise.
24475         * m4/getgroups.m4: Likewise.
24476         * m4/getline.m4: Likewise.
24477         * m4/group-member.m4: Likewise.
24478         * m4/jm-macros.m4: Likewise.
24479         * m4/lstat.m4: Likewise.
24480         * m4/malloc.m4: Likewise.
24481         * m4/memcmp.m4: Likewise.
24482         * m4/nanosleep.m4: Likewise.
24483         * m4/putenv.m4: Likewise.
24484         * m4/realloc.m4: Likewise.
24485         * m4/regex.m4: Likewise.
24486         * m4/stat.m4: Likewise.
24487         * m4/strftime.m4: Likewise.
24488
24489 2000-07-02  Jim Meyering  <meyering@lucent.com>
24490
24491         * lib/quotearg.c (mbstate_t): Don't define here.
24492
24493 2000-07-02  Jim Meyering  <meyering@lucent.com>
24494
24495         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24496
24497 2000-07-01  Jim Meyering  <meyering@lucent.com>
24498
24499         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24500
24501 2000-07-01  Jim Meyering  <meyering@lucent.com>
24502
24503         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24504         problem.
24505
24506 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24507
24508         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24509         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24510
24511 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24512
24513         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24514         per change in ../m4/ls-mntd-fs.m4.
24515         (read_filesystem_list): Ignore symbolic links.
24516
24517 2000-06-29  Jim Meyering  <meyering@lucent.com>
24518
24519         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24520         for declaration of strcmp.
24521
24522         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24523
24524         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24525         Avoid warning by casting result to `char *' to remove `const'.
24526
24527 2000-06-28  Jim Meyering  <meyering@lucent.com>
24528
24529         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24530         included by quotearg.c, for which we perform this test.  From
24531         Bruno Haible.
24532
24533 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24534
24535         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24536         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24537         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24538
24539 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24540
24541         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24542
24543 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24544
24545         savedir now sets errno on failure and invokes xmalloc to get memory.
24546         Fix a couple of other minor bugs while we're at it.
24547
24548         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24549         (NAMLEN): Remove macro.
24550         (malloc, realloc): Remove decls.
24551         (stpcpy): Likewise.
24552         ("xalloc.h"): Include.
24553         (NAME_SIZE_DEFAULT): New macro.
24554         (savedir): Use xmalloc / xrealloc to allocate memory.
24555         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24556         Skip "" directory entries.
24557         Use strlen to calculate directory entry length, since the old method
24558         is rarely used these days and isn't worth supporting.
24559         Don't use a pointer after freeing it.
24560         Check for integer overflow when calculating allocation size.
24561         Use memcpy to copy entries, instead of stpcpy.
24562         Set errno properly when returning NULL.
24563         Check for readdir error.
24564
24565 2000-06-26  Jim Meyering  <meyering@lucent.com>
24566
24567         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24568
24569 2000-06-25  Jim Meyering  <meyering@lucent.com>
24570
24571         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24572         Linux header bug when _XOPEN_SOURCE is defined to 500.
24573
24574 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24575
24576         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24577         deficiency.
24578
24579 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24580
24581         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24582         Include xalloc.h.
24583         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24584
24585 2000-06-24  Jim Meyering  <meyering@lucent.com>
24586
24587         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24588         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24589         for which strerror does return char*, but which lacks a conveniently
24590         accessible declaration of the function.  If the compile-test says
24591         strerror_r doesn't work, then resort to a `run'-test that works on
24592         BeOS and segfaults on DEC Unix.
24593
24594 2000-06-24  Jim Meyering  <meyering@lucent.com>
24595
24596         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24597
24598 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24599
24600         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24601         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24602
24603 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24604
24605         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24606         (mbrtowc, mbstate_t): Define substitutes if
24607         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24608         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24609         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24610
24611 2000-06-23  Jim Meyering  <meyering@lucent.com>
24612
24613         * m4/afs.m4: Add missing AC_MSG_RESULT.
24614         Reported by Bruno Haible.
24615
24616         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24617         Suggestion from Bruno Haible.
24618
24619 2000-06-23  Jim Meyering  <meyering@lucent.com>
24620
24621         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24622
24623 2000-06-21  Jim Meyering  <meyering@lucent.com>
24624
24625         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24626
24627 2000-06-21  Jim Meyering  <meyering@lucent.com>
24628
24629         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24630         (noinst_HEADERS): Add getstr.h.
24631
24632         * lib/getline.c (getstr): Move into a separate file.
24633         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24634         the following changes: new parameter, delim2; both delim[12]
24635         parameters have type `int', not `char'.  The latter would lose
24636         with 8-bit delimiters.
24637         * lib/getstr.h: New file.
24638
24639 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24640
24641         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24642         than 1024, return a memory chunk of least possible size, instead
24643         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24644         Use free/xmalloc instead of xrealloc to avoid copying for very long
24645         paths.
24646
24647 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24648
24649         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24650         the empty string.
24651
24652 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24653
24654         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24655         address, not strdup.  Include <stdlib.h> and don't declare free().
24656
24657 2000-06-19  Jim Meyering  <meyering@lucent.com>
24658
24659         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24660
24661 2000-06-18  Jim Meyering  <meyering@lucent.com>
24662
24663         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24664
24665         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24666         `checking whether...' message to be consistent with that of the
24667         lstat test.
24668
24669 2000-06-18  Jim Meyering  <meyering@lucent.com>
24670
24671         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24672         Besides, these days every porting target provides a mkdir function.
24673
24674         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24675         needed. (this snippet comes from src/system.h).
24676
24677 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24678
24679         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24680
24681 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24682
24683         * lib/human.c (adjust_value): New function.
24684         (human_readable_inexact): Apply rounding style even when
24685         printing approximate values.
24686
24687 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24688
24689         * lib/human.c (human_readable_inexact): Allow an input block
24690         size that is not a multiple of the output block size, and vice versa.
24691         Reported by Piergiorgio Sartor.
24692
24693 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24694
24695         * lib/getdate.y (get_date): Apply relative times after time
24696         zone indicator, not before.  Reported by Todd A. Jacobs.
24697
24698 2000-06-13  Jim Meyering  <meyering@lucent.com>
24699
24700         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24701
24702         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24703
24704 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24705
24706         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24707
24708 2000-06-12  Jim Meyering  <meyering@lucent.com>
24709
24710         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24711         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24712         optional argument.
24713         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24714         the optional argument, `lib'.
24715
24716 2000-06-08  Jim Meyering  <meyering@lucent.com>
24717
24718         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24719
24720 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24721
24722         Rewrite largefile configuration so that we don't need to run
24723         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24724         AC_CANONICAL_HOST in configure.in -- jmm]
24725
24726         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24727         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24728         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24729         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24730         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24731         All uses changed.
24732         Instead of inspecting the output of getconf, try to compile the
24733         test program without and with the macro definition.
24734         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24735         for getconf.  Instead, check for the needed flags by compiling
24736         test programs.
24737
24738 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24739
24740         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24741
24742 2000-06-04  Jim Meyering  <meyering@lucent.com>
24743
24744         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24745         SunOS 4.1.4 for which gid_t is an unsigned type.
24746
24747 2000-06-03  Jim Meyering  <meyering@lucent.com>
24748
24749         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24750         now that autoconf requires that.
24751
24752         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24753         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24754         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24755
24756 2000-06-03  Jim Meyering  <meyering@lucent.com>
24757
24758         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24759
24760 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24761
24762         * m4/glibc21.m4: New file.
24763         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24764
24765 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24766
24767         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24768         newer, don't install charset.alias.
24769         * lib/config.charset: Change the Linux/glibc rules so they become empty
24770         on glibc-2.1 or newer.
24771
24772 2000-06-02  Jim Meyering  <meyering@lucent.com>
24773
24774         * lib/mountlist.c: Back out last change.  Instead, do this...
24775         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24776         me_dummy member using the same `ignore'-testing code.
24777         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24778         fs_type strings.
24779         From Mark D. Roth.
24780
24781 2000-05-29  Jim Meyering  <meyering@lucent.com>
24782
24783         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24784         mounts with the `ignore' attribute.  Based on a patch from
24785         Mark D. Roth.
24786
24787 2000-05-28  Jim Meyering  <meyering@lucent.com>
24788
24789         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24790         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24791         * m4/stat.m4: Likewise.
24792         * m4/lstat.m4: Likewise.
24793         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24794
24795         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24796         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24797
24798 2000-05-26  Jim Meyering  <meyering@lucent.com>
24799
24800         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24801
24802 2000-05-24  Jim Meyering  <meyering@lucent.com>
24803
24804         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24805         autoconf requires that.
24806         * m4/lib-check.m4: Likewise.
24807         * m4/jm-macros.m4: Likewise.
24808         * m4/strftime.m4: Likewise.
24809
24810         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24811         AC_CHECK_DECLS, now that autoconf requires that.
24812
24813 2000-05-22  Jim Meyering  <meyering@lucent.com>
24814
24815         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24816         * m4/lstat.m4: Likewise.
24817
24818 2000-05-22  Jim Meyering  <meyering@lucent.com>
24819
24820         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24821
24822 2000-05-20  Jim Meyering  <meyering@lucent.com>
24823
24824         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24825         (jm_PREREQ): Use it.
24826
24827 2000-05-18  Jim Meyering  <meyering@lucent.com>
24828
24829         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24830         back, too, since it may have been modified by allocate_entry.
24831         (hash_delete): Rewrite to use neither the assignment operator
24832         nor the comma operator in an if-expression.
24833
24834 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24835
24836         * lib/closeout.c:
24837         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24838         Remove; no longer needed.
24839         "quotearg.h": Add include.
24840         (file_name): Do not bother to explicitly initialize to NULL; it's less
24841         efficient on some hosts.
24842         (close_stdout_status): Remove test as to whether stdout was already
24843         closed; it breaks for the case "echo x | sort >&-".
24844         Quote file name colons.
24845         Do not assume that _("write error") lacks format strings.
24846
24847 2000-05-15  Jim Meyering  <meyering@lucent.com>
24848
24849         * lib/version-etc.c (version_etc_copyright): Update the copyright
24850         string used in all --version output.
24851
24852 2000-05-14  Jim Meyering  <meyering@lucent.com>
24853
24854         * lib/closeout.c (close_stdout_set_file_name): New function.
24855         (close_stdout_status): Use new file-scoped global.
24856         Return right away if fstat says the stdout file descriptor is invalid.
24857         * lib/closeout.h (close_stdout_set_file_name): Declare.
24858
24859 2000-05-10  Jim Meyering  <meyering@lucent.com>
24860
24861         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24862         (close_stdout_set_status): New function.
24863         * lib/closeout.h (close_stdout_set_status): Declare.
24864
24865 2000-05-09  Jim Meyering  <meyering@lucent.com>
24866
24867         * m4/gettext.m4: Rename this...
24868         * m4/libintl.m4: ...to this.
24869
24870 2000-05-08  Jim Meyering  <meyering@lucent.com>
24871
24872         * lib/long-options.c: Don't include closeout.h.
24873         (parse_long_options): Don't call close_stdout for --version.
24874
24875 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24876
24877         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24878         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24879         2.1.3 bug.  This avoids a clash when files like regex.c define
24880         _GNU_SOURCE.
24881
24882 2000-05-06  Jim Meyering  <meyering@lucent.com>
24883
24884         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24885         (AC_REPLACE_FUNCS): Add strnlen.
24886
24887         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24888         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24889
24890         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24891         AC_SEARCH_LIBS call for nanosleep.
24892         (LIB_NANOSLEEP): Set and AC_SUBST.
24893
24894 2000-05-06  Jim Meyering  <meyering@lucent.com>
24895
24896         * lib/strnlen.c: Undefine __strnlen and strnlen.
24897         [!weak_alias]: Define __strnlen to strnlen.
24898
24899         * lib/atexit.c: New file, from libiberty.
24900
24901 2000-05-06  Jim Meyering  <meyering@lucent.com>
24902
24903         * lib/closeout.c (close_stdout_status): Also check for errors on the
24904         stderr stream.
24905
24906 2000-05-05  Jim Meyering  <meyering@lucent.com>
24907
24908         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24909         AC_SEARCH_LIBS call for clock_gettime.
24910         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24911
24912         * m4/search-libs.m4: Update from autoconf.
24913
24914         su doesn't work on Solaris 2.6.
24915         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24916         <shadow.h>.  Reported by Dragos Harabor.
24917
24918 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24919
24920         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24921         memcpy instead of xmalloc, xrealloc, path_concat.
24922         (locale_charset): Treat empty environment variables as absent.
24923         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24924
24925 2000-05-04  Jim Meyering  <meyering@lucent.com>
24926
24927         * lib/getopt.c: Update from glibc.
24928         * lib/obstack.c: Likewise.
24929         * lib/obstack.h: Likewise.
24930         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24931         file
24932
24933         * lib/regex.h: Likewise.
24934         * lib/strndup.c: Likewise.
24935         * lib/strnlen.c: New file, from glibc.
24936
24937 2000-05-03  Jim Meyering  <meyering@lucent.com>
24938
24939         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24940
24941 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24942
24943         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24944         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24945         compile-time test, rather than inspecting host and OS, to
24946         decide whether to define _LARGEFILE_SOURCE.
24947
24948 2000-05-01  Jim Meyering  <meyering@lucent.com>
24949
24950         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24951
24952         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24953         Based on a patch from Bruno Haible.
24954
24955 2000-05-01  Jim Meyering  <meyering@lucent.com>
24956
24957         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24958
24959 2000-04-29  Jim Meyering  <meyering@lucent.com>
24960
24961         * lib/path-concat.c: Declare strdup only if it's not defined.
24962         * lib/canon-host.c: Likewise.
24963
24964 2000-04-28  Jim Meyering  <meyering@lucent.com>
24965
24966         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24967         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24968         is included first, then limits.h is included by locale.h by libintl.h.
24969         From John David Anglin.
24970
24971 2000-04-25  Jim Meyering  <meyering@lucent.com>
24972
24973         * lib/makepath.c (S_IRWXUGO): Define.
24974         (make_path): Always perform explicit chmod if MODE specifies any
24975         of the `special' permission bits.  Prompted by a bug report against
24976         install from Mate Wierdl and Joost van Baal.
24977
24978 2000-04-18  Jim Meyering  <meyering@lucent.com>
24979
24980         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
24981         (jm_PREREQ): Use it.
24982
24983 2000-04-18  Jim Meyering  <meyering@lucent.com>
24984
24985         * lib/README: New file.
24986
24987         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
24988         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
24989
24990 2000-04-17  Jim Meyering  <meyering@lucent.com>
24991
24992         Get it right :-)
24993         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
24994         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
24995         Suggestion from Akim Demaille.
24996
24997 2000-04-17  Jim Meyering  <meyering@lucent.com>
24998
24999         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25000         the definition of it to rpl_strftime also defined-away the system's
25001         declaration.
25002
25003 2000-04-15  Jim Meyering  <meyering@lucent.com>
25004
25005         Use `C' to denote so-called `contiguous' files, the same way
25006         that tar does.
25007         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25008         (ftypelet): Use S_ISCTG.
25009         From Michael Deutschmann.
25010
25011 2000-04-14  Jim Meyering  <meyering@lucent.com>
25012
25013         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25014         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25015         clobbered.
25016
25017 2000-04-14  Jim Meyering  <meyering@lucent.com>
25018
25019         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25020
25021 2000-04-13  Jim Meyering  <meyering@lucent.com>
25022
25023         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25024         AH_VERBATIM to insert required #ifndef into config.h.in.
25025         Suggestion from Akim Demaille.
25026
25027 2000-04-12  Jim Meyering  <meyering@lucent.com>
25028
25029         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25030         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25031         Christian Krackowizer.
25032
25033         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25034         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25035         (AC_SYS_LARGEFILE): Require.
25036         (AM_C_PROTOTYPES): Require.
25037
25038 2000-04-08  Jim Meyering  <meyering@lucent.com>
25039
25040         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25041         names don't conflict.  Reported by Eli Zaretskii.
25042
25043 2000-04-07  Jim Meyering  <meyering@lucent.com>
25044
25045         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25046         sys/types.h, to work around system header problems on AIX 3.2.5.
25047         From Bruno Haible.
25048
25049 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25050
25051         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25052         bug.  Deal with the different error behavior of Irix iconv.
25053
25054 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25055
25056         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25057         IRIX if the installer said otherwise.
25058
25059 2000-04-05  Jim Meyering  <meyering@lucent.com>
25060
25061         Portability tweaks required for ultrix4.3.
25062         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25063         (jm_CHECK_DECLS): Add getutent to the list of functions.
25064         (_jm_DECL_HEADERS): Add utmpx.h.
25065         From John David Anglin.
25066
25067         * m4/strftime.m4: Back out the 2000-04-02 change.
25068         Instead of that change, simply undefine putenv in the test program.
25069
25070 2000-04-05  Jim Meyering  <meyering@lucent.com>
25071
25072         Portability tweaks required for ultrix4.3.
25073         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25074         getutent.
25075         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25076         * lib/canon-host.c: Declare strdup.
25077         * lib/path-concat.c: Likewise.
25078         From John David Anglin.
25079
25080 2000-04-04  Jim Meyering  <meyering@lucent.com>
25081
25082         Be more DOS 8.3-friendly.
25083         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25084         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25085         * lib/Makefile.am: Reflect renaming.
25086         Reported by Eli Zaretskii.
25087
25088         Use a temporary file name that won't clash with `charset.alias'
25089         in the DOS 8.3 name space.
25090         * lib/Makefile.am (charset_tmp): Define.
25091         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25092         (uninstall-local): Likewise.
25093         Reported by Eli Zaretskii.
25094
25095 2000-04-03  Jim Meyering  <meyering@lucent.com>
25096
25097         * m4/gettext.m4: Fix typo in comment.
25098
25099         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25100         textutils/configure.in).  Suggestion from Paul Eggert.
25101         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25102
25103 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25104
25105         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25106         variable in the shell rather than using putenv, which isn't
25107         portable.  This avoids the configure-time inter-test dependency
25108         on the potentially-renamed putenv function.
25109
25110 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25111
25112         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25113         before checking struct stat.st_blksize, so that
25114         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25115
25116 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25117
25118         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25119         since strftime.c uses HAVE_STRFTIME to decide whether to use
25120         the underlying strftime.
25121
25122 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25123
25124         * lib/time/strftime.c (my_strftime): Make sure we call the system
25125         strftime, not ourselves, when invoking the underlying strftime.
25126
25127 2000-03-24  Jim Meyering  <meyering@lucent.com>
25128
25129         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25130         (charset_alias): Define.
25131         (install-exec-local): Factor out common code.
25132         (uninstall-local): Split lines longer than 80.
25133         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25134         (SUFFIXES): Define.
25135         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25136         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25137
25138 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25139
25140         * lib/config.charset: Output a line containing "Packages using this
25141         file".
25142         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25143         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25144         ref-del.sed): New rules.
25145
25146 2000-03-17  Jim Meyering  <meyering@lucent.com>
25147
25148         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25149         Otherwise, include <strings.h>
25150
25151 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25152
25153         * lib/unicodeio.c (utf8_wctomb): New function.
25154         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25155         format instead of in UCS-4 with platform dependent endianness.
25156
25157 2000-03-10  Jim Meyering  <meyering@lucent.com>
25158
25159         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25160         From Marco Franzen.
25161
25162 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25163
25164         * lib/savedir.c (savedir): Work even if directory size is
25165         negative; this can happen with some screwy NFS configurations.
25166
25167 2000-03-06  Jim Meyering  <meyering@lucent.com>
25168
25169         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25170         if it's NULL (because we ran out of memory).  From Bruno Haible.
25171
25172 2000-03-05  Jim Meyering  <meyering@lucent.com>
25173
25174         * lib/localcharset.c ("path-concat.h"): Include.
25175         (get_charset_aliases): Use path_concat instead of ANSI string
25176         concatenation.
25177
25178         * lib/unicodeio.h (PARAMS): Define.
25179         Use it to guard prototype.
25180
25181 2000-03-04  Jim Meyering  <meyering@lucent.com>
25182
25183         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25184         for lib/localcharset.c.
25185
25186 2000-03-04  Jim Meyering  <meyering@lucent.com>
25187
25188         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25189         installing into it.
25190         (uninstall-local): Uncomment this rule so `make distcheck' works
25191         once again.
25192
25193         * lib/unicodeio.c (<errno.h>): Include it.
25194         (errno): Declare if not defined.
25195
25196         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25197
25198         * lib/config.charset: New version, incorporating remarks from a linux
25199         i18n mailing list.  From Bruno Haible.
25200
25201 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25202
25203         * m4/codeset.m4: New file.
25204         * m4/iconv.m4: New file.
25205         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25206
25207 2000-03-03  Jim Meyering  <meyering@lucent.com>
25208
25209         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25210
25211 2000-03-02  Jim Meyering  <meyering@lucent.com>
25212
25213         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25214         the messages come out on separate lines.
25215
25216         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25217         rather than jm_CHECK_DECLARATIONS.
25218         * m4/decl.m4: Remove now-unused file.
25219
25220         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25221         geteuid.
25222
25223 2000-03-02  Jim Meyering  <meyering@lucent.com>
25224
25225         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25226
25227 2000-03-01  Jim Meyering  <meyering@lucent.com>
25228
25229         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25230         * lib/unicodeio.c: Likewise.
25231
25232 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25233
25234         * lib/config.charset: New file.
25235         * lib/localcharset.c: New file.
25236         * lib/unicodeio.h, lib/unicodeio.c: New files.
25237         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25238         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25239         (noinst_HEADERS): Add unicodeio.h.
25240         (all-local, install-exec-local, charset.alias): New targets.
25241
25242 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25243
25244         * lib/quotearg.c (ALERT_CHAR): New macro.
25245         (quotearg_buffer_restyled): Use it.
25246
25247 2000-02-27  Jim Meyering  <meyering@lucent.com>
25248
25249         * m4/check-decl.m4: Add getenv to the list.
25250
25251 2000-02-27  Jim Meyering  <meyering@lucent.com>
25252
25253         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25254         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25255
25256         * lib/backupfile.c: Guard inclusion of stdlib.h with
25257         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25258         Declare malloc if needed.
25259
25260         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25261         `#ifndef HAVE_DECL..'
25262         now that autoconf always defines the HAVE_DECL_ symbols.
25263         * lib/human.c: Likewise.
25264         * lib/same.c: Likewise.
25265         * lib/strtoumax.c: Likewise.
25266
25267         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25268         declaration check was not run.
25269         * lib/hash.c: Likewise.
25270         * lib/human.c: Likewise.
25271         * lib/same.c: Likewise.
25272         * lib/strtoumax.c: Likewise.
25273
25274         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25275         `.', then first look up the entire `.'-containing string as a login
25276         name.
25277
25278 2000-02-23  Jim Meyering  <meyering@lucent.com>
25279
25280         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25281         in place of my hack.
25282
25283 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25284
25285         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25286         (textint): New typedef.
25287         (parser_control): Member year changed from int to textint.
25288         All uses changed.
25289         (YYSTYPE): Removed; replaced by %union with int and textint members.
25290         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25291         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25292         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25293         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25294         (date, number, to_year): Use width of number in digits, not its value,
25295         to determine whether it's a 2-digit year, or a 2-digit time.
25296         (yylex): Store number of digits of numeric tokens.
25297         Reported by John Kendall.
25298
25299         (parser_control): Changed from struct parser_control to typedef (for
25300         consistency).  All uses changed.
25301
25302         (tID): Removed; not used.
25303         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25304
25305 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25306
25307         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25308         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25309
25310 2000-02-12  Jim Meyering  <meyering@lucent.com>
25311
25312         * lib/userspec.c (ISDIGIT): Define it.
25313         (isdigit): Remove definition.
25314         (is_number): Use ISDIGIT, not isdigit.
25315         <libintl.h>: Include.
25316         (_ and N_): Define.
25317         (parse_user_spec): Mark translatable strings.
25318
25319 2000-02-10  Jim Meyering  <meyering@lucent.com>
25320
25321         With these changes, nanosleep.[ch] are finally enough like the other
25322         lib/* replacement files to compile on a few more losing systems.
25323
25324         * lib/nanosleep.h: Don't include config.h.
25325         Remove prototype from declaration of nanosleep.
25326         (PARAMS): Remove now-unneeded definition.
25327         * lib/nanosleep.c: #undef nanosleep.
25328         (rpl_nanosleep): Rename from nanosleep.
25329
25330 2000-02-10  Jim Meyering  <meyering@lucent.com>
25331
25332         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25333         gnu_nanosleep to rpl_nanosleep.
25334
25335 2000-02-09  Jim Meyering  <meyering@lucent.com>
25336
25337         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25338         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25339
25340 2000-02-08  Akim Demaille  <akim@epita.fr>
25341
25342         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25343         `[' and `]' and remove uses of `changequote'.
25344         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25345         (AC_SYS_LARGEFILE): Likewise.
25346         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25347         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25348         of changequote.
25349         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25350         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25351         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25352         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25353
25354 2000-02-05  Jim Meyering  <meyering@lucent.com>
25355
25356         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25357         Remove explicit use of AC_HEADER_TIME.  It is required by
25358         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25359         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25360         in autoconf whereby the expansion of the latter ended up preceding
25361         the expansion of its prerequisite, AC_HEADER_TIME.
25362         Reported by Volker Borchert.
25363
25364 2000-02-03  Jim Meyering  <meyering@lucent.com>
25365
25366         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25367
25368 2000-02-03  Jim Meyering  <meyering@lucent.com>
25369
25370         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25371         rather than with `#if HAVE_UTMPNAME'.
25372
25373 2000-02-02  Jim Meyering  <meyering@lucent.com>
25374
25375         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25376         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25377         Reported by Eli Zaretskii.
25378
25379 2000-02-01  Jim Meyering  <meyering@lucent.com>
25380
25381         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25382
25383 2000-01-31  Jim Meyering  <meyering@lucent.com>
25384
25385         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25386         functions.  Add the time.h and sys/time.h headers along with the
25387         AC_REQUIRE'ment of AC_HEADER_TIME.
25388
25389 2000-01-31  Jim Meyering  <meyering@lucent.com>
25390
25391         * lib/nanosleep.h (nanosleep): Guard declaration with
25392         `#if ! HAVE_DECL_NANOSLEEP'.
25393         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25394         the declaration in that vendor's sys/timers.h.
25395         Reported by Christian Krackowizer.
25396
25397         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25398         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25399         (ISPRINT): Likewise.
25400         Reported by Tom Tromey.
25401
25402 2000-01-30  Jim Meyering  <meyering@lucent.com>
25403
25404         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25405
25406         * m4/prereq.m4 (utmp_includes): Define.
25407         Check for ut_user and ut_name members in both struct utmpx
25408         and struct utmp.
25409
25410 2000-01-30  Jim Meyering  <meyering@lucent.com>
25411
25412         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25413         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25414         header files where only utmpx.ut_user is declared.
25415
25416         * lib/readutmp.h (UT_USER): Define.
25417
25418 2000-01-29  Jim Meyering  <meyering@lucent.com>
25419
25420         * m4/lib-check.m4: New file containing library-related checks from
25421         fileutils and sh-utils (textutils had none).
25422
25423 2000-01-28  Jim Meyering  <meyering@lucent.com>
25424
25425         * m4/perl.m4: Change format of warning message to look more like that
25426         from the missing script.  Suggestion from François Pinard.
25427
25428 2000-01-25  Jim Meyering  <meyering@lucent.com>
25429
25430         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25431         well as time.h in the compile check.
25432         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25433         Fix typo in cross-compiling case: s/yes/no/.
25434
25435 2000-01-23  Jim Meyering  <meyering@lucent.com>
25436
25437         * m4/jm-macros.m4: Move df-related tests here from
25438         fileutils/configure.in
25439
25440         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25441         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25442
25443         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25444         s/space/ac_fsusage_space/.
25445         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25446
25447         * m4/ftruncate.m4: New file (derived from part of
25448         fileutils/configure.in).
25449         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25450         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25451
25452         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25453         AC_SUBST these here, rather than just in sh-util/configure.in, so
25454         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25455         all the same.
25456         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25457         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25458         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25459         (AC_SUBST(POW_LIBM)): Likewise.
25460         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25461
25462 2000-01-23  Jim Meyering  <meyering@lucent.com>
25463
25464         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25465         obstack.c.
25466
25467 2000-01-22  Jim Meyering  <meyering@lucent.com>
25468
25469         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25470
25471         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25472
25473         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25474         configure.in
25475         (AC_CHECK_HEADERS): Likewise for sh-utils.
25476         (AC_CHECK_HEADERS): Likewise for textutils.
25477         Merge the three lists of headers.
25478
25479         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25480         from fileutils' configure.in.
25481
25482         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25483         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25484         check-decl.m4.
25485
25486         * m4/check-decl.m4: Use #if rather than #ifdef.
25487         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25488         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25489         (_jm_DECL_HEADERS): Define new function.
25490         (jm_CHECK_DECLARATIONS): Require it.
25491
25492 2000-01-22  Jim Meyering  <meyering@lucent.com>
25493
25494         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25495         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25496         Required for some AIX systems.  Reported by Christian Krackowizer.
25497         [TESTING] (main): New function.
25498
25499         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25500         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25501         letters.
25502
25503         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25504         iswprint.
25505
25506         * lib/strverscmp.c (ISDIGIT): Define.
25507         (strverscmp): Use ISDIGIT, not isdigit.
25508
25509 2000-01-19  Jim Meyering  <meyering@lucent.com>
25510
25511         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25512         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25513         defines `struct timespec' in <sys/time.h>
25514
25515         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25516         Thanks to Akim for explaining.
25517
25518 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25519
25520         * lib/nanosleep.c (nanosleep):
25521         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25522         POSIX.1 doesn't require SA_INTERRUPT and some systems
25523         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25524         it's been part of POSIX.1 since day 1 (in 1988).
25525
25526 2000-01-17  Jim Meyering  <meyering@lucent.com>
25527
25528         * lib/interlock: Remove unused file.  Reported by François Pinard.
25529
25530 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25531
25532         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25533         alert, backslash, formfeed, and vertical tab unnecessarily in
25534         shell quoting style.
25535
25536 2000-01-16  Jim Meyering  <meyering@lucent.com>
25537
25538         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25539         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25540         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25541         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25542
25543 2000-01-16  Jim Meyering  <meyering@lucent.com>
25544
25545         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25546         because the latter didn't work.
25547
25548 2000-01-15  Jim Meyering  <meyering@lucent.com>
25549
25550         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25551         (AC_REPLACE_FUNCS): Add memcpy and memset.
25552         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25553         Add strpbrk.
25554         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25555
25556 2000-01-12  Jim Meyering  <meyering@lucent.com>
25557
25558         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25559         (jm_PREREQ): Use it.
25560         (jm_PREREQ_READUTMP): New macro.
25561         (jm_PREREQ): Use it.
25562
25563 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25564
25565         Quote multibyte characters correctly.
25566         * m4/c-bs-a.m4: New file.
25567         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25568         (jm_PREREQ): Use it.
25569
25570 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25571
25572         * m4/uintmax_t.m4: Port to autoconf 2.13.
25573
25574 2000-01-08  Jim Meyering  <meyering@ascend.com>
25575
25576         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25577         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25578
25579 2000-01-04  Jim Meyering  <meyering@ascend.com>
25580
25581         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25582         jm_STRUCT_DIRENT_D_TYPE.
25583         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25584         jm_STRUCT_DIRENT_D_INO.
25585         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25586         jm_STRUCT_UTIMBUF.
25587         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25588         renamings.
25589         * m4/utime.m4: Likewise.
25590
25591         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25592         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25593
25594 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25595
25596         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25597         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25598
25599 2000-01-02  Jim Meyering  <meyering@ascend.com>
25600
25601         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25602         remember if this is necessary.
25603
25604 1999-12-26  Jim Meyering  <meyering@ascend.com>
25605
25606         * m4/jm-macros.m4: Use it here.
25607         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25608
25609 1999-12-23  Jim Meyering  <meyering@ascend.com>
25610
25611         * m4/jm-macros.m4: Check for clock_gettime (moved from
25612         fileutils/configure.in)
25613         Check for gettimeofday.
25614
25615 1999-12-20  Jim Meyering  <meyering@ascend.com>
25616
25617         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25618         autoconf-2.14a-1999-12-20.
25619
25620 1999-12-19  Jim Meyering  <meyering@ascend.com>
25621
25622         * m4/lstat-slash.m4: New file.
25623         * m4/jm-macros.m4: Use the new macro:
25624         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25625
25626 1999-12-07  Jim Meyering  <meyering@ascend.com>
25627
25628         * m4/perl.m4: Require that File::Compare be available, too.
25629         Too many systems seem to lack it.
25630
25631         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25632         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25633
25634 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25635
25636         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25637         problem with the QNX 4.25 shell, which doesn't propagate exit
25638         status of failed commands inside shell assignments.
25639
25640 1999-11-17  Jim Meyering  <meyering@ascend.com>
25641
25642         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25643
25644 1999-11-07  Jim Meyering  <meyering@ascend.com>
25645
25646         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25647
25648 1999-11-06  Jim Meyering  <meyering@ascend.com>
25649
25650         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25651         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25652
25653 1999-11-05  Jim Meyering  <meyering@ascend.com>
25654
25655         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25656         configure.in of textutils, fileutils, and sh-utils into this one
25657         (shared between those packages) file.
25658         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25659         AC_STRUCT_ST_BLKSIZE.
25660
25661 1999-11-03  Jim Meyering  <meyering@ascend.com>
25662
25663         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25664         of AC_CHECK_TYPE checks includes unistd.h.
25665         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25666         Suggestion from Akim Demaille.
25667
25668 1999-10-30  Jim Meyering  <meyering@ascend.com>
25669
25670         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25671         m4-quoted string.
25672         * m4/ls-mntd-fs.m4: Likewise.
25673         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25674         * m4/jm-winsz1.m4: Likewise.
25675
25676         * m4/const.m4: Remove file, since the fix made it into the experimental
25677         version of autoconf.
25678         * m4/mktime.m4: Likewise.
25679
25680         * m4/check-type.m4: Remove file, now that the latest version of
25681         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25682
25683         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25684         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25685         AC_CHECK_TYPE.
25686
25687 1999-10-04  Jim Meyering  <meyering@ascend.com>
25688
25689         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25690
25691 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25692
25693         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25694         2.95.1 bug with HP-UX 10.20.
25695
25696 1999-09-17  Jim Meyering  <meyering@ascend.com>
25697
25698         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25699         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25700         due to missing strdup (against sh-utils-2.0).
25701
25702 1999-08-29  Jim Meyering  <meyering@ascend.com>
25703
25704         * m4/jm-macros.m4: Require jm_BISON.
25705         * m4/bison.m4: New file.
25706
25707 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25708
25709         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25710         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25711
25712 1999-08-05  Jim Meyering  <meyering@ascend.com>
25713
25714         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25715         to avoid conflicts with `conftest' on 8+3 filesystems.
25716         Suggestion from Eli Zaretskii.
25717
25718 1999-08-04  Jim Meyering  <meyering@ascend.com>
25719
25720         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25721         fileutils and sh-utils (textutils's getline test was inadequate).
25722         (AM_FUNC_GETLINE): Run this test.
25723         (AC_CHECK_FUNCS): Check for getdelim.
25724         Reported by Bob Proulx.
25725
25726 1999-08-02  Jim Meyering  <meyering@ascend.com>
25727
25728         * m4/jm-macros.m4: Add a comment.
25729
25730 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25731
25732         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25733         <inttypes.h> defines strtoumax as a macro (and not as a
25734         function).
25735
25736 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25737
25738         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25739         that we can shift, multiply and divide unsigned long long
25740         values; Ultrix cc can't do it.
25741
25742 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25743
25744         * m4/mktime.m4: New file, which is a preview of what should appear
25745         in the next public autoconf release.
25746
25747 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25748
25749         * m4/lfs.m4: Remove this file.
25750         * m4/largefile.m4: New file.  It contains the old contents of
25751         lfs.m4, except that all names with prefix AC_LFS have been
25752         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25753         compatible with future autoconf versions.  Also, some minor m4
25754         quoting problems have been fixed.
25755
25756 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25757
25758         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25759         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25760         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25761         and simplify the shell code.
25762
25763 1999-08-01  Jim Meyering  <meyering@ascend.com>
25764
25765         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25766         m4.
25767
25768 1999-07-20  Jim Meyering  <meyering@ascend.com>
25769
25770         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25771
25772 1999-07-15  Jim Meyering  <meyering@ascend.com>
25773
25774         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25775
25776 1999-05-22  Jim Meyering  <meyering@ascend.com>
25777
25778         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25779
25780 1999-05-20  Jim Meyering  <meyering@ascend.com>
25781
25782         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25783         Add a colon after each `then' in case $4 is empty.
25784
25785 1999-05-16  Jim Meyering  <meyering@ascend.com>
25786
25787         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25788
25789 1999-05-10  Jim Meyering  <meyering@ascend.com>
25790
25791         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25792
25793         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25794         AC_FUNC_MKTIME.
25795
25796 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25797
25798         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25799
25800 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25801
25802         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25803         not CPPFLAGS, so that linking works correctly in IRIX.
25804
25805 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25806
25807         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25808
25809 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25810
25811         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25812         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25813         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25814         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25815         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25816
25817         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25818
25819 1999-04-20  Jim Meyering  <meyering@ascend.com>
25820
25821         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25822         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25823         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25824
25825 1999-04-18  Jim Meyering  <meyering@ascend.com>
25826
25827         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25828         * m4/jm-macros.m4: Use it.
25829
25830 1999-04-06  Jim Meyering  <meyering@ascend.com>
25831
25832         * m4/strftime.m4: Remove test for %f.
25833
25834 1999-03-29  Jim Meyering  <meyering@ascend.com>
25835
25836         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25837         superset of the AC_TYPE_* checks in the textutils, fileutils,
25838         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25839         AC_TYPE_PID_T.
25840
25841 1999-03-28  Jim Meyering  <meyering@ascend.com>
25842
25843         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25844         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25845         replaced e.g., in the *.sh files of the sh-utils.
25846
25847 1999-03-20  Jim Meyering  <meyering@ascend.com>
25848
25849         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25850         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25851         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25852
25853 1999-03-19  Jim Meyering  <meyering@ascend.com>
25854
25855         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25856
25857 1999-03-12  Jim Meyering  <meyering@ascend.com>
25858
25859         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25860
25861 1999-03-07  Jim Meyering  <meyering@ascend.com>
25862
25863         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25864         declared.
25865
25866 1999-02-17  Jim Meyering  <meyering@ascend.com>
25867
25868         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25869         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25870
25871 1999-02-07  Jim Meyering  <meyering@ascend.com>
25872
25873         * m4/group-member.m4: New file -- extracted from sh-utils'
25874         configure.in.
25875
25876         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25877         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25878
25879 1999-02-06  Jim Meyering  <meyering@ascend.com>
25880
25881         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25882         * m4/fnmatch.m4: Likewise.
25883         * m4/getgroups.m4: Likewise.
25884         * m4/lstat.m4: Likewise.
25885         * m4/malloc.m4: Likewise.
25886         * m4/putenv.m4: Likewise.
25887         * m4/realloc.m4: Likewise.
25888         * m4/regex.m4: Likewise.
25889         * m4/stat.m4: Likewise.
25890         * m4/strftime.m4: Likewise.
25891         Suggestion from Alain Magloire.
25892
25893         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25894         * m4/fnmatch.m4: Likewise.
25895         * m4/getgroups.m4: Likewise.
25896         * m4/getline.m4: Likewise.
25897         * m4/lstat.m4: Likewise.
25898         * m4/malloc.m4: Likewise.
25899         * m4/memcmp.m4: Likewise.
25900         * m4/putenv.m4: Likewise.
25901         * m4/realloc.m4: Likewise.
25902         * m4/regex.m4: Likewise.
25903         * m4/stat.m4: Likewise.
25904         * m4/strftime.m4: Likewise.
25905         Suggestion from Alain Magloire.
25906
25907         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25908         an argument.
25909
25910         * m4/regex.m4: Add a run-time Test for proper operation of
25911         re_compile_pattern.
25912
25913 1999-01-31  Jim Meyering  <meyering@ascend.com>
25914
25915         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25916
25917 1999-01-30  Jim Meyering  <meyering@ascend.com>
25918
25919         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25920
25921         * m4/jm-mktime.m4: Make this a wrapper around the official
25922         AM_FUNC_MKTIME rather than my private copy, now that the official one
25923         is up to date.
25924         * m4/mktime.m4: Remove file.
25925
25926         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25927         * m4/uptime.m4: Likewise.
25928         * m4/uintmax_t.m4: Likewise.
25929
25930 1999-01-28  Jim Meyering  <meyering@ascend.com>
25931
25932         * m4/jm-macros.m4: Use jm_AFS.
25933         * m4/afs.m4: New file (from fileutils' configure.in).
25934
25935         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25936         * m4/chown.m4: Likewise.
25937         * m4/d-ino.m4: Likewise.
25938         * m4/d-type.m4: Likewise.
25939         * m4/fnmatch.m4: Likewise.
25940         * m4/getgroups.m4: Likewise.
25941         * m4/gettext.m4: Likewise.
25942         * m4/jm-mktime.m4: Likewise.
25943         * m4/jm-winsz2.m4: Likewise.
25944         * m4/lcmessage.m4: Likewise.
25945         * m4/ls-mntd-fs.m4: Likewise.
25946         * m4/malloc.m4: Likewise.
25947         * m4/memcmp.m4: Likewise.
25948         * m4/putenv.m4: Likewise.
25949         * m4/realloc.m4: Likewise.
25950         * m4/st_mtim.m4: Likewise.
25951         * m4/strftime.m4: Likewise.
25952
25953 1999-01-16  Jim Meyering  <meyering@ascend.com>
25954
25955         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25956         (ARGMATCH_DIE_DECL): Define.
25957
25958 1999-01-12  Jim Meyering  <meyering@ascend.com>
25959
25960         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25961         Reported by Lars Hecking.
25962
25963 1999-01-10  Jim Meyering  <meyering@ascend.com>
25964
25965         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25966         gross kludge.
25967         * m4/inttypes_h.m4: Likewise.
25968         * m4/lstat.m4: Likewise.
25969         * m4/malloc.m4: Likewise.
25970         * m4/readdir.m4: Likewise.
25971         * m4/realloc.m4: Likewise.
25972         * m4/st_dm_mode.m4: Likewise.
25973         * m4/stat.m4: Likewise.
25974         * m4/utimbuf.m4: Likewise.
25975         * m4/utimes.m4: Likewise.
25976
25977         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
25978         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
25979         comments in config.h.in are meaningful.
25980
25981         * m4/jm-macros.m4: Require autoconf-2.13 here.
25982
25983         * m4/regex.m4: By default, don't use the included regex.c on systems
25984         with glibc 2.  Suggestion from Uli Drepper.
25985
25986 1999-01-02  Jim Meyering  <meyering@ascend.com>
25987
25988         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
25989
25990 1998-12-18  Jim Meyering  <meyering@ascend.com>
25991
25992         * m4/Makefile.am.in (Makefile.am): Simplify rule.
25993         Based on a suggestion from Lars Hecking.
25994
25995 1998-11-16  Paul Eggert  <eggert@twinsun.com>
25996
25997         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
25998
25999 1998-11-16  Jim Meyering  <meyering@ascend.com>
26000
26001         * m4/lfs.m4: Double-quote the `uname...` expression.
26002
26003 1998-11-14  Jim Meyering  <meyering@ascend.com>
26004
26005         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26006         * m4/stat.m4: Likewise.
26007
26008 1998-11-03  Jim Meyering  <meyering@ascend.com>
26009
26010         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26011         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26012
26013 1998-10-18  Jim Meyering  <meyering@ascend.com>
26014
26015         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26016
26017 1998-10-17  Jim Meyering  <meyering@ascend.com>
26018
26019         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26020         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26021         calls for those previously hard-coded headers.  Instead, take a new
26022         parameter.
26023         (jm_CHECK_DECLARATIONS): Reflect interface change.
26024         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26025         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26026
26027         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26028
26029 1998-10-14  Jim Meyering  <meyering@ascend.com>
26030
26031         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26032         instead of "TZ=America/Vancouver".  From Paul Eggert.
26033
26034 1998-10-11  Jim Meyering  <meyering@ascend.com>
26035
26036         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26037         This adds a test for a recently added compatibility fix for mktime.c.
26038         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26039
26040 1998-09-27  Jim Meyering  <meyering@ascend.com>
26041
26042         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26043
26044         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26045         ../configure.in, including a change from Gordon Matzigkeit to allow
26046         cross-compiling for the Hurd.
26047
26048         * m4/glibc.m4: New file/macro to test for the GNU C Library
26049         versions 1 and 2.  From Gordon Matzigkeit.
26050         Indent.
26051
26052 1998-09-21  Jim Meyering  <meyering@ascend.com>
26053
26054         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26055
26056 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26057
26058         Port nanosecond-resolution times to UnixWare 2.1.2 and
26059         pedantic Solaris 2.6.
26060
26061         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26062         AC_STRUCT_ST_MTIM.
26063         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26064         Generate name of ns member, instead of just 1 or undef.
26065         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26066
26067 1998-08-15  Jim Meyering  <meyering@ascend.com>
26068
26069         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26070         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26071         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26072         instead of jm_TYPE_SSIZE_T.
26073
26074 1998-08-12  Jim Meyering  <meyering@ascend.com>
26075
26076         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26077
26078 1998-08-02  Jim Meyering  <meyering@ascend.com>
26079
26080         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26081         in acconfig.h manually.
26082
26083 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26084
26085         * m4/st_mtim.m4: New file.
26086
26087 1998-07-28  Jim Meyering  <meyering@ascend.com>
26088
26089         * m4/utimes.m4: Undef stat.
26090
26091 1998-07-25  Jim Meyering  <meyering@ascend.com>
26092
26093         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26094         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26095
26096 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26097
26098         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26099         uid and gid actually remain unchanged.
26100
26101 1998-07-07  Jim Meyering  <meyering@ascend.com>
26102
26103         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26104
26105 1998-07-04  Jim Meyering  <meyering@ascend.com>
26106
26107         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26108         to prove that this macro can be used in packages without regex.c.
26109
26110 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26111
26112         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26113         is to be used.
26114
26115 1998-07-03  Jim Meyering  <meyering@ascend.com>
26116
26117         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26118
26119         * m4/gettext.m4: New file -- from gettext-0.10.35.
26120         * m4/lcmessage.m4: Likewise.
26121         * m4/progtest.m4: Likewise.
26122
26123         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26124         * m4/jm-macros.m4: Require the new macro.
26125
26126 1998-06-29  Jim Meyering  <meyering@ascend.com>
26127
26128         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26129         for the definition of NGROUPS (used in a system header included
26130         by sys/mount.h).
26131
26132 1998-06-28  Jim Meyering  <meyering@ascend.com>
26133
26134         * m4/ls-mntd-fs.m4: New file.
26135         * m4/fstypename.m4: New file.
26136
26137         * m4/jm-macros.m4: Require the new macro.
26138         * m4/jm-glibc-io.m4: New file.
26139
26140 1998-05-19  Jim Meyering  <meyering@ascend.com>
26141
26142         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26143         * m4/lchown.m4: New file.
26144
26145         * m4/Makefile.am.in: New file.
26146         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26147
26148 1998-05-14  Jim Meyering  <meyering@ascend.com>
26149
26150         * m4/Makefile.am (EXTRA_DIST): Add them.
26151         * m4/jm-macros.m4: New file.
26152         * m4/utimbuf.m4: New file.
26153
26154 1998-05-12  Jim Meyering  <meyering@ascend.com>
26155
26156         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26157
26158 1998-05-11  Jim Meyering  <meyering@ascend.com>
26159
26160         * m4/isc-posix.m4: New file.
26161
26162 1998-05-10  Jim Meyering  <meyering@ascend.com>
26163
26164         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26165
26166 1998-05-09  Jim Meyering  <meyering@ascend.com>
26167
26168         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26169         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26170         with automake.
26171
26172         * m4/ssize_t.m4: New file.
26173         * m4/mktime.m4: Remove file -- the new automake has this now.
26174
26175 1998-04-26  Jim Meyering  <meyering@ascend.com>
26176
26177         * m4/assert.m4: New file.
26178         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26179
26180 1998-04-05  Jim Meyering  <meyering@ascend.com>
26181
26182         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26183         (jm_PREREQ): Use it here.
26184
26185 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26186
26187         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26188         in acconfig.h.
26189
26190 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26191
26192         * m4/prereq.m4: New file.
26193         * m4/error.m4: New file.
26194         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26195
26196 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26197
26198         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26199         cache-check for the same variable -- that defeated the purpose of
26200         the test; the test program was never run.  This was a problem only
26201         on systems with losing getline functions -- HP-UX 10.20 is one.
26202         Reported by Bjorn Helgaas.
26203
26204 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26205
26206         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26207
26208 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26209
26210         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26211
26212         * m4/const.m4: New file.  Use an initializer in this declaration
26213         typedef int charset[2]; const charset x;
26214         Reported by Bob Glickstein.
26215
26216 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26217
26218         * m4/chown.m4: Fix reversed types on -1 args to chown.
26219         From Kaveh Ghazi.
26220
26221 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26222
26223         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26224         Add lseek and memchr.
26225
26226         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26227         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26228         have a 20-character limit on names.
26229
26230 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26231
26232         * m4/inttypes_h.m4: New file.
26233         * m4/uintmax_t.m4: New file.
26234         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26235
26236 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26237   Free Software Foundation, Inc.
26238 Copying and distribution of this file, with or without modification,
26239 are permitted provided the copyright notice and this notice are preserved.