165931e6930b46d05f3f39a0caa6adfe50d70315
[pspp] / ChangeLog
1 2007-02-01  Jim Meyering  <jim@meyering.net>
2
3         Give tools a better chance to allocate space for very large buffers.
4         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
5
6 2007-02-01  Karl Berry  <karl@gnu.org>
7
8         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
9
10 2007-02-01  Bruno Haible  <bruno@clisp.org>
11
12         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
13         renamings.
14
15 2007-02-01  Eric Blake  <ebb9@byu.net>
16
17         * modules/regex (Depends-on): Revert dependence on mempcpy.
18         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
19         module's definition of mempcpy.
20         Reported by Paul Eggert.
21
22 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
23
24         * lib/string_.h: If the gnulib module XYZ is not present, undefine
25         the symbol XYZ before redefining it.  This fixes a problem with
26         programs that don't use XYZ, when compiled on systems that define
27         XYZ to something else.
28
29 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
30
31         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
32         occurs when "mkdir -m foo" creates a setgid directory that is (1)
33         writeable to group or other and (2) is intended to have a special
34         mode bit that is set or cleared.  In such a case, the directory
35         should be neither group- nor other-writeable until the special
36         mode bits are right.
37
38 2007-01-31  Eric Blake  <ebb9@byu.net>
39
40         * modules/mountlist (Depends-on): Add strstr.
41
42         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
43         bug.
44         * modules/string (Makefile.am): Remove redundant replacement.
45         * modules/regex (Depends-on): Add mempcpy.
46
47 2007-01-31  Bruno Haible  <bruno@clisp.org>
48
49         New module description field 'Link'.
50         * gnulib-tool (func_usage): Document --extract-link-directive.
51         (sed_extract_prog): Recognize 'Link' directive.
52         (func_get_link_directive): New function.
53         (func_import): Show summary of link directives.
54         Handle --extract-link-directive option.
55         * modules/acl (Link): New section.
56         * modules/clock-time (Link): New section.
57         * modules/euidaccess (Link): New section.
58         * modules/gettext (Link): New section.
59         * modules/iconv (Link): New section.
60         * modules/lock (Link): New section.
61         * modules/nanosleep (Link): New section.
62         * modules/readline (Link): New section.
63
64 2007-01-27  Bruno Haible  <bruno@clisp.org>
65
66         Enforce the use of gnulib modules for unportable <string.h> functions.
67         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
68         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
69         (gl_HEADER_STRING_H_BODY): Require it.
70         * lib/string_.h: If the gnulib module XYZ is not present, redefine
71         the symbol XYZ to one that gives a link error.
72         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
73         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
74         * modules/mempcpy (configure.ac): Likewise.
75         * modules/memrchr (configure.ac): Likewise.
76         * modules/stpcpy (configure.ac): Likewise.
77         * modules/stpncpy (configure.ac): Likewise.
78         * modules/strcase (configure.ac): Likewise.
79         * modules/strcasestr (configure.ac): Likewise.
80         * modules/strchrnul (configure.ac): Likewise.
81         * modules/strdup (configure.ac): Likewise.
82         * modules/strndup (configure.ac): Likewise.
83         * modules/strnlen (configure.ac): Likewise.
84         * modules/strpbrk (configure.ac): Likewise.
85         * modules/strsep (configure.ac): Likewise.
86         * modules/strstr (configure.ac): Likewise.
87         * modules/strtok_r (configure.ac): Likewise.
88
89 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
90
91         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
92
93 2007-01-30  Jim Meyering  <jim@meyering.net>
94
95         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
96
97 2007-01-29  Bruno Haible  <bruno@clisp.org>
98
99         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
100         * lib/execute.c: Likewise.
101         * lib/pipe.c: Likewise.
102         * lib/printf-args.h: Likewise.
103         * lib/printf-args.c: Likewise.
104         * lib/printf-parse.c: Likewise.
105         * lib/vasnprintf.c: Likewise.
106
107 2007-01-29  Eric Blake  <ebb9@byu.net>
108
109         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
110         declaration.
111
112 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
113
114         * lib/strptime.h (strptime): Use 'restrict' for args where
115         POSIX requires this.
116         * lib/strptime.c (strptime): Likewise.
117         Change license notice from LGPL to GPL, since gnulib-tool will
118         change this as needed.
119         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
120         defined.
121         Include "strptime.h" first, to check interface.
122         Do not #undef _LIBC and _NL_CURRENT.
123         Do not include <stdlib.h>; no longer needed.
124         Include "time_r.h" and declare ptime_locale_status
125         only if _LIBC is not defined.
126         (__P): Remove unused macro.
127         (match_string): Bring back glibc version, but use it only if _LIBC
128         is defined.
129         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
130         Remove unnecessary assertion and abort() call.
131         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
132         * m4/strptime.m4: Fix serial number comment.
133         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
134         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
135         (Depends-on): Add time_r.
136
137 2007-01-29  Bruno Haible  <bruno@clisp.org>
138
139         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
140         strptime.
141         * modules/strptime (Depends-on): Add stdbool.
142         * lib/strptime.h: Include <time.h> always. Add comments.
143
144 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
145
146         * modules/strptime: New file.
147         * lib/strptime.h: New file.
148         * lib/strptime.c: New file.
149         * m4/strptime.m4: New file.
150
151 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
152
153         * MODULES.html.sh: New module mpsort.
154         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
155
156         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
157         a circularity problem with HP-UX ia64 reported by Bob Proulx in
158         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
159         All uses changed.
160         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
161         All uses changed.
162         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
163         to _Restrict_.
164         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
165         the parameter matches the prototype.
166
167 2007-01-28  Jim Meyering  <jim@meyering.net>
168
169         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
170         sys/time.h here, reverting that part of the previous patch:
171         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
172
173 2007-01-28  Bruno Haible  <bruno@clisp.org>
174
175         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
176         value of $(SYS_TIME_H).
177         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
178         remove it conditionally, too. [added by Jim Meyering]
179         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
180         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
181         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
182         GETTIMEOFDAY_REPLACEMENT to 1.
183
184 2007-01-28  Bruno Haible  <bruno@clisp.org>
185
186         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
187         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
188         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
189         Set UNISTD_H instead of UNISTD_H2.
190         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
191
192 2007-01-28  Bruno Haible  <bruno@clisp.org>
193
194         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
195         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
196
197 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
198
199         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
200         (func_create_testdir): Ensure C locale for `grep' and `tr'
201         character ranges.
202         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
203         ACLOCAL_AMFLAGS parsing state machine.
204
205 2007-01-27  Bruno Haible  <bruno@clisp.org>
206
207         * modules/unistr/base: Update.
208
209 2007-01-27  Bruno Haible  <bruno@clisp.org>
210
211         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
212         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
213         * modules/unistr/u32-mbtouc-unsafe: Renamed from
214         modules/unistr/u32-mbtouc.
215         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
216         * lib/unistr.h: Update.
217         * lib/linebreak.c: Update.
218         * modules/unistr/u32-mbtouc: Renamed from
219         modules/unistr/u32-mbtouc-safe.
220         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
221         * lib/unistr.h: Update.
222         * lib/unistr/u32-to-u8.c: Update.
223         * lib/unistr/u32-to-u16.c: Update.
224
225 2007-01-27  Bruno Haible  <bruno@clisp.org>
226
227         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
228         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
229         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
230         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
231         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
232         * modules/unistr/u16-mbtouc-unsafe: Renamed from
233         modules/unistr/u16-mbtouc.
234         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
235         * lib/unistr.h: Update.
236         * lib/linebreak.c: Update.
237         * modules/linebreak: Update.
238         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
239         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
240         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
241         * modules/unistr/u16-mbtouc: Renamed from
242         modules/unistr/u16-mbtouc-safe.
243         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
244         * lib/unistr.h: Update.
245         * lib/unistr/u16-to-u8.c: Update.
246         * modules/unistr/u16-to-u8: Update.
247         * lib/unistr/u16-to-u32.c: Update.
248         * modules/unistr/u16-to-u32: Update.
249
250 2007-01-27  Bruno Haible  <bruno@clisp.org>
251
252         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
253         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
254         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
255         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
256         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
257         * modules/unistr/u8-mbtouc-unsafe: Renamed from
258         modules/unistr/u8-mbtouc.
259         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
260         * lib/unistr.h: Update.
261         * lib/striconveh.c: Update.
262         * modules/striconveh: Update.
263         * lib/linebreak.c: Update.
264         * modules/linebreak: Update.
265         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
266         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
267         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
268         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
269         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
270         * lib/unistr.h: Update.
271         * lib/striconveh.c: Update.
272         * modules/striconveh: Update.
273         * lib/unistr/u8-to-u16.c: Update.
274         * modules/unistr/u8-to-u16: Update.
275         * lib/unistr/u8-to-u32.c: Update.
276         * modules/unistr/u8-to-u32: Update.
277
278 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
279
280         Sync from Libtool.
281         * lib/argz.c: Do not include strings.h nor memory.h, include
282         string.h unconditionally.  Patch by Simon Josefsson.
283
284 2007-01-27  Bruno Haible  <bruno@clisp.org>
285
286         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
287         from gl_HEADER_STRING_H_BODY.
288         (gl_HEADER_STRING_H_BODY): Require it.
289         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
290         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
291         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
292         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
293         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
294         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
295         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
296         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
297         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
298         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
299         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
300         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
301         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
302         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
303         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
304
305 2007-01-27  Bruno Haible  <bruno@clisp.org>
306
307         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
308         check_PROGRAMS into noinst_PROGRAMS.
309         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
310         check_PROGRAMS in this case.
311         (func_import): Set for_test to false.
312         (func_create_testdir): Set for_test to true.
313
314 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
315             Bruno Haible  <bruno@clisp.org>
316
317         * modules/strcasestr (Files): Remove lib/strcasestr.h.
318         (Depends-on): Add string.
319         (Includes): Use <string.h> instead of strcasestr.h.
320         * modules/string (Makefile.am): Also substitute the value of
321         REPLACE_STRCASESTR.
322         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
323         assume strcasestr is declared in <string.h> not <strings.h>. Also
324         set REPLACE_STRCASESTR.
325         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
326         REPLACE_STRCASESTR.
327         * lib/strcasestr.h: Remove file.
328         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
329         * lib/string_.h (strcasestr): New declaration.
330
331 2007-01-27  Bruno Haible  <bruno@clisp.org>
332
333         * lib/string_.h: Use 'extern'.
334
335 2007-01-27  Jim Meyering  <jim@meyering.net>
336
337         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
338         of set-but-not-used local, "q".
339
340         * lib/mempcpy.c: Include <config.h> before <string.h>.
341         This fixes a compilation error on HP-UX, due to the system's
342         "restrict"-using mempcpy prototype.
343
344 2007-01-26  Bruno Haible  <bruno@clisp.org>
345
346         Small optimization.
347         * lib/javacomp.c: Include c-strstr.h.
348          (is_envjavac_gcj): Use c_strstr instead of strstr.
349         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
350
351 2007-01-26  Bruno Haible  <bruno@clisp.org>
352
353         * MODULES.html.sh (Unicode string functions): Add the new modules.
354
355         * modules/uniconv/u32-strconv-to-locale: New file.
356         * lib/uniconv/u32-strconv-to-locale.c: New file.
357
358         * modules/uniconv/u16-strconv-to-locale: New file.
359         * lib/uniconv/u16-strconv-to-locale.c: New file.
360
361         * modules/uniconv/u8-strconv-to-locale: New file.
362         * lib/uniconv/u8-strconv-to-locale.c: New file.
363
364         * modules/uniconv/u32-strconv-from-locale: New file.
365         * lib/uniconv/u32-strconv-from-locale.c: New file.
366
367         * modules/uniconv/u16-strconv-from-locale: New file.
368         * lib/uniconv/u16-strconv-from-locale.c: New file.
369
370         * modules/uniconv/u8-strconv-from-locale: New file.
371         * lib/uniconv/u8-strconv-from-locale.c: New file.
372
373         * modules/uniconv/u32-strconv-to-enc: New file.
374         * lib/uniconv/u32-strconv-to-enc.c: New file.
375         * modules/uniconv/u32-strconv-to-enc-tests: New file.
376         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
377
378         * modules/uniconv/u16-strconv-to-enc: New file.
379         * lib/uniconv/u16-strconv-to-enc.c: New file.
380         * lib/uniconv/u-strconv-to-enc.h: New file.
381         * modules/uniconv/u16-strconv-to-enc-tests: New file.
382         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
383
384         * modules/uniconv/u8-strconv-to-enc: New file.
385         * lib/uniconv/u8-strconv-to-enc.c: New file.
386         * modules/uniconv/u8-strconv-to-enc-tests: New file.
387         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
388
389         * modules/uniconv/u32-strconv-from-enc: New file.
390         * lib/uniconv/u32-strconv-from-enc.c: New file.
391         * modules/uniconv/u32-strconv-from-enc-tests: New file.
392         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
393
394         * modules/uniconv/u16-strconv-from-enc: New file.
395         * lib/uniconv/u16-strconv-from-enc.c: New file.
396         * modules/uniconv/u16-strconv-from-enc-tests: New file.
397         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
398
399         * modules/uniconv/u8-strconv-from-enc: New file.
400         * lib/uniconv/u8-strconv-from-enc.c: New file.
401         * lib/uniconv/u-strconv-from-enc.h: New file.
402         * modules/uniconv/u8-strconv-from-enc-tests: New file.
403         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
404
405         * modules/uniconv/u32-conv-from-enc: New file.
406         * lib/uniconv/u32-conv-from-enc.c: New file.
407         * modules/uniconv/u32-conv-from-enc-tests: New file.
408         * tests/uniconv/test-u32-conv-from-enc.c: New file.
409
410         * modules/uniconv/u16-conv-from-enc: New file.
411         * lib/uniconv/u16-conv-from-enc.c: New file.
412         * lib/uniconv/u-conv-from-enc.h: New file.
413         * modules/uniconv/u16-conv-from-enc-tests: New file.
414         * tests/uniconv/test-u16-conv-from-enc.c: New file.
415
416         * modules/uniconv/u8-conv-from-enc: New file.
417         * lib/uniconv/u8-conv-from-enc.c: New file.
418         * modules/uniconv/u8-conv-from-enc-tests: New file.
419         * tests/uniconv/test-u8-conv-from-enc.c: New file.
420
421         * modules/uniconv/base: New file.
422         * lib/uniconv.h: New file.
423
424 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
425
426         * doc/gnulib-tool.texi (Initial import): Update to match current
427         behavior with strdup module.
428         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
429         * lib/memmem.h: Remove; all uses removed.  This is now done
430         by <string.h>.
431         * lib/mempcpy.h: Likewise.
432         * lib/memrchr.h: Likewise.
433         * lib/stpcpy.h: Likewise.
434         * lib/stpncpy.h: Likewise.
435         * lib/strcase.h: Likewise.
436         * lib/strchrnul.h: Likewise.
437         * lib/strdup.h: Likewise.
438         * lib/strndup.h: Likewise.
439         * lib/strnlen.h: Likewise.
440         * lib/strpbrk.h: Likewise.
441         * lib/strsep.h: Likewise.
442         * lib/strstr.h: Likewise.
443         * lib/strtok_r.h: Likewise.
444         * lib/string_.h: New file.
445         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
446         Rely on <string.h> instead.
447         * lib/canon-host.c: Likewise.
448         * lib/chdir-long.c: Likewise.
449         * lib/concatpath.c: Likewise.
450         * lib/exclude.c: Likewise.
451         * lib/fchdir.c: Likewise.
452         * lib/getaddrinfo.c: Likewise.
453         * lib/getcwd.c: Likewise.
454         * lib/getsubopt.c: Likewise.
455         * lib/glob.c: Likewise.
456         * lib/hard-locale.c: Likewise.
457         * lib/iconvme.c: Likewise.
458         * lib/javacomp.c: Likewise.
459         * lib/mempcpy.c: Likewise.
460         * lib/memrchr.c: Likewise.
461         * lib/regex_internal.h: Likewise.
462         * lib/stpncpy.c: Likewise.
463         * lib/strcasecmp.c: Likewise.
464         * lib/strchrnul.c: Likewise.
465         * lib/strdup.c: Likewise.
466         * lib/striconv.c: Likewise.
467         * lib/striconveh.c: Likewise.
468         * lib/striconveha.c: Likewise.
469         * lib/strncasecmp.c: Likewise.
470         * lib/strndup.c: Likewise.
471         * lib/strnlen.c: Likewise.
472         * lib/strsep.c: Likewise.
473         * lib/strstr.c: Likewise.
474         * lib/strtok_r.c: Likewise.
475         * lib/userspec.c: Likewise.
476         * lib/w32spawn.h: Likewise.
477         * lib/xstrndup.c: Likewise.
478         * lib/mountlist.c (strstr): Remove decl.
479         * m4/string_h.m4: New file.
480         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
481         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
482         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
483         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
484         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
485         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
486         Set REPLACE_STRCASECMP if necessary.
487         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
488         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
489         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
490         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
491         HAVE_DECL_STRDUP if necessary.
492         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
493         since gl_FUNC_STRNDUP does that now.
494         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
495         Check for decl here...
496         (gl_PREREQ_STRNLEN): ... not here.
497         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
498         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
499         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
500         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
501         necessary.
502         * modules/string: New file.
503         * modules/memmem (Files): Remove special-purpose include file.
504         (Depends-on): Add string.
505         (Include): Include <string.h>, not the removed file.
506         * modules/mempcpy: Likewise.
507         * modules/memrchr: Likewise.
508         * modules/stpcpy: Likewise.
509         * modules/stpncpy: Likewise.
510         * modules/strcase: Likewise.
511         * modules/strchrnul: Likewise.
512         * modules/strdup: Likewise.
513         * modules/strndup: Likewise.
514         * modules/strnlen: Likewise.
515         * modules/strpbrk: Likewise.
516         * modules/strsep: Likewise.
517         * modules/strstr: Likewise.
518         * modules/strtok_r: Likewise.
519         * tests/test-dirname.c: Don't include "strdup.h", since
520         <string.h> now suffices.
521         * tests/test-memmem.c: Don't include "memmem.h", since
522         <string.h> now suffices.
523
524 2007-01-25  Bruno Haible  <bruno@clisp.org>
525
526         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
527         *resultp is 0.
528
529         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
530         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
531         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
532         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
533
534         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
535         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
536         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
537         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
538         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
539         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
540
541 2007-01-24  Bruno Haible  <bruno@clisp.org>
542
543         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
544         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
545         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
546         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
547         gl_FUNC_FTS_CORE.
548         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
549         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
550         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
551         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
552         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
553         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
554         gl_FUNC_FCHOWNAT.
555         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
556         gl_FUNC_STRFTIME.
557         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
558         Reported by Ralf Wildenhues.
559
560 2007-01-24  Bruno Haible  <bruno@clisp.org>
561
562         Drop AC_REQUIRE calls that are redundant with the module dependencies.
563         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
564         gl_GETADDRINFO.
565         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
566         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
567         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
568
569 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
570
571         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
572         Don't use 'exit'; just return from 'main'.
573         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
574
575         * lib/fnmatch_.h: Readjust white space and comments to match
576         glibc, to avoid spurious diffs.
577
578 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
579
580         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
581         2004-12-01 change by Jakub Jelinek, since this code won't compile
582         if !LIBC.  Problem reported by Bob Proulx.
583
584 2007-01-23  Bruno Haible  <bruno@clisp.org>
585
586         * lib/striconveh.c: Include c-strcaseeq.h.
587         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
588         * modules/striconveh (Depends-on): Add c-strcaseeq.
589
590 2007-01-23  Bruno Haible  <bruno@clisp.org>
591
592         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
593
594         * modules/c-strcaseeq: New file.
595         * lib/c-strcaseeq.h: New file.
596
597         * modules/streq: New file.
598         * lib/streq.h: New file.
599
600 2007-01-23  Bruno Haible  <bruno@clisp.org>
601
602         * modules/striconveha-tests: New file.
603         * tests/test-striconveha.c: New file.
604
605         * lib/striconveha.h: Include <stdbool.h>.
606         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
607         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
608         (mem_iconveha_notranslit): Renamed from mem_iconveha.
609         (mem_iconveha): New function.
610         (str_iconveha_notranslit): Renamed from str_iconveha.
611         (str_iconveha): New function.
612         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
613         c-strcase.
614
615 2007-01-23  Bruno Haible  <bruno@clisp.org>
616
617         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
618         encodings without forgiving before trying any encoding with handler.
619         (str_iconveha): Try all encodings without forgiving before trying any
620         encoding with handler.
621
622 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
623
624         Import the following changes from libc.
625
626         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
627
628         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
629
630         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
631
632         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
633         normal_bracket label.
634
635         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
636
637         [BZ #361]
638         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
639         to normal_bracket after fetching the next character.
640
641 2007-01-22  Bruno Haible  <bruno@clisp.org>
642
643         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
644         argument.
645         * lib/striconveh.c (iconv_carefully_1): New function.
646         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
647         argument.
648         (str_cd_iconveh): Update.
649         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
650         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
651         * tests/test-striconveh.c (MAGIC): New macro.
652         (new_offsets): New function.
653         (main): Test call with and without offsets.
654
655 2007-01-22  Bruno Haible  <bruno@clisp.org>
656
657         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
658         * modules/sys_select (Makefile.am): Likewise.
659         * modules/sys_socket (Makefile.am): Likewise.
660         * modules/sys_time (Makefile.am): Likewise.
661
662 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
663
664         * modules/gettimeofday (License): Change from GPL to LGPL, since
665         gettimeofday is a library function.
666
667 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
668
669         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
670
671 2007-01-21  Bruno Haible  <bruno@clisp.org>
672
673         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
674
675 2007-01-21  Bruno Haible  <bruno@clisp.org>
676
677         * modules/striconveha: New file.
678         * lib/striconveha.h: New file.
679         * lib/striconveha.c: New file.
680         * MODULES.html.sh (Internationalization functions): Add striconveha.
681         * lib/striconv.c (str_iconv): Optimize the case of an empty input
682         string.
683         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
684
685 2007-01-21  Bruno Haible  <bruno@clisp.org>
686
687         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
688         * lib/striconveh.c (str_iconveh): Likewise.
689
690 2007-01-21  Bruno Haible  <bruno@clisp.org>
691
692         * lib/striconveh.h (mem_iconveh): New declaration.
693         * lib/striconveh.c (mem_iconveh): New function.
694         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
695
696 2007-01-21  Bruno Haible  <bruno@clisp.org>
697
698         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
699
700         * lib/striconveh.h (mem_cd_iconveh): Change specification.
701         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
702         original result buffer.
703         (str_cd_iconveh): Update.
704         * tests/test-striconveh.c (main): Update.
705
706         * lib/striconv.h (mem_cd_iconv): Change specification.
707         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
708         result buffer.
709         (str_cd_iconv): Update.
710         * tests/test-striconv.c (main): Update.
711
712 2007-01-21  Bruno Haible  <bruno@clisp.org>
713
714         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
715
716 2007-01-20  Jim Meyering  <jim@meyering.net>
717
718         * lib/userspec.c (parse_with_separator): If a user or group string
719         starts with "+", skip the corresponding name-to-ID look-up, since
720         such a look-up must fail: user and group names may not include "+".
721
722 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
723
724         * lib/poll.c: Include sys/time.h and time.h unconditionally,
725         since we now assume the sys_time module.
726         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
727         check for sys/time.h; no longer needed.
728         * modules/poll (Depends-on): Depend on sys_time.
729
730 2007-01-18  Bruno Haible  <bruno@clisp.org>
731
732         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
733         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
734
735         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
736         gettimeofday.
737
738         * tests/test-gettimeofday.c: Include <time.h>.
739         (dummy): Remove variable.
740
741         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
742         gl_HEADER_SYS_TIME_H.
743         (gl_HEADER_SYS_TIME_H): New macro.
744
745         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
746         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
747         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
748         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
749         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
750         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
751         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
752         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
753         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
754         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
755         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
756
757         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
758         last change; it caused a compilation error when cross-compiling to
759         Cygwin.
760
761 2007-01-18  Jim Meyering  <jim@meyering.net>
762
763         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
764         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
765         than the race-prone "test -d sys || mkdir sys".
766         (configure.ac): Use AC_PROG_MKDIR_P.
767         * modules/sys_select: Likewise.
768         * modules/sys_socket: Likewise.
769         * modules/sys_time: Likewise.
770
771 2007-01-18  Eric Blake  <ebb9@byu.net>
772
773         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
774         replace gettimeofday.
775         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
776         name, to avoid infinite recursion.
777
778 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
779
780         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
781         module sys_time.
782         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
783         assume timespec.h defines struct timeval.
784         * lib/settime.c: Likewise.
785         * lib/utimens.c: Likewise.
786         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
787         since we now assume the gettimeofday module.
788         * lib/tempname.c (__gen_tempname): Likewise.
789         * lib/gettimeofday.h: Remove.
790         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
791         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
792         Include <time.h>, for 'time()'.
793         (localtime_buffer_addr): Also use this workaround if
794         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
795         to simplify the uses.  All uses changed.
796         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
797         that #undef is inside {}, and 'const' follows type name consistently.
798         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
799         (gettimeofday): Do not use the maximum possible value for
800         tv->tv_usec, since that might break usages other than ls.c.
801         Instead, we'll leave ls.c alone.  This undoes today's patch
802         by Bruno.  Add a compile-time warning for 1s-clock resolution;
803         we've never observed the problem but might as well keep the
804         canary.
805         * lib/nanosleep.c: Include timespec.h first, for interface check.
806         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
807         now assume the sys_time module.
808         * lib/tempname.c: Likewise.
809         * lib/timespec.h: Likewise.
810         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
811         needed.
812         * lib/strftime.c: Likewise.
813         * lib/timespec.h: Likewise.
814         * lib/posixtm.c: Include posixtm.h first, for interface check.
815         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
816         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
817         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
818         * lib/sys_time_.h: New file.
819         * lib/timespec.h (struct timespec): Use long int, not long.
820         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
821         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
822         Remove obsolescent call to AC_HEADER_TIME.
823         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
824         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
825         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
826         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
827         Likewise.
828         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
829         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
830         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
831         into the sys_time module.  Check for gettimeofday just once.
832         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
833         for gettimeofday signature to just check the signature.  Merely
834         compile it, since linking doesn't test signature.  Improve test for
835         whether gettimeofday.o is actually needed.
836         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
837         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
838         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
839         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
840         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
841         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
842         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
843         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
844         than worrying about sys/time.h.
845         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
846         Don't bother worrying about TIME_WITH_SYS_TIME.
847         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
848         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
849         * m4/sys_time_h.m4: New file.
850         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
851         Don't include sys/time.h.  Return from main rather than exiting.
852         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
853         all uses changed.
854         * modules/gethrxtime (Depends-on): Add sys_time.
855         * modules/gettime (Depends-on): Likewise.
856         * modules/gettimeofday (Depends-on): Likewise.
857         * modules/nanosleep (Depends-on): Likewise.
858         * modules/settime (Depends-on): Likewise.
859         * modules/tempname (Depends-on): Likewise.
860         * modules/utimens (Depends-on): Likewise.
861         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
862         (Include:) Change back to <sys/time.h>.
863         (Maintainer:) Add self.
864         * modules/sys_time: New file.
865         * modules/tempname (Depends-on): Add gettimeofday.
866         * tests/test-gettimeofday.c: Include <sys/time.h>
867         rather than gettimeofday.h.
868
869 2007-01-17  Bruno Haible  <bruno@clisp.org>
870
871         * gnulib-tool (func_get_license): Revert last patch. Instead, let
872         the license default to GPL.
873         (func_create_testdir): Don't complain if a module is LGPL and its
874         tests module depends on GPLed modules.
875
876 2007-01-17  Bruno Haible  <bruno@clisp.org>
877
878         * lib/gettimeofday.c (gettimeofday): Add code for the case
879         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
880         maximum possible value for tv->tv_usec, rather than the minimum one.
881
882 2005-10-08  Martin Lambers  <marlam@marlam.de>
883 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
884 2007-01-16  Bruno Haible  <bruno@clisp.org>
885
886         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
887         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
888         gl_FUNC_GETTIMEOFDAY.
889         (Include): Add gettimeofday.h.
890         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
891         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
892         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
893         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
894         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
895         * lib/gettimeofday.h: New file.
896         * lib/gettimeofday.c: Include <sys/timeb.h>.
897         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
898         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
899         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
900         fall back on time().
901
902         * tests/test-gettimeofday.c: New file.
903         * modules/gettimeofday-tests: New file.
904
905 2007-01-16  Eric Blake  <ebb9@byu.net>
906
907         * modules/fnmatch (Depends-on): Depend on wchar.
908         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
909         * m4/fnmatch.m4: Likewise.
910         * modules/mbchar (Makefile.am): Assume <wchar.h>.
911         * m4/mbchar.m4: Likewise.
912         * modules/mbswidth (Depends-on): Depend on wchar.
913         * lib/mbswidth.c: Assume <wchar.h>.
914         * m4/mbswidth.m4: Likewise.
915         * modules/quotearg (Depends-on): Depend on wchar.
916         * lib/quotearg.c: Assume <wchar.h>.
917         * m4/quotearg.m4: Likewise.
918         * modules/regex (Depends-on): Depend on wchar.
919         * lib/regex_internal.h: Assume <wchar.h>.
920         * m4/regex.m4: Likewise.
921         * modules/stdint (Depends-on): Depend on wchar.
922         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
923         * m4/stdint.m4: Likewise.
924         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
925         * modules/strftime (Depends-on): Depend on wchar.
926         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
927         * modules/strtol (Depends-on): Depend on wchar.
928         * lib/strtol.c: Assume <wchar.h>.
929         * modules/wcwidth (Depends-on): Depend on wchar.
930         * lib/wcwidth.h: Assume <wchar.h>.
931         * m4/wcwidth.m4: Likewise.
932
933 2007-01-16  Bruno Haible  <bruno@clisp.org>
934
935         * modules/csharpexec-script: New, created from...
936         * modules/csharpexec: ... this.
937
938 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
939
940         * modules/javaexec-script: New, created from...
941         * modules/javaexec: ... this.
942
943 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
944
945         * modules/poll (Dependencies): Add sys_select.
946
947 2007-01-15  Jim Meyering  <jim@meyering.net>
948
949         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
950         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
951         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
952         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
953
954 2007-01-15  Bruno Haible  <bruno@clisp.org>
955
956         * modules/striconveh: New file.
957         * lib/striconveh.h: New file.
958         * lib/striconveh.c: New file.
959         * MODULES.html.sh (Internationalization functions): Add striconveh.
960
961         * modules/striconveh-tests: New file.
962         * tests/test-striconveh.c: New file.
963
964 2007-01-15  Bruno Haible  <bruno@clisp.org>
965
966         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
967         not from GNU libiconv or GNU libc.
968
969 2007-01-15  Bruno Haible  <bruno@clisp.org>
970
971         * doc/gnulib-intro.texi (Copyright): Explain the different license
972         terms for module descriptions, autoconf macros, tests, documentation.
973
974 2007-01-14  Bruno Haible  <bruno@clisp.org>
975
976         * modules/striconv-tests: New file.
977         * tests/test-striconv.c: New file.
978
979 2007-01-14  Bruno Haible  <bruno@clisp.org>
980
981         * modules/iconv-tests: New file.
982         * tests/test-iconv.c: New file.
983
984 2007-01-14  Bruno Haible  <bruno@clisp.org>
985
986         * gnulib-tool (func_get_license): For test modules, use the license of
987         the main module.
988
989 2007-01-14  Bruno Haible  <bruno@clisp.org>
990
991         * modules/iconv (Include): Clarify that <iconv.h> can only be included
992         if iconv is found to exist.
993
994 2007-01-14  Bruno Haible  <bruno@clisp.org>
995
996         * modules/c-ctype-tests: New file.
997         * tests/test-c-ctype.c: New file.
998
999 2007-01-14  Bruno Haible  <bruno@clisp.org>
1000
1001         * modules/binary-io-tests: New file.
1002         * tests/test-binary-io.sh: New file.
1003         * tests/test-binary-io.c: New file.
1004
1005 2007-01-14  Bruno Haible  <bruno@clisp.org>
1006
1007         * modules/array-oset-tests: New file.
1008         * tests/test-array_oset.c: New file.
1009
1010 2007-01-14  Bruno Haible  <bruno@clisp.org>
1011
1012         * modules/array-list-tests: New file.
1013         * tests/test-array_list.c: New file.
1014
1015 2007-01-14  Bruno Haible  <bruno@clisp.org>
1016
1017         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1018         and make.
1019         Reported by Simon Josefsson in
1020         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1021
1022 2007-01-14  Bruno Haible  <bruno@clisp.org>
1023
1024         * modules/allocsa-tests: New file.
1025         * tests/test-allocsa.c: New file.
1026
1027 2007-01-14  Bruno Haible  <bruno@clisp.org>
1028
1029         * modules/fchdir (Depends-on): Add absolute-header.
1030         * modules/unistd (Depends-on): Likewise.
1031
1032 2006-12-30  Bruno Haible  <bruno@clisp.org>
1033
1034         * modules/fchdir: New file.
1035         * modules/unistd (Files): Add lib/unistd_.h.
1036         (Makefile.am): Generate unistd.h from unistd_.h.
1037         * lib/fchdir.c: New file.
1038         * lib/dirent_.h: New file.
1039         * lib/unistd_.h: New file.
1040         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1041         * m4/fchdir.m4: New file.
1042         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1043         (gl_HEADER_UNISTD): Invoke it.
1044         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1045         function.
1046         * lib/backupfile.c (opendir, closedir): Undefine.
1047         * lib/chown.c (open, close): Undefine.
1048         * lib/clean-temp.c (open, close): Undefine.
1049         * lib/copy-file.c (open, close): Undefine.
1050         * lib/execute.c (open, close): Undefine.
1051         * lib/fsusage.c (open, close): Undefine.
1052         * lib/gc-gnulib.c (open, close): Undefine.
1053         * lib/getcwd.c (opendir, closedir): Undefine.
1054         * lib/glob.c (opendir, closedir): Undefine.
1055         * lib/javacomp.c (open, close): Undefine.
1056         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1057         * lib/openat-proc.c (open, close): Undefine.
1058         * lib/pagealign_alloc.c (open, close): Undefine.
1059         * lib/pipe.c (open, close): Undefine.
1060         * lib/progreloc.c (open, close): Undefine.
1061         * lib/savedir.c (opendir, closedir): Undefine.
1062         * lib/utime.c (open, close): Undefine.
1063         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1064
1065 2007-01-10  Bruno Haible  <bruno@clisp.org>
1066
1067         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1068
1069 2007-01-12  Eric Blake  <ebb9@byu.net>
1070
1071         Provide a robust <wchar.h>.  Further simplifications are now
1072         possible in other modules, but not included here.
1073         * modules/wchar: New module.
1074         * m4/wchar.m4: New file.
1075         * lib/wchar_.h: Likewise.
1076         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1077         of the new module.
1078         * MODULES.html.sh (Extended multibyte and wide character utilities):
1079         New section.
1080
1081 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1082
1083         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1084         to a reasonable default for memory allocation.
1085         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1086         file system that reports garbage st_size values for symlinks.
1087         Problem reported by Liyang Hu.
1088
1089 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1090
1091         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1092         Emacs .#* auto-save files).
1093
1094 2007-01-11  Bruno Haible  <bruno@clisp.org>
1095
1096         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1097         directory.
1098
1099 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1100
1101         Use @...@ consistently in lib/wctype_.h.
1102         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1103         on it being set to 1 or 0.
1104         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1105         go back to AC_SUBSTing it.
1106         * modules/wctype (Makefile.am): Undo previous change.
1107
1108 2007-01-10  Eric Blake  <ebb9@byu.net>
1109
1110         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1111         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1112         * modules/wctype (Makefile.am): Likewise.
1113         Reported by Chris McGuire.
1114
1115 2007-01-10  Jim Meyering  <jim@meyering.net>
1116
1117         fts.c: a small readability/maintainability improvement
1118         * lib/fts.c (fts_read): Make this code slightly more readable and
1119         maintainable by hoisting the "sp->fts_cur = p" assignments to
1120         immediately follow the statements that set P.  Derived from
1121         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1122
1123 2007-01-10  Eric Blake  <ebb9@byu.net>
1124
1125         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1126         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1127         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1128         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1129         Reported by Chris McGuire.
1130
1131 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1132
1133         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1134         in sed script.
1135
1136 2007-01-09  Bruno Haible  <bruno@clisp.org>
1137
1138         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1139         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1140         variables.
1141         (func_module): Use them.
1142
1143 2007-01-09  Bruno Haible  <bruno@clisp.org>
1144
1145         * modules/unistr/base: New file.
1146         * lib/unistr.h: New file.
1147
1148         * modules/unistr/u8-to-u16: New file.
1149         * lib/unistr/u8-to-u16.c: New file.
1150
1151         * modules/unistr/u8-to-u32: New file.
1152         * lib/unistr/u8-to-u32.c: New file.
1153
1154         * modules/unistr/u16-to-u8: New file.
1155         * lib/unistr/u16-to-u8.c: New file.
1156
1157         * modules/unistr/u16-to-u32: New file.
1158         * lib/unistr/u16-to-u32.c: New file.
1159
1160         * modules/unistr/u32-to-u8: New file.
1161         * lib/unistr/u32-to-u8.c: New file.
1162
1163         * modules/unistr/u32-to-u16: New file.
1164         * lib/unistr/u32-to-u16.c: New file.
1165
1166         * modules/unistr/u8-check: New file.
1167         * modules/unistr/u16-check: New file.
1168         * modules/unistr/u32-check: New file.
1169         * lib/unistr/u8-check.c: New file.
1170         * lib/unistr/u16-check.c: New file.
1171         * lib/unistr/u32-check.c: New file.
1172
1173         * modules/unistr/u8-chr: New file.
1174         * modules/unistr/u16-chr: New file.
1175         * modules/unistr/u32-chr: New file.
1176         * lib/unistr/u8-chr.c: New file.
1177         * lib/unistr/u16-chr.c: New file.
1178         * lib/unistr/u32-chr.c: New file.
1179
1180         * modules/unistr/u8-cmp: New file.
1181         * modules/unistr/u16-cmp: New file.
1182         * modules/unistr/u32-cmp: New file.
1183         * lib/unistr/u8-cmp.c: New file.
1184         * lib/unistr/u16-cmp.c: New file.
1185         * lib/unistr/u32-cmp.c: New file.
1186
1187         * modules/unistr/u8-cpy: New file.
1188         * modules/unistr/u16-cpy: New file.
1189         * modules/unistr/u32-cpy: New file.
1190         * lib/unistr/u8-cpy.c: New file.
1191         * lib/unistr/u16-cpy.c: New file.
1192         * lib/unistr/u32-cpy.c: New file.
1193         * lib/unistr/u-cpy.h: New file.
1194
1195         * modules/unistr/u8-cpy-alloc: New file.
1196         * modules/unistr/u16-cpy-alloc: New file.
1197         * modules/unistr/u32-cpy-alloc: New file.
1198         * lib/unistr/u8-cpy-alloc.c: New file.
1199         * lib/unistr/u16-cpy-alloc.c: New file.
1200         * lib/unistr/u32-cpy-alloc.c: New file.
1201         * lib/unistr/u-cpy-alloc.h: New file.
1202
1203         * modules/unistr/u8-endswith: New file.
1204         * modules/unistr/u16-endswith: New file.
1205         * modules/unistr/u32-endswith: New file.
1206         * lib/unistr/u8-endswith.c: New file.
1207         * lib/unistr/u16-endswith.c: New file.
1208         * lib/unistr/u32-endswith.c: New file.
1209         * lib/unistr/u-endswith.h: New file.
1210
1211         * modules/unistr/u8-mblen: New file.
1212         * modules/unistr/u16-mblen: New file.
1213         * modules/unistr/u32-mblen: New file.
1214         * lib/unistr/u8-mblen.c: New file.
1215         * lib/unistr/u16-mblen.c: New file.
1216         * lib/unistr/u32-mblen.c: New file.
1217
1218         * modules/unistr/u8-mbtouc: New file.
1219         * modules/unistr/u16-mbtouc: New file.
1220         * modules/unistr/u32-mbtouc: New file.
1221         * lib/unistr/u8-mbtouc.c: New file.
1222         * lib/unistr/u16-mbtouc.c: New file.
1223         * lib/unistr/u32-mbtouc.c: New file.
1224
1225         * modules/unistr/u8-mbtouc-safe: New file.
1226         * modules/unistr/u16-mbtouc-safe: New file.
1227         * modules/unistr/u32-mbtouc-safe: New file.
1228         * lib/unistr/u8-mbtouc-safe.c: New file.
1229         * lib/unistr/u16-mbtouc-safe.c: New file.
1230         * lib/unistr/u32-mbtouc-safe.c: New file.
1231
1232         * modules/unistr/u8-move: New file.
1233         * modules/unistr/u16-move: New file.
1234         * modules/unistr/u32-move: New file.
1235         * lib/unistr/u8-move.c: New file.
1236         * lib/unistr/u16-move.c: New file.
1237         * lib/unistr/u32-move.c: New file.
1238         * lib/unistr/u-move.h: New file.
1239
1240         * modules/unistr/u8-next: New file.
1241         * modules/unistr/u16-next: New file.
1242         * modules/unistr/u32-next: New file.
1243         * lib/unistr/u8-next.c: New file.
1244         * lib/unistr/u16-next.c: New file.
1245         * lib/unistr/u32-next.c: New file.
1246
1247         * modules/unistr/u8-prev: New file.
1248         * modules/unistr/u16-prev: New file.
1249         * modules/unistr/u32-prev: New file.
1250         * lib/unistr/u8-prev.c: New file.
1251         * lib/unistr/u16-prev.c: New file.
1252         * lib/unistr/u32-prev.c: New file.
1253
1254         * modules/unistr/u8-set: New file.
1255         * modules/unistr/u16-set: New file.
1256         * modules/unistr/u32-set: New file.
1257         * lib/unistr/u8-set.c: New file.
1258         * lib/unistr/u16-set.c: New file.
1259         * lib/unistr/u32-set.c: New file.
1260         * lib/unistr/u-set.h: New file.
1261
1262         * modules/unistr/u8-startswith: New file.
1263         * modules/unistr/u16-startswith: New file.
1264         * modules/unistr/u32-startswith: New file.
1265         * lib/unistr/u8-startswith.c: New file.
1266         * lib/unistr/u16-startswith.c: New file.
1267         * lib/unistr/u32-startswith.c: New file.
1268         * lib/unistr/u-startswith.h: New file.
1269
1270         * modules/unistr/u8-stpcpy: New file.
1271         * modules/unistr/u16-stpcpy: New file.
1272         * modules/unistr/u32-stpcpy: New file.
1273         * lib/unistr/u8-stpcpy.c: New file.
1274         * lib/unistr/u16-stpcpy.c: New file.
1275         * lib/unistr/u32-stpcpy.c: New file.
1276         * lib/unistr/u-stpcpy.h: New file.
1277
1278         * modules/unistr/u8-stpncpy: New file.
1279         * modules/unistr/u16-stpncpy: New file.
1280         * modules/unistr/u32-stpncpy: New file.
1281         * lib/unistr/u8-stpncpy.c: New file.
1282         * lib/unistr/u16-stpncpy.c: New file.
1283         * lib/unistr/u32-stpncpy.c: New file.
1284         * lib/unistr/u-stpncpy.h: New file.
1285
1286         * modules/unistr/u8-strcat: New file.
1287         * modules/unistr/u16-strcat: New file.
1288         * modules/unistr/u32-strcat: New file.
1289         * lib/unistr/u8-strcat.c: New file.
1290         * lib/unistr/u16-strcat.c: New file.
1291         * lib/unistr/u32-strcat.c: New file.
1292         * lib/unistr/u-strcat.h: New file.
1293
1294         * modules/unistr/u8-strchr: New file.
1295         * modules/unistr/u16-strchr: New file.
1296         * modules/unistr/u32-strchr: New file.
1297         * lib/unistr/u8-strchr.c: New file.
1298         * lib/unistr/u16-strchr.c: New file.
1299         * lib/unistr/u32-strchr.c: New file.
1300
1301         * modules/unistr/u8-strcmp: New file.
1302         * modules/unistr/u16-strcmp: New file.
1303         * modules/unistr/u32-strcmp: New file.
1304         * lib/unistr/u8-strcmp.c: New file.
1305         * lib/unistr/u16-strcmp.c: New file.
1306         * lib/unistr/u32-strcmp.c: New file.
1307
1308         * modules/unistr/u8-strcpy: New file.
1309         * modules/unistr/u16-strcpy: New file.
1310         * modules/unistr/u32-strcpy: New file.
1311         * lib/unistr/u8-strcpy.c: New file.
1312         * lib/unistr/u16-strcpy.c: New file.
1313         * lib/unistr/u32-strcpy.c: New file.
1314         * lib/unistr/u-strcpy.h: New file.
1315
1316         * modules/unistr/u8-strcspn: New file.
1317         * modules/unistr/u16-strcspn: New file.
1318         * modules/unistr/u32-strcspn: New file.
1319         * lib/unistr/u8-strcspn.c: New file.
1320         * lib/unistr/u16-strcspn.c: New file.
1321         * lib/unistr/u32-strcspn.c: New file.
1322         * lib/unistr/u-strcspn.h: New file.
1323
1324         * modules/unistr/u8-strdup: New file.
1325         * modules/unistr/u16-strdup: New file.
1326         * modules/unistr/u32-strdup: New file.
1327         * lib/unistr/u8-strdup.c: New file.
1328         * lib/unistr/u16-strdup.c: New file.
1329         * lib/unistr/u32-strdup.c: New file.
1330         * lib/unistr/u-strdup.h: New file.
1331
1332         * modules/unistr/u8-strlen: New file.
1333         * modules/unistr/u16-strlen: New file.
1334         * modules/unistr/u32-strlen: New file.
1335         * lib/unistr/u8-strlen.c: New file.
1336         * lib/unistr/u16-strlen.c: New file.
1337         * lib/unistr/u32-strlen.c: New file.
1338         * lib/unistr/u-strlen.h: New file.
1339
1340         * modules/unistr/u8-strmblen: New file.
1341         * modules/unistr/u16-strmblen: New file.
1342         * modules/unistr/u32-strmblen: New file.
1343         * lib/unistr/u8-strmblen.c: New file.
1344         * lib/unistr/u16-strmblen.c: New file.
1345         * lib/unistr/u32-strmblen.c: New file.
1346
1347         * modules/unistr/u8-strmbtouc: New file.
1348         * modules/unistr/u16-strmbtouc: New file.
1349         * modules/unistr/u32-strmbtouc: New file.
1350         * lib/unistr/u8-strmbtouc.c: New file.
1351         * lib/unistr/u16-strmbtouc.c: New file.
1352         * lib/unistr/u32-strmbtouc.c: New file.
1353
1354         * modules/unistr/u8-strncat: New file.
1355         * modules/unistr/u16-strncat: New file.
1356         * modules/unistr/u32-strncat: New file.
1357         * lib/unistr/u8-strncat.c: New file.
1358         * lib/unistr/u16-strncat.c: New file.
1359         * lib/unistr/u32-strncat.c: New file.
1360         * lib/unistr/u-strncat.h: New file.
1361
1362         * modules/unistr/u8-strncmp: New file.
1363         * modules/unistr/u16-strncmp: New file.
1364         * modules/unistr/u32-strncmp: New file.
1365         * lib/unistr/u8-strncmp.c: New file.
1366         * lib/unistr/u16-strncmp.c: New file.
1367         * lib/unistr/u32-strncmp.c: New file.
1368
1369         * modules/unistr/u8-strncpy: New file.
1370         * modules/unistr/u16-strncpy: New file.
1371         * modules/unistr/u32-strncpy: New file.
1372         * lib/unistr/u8-strncpy.c: New file.
1373         * lib/unistr/u16-strncpy.c: New file.
1374         * lib/unistr/u32-strncpy.c: New file.
1375         * lib/unistr/u-strncpy.h: New file.
1376
1377         * modules/unistr/u8-strnlen: New file.
1378         * modules/unistr/u16-strnlen: New file.
1379         * modules/unistr/u32-strnlen: New file.
1380         * lib/unistr/u8-strnlen.c: New file.
1381         * lib/unistr/u16-strnlen.c: New file.
1382         * lib/unistr/u32-strnlen.c: New file.
1383         * lib/unistr/u-strnlen.h: New file.
1384
1385         * modules/unistr/u8-strpbrk: New file.
1386         * modules/unistr/u16-strpbrk: New file.
1387         * modules/unistr/u32-strpbrk: New file.
1388         * lib/unistr/u8-strpbrk.c: New file.
1389         * lib/unistr/u16-strpbrk.c: New file.
1390         * lib/unistr/u32-strpbrk.c: New file.
1391         * lib/unistr/u-strpbrk.h: New file.
1392
1393         * modules/unistr/u8-strrchr: New file.
1394         * modules/unistr/u16-strrchr: New file.
1395         * modules/unistr/u32-strrchr: New file.
1396         * lib/unistr/u8-strrchr.c: New file.
1397         * lib/unistr/u16-strrchr.c: New file.
1398         * lib/unistr/u32-strrchr.c: New file.
1399
1400         * modules/unistr/u8-strspn: New file.
1401         * modules/unistr/u16-strspn: New file.
1402         * modules/unistr/u32-strspn: New file.
1403         * lib/unistr/u8-strspn.c: New file.
1404         * lib/unistr/u16-strspn.c: New file.
1405         * lib/unistr/u32-strspn.c: New file.
1406         * lib/unistr/u-strspn.h: New file.
1407
1408         * modules/unistr/u8-strstr: New file.
1409         * modules/unistr/u16-strstr: New file.
1410         * modules/unistr/u32-strstr: New file.
1411         * lib/unistr/u8-strstr.c: New file.
1412         * lib/unistr/u16-strstr.c: New file.
1413         * lib/unistr/u32-strstr.c: New file.
1414         * lib/unistr/u-strstr.h: New file.
1415
1416         * modules/unistr/u8-strtok: New file.
1417         * modules/unistr/u16-strtok: New file.
1418         * modules/unistr/u32-strtok: New file.
1419         * lib/unistr/u8-strtok.c: New file.
1420         * lib/unistr/u16-strtok.c: New file.
1421         * lib/unistr/u32-strtok.c: New file.
1422         * lib/unistr/u-strtok.h: New file.
1423
1424         * modules/unistr/u8-uctomb: New file.
1425         * modules/unistr/u16-uctomb: New file.
1426         * modules/unistr/u32-uctomb: New file.
1427         * lib/unistr/u8-uctomb.c: New file.
1428         * lib/unistr/u16-uctomb.c: New file.
1429         * lib/unistr/u32-uctomb.c: New file.
1430
1431         * MODULES.html.sh (Unicode string functions): Add the new modules.
1432
1433 2007-01-08  Bruno Haible  <bruno@clisp.org>
1434
1435         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1436         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1437         subdirectories.
1438
1439 2007-01-08  Karl Berry  <karl@gnu.org>
1440
1441         * doc/error.texi: mention that main() fns must set program_name
1442         when progname is used.
1443
1444 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1445
1446         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1447         WCTYPE_H is empty, for the benefit of builds from non-distclean
1448         directories.  Problem reported by Eric Blake in
1449         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1450
1451 2007-01-08  Bruno Haible  <bruno@clisp.org>
1452
1453         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1454         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1455         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1456         PROVIDE_CANONICALIZE_FILENAME_MODE.
1457         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1458
1459 2007-01-08  Bruno Haible  <bruno@clisp.org>
1460
1461         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1462         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1463         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1464         * lib/fts.c: Likewise.
1465         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1466
1467 2006-12-25  Bruno Haible  <bruno@clisp.org>
1468
1469         * modules/utf8-ucs4-safe: New file.
1470         * lib/utf8-ucs4-safe.h: New file.
1471         * lib/unistr/utf8-ucs4-safe.c: New file.
1472
1473         * modules/utf16-ucs4-safe: New file.
1474         * lib/utf16-ucs4-safe.h: New file.
1475         * lib/unistr/utf16-ucs4-safe.c: New file.
1476
1477         * MODULES.html.sh (Unicode string functions): Add the new modules.
1478
1479 2007-01-08  Bruno Haible  <bruno@clisp.org>
1480
1481         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1482         (Depends-on): Add unitypes.
1483         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1484         (u8_mbtouc_aux): Move out to separate file.
1485         (u8_mbtouc): Use ucs4_t, uint8_t types.
1486         * lib/unistr/utf8-ucs4.c: New file.
1487
1488         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1489         (Depends-on): Add unitypes.
1490         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1491         (u16_mbtouc_aux): Move out to separate file.
1492         (u16_mbtouc): Use ucs4_t, uint16_t types.
1493         * lib/unistr/utf16-ucs4.c: New file.
1494
1495         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1496         (Depends-on): Add unitypes.
1497         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1498         (u8_uctomb_aux): Move out to separate file.
1499         (u8_uctomb): Use ucs4_t, uint8_t types.
1500         * lib/unistr/ucs4-utf8.c: New file.
1501
1502         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1503         (Depends-on): Add unitypes.
1504         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1505         (u16_uctomb_aux): Move out to separate file.
1506         (u16_uctomb): Use ucs4_t, uint16_t types.
1507         * lib/unistr/ucs4-utf16.c: New file.
1508
1509 2006-12-25  Bruno Haible  <bruno@clisp.org>
1510
1511         * modules/unitypes: New file.
1512         * lib/unitypes.h: New file.
1513         * MODULES.html.sh (func_all_modules): New section "Unicode string
1514         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1515         this section. Add unitypes.
1516
1517 2007-01-08  Bruno Haible  <bruno@clisp.org>
1518
1519         Avoid variable names that conflict with those from libtool.
1520         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1521         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1522         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1523         library_names_spec to acl_library_names_spec, hardcode_* to
1524         acl_hardcode_*.
1525         Reported by Ralf Wildenhues.
1526
1527 2007-01-08  Bruno Haible  <bruno@clisp.org>
1528
1529         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1530         definition.
1531         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1532         definition.
1533         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1534         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1535         definition.
1536         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1537         definition.
1538         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1539         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1540         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1541         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1542         definition.
1543         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1544         definition.
1545         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1546         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1547         GC_USE_<algorithm>.
1548         * lib/gc-libgcrypt.c: Likewise.
1549         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1550         * modules/gc-arctwo (configure.ac): Likewise.
1551         * modules/gc-des (configure.ac): Likewise.
1552         * modules/gc-hmac-md5 (configure.ac): Likewise.
1553         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1554         * modules/gc-md2 (configure.ac): Likewise.
1555         * modules/gc-md4 (configure.ac): Likewise.
1556         * modules/gc-md5 (configure.ac): Likewise.
1557         * modules/gc-random (configure.ac): Likewise.
1558         * modules/gc-rijndael (configure.ac): Likewise.
1559         * modules/gc-sha1 (configure.ac): Likewise.
1560
1561 2007-01-08  Bruno Haible  <bruno@clisp.org>
1562
1563         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1564         macro definition.
1565         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1566         definition.
1567         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1568         definition.
1569         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1570         * modules/fcntl-safer (configure.ac): Likewise.
1571         * modules/fopen-safer (configure.ac): Likewise.
1572         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1573         GNULIB_FWRITEERROR macro definition.
1574
1575 2007-01-08  Bruno Haible  <bruno@clisp.org>
1576
1577         * m4/gnulib-common.m4: New file.
1578         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1579         (func_get_filelist): Add m4/gnulib-common.m4.
1580
1581 2007-01-08  Bruno Haible  <bruno@clisp.org>
1582
1583         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1584         command.
1585
1586 2007-01-08  Jim Meyering  <jim@meyering.net>
1587
1588         Use a more robust test for a "can't happen" condition.
1589         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1590         narrowed the st_size value.  Presuming the "can't happen" condition
1591         is true, that narrowing could conceivably convert an invalid st_size
1592         value into a valid one.  Instead, use a change based on Matthew
1593         Woehlke's original patch.
1594
1595         Slight readability improvement: use an assert-like macro
1596         in place of literal "abort ()" uses.
1597         * lib/fts.c (fts_assert): Define.
1598         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1599         Use this macro instead of a bare 'abort'.
1600
1601 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1602
1603         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1604         simply work around them.
1605         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1606         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1607         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1608         Don't bother to define as macros, since the standard doesn't require it.
1609         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1610         longer worry about IRIX 5.3.
1611         (HAVE_WCTYPE_CTMP_BUG): Remove.
1612
1613 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1614
1615         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1616         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1617         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1618         Problems reported by Georg Schwarz for IRIX 5.3.
1619
1620         * gnulib-tool (autoconf_minversion): Take the maximum version number
1621         found, not the minimum.  Problem reported by James Youngman.
1622
1623 2007-01-03  Karl Berry  <karl@gnu.org>
1624
1625         * doc/error.texi: new file, explaining interaction with progname.
1626         * doc/gnulib.texi: include it.  Update copyright.
1627
1628 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1629
1630         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1631         AC_CANONICAL_HOST, to improve autobuild outputs.
1632
1633 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1634             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1635
1636         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1637         sockets, server sockets, and other file descriptors.  Count errors
1638         to compute the return value.  Reorder the code a bit to be easier
1639         to follow.  Don't set event bits that were not requested (except
1640         POLLERR and POLLHUP).
1641
1642 2007-01-01  Bruno Haible  <bruno@clisp.org>
1643
1644         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1645
1646 2007-01-03  Jim Meyering  <jim@meyering.net>
1647
1648         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1649
1650 2007-01-02  Bruno Haible  <bruno@clisp.org>
1651
1652         * modules/settime (Include): Require timespec.h.
1653         * modules/nanosleep (Include): Likewise.
1654
1655 2007-01-01  Bruno Haible  <bruno@clisp.org>
1656
1657         * gnulib-tool (func_emit_copyright_notice): Bump year.
1658         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1659
1660 2007-01-01  Bruno Haible  <bruno@clisp.org>
1661
1662         Improve support for OpenBSD.
1663         * build-aux/config.rpath (libname_spec): Export.
1664         (library_names_spec): New variable. Export.
1665         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1666         library_names_spec from the config.rpath output. Locate shared library
1667         through the name pattern in library_names_spec.
1668
1669 2007-01-01  Eric Blake  <ebb9@byu.net>
1670
1671         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1672
1673 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1674
1675         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1676         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1677         assume the C locale, and avoid an "eval" that could cause trouble.
1678         Problem with SORT reported by Bob Proulx.
1679
1680         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1681         Define.  Trivial patch from Henning Nielsen Lund, originally
1682         sent to bug-grep@gnu.org today.
1683
1684 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1685
1686         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1687         struct stat.  Problem reported by Henning Nielsen Lund.
1688         * lib/acl.c: Include acl.h first, to check interface.  Don't
1689         bother to include sys/types.h and sys/stat.h again.
1690
1691 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1692
1693         Import the following change from libc; problem reported by
1694         Sven Verdoolaege.
1695
1696         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1697
1698         [BZ #1373]
1699         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1700
1701 2006-12-28  Jim Meyering  <jim@meyering.net>
1702
1703         * build-aux/announce-gen: Do not assume that the package
1704         builds any of tar.gz, tar.bz2, and .xdelta files.
1705         Suggestion from Simon Josefsson.
1706
1707 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1708
1709         * modules/announce-gen: New file.
1710
1711 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1712
1713         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1714         handles its gotchas now.
1715         * lib/mbswidth.c: Likewise.
1716         * lib/wcwidth.h: Likewise.
1717         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1718         and iswcntrl; the wctype module does this stuff now.
1719         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1720         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1721         * modules/mbchar (Depends-on): Add wctype.
1722         * modules/mbswidth (Depends-on): Likewise.
1723         * modules/wcwidth (Depends-on): Likewise.
1724
1725 2006-12-27  Eric Blake  <ebb9@byu.net>
1726
1727         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1728         module uses more than what <wctype.h> is required to provide.
1729
1730 2006-12-26  Eric Blake  <ebb9@byu.net>
1731
1732         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1733
1734 2006-12-26  Eric Blake  <ebb9@byu.net>
1735
1736         * modules/absolute-header: New module.
1737         * modules/fcntl (Depends-on): Depend on it.
1738         * modules/inttypes (Depends-on): Likewise.
1739         * modules/stdint (Depends-on): Likewise.
1740         * modules/sys_stat (Depends-on): Likewise.
1741         * modules/wctype (Depends-on): Likewise.
1742         * MODULES.html.sh (Support for building libraries and
1743         executables): Document it.
1744
1745 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1746
1747         * gnulib-tool (SED): Remove, undoing previous change.
1748         The problem was that it broke coreutils on Solaris, because
1749         "sed --posix" leaked into a makefile.
1750         (sed): New alias, if 'alias' and GNU sed.
1751
1752 2006-12-24  Jim Meyering  <jim@meyering.net>
1753
1754         Work around an fchownat bug in glibc-2.4:
1755         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1756         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1757         in spite of the -P option.
1758         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1759         New macros.
1760         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1761         * modules/openat (Files): Add lib/fchownat.c.
1762         * lib/openat.c (fchownat): Don't define here.  Move to...
1763         * lib/fchownat.c: ...this new file.
1764
1765 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1766
1767         Fix bug reported by Bruno Haible in
1768         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1769         where quotearg.c didn't compile on Mac OS X 10.2 because it
1770         lacks <wchar.h> and wint_t.
1771         * lib/wctype_.h (__wctype_wint_t): New type.
1772         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1773         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1774         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1775         Arg is now of type __wctype_wint_t, not wint_t.
1776         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1777         substitute HAVE_WINT_T.
1778         * modules/wctype (Files): Add m4/wint_t.m4.
1779         (wctype.h): Substitute HAVE_WINT_T.
1780
1781 2006-12-23  Bruno Haible  <bruno@clisp.org>
1782
1783         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1784
1785 2006-12-23  Bruno Haible  <bruno@clisp.org>
1786
1787         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1788         S_ISLNK.
1789         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1790         mingw.
1791
1792 2006-12-22  Bruno Haible  <bruno@clisp.org>
1793
1794         * lib/copy-file.c: Include acl.h.
1795         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1796         Close the file descriptors only after being done with copy_acl.
1797         * modules/copy-file (Depends-on): Add acl.
1798
1799 2006-12-22  Bruno Haible  <bruno@clisp.org>
1800
1801         * gnulib-tool (SED): New variable.
1802         Use $SED instead of sed everywhere.
1803
1804 2006-12-22  Bruno Haible  <bruno@clisp.org>
1805
1806         * modules/no-c++: New file.
1807         * m4/no-c++.m4: New file.
1808         * MODULES.html.sh (Support for building libraries and executables):
1809         Add no-c++.
1810
1811 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1812
1813         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1814         Include <limits.h>, and use its INT_MAX to rewrite the
1815         j loop so that it does not overflow 'int'.  Problem reported by
1816         Ralf Wildenhues in
1817         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1818         Play it safe by shifting left by 1 rather than multiplying by 2,
1819         as GCC is less likely to optimize this away when the value
1820         is signed (when it assumes overflow leads to undefined behavior).
1821         Also, don't assume time_t uses two's complement.
1822
1823 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1824
1825         * MODULES.html.sh: New module wctype.
1826         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1827         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1828         <wctype.h>, since the new wctype module should fix this.
1829         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1830         the wctype module should arrange for it.
1831         * lib/regex_internal.h: Likewise.
1832         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1833         since the wctype module should handle this now.
1834         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1835         * modules/fnmatch (Depends-on): Add wctype.
1836         * modules/quotearg (Depends-on): Likewise.
1837         * modules/regex (Depends-on): Likewise.
1838
1839 2006-12-19  Bruno Haible  <bruno@clisp.org>
1840
1841         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1842         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1843
1844 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1845
1846         * modules/savewd (Depends-on): Fix dependency on fcntl.
1847
1848 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1849
1850         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1851         conforms to C99, rather than relying on the user's environment
1852         setting of STDINT_H.
1853
1854 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1855         and Eric Blake  <ebb9@byu.net>
1856
1857         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1858         This is more consistent with the other defines here.
1859         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1860         Port to z/OS.  Problem reported by Paul Gilmartin.
1861         Change local vars to use gl_ prefix rather than ac_.
1862         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1863         with other defines.
1864         * modules/double-slash-root: New module.
1865         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1866         (Depends-on): Add double-slash-root.
1867         * MODULES.html.sh (File system functions): Mention new module.
1868
1869 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1870
1871         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1872         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1873         This is for the benefit of gzip, which doesn't do i18n.
1874
1875 2006-12-12  Jim Meyering  <jim@meyering.net>
1876
1877         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1878         Reported by Andreas Schwab <schwab@suse.de>.
1879
1880 2006-12-12  Bruno Haible  <bruno@clisp.org>
1881
1882         Merge these changes.
1883         2006-09-05  Bruno Haible  <bruno@clisp.org>
1884         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1885         iconv_alloc succeeded.
1886         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1887         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1888         test for " && dest " at the end - dest is always != NULL there. Call
1889         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1890         with 2xNULL arguments, also to flush the state storage. Handle the
1891         IRIX iconv behaviour. Realloc the final result, to throw away unused
1892         memory.
1893
1894 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1895
1896         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1897         and fchmodat unconditionally, since glibc 2.4 has them.
1898         Problem reported by Arkadiusz Miskiewicz.
1899
1900 2006-12-10  Bruno Haible  <bruno@clisp.org>
1901
1902         * gnulib-tool (func_import): Show the include files only for those
1903         modules that are copied and specified.
1904         Reported by Karl Berry.
1905
1906 2006-12-08  Jim Meyering  <jim@meyering.net>
1907
1908         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
1909         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
1910
1911         * build-aux/announce-gen: Add two new options, both optional:
1912         --bootstrap-tools=TOOL_LIST
1913               a comma-separated list of tools, e.g.,
1914               autoconf,automake,bison,gnulib
1915         --gnulib-snapshot-date=DATE
1916               if gnulib is in the bootstrap tool list,
1917               then report this as the snapshot date.
1918               If not specified, use the current date/time.
1919               If you specify a date here, be sure it's UTC.
1920
1921 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1922
1923         * tests/test-argp-2.sh: Fix test to match actual output.
1924         (func_compare): Fix sed script to be portable.
1925
1926 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
1927
1928         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
1929         workaround for this case.  It is not autoconfigured now; offhand
1930         it's hard to see how to autoconfigure it.
1931
1932 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
1933
1934         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
1935         a directory that is about to be chowned.  Such a directory's
1936         initial file permissions should permit the owner only and this
1937         should not be changed until after the chown, since the group and
1938         other bits would be incorrect if they granted permission before
1939         the chown.
1940
1941         Fix porting problem for iswctype reported by Georg Schwarz in:
1942         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
1943         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
1944         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
1945         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
1946         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
1947
1948 2006-12-03  Jim Meyering  <jim@meyering.net>
1949
1950         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
1951         p->fts_statp may not yet be defined.
1952         (fts_read): Instead, set it in the caller, once p->fts_statp is
1953         sure to be defined, and corresponds to a top-level directory.
1954         This bug made du -x fail.  Here's the coreutils test case:
1955         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
1956         Reported by Mike Frysinger.
1957
1958 2006-12-01  Jim Meyering  <jim@meyering.net>
1959
1960         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
1961         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
1962         Reported by Simon Josefsson.
1963
1964 2006-11-30  Jim Meyering  <jim@meyering.net>
1965
1966         * m4/warning.m4: Use the all-permissive copyright notice
1967         recommended by RMS (rather than LGPL).
1968         * m4/vararrays.m4: Likewise.
1969         * m4/flexmember.m4: Likewise.
1970
1971 2006-11-29  Bruno Haible  <bruno@clisp.org>
1972
1973         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
1974         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
1975         using +=.
1976         Reported by Simon Josefsson <simon@josefsson.org>.
1977
1978 2006-11-28  James Youngman <jay@gnu.org>
1979
1980         * README: Advise users that they might find the bug-gnulib@gnu.org
1981         and autotools-announce@gnu.org mailing lists useful.
1982
1983 2006-11-28  Bruno Haible  <bruno@clisp.org>
1984
1985         * m4/ptrdiff_max.m4: Remove file.
1986
1987 2006-11-21  Bruno Haible  <bruno@clisp.org>
1988
1989         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
1990         _AC_COMPUTE_INT.
1991         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1992         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
1993         _AC_COMPUTE_INT.
1994         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1995         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
1996         _AC_COMPUTE_INT.
1997         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
1998
1999 2006-11-28  Jim Meyering  <jim@meyering.net>
2000
2001         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2002         warning from "gcc -Wshadow" about shadowing the builtin.
2003
2004 2006-11-27  Bruno Haible  <bruno@clisp.org>
2005
2006         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2007         _AC_COMPUTE_INT.
2008         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2009
2010 2006-11-27  Bruno Haible  <bruno@clisp.org>
2011             Paul Eggert  <eggert@cs.ucla.edu>
2012
2013         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2014
2015 2006-11-26  Bruno Haible  <bruno@clisp.org>
2016
2017         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2018         noinst_LTLIBRARIES.
2019
2020 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2021             Bruno Haible  <bruno@clisp.org>
2022
2023         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2024         if compiling with "gcc -ansi".
2025
2026 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2027
2028         Fix some incompatibilities with gcc -ansi -pedantic.
2029         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2030         if compiling pedantically with GCC, unless it's C99 or later.
2031         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2032         it mishandles gcc -ansi -pedantic as well.
2033         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2034         if gcc -pedantic.
2035         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2036         initializers for struct if -pedantic, unless it's C99 or later.
2037
2038 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2039
2040         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2041         Don't close an fd more than once. Identical atimes indicate
2042         success, not failure.
2043
2044 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2045
2046         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2047
2048 2006-11-23  Jim Meyering  <jim@meyering.net>
2049
2050         * build-aux/announce-gen: New file.  From coreutils.
2051
2052 2006-11-22  Jim Meyering  <jim@meyering.net>
2053
2054         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2055         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2056         (fts_read): Use a temporary to narrow the overused st_size member
2057         before using it in a switch statement.  Reported by Matthew Woehlke.
2058
2059         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2060         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2061
2062 2006-11-20  Bruno Haible  <bruno@clisp.org>
2063
2064         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2065         changequote instead of pairs of brackets.
2066         Reported by Andreas Schwab <schwab@suse.de>.
2067
2068 2006-11-21  Jim Meyering  <jim@meyering.net>
2069
2070         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2071         so as to remain compatible with older compilers.
2072         Patch from Michael Deutschmann.
2073
2074 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2075
2076         * MODULES.html.sh (File system functions): Add openat.
2077
2078         * lib/openat.h (rpl_fstatat): New macro, if
2079         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2080         (fstatat): Define to rpl_fstatat under the same conditions,
2081         unless COMPILING_FSTATAT.
2082         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2083         seems to have the bug.
2084         * lib/fstatat.c: New file.
2085         * modules/openat (Files): Add it.
2086
2087 2006-11-20  Bruno Haible  <bruno@clisp.org>
2088
2089         * Makefile: New file.
2090
2091 2006-11-20  Jim Meyering  <jim@meyering.net>
2092
2093         The beginnings of syntax-related checks for gnulib.
2094         * lib/Makefile: New file.
2095         * lib/t-idcache: New script.  Ensure that the two halves of
2096         idcache.c stay in sync.
2097
2098         * lib/idcache.c: Adjust comments in user- and group- portions to
2099         be more accurate, and to be consistent with one another.
2100
2101 2006-11-20  Jim Meyering  <jim@meyering.net>
2102
2103         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2104         continue using the flexible array member (thus, this module performs
2105         half as many malloc calls), with the addition that...
2106         (getgroup, getuser): Consistently record a non-match via an empty
2107         "name" string, and map an empty string match to a NULL return value.
2108         * modules/idcache (Depends-on): Re-add flexmember.
2109
2110         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2111         (getuidbyname, getgroup, getgidbyname): Likewise.
2112
2113         Use cleaner syntax: NULL rather than 0.
2114         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2115
2116 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2117
2118         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2119         It mishandled the case where the group was missing.
2120         Problem reported by Greg Schafer.
2121         * modules/idcache: Likewise.
2122
2123 2006-11-18  Jim Meyering  <jim@meyering.net>
2124
2125         * check-module (%exempt_header): Add exception for some
2126         conditionally-included headers.
2127
2128         * modules/i-ring (Depends-on): Add verify.
2129         (License): Change to LGPL.
2130
2131 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2132
2133         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2134         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2135         and inttostr.h.  Use snprintf rather than uinttostr, so that
2136         LGPLed code doesn't depend on GPLed.
2137
2138 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2139
2140         * modules/inline (License): Change from GPL to LGPL.
2141
2142 2006-11-17  Jim Meyering  <jim@meyering.net>
2143
2144         * modules/d-type (License): Switch to LGPL.
2145
2146 2006-11-15  Bruno Haible  <bruno@clisp.org>
2147
2148         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2149
2150 2006-11-15  Eric Blake  <ebb9@byu.net>
2151
2152         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2153         the module dependency.
2154
2155 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2156             Bruno Haible  <bruno@clisp.org>
2157
2158         * gnulib-tool (func_create_testdir): Add license consistency check.
2159
2160 2006-11-15  Eric Blake  <ebb9@byu.net>
2161
2162         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2163         random "(cached)" in configure output.
2164
2165 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2166
2167         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2168         test for conforming inttypes.h is both announced and cached.
2169
2170         * MODULES.html.sh (seen_modules, seen_files): New variables.
2171         (func_module): Rewrite to use a few less gnulib-tool and sed
2172         invocations.  Avoid a couple of quadratic algorithms for ...
2173         (missed_modules, missed_files): ... these, with ...
2174         (func_append, func_tmpdir): ... these new functions, from
2175         gnulib-tool.  Analogously, install traps for cleanup.
2176
2177         * tests/test-gc.c (main): Remove unused variables.
2178         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2179
2180 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2181
2182         * modules/inttostr (License): Change to LGPL.
2183
2184 2006-11-14  Eric Blake  <ebb9@byu.net>
2185
2186         * modules/tempname (License): Change to LGPL.
2187
2188 2006-11-14  Eric Blake  <ebb9@byu.net>
2189
2190         * doc/functions.texi (Function Portability): *printf functions on
2191         Cygwin now understand all POSIX size specifiers.
2192
2193 2006-11-14  Bruno Haible  <bruno@clisp.org>
2194
2195         * modules/c-ctype (License): Change to LGPL.
2196
2197 2006-11-12  Bruno Haible  <bruno@clisp.org>
2198
2199         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2200         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2201         for GNOME libraries, for which the include files are installed in
2202         subdirectories of $prefix/include.
2203
2204 2006-11-12  Bruno Haible  <bruno@clisp.org>
2205
2206         * m4/lib-link.m4: Require at least autoconf-2.54.
2207         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2208         name to underscores for the --with option.
2209
2210 2006-11-13  Bruno Haible  <bruno@clisp.org>
2211
2212         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2213         the tests directory.
2214         Reported by Ralf Wildenhues.
2215
2216 2006-11-13  Bruno Haible  <bruno@clisp.org>
2217
2218         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2219         (func_emit_initmacro_end): Undo the override here.
2220         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2221         Works around the famous automake error in coreutils.
2222
2223 2006-11-13  Eric Blake  <ebb9@byu.net>
2224
2225         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2226         element, not its node.
2227
2228 2006-11-12  Bruno Haible  <bruno@clisp.org>
2229
2230         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2231         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2232
2233 2006-11-12  Bruno Haible  <bruno@clisp.org>
2234
2235         * gnulib-tool: New option --local-symlink.
2236         (func_usage): Document it.
2237         (lsymbolic): New variable.
2238         (func_import, func_create_testdir): If --symlink was not specified,
2239         test whether --local-symlink was specified and the file comes from
2240         the local_gnulib_dir.
2241
2242 2006-11-12  Bruno Haible  <bruno@clisp.org>
2243
2244         * gnulib-tool (func_ln): New function.
2245         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2246
2247 2006-11-12  Bruno Haible  <bruno@clisp.org>
2248
2249         Finish support for source files in subdirectories.
2250         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2251         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2252         AUTOMAKE_OPTIONS.
2253         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2254
2255 2006-11-12  Bruno Haible  <bruno@clisp.org>
2256
2257         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2258         EXTRA_lib_SOURCES augmentation.
2259         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2260
2261 2006-11-12  Jim Meyering  <jim@meyering.net>
2262
2263         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2264         file descriptors.  This also averts a failure on systems with
2265         native openat support when a traversed directory lacks "x" access.
2266         * lib/fts_.h: Include "i-ring.h"
2267         (struct FTS) [fts_fd_ring]: New member.
2268         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2269         (FCHDIR): Add parentheses.
2270         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2271         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2272         When descending, rather than simply closing the previous
2273         fts_cwd_fd value, push that file descriptor onto the ring.
2274         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2275         (fts_open): Initialize the new fd_ring member.
2276         (fts_close): Clear the ring.
2277         (fts_safe_changedir): When possible, use our new fd_ring to skip
2278         the diropen and fstat and dev/ino comparison that would normally
2279         accompany a virtual `chdir ("..")'.
2280
2281         * modules/fts (Depends-on): Add i-ring.
2282         * modules/i-ring: New module.
2283         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2284         * m4/i-ring.m4: New file.
2285
2286 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2287
2288         * gnulib-tool (func_create_testdir): Fix replacement of
2289         `build-aux' in configure.ac.  Run autotools in gltests
2290         subdirectory.
2291         (func_create_testdir, func_create_megatestdir, test): There is
2292         no need for '--force' in most autotool invocations in a new
2293         tree.  Actually fail the whole test if any of the tools, or the
2294         configure or make stages fail.
2295
2296         Sync from Automake.
2297         * build-aux/gnupload: Revert last change.  Add pointer to upload
2298         instructions of the GNU Maintenance Instructions.
2299         Suggestion by Karl Berry.
2300
2301 2006-11-10  Jim Meyering  <jim@meyering.net>
2302
2303         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2304
2305 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2306
2307         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2308         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2309         (bind_textdomain_codeset) [! ENABLE_NLS]:
2310         Evaluate all the arguments.  That way, callers get compatible behavior
2311         if the arguments have side effects.  Also, it avoids some GCC
2312         diagnostics in some cases; Joel E. Denny reported problems when Bison
2313         was configured with --enable-gcc-warnigs.
2314
2315 2006-11-10  Jim Meyering  <jim@meyering.net>
2316
2317         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2318         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2319         account.
2320
2321 2006-11-10  Jim Meyering  <jim@meyering.net>
2322
2323         * modules/inline: New file/module.
2324         * modules/xalloc (Files): Remove m4/inline.m4.
2325         (Depends-on): Add inline, instead.
2326         * modules/oset: Likewise.
2327         * modules/list: Likewise.
2328
2329 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2330
2331         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2332         Problem reported by Matthew Woehlke.
2333
2334 2006-11-09  Bruno Haible  <bruno@clisp.org>
2335
2336         * lib/tempname.c (gen_tempname): Remove variant that invokes
2337         __gen_tempname.
2338         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2339         __gen_tempname.
2340
2341 2006-11-08  Bruno Haible  <bruno@clisp.org>
2342
2343         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2344         to 'yes' instead of 'cross-compiling'.
2345
2346 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2347
2348         * lib/quotearg.h (quotearg_free): New decl.
2349         * lib/quotearg.c (quotearg_free): New function.
2350         (slot0, nslots, slotvec0, slotvec):
2351         Now file-scope so that quotearg_free can get at them.
2352
2353 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2354
2355         Sync from Automake.
2356         * build-aux/gnupload: Add missing 'gnu' to example URL.
2357         Report by Karl Berry.
2358
2359 2006-11-08  Bruno Haible  <bruno@clisp.org>
2360
2361         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2362         Suggested by Paul Eggert.
2363
2364 2006-11-08  Jim Meyering  <jim@meyering.net>
2365
2366         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2367         It's already included if !_LIBC.
2368         (fts_safe_changedir): Add a comment.
2369
2370 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2371
2372         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2373         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2374         Matthew Woehlke.
2375
2376         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2377         definitions up, to avoid colliding with change below.
2378         (static_inline) [HAVE_INLINE]: New macro.
2379         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2380         Provide extern decls when !HAVE_INLINE.  Do not define unless
2381         static_inline is defined, either by us or by xmalloc.c.  Use
2382         static_inline rather than static inline.
2383         (XCALLOC): Optimize sizeof(T) = 1 case.
2384         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2385
2386 2006-11-07  Bruno Haible  <bruno@clisp.org>
2387
2388         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2389         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2390         AC_C_INLINE.
2391         * modules/xalloc (Files): Add m4/inline.m4.
2392
2393 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2394
2395         * README: Fix typo.
2396         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2397         (Miscellanous Notes): ...from this.
2398
2399 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2400
2401         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2402         Mention that offsetof should be used instead of sizeof.
2403         From Bruno Haible.
2404
2405 2006-11-07  Bruno Haible  <bruno@clisp.org>
2406
2407         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2408
2409 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2410
2411         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2412         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2413         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2414         (gl_tree_add_before, gl_tree_add_after):
2415         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2416         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2417         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2418         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2419         (gl_linked_add_after, gl_linked_add_at): Likewise.
2420         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2421         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2422         (gl_tree_add_before, gl_tree_add_after): Likewise.
2423         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2424         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2425         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2426
2427 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2428
2429         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2430
2431 2006-11-06  Bruno Haible  <bruno@clisp.org>
2432
2433         * m4/inline.m4: New file.
2434         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2435         * modules/list (Files): Add m4/inline.m4.
2436         * modules/oset (Files): Likewise.
2437
2438 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2439
2440         * lib/idcache.c: Include <stddef.h>, for offsetof.
2441         (struct userid.name): Change from char * to a flexible array member.
2442         All uses changed.
2443         * modules/idcache (Depends-on): Add flexmember.
2444
2445         * MODULES.html.sh (Core language properties): New module flexmember.
2446         * modules/flexmember, m4/flexmember.m4: New files.
2447
2448         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2449         inline functions that are identical with the old xnmalloc_inline,
2450         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2451         that we can avoid some unnecessary integer multiplications and
2452         divisions in the common case where the element size is known at
2453         compile time.
2454         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2455         needed.
2456         (xnboundedmalloc): Remove.
2457         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2458         arguments, for consistency with rest of this header.
2459         (xcharalloc): Rewrite using XNMALLOC.
2460         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2461         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2462         versions have been moved to lib/xalloc.h and renamed to be the
2463         non-*_inline versions.
2464         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2465         and xnrealloc functions, since those functions are now inline and
2466         now call us.
2467         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2468         renaming described above.
2469         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2470         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2471         captures the dependency in AC_C_INLINE.
2472
2473         New module canonicalize-lgpl, proposed by Charles Wilson in
2474         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2475         with a few small changes afterwards.
2476         * MODULES.html.sh (File system functions): New module
2477         canonicalize-lgpl.
2478         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2479         and canonicalize_file_name.
2480         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2481         * modules/canonicalize-lgpl: New files.
2482
2483 2006-11-05  Bruno Haible  <bruno@clisp.org>
2484
2485         * gnulib-tool (func_import, func_create_testdir): Create directories
2486         also for files in subdirectories of lib/.
2487
2488 2006-11-05  Bruno Haible  <bruno@clisp.org>
2489
2490         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2491         ANSI C compliant.
2492
2493 2006-11-03  Bruno Haible  <bruno@clisp.org>
2494
2495         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2496         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2497         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2498         (xnboundedmalloc): New inline function.
2499         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2500         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2501         xmalloc.
2502         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2503         xmalloc.
2504         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2505         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2506         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2507         xmalloc.
2508         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2509         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2510         xmalloc.
2511         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2512         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2513         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2514         xmalloc.
2515         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2516         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2517         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2518         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2519         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2520         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2521         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2522
2523 2006-11-03  Bruno Haible  <bruno@clisp.org>
2524
2525         * lib/c-ctype.h [C++]: Define functions without name mangling.
2526         * lib/fwriteerror.h [C++]: Likewise.
2527         * lib/gcd.h [C++]: Likewise.
2528         * lib/linebreak.h [C++]: Likewise.
2529
2530 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2531
2532         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2533         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2534         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2535         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2536         Check for functions and headers just once.
2537         Check for declaration of canonicalize_file_name.
2538         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2539
2540 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2541
2542         * gnulib-tool (func_import): Fix typo in actioncmd.
2543
2544 2006-11-02  Bruno Haible  <bruno@clisp.org>
2545
2546         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2547         newline sequence in the Makefile.am snippet as a space, like "make"
2548         does.
2549         Reported by Roger Persson <perrog@gmail.com>.
2550
2551 2006-11-01  Bruno Haible  <bruno@clisp.org>
2552
2553         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2554         already declared in <string.h>.
2555         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2556
2557 2006-11-01  Bruno Haible  <bruno@clisp.org>
2558
2559         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2560         * lib/strcase.h: Include <string.h>.
2561         (strcasecmp): Define to rpl_strcasecmp here.
2562
2563 2006-11-01  Bruno Haible  <bruno@clisp.org>
2564
2565         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2566
2567 2006-11-01  Eric Blake  <ebb9@byu.net>
2568
2569         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2570
2571         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2572
2573 2006-10-29  Bruno Haible  <bruno@clisp.org>
2574
2575         Make it compile in C++ mode.
2576         * lib/full-write.c (full_rw): Add a cast.
2577
2578 2006-11-01  Bruno Haible  <bruno@clisp.org>
2579
2580         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2581         be POSIX compliant.
2582         Reported by Roger Persson <perrog@gmail.com>.
2583
2584 2006-11-01  Eric Blake  <ebb9@byu.net>
2585
2586         * lib/getopt_.h: Fix comments.
2587
2588 2006-10-31  Eric Blake  <ebb9@byu.net>
2589
2590         * modules/tmpdir (Depends-on): Add sys_stat.
2591         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2592         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2593         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2594         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2595         tempname.
2596
2597 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2598
2599         Avoid some C++ diagnostics reported by Bruno Haible.
2600         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2601         xmalloc.
2602         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2603         (struct slotvec): Move to top level.
2604         (quotearg_n_options): Rewrite to avoid xmalloc.
2605         * lib/xalloc.h (xcharalloc): New function.
2606         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2607         [defined __cplusplus]: Add function template that provides result
2608         type propagation.  This part of the change is from Bruno Haible.
2609
2610 2006-10-29  Bruno Haible  <bruno@clisp.org>
2611
2612         Make it compile in C++ mode.
2613         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2614         * lib/strnlen1.c (strnlen1): Cast memchr result.
2615         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2616         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2617         (create_temp_dir): Rename local variable 'template'.
2618         (compile_csharp_using_sscli): Add cast.
2619         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2620         * lib/findprog.c (find_in_path): Likewise.
2621         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2622         * lib/wait-process.c (register_slave_subprocess): Likewise.
2623
2624 2006-10-22  Bruno Haible  <bruno@clisp.org>
2625
2626         * modules/tsearch: New file.
2627         * lib/tsearch.h: New file.
2628         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2629         * m4/tsearch.m4: New file.
2630         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2631
2632 2006-10-29  Eric Blake  <ebb9@byu.net>
2633
2634         * lib/arcfour.c: Assume config.h.
2635         * lib/arctwo.c: Likewise.
2636         * lib/base64.c: Likewise.
2637         * lib/check-version.c: Likewise.
2638         * lib/crc.c: Likewise.
2639         * lib/des.c: Likewise.
2640         * lib/gc-gnulib.c: Likewise.
2641         * lib/gc-libgcrypt.c: Likewise.
2642         * lib/gc-pbkdf2-sha1.c: Likewise.
2643         * lib/getaddrinfo.c: Likewise.
2644         * lib/getdelim.c: Likewise.
2645         * lib/getline.c: Likewise.
2646         * lib/hmac-md5.c: Likewise.
2647         * lib/hmac-sha1.c: Likewise.
2648         * lib/iconvme.c: Likewise.
2649         * lib/md2.c: Likewise.
2650         * lib/md4.c: Likewise.
2651         * lib/memxor.c: Likewise.
2652         * lib/read-file.c: Likewise.
2653         * lib/readline.c: Likewise.
2654         * lib/rijndael-alg-fst.c: Likewise.
2655         * lib/rijndael-api-fst.c: Likewise.
2656         * lib/xgetdomainname.c: Likewise.
2657
2658 2006-10-28  Eric Blake  <ebb9@byu.net>
2659
2660         * lib/xstrndup.c: Assume config.h.
2661
2662 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2663
2664         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2665         stat-macros.h is now for our own macros, whereas stat_h is for
2666         macros in the <sys/stat.h> name space.
2667         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2668         (STAT_MACROS_H): Remove.
2669         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2670         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2671         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2672         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2673         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2674         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2675         Move these macros to ...
2676         * lib/stat_.h: here.  Don't include stat-macros.h.
2677         * lib/canonicalize.c: Don't include stat-macros.h.
2678         * lib/chown.c: Likewise.
2679         * lib/euidaccess.c: Likewise.
2680         * lib/file-type.c: Likewise.
2681         * lib/filemode.c: Likewise.
2682         * lib/glob.c: Likewise.
2683         * lib/isapipe.c: Likewise.
2684         * lib/lchown.c: Likewise.
2685         * lib/lstat.c: Likewise.
2686         * lib/mkdir-p.c: Likewise.
2687         * lib/rmdir.c: Likewise.
2688         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2689         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2690         unless mkdir isn't declared, to speed up 'configure'.
2691         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2692         would define all the S_* symbols.
2693         * modules/canonicalize (Depends-on):
2694         Depend on sys_stat, not stat-macros.
2695         * modules/chown: Likewise.
2696         * modules/euidaccess: Likewise.
2697         * modules/filemode: Likewise.
2698         * modules/file-type: Likewise.
2699         * modules/glob: Likewise.
2700         * modules/isapipe: Likewise.
2701         * modules/lchown: Likewise.
2702         * modules/lstat: Likewise.
2703         * modules/mkancesdirs: Likewise.
2704         * modules/rmdir: Likewise.
2705         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2706         * modules/modechange: Likewise.
2707         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2708         (configure.ac): Remove gl_STAT_MACROS.
2709         * modules/sys_stat (Depends-on): Remove stat-macros.
2710
2711 2006-10-27  Bruno Haible  <bruno@clisp.org>
2712
2713         * m4/signed.m4: Remove file.
2714         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2715         invocation.
2716         * modules/vasnprintf (Files): Remove m4/signed.m4.
2717
2718 2006-10-27  Bruno Haible  <bruno@clisp.org>
2719
2720         Update to GNU gettext 0.16.
2721         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2722         m4/inttypes-h.m4, m4/signed.m4.
2723         * m4/gettext.m4: Update to GNU gettext 0.16.
2724         * m4/intl.m4: New file, from GNU gettext.
2725         * m4/intldir.m4: New file, from GNU gettext.
2726         * config/srclist.txt: Update
2727
2728 2006-10-27  Eric Blake  <ebb9@byu.net>
2729
2730         * MODULES.html.sh: Document tempname.
2731         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2732         dependencies.
2733         (Files): Move lib/tempname.c...
2734         * modules/tempname: ...to this new module.
2735         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2736         (gl_PREREQ_TEMPNAME): Move...
2737         * m4/tempname.m4: ...to this new file.
2738         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2739         * modules/sys_stat (Depends-on): Add stat-macros.
2740         * lib/stat_.h (includes): Pick up stat macros.
2741         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2742         if stat macros are broken.
2743         * lib/tempname.c (includes): No need to include "stat-macros.h".
2744         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2745         (direxists, __path_search) [!_LIBC]: Don't compile these in
2746         gnulib; the tmpdir module covers that.
2747         * lib/tempname.h: New file.
2748
2749 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2750
2751         * COPYING: Explain how gnulib-tool converts licence headers.
2752         Almost all wording by Eric Blake.
2753
2754 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2755
2756         * lib/mbchar.h (is_basic_table): Make read-only.
2757         * lib/mbchar.c (is_basic_table): Likewise.
2758         Reported by John Darrington.
2759
2760 2006-10-25  Bruno Haible  <bruno@clisp.org>
2761
2762         * lib/progname.h (set_program_name): Undefine before defining.
2763
2764 2006-10-25  Bruno Haible  <bruno@clisp.org>
2765
2766         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2767         false for non-gcc C++ compilers.
2768         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2769
2770 2006-10-24  Bruno Haible  <bruno@clisp.org>
2771
2772         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2773         iconv implementations like Irix iconv.
2774
2775 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2776
2777         * modules/vararrays: New file.
2778         * m4/vararrays.m4: New file, taken from diffutils.
2779         * MODULES.html.sh: New module vararrays.
2780
2781 2006-10-24  Karl Berry  <karl@gnu.org>
2782
2783         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2784         Don't call GNU Unix.
2785
2786 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2787
2788         * users.txt: Add Libtool.
2789
2790         Sync from Libtool:
2791
2792         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2793
2794         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2795         to gnulib's policy of including config.h unconditionally.
2796
2797 2006-10-24  Bruno Haible  <bruno@clisp.org>
2798
2799         * modules/wcwidth (Files): Add m4/wint_t.m4.
2800         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2801         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2802
2803 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2804
2805         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2806         to pacify GCC with some -W flags enabled.  Problem reported by
2807         Bruno Haible.
2808
2809 2006-10-24  Jim Meyering  <jim@meyering.net>
2810
2811         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2812         Reported by Karl Berry.
2813
2814 2006-10-23  Bruno Haible  <bruno@clisp.org>
2815
2816         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2817
2818 2006-10-24  Bruno Haible  <bruno@clisp.org>
2819
2820         * lib/gl_list.h: Use C comment style, not C++ comment style.
2821
2822 2006-10-23  Eric Blake  <ebb9@byu.net>
2823
2824         * lib/getaddrinfo.c (includes): Add missing include.
2825
2826 2006-10-23  Bruno Haible  <bruno@clisp.org>
2827             Paul Eggert  <eggert@cs.ucla.edu>
2828
2829         Ability to rename obstack_free.
2830         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2831         obstack_free.
2832         (obstack_free): Invoke the __obstack_free macro.
2833         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2834
2835 2006-10-23  Bruno Haible  <bruno@clisp.org>
2836             Paul Eggert  <eggert@cs.ucla.edu>
2837
2838         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2839         __argc, __argv from the declaration. (They are defined as macros on
2840         mingw.)
2841
2842 2006-10-22  Bruno Haible  <bruno@clisp.org>
2843
2844         * doc/gnulib-intro.texi: New file.
2845         * doc/gnulib.texi: Include it.
2846
2847 2006-10-21  Bruno Haible  <bruno@clisp.org>
2848
2849         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2850         "Introduction", "Miscellanous Notes", "Particular Modules".
2851
2852 2006-10-21  Bruno Haible  <bruno@clisp.org>
2853
2854         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2855         Change mostlyclean-local rule to avoid sh syntax error from bash
2856         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2857
2858 2006-10-23  Jim Meyering  <jim@meyering.net>
2859
2860         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2861         in place of snprintf.
2862
2863         * modules/inttostr (Files): Add lib/uinttostr.c.
2864         * lib/uinttostr.c (inttostr): New file/function.
2865         * lib/inttostr.h (uinttostr): Declare.
2866         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2867         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2868         Add uinttostr.
2869         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2870
2871 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2872
2873         * lib/canonicalize.c (ELOOP): Define if not already defined.
2874         Problem reported by Bruno Haible in
2875         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2876
2877 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2878
2879         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2880         Problem reported by Perry Smith and Ville Laurikari.
2881
2882         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2883         uses.
2884
2885 2006-10-19  Bruno Haible  <bruno@clisp.org>
2886
2887         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2888         for mingw.
2889
2890 2006-10-19  Bruno Haible  <bruno@clisp.org>
2891
2892         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2893         Needed for mingw.
2894
2895 2006-10-19  Bruno Haible  <bruno@clisp.org>
2896
2897         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2898
2899 2006-10-19  Bruno Haible  <bruno@clisp.org>
2900
2901         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2902         it.
2903
2904 2006-10-19  Bruno Haible  <bruno@clisp.org>
2905
2906         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2907         invocation.
2908
2909 2006-10-19  Bruno Haible  <bruno@clisp.org>
2910
2911         * gnulib-tool (func_create_testdir): Don't include ftruncate and
2912         mountlist by default.
2913
2914 2006-10-16  Bruno Haible  <bruno@clisp.org>
2915
2916         * lib/c-strstr.c: Include c-strstr.h.
2917
2918 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2919
2920         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
2921         in a slash.
2922
2923 2006-10-18  Bruno Haible  <bruno@clisp.org>
2924
2925         * lib/lock.h [C++]: Wrap definitions in extern "C".
2926
2927 2006-10-18  Bruno Haible  <bruno@clisp.org>
2928
2929         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
2930         gl_LIBOBJS list.
2931
2932 2006-10-18  Bruno Haible  <bruno@clisp.org>
2933
2934         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
2935
2936 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
2937
2938         * lib/xstrtol.h: Include gettext.h.
2939         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
2940         Problem reported by Eric Blake.
2941         * modules/xstrtol (Depends-on): Add gettext-h.
2942
2943 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
2944
2945         * lib/strftime.c (advance): New macro.
2946         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
2947         incomplete type, so you can't add 0 to it.  Problem and patch
2948         reported by Eelco Dolstra for dietlibc.
2949
2950 2006-10-18  Jim Meyering  <jim@meyering.net>
2951
2952         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
2953         type for a local, and rename it: s/up/user_proc/.
2954
2955 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
2956
2957         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
2958         READ_UTMP_USER_PROCESS.
2959         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
2960
2961 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
2962
2963         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
2964         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
2965
2966 2006-10-17  Eric Blake  <ebb9@byu.net>
2967
2968         * lib/sigprocmask.c (sigprocmask): Fix typo.
2969
2970         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
2971
2972         * modules/clean-temp (Makefile.am): Don't add to make output...
2973         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
2974         config.h.
2975
2976 2006-10-17  Bruno Haible  <bruno@clisp.org>
2977
2978         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
2979         differently if DEFAULT_TEXT_DOMAIN is set.
2980
2981 2006-10-16  Bruno Haible  <bruno@clisp.org>
2982
2983         * lib/clean-temp.c: Include fwriteerror.h.
2984
2985 2006-10-16  Bruno Haible  <bruno@clisp.org>
2986
2987         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
2988
2989 2006-10-16  Bruno Haible  <bruno@clisp.org>
2990
2991         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
2992         * lib/sigprocmask.h: Include <sys/types.h>.
2993         (sigset_t): Use the system's definition if present.
2994
2995 2006-10-17  Eric Blake  <ebb9@byu.net>
2996
2997         * lib/xvasprintf.c (includes): Assume config.h.
2998         * lib/xasprintf.c (includes): Likewise.
2999
3000 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3001
3002         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3003         at least as wide as intmax_t.
3004
3005 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3006
3007         (Imported from Automake.)
3008         * build-aux/gnupload: Update to version 1.1 of directive file.
3009
3010 2006-10-16  Eric Blake  <ebb9@byu.net>
3011
3012         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3013         match Automake 1.10a.
3014
3015 2006-10-14  Bruno Haible  <bruno@clisp.org>
3016
3017         * modules/sigprocmask: New file.
3018         * lib/sigprocmask.h: New file.
3019         * lib/sigprocmask.c: New file.
3020         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3021         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3022         request sigprocmask.o.
3023         (gl_PREREQ_SIGPROCMASK): New macro.
3024         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3025         (Depends-on): Add sigprocmask.
3026         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3027         gt_SIGNALBLOCKING. Test for 'raise' only once.
3028         * lib/fatal-signal.c: Include sigprocmask.h.
3029         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3030         unblock_fatal_signals): Define always.
3031         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3032         sigprocmask.
3033
3034 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3035
3036         Sync from Automake.
3037         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3038         which incorrectly sets the mode of an existing destination
3039         directory.  In some cases the unpatched install-sh could do the
3040         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3041         system.  We hope this is rare in practice, but it's clearly worth
3042         fixing.  Problem reported by Alex Unleashed in
3043         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3044         Also, don't bother to check for -m bugs unless we're using -m;
3045         suggested by Stepan Kasal.
3046
3047 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3048
3049         Sync from Automake.
3050         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3051         `-c' flag, so they appear at the same position as in %FASTDEP%
3052         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3053         which ignores unknown options only after the first non-option.
3054         Bug report against M4 by Nelson H. F. Beebe.
3055
3056 2006-10-13  Jim Meyering  <jim@meyering.net>
3057
3058         Fix a bug in yesterday's change.
3059         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3060         p->fts_statp->st_dev would be used uninitialized.
3061         Ensures that we always call fts_stat on the very first entry.
3062         Miklos Szeredi reported that find -xdev stopped working.
3063
3064 2006-10-12  Bruno Haible  <bruno@clisp.org>
3065
3066         * gnulib-tool (func_get_automake_snippet): Append an automatically
3067         computed EXTRA_DIST augmentation.
3068         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3069         * modules/alloca-opt (Makefile.am): Likewise.
3070         * modules/allocsa (Makefile.am): Likewise.
3071         * modules/arcfour (Makefile.am): Likewise.
3072         * modules/arctwo (Makefile.am): Likewise.
3073         * modules/argmatch (Makefile.am): Likewise.
3074         * modules/argz (Makefile.am): Likewise.
3075         * modules/atexit (Makefile.am): Likewise.
3076         * modules/backupfile (Makefile.am): Likewise.
3077         * modules/byteswap (Makefile.am): Likewise.
3078         * modules/c-strtod (Makefile.am): Likewise.
3079         * modules/c-strtold (Makefile.am): Likewise.
3080         * modules/calloc (Makefile.am): Likewise.
3081         * modules/canon-host (Makefile.am): Likewise.
3082         * modules/canonicalize (Makefile.am): Likewise.
3083         * modules/chdir-long (Makefile.am): Likewise.
3084         * modules/chdir-safer (Makefile.am): Likewise.
3085         * modules/check-version (Makefile.am): Likewise.
3086         * modules/chown (Makefile.am): Likewise.
3087         * modules/cloexec (Makefile.am): Likewise.
3088         * modules/close-stream (Makefile.am): Likewise.
3089         * modules/closeout (Makefile.am): Likewise.
3090         * modules/crc (Makefile.am): Likewise.
3091         * modules/csharpexec (Makefile.am): Likewise.
3092         * modules/cycle-check (Makefile.am): Likewise.
3093         * modules/des (Makefile.am): Likewise.
3094         * modules/dev-ino (Makefile.am): Likewise.
3095         * modules/dirfd (Makefile.am): Likewise.
3096         * modules/dirname (Makefile.am): Likewise.
3097         * modules/dup2 (Makefile.am): Likewise.
3098         * modules/eealloc (Makefile.am): Likewise.
3099         * modules/error (Makefile.am): Likewise.
3100         * modules/euidaccess (Makefile.am): Likewise.
3101         * modules/exclude (Makefile.am): Likewise.
3102         * modules/exitfail (Makefile.am): Likewise.
3103         * modules/fcntl-safer (Makefile.am): Likewise.
3104         * modules/fcntl (Makefile.am): Likewise.
3105         * modules/file-type (Makefile.am): Likewise.
3106         * modules/fileblocks (Makefile.am): Likewise.
3107         * modules/filemode (Makefile.am): Likewise.
3108         * modules/filenamecat (Makefile.am): Likewise.
3109         * modules/fnmatch (Makefile.am): Likewise.
3110         * modules/fopen-safer (Makefile.am): Likewise.
3111         * modules/fpending (Makefile.am): Likewise.
3112         * modules/fprintftime (Makefile.am): Likewise.
3113         * modules/free (Makefile.am): Likewise.
3114         * modules/fsusage (Makefile.am): Likewise.
3115         * modules/ftruncate (Makefile.am): Likewise.
3116         * modules/fts (Makefile.am): Likewise.
3117         * modules/gc-arcfour (Makefile.am): Likewise.
3118         * modules/gc-des (Makefile.am): Likewise.
3119         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3120         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3121         * modules/gc-md4 (Makefile.am): Likewise.
3122         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3123         * modules/gc-sha1 (Makefile.am): Likewise.
3124         * modules/gc (Makefile.am): Likewise.
3125         * modules/getaddrinfo (Makefile.am): Likewise.
3126         * modules/getcwd (Makefile.am): Likewise.
3127         * modules/getdelim (Makefile.am): Likewise.
3128         * modules/getdomainname (Makefile.am): Likewise.
3129         * modules/getgroups (Makefile.am): Likewise.
3130         * modules/gethostname (Makefile.am): Likewise.
3131         * modules/gethrxtime (Makefile.am): Likewise.
3132         * modules/getline (Makefile.am): Likewise.
3133         * modules/getloadavg (Makefile.am): Likewise.
3134         * modules/getlogin_r (Makefile.am): Likewise.
3135         * modules/getndelim2 (Makefile.am): Likewise.
3136         * modules/getopt (Makefile.am): Likewise.
3137         * modules/getpagesize (Makefile.am): Likewise.
3138         * modules/getpass-gnu (Makefile.am): Likewise.
3139         * modules/getpass (Makefile.am): Likewise.
3140         * modules/getsubopt (Makefile.am): Likewise.
3141         * modules/gettime (Makefile.am): Likewise.
3142         * modules/gettimeofday (Makefile.am): Likewise.
3143         * modules/getugroups (Makefile.am): Likewise.
3144         * modules/getusershell (Makefile.am): Likewise.
3145         * modules/glob (Makefile.am): Likewise.
3146         * modules/group-member (Makefile.am): Likewise.
3147         * modules/hard-locale (Makefile.am): Likewise.
3148         * modules/hash (Makefile.am): Likewise.
3149         * modules/hmac-md5 (Makefile.am): Likewise.
3150         * modules/hmac-sha1 (Makefile.am): Likewise.
3151         * modules/human (Makefile.am): Likewise.
3152         * modules/idcache (Makefile.am): Likewise.
3153         * modules/imaxabs (Makefile.am): Likewise.
3154         * modules/imaxdiv (Makefile.am): Likewise.
3155         * modules/inet_ntop (Makefile.am): Likewise.
3156         * modules/inet_pton (Makefile.am): Likewise.
3157         * modules/intprops (Makefile.am): Likewise.
3158         * modules/inttostr (Makefile.am): Likewise.
3159         * modules/inttypes (Makefile.am): Likewise.
3160         * modules/isapipe (Makefile.am): Likewise.
3161         * modules/javaversion (Makefile.am): Likewise.
3162         * modules/lchmod (Makefile.am): Likewise.
3163         * modules/lchown (Makefile.am): Likewise.
3164         * modules/localcharset (Makefile.am): Likewise.
3165         * modules/long-options (Makefile.am): Likewise.
3166         * modules/lstat (Makefile.am): Likewise.
3167         * modules/malloc (Makefile.am): Likewise.
3168         * modules/mathl (Makefile.am): Likewise.
3169         * modules/mbchar (Makefile.am): Likewise.
3170         * modules/md2 (Makefile.am): Likewise.
3171         * modules/md4 (Makefile.am): Likewise.
3172         * modules/md5 (Makefile.am): Likewise.
3173         * modules/memcasecmp (Makefile.am): Likewise.
3174         * modules/memchr (Makefile.am): Likewise.
3175         * modules/memcmp (Makefile.am): Likewise.
3176         * modules/memcoll (Makefile.am): Likewise.
3177         * modules/memcpy (Makefile.am): Likewise.
3178         * modules/memmem (Makefile.am): Likewise.
3179         * modules/memmove (Makefile.am): Likewise.
3180         * modules/mempcpy (Makefile.am): Likewise.
3181         * modules/memrchr (Makefile.am): Likewise.
3182         * modules/memset (Makefile.am): Likewise.
3183         * modules/memxor (Makefile.am): Likewise.
3184         * modules/mkancesdirs (Makefile.am): Likewise.
3185         * modules/mkdir-p (Makefile.am): Likewise.
3186         * modules/mkdir (Makefile.am): Likewise.
3187         * modules/mkdtemp (Makefile.am): Likewise.
3188         * modules/mkstemp (Makefile.am): Likewise.
3189         * modules/mktime (Makefile.am): Likewise.
3190         * modules/modechange (Makefile.am): Likewise.
3191         * modules/mountlist (Makefile.am): Likewise.
3192         * modules/nanosleep (Makefile.am): Likewise.
3193         * modules/obstack (Makefile.am): Likewise.
3194         * modules/openat (Makefile.am): Likewise.
3195         * modules/pagealign_alloc (Makefile.am): Likewise.
3196         * modules/pathmax (Makefile.am): Likewise.
3197         * modules/physmem (Makefile.am): Likewise.
3198         * modules/poll (Makefile.am): Likewise.
3199         * modules/posixtm (Makefile.am): Likewise.
3200         * modules/posixver (Makefile.am): Likewise.
3201         * modules/putenv (Makefile.am): Likewise.
3202         * modules/quote (Makefile.am): Likewise.
3203         * modules/quotearg (Makefile.am): Likewise.
3204         * modules/raise (Makefile.am): Likewise.
3205         * modules/read-file (Makefile.am): Likewise.
3206         * modules/readline (Makefile.am): Likewise.
3207         * modules/readlink (Makefile.am): Likewise.
3208         * modules/readtokens (Makefile.am): Likewise.
3209         * modules/readutmp (Makefile.am): Likewise.
3210         * modules/realloc (Makefile.am): Likewise.
3211         * modules/regex (Makefile.am): Likewise.
3212         * modules/rename-dest-slash (Makefile.am): Likewise.
3213         * modules/rename (Makefile.am): Likewise.
3214         * modules/rijndael (Makefile.am): Likewise.
3215         * modules/rmdir (Makefile.am): Likewise.
3216         * modules/rpmatch (Makefile.am): Likewise.
3217         * modules/safe-read (Makefile.am): Likewise.
3218         * modules/safe-write (Makefile.am): Likewise.
3219         * modules/same-inode (Makefile.am): Likewise.
3220         * modules/same (Makefile.am): Likewise.
3221         * modules/save-cwd (Makefile.am): Likewise.
3222         * modules/savedir (Makefile.am): Likewise.
3223         * modules/setenv (Makefile.am): Likewise.
3224         * modules/settime (Makefile.am): Likewise.
3225         * modules/sha1 (Makefile.am): Likewise.
3226         * modules/sig2str (Makefile.am): Likewise.
3227         * modules/snprintf (Makefile.am): Likewise.
3228         * modules/stat-macros (Makefile.am): Likewise.
3229         * modules/stat-time (Makefile.am): Likewise.
3230         * modules/stdbool (Makefile.am): Likewise.
3231         * modules/stdint (Makefile.am): Likewise.
3232         * modules/stdlib-safer (Makefile.am): Likewise.
3233         * modules/stpcpy (Makefile.am): Likewise.
3234         * modules/stpncpy (Makefile.am): Likewise.
3235         * modules/strcase (Makefile.am): Likewise.
3236         * modules/strcasestr (Makefile.am): Likewise.
3237         * modules/strchrnul (Makefile.am): Likewise.
3238         * modules/strcspn (Makefile.am): Likewise.
3239         * modules/strdup (Makefile.am): Likewise.
3240         * modules/strerror (Makefile.am): Likewise.
3241         * modules/strftime (Makefile.am): Likewise.
3242         * modules/strndup (Makefile.am): Likewise.
3243         * modules/strnlen (Makefile.am): Likewise.
3244         * modules/strpbrk (Makefile.am): Likewise.
3245         * modules/strsep (Makefile.am): Likewise.
3246         * modules/strstr (Makefile.am): Likewise.
3247         * modules/strtod (Makefile.am): Likewise.
3248         * modules/strtoimax (Makefile.am): Likewise.
3249         * modules/strtok_r (Makefile.am): Likewise.
3250         * modules/strtol (Makefile.am): Likewise.
3251         * modules/strtoll (Makefile.am): Likewise.
3252         * modules/strtoul (Makefile.am): Likewise.
3253         * modules/strtoull (Makefile.am): Likewise.
3254         * modules/strtoumax (Makefile.am): Likewise.
3255         * modules/strverscmp (Makefile.am): Likewise.
3256         * modules/sys_socket (Makefile.am): Likewise.
3257         * modules/sys_stat (Makefile.am): Likewise.
3258         * modules/sysexits (Makefile.am): Likewise.
3259         * modules/time_r (Makefile.am): Likewise.
3260         * modules/timegm (Makefile.am): Likewise.
3261         * modules/timespec (Makefile.am): Likewise.
3262         * modules/tmpfile-safer (Makefile.am): Likewise.
3263         * modules/trim (Makefile.am): Likewise.
3264         * modules/unistd-safer (Makefile.am): Likewise.
3265         * modules/unlinkdir (Makefile.am): Likewise.
3266         * modules/unlocked-io (Makefile.am): Likewise.
3267         * modules/userspec (Makefile.am): Likewise.
3268         * modules/utime (Makefile.am): Likewise.
3269         * modules/utimecmp (Makefile.am): Likewise.
3270         * modules/utimens (Makefile.am): Likewise.
3271         * modules/vasnprintf (Makefile.am): Likewise.
3272         * modules/vasprintf (Makefile.am): Likewise.
3273         * modules/vsnprintf (Makefile.am): Likewise.
3274         * modules/xalloc (Makefile.am): Likewise.
3275         * modules/xgetcwd (Makefile.am): Likewise.
3276         * modules/xnanosleep (Makefile.am): Likewise.
3277         * modules/xreadlink (Makefile.am): Likewise.
3278         * modules/xstrtod (Makefile.am): Likewise.
3279         * modules/xstrtol (Makefile.am): Likewise.
3280         * modules/xstrtold (Makefile.am): Likewise.
3281         * modules/yesno (Makefile.am): Likewise.
3282         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3283
3284 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3285
3286         * modules/error (Makefile.am): Distribute files through
3287         EXTRA_DIST, not lib_SOURCES.
3288
3289 2006-10-12  Eric Blake  <ebb9@byu.net>
3290
3291         * modules/error (Makefile.am): Distribute files in /lib.
3292         * modules/obstack (Makefile.am): Likewise.
3293
3294 2006-10-12  Bruno Haible  <bruno@clisp.org>
3295
3296         * modules/acl (Makefile.am): Distribute all files in lib/ through
3297         EXTRA_DIST.
3298         * modules/arcfour (Makefile.am): Likewise.
3299         * modules/arctwo (Makefile.am): Likewise.
3300         * modules/argmatch (Makefile.am): Likewise.
3301         * modules/argz (Makefile.am): Likewise.
3302         * modules/atexit (Makefile.am): Likewise.
3303         * modules/backupfile (Makefile.am): Likewise.
3304         * modules/c-strtod (Makefile.am): Likewise.
3305         * modules/c-strtold (Makefile.am): Likewise.
3306         * modules/calloc (Makefile.am): Likewise.
3307         * modules/canon-host (Makefile.am): Likewise.
3308         * modules/canonicalize (Makefile.am): Likewise.
3309         * modules/chdir-long (Makefile.am): Likewise.
3310         * modules/chdir-safer (Makefile.am): Likewise.
3311         * modules/check-version (Makefile.am): Likewise.
3312         * modules/chown (Makefile.am): Likewise.
3313         * modules/cloexec (Makefile.am): Likewise.
3314         * modules/close-stream (Makefile.am): Likewise.
3315         * modules/closeout (Makefile.am): Likewise.
3316         * modules/crc (Makefile.am): Likewise.
3317         * modules/cycle-check (Makefile.am): Likewise.
3318         * modules/des (Makefile.am): Likewise.
3319         * modules/dirfd (Makefile.am): Likewise.
3320         * modules/dirname (Makefile.am): Likewise.
3321         * modules/dup2 (Makefile.am): Likewise.
3322         * modules/euidaccess (Makefile.am): Likewise.
3323         * modules/exclude (Makefile.am): Likewise.
3324         * modules/exitfail (Makefile.am): Likewise.
3325         * modules/fcntl-safer (Makefile.am): Likewise.
3326         * modules/file-type (Makefile.am): Likewise.
3327         * modules/fileblocks (Makefile.am): Likewise.
3328         * modules/filemode (Makefile.am): Likewise.
3329         * modules/filenamecat (Makefile.am): Likewise.
3330         * modules/fnmatch (Makefile.am): Likewise.
3331         * modules/fopen-safer (Makefile.am): Likewise.
3332         * modules/fpending (Makefile.am): Likewise.
3333         * modules/fprintftime (Makefile.am): Likewise.
3334         * modules/free (Makefile.am): Likewise.
3335         * modules/fsusage (Makefile.am): Likewise.
3336         * modules/ftruncate (Makefile.am): Likewise.
3337         * modules/fts (Makefile.am): Likewise.
3338         * modules/gc (Makefile.am): Likewise.
3339         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3340         * modules/getaddrinfo (Makefile.am): Likewise.
3341         * modules/getcwd (Makefile.am): Likewise.
3342         * modules/getdelim (Makefile.am): Likewise.
3343         * modules/getdomainname (Makefile.am): Likewise.
3344         * modules/getgroups (Makefile.am): Likewise.
3345         * modules/gethostname (Makefile.am): Likewise.
3346         * modules/gethrxtime (Makefile.am): Likewise.
3347         * modules/getline (Makefile.am): Likewise.
3348         * modules/getloadavg (Makefile.am): Likewise.
3349         * modules/getlogin_r (Makefile.am): Likewise.
3350         * modules/getopt (Makefile.am): Likewise.
3351         * modules/getpass (Makefile.am): Likewise.
3352         * modules/getpass-gnu (Makefile.am): Likewise.
3353         * modules/getsubopt (Makefile.am): Likewise.
3354         * modules/gettime (Makefile.am): Likewise.
3355         * modules/gettimeofday (Makefile.am): Likewise.
3356         * modules/getugroups (Makefile.am): Likewise.
3357         * modules/getusershell (Makefile.am): Likewise.
3358         * modules/glob (Makefile.am): Likewise.
3359         * modules/group-member (Makefile.am): Likewise.
3360         * modules/hard-locale (Makefile.am): Likewise.
3361         * modules/hash (Makefile.am): Likewise.
3362         * modules/hmac-md5 (Makefile.am): Likewise.
3363         * modules/hmac-sha1 (Makefile.am): Likewise.
3364         * modules/human (Makefile.am): Likewise.
3365         * modules/idcache (Makefile.am): Likewise.
3366         * modules/imaxabs (Makefile.am): Likewise.
3367         * modules/imaxdiv (Makefile.am): Likewise.
3368         * modules/inet_ntop (Makefile.am): Likewise.
3369         * modules/inet_pton (Makefile.am): Likewise.
3370         * modules/inttostr (Makefile.am): Likewise.
3371         * modules/isapipe (Makefile.am): Likewise.
3372         * modules/lchown (Makefile.am): Likewise.
3373         * modules/long-options (Makefile.am): Likewise.
3374         * modules/lstat (Makefile.am): Likewise.
3375         * modules/malloc (Makefile.am): Likewise.
3376         * modules/mathl (Makefile.am): Likewise.
3377         * modules/mbchar (Makefile.am): Likewise.
3378         * modules/md2 (Makefile.am): Likewise.
3379         * modules/md4 (Makefile.am): Likewise.
3380         * modules/md5 (Makefile.am): Likewise.
3381         * modules/memcasecmp (Makefile.am): Likewise.
3382         * modules/memchr (Makefile.am): Likewise.
3383         * modules/memcmp (Makefile.am): Likewise.
3384         * modules/memcoll (Makefile.am): Likewise.
3385         * modules/memcpy (Makefile.am): Likewise.
3386         * modules/memmem (Makefile.am): Likewise.
3387         * modules/memmove (Makefile.am): Likewise.
3388         * modules/mempcpy (Makefile.am): Likewise.
3389         * modules/memrchr (Makefile.am): Likewise.
3390         * modules/memset (Makefile.am): Likewise.
3391         * modules/memxor (Makefile.am): Likewise.
3392         * modules/mkancesdirs (Makefile.am): Likewise.
3393         * modules/mkdir (Makefile.am): Likewise.
3394         * modules/mkdir-p (Makefile.am): Likewise.
3395         * modules/mkdtemp (Makefile.am): Likewise.
3396         * modules/mkstemp (Makefile.am): Likewise.
3397         * modules/mktime (Makefile.am): Likewise.
3398         * modules/modechange (Makefile.am): Likewise.
3399         * modules/mountlist (Makefile.am): Likewise.
3400         * modules/nanosleep (Makefile.am): Likewise.
3401         * modules/openat (Makefile.am): Likewise.
3402         * modules/pagealign_alloc (Makefile.am): Likewise.
3403         * modules/physmem (Makefile.am): Likewise.
3404         * modules/poll (Makefile.am): Likewise.
3405         * modules/posixtm (Makefile.am): Likewise.
3406         * modules/posixver (Makefile.am): Likewise.
3407         * modules/putenv (Makefile.am): Likewise.
3408         * modules/quote (Makefile.am): Likewise.
3409         * modules/quotearg (Makefile.am): Likewise.
3410         * modules/raise (Makefile.am): Likewise.
3411         * modules/read-file (Makefile.am): Likewise.
3412         * modules/readline (Makefile.am): Likewise.
3413         * modules/readlink (Makefile.am): Likewise.
3414         * modules/readtokens (Makefile.am): Likewise.
3415         * modules/readutmp (Makefile.am): Likewise.
3416         * modules/realloc (Makefile.am): Likewise.
3417         * modules/regex (Makefile.am): Likewise.
3418         * modules/rename (Makefile.am): Likewise.
3419         * modules/rename-dest-slash (Makefile.am): Likewise.
3420         * modules/rijndael (Makefile.am): Likewise.
3421         * modules/rmdir (Makefile.am): Likewise.
3422         * modules/rpmatch (Makefile.am): Likewise.
3423         * modules/safe-read (Makefile.am): Likewise.
3424         * modules/safe-write (Makefile.am): Likewise.
3425         * modules/same (Makefile.am): Likewise.
3426         * modules/save-cwd (Makefile.am): Likewise.
3427         * modules/savedir (Makefile.am): Likewise.
3428         * modules/setenv (Makefile.am): Likewise.
3429         * modules/settime (Makefile.am): Likewise.
3430         * modules/sha1 (Makefile.am): Likewise.
3431         * modules/sig2str (Makefile.am): Likewise.
3432         * modules/snprintf (Makefile.am): Likewise.
3433         * modules/stdlib-safer (Makefile.am): Likewise.
3434         * modules/stpcpy (Makefile.am): Likewise.
3435         * modules/stpncpy (Makefile.am): Likewise.
3436         * modules/strcase (Makefile.am): Likewise.
3437         * modules/strcasestr (Makefile.am): Likewise.
3438         * modules/strchrnul (Makefile.am): Likewise.
3439         * modules/strcspn (Makefile.am): Likewise.
3440         * modules/strdup (Makefile.am): Likewise.
3441         * modules/strerror (Makefile.am): Likewise.
3442         * modules/strftime (Makefile.am): Likewise.
3443         * modules/strndup (Makefile.am): Likewise.
3444         * modules/strnlen (Makefile.am): Likewise.
3445         * modules/strpbrk (Makefile.am): Likewise.
3446         * modules/strsep (Makefile.am): Likewise.
3447         * modules/strstr (Makefile.am): Likewise.
3448         * modules/strtod (Makefile.am): Likewise.
3449         * modules/strtoimax (Makefile.am): Likewise.
3450         * modules/strtok_r (Makefile.am): Likewise.
3451         * modules/strtol (Makefile.am): Likewise.
3452         * modules/strtoll (Makefile.am): Likewise.
3453         * modules/strtoul (Makefile.am): Likewise.
3454         * modules/strtoull (Makefile.am): Likewise.
3455         * modules/strtoumax (Makefile.am): Likewise.
3456         * modules/strverscmp (Makefile.am): Likewise.
3457         * modules/time_r (Makefile.am): Likewise.
3458         * modules/timegm (Makefile.am): Likewise.
3459         * modules/tmpfile-safer (Makefile.am): Likewise.
3460         * modules/unistd-safer (Makefile.am): Likewise.
3461         * modules/unlinkdir (Makefile.am): Likewise.
3462         * modules/userspec (Makefile.am): Likewise.
3463         * modules/utime (Makefile.am): Likewise.
3464         * modules/utimecmp (Makefile.am): Likewise.
3465         * modules/utimens (Makefile.am): Likewise.
3466         * modules/vasnprintf (Makefile.am): Likewise.
3467         * modules/vasprintf (Makefile.am): Likewise.
3468         * modules/vsnprintf (Makefile.am): Likewise.
3469         * modules/xalloc (Makefile.am): Likewise.
3470         * modules/xgetcwd (Makefile.am): Likewise.
3471         * modules/xnanosleep (Makefile.am): Likewise.
3472         * modules/xreadlink (Makefile.am): Likewise.
3473         * modules/xstrtod (Makefile.am): Likewise.
3474         * modules/xstrtol (Makefile.am): Likewise.
3475         * modules/xstrtold (Makefile.am): Likewise.
3476         * modules/yesno (Makefile.am): Likewise.
3477
3478 2006-10-12  Jim Meyering  <jim@meyering.net>
3479
3480         * m4/getloadavg.m4: Revert the change below.
3481
3482         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3483         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3484         fail with a symlink, which is what coreutils' ./bootstrap now
3485         creates by default.
3486
3487 2006-10-12  Bruno Haible  <bruno@clisp.org>
3488
3489         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3490         mingw.
3491         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3492         MSVC and mingw explicitly.
3493
3494 2006-10-11  Simon Josefsson  <jas@extundo.com>
3495             Bruno Haible  <bruno@clisp.org>
3496
3497         Add support for multiple gnulib-tool invocations in the scope of a
3498         single configure.ac file.
3499         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3500         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3501         with the same contents as the _LIBADD variable.
3502         (func_emit_initmacro_start, func_emit_initmacro_end,
3503         func_emit_initmacro_done): New functions.
3504         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3505         gl_LIBOBJS and gl_LTLIBOBJS.
3506
3507 2006-10-11  Bruno Haible  <bruno@clisp.org>
3508
3509         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3510         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3511         autoreconf. Instead, invoke autopoint explicitly but move back the
3512         *.m4 files from gnulib.
3513
3514 2006-10-11  Bruno Haible  <bruno@clisp.org>
3515
3516         * gnulib-tool (func_usage): Make module names after --create-testdir
3517         optional.
3518         (func_create_testdir): If no module was specified, use nearly all
3519         modules.
3520
3521 2006-10-12  Jim Meyering  <jim@meyering.net>
3522
3523         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3524         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3525         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3526         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3527         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3528         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3529         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3530         (fts_set_stat_required): New function.
3531         (fts_open): Defer the calls to fts_stat, if possible or requested.
3532         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3533         into fts_stat itself.
3534         (fts_read): Perform any required (deferred) fts_stat call.
3535         (fts_build): Likewise, for the directory we're about to open and read.
3536         In the readdir loop, carefully decide whether each entry will require
3537         an eventual call to fts_stat, using dirent.d_type info if available.
3538         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3539         a command line argument into this function.  Update all callers.
3540         Map a return value of FTS_DOT to FTS_D for a command line argument.
3541         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3542         Thanks to Miklos Szeredi for his tenacity and for the initial
3543         bug report about "find" failing on a FUSE-based file system.
3544
3545         * lib/fts.c (fts_open): Use consistent indentation.
3546
3547 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3548
3549         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3550         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3551         reported by Jim Meyering.  All uses of cache variables renamed
3552         to match Autoconf's.
3553         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3554         the other one.
3555
3556         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3557         Fix misspelling in diagnostic.
3558
3559 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3560
3561         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3562         defined.  Problem reported by Matthew Woehlke.
3563
3564         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3565         Add support for Tandem NonStop R series.
3566         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3567         Use new macro.
3568
3569         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3570         (has_trailing_slash): Omit size arg; all callers changed.
3571         Omit 'inline', since it doesn't help performance and we'd
3572         need to configure it.
3573         Don't count //, ///, etc. as having a trailing slash.
3574         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3575         (rpl_rename_dest_slash): On failure, use rename's errno rather
3576         than (in some cases) an incorrect or junk errno.
3577         Simplify code by removing need to compute length; this does
3578         cause it to make two passes instead of one over the file name,
3579         but it's worth it.
3580
3581         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3582         change, since Autoconf's version may no longer be appropriate now
3583         that we are using CVS Autoconf's version.  Add support for Tandem.
3584
3585 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3586             Bruno Haible  <bruno@clisp.org>
3587
3588         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3589         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3590         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3591         gl_AC_TYPE_LONG_LONG.
3592
3593         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3594         instead of HAVE_LONG_LONG.
3595         * lib/printf-args.c (printf_fetchargs): Likewise.
3596         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3597         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3598         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3599         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3600         gl_AC_TYPE_LONG_LONG.
3601
3602 2006-10-11  Bruno Haible  <bruno@clisp.org>
3603
3604         * m4/longlong.m4: Add comments.
3605         * m4/ulonglong.m4: Likewise.
3606
3607 2006-10-10  Bruno Haible  <bruno@clisp.org>
3608
3609         Make it possible to #define stpcpy, strdup to aliases.
3610         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3611         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3612
3613 2006-10-10  Bruno Haible  <bruno@clisp.org>
3614
3615         Make it possible to #define gcd to an alias.
3616         * lib/gcd.c: Include config.h.
3617
3618 2006-10-10  Bruno Haible  <bruno@clisp.org>
3619
3620         Make it possible to #define c_isascii to an alias.
3621         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3622         defined. Undefine the macros before defining them, to avoid gcc
3623         warnings.
3624         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3625         define NO_C_CTYPE_MACROS early.
3626
3627 2006-10-10  Bruno Haible  <bruno@clisp.org>
3628
3629         Make it possible to #define set_program_name to an alias.
3630         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3631         ENABLE_RELOCATABLE early.
3632
3633 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3634
3635         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3636         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3637         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3638         More generally, don't assume that 64-bit signed int is available
3639         if unsigned int is, and vice versa.
3640         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3641         unsigned symbols, not on their signed counterparts.
3642         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3643         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3644         (UINT64_C, UINTMAX_C):
3645         Likewise.
3646         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3647         unsigned counterparts.
3648         (Have_long_long, Unsigned): New macros.
3649         (Int): Renamed from INT.
3650         (strtoimax): Use the new macros.
3651         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3652         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3653         * modules/inttypes (inttypes.h): Substitute
3654         HAVE_UNSIGNED_LONG_LONG_INT.
3655         * modules/stdint (stdint.h): Likewise.
3656         (Files): Add m4/ulonglong.m4.
3657
3658 2006-10-10  Bruno Haible  <bruno@clisp.org>
3659
3660         Fix a gcc -Wshadow warning.
3661         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3662         to 'bucket'.
3663         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3664         gl_linked_indexof_from_to): Likewise.
3665         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3666         Likewise.
3667         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3668         Likewise.
3669         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3670         Reported by Eric Blake.
3671
3672 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3673
3674         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3675         for NetBSD.  Problem reported by Bruno Haible.
3676
3677 2006-10-09  Jim Meyering  <jim@meyering.net>
3678
3679         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3680         Patch from Bruno Haible.
3681
3682 2006-10-09  Jim Meyering  <jim@meyering.net>
3683
3684         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3685         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3686         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3687
3688 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3689
3690         Don't include <config.h> twice; this doesn't work in some cases,
3691         e.g., when config.h has "#define intmax_t long long int" and
3692         we include <config.h>, <inttypes.h>, <config.h> in that order.
3693         Problem reported by Matthew Woehlke in:
3694         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3695         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3696         * lib/fts-cycle.c: Don't include config.h.
3697         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3698         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3699         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3700         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3701         inttypes.h.
3702         * lib/xstrtoumax.c: Likewise.
3703         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3704         __strtol and the like, so that this module is more like its siblings.
3705         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3706         Remove; no longer needed now that we assume gnulib inttypes.h.
3707
3708 2006-10-08  Bruno Haible  <bruno@clisp.org>
3709
3710         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3711         option.
3712
3713 2006-10-07  Jim Meyering  <jim@meyering.net>
3714
3715         * modules/inttypes (inttypes.h): Revert what seems to have been
3716         an inadvertent part of today's change: use "|", not "/" in the
3717         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3718
3719 2006-10-07  Bruno Haible  <bruno@clisp.org>
3720
3721         * modules/sublist: New file.
3722
3723 2006-10-07  Bruno Haible  <bruno@clisp.org>
3724
3725         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3726         * modules/argz (argz.h): Likewise.
3727         * modules/arpa_inet (arpa/inet.h): Likewise.
3728         * modules/byteswap (byteswap.h): Likewise.
3729         * modules/configmake (configmake.h): Likewise.
3730         * modules/fcntl (fcntl.h): Likewise.
3731         * modules/fnmatch (fnmatch.h): Likewise.
3732         * modules/getopt (getopt.h): Likewise.
3733         * modules/glob (glob.h): Likewise.
3734         * modules/inttypes (inttypes.h): Likewise.
3735         * modules/netinet_in (netinet/in.h): Likewise.
3736         * modules/poll (poll.h): Likewise.
3737         * modules/stdbool (stdbool.h): Likewise.
3738         * modules/stdint (stdint.h): Likewise.
3739         * modules/sys_select (sys/select.h): Likewise.
3740         * modules/sys_socket (sys/socket.h): Likewise.
3741         * modules/sys_stat (sys/stat.h): Likewise.
3742         * modules/sysexits (sysexits.h): Likewise.
3743         * modules/unistd (unistd.h): Likewise.
3744         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3745         Add a "DO NOT EDIT" comment to the generated file.
3746         (func_import): Likewise for gnulib-comp.m4.
3747
3748 2006-10-07  Bruno Haible  <bruno@clisp.org>
3749
3750         * lib/gl_sublist.h: New file.
3751         * lib/gl_sublist.c: New file.
3752
3753 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3754
3755         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3756         name (relative to the original working directory) and the file
3757         name component (relative to the temporary working directory).  All
3758         callers changed.
3759         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3760         * lib/mkdir-p.c (make_dir_parents): Likewise.
3761         * lib/mkdir-p.h (make_dir_parents): Likewise.
3762
3763 2006-10-06  Eric Blake  <ebb9@byu.net>
3764
3765         Define several macros for use by the clean-temp module.
3766         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3767         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3768         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3769
3770         * lib/clean-temp.h (close_stream_temp): New declaration.
3771         * lib/clean-temp.c (includes): Pull in headers according to what
3772         other modules are in use.
3773         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3774
3775 2006-10-06  Bruno Haible  <bruno@clisp.org>
3776
3777         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3778         instead of fopen, fwriteerror.
3779
3780 2006-10-06  Bruno Haible  <bruno@clisp.org>
3781
3782         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3783         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3784         int.
3785         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3786         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3787         Return an error indicator.
3788         Suggested by Eric Blake.
3789
3790 2006-10-06  Bruno Haible  <bruno@clisp.org>
3791
3792         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3793         Reported by Eric Blake.
3794
3795 2006-10-06  Bruno Haible  <bruno@clisp.org>
3796
3797         * modules/closeout (Description): Mention stderr too.
3798
3799 2006-10-06  Bruno Haible  <bruno@clisp.org>
3800         and Paul Eggert  <eggert@cs.ucla.edu>
3801
3802         * lib/closeout.c (close_stdout): Also close stderr.
3803         * lib/closeout.h: Update comment.
3804
3805 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3806
3807         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3808         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3809         * lib/dirchownmod.c: Include lchown.h.
3810         * lib/lchown.c: Don't include files that lchown.h now includes.
3811         Don't declare chown, since lchown.h now does that.
3812         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3813         (lchown): Define to rpl_chown if lchown is declared but
3814         does not exist.  Declare using a prototype if lchown is not
3815         declared.  Add a copyright notice.
3816         * lib/mkstemp.h: Include <unistd.h>.
3817         * lib/openat.c: Include lchown.h.
3818
3819         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3820         we now test for that separately.
3821         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3822         rather than O_NOFOLLOW, when testing whether it's possible to
3823         avoid a race condition reliably.
3824         * lib/savewd.c (savewd_chdir): Likewise.
3825
3826         Remove macros that are no longer needed now that stdint.h is
3827         reliable.
3828         * lib/fsusage.c (UINTMAX_MAX): Remove.
3829         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3830         * lib/utimecmp.c (SIZE_MAX): Remove.
3831
3832         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3833
3834         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3835         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3836         O_NOATIME works.
3837
3838 2006-10-05  Bruno Haible  <bruno@clisp.org>
3839
3840         * lib/gl_list.h (gl_sortedlist_search_from_to,
3841         gl_sortedlist_indexof_from_to): New declarations.
3842         (gl_list_implementation): New fields sortedlist_search_from_to,
3843         sortedlist_indexof_from_to.
3844         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3845         inline functions.
3846         * lib/gl_list.c (gl_sortedlist_search_from_to,
3847         gl_sortedlist_indexof_from_to): New functions.
3848         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3849         function.
3850         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3851         (gl_array_sortedlist_search_from_to): New function.
3852         (gl_array_list_implementation): Update.
3853         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3854         function.
3855         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3856         (gl_carray_sortedlist_search_from_to): New function.
3857         (gl_carray_list_implementation): Update.
3858         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3859         gl_linked_sortedlist_indexof_from_to): New functions.
3860         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3861         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3862         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3863         gl_tree_sortedlist_indexof_from_to): New functions.
3864         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3865         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3866         Update.
3867         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3868         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3869         Update.
3870
3871 2006-10-05  Bruno Haible  <bruno@clisp.org>
3872
3873         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3874         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3875         (struct gl_list_implementation): Add fields search_from_to,
3876         indexof_from_to. Remove fields search, indexof.
3877         (gl_list_search): Use the search_from_to method.
3878         (gl_list_search_from, gl_list_search_from_to): New functions.
3879         (gl_list_indexof): Use the indexof_from_to method.
3880         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3881         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3882         (gl_list_search_from, gl_list_search_from_to): New functions.
3883         (gl_list_indexof): Use the indexof_from_to method.
3884         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3885         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3886         gl_array_indexof. Add start_index, end_index arguments.
3887         (gl_array_search_from_to): Renamed from gl_array_search. Add
3888         start_index, end_index arguments.
3889         (gl_array_remove, gl_array_list_implementation): Update.
3890         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3891         gl_carray_indexof. Add start_index, end_index arguments.
3892         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3893         start_index, end_index arguments.
3894         (gl_carray_remove, gl_carray_list_implementation): Update.
3895         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3896         gl_linked_search. Add start_index, end_index arguments.
3897         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3898         start_index, end_index arguments.
3899         (gl_linked_remove): Update.
3900         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3901         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3902         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3903         field to 'size_t'.
3904         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3905         gl_tree_search. Add start_index, end_index arguments.
3906         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3907         start_index, end_index arguments.
3908         (gl_tree_remove): Update.
3909         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3910         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3911         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
3912         function.
3913         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
3914         gl_tree_search. Add start_index, end_index arguments.
3915         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3916         start_index, end_index arguments.
3917         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3918         Update.
3919         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
3920
3921 2006-10-05  Bruno Haible  <bruno@clisp.org>
3922
3923         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
3924
3925         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
3926         fwriteerror_temp): New declarations.
3927         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
3928         (descriptors): New variable.
3929         (cleanup): First, close the descriptors.
3930         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
3931         fclose_temp, fwriteerror_temp): New functions.
3932
3933 2006-10-04  Jim Meyering  <jim@meyering.net>
3934
3935         * lib/fts.c (fts_open): Tiny comment change.
3936
3937 2006-10-04  Bruno Haible  <bruno@clisp.org>
3938
3939         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
3940         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
3941         gl_LOCK_BODY.
3942         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
3943         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
3944         gl_LOCK_EARLY_BODY.
3945         (gl_LOCK): Require gl_LOCK_BODY.
3946
3947 2006-10-04  Bruno Haible  <bruno@clisp.org>
3948
3949         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
3950         (gl_oset_search_atleast): New declaration.
3951         (struct gl_oset_implementation): Add field 'search_atleast'.
3952         (gl_oset_search_atleast): New inline function.
3953         * lib/gl_oset.c (gl_oset_search_atleast): New function.
3954         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
3955         (gl_array_oset_implementation): Update.
3956         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
3957         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
3958         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
3959
3960 2006-10-04  Bruno Haible  <bruno@clisp.org>
3961
3962         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
3963
3964 2006-10-03  Bruno Haible  <bruno@clisp.org>
3965
3966         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
3967         from gl_avltreehash_list_implementation.
3968
3969 2006-10-03  Bruno Haible  <bruno@clisp.org>
3970
3971         * lib/gl_oset.c (gl_oset_add): Fix return type.
3972
3973 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
3974
3975         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
3976
3977 2006-10-02  Eric Blake  <ebb9@byu.net>
3978
3979         * modules/strnlen (Depends-on): Add extensions.
3980
3981 2006-10-02  Eric Blake  <ebb9@byu.net>
3982
3983         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
3984         definition in 2.60+.
3985
3986 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
3987
3988         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
3989         checks.
3990
3991 2006-10-02  Bruno Haible  <bruno@clisp.org>
3992
3993         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
3994         to the AUTOMAKE_OPTIONS.
3995         Reported by Jim Meyering.
3996
3997 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
3998
3999         Work around bug in Solaris 10 /proc file system:
4000         /proc/self/fd/NNN/.. isn't the parent directory of
4001         the directory whose file descriptor is NNN.  This needs to
4002         be worked around at run time, not compile time, since a
4003         program might be built on Solaris 8, where things work, and
4004         run on Solaris 10.
4005         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4006         to use the following interface instead:
4007         (OPENAT_BUFFER_SIZE): New macro.
4008         (openat_proc_name): New function.
4009         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4010         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4011         Likewise.
4012         * lib/openat-proc.c: New file.
4013         * modules/openat (Files): Add lib/openat-proc.c.
4014         (Depends-on): Add same-inode, stdbool.
4015         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4016
4017 2006-09-29  Bruno Haible  <bruno@clisp.org>
4018
4019         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4020         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4021         argument. Set stdout_closed before testing for ferror, not after.
4022         (fwriteerror, fwriteerror_no_ebadf): New functions.
4023
4024 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4025
4026         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4027
4028 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4029
4030         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4031         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4032
4033 2006-09-28  Jim Meyering  <jim@meyering.net>
4034
4035         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4036         Include <unistd.h>.
4037
4038 2006-09-28  Bruno Haible  <bruno@clisp.org>
4039
4040         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4041         * modules/linkedhash-list (Depends-on): Likewise.
4042         * modules/rbtreehash-list (Depends-on): Likewise.
4043
4044 2006-09-28  Bruno Haible  <bruno@clisp.org>
4045
4046         * lib/strndup.h: Simplify the redefinition of strndup.
4047         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4048         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4049
4050 2006-09-28  Bruno Haible  <bruno@clisp.org>
4051
4052         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4053         * lib/gl_linkedhash_list.c: Likewise.
4054         * lib/gl_rbtreehash_list.c: Likewise.
4055
4056 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4057
4058         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4059         getaddrinfo.
4060
4061         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4062         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4063         it causes <stdio_ext.h> to cause a compile-time error.
4064         Problem reported by Nelson H. F. Beebe.
4065         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4066         of HAVE_DECL___PENDING.
4067
4068         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4069         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4070         declaration.
4071
4072 2006-09-27  Jim Meyering  <jim@meyering.net>
4073
4074         This file could end up with a definition for a function
4075         named __strndup, rather than rpl_strndup on a system with
4076         incomplete weak_alias support.
4077         * lib/strndup.c (strndup): Rename from __strndup.
4078         Remove #defines that used to map __strndup to strndup.
4079         Don't use K&R prototypes.
4080         Remove LIBC-related code, since this file is not sync'd with glibc.
4081         * lib/strndup.h: Revamp, accordingly.
4082         * m4/strndup.m4: Modernize.
4083
4084 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4085
4086         * modules/savewd (Depends-on): Add 'raise'.
4087         * lib/savewd.c: Include <signal.h>, for 'raise'.
4088
4089 2006-09-26  Jim Meyering  <jim@meyering.net>
4090
4091         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4092         when we detect Darwin 8.7.0's acl_get_file bug.
4093         Rearrange to perform the new (below) run-test while $LIBS
4094         contains any acl-related library.  Set USE_ACL at the end.
4095         (gl_ACL_GET_FILE): New function.
4096
4097 2006-09-26  Eric Blake  <ebb9@byu.net>
4098
4099         * lib/verror.c: Include <config.h> unconditionally.
4100
4101 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4102
4103         * modules/clock-time (Maintainer): Add self.
4104         * modules/getlogin_r (Depends-on): Add extensions.
4105
4106 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4107
4108         * modules/clock-time: New module.
4109         * modules/nanosleep (Depends-on): Add clock-time.
4110         * modules/gethrxtime (Depends-on): Likewise.
4111         * modules/gettime (Depends-on): Likewise.
4112         * modules/settime (Depends-on): Likewise.
4113
4114         * modules/fts-lgpl: Depend on openat.
4115         * modules/mkancesdirs: Depend on savewd.
4116         * modules/mkdir-p: Likewise.
4117
4118 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4119
4120         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4121
4122         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4123         `gl_have_arbitrary_file_name_length_limit' to
4124         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4125         actually works between configure runs.
4126
4127 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4128             Bruno Haible  <bruno@clisp.org>
4129
4130         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4131
4132 2006-09-25  Jim Meyering  <jim@meyering.net>
4133
4134         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4135         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4136
4137 2006-09-25  Eric Blake  <ebb9@byu.net>
4138
4139         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4140         exec's in 2006-09-18 patch when shuffling fds.
4141
4142 2006-09-25  Bruno Haible  <bruno@clisp.org>
4143
4144         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4145         Reported by Jim Meyering.
4146
4147 2006-09-24  Jim Meyering  <jim@meyering.net>
4148
4149         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4150         compare a pointer against a literal "0".  That caused failures with
4151         at least HP-UX's hpcc.
4152
4153 2006-09-22  Simon Josefsson  <jas@extundo.com>
4154
4155         * modules/gc-sha1:
4156         * modules/gc-md4:
4157         * modules/gc-hmac-sha1:
4158         * modules/gc-hmac-md5:
4159         * modules/gc-des:
4160         * modules/gc-arcfour: Distribute more files.
4161
4162 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4163
4164         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4165         (gl_linked_iterator_from_to): Initialize struct completely.
4166         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4167         (gl_tree_iterator_from_to): Likewise
4168         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4169         * lib/gl_array_list.c [lint] (gl_array_iterator)
4170         (gl_array_iterator_from_to): Likewise.
4171         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4172         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4173         (gl_carray_iterator_from_to): Likewise.
4174
4175         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4176         * lib/md4.c (md4_process_block): Remove unused variable.
4177         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4178         parentheses for clarity.
4179
4180 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4181
4182         * modules/bison-i18n (Depends-on): Add gettext.
4183
4184 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4185
4186         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4187         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4188         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4189         also add missing comma that caused broken test.
4190         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4191         stdlib.h, for `abort'.
4192         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4193         variables.
4194         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4195         include unistd.h if present, for `rmdir'.
4196         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4197         variables.
4198         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4199         in the process include standard headers for prototypes.
4200         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4201         gets declared on GNU/Linux.
4202         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4203         unistd.h, for `rmdir'.
4204         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4205
4206         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4207         always true.
4208         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4209
4210         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4211
4212 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4213
4214         * gnulib-tool (func_version): Create output all at once.  This
4215         may help avoid triggering unnecessary SIGPIPEs, and at any
4216         rate it doesn't hurt.
4217
4218 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4219             Bruno Haible  <bruno@clisp.org>
4220
4221         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4222         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4223         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4224
4225         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4226         (gl_FUNC_VASPRINTF): Invoke it.
4227
4228 2006-09-22  Bruno Haible  <bruno@clisp.org>
4229
4230         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4231         getloadavg.c as first argument.
4232
4233 2006-09-22  Bruno Haible  <bruno@clisp.org>
4234
4235         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4236         at the beginning of the gl_INIT macro.
4237         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4238         gl_GETLOADAVG.
4239
4240 2006-09-22  Bruno Haible  <bruno@clisp.org>
4241
4242         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4243         module.
4244         Suggested by Ralf Wildenhues.
4245
4246 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4247
4248         Import this patch from libc:
4249
4250         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4251
4252         * lib/regex_internal.c (re_string_reconstruct): Handle
4253         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4254         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4255         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4256         re_string_context_at.
4257
4258         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4259         now requires it.
4260         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4261         gl_REGEX now does it for us.
4262         (gl_REGEX): Add test taken from
4263         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4264
4265         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4266         Check that large offsets work.  Modernize Autoconf usages.
4267         Prefer "yes" to mean a good thing rather than a bad.
4268         Don't put "#define mkstemp" in config.h, as this might interfere
4269         with standard system headers that "#define mkstemp mkstemp64".
4270
4271         * modules/mkstemp (Depends-on): Add extensions, so that
4272         mkstemp is visible on some platforms.
4273         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4274         (Include): Change to "mkstemp.h" from <stdlib.h>.
4275         (Files): Add mkstemp.h.
4276
4277         * lib/mkstemp.h: New file, since some standard headers
4278         #define mkstemp.
4279         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4280         Include "mkstemp.h".
4281         Make the _LIBC code resemble glibc original more,
4282         e.g., use K&R style.
4283         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4284         (mkstemp): Remove, since mkstemp.h does this for us.
4285         * lib/stdlib--.h: Include mkstemp.h.
4286
4287         Import this patch from libc:
4288
4289         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4290
4291         * lib/tempname.c (__gen_tempname): Change attempts_min
4292         into a macro.  Use preprocessor to decide how to initialize
4293         attempts [Coverity CID 67].
4294
4295 2006-09-20  Bruno Haible  <bruno@clisp.org>
4296
4297         * lib/mkdtemp.c: Import from libc.
4298         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4299                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4300                 attempts_min into a macro.  Use preprocessor to decide how to
4301                 initialize attempts [Coverity CID 67].
4302         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4303                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4304                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4305
4306 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4307
4308         * gnulib-tool (func_exit): New function, to allow to pass the
4309         exit status portably through the trap.  Use everywhere.
4310         (--help, --version): Signal a write error.
4311         (trap): catch SIGPIPE, for write errors.
4312         Exit at the end of the trap, with the correct exit status.
4313
4314 2006-09-19  Karl Berry  <karl@gnu.org>
4315
4316         * doc/gnulib.texi: note about the license texinfo files.
4317
4318 2006-09-19  Eric Blake  <ebb9@byu.net>
4319
4320         * gnulib-tool: Avoid space-tab.
4321
4322 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4323
4324         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4325         that prevented coreutils 6.1 from building.  Problem reported
4326         by Petter Reinholdtsen.
4327
4328 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4329
4330         * gnulib-tool (avoidlist): Fix typo that broke options like
4331         --avoid=lock that are used by coreutils bootstrap.
4332
4333 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4334
4335         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4336         more systematically.
4337
4338 2006-09-18  Jim Meyering  <jim@meyering.net>
4339
4340         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4341
4342 2006-09-18  Bruno Haible  <bruno@clisp.org>
4343
4344         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4345
4346 2006-09-18  Bruno Haible  <bruno@clisp.org>
4347
4348         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4349         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4350         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4351         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4352         * m4/gettext.m4: Require autoconf >= 2.52.
4353         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4354         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4355         of gl_cv_header_inttypes_h.
4356
4357 2006-09-18  Bruno Haible  <bruno@clisp.org>
4358
4359         * lib/javaversion.c: Include configmake.h.
4360
4361 2006-09-18  Bruno Haible  <bruno@clisp.org>
4362
4363         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4364         avoid that the while loops be executed in a subshell.
4365
4366 2006-09-18  Bruno Haible  <bruno@clisp.org>
4367
4368         * MODULES.html.sh (func_module): Break long lines.
4369         Suggested by Bruce Korb <bkorb@gnu.org>.
4370
4371 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4372
4373         Speed up by a factor of 1.12.
4374         * gnulib-tool (nl): New variable.
4375         (func_import): Rewrite include directive extraction to only read each
4376         directive once.
4377
4378 2006-09-17  Bruno Haible  <bruno@clisp.org>
4379
4380         * modules/javaversion (Makefile.am): Remove DEFS setting.
4381         (Depends-on): Add configmake, for PKGDATADIR definition.
4382
4383 2006-09-17  Bruno Haible  <bruno@clisp.org>
4384
4385         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4386
4387 2006-09-17  Bruno Haible  <bruno@clisp.org>
4388
4389         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4390         (func_modules_transitive_closure, func_modules_add_dummy,
4391         func_modules_to_filelist, func_import, func_create_testdir,
4392         func_create_megatestdir, ...): Use it wherever possible.
4393         Suggested by Ralf Wildenhues.
4394
4395 2006-09-16  Karl Berry  <karl@gnu.org>
4396
4397         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4398         to avoid sectioning errors.
4399         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4400         [ifinfo]: blank line after @center-ed titles.
4401         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4402         Spell FSF address consistently with others.
4403         (These changes approved by rms.)
4404
4405 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4406
4407         Speed up by a factor of 1.61.
4408         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4409         already checked module names again.
4410
4411 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4412
4413         Speed up by a factor of 1.13.
4414         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4415         for new_files, and the input to func_add_or_update.
4416
4417 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4418
4419         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4420         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4421
4422 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4423
4424         * modules/mkancesdirs (Depends-on): Add fcntl.
4425         * modules/savewd: New file.
4426         * MODULES.html.sh (File system functions): Add savewd.
4427
4428         * modules/configmake (Makefile.am): Add support for the
4429         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4430
4431 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4432
4433         * m4/savewd.m4: New file.
4434
4435 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4436
4437         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4438         (dirchownmod): New arg FD.  All callers changed.
4439         Use FD rather than opening the directory ourself, as opening is
4440         now the caller's responsibility.
4441         * lib/dirchownmod.h: Likewise.
4442         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4443         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4444         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4445         (test_dir): Remove.
4446         (mkancesdirs): Return length of prefix of FILE that has already
4447         been made, or -2 if there is a child doing the work.  Redo
4448         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4449         ".", and treat ".." specially since it might stray back into
4450         already-created areas.  Use a subprocess if necessary.  New arg
4451         WD; all users changed.  MAKE_DIR function should now return 1
4452         if it creates a directory that is not readable.  Return -2 if
4453         a child process is spun off.
4454         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4455         Adjust signature to match code.
4456         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4457         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4458         all users changed.
4459         * lib/savewd.c, lib/savewd.h: New files.
4460
4461 2006-09-15  Jim Meyering  <jim@meyering.net>
4462
4463         * modules/rename-dest-slash: New module.
4464         * MODULES.html.sh (posix_compat): Add it here.
4465
4466         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4467
4468 2006-09-15  Jim Meyering  <jim@meyering.net>
4469
4470         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4471         file.
4472
4473         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4474
4475 2006-09-15  Jim Meyering  <jim@meyering.net>
4476
4477         * lib/rename-dest-slash.c (has_trailing_slash): Use
4478         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4479         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4480         test before testing whether SRC is a directory.
4481         Suggestions from Bruno Haible.
4482
4483         Avoid a warning about an unused variable.
4484         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4485         into the #ifdef block where it's used.
4486
4487         * lib/rename-dest-slash.c: New file.
4488
4489 2006-09-14  Bruno Haible  <bruno@clisp.org>
4490
4491         * lib/allocsa.c: Include <config.h> unconditionally.
4492         * lib/asnprintf.c: Likewise.
4493         * lib/asprintf.c: Likewise.
4494         * lib/c-strcasecmp.c: Likewise.
4495         * lib/c-strcasestr.c: Likewise.
4496         * lib/c-strncasecmp.c: Likewise.
4497         * lib/c-strstr.c: Likewise.
4498         * lib/classpath.c: Likewise.
4499         * lib/clean-temp.c: Likewise.
4500         * lib/concatpath.c: Likewise.
4501         * lib/copy-file.c: Likewise.
4502         * lib/csharpcomp.c: Likewise.
4503         * lib/csharpexec.c: Likewise.
4504         * lib/execute.c: Likewise.
4505         * lib/fatal-signal.c: Likewise.
4506         * lib/findprog.c: Likewise.
4507         * lib/fwriteerror.c: Likewise.
4508         * lib/gl_array_list.c: Likewise.
4509         * lib/gl_array_oset.c: Likewise.
4510         * lib/gl_avltree_list.c: Likewise.
4511         * lib/gl_avltree_oset.c: Likewise.
4512         * lib/gl_avltreehash_list.c: Likewise.
4513         * lib/gl_carray_list.c: Likewise.
4514         * lib/gl_linked_list.c: Likewise.
4515         * lib/gl_linkedhash_list.c: Likewise.
4516         * lib/gl_list.c: Likewise.
4517         * lib/gl_oset.c: Likewise.
4518         * lib/gl_rbtree_list.c: Likewise.
4519         * lib/gl_rbtree_oset.c: Likewise.
4520         * lib/gl_rbtreehash_list.c: Likewise.
4521         * lib/imaxabs.c: Likewise.
4522         * lib/imaxdiv.c: Likewise.
4523         * lib/javacomp.c: Likewise.
4524         * lib/javaexec.c: Likewise.
4525         * lib/javaversion.c: Likewise.
4526         * lib/linebreak.c: Likewise.
4527         * lib/localcharset.c: Likewise.
4528         * lib/lock.c: Likewise.
4529         * lib/mbchar.c: Likewise.
4530         * lib/mbswidth.c: Likewise.
4531         * lib/mkdtemp.c: Likewise.
4532         * lib/pipe.c: Likewise.
4533         * lib/printf-args.c: Likewise.
4534         * lib/printf-parse.c: Likewise.
4535         * lib/progname.c: Likewise.
4536         * lib/progreloc.c: Likewise.
4537         * lib/readlink.c: Likewise.
4538         * lib/sh-quote.c: Likewise.
4539         * lib/stpcpy.c: Likewise.
4540         * lib/stpncpy.c: Likewise.
4541         * lib/strcasecmp.c: Likewise.
4542         * lib/strcasestr.c: Likewise.
4543         * lib/strcspn.c: Likewise.
4544         * lib/striconv.c: Likewise.
4545         * lib/strncasecmp.c: Likewise.
4546         * lib/strnlen1.c: Likewise.
4547         * lib/strstr.c: Likewise.
4548         * lib/strtok_r.c: Likewise.
4549         * lib/tls.c: Likewise.
4550         * lib/tmpdir.c: Likewise.
4551         * lib/unicodeio.c: Likewise.
4552         * lib/unsetenv.c: Likewise.
4553         * lib/vasnprintf.c: Likewise.
4554         * lib/vasprintf.c: Likewise.
4555         * lib/wait-process.c: Likewise.
4556         * lib/xallocsa.c: Likewise.
4557         * lib/xsetenv.c: Likewise.
4558         * lib/xstriconv.c: Likewise.
4559
4560 2006-09-13  Simon Josefsson  <jas@extundo.com>
4561
4562         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4563         that internally, suggested by Ralf Wildenhues
4564         <Ralf.Wildenhues@gmx.de>.
4565
4566 2006-09-13  Simon Josefsson  <jas@extundo.com>
4567
4568         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4569         @LIBOBJS@.
4570         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4571
4572 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4573
4574         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4575         longer worry about uses that don't define HAVE_CONFIG_H.
4576         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4577         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4578         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4579         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4580         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4581         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4582         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4583         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4584         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4585         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4586         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4587         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4588         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4589         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4590         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4591         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4592         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4593         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4594         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4595         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4596         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4597         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4598         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4599         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4600         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4601         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4602         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4603         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4604         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4605         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4606         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4607         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4608         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4609         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4610         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4611         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4612         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4613         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4614         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4615         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4616         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4617         Likewise.
4618
4619 2006-09-13  Eric Blake  <ebb9@byu.net>
4620
4621         * lib/getopt.c: Fix typo in last commit.
4622
4623 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4624
4625         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4626         dgettext.
4627
4628 2006-09-12  Jim Meyering  <jim@meyering.net>
4629
4630         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4631         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4632         Reported by Nelson H. F. Beebe.
4633
4634 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4635
4636         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4637         program_invocation_name and program_invocation_short_name are
4638         initialized.
4639         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4640         and program_invocation_short_name to argp.h, so they are visible
4641         to user programs.
4642         * lib/argp.h: Likewise
4643
4644 2006-09-10  Bruno Haible  <bruno@clisp.org>
4645
4646         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4647         m4/inttypes_h.m4, m4/uintmax_t.m4.
4648
4649 2006-09-10  Bruno Haible  <bruno@clisp.org>
4650
4651         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4652         gl_AC_TYPE_UINTMAX_T.
4653
4654 2006-09-10  Bruno Haible  <bruno@clisp.org>
4655
4656         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4657
4658 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4659
4660         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4661         convention.  Text proposed by Bruno Haible.
4662         (struct argp_option): Document the use of N_() wrappers.
4663
4664         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4665         '\v', and translate the two parts separately, instead of feeding
4666         the whole string to gettext.  This allows to exclude
4667         '\v' from the strings visible to the translator by writing doc
4668         strings as N_("..") "\v" N_("..").
4669
4670 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4671
4672         * config/srclist.txt: Undo latest change; the bug was fixed.
4673
4674 2006-09-09  Bruno Haible  <bruno@clisp.org>
4675
4676         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4677         assignments if building a library without libtool.
4678         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4679         in func_emit_lib_Makefile_am.
4680         (func_import): When building a static library libfoo.a, arrange to
4681         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4682         (func_create_testdir): Likewise.
4683         * modules/gc (configure.ac, Makefile.am): If building statically,
4684         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4685         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4686         * modules/striconv (configure.ac, Makefile.am): Likewise.
4687         Based on a suggestion by Ralf Wildenhues.
4688
4689 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4690
4691         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4692         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4693         Also:
4694
4695         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4696         Add year_2050_test to catch glibc bug 2821
4697         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4698
4699         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4700         Prefer #ifdef to #if.
4701
4702         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4703         Return from 'main' instead of calling 'exit'.
4704
4705 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4706
4707         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4708         returned the maximum time_t value rather than (time_t) -1.
4709         Problem originally reported by William Bardwell
4710         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4711
4712         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4713         Moved to here ...
4714         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4715         ... from here.
4716
4717 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4718
4719         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4720         2821 is fixed.
4721
4722 2006-09-08  Jim Meyering  <jim@meyering.net>
4723
4724         Don't make generated files read-only.  That would bother too many
4725         people.  However, do retain the ability to work when targets are
4726         read-only: remove the destination and temporary files before writing
4727         them (when generated via sed or echo), or by using the -f option for
4728         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4729         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4730         * modules/byteswap, modules/configmake, modules/fcntl:
4731         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4732         * modules/localcharset, modules/netinet_in, modules/poll:
4733         * modules/stdbool, modules/stdint, modules/sys_select:
4734         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4735
4736 2006-09-08  Jim Meyering  <jim@meyering.net>
4737
4738         Avoid new build failure on FreeBSD 6.0.
4739         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4740         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4741         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4742
4743 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4744
4745         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4746
4747 2006-09-07  Jim Meyering  <jim@meyering.net>
4748
4749         Fix global typo in last change: use chmod u-w, not chmod u-x.
4750         Spotted by Paul Eggert and Bruce Korb.
4751         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4752         * modules/byteswap, modules/configmake, modules/fcntl:
4753         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4754         * modules/localcharset, modules/netinet_in, modules/poll:
4755         * modules/stdbool, modules/stdint, modules/sys_select:
4756         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4757
4758 2006-09-06  Jim Meyering  <jim@meyering.net>
4759
4760         Make generated files be read-only.
4761         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4762         Ensure that each generated file is now read-only.
4763         * modules/argz: Likewise.
4764         * modules/arpa_inet: Likewise.
4765         * modules/byteswap: Likewise.
4766         * modules/configmake: Likewise.
4767         * modules/fcntl: Likewise.
4768         * modules/fnmatch: Likewise.
4769         * modules/getopt: Likewise.
4770         * modules/glob: Likewise.
4771         * modules/inttypes: Likewise.
4772         * modules/netinet_in: Likewise.
4773         * modules/poll: Likewise.
4774         * modules/stdbool: Likewise.
4775         * modules/stdint: Likewise.
4776         * modules/sys_select: Likewise.
4777         * modules/sys_socket: Likewise.
4778         * modules/sys_stat: Likewise.
4779         * modules/sysexits: Likewise.
4780         * modules/localcharset: Same as above, but continue using temporary
4781         file named "t-$@" (why different?) rather than the "$@-t" used
4782         everywhere else.
4783
4784         * modules/sysexits (Makefile.am): Replace literal occurrences
4785         of "sysexit.h" more readable, and more consistent, "$@".
4786
4787 2006-09-06  Bruno Haible  <bruno@clisp.org>
4788
4789         * modules/striconv: New file.
4790         * modules/xstriconv: New file.
4791         * MODULES.html.sh (Internationalization functions): Add striconv,
4792         xstriconv.
4793
4794 2006-09-06  Bruno Haible  <bruno@clisp.org>
4795
4796         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4797         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4798         not using libtool correctly.
4799
4800 2006-09-06  Bruno Haible  <bruno@clisp.org>
4801
4802         * lib/striconv.h: New file.
4803         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4804         iconvstring.c.
4805         * lib/xstriconv.h: New file.
4806         * lib/xstriconv.c: New file.
4807
4808 2006-09-06  Bruno Haible  <bruno@clisp.org>
4809
4810         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4811         lib_..._LDFLAGS.
4812
4813 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4814
4815         * lib/argz_.h: Sync from Libtool.
4816
4817         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4818                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4819
4820         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4821
4822 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4823
4824         * modules/trim: New file.
4825
4826 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4827
4828         * lib/trim.h: New file.
4829         * lib/trim.c: New file.
4830
4831 2006-09-05  Bruno Haible  <bruno@clisp.org>
4832
4833         * MODULES.html.sh (String handling): Add trim.
4834
4835 2006-09-04  Karl Berry  <karl@gnu.org>
4836
4837         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4838         until next release.
4839
4840 2006-09-03  Bruno Haible  <bruno@clisp.org>
4841
4842         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4843         correctly.
4844
4845 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4846
4847         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4848         not gl_GETLOADAVG.  Omit unneeded semicolons.
4849         Problems reported by Ralf Wildenhues in
4850         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4851         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4852         at the end, which is the usual gnulib style.
4853
4854         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4855         of doing all the work ourselves.
4856         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4857         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4858
4859 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4860
4861         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4862         Problem reported by Ralf Wildenhues in
4863         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4864
4865         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4866         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4867
4868 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4869
4870         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4871         yesterday's patch by changing test -n to test -z.
4872
4873 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4874
4875         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4876         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4877         the former is now obsolescent.
4878
4879         * modules/chdir-long (Depends-on): Add fcntl.
4880
4881 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4882
4883         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4884         obsolescent, and programs should use gnulib instead.
4885         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4886         but with prefixes changed.
4887
4888 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4889
4890         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4891         or stdbool.h, because they might not exist while configuring.
4892
4893         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4894         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4895         does that for us.
4896         (O_DIRECTORY): Remove.
4897
4898 2006-08-31  Eric Blake  <ebb9@byu.net>
4899
4900         * gnulib-tool: Don't let emacs change spaces to TAB.
4901
4902 2006-08-31  Bruno Haible  <bruno@clisp.org>
4903
4904         * gnulib-tool: When calling func_import more than once, do it in a
4905         subshell.
4906         Reported by Eric Blake <ebb9@byu.net>.
4907
4908 2006-08-31  Bruno Haible  <bruno@clisp.org>
4909
4910         * gnulib-tool (nl): Remove variable.
4911         (sed_transform_lib_file): Use more robust test for config-h module.
4912         (func_import): Fix typo in 2006-08-25 patch.
4913
4914 2006-08-31  Bruno Haible  <bruno@clisp.org>
4915
4916         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
4917         specified, augment Makefile.am variables instead of assigning them.
4918
4919 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4920
4921         Work around a bug in both the Linux and SunOS 64-bit kernels:
4922         nanosleep mishandles sleeps for longer than 2**31 seconds.
4923         Problem reported by Frank v Waveren in
4924         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4925         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
4926         Check for nanosleep bug.
4927         (LIB_NANOSLEEP): Append clock_gettime library if needed.
4928
4929 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4930
4931         Work around a bug in both the Linux and SunOS 64-bit kernels:
4932         nanosleep mishandles sleeps for longer than 2**31 seconds.
4933         Problem reported by Frank v Waveren in
4934         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
4935         * lib/nanosleep.c (BILLION): New constant.
4936         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
4937         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
4938         implementation.
4939
4940 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4941
4942         * modules/nanosleep (Depends-on): Add gettime.
4943
4944 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
4945         and Simon Josefsson  <jas@extundo.com>
4946         and Oskar Liljeblad  <oskar@osk.mine.nu>
4947
4948         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
4949         * gnulib-tool (func_import): New license type 'unmodifiable license
4950         text'.
4951         * modules/fdl: Use it.  Longer description.
4952         * module/gpl, module/lgpl: New files.
4953
4954 2006-08-30  Jim Meyering  <jim@meyering.net>
4955
4956         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
4957         shadowing the parameter.
4958
4959 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4960
4961         Sync from Libtool:
4962
4963         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4964
4965         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
4966         sharing with gnulib.  Report by Eric Blake.
4967
4968 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4969
4970         * modules/isapipe: New file.
4971         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
4972
4973 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4974
4975         * modules/configmake (Makefile.am): Add a comment, and omit
4976         the CONFIGMAKE_ prefix from generated macro names.  Suggested
4977         by Bruno Haible.
4978
4979 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4980
4981         * m4/isapipe.m4: New file.
4982
4983 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
4984
4985         * lib/isapipe.c, lib/isapipe.h: New files.
4986
4987 2006-08-29  Jim Meyering  <jim@meyering.net>
4988
4989         * modules/configmake (Makefile.am): Make configmake.h depend on
4990         Makefile.  Otherwise, a stale configmake.h could hang around.
4991
4992 2006-08-29  Eric Blake  <ebb9@byu.net>
4993
4994         * lib/error.c (error_at_line, print_errno_message): Match libc, after
4995         resolution of upstream bug 3044.
4996
4997 2006-08-29  Bruno Haible  <bruno@clisp.org>
4998
4999         * modules/localcharset (Depends-on): Add configmake.
5000         (Makefile.am): Remove setting of LIBDIR through DEFS.
5001
5002 2006-08-29  Bruno Haible  <bruno@clisp.org>
5003
5004         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5005         defined.
5006
5007 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5008
5009         * modules/fcntl: New file.
5010         * modules/chdir-safer (Depends-on): Add fcntl.
5011         * modules/fts: Likewise.
5012         * modules/mkdir-p: Likewise.
5013
5014         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5015         This undoes the most recent change, since we're now addressing the
5016         problem in a different way.
5017
5018         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5019         into output, since the output might be called Makefile.am even
5020         if $makefile_name is something different.
5021         (func_import): Use $makefile_am rather than
5022         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5023         empty.
5024
5025         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5026
5027 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5028
5029         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5030         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5031         recent change to stdint.m4, since we're now addressing the problem in a
5032         different way.
5033
5034 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5035
5036         * m4/fcntl_h.m4: New file.
5037
5038 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5039
5040         * lib/fcntl_.h: New file.
5041         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5042         the fcntl module.
5043         * lib/dirchownmod.c: Likewise.
5044         * lib/fts.c: Likewise.
5045
5046         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5047         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5048         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5049         just before including <inttypes.h>, to avoid circular inclusion.
5050
5051 2006-08-28  Jim Meyering  <jim@meyering.net>
5052
5053         * doc/visibility.texi: Actually read and correct the grammar of the
5054         sentence affected by yesterday's change.
5055
5056 2006-08-28  Eric Blake  <ebb9@byu.net>
5057
5058         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5059         needs wrapper.
5060
5061 2006-08-28  Eric Blake  <ebb9@byu.net>
5062
5063         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5064
5065 2006-08-28  Eric Blake  <ebb9@byu.net>
5066
5067         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5068
5069 2006-08-28  Bruno Haible  <bruno@clisp.org>
5070
5071         * modules/c-strstr: New file, from GNU gettext.
5072         * MODULES.html.sh (String handling): Add c-strstr.
5073
5074 2006-08-28  Bruno Haible  <bruno@clisp.org>
5075
5076         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5077         macros.
5078         Reported by Eric Blake.
5079
5080 2006-08-28  Bruno Haible  <bruno@clisp.org>
5081
5082         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5083         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5084         * lib/vasprintf.c: Include errno.h, limits.h.
5085         (EOVERFLOW): New fallback definition.
5086         (vasprintf): Test here whether the string length is > INT_MAX.
5087         * lib/vsnprintf.c: Include errno.h, limits.h.
5088         (EOVERFLOW): New fallback definition.
5089         (vsnprintf): Fix bug when generated string was too long for the buffer.
5090         Test here whether the string length is > INT_MAX.
5091
5092 2006-08-28  Bruno Haible  <bruno@clisp.org>
5093
5094         * lib/inttypes_.h (SCNX*): Remove definitions.
5095         Reported by Eric Blake.
5096
5097 2006-08-28  Bruno Haible  <bruno@clisp.org>
5098
5099         * lib/c-strstr.h: New file, from GNU gettext.
5100         * lib/c-strstr.c: New file, from GNU gettext.
5101
5102 2006-08-28  Bruno Haible  <bruno@clisp.org>
5103
5104         * gnulib-tool: Reorder some statements.
5105
5106 2006-08-28  Bruno Haible  <bruno@clisp.org>
5107
5108         * gnulib-tool: New option --makefile-name.
5109         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5110         $makefile_name.
5111         (func_import): Write $makefile_name to the cache file, and read it from
5112         there unless explicitly specified. Use $makefile_name as file name
5113         instead of Makefile.am. Adjust the recommendations accordingly.
5114
5115 2006-08-28  Bruno Haible  <bruno@clisp.org>
5116
5117         * gnulib-tool (func_verify_module): Check against misapplying patch.
5118
5119 2006-08-28  Bruno Haible  <bruno@clisp.org>
5120
5121         * gnulib-tool (func_relativize, func_relconcat): New functions.
5122         Give an error if --local-dir is given with --update.
5123         Remove trailing slashes from $local_gnulib_dir.
5124         (func_import): Store the relativized $local_gnulib_dir in
5125         gnulib-cache.m4, and read it from there if not specified explicitly.
5126
5127 2006-08-28  Bruno Haible  <bruno@clisp.org>
5128
5129         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5130         is the current directory. Respect also $local_gnulib_dir.
5131
5132 2006-08-28  Bruno Haible  <bruno@clisp.org>
5133             Simon Josefsson  <jas@extundo.com>
5134
5135         BeOS portability.
5136         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5137
5138 2006-08-27  Jim Meyering  <jim@meyering.net>
5139
5140         * doc/visibility.texi: Remove duplicate word: "pointer".
5141
5142 2006-08-26  Bruno Haible  <bruno@clisp.org>
5143
5144         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5145         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5146         (Makefile.am): Create inttypes.h from inttypes_.h.
5147         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5148
5149         * modules/imaxabs: New file.
5150
5151         * modules/imaxdiv: New file.
5152
5153 2006-08-26  Bruno Haible  <bruno@clisp.org>
5154
5155         * m4/inttypes.m4: New file.
5156         * m4/_inttypes_h.m4: Remove file.
5157         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5158         PRI_MACROS_BROKEN.
5159         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5160
5161         * m4/imaxabs.m4: New file.
5162
5163         * m4/imaxdiv.m4: New file.
5164
5165 2006-08-26  Bruno Haible  <bruno@clisp.org>
5166
5167         * lib/inttypes_.h: New file.
5168         * lib/inttypes.h: Remove file.
5169         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5170
5171         * lib/imaxabs.c: New file.
5172
5173         * lib/imaxdiv.c: New file.
5174
5175 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5176
5177         New config-h module, so that "make" output needn't be cluttered
5178         by -DHAVE_CONFIG_H.
5179         * MODULES.html.sh (Support for building libraries and executables):
5180         Add config-h.
5181         * modules/config-h: New file.
5182         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5183         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5184         the config-h module is used.
5185
5186         New configmake module, so that "make" output needn't be cluttered
5187         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5188         * MODULES.html.sh (Support for building libraries and executables):
5189         Add configmake.
5190         * modules/configmake: New file.
5191
5192 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5193
5194         * m4/config-h.m4: New file.
5195
5196 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5197
5198         * config/srclist.txt: Add elisp-comp.
5199
5200 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5201
5202         * MODULES.html.sh (Support for building libraries and executables):
5203         Add elisp-comp.
5204         * build-aux/elisp-comp: New file.
5205         * modules/elisp-comp: New file.
5206
5207 2006-08-24  Bruno Haible  <bruno@clisp.org>
5208
5209         * gnulib-tool (func_create_testdir): Use non-default values of
5210         sourcebase and m4base.
5211
5212 2006-08-24  Bruno Haible  <bruno@clisp.org>
5213
5214         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5215         HTML structure.
5216
5217 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5218
5219         * modules/openat (Depends-on): Add lchown.
5220
5221 2006-08-23  Bruno Haible  <bruno@clisp.org>
5222
5223         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5224         of gl_LOCK_EARLY instead of gl_LOCK.
5225
5226 2006-08-23  Bruno Haible  <bruno@clisp.org>
5227
5228         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5229         on OSF/1 to no.
5230         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5231
5232 2006-08-23  Bruno Haible  <bruno@clisp.org>
5233
5234         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5235         as unusable.
5236
5237         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5238         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5239         (gl_LOCK): New macro.
5240
5241 2006-08-22  Simon Josefsson  <jas@extundo.com>
5242
5243         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5244         to md5 module.
5245
5246 2006-08-22  Simon Josefsson  <jas@extundo.com>
5247
5248         * MODULES.html.sh: Add "Support for maintaining and release
5249         projects".
5250
5251         * build-aux/gnupload: New file, from coreutils.
5252
5253 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5254
5255         Avoid the need for AC_LIBSOURCES in m4 macros.
5256         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5257         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5258         * modules/check-version (EXTRA_DIST): Add check-version.h.
5259         * modules/crc (EXTRA_DIST): Add crc.h.
5260         * modules/des (EXTRA_DIST): Add des.h.
5261         * modules/gc (EXTRA_DIST): Add gc.h.
5262         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5263         * modules/getline (EXTRA_DIST): Add getline.h.
5264         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5265         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5266         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5267         * modules/md2 (EXTRA_DIST): Add md2.h.
5268         * modules/md4 (EXTRA_DIST): Add md4.h.
5269         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5270         * modules/read-file (EXTRA_DIST): Add read-file.h.
5271         * modules/readline (EXTRA_DIST): Add readline.h.
5272         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5273         rijndael-api-fst.h.
5274
5275 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5276
5277         * m4/rijndael.m4 (gl_ARCFOUR):
5278         * m4/arctwo.m4 (gl_ARCTWO):
5279         * m4/check-version.m4 (gl_CHECK_VERSION):
5280         * m4/crc.m4 (gl_CRC):
5281         * m4/des.m4 (gl_DES):
5282         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5283         * m4/gc.m4 (gl_GC):
5284         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5285         * m4/getline.m4 (gl_FUNC_GETLINE):
5286         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5287         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5288         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5289         * m4/md2.m4 (gl_MD2):
5290         * m4/md4.m4 (gl_MD4):
5291         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5292         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5293         * m4/readline.m4 (gl_FUNC_READLINE):
5294         * m4/rijndael.m4 (gl_RIJNDAEL):
5295         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5296         to get the necessary .h files and whatnot.
5297
5298 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5299
5300         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5301         gnulib rather than the other way around.
5302         * config/srclistvars.sh (COREUTILS): Remove.
5303
5304 2006-08-22  Jim Meyering  <jim@meyering.net>
5305
5306         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5307
5308         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5309
5310 2006-08-22  Eric Blake  <ebb9@byu.net>
5311
5312         * modules/regexprops-generic: New file.
5313         * MODULES.html.sh (Support for building documentation): List it.
5314
5315 2006-08-22  Eric Blake  <ebb9@byu.net>
5316
5317         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5318         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5319         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5320         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5321
5322 2006-08-22  Bruno Haible  <bruno@clisp.org>
5323
5324         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5325         and lib_LTLIBRARIES like the other lib_* variables.
5326
5327 2006-08-22  Bruno Haible  <bruno@clisp.org>
5328
5329         * build-aux/x-to-1.in: New file, from GNU gettext.
5330
5331 2006-08-22  Bruno Haible  <bruno@clisp.org>
5332
5333         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5334         <utmpx.h> exists.
5335
5336 2006-08-22  Bruno Haible  <bruno@clisp.org>
5337
5338         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5339         <utmpx.h> exists.
5340
5341 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5342
5343         BeOS portability.
5344         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5345         exist.
5346         Problem reported by Bruno Haible.
5347
5348 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5349
5350         Avoid the need for AC_LIBSOURCES in m4 macros.
5351         * modules/acl (EXTRA_DIST): Add acl.h.
5352         * modules/argmatch (Files): Add m4/argmatch.m4.
5353         (configure.ac): Add gl_ARGMATCH.
5354         (EXTRA_DIST): Renamed from lib_SOURCES, for
5355         consistency with the other modules.  Remove argmatch.c.
5356         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5357         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5358         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5359         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5360         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5361         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5362         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5363         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5364         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5365         * modules/closeout (EXTRA_DIST): Add closeout.h.
5366         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5367         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5368         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5369         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5370         dirname.h; remove basename.c and stripslash.c.
5371         * modules/exclude (EXTRA_DIST): Add exclude.h.
5372         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5373         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5374         * modules/file-type (EXTRA_DIST): Add file-type.h.
5375         * modules/filemode (EXTRA_DIST): Add filemode.h.
5376         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5377         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5378         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5379         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5380         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5381         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5382         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5383         * modules/getdate (EXTRA_DIST): Add getdate.c.
5384         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5385         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5386         * modules/getpass (EXTRA_DIST): Add getpass.h.
5387         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5388         * modules/group-member (EXTRA_DIST): Add group-member.h.
5389         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5390         * modules/hash (EXTRA_DIST): Add hash.h.
5391         * modules/human (EXTRA_DIST): Add human.h.
5392         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5393         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5394         * modules/lchown (EXTRA_DIST): Add lchown.h.
5395         * modules/long-options (EXTRA_DIST): Add long-options.h.
5396         * modules/lstat (EXTRA_DIST): Add lstat.h.
5397         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5398         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5399         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5400         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5401         * modules/memxor (EXTRA_DIST): Add memxor.h.
5402         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5403         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5404         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5405         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5406         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5407         * modules/physmem (EXTRA_DIST): Add physmem.h.
5408         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5409         * modules/posixver (EXTRA_DIST): Add posixver.h.
5410         * modules/quote (EXTRA_DIST): Add quote.h.
5411         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5412         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5413         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5414         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5415         regex_internal.h regexec.c.
5416         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5417         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5418         * modules/same (EXTRA_DIST): Add same.h.
5419         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5420         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5421         * modules/savedir (EXTRA_DIST): Add savedir.h.
5422         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5423         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5424         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5425         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5426         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5427         * modules/strdup (EXTRA_DIST): Add strdup.h.
5428         * modules/strftime (EXTRA_DIST): Add strftime.h.
5429         * modules/strndup (EXTRA_DIST): Add strndup.h.
5430         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5431         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5432         * modules/time_r (EXTRA_DIST): Add time_r.h.
5433         * modules/timespec (EXTRA_DIST): Add timespec.h.
5434         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5435         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5436         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5437         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5438         * modules/userspec (EXTRA_DIST): Add userspec.h.
5439         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5440         * modules/utimens (EXTRA_DIST): Add utimens.h.
5441         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5442         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5443         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5444         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5445         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5446         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5447         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5448         * modules/yesno (EXTRA_DIST): Add yesno.h.
5449
5450 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5451
5452         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5453
5454         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5455         * m4/dev-ino.m4, same-inode.m4: Remove.
5456
5457         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5458         * m4/acl.m4 (AC_FUNC_ACL):
5459         * m4/backupfile.m4 (gl_BACKUPFILE):
5460         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5461         * m4/canon-host.m4 (gl_CANON_HOST):
5462         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5463         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5464         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5465         * m4/cloexec.m4 (gl_CLOEXEC):
5466         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5467         * m4/closeout.m4 (gl_CLOSEOUT):
5468         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5469         * m4/dirname.m4 (gl_DIRNAME):
5470         * m4/exclude.m4 (gl_EXCLUDE):
5471         * m4/exitfail.m4 (gl_EXITFAIL):
5472         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5473         * m4/file-type.m4 (gl_FILE_TYPE):
5474         * m4/filemode.m4 (gl_FILEMODE):
5475         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5476         * m4/fpending.m4 (gl_FUNC_FPENDING):
5477         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5478         * m4/fts.m4 (gl_FUNC_FTS):
5479         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5480         * m4/getdate.m4 (gl_GETDATE):
5481         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5482         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5483         * m4/getpass.m4 (gl_FUNC_GETPASS):
5484         * m4/gettime.m4 (gl_GETTIME):
5485         * m4/getugroups.m4 (gl_GETUGROUPS):
5486         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5487         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5488         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5489         * m4/hash.m4 (gl_HASH):
5490         * m4/idcache.m4 (gl_IDCACHE):
5491         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5492         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5493         * m4/long-options.m4 (gl_LONG_OPTIONS):
5494         * m4/lstat.m4 (gl_FUNC_LSTAT):
5495         * m4/md5.m4 (gl_MD5):
5496         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5497         * m4/memcoll.m4 (gl_MEMCOLL):
5498         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5499         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5500         * m4/memxor.m4 (gl_MEMXOR):
5501         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5502         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5503         * m4/modechange.m4 (gl_MODECHANGE):
5504         * m4/mountlist.m4 (gl_MOUNTLIST):
5505         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5506         * m4/openat.m4 (gl_FUNC_OPENAT):
5507         * m4/pathmax.m4 (gl_PATHMAX):
5508         * m4/physmem.m4 (gl_PHYSMEM):
5509         * m4/posixtm.m4 (gl_POSIXTM):
5510         * m4/posixver.m4 (gl_POSIXVER):
5511         * m4/quote.m4 (gl_QUOTE):
5512         * m4/quotearg.m4 (gl_QUOTEARG):
5513         * m4/readtokens.m4 (gl_READTOKENS):
5514         * m4/readutmp.m4 (gl_READUTMP):
5515         * m4/regex.m4 (gl_REGEX):
5516         * m4/safe-read.m4 (gl_SAFE_READ):
5517         * m4/safe-write.m4 (gl_SAFE_WRITE):
5518         * m4/same.m4 (gl_SAME):
5519         * m4/save-cwd.m4 (gl_SAVE_CWD):
5520         * m4/savedir.m4 (gl_SAVEDIR):
5521         * m4/settime.m4 (gl_SETTIME):
5522         * m4/sha1.m4 (gl_SHA1):
5523         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5524         * m4/stat-macros.m4 (gl_STAT_MACROS):
5525         * m4/stat-time.m4 (gl_STAT_TIME):
5526         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5527         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5528         * m4/strdup.m4 (gl_FUNC_STRDUP):
5529         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5530         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5531         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5532         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5533         * m4/time_r.m4 (gl_TIME_R):
5534         * m4/timespec.m4 (gl_TIMESPEC):
5535         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5536         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5537         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5538         * m4/userspec.m4 (gl_USERSPEC):
5539         * m4/utimecmp.m4 (gl_UTIMECMP):
5540         * m4/utimens.m4 (gl_UTIMENS):
5541         * m4/xalloc.m4 (gl_XALLOC):
5542         * m4/xgetcwd.m4 (gl_XGETCWD):
5543         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5544         * m4/xreadlink.m4 (gl_XREADLINK):
5545         * m4/xstrtod.m4 (gl_XSTRTOD):
5546         * m4/yesno.m4 (gl_YESNO):
5547         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5548         to get the necessary .h files and whatnot.
5549
5550 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5551             Bruno Haible  <bruno@clisp.org>
5552
5553         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5554         /bin/sh understanding of '!' conditional negation.
5555
5556 2006-08-21  Jim Meyering  <jim@meyering.net>
5557
5558         * modules/openat (Depends-on): Really alphabetize.
5559
5560         * modules/acl (Depends-on): Add error and quote.
5561
5562         * check-module (find_included_lib_files): Add at-func.c to the
5563         ok-to-include-more-than-once white list.
5564
5565         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5566
5567 2006-08-21  Bruno Haible  <bruno@clisp.org>
5568
5569         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5570         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5571         Reported by Martin Lambers <marlam@marlam.de>.
5572
5573 2006-08-21  Bruno Haible  <bruno@clisp.org>
5574
5575         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5576         specify an installation location, don't emit a noinst_LIBRARIES or
5577         noinst_LTLIBRARIES assignment.
5578
5579 2006-08-21  Bruno Haible  <bruno@clisp.org>
5580
5581         BeOS portability.
5582         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5583         BeOS has mbrtowc() but no <wctype.h>.
5584
5585 2006-08-21  Bruno Haible  <bruno@clisp.org>
5586
5587         BeOS portability.
5588         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5589         exist.
5590
5591 2006-08-21  Bruno Haible  <bruno@clisp.org>
5592
5593         BeOS portability.
5594         * lib/mbchar.h: Include <wctype.h> only if it exists.
5595
5596 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5597
5598         Remove files that are no longer needed by their respective modules.
5599         * m4/obstack.m4: Remove.
5600         * m4/strerror_r.m4: Remove.
5601         * m4/uint32_t.m4: Remove.
5602         * m4/uintptr_t.m4: Remove.
5603         * m4/ullong_max.m4: Remove.
5604         * m4/xstrtoimax.m4: Remove.
5605         * m4/xstrtoumax.m4: Remove.
5606
5607         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5608         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5609         dependencies now capture this.
5610
5611         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5612         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5613         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5614         * m4/human.m4 (gl_HUMAN): Likewise.
5615         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5616         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5617
5618         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5619
5620         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5621         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5622         stdint.
5623         * m4/human.m4 (gl_HUMAN): Likewise.
5624         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5625         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5626         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5627         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5628         * m4/xstrtol (gl_XSTRTOL): Likewise.
5629
5630         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5631         AC_TYPE_LONG_LONG_INT.
5632         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5633         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5634         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5635         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5636
5637         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5638         on stdbool.
5639
5640         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5641         (gl_PREREQ_XSTRTOUL): Remove.
5642
5643         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5644
5645         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5646         mode.
5647
5648 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5649
5650         Add and change modules to make it easier for coreutils to use
5651         gnulib-tool.
5652         * modules/backupfile (Files): Remove m4/d-ino.m4.
5653         (Depends-on): Add d-ino.
5654         * modules/cycle-check (Depends-on): Add stdint.
5655         (lib_SOURCES): Add cycle-check.h.
5656         * modules/d-ino: New module.
5657         * modules/d-type: New module.
5658         * modules/error (Files): Remove m4/strerror_r.m4.
5659         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5660         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5661         m4/inttypes_h.m4, m4/uintmax_t.m4.
5662         (Depends-on): Add stdint.
5663         (lib_SOURCES): Add fsusage.h.
5664         * modules/getcwd (Files): Remove d-ino.m4.
5665         (Depends-on): Add d-ino.
5666         * modules/getndelim2 (Depends-on): Add stdint.
5667         * modules/glob (Files): Remove m4/d-type.m4.
5668         (Depends-on): Add d-type.
5669         * modules/host-os: New module.
5670         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5671         m4/inttypes_h.m4, m4/uintmax_t.m4.
5672         * Depends-on: Add stdint.
5673         (lib_SOURCES): Add human.h.
5674         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5675         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5676         m4/uintmax_t.m4, m4/ulonglong.m4.
5677         (Depends-on): Add stdint.
5678         (EXTRA_DIST): Add inttostr.h.
5679         * modules/lchmod: New module.
5680         * modules/link-follow: New module.
5681         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5682         (Depends-on): Add lchmod.
5683         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5684         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5685         (Depends-on): Add stdint.
5686         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5687         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5688         (Depends-on): Add stdint.
5689         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5690         * modules/perl: New module.
5691         * modules/regex (Depends-on): Add stdint.
5692         * modules/rmdir-errno: New module.
5693         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5694         m4/intmax_t.m4.
5695         (Depends-on): Add stdint.
5696         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5697         m4/uintmax_t.m4.
5698         (Depends-on): Add stdint.
5699         * modules/unlink-busy: New module.
5700         * modules/utimecmp (Depends-on): Add stdint.
5701         * modules/uptime: New module.
5702         * modules/winsz-ioctl: New module.
5703         * modules/winsz-termios: New module.
5704         * modules/xnanosleep (Depends-on): Add nanosleep.
5705         * modules/ullong_max: Remove.
5706         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5707         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5708         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5709         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5710         (Depends-on): Add inttypes.
5711         (lib_SOURCES): Add xstrtol.h.
5712         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5713         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5714         * MODULES.html.sh: Move 'assert' into the assert section.
5715         Move 'dummy' into the linking section.
5716         Remove ullong_max.
5717         Add section for compatibility checks for POSIX:2001 functions,
5718         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5719         winsz-ioctl, and winsz-termios into it.
5720         Add lchmod.
5721         Add top-level Misc section and put host-os, perl, and uptime
5722         into it.
5723
5724 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5725
5726         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5727         now assume the stdint module.  Do not include inttypes.h.
5728         * lib/fsusage.h: Likewise.
5729         * lib/getndelim2.c: Likewise.
5730         * lib/human.h: Likewise.
5731         * lib/inttostr.h: Likewise.
5732         * lib/obstack.c: Likewise.
5733         * lib/regex_internal.h: Likewise.
5734         * lib/tempname.c: Likewise.
5735         * lib/utimecmp.c: Likewise.
5736         * lib/xstrtol.h: Likewise.
5737
5738         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5739
5740         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5741         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5742         * lib/xtime.h: Likewise.
5743
5744 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5745
5746         * modules/openat (Files): Add lib/fchmodat.c.
5747         Fixes problem reported by Jay Youngman.
5748
5749 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5750
5751         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5752         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5753
5754 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5755             Bruno Haible  <bruno@clisp.org>
5756
5757         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5758         and is a script that invokes bison. Tighten the code. Add comments.
5759
5760 2006-08-18  Jim Meyering  <jim@meyering.net>
5761
5762         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5763         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5764         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5765         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5766
5767 2006-08-18  Bruno Haible  <bruno@clisp.org>
5768
5769         * modules/bison-i18n: New file.
5770         * MODULES.html.sh (Internationalization functions): Add it.
5771
5772 2006-08-18  Bruno Haible  <bruno@clisp.org>
5773
5774         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5775         sys/statvfs.h. When getmntinfo was found, check its declaration and
5776         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5777
5778 2006-08-18  Bruno Haible  <bruno@clisp.org>
5779
5780         * m4/bison-i18n.m4: New file, from bison.
5781
5782 2006-08-18  Bruno Haible  <bruno@clisp.org>
5783
5784         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5785         (ME_DUMMY): Treat "kernfs" as a dummy.
5786         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5787
5788 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5789
5790         Update from coreutils.
5791
5792         2006-08-15  Jim Meyering  <jim@meyering.net>
5793
5794         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5795
5796         2006-01-17  Jim Meyering  <jim@meyering.net>
5797
5798         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5799
5800         2006-01-11  Jim Meyering  <jim@meyering.net>
5801
5802         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5803         Check for the lchmod function.
5804
5805 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5806
5807         Update from coreutils.
5808
5809         * lib/__fpending.h: Add copyright notice.
5810         * lib/fprintftime.h: Likewise.
5811         * lib/savedir.c: Use (C) in copyright notice.
5812         * lib/savedir.h: Likewise.
5813
5814         2006-08-15  Jim Meyering  <jim@meyering.net>
5815
5816         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5817         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5818         in support of the EXPECTED_ERRNO macro.
5819         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5820         definitions.  Instead, define the appropriate symbols and include
5821         "at-func.c".
5822         * lib/mkdirat.c (mkdirat): Likewise.
5823         * lib/fchmodat.c (fchmodat): Likewise.
5824         (ENOSYS): Remove definition.
5825         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5826         it.  Don't include "unistd--.h" -- it wasn't ever used.
5827
5828         2006-01-17  Jim Meyering  <jim@meyering.net>
5829
5830         Rewrite fts.c not to change the current working directory,
5831         by using openat, fstatat, fdopendir, etc..
5832
5833         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5834         (HAVE_OPENAT_SUPPORT): Define.
5835         [_LIBC] (fchdir): Don't undef or define; no longer used.
5836         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5837         Now, this `function' always succeeds, and consumes its file descriptor
5838         parameter -- so callers must not close such FDs.  Update callers.
5839         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5840         (diropen): Add parameter, SP.  Adjust all callers.
5841         Implement using diropen_fd, rather than open.
5842         (fts_open): Initialize new member, fts_cwd_fd.
5843         Remove fts_rft-setting code.
5844         (fts_close): Close fts_cwd_fd, if necessary.
5845         (__opendir2): Define in terms of opendir or opendirat,
5846         depending on whether the FST_NOCHDIR flag is set.
5847         (fts_build): Since fts_safe_changedir consumes its FD, and since
5848         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5849         and close the dup'd file descriptor upon failure.
5850         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5851         (fts_safe_changedir): Tweak semantics to reflect that this function
5852         now calls cwd_advance_fd and hence consumes its FD argument.
5853         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5854         [struct FTS] (fts_rft): Remove now-unused member.
5855         [struct FTS] (fts_cycle.state): Improve comment.
5856
5857         * lib/openat.c (openat_needs_fchdir): New function.
5858         * lib/openat.h (openat_needs_fchdir): Declare it.
5859
5860 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5861
5862         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5863         Problem and fix reported by Pádraig Brady in
5864         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5865
5866 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5867
5868         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5869
5870 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5871
5872         * lib/memcoll.c (memcoll): Optimize for the common case where the
5873         arguments are bytewise equal.
5874
5875 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5876
5877         * doc/regexprops-generic.texi: Add a copyright notice.
5878
5879 2006-08-15  Bruno Haible  <bruno@clisp.org>
5880
5881         * modules/tmpdir (License): Change to LGPL.
5882
5883 2006-08-15  Bruno Haible  <bruno@clisp.org>
5884
5885         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5886         module.
5887
5888 2006-08-14  Simon Josefsson  <jas@extundo.com>
5889
5890         * config/srclist.txt: Add gnupload.
5891
5892 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5893
5894         Change copyright notice from LGPL 2 to GPL 2, since that's the
5895         standard form used in the gnulib repository.
5896         * tests/test-lock.c: Likewise.
5897         * tests/test-stdint.c: Likewise.
5898         * tests/test-tls.c: Likewise.
5899
5900         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5901         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5902         Add copyright notice.
5903
5904         * check-module: Add copyright notice.  Output a copyright
5905         notice if "--version" is specified.
5906         * modules/COPYING: New file.
5907         * tests/test-getaddrinfo.c: Add copyright notice.
5908         * tests/test-verify.c: Likewise.
5909
5910 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5911
5912         Change copyright notice from LGPL 2 to GPL 2, since that's the
5913         standard form used in the gnulib repository.
5914         * lib/lock.c: LGPL -> GPL.
5915         * lib/lock.h: Likewise.
5916         * lib/strnlen1.c: Likewise.
5917         * lib/strnlen1.h: Likewise.
5918         * lib/tls.c: Likewise.
5919         * lib/tls.h: Likewise.
5920         * lib/tmpdir.c: Likewise.
5921
5922         * lib/TODO: Remove; this belongs only in coreutils.
5923
5924 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5925
5926         Add copyright notices to long-enough files that lack them, since
5927         otherwise the files aren't clearly free.  Use the same notice that
5928         getdate.texi already uses.
5929         * doc/alloca-opt.texi: Add copyright notice.
5930         * doc/alloca.texi: Likewise.
5931         * doc/ctime.texi: Likewise.
5932         * doc/functions.texi: Likewise.
5933         * doc/gcd.texi: Likewise.
5934         * doc/gnulib-tool.texi: Likewise.
5935         * doc/inet_ntoa.texi: Likewise.
5936         * doc/visibility.texi: Likewise.
5937
5938         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
5939         * doc/quote.texi: Add copyright notice.
5940
5941         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
5942         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
5943         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
5944         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
5945         is now obsolete, and give a pointer to the Sun list.
5946         Add copyright notice.
5947
5948 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5949
5950         * config/srclistvars.sh: Add copyright notice.
5951
5952 2006-08-14  Eric Blake  <ebb9@byu.net>
5953
5954         Import the following change from libc:
5955
5956         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
5957
5958         Upstream bug 2997.
5959         * lib/misc/error.c: Add space between program name and message if file
5960         name is missing.
5961
5962 2006-08-12  Karl Berry  <karl@gnu.org>
5963
5964         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
5965         remove, these originate in gnulib now.
5966
5967 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5968
5969         * doc/Makefile (standards.info standards.html standards.dvi):
5970         Also depend on make-stds.texi.
5971
5972 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
5973
5974         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
5975         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
5976
5977         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
5978         in wchar_t.  Problem reported by Eric Blake.
5979
5980         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
5981         LEN is smaller than SIZE.  Suggested by Bruno Haible.
5982         Also, help the compiler to keep LEN in a register.
5983
5984 2006-08-11  Eric Blake  <ebb9@byu.net>
5985
5986         * users.txt: Sort.  Add tar.
5987
5988 2006-08-11  Bruno Haible  <bruno@clisp.org>
5989
5990         * users.txt: New file.
5991
5992 2006-08-11  Bruno Haible  <bruno@clisp.org>
5993
5994         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
5995         before <wchar.h>. Needed for OSF/1 and BSD/OS.
5996
5997 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
5998
5999         * modules/snprintf (Depends-on): Remove minmax.
6000         (Maintainer): Add self and Bruno.
6001
6002 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6003
6004         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6005         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6006         (EOVERFLOW): Define if the system does not.
6007         Do not include "minmax.h"; it wasn't used.
6008         (snprintf): Don't assume size_t promotes to an unsigned type.
6009         Fix bug when generated string was too long for the buffer: the
6010         buffer's contents are supposed to be the initial prefix of the
6011         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6012         exceeds INT_MAX; do the check ourselves.
6013
6014         Import the following changes from libc:
6015
6016         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6017
6018         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6019         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6020         set wc to the byte which couldn't be converted.
6021         (re_string_reconstruct): Don't clear valid_raw_len before calling
6022         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6023         tip_context using re_string_context_at.
6024
6025         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6026
6027         * lib/posix/regex.h: g++ still cannot handled [restrict].
6028
6029         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6030
6031         * lib/posix/regex.h: Remove special handling for VMS.
6032
6033 2006-08-10  Jim Meyering  <jim@meyering.net>
6034
6035         * modules/same-inode: New module.
6036         * modules/dev-ino: New module.
6037         * modules/cycle-check: Depend on these modules, rather than simply
6038         including their .h files.
6039         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6040         required via m4/cycle-check.m4.
6041         * modules/same: Depend on new same-inode module, rather than
6042         including same-inode.h.
6043         * modules/chdir-safer: New file.
6044
6045         * modules/chown (Depends-on): Add stat-macros.
6046
6047 2006-08-10  Jim Meyering  <jim@meyering.net>
6048
6049         * m4/cycle-check.m4: New file.
6050         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6051         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6052
6053 2006-08-10  Eric Blake  <ebb9@byu.net>
6054
6055         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6056         in from original proposal.
6057
6058 2006-08-10  Eric Blake  <ebb9@byu.net>
6059         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6060
6061         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6062         namespace.
6063
6064 2006-08-10  Bruno Haible  <bruno@clisp.org>
6065
6066         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6067         as well.
6068
6069 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6070
6071         Sync from coreutils.
6072
6073         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6074
6075         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6076         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6077
6078 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6079
6080         * modules/restrict: Remove; no longer needed now that we assume
6081         Autoconf 2.59 or later.
6082         * MODULES.html.sh: Remove 'restrict'.
6083         * modules/argp (Depends-on): Remove 'restrict'.
6084         * modules/base64 (Depends-on): Likewise.
6085         * modules/gc (Depends-on): Likewise.
6086         * modules/getaddrinfo (Depends-on): Likewise.
6087         * modules/glob (Depends-on): Likewise.
6088         * modules/inet_ntop (Depends-on): Likewise.
6089         * modules/inet_pton (Depends-on): Likewise.
6090         * modules/memxor (Depends-on): Likewise.
6091         * modules/regex (Depends-on): Likewise.
6092         * modules/strtok_r (Depends-on): Likewise.
6093         * modules/time_r (Depends-on): Likewise.
6094
6095 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6096
6097         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6098         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6099         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6100         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6101         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6102         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6103         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6104         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6105
6106         Merge from coreutils.
6107         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6108         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6109         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6110         * m4/time_r.m4 (gl_TIME_R): Likewise.
6111
6112 2006-08-09  Karl Berry  <karl@gnu.org>
6113
6114         * config/srclist.txt: no more gettext-tools, per Bruno.
6115
6116 2006-08-08  Eric Blake  <ebb9@byu.net>
6117
6118         * modules/verror: New module.
6119         * MODULES.html.sh: Document it.
6120
6121 2006-08-08  Eric Blake  <ebb9@byu.net>
6122
6123         * lib/verror.h, lib/verror.c: New files.
6124
6125 2006-08-08  Eric Blake  <ebb9@byu.net>
6126
6127         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6128         verror_at_line output complies with GNU Coding Standards even when
6129         file is NULL.
6130
6131 2006-08-07  Bruno Haible  <bruno@clisp.org>
6132
6133         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6134         versions of AIX.
6135         Reported by Ralf Wildenhues.
6136
6137 2006-08-07  Bruno Haible  <bruno@clisp.org>
6138
6139         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6140         in an AC_DEFUN. Needed so that the autoconf snippets can use
6141         AC_REQUIRE.
6142
6143 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6144
6145         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6146         Initialize pkgdata_DATA.
6147         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6148         overriding it.
6149
6150 2006-08-06  Eric Blake  <ebb9@byu.net>
6151
6152         * lib/error.h: Fold in some upstream changes from glibc.
6153         * lib/error.c: Likewise.
6154
6155 2006-08-04  Bruno Haible  <bruno@clisp.org>
6156
6157         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6158         Make the mostlyclean-local rule depend on mostlyclean-generic.
6159         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6160
6161 2006-07-31  Bruno Haible  <bruno@clisp.org>
6162
6163         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6164         <stdlib.h>, <string.h>.
6165
6166 2006-07-30  Bruno Haible  <bruno@clisp.org>
6167
6168         * modules/readlink (License): Change to LGPL.
6169
6170 2006-07-30  Bruno Haible  <bruno@clisp.org>
6171
6172         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6173         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6174         set PKGDATADIR to point to it.
6175
6176 2006-07-30  Bruno Haible  <bruno@clisp.org>
6177
6178         * modules/csharpexec (configure.ac): Comment out macro invocation.
6179         * modules/javaexec (configure.ac): Likewise.
6180         * modules/javacomp-script (configure.ac): Likewise.
6181
6182         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6183
6184 2006-07-30  Bruno Haible  <bruno@clisp.org>
6185
6186         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6187         linked-list.
6188
6189 2006-07-30  Bruno Haible  <bruno@clisp.org>
6190
6191         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6192
6193 2006-07-30  Bruno Haible  <bruno@clisp.org>
6194
6195         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6196         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6197         get removed.
6198
6199 2006-07-29  Bruno Haible  <bruno@clisp.org>
6200
6201         Make it possible for gnulib-tool to work with locally modified or
6202         augmented gnulib repositories.
6203         * gnulib-tool (func_usage): Document --local-dir option.
6204         (local_gnulib_dir): New variable.
6205         Handle --local-dir option.
6206         (func_lookup_file): New function.
6207         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6208         (func_get_description, func_get_filelist, func_get_description,
6209         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6210         func_get_automake_snippet, func_get_include_directive,
6211         func_get_license, func_get_maintainer): Use func_lookup_file.
6212         (func_import, func_create_testdir): Use func_lookup_file.
6213
6214 2006-07-29  Bruno Haible  <bruno@clisp.org>
6215
6216         * modules/setenv (Depends-on): Add unistd.
6217
6218 2006-07-29  Bruno Haible  <bruno@clisp.org>
6219
6220         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6221
6222 2006-07-29  Bruno Haible  <bruno@clisp.org>
6223
6224         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6225
6226 2006-07-29  Bruno Haible  <bruno@clisp.org>
6227
6228         * gnulib-tool (import, update): If there is no Makefile.am, look at
6229         aclocal.m4, instead of bailing out.
6230
6231 2006-07-29  Bruno Haible  <bruno@clisp.org>
6232
6233         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6234         Categorize the options by when they are useful.
6235
6236 2006-07-29  Bruno Haible  <bruno@clisp.org>
6237
6238         * gnulib-tool (func_usage): Document option --no-libtool.
6239         Handle option --no-libtool.
6240         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6241         for changed semantics of $libtool variable.
6242         (func_import): Likewise. If libtool is not used, show this through
6243         an option --no-libtool.
6244         (func_create_testdir): Update.
6245
6246 2006-07-29  Bruno Haible  <bruno@clisp.org>
6247
6248         * gnulib-tool (func_import): Extend error message about missing
6249         --doc-base.
6250
6251 2006-07-29  Bruno Haible  <bruno@clisp.org>
6252
6253         * gnulib-tool (func_import): Don't create the $docbase directory if
6254         there is no file to store there.
6255
6256 2006-07-29  Bruno Haible  <bruno@clisp.org>
6257
6258         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6259         relevant, look for configure.ac there, not in the current directory.
6260         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6261
6262 2006-07-29  Bruno Haible  <bruno@clisp.org>
6263
6264         * gnulib-tool (SORT): New variable.
6265         (func_usage): Undocument --assume-autoconf option.
6266         Remove --assume-autoconf option handling.
6267         (autoconf_minversion): Determine from the contents of configure.ac.
6268         (func_import): Remove autoconf_minversion handling.
6269         Suggested by Eric Blake.
6270
6271 2006-07-29  Bruno Haible  <bruno@clisp.org>
6272
6273         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6274
6275 2006-07-29  Bruno Haible  <bruno@clisp.org>
6276
6277         * config/srclist.txt (*setenv.[ch]): Remove rules.
6278
6279 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6280
6281         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6282
6283 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6284
6285         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6286         arpa/inet.h.
6287
6288 2006-07-28  Simon Josefsson  <jas@extundo.com>
6289
6290         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6291         * modules/inet_pton (Depends-on): Likewise.
6292
6293 2006-07-28  Simon Josefsson  <jas@extundo.com>
6294
6295         * m4/netinet_in_h.m4: New file.
6296
6297 2006-07-28  Simon Josefsson  <jas@extundo.com>
6298
6299         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6300         #include's.
6301
6302 2006-07-28  Simon Josefsson  <jas@extundo.com>
6303
6304         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6305         #include's.
6306
6307 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6308
6309         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6310         setgid on directories only if they set these bits.
6311         * lib/modechange.h: Remove obsolete comment about masks.
6312
6313 2006-07-28  Eric Blake  <ebb9@byu.net>
6314
6315         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6316         macro expansion.
6317
6318 2006-07-28  Bruno Haible  <bruno@clisp.org>
6319
6320         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6321
6322 2006-07-28  Bruno Haible  <bruno@clisp.org>
6323
6324         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6325
6326 2006-07-28  Bruno Haible  <bruno@clisp.org>
6327
6328         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6329         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6330         Define fallbacks.
6331         Avoids link error on FreeBSD 4.x.
6332         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6333
6334         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6335         encoding.
6336         * lib/mbswidth.c (iswcntrl): Likewise.
6337
6338 2006-07-27  Bruno Haible  <bruno@clisp.org>
6339
6340         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6341         test.
6342
6343 2006-07-27  Bruno Haible  <bruno@clisp.org>
6344
6345         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6346         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6347         defined.
6348
6349 2006-07-26  Eric Blake  <ebb9@byu.net>
6350
6351         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6352
6353 2006-07-26  Eric Blake  <ebb9@byu.net>
6354
6355         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6356         like mingw that lack mkstemp.
6357         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6358         avoid compilation warning on mingw.
6359
6360 2006-07-26  Bruno Haible  <bruno@clisp.org>
6361
6362         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6363         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6364         INT_FAST*_MIN, INTPTR_MIN.
6365
6366 2006-07-25  Bruno Haible  <bruno@clisp.org>
6367
6368         * modules/version-etc (Depends-on): Add stdarg.
6369
6370 2006-07-25  Bruno Haible  <bruno@clisp.org>
6371
6372         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6373         complex commands.
6374
6375 2006-07-25  Bruno Haible  <bruno@clisp.org>
6376
6377         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6378         defined in <stdarg.h> or config.h.
6379
6380 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6381
6382         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6383         (gl_STDIO_SAFER): Remove.
6384
6385 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6386
6387         * MODULES.html.sh (File stream based Input/Output):
6388         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6389         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6390         * modules/fopen-safer, modules/tmpfile-safer: New files.
6391         * modules/stdio-safer: Remove.
6392
6393 2006-07-24  Bruno Haible  <bruno@clisp.org>
6394
6395         * modules/tmpdir: New file.
6396         * MODULES.html.sh (File system functions): Add it.
6397
6398 2006-07-24  Bruno Haible  <bruno@clisp.org>
6399
6400         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6401         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6402
6403 2006-07-24  Bruno Haible  <bruno@clisp.org>
6404
6405         * modules/clean-temp: New file.
6406
6407 2006-07-24  Bruno Haible  <bruno@clisp.org>
6408
6409         * m4/tmpdir.m4: New file, from GNU gettext.
6410
6411 2006-07-24  Bruno Haible  <bruno@clisp.org>
6412
6413         * lib/tmpdir.h: New file, from GNU gettext.
6414         * lib/tmpdir.c: New file, from GNU gettext.
6415
6416 2006-07-24  Bruno Haible  <bruno@clisp.org>
6417
6418         * lib/clean-temp.h: New file, from GNU gettext.
6419         * lib/clean-temp.c: New file, from GNU gettext.
6420
6421 2006-07-23  Eric Blake  <ebb9@byu.net>
6422
6423         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6424         (Depends-on): Add binary-io.
6425
6426 2006-07-23  Eric Blake  <ebb9@byu.net>
6427
6428         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6429
6430 2006-07-23  Eric Blake  <ebb9@byu.net>
6431
6432         * lib/tmpfile-safer.c: New file.
6433         * lib/stdio-safer.h (fopen_safer): Add prototype.
6434         * lib/stdio--.h (tmpfile): Make safer.
6435
6436 2006-07-23  Bruno Haible  <bruno@clisp.org>
6437
6438         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6439         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6440         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6441         gl_linked_remove_at): Use it.
6442
6443 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6444         and Simon Josefsson <jas@extundo.com>
6445
6446         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6447
6448         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6449
6450 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6451
6452         * modules/close-stream: New file.
6453         * modules/closeout (Description): Make it clear that it exits
6454         with a diagnostic on error.
6455         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6456         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6457
6458 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6459
6460         * m4/close-stream.m4: New file.
6461
6462 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6463
6464         * lib/close-stream.c, lib/close-stream.h: New files.
6465
6466 2006-07-22  Bruno Haible  <bruno@clisp.org>
6467
6468         Merge from GNU gettext 0.15.
6469
6470         2006-05-01  Bruno Haible  <bruno@clisp.org>
6471
6472                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6473
6474         2006-07-22  Bruno Haible  <bruno@clisp.org>
6475
6476                 * modules/javaversion: New file.
6477                 * MODULES.html.sh (Java): Add javaversion.
6478
6479         2006-03-12  Bruno Haible  <bruno@clisp.org>
6480
6481                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6482
6483         2005-12-04  Bruno Haible  <bruno@clisp.org>
6484
6485                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6486                 (untested).
6487
6488         2006-06-21  Bruno Haible  <bruno@clisp.org>
6489
6490                 Avoid warnings from recent versions of mcs.
6491                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6492                 -o, -L, -r any more. Use options documented since mcs-1.0
6493                 instead. Similarly for -g.
6494
6495         2005-12-04  Bruno Haible  <bruno@clisp.org>
6496
6497                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6498                 .resources, not .resource.
6499
6500         2005-07-09  Bruno Haible  <bruno@clisp.org>
6501
6502                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6503                 add a .dll suffix.
6504                 Reported by Mark Junker <mjscod@gmx.de>.
6505
6506         2006-07-22  Bruno Haible  <bruno@clisp.org>
6507
6508                 * modules/gettext: Upgrade to gettext-0.15.
6509                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6510                 m4/visibility.m4.
6511                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6512
6513 2006-07-22  Bruno Haible  <bruno@clisp.org>
6514
6515         Merge from GNU gettext 0.15.
6516
6517         2006-03-25  Bruno Haible  <bruno@clisp.org>
6518
6519                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6520
6521         2006-07-21  Bruno Haible  <bruno@clisp.org>
6522
6523                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6524                 "1.1".
6525
6526         2006-05-09  Bruno Haible  <bruno@clisp.org>
6527
6528                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6529                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6530                 for the conftestver execution.
6531
6532         2006-05-01  Bruno Haible  <bruno@clisp.org>
6533
6534                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6535                 optional target-version argument. Verify that the compiler
6536                 groks source of the specified source-version, or add -source
6537                 option as necessary. Verify that the compiler produces
6538                 bytecode in the specified target-version, or add -target and
6539                 -source options as necessary. Make the result of the test
6540                 available as variable CONF_JAVAC. Also log error output in
6541                 config.log.
6542
6543         2006-03-11  Bruno Haible  <bruno@clisp.org>
6544
6545                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6546
6547         2006-05-09  Bruno Haible  <bruno@clisp.org>
6548
6549                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6550                 CLASSPATH_SEPARATOR to a semicolon.
6551
6552         2006-03-12  Bruno Haible  <bruno@clisp.org>
6553
6554                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6555                 available as variable CONF_JAVA, for subsequent autoconf
6556                 tests. Also log error output in config.log.
6557
6558         2006-07-19  Bruno Haible  <bruno@clisp.org>
6559
6560                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6561                 that getline works on glibc2 systems. Needed to avoid trouble
6562                 in relocatable.c.
6563                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6564
6565         2005-12-04  Bruno Haible  <bruno@clisp.org>
6566
6567                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6568                 launcher (untested).
6569
6570         2005-12-04  Bruno Haible  <bruno@clisp.org>
6571
6572                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6573
6574         2006-07-22  Bruno Haible  <bruno@clisp.org>
6575
6576                 * gettext.m4: Update from GNU gettext-0.15.
6577                 * nls.m4: Likewise.
6578                 * po.m4: Likewise.
6579                 * inttypes-pri.m4: Likewise.
6580                 * inttypes-h.m4: Renamed from inttypes.m4.
6581                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6582
6583 2006-07-22  Bruno Haible  <bruno@clisp.org>
6584
6585         Merge from GNU gettext 0.15.
6586
6587         2005-07-05  Bruno Haible  <bruno@clisp.org>
6588
6589                 * printf-args.c (printf_fetchargs): Work around broken
6590                 definition of wint_t on mingw.
6591
6592         2005-02-12  Bruno Haible  <bruno@clisp.org>
6593
6594                 * xallocsa.h: Add extern "C" for C++.
6595
6596         2006-05-17  Bruno Haible  <bruno@clisp.org>
6597
6598                 Cygwin portability.
6599                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6600
6601         2006-04-30  Bruno Haible  <bruno@clisp.org>
6602
6603                 * progreloc.c: Include <mach-o/dyld.h> if available.
6604                 (find_executable): Use _NSGetExecutablePath when possible.
6605
6606         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6607
6608                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6609                 function.
6610
6611         2005-12-29  Bruno Haible  <bruno@clisp.org>
6612
6613                 * progreloc.c (set_program_name_and_installdir): Fix
6614                 compilation error.
6615
6616         2005-12-04  Bruno Haible  <bruno@clisp.org>
6617
6618                 Cygwin portability.
6619                 * progreloc.c: Include <windows.h> also on Cygwin.
6620                 (find_executable): Add support for Cygwin.
6621                 (set_program_name_and_installdir): Handle also platforms with
6622                 nonempty EXEEXT.
6623
6624         2006-07-11  Bruno Haible  <bruno@clisp.org>
6625
6626                 * javacomp.c: Fix a comment.
6627                 Reported by Jim Meyering.
6628
6629         2006-04-30  Bruno Haible  <bruno@clisp.org>
6630
6631                 * javacomp.h (compile_java_class): Add source_version,
6632                 target_version arguments.
6633                 * javacomp.c: Rewritten to choose only a compiler that
6634                 respects the specified source_version and target_version.
6635
6636         2006-06-27  Bruno Haible  <bruno@clisp.org>
6637
6638                 Assume correct S_ISDIR macro.
6639                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6640
6641         2006-07-22  Bruno Haible  <bruno@clisp.org>
6642
6643                 * javaversion.h: New file, from GNU gettext.
6644                 * javaversion.c: New file, from GNU gettext.
6645                 * javaversion.java: New file, from GNU gettext.
6646                 * javaversion.class: New file, from GNU gettext.
6647
6648         2006-05-17  Bruno Haible  <bruno@clisp.org>
6649
6650                 Cygwin portability.
6651                 * javaexec.c (execute_java_class): Test for jview program
6652                 also on Cygwin.
6653
6654         2006-04-09  Bruno Haible  <bruno@clisp.org>
6655
6656                 * fatal-signal.c: Don't include string.h.
6657                 (at_fatal_signal): Use a copying loop instead of memcpy.
6658
6659         2005-12-04  Bruno Haible  <bruno@clisp.org>
6660
6661                 * csharpexec.c: Add support for 'clix' launcher (untested).
6662                 (execute_csharp_using_sscli): New function.
6663                 (execute_csharp_program): Call it.
6664
6665         2006-06-21  Bruno Haible  <bruno@clisp.org>
6666
6667                 Avoid warnings from recent versions of mcs.
6668                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6669                 -o, -L, -r any more. Use options documented since mcs-1.0
6670                 instead. Similarly for -g.
6671
6672         2005-07-09  Bruno Haible  <bruno@clisp.org>
6673
6674                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6675                 add a .dll suffix.
6676                 Reported by Mark Junker <mjscod@gmx.de>.
6677
6678         2006-06-17  Bruno Haible  <bruno@clisp.org>
6679
6680                 * config.charset: Update for NetBSD 3.0.
6681
6682         2006-05-17  Bruno Haible  <bruno@clisp.org>
6683
6684                 Cygwin portability.
6685                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6686
6687         2006-05-16  Bruno Haible  <bruno@clisp.org>
6688
6689                 * localcharset.c [CYGWIN]: Include <windows.h>.
6690                 (get_charset_aliases): For Cygwin, return the same CPxxx
6691                 aliases list as under WIN32.
6692                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6693                 the environment variables. Fall back to GetACP().
6694
6695         2006-04-05  Bruno Haible  <bruno@clisp.org>
6696
6697                 * config.charset: Update Juan Manuel Guerrero's address.
6698
6699         2005-02-12  Bruno Haible  <bruno@clisp.org>
6700
6701                 * allocsa.h: Add extern "C" for C++.
6702
6703         2005-02-10  Bruno Haible  <bruno@clisp.org>
6704
6705                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6706                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6707
6708         2006-07-22  Bruno Haible  <bruno@clisp.org>
6709
6710                 * gettext.h: Update to GNU gettext-0.15.
6711
6712 2006-07-22  Bruno Haible  <bruno@clisp.org>
6713
6714         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6715         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6716         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6717
6718 2006-07-21  Eric Blake  <ebb9@byu.net>
6719
6720         * modules/stdlib-safer: New file.
6721         * MODULES.html.sh (File stream based Input/Output): Add
6722         stdlib-safer.
6723
6724 2006-07-21  Eric Blake  <ebb9@byu.net>
6725
6726         * lib/stdlib-safer.h: New file from coreutils, required by
6727         stdlib--.h.
6728
6729 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6730
6731         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6732
6733 2006-07-20  Bruno Haible  <bruno@clisp.org>
6734
6735         * gnulib-tool: Recognize new option --assume-autoconf.
6736         (autoconf_minversion): New variable.
6737         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6738
6739 2006-07-20  Bruno Haible  <bruno@clisp.org>
6740
6741         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6742
6743 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6744
6745         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6746         Reindent and repaginate.
6747
6748 2006-07-19  Derek Price  <derek@ximbiot.com>
6749
6750         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6751         Correct grammar.
6752
6753 2006-07-17  Bruno Haible  <bruno@clisp.org>
6754
6755         * modules/list: New file.
6756         * modules/array-list: New file.
6757         * modules/carray-list, modules/carray-list-tests: New files.
6758         * modules/linked-list, modules/linked-list-tests: New files.
6759         * modules/avltree-list, modules/avltree-list-tests: New files.
6760         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6761         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6762         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6763         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6764         * modules/oset: New file.
6765         * modules/array-oset: New file.
6766         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6767         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6768         * tests/test-carray_list.c: New file.
6769         * tests/test-linked_list.c: New file.
6770         * tests/test-avltree_list.c: New file.
6771         * tests/test-rbtree_list.c: New file.
6772         * tests/test-linkedhash_list.c: New file.
6773         * tests/test-avltreehash_list.c: New file.
6774         * tests/test-rbtreehash_list.c: New file.
6775         * tests/test-avltree_oset.c: New file.
6776         * tests/test-rbtree_oset.c: New file.
6777         * MODULES.html.sh (Container data structures): New section.
6778
6779 2006-07-17  Bruno Haible  <bruno@clisp.org>
6780
6781         * m4/gl_list.m4: New file.
6782
6783 2006-07-17  Bruno Haible  <bruno@clisp.org>
6784
6785         * lib/gl_list.h: New file.
6786         * lib/gl_list.c: New file.
6787         * lib/gl_array_list.h: New file.
6788         * lib/gl_array_list.c: New file.
6789         * lib/gl_carray_list.h: New file.
6790         * lib/gl_carray_list.c: New file.
6791         * lib/gl_linked_list.h: New file.
6792         * lib/gl_linked_list.c: New file.
6793         * lib/gl_anylinked_list1.h: New file.
6794         * lib/gl_anylinked_list2.h: New file.
6795         * lib/gl_avltree_list.h: New file.
6796         * lib/gl_avltree_list.c: New file.
6797         * lib/gl_anyavltree_list1.h: New file.
6798         * lib/gl_anyavltree_list2.h: New file.
6799         * lib/gl_rbtree_list.h: New file.
6800         * lib/gl_rbtree_list.c: New file.
6801         * lib/gl_anyrbtree_list1.h: New file.
6802         * lib/gl_anyrbtree_list2.h: New file.
6803         * lib/gl_anytree_list1.h: New file.
6804         * lib/gl_anytree_list2.h: New file.
6805         * lib/gl_linkedhash_list.h: New file.
6806         * lib/gl_linkedhash_list.c: New file.
6807         * lib/gl_anyhash_list1.h: New file.
6808         * lib/gl_anyhash_list2.h: New file.
6809         * lib/gl_avltreehash_list.h: New file.
6810         * lib/gl_avltreehash_list.c: New file.
6811         * lib/gl_rbtreehash_list.h: New file.
6812         * lib/gl_rbtreehash_list.c: New file.
6813         * lib/gl_anytreehash_list1.h: New file.
6814         * lib/gl_anytreehash_list2.h: New file.
6815
6816         * lib/gl_oset.h: New file.
6817         * lib/gl_oset.c: New file.
6818         * lib/gl_array_oset.h: New file.
6819         * lib/gl_array_oset.c: New file.
6820         * lib/gl_avltree_oset.h: New file.
6821         * lib/gl_avltree_oset.c: New file.
6822         * lib/gl_rbtree_oset.h: New file.
6823         * lib/gl_rbtree_oset.c: New file.
6824         * lib/gl_anytree_oset.h: New file.
6825
6826 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6827
6828         * m4/mkancesdirs.m4: New file.
6829         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6830         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6831         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6832         it.
6833
6834 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6835
6836         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6837         * lib/mkancesdirs.h: New files.
6838         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6839         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6840         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6841         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6842         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6843         callers changed.  Revamp internals significantly, by not
6844         attempting to create directories that are temporarily more
6845         permissive than the final results.  Do not attempt to use
6846         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6847         This removes some race conditions, fixes some bugs, and simplifies
6848         things.  Use new dirchownmod function to do owner and mode changes.
6849         * lib/mkdir-p.h: Likewise.
6850         * lib/modechange.c (octal_to_mode): New function.
6851         (struct mode_change): New member mentioned.
6852         (make_node_op_equals): New arg mentioned.  All callers changed.
6853         (mode_compile): Keep track of which mode bits the user has explicitly
6854         mentioned.
6855         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6856         New arg PMODE_BITS, to keep track of which mode bits the user
6857         mentioned; it treats S_ISUID and S_ISGID speciall.
6858         All callers changed.
6859         * lib/modechange.h: Likewise.
6860
6861 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6862
6863         * MODULES.html.sh: Add mkancestors.
6864         * modules/mkancesdirs: New module.
6865         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6866         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6867         The chdir-safer and afs files are now orphans; I'll remove them
6868         unless someone speaks up.
6869         Add lib/dirchownmod.c, lib/dirchownmod.h.
6870         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6871         Add lchown, mkancesdirs.
6872         (Maintainer): Add self.
6873
6874 2006-07-15  Karl Berry  <karl@gnu.org>
6875
6876         * gnulib-tool: help message wording/arrangement.
6877
6878 2006-07-14  Simon Josefsson  <jas@extundo.com>
6879
6880         * doc/gnulib.texi (Libtool and Windows): New section.
6881
6882 2006-07-12  Simon Josefsson  <jas@extundo.com>
6883
6884         * modules/gendocs (License): Fix license, approved by Karl.
6885
6886 2006-07-12  Eric Blake  <ebb9@byu.net>
6887
6888         * MODULES.html.sh: Add gendocs.
6889
6890 2006-07-11  Eric Blake  <ebb9@byu.net>
6891
6892         * modules/fdl: New module, to install doc/fdl.texi.
6893         * MODULES.html.sh: Add new section for documentation modules.
6894         * gnulib-tool: Avoid space-tab.
6895         (--doc-base): New option, to manage files from doc.
6896
6897 2006-07-11  Eric Blake  <ebb9@byu.net>
6898
6899         * m4/absolute-header.m4: Fix comments to match recent change.
6900
6901 2006-07-11  Eric Blake  <ebb9@byu.net>
6902
6903         * gnulib-tool: List --doc-base before --tests-base.
6904
6905 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6906
6907         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6908
6909 2006-07-11  Bruno Haible  <bruno@clisp.org>
6910
6911         * README: Mention where to put documentation.
6912
6913 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6914
6915         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
6916
6917 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6918
6919         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
6920         to stdint.m4.
6921
6922 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
6923
6924         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
6925         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
6926         "no/such/file/stdint.h" when there is no such file, so that
6927         the resulting C code can be parsed by dodgy compilers.
6928         Problems reported by Bob Proulx.
6929
6930 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6931
6932         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
6933         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6934         macros into the GNU _D_EXACT_NAMLEN.
6935         * lib/savedir.c:  Likewise.
6936         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
6937
6938 2006-07-10  Derek R. Price  <derek@ximbiot.com>
6939         and Paul Eggert  <eggert@cs.ucla.edu>
6940
6941         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
6942         * m4/savedir.m4:
6943         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
6944         macros into the GNU _D_EXACT_NAMLEN.
6945
6946 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6947
6948         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
6949         around the absolute name, to work around a problem with the HP-UX
6950         11.23 native C compiler, reported by Bob Proulx.
6951
6952 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6953
6954         * doc/maintain.texi, make-stds.texi: Sync from
6955         <http://savannah.gnu.org/projects/gnustandards>.
6956
6957 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
6958
6959         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
6960
6961 2006-07-09  Jim Meyering  <jim@meyering.net>
6962
6963         * m4/glob.m4: Remove a doubled word in a comment.
6964
6965 2006-07-09  Jim Meyering  <jim@meyering.net>
6966
6967         * lib/argp-pv.c: Remove a doubled word in a comment.
6968         * lib/check-version.c (check_version): Likewise.
6969         * lib/javacomp.c (compile_java_class): Likewise.
6970
6971 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
6972
6973         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
6974         for the benefit of people using Autoconf 2.60.  If you want to
6975         support older Autoconf versions you can copy m4/onceonly_2_57.m4
6976         (or m4/onceonly.m4, if pre-2.57) manually.
6977
6978 2006-07-08  Jim Meyering  <jim@meyering.net>
6979
6980         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
6981         comment.
6982         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
6983         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
6984         comment.
6985
6986 2006-07-08  Jim Meyering  <jim@meyering.net>
6987
6988         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
6989
6990 2006-07-07  Simon Josefsson  <jas@extundo.com>
6991
6992         * tests/test-crc.c: Change expected crc value, the test vector
6993         were probably computed using the old broken crc.c?
6994
6995 2006-07-06  Simon Josefsson  <jas@extundo.com>
6996
6997         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
6998         now the canonical place for the M4 file).
6999
7000         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7001         from the sys_socket dependency now.
7002
7003         * modules/inet_pton (Files): Ditto.
7004
7005         * modules/inet_ntop (Files): Ditto.
7006
7007 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7008
7009         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7010         not gl_PREREQ_GETUSERSHELL.
7011
7012 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7013
7014         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7015         with only one argument, for Autoconf 2.60.
7016         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7017         expand to nothing, so add a shell command to avoid syntax error.
7018         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7019
7020 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7021
7022         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7023
7024 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7025
7026         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7027         no longer needed.  Check for isblank decl.
7028         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7029         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7030         of existence.
7031
7032 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7033
7034         * lib/getloadavg.c: Use __VMS, not VMS.
7035         * lib/getopt.c: Likewise.
7036         * lib/getpagesize.h: Likewise.
7037         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7038         and probably does not work.
7039
7040 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7041
7042         * lib/.cppi-disable: Add wcwidth.
7043         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7044         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7045         (ISGRAPH): Remove.  All uses changed to isgraph.
7046         (FOLD) [!defined _LIBC]: Remove special case.
7047         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7048         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7049         HAVE_ISBLANK.
7050         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7051         case.
7052
7053 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7054
7055         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7056         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7057         brackets.  Other minor changes to suppress some compiler
7058         warnings.
7059
7060 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7061         and Paul Eggert  <eggert@cs.ucla.edu>
7062
7063         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7064         of invoking obsolescent AC_HEADER_DIRENT macro.
7065         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7066         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7067         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7068         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7069         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7070         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7071         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7072         * m4/readdir.m4: Remove; no longer needed.
7073
7074 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7075         and Paul Eggert  <eggert@cs.ucla.edu>
7076
7077         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7078         Don't worry about this obsolete case any more.
7079         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7080         directories.
7081         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7082         worry about this obsolete case any more.
7083         * lib/fts.c: Likewise.
7084         * lib/getcwd.c: Likewise.
7085         * lib/glob.h: Likewise.
7086         * lib/savedir.c: Likewise.
7087
7088 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7089
7090         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7091         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7092         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7093         needed.
7094         All uses removed.
7095         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7096         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7097         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7098         needed.
7099         * m4/getdate.m4 (gl_GETDATE): Likewise.
7100         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7101         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7102         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7103         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7104         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7105         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7106         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7107         needed.
7108
7109 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7110
7111         * lib/memcasecmp.c: Include <limits.h>.
7112         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7113         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7114         Don't assume isdigit succeeds only on '0' through '9'.
7115
7116 2006-07-05  Eric Blake  <ebb9@byu.net>
7117
7118         * modules/getaddrinfo (Depends-on): Add snprintf.
7119
7120 2006-07-05  Eric Blake  <ebb9@byu.net>
7121
7122         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7123         to avoid 'header present but could not be compiled' on cygwin.
7124
7125 2006-07-05  Eric Blake  <ebb9@byu.net>
7126
7127         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7128         missing from netdb.h.
7129         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7130
7131 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7132
7133         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7134         no longer needed.
7135         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7136         * m4/getdate.m4 (gl_GETDATE): Likewise.
7137         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7138         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7139         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7140         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7141         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7142
7143 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7144
7145         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7146         All uses of is_space replaced by isspace.
7147         * lib/exit.h: Don't talk about STDC_HEADERS.
7148         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7149         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7150         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7151         replaced by isprint etc.
7152         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7153         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7154         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7155         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7156         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7157         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7158
7159 2006-07-05  Bruno Haible  <bruno@clisp.org>
7160
7161         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7162         the function exists, before testing against AIX.
7163         Reported by Martin Lambers <marlam@marlam.de>.
7164
7165 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7166
7167         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7168         From Mark D. Baushke.
7169
7170 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7171
7172         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7173         to the absolute name, not just one, to bypass Sun C 5.8's
7174         "warning: #include of /usr/include/... may be non-portable".
7175
7176 2006-07-04  Eric Blake  <ebb9@byu.net>
7177
7178         * modules/dirname-tests: New test module.
7179         * tests/test-dirname.c: New file, replacing dirname.c
7180         TEST_DIRNAME section that was recently deleted.
7181
7182 2006-07-04  Bruno Haible  <bruno@clisp.org>
7183
7184         Assume ANSI C header files and <ctype.h> functions.
7185         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7186         (mbsnwidth): Use isprint, iscntrl instead.
7187
7188 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7189
7190         Merge from coreutils.
7191         * MODULES.html.sh: Add xstrtold.
7192         * modules/xstrtold: New file.
7193         * modules/cycle-check (Files): Add lib/same-inode.h.
7194         * modules/dirname (Files): Add m4/double-slash-root.m4.
7195         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7196         * modules/mkdir-p (Files): Add lib/same-inode.h.
7197         * modules/same (Files): Add lib/same-inode.h.
7198
7199 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7200
7201         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7202         This is to keep the terminology clean; POSIX talks about
7203         "absolute pathnames", not "full pathnames", but the GNU
7204         Coding Standards say to use "path" for something else;
7205         so use "absolute" to keep both sides happy.
7206         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7207         Set gl_absolute_header, not gl_full_header_path.
7208         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7209         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7210         All uses changed.
7211
7212         Merge from coreutils.
7213
7214         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7215
7216         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7217         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7218         want to require the building of c-strtod.o.
7219         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7220         needs -lm directly.
7221         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7222
7223         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7224
7225         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7226         --as-needed option if available.  Problem reported by Albert Chin in
7227         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7228         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7229         cc merely issues a bunch of annoying warnings for --as-needed
7230         (this problem was reported by Bob Proulx).  Also, try linking with
7231         -lm to detect a bug in binutils 2.16 (this problem was reported
7232         by Ralf Wildenhues).
7233
7234         2006-06-18  Jim Meyering  <jim@meyering.net>
7235
7236         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7237         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7238         macro.
7239         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7240         also check for glibc-2.4's abort-inducing bug.
7241
7242         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7243         Low-probability clean-up should be to use rmdir to get rid of
7244         the just-created directory, not unlink.
7245
7246         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7247         configure fail, and request a bug report to inform us about it.
7248         Add a comment that, barring reports to the contrary, in 2007 we'll
7249         assume ftruncate is universally available.
7250
7251         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7252
7253         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7254
7255         2006-03-12  Jim Meyering  <jim@meyering.net>
7256
7257         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7258         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7259         * m4/same.m4 (gl_SAME): Likewise.
7260         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7261
7262         2006-03-11  Eric Blake  <ebb9@byu.net>
7263
7264         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7265         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7266         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7267         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7268
7269 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7270
7271         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7272         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7273         reported by Mark D. Baushke, one in
7274         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7275
7276         Merge from coreutils.
7277
7278         * lib/.cppi-disable: Add stdint_.h.
7279         * lib/.cvsignore: Add stdint.h.
7280
7281         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7282
7283         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7284         both double and long double versions.
7285         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7286         * lib/xstrtold.c: New file.
7287         * lib/xstrtod.h (xstrtold): New decl.
7288
7289         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7290
7291         * lib/filemode.c (setst): Remove.
7292         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7293         (arguably) clearer, and the generated code is a bit smaller on my
7294         Debian GNU/Linux stable x86 host.
7295
7296         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7297
7298         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7299         Assume that filemode.h includes sys/types.h and sys/stat.h.
7300         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7301         (ftypelet): Reorder to put common cases first, for efficiency.
7302         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7303         to do 'M'.
7304         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7305         of 10, for compatibility with FreeBSD.  All callers changed.
7306         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7307         types that can't be deduced solely from st_mode.  First arg is now a
7308         const pointer.
7309         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7310         (strmode): Renamed from mode_string.
7311         (filemodestring): New decl.
7312         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7313         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7314         needed.
7315         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7316
7317         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7318
7319         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7320         fsusage.h now does that.  Include fsusage.h first, to test interface.
7321         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7322         at most one method (the old code could have generated decls that
7323         didn't conform to C89, not that this was ever exercised).
7324         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7325
7326         2006-03-19  Jim Meyering  <jim@meyering.net>
7327
7328         Work even in a chroot where d_ino values for entries in "/"
7329         don't match the stat.st_ino values for the same names.
7330         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7331         number, iterate through all entries again, using lstat instead.
7332         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7333         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7334
7335         * lib/getcwd.c (__getcwd): Clarify a comment.
7336         Use memcpy in place of a call to strcpy.
7337
7338         2006-03-12  Jim Meyering  <jim@meyering.net>
7339
7340         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7341         matches that of the current directory (which we're about to chdir ".."
7342         out of), then save the dev-ino of the parent, instead.
7343
7344         * lib/same-inode.h (SAME_INODE): New file/macro.
7345         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7346         Include "same-inode.h", instead.
7347         * lib/same.c: Likewise.
7348         * lib/cycle-check.h: Include "same-inode.h".
7349         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7350         * lib/cycle-check.c (SAME_INODE): Remove definition.
7351         * lib/root-dev-ino.h: Include "same-inode.h".
7352
7353         2006-03-11  Eric Blake  <ebb9@byu.net>
7354
7355         * lib/same.c (same_name): s/base_name/last_component/
7356         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7357         * lib/filenamecat.c (file_name_concat): Likewise.
7358
7359         2006-03-11  Eric Blake  <ebb9@byu.net>,
7360                     Paul Eggert  <eggert@cs.ucla.edu>
7361
7362         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7363         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7364         drive prefix.
7365         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7366         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7367         (last_component): New method.
7368         * lib/dirname.c (dir_len): Determine when drive letters need a
7369         subsequent slash.  Preserve // when it is special.
7370         (dir_name): Don't append dot when drive letter is absolute.
7371         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7372         * lib/basename.c (base_name): New semantics - malloc the result.
7373         Preserve // when it is special.  Preserve relative files that look
7374         like drive letters.
7375         (base_len): Preserve // when it is special.
7376         (last_component): New method, similar to old base_name semantics.
7377         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7378         base_name.  Strip redundant slashes from ///.
7379
7380 2006-07-03  Jim Meyering  <jim@meyering.net>
7381
7382         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7383         macro is used before the first cycle_check call.
7384
7385 2006-07-03  Eric Blake  <ebb9@byu.net>
7386
7387         * modules/dirname (Depends-on): Add xstrndup.
7388
7389 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7390
7391         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7392         test cases, so that config.log is a bit easier to follow.
7393
7394 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7395
7396         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7397         both are 64 bits, since this seems to be the tradition, and this
7398         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7399         we ever run into a host that prefers long long to long in this
7400         case, we'll need another configure-time test.  Problem reported by
7401         Jim Meyering.
7402
7403 2006-07-02  Eric Blake  <ebb9@byu.net>
7404
7405         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7406
7407 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7408
7409         * modules/inttypes (Depends-on): No longer depends on stdint.
7410         * modules/stdint (Description): Say more about assumptions.
7411         Say that the fast types might differ.  Say macros are used.
7412         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7413         (Makefile.am): Revise list of substituted symbols to match
7414         new stdint.m4.
7415         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7416         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7417         * tests/test-stdint.c (verify_same_types)
7418         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7419         the code conforms to C99/C89.
7420         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7421         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7422
7423 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7424
7425         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7426         but fix a bug, by requiring at least 64 bits.
7427         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7428         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7429         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7430         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7431
7432         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7433         changes.  Make 2.59 a prerequisite.  Check and substitute for
7434         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7435         inttypes.h.  Do not use special include files; just use the
7436         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7437         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7438         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7439         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7440         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7441         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7442         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7443         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7444         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7445         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7446         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7447         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7448         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7449         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7450         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7451         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7452         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7453         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7454         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7455         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7456         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7457         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7458         not check for things that C99 does not require, e.g., int8_t.  If
7459         a test isn't needed unless <stdint.h> isn't working, and is
7460         unlikely to be needed for any other reason, then don't do it
7461         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7462         size_t, since we assume C89 freestanding at least.  Do not check
7463         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7464         the right thing even if the types are not defined.  Instead use:
7465         (gl_STDINT_TYPE_PROPERTIES): New macro.
7466         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7467         testing whether <sys/types.h> clashes, as Autoconf does this for
7468         us now.  All uses removed.
7469         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7470         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7471         (gl_CHECK_TYPE_SAME):
7472         Remove; no longer needed.
7473         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7474         exists, since we'll return 0 anyway in that case.
7475         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7476
7477 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7478
7479         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7480         possible collision with system files.
7481         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7482         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7483         WCHAR_MIN and WCHAR_MAX in this case.
7484         (<stddef.h>): Do not include; no longer needed.
7485         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7486         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7487         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7488         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7489         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7490         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7491         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7492         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7493         !defined(__c99))]: Include in this case too, since it's harmless
7494         now.
7495         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7496         dangerous to do so.
7497         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7498         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7499         (_STDINT_MIN, _STDINT_MAX): New macros.
7500         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7501         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7502         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7503         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7504         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7505         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7506         macros, not typedefs; this simplifies things quite a bit.
7507         Use long int for all types narrower than int64_t.
7508         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7509         Define in terms of long long int or int64_t or long int,
7510         not int64_t or int32_t.  This saves some compile-time testing.
7511         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7512         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7513         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7514         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7515         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7516         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7517         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7518         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7519         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7520         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7521         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7522         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7523         undef any previous version and define our own version, for
7524         simplicity and consistency with the new macros for types.
7525         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7526         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7527         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7528         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7529         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7530         @WINT_T_SUFFIX@ to keep things simple here.
7531         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7532         Simplify by assuming typical 8/16/32/64 host, since we're
7533         already doing that elsewhere anyway.
7534         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7535         and assume long long int is 64 bits if available.  This
7536         speeds up 'configure'.
7537
7538 2006-07-01  Eric Blake  <ebb9@byu.net>
7539
7540         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7541         Reported by Andreas Buening.
7542
7543 2006-07-01  Eric Blake  <ebb9@byu.net>
7544
7545         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7546
7547 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7548
7549         * lib/getaddrinfo.c: fixed typo
7550
7551 2006-06-29  Jim Meyering  <jim@meyering.net>
7552
7553         * modules/strftime (Maintainer): Add my name, since with the
7554         FPRINTFTIME changes strftime.c has forked from glibc.
7555
7556 2006-06-29  Eric Blake  <ebb9@byu.net>
7557
7558         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7559
7560 2006-06-29  Eric Blake  <ebb9@byu.net>
7561
7562         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7563
7564 2006-06-29  Eric Blake  <ebb9@byu.net>
7565
7566         * lib/stat_.h: New file.
7567
7568 2006-06-29  Eric Blake  <ebb9@byu.net>
7569
7570         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7571         unused static function.
7572
7573 2006-06-29  Eric Blake  <ebb9@byu.net>
7574
7575         * doc/functions.texi (Function Portability): Document missing lstat
7576         on mingw.
7577
7578 2006-06-29  Eric Blake  <ebb9@byu.net>
7579
7580         * MODULES.html.sh: Add sys_stat.
7581         * modules/sys_stat: New module.
7582         * modules/mkstemp (Depends-on): Add sys_stat.
7583
7584 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7585
7586         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7587
7588 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7589
7590         * m4/c-bs-a.m4: Removed.
7591
7592 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7593
7594         * lib/strftime.c: Assume strftime() exists.
7595
7596 2006-06-29  Derek Price  <derek@ximbiot.com>
7597
7598         * modules/c-bs-a: Removed - \a is C89.
7599         * MODULES.html.sh: Remove c-bs-a.
7600
7601 2006-06-29  Bruno Haible  <bruno@clisp.org>
7602
7603         * modules/wcwidth (License): Change to LGPL.
7604
7605 2006-06-28  Simon Josefsson  <jas@extundo.com>
7606
7607         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7608         on _WIN32.
7609
7610         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7611         getnameinfo.
7612
7613 2006-06-28  Simon Josefsson  <jas@extundo.com>
7614
7615         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7616
7617 2006-06-28  Simon Josefsson  <jas@extundo.com>
7618
7619         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7620         functions there.  It will succeed on Windows XP, but on Windows
7621         2000 and (presumably) earlier, it will fail, and use the internal
7622         re-implementation.
7623         (use_win32_p): New function.
7624         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7625         Support AI_NUMERICSERV to disable getservbyname.
7626         (getnameinfo): New function, only supports
7627         NI_NUMERICHOST|NI_NUMERICSERV for now.
7628
7629         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7630         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7631         getnameinfo.
7632
7633 2006-06-28  Eric Blake  <ebb9@byu.net>
7634
7635         * modules/wcwidth: New file.
7636         * modules/mbchar (Depends-on): Add wcwidth.
7637         * modules/mbswidth (Depends-on): Add wcwidth.
7638         * MODULES.html.sh: Add wcwidth.
7639
7640 2006-06-28  Eric Blake  <ebb9@byu.net>
7641
7642         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7643         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7644
7645 2006-06-28  Eric Blake  <ebb9@byu.net>
7646
7647         * lib/xvasprintf.h: Fix comments.
7648
7649 2006-06-28  Eric Blake  <ebb9@byu.net>
7650
7651         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7652         * lib/mbswidth.c (wcwidth): Move from here...
7653         * lib/wcwidth.h: ...to this new file.
7654
7655 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7656
7657         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7658
7659         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7660         it's obsolete.
7661         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7662
7663 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7664
7665         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7666         Autoconf 2.60 says this stuff was obsolete.
7667
7668 2006-06-28  Bruno Haible  <bruno@clisp.org>
7669
7670         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7671
7672 2006-06-28  Bruno Haible  <bruno@clisp.org>
7673
7674         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7675         gt_TYPE_WCHAR_T.
7676
7677 2006-06-28  Bruno Haible  <bruno@clisp.org>
7678
7679         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7680         declaration for wcwidth.
7681         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7682
7683 2006-06-28  Bruno Haible  <bruno@clisp.org>
7684
7685         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7686         (mkdir): Define using _mkdir.
7687
7688 2006-06-28  Bruno Haible  <bruno@clisp.org>
7689
7690         * lib/getaddrinfo.h: Fix POSIX URL.
7691         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7692         _WIN32.
7693         (use_win32_p): Make static.
7694         (getaddrinfo): Reject service name if it is empty or does not consist
7695         solely of decimal digits, or if its value is > 65535.
7696         (getnameinfo): Remove useless casts.
7697
7698 2006-06-27  Simon Josefsson  <jas@extundo.com>
7699
7700         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7701         Eggert and Martin Lambers.
7702
7703 2006-06-27  Simon Josefsson  <jas@extundo.com>
7704
7705         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7706         Eggert and Martin Lambers.
7707
7708 2006-06-27  Bruno Haible  <bruno@clisp.org>
7709
7710         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7711         result to 0, not to empty.
7712         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7713
7714 2006-06-27  Bruno Haible  <bruno@clisp.org>
7715
7716         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7717
7718 2006-06-26  Simon Josefsson  <jas@extundo.com>
7719
7720         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7721         present.
7722
7723 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7724
7725         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7726         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7727         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7728
7729 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7730
7731         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7732
7733 2006-06-26  Bruno Haible  <bruno@clisp.org>
7734
7735         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7736
7737 2006-06-26  Bruno Haible  <bruno@clisp.org>
7738
7739         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7740
7741 2006-06-26  Bruno Haible  <bruno@clisp.org>
7742
7743         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7744         SGI C compiler in pre-C99 mode.
7745         Suggested by Mark D. Baushke and Larry Jones.
7746
7747 2006-06-26  Bruno Haible  <bruno@clisp.org>
7748
7749         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7750         WCHAR_MAX.
7751         Reported by Mark D. Baushke and Larry Jones.
7752
7753 2006-06-26  Bruno Haible  <bruno@clisp.org>
7754
7755         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7756         in pre-C99 mode.
7757         Suggested by Mark D. Baushke and Larry Jones.
7758
7759 2006-06-23  Simon Josefsson  <jas@extundo.com>
7760             Bruno Haible  <bruno@clisp.org>
7761
7762         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7763         Emit mostlyclean-local rule.
7764         (func_emit_tests_Makefile_am): Likewise.
7765         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7766
7767 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7768
7769         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7770
7771 2006-06-23  Bruno Haible  <bruno@clisp.org>
7772
7773         * tests/test-stdint.c: Update to match ISO C 99 Technical
7774         Corrigendum 1.
7775
7776 2006-06-23  Bruno Haible  <bruno@clisp.org>
7777
7778         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7779
7780 2006-06-23  Bruno Haible  <bruno@clisp.org>
7781
7782         * lib/stdint_.h: Treat IRIX like OpenBSD.
7783
7784 2006-06-23  Bruno Haible  <bruno@clisp.org>
7785
7786         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7787         ISO C 99 Technical Corrigendum 1.
7788
7789 2006-06-22  Simon Josefsson  <jas@extundo.com>
7790
7791         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7792         MinGW.
7793
7794 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7795
7796         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7797         needed.  Some compiler complained about some of them.  Problem reported
7798         by Larry Jones in
7799         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7800
7801 2006-06-21  Simon Josefsson  <jas@extundo.com>
7802
7803         * tests/test-getaddrinfo.c: New file.
7804
7805         * modules/getaddrinfo-tests: New file.
7806
7807         * MODULES.html.sh: Add inet_pton.
7808
7809         * modules/inet_pton: New file.
7810
7811 2006-06-21  Simon Josefsson  <jas@extundo.com>
7812
7813         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7814         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7815         of using the (limited) gnulib implementation on Windows XP.
7816
7817         * m4/inet_pton.m4: New file.
7818
7819 2006-06-21  Simon Josefsson  <jas@extundo.com>
7820
7821         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7822         variable.
7823
7824         * lib/socket_.h: Don't define WINVER.
7825
7826         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7827         slightly modified to work in gnulib.
7828
7829 2006-06-21  Simon Josefsson  <jas@extundo.com>
7830
7831         * doc/gnulib.texi (Windows sockets): Add.
7832
7833 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7834
7835         * lib/read-file.c (fread_file): Start with buffer allocation of
7836         0 bytes rather than 1 byte; this simplifies the code.
7837         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7838         code to free buffer and save/restore errno.
7839         (internal_read_file): Remove unused local.
7840
7841 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7842
7843         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7844         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7845         Problem reported by Denis Excoffier in
7846         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7847
7848 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7849
7850         * modules/sys_socket, modules/socklen: Include sys/types since
7851         FreeBSD 4.x's sys/socket.h needs it.
7852
7853 2006-06-19  Simon Josefsson  <jas@extundo.com>
7854
7855         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7856
7857 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7858
7859         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7860
7861 2006-06-19  Bruno Haible  <bruno@clisp.org>
7862
7863         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7864         and FULL_PATH_INTTYPES_H in angle brackets.
7865         Reported by Mark D. Baushke <mdb@gnu.org>.
7866
7867 2006-06-17  Eric Blake  <ebb9@byu.net>
7868
7869         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7870         errno.
7871
7872 2006-06-17  Bruno Haible  <bruno@clisp.org>
7873
7874         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7875         <sys/inttypes.h>.
7876
7877 2006-06-17  Bruno Haible  <bruno@clisp.org>
7878
7879         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7880         whether errno is declared. Assume <errno.h> declares errno.
7881
7882 2006-06-17  Bruno Haible  <bruno@clisp.org>
7883
7884         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7885
7886 2006-06-17  Bruno Haible  <bruno@clisp.org>
7887
7888         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7889         problem on Solaris 2.5.1.
7890
7891 2006-06-16  Eric Blake  <ebb9@byu.net>
7892
7893         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7894         * lib/unicodeio.c [!defined errno]: Likewise.
7895         * lib/strtol.c [!defined errno]: Likewise.
7896         * lib/strtod.c [!defined errno]: Likewise.
7897
7898 2006-06-15  Eric Blake  <ebb9@byu.net>
7899
7900         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7901
7902 2006-06-15  Eric Blake  <ebb9@byu.net>
7903
7904         * config/srclist.txt (ssize_t.m4): Lose sync.
7905
7906 2006-06-15  Bruno Haible  <bruno@clisp.org>
7907
7908         * modules/stdint (Files): Include m4/full-header-path.m4,
7909         m4/size_max.m4, m4/wchar_t.m4.
7910         (Makefile.am): Many more substitutions.
7911         * modules/stdint-tests: New file.
7912         * tests/test-stdint.c: New file.
7913
7914 2006-06-15  Bruno Haible  <bruno@clisp.org>
7915
7916         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
7917         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
7918         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
7919         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
7920         gl_CHECK_TYPE_SAME): New macros.
7921
7922 2006-06-15  Bruno Haible  <bruno@clisp.org>
7923
7924         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
7925
7926 2006-06-15  Bruno Haible  <bruno@clisp.org>
7927
7928         * lib/stdint_.h: Rewritten to be fully auto-configured.
7929         Fixes bug on HP-UX/IA64.
7930
7931 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
7932
7933         * lib/getdate.y (__attribute__): Don't define if already defined.
7934         Problem reported by Larry Jones.
7935         * lib/utimens.c (__attribute__): Likewise.
7936
7937 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
7938
7939         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
7940         reported by Andreas Schwab.
7941
7942 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7943             Bruno Haible  <bruno@clisp.org>
7944
7945         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
7946         check for the declaration of strnlen and a run test that exposes the
7947         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
7948         rpl_strndup.
7949
7950 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7951             Bruno Haible  <bruno@clisp.org>
7952
7953         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
7954
7955 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7956
7957         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
7958         compile test, for Tru64 4.0D.
7959
7960 2006-05-28  Karl Berry  <karl@gnu.org>
7961
7962         * config/srclist.txt (printf-args.c): lose sync.
7963
7964 2006-05-26  Martin Lambers  <marlam@marlam.de>
7965
7966         * lib/getpass.c: Updates the test for the native W32 API, and adds
7967         missing includes, thus fixing compilation warnings.
7968
7969 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7970
7971         * lib/exclude.c (exclude_fnmatch): New function.
7972         (excluded_file_name): Call exclude_fnmatch.
7973         * lib/exclude.h (excluded_file_name): New prototype
7974
7975 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
7976
7977         * lib/tempname.c (small_open, large_open): New macros.
7978         (__open, __open64) [!_LIBC]: Remove.
7979         (__gen_tempname): Use small_open and large_open instead of __open
7980         and __open64.  This fixes a portability bug on HP-UX 11.11i
7981         reported by Simon Wing-Tang in
7982         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
7983
7984 2006-05-24  Bruno Haible  <bruno@clisp.org>
7985
7986         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
7987         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
7988         Reported by Thorsten Maerz <torte@netztorte.de> via
7989         Aaron Stone <aaron@serendipity.cx>.
7990
7991 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
7992
7993         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
7994         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
7995         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
7996         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
7997         not really conditional on the cache.
7998         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
7999
8000 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8001
8002         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8003         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8004         (my_usleep): Don't mishandle maximum value.
8005
8006 2006-05-19  Jim Meyering  <jim@meyering.net>
8007
8008         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8009
8010 2006-05-17  Bruno Haible  <bruno@clisp.org>
8011
8012         Cygwin portability.
8013         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8014
8015 2006-05-17  Bruno Haible  <bruno@clisp.org>
8016
8017         * lib/stdint_.h: Fix recognition of Cygwin.
8018
8019 2006-05-15  Bruno Haible  <bruno@clisp.org>
8020
8021         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8022         on libtool patch by Ralf Wildenhues.
8023
8024 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8025
8026         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8027         test for C99 conformance; (bool) 0.5 is an integer constant
8028         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8029         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8030
8031 2006-05-11  Simon Josefsson  <jas@extundo.com>
8032
8033         * m4/xvasprintf.m4: Fix obvious typo.
8034
8035 2006-05-11  Jim Meyering  <jim@meyering.net>
8036
8037         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8038         James Lemley.
8039
8040 2006-05-10  Simon Josefsson  <jas@extundo.com>
8041
8042         * lib/md4.c: Typo fix, update copyright years.
8043         (K1, K2): Don't use L because it turn computations into 64-bit on
8044         64-bit platforms.
8045
8046 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8047
8048         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8049         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8050         unwanted sign propagation, e.g., on hosts with 64-bit int.
8051         There still are some problems with reeelly weird theoretical hosts
8052         (e.g., 33-bit int) but it's not worth worrying about now.
8053         * lib/sha1.c (rol): Likewise.
8054         (K1, K2, K3, K4): Remove unnecessary L suffix.
8055
8056 2006-05-10  Bruno Haible  <bruno@clisp.org>
8057
8058         * lib/des.c: Cast to avoid warnings.
8059
8060 2006-05-09  Bruno Haible  <bruno@clisp.org>
8061
8062         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8063         (Depends-on): Depend also on xsize, stdarg.
8064         (configure.ac): Add gl_XVASPRINTF.
8065
8066 2006-05-09  Bruno Haible  <bruno@clisp.org>
8067
8068         * m4/xvasprintf.m4: New file.
8069
8070 2006-05-09  Bruno Haible  <bruno@clisp.org>
8071
8072         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8073         (EOVERFLOW): Define fallback value.
8074         (xstrcat): New function.
8075         (xvasprintf): Recognize the special case of a string concatenation.
8076
8077 2006-05-08  Eric Blake  <ebb9@byu.net>
8078
8079         * gnulib-tool (func_version): Base copyright year on CVS date.
8080         (func_emit_copyright_notice): New function.
8081         (func_emit_lib_Makefile_am): Use it.
8082         (func_emit_tests_Makefile_am): Likewise.
8083         (func_import): Likewise.
8084
8085 2006-05-08  Bruno Haible  <bruno@clisp.org>
8086
8087         * modules/stdarg: New file.
8088         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8089
8090 2006-05-08  Bruno Haible  <bruno@clisp.org>
8091
8092         * m4/stdarg.m4: New file, from GNU gettext.
8093
8094 2006-05-08  Bruno Haible  <bruno@clisp.org>
8095
8096         * config/srclist.txt (build-aux/config.rpath): different from latest
8097         release.
8098
8099 2006-05-08  Bruno Haible  <bruno@clisp.org>
8100
8101         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8102
8103 2006-05-05  Jim Meyering  <jim@meyering.net>
8104
8105         * m4/warning.m4: New file, derived from bison's file by the same name.
8106
8107 2006-05-03  Bruno Haible  <bruno@clisp.org>
8108
8109         * lib/stdint_.h: Shorter URL.
8110         * lib/inttypes.h: Likewise.
8111
8112 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8113
8114         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8115
8116 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8117
8118         * lib/verify.h: Document the internals better.  Most of this change
8119         was written by Bruno Haible.
8120
8121 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8122
8123         * doc/verify.texi: New file, partly based on a proposal by
8124         Bruno Haible.
8125
8126 2006-05-02  Bruno Haible  <bruno@clisp.org>
8127
8128         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8129         test from here...
8130         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8131
8132 2006-04-29  Bruno Haible  <bruno@clisp.org>
8133
8134         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8135         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8136
8137 2006-04-29  Bruno Haible  <bruno@clisp.org>
8138
8139         * gnulib-tool: Make --update option actually work.
8140
8141 2006-04-29  Bruno Haible  <bruno@clisp.org>
8142
8143         * doc/gcd.texi: New file.
8144         * doc/gnulib.texi: Include it.
8145
8146 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         * lib/getdate.y (get_date): When adding relative date, start with the
8149         initial time, not with the result of the first mktime call.
8150
8151 2006-04-25  Bruno Haible  <bruno@clisp.org>
8152
8153         * gnulib-tool (func_import): Output the include directives in three
8154         blocks, sorted separately.
8155         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8156
8157 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8158
8159         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8160         to define main with arguments, for C++.  Reported by Eric Blake.
8161         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8162         Prefer 'int main ()' to 'int main (void)', for C++.
8163         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8164         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8165         for 'main', for C99 and C++.
8166
8167 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8168
8169         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8170         Don't assume that exit status -1 is valid.
8171         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8172         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8173         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8174         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8175         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8176         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8177         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8178         functions can be used without declaring them, or that you can
8179         exit with status -1.
8180         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8181
8182 2006-04-24  Karl Berry  <karl@gnu.org>
8183
8184         * config/srclist.txt (longdouble.m4): sync lost.
8185
8186 2006-04-24  Eric Blake  <ebb9@byu.net>
8187
8188         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8189
8190 2006-04-24  Bruno Haible  <bruno@clisp.org>
8191
8192         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8193         poll() implementation in AIX.
8194         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8195
8196 2006-04-24  Bruno Haible  <bruno@clisp.org>
8197
8198         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8199         assigned exactly once.
8200
8201 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8202             Bruno Haible  <bruno@clisp.org>
8203
8204         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8205         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8206         for AM_CPPFLAGS.
8207
8208 2006-04-23  Bruno Haible  <bruno@clisp.org>
8209
8210         * modules/copy-file: Depend on unistd.
8211         * modules/execute: Likewise.
8212         * modules/fatal-signal: Likewise.
8213         * modules/findprog: Likewise.
8214         * modules/mkdtemp : Likewise.
8215         * modules/pipe: Likewise.
8216         * modules/wait-process: Likewise.
8217
8218 2006-04-23  Bruno Haible  <bruno@clisp.org>
8219
8220         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8221         condition was already detected.
8222         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8223
8224 2006-04-23  Bruno Haible  <bruno@clisp.org>
8225
8226         * lib/copy-file.c: Include <unistd.h> unconditionally.
8227         * lib/execute.c: Likewise.
8228         * lib/fatal-signal.c: Likewise.
8229         * lib/findprog.c: Likewise.
8230         * lib/mkdtemp.c: Likewise.
8231         * lib/pipe.h: Likewise.
8232         * lib/pipe.c: Likewise.
8233         * lib/wait-process.h: Likewise.
8234
8235 2006-04-23  Bruno Haible  <bruno@clisp.org>
8236
8237         * gnulib-tool (func_usage): Fix --import description. Document
8238         --update.
8239         (func_import): Create temporary file in a temporary directory, if
8240         --dry-run is specified. Silence errors from 'grep' when there are no
8241         m4 files in $m4dir.
8242         (func_create_testdir): Silence errors from 'grep' when there are no
8243         m4 files in $m4dir.
8244         Reported by Karl Berry <karl@freefriends.org>.
8245
8246 2006-04-20  Bruno Haible  <bruno@clisp.org>
8247
8248         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8249         one argument, so that the code will be portable to Autoconf 2.60.
8250         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8251         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8252         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8253
8254 2006-04-19  Derek Price  <derek@ximbiot.com>
8255             Eric Blake  <ebb9@byu.net>
8256
8257         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8258         rather than "/full/path.h".  Update comment to match.  Shorten &
8259         generalize m4_translit call via AS_TR_CPP.
8260
8261 2006-04-19  Derek Price  <derek@ximbiot.com>
8262             Eric Blake  <ebb9@byu.net>
8263
8264         * lib/inttypes.h: Correct grammar in comment.
8265
8266 2006-04-18  Derek Price  <derek@ximbiot.com>
8267             Paul Eggert  <eggert@cs.ucla.edu>
8268
8269         * modules/inttypes: New file.
8270         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8271
8272 2006-04-18  Derek Price  <derek@ximbiot.com>
8273             Paul Eggert  <eggert@cs.ucla.edu>
8274
8275         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8276         New files.
8277
8278 2006-04-18  Derek Price  <derek@ximbiot.com>
8279             Paul Eggert  <eggert@cs.ucla.edu>
8280
8281         * lib/inttypes.h: New file.
8282         * lib/strtoimax.c: Assume <inttypes.h>.
8283
8284 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8285
8286         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8287         isn't mounted.  Problem reported by Kir Kolyshkin.
8288
8289 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8290
8291         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8292         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8293         Derek R. Price.
8294         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8295         implementation.
8296
8297 2006-04-12  Eric Blake  <ebb9@byu.net>
8298
8299         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8300         is now done automatically by the corresponding Autoconf macro.
8301
8302 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8303
8304         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8305         time_r.h.
8306
8307 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8308
8309         Merge regex changes from libc, removing some of our
8310         POSIX-conformance changes that were rejected and redoing them in a
8311         less-intrusive way.
8312
8313         * lib/regcomp.c (re_compile_internal, init_dfa):
8314         Length arg is now size_t, not Idx.  All uses changed.
8315         (peek_token): Forward decl now says internal_function.
8316         (__re_error_msgid, __re_error_msgid_idx):
8317         Now static rather than extern with attribute_hidden.
8318         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8319         For some reason libc prefers K&R style defns for external functions.
8320         (regerror) [!defined _LIBC]: Likewise.
8321         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8322         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8323         (build_range_exp, build_collating_symbol):
8324         Use K&R-style defn.
8325         (re_compile_fastmap): Use '\0' to memset, not 0.
8326         (utf8_sb_map): Make the calculations more obvious.
8327         (init_dfa, parse_bracket_exp, build_charclass_op):
8328         Call calloc and cast result, as glibc does.
8329         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8330         (build_range_exp, build_collating_symbol):
8331         Now internal functions.
8332
8333         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8334
8335         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8336         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8337         Don't depend on VMS; depend on __VMS instead, for POSIX
8338         namespace cleanness.
8339         (regoff_t): Define to ssize_t, not long int.
8340
8341         Remove the REG_ macros named below.  Instead, make the old names
8342         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8343         __USE_GNU_REGEX.
8344         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8345         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8346         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8347         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8348         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8349         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8350         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8351         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8352         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8353         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8354         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8355         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8356         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8357         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8358         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8359         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8360         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8361         (REG_NREGS):
8362         Remove.  All uses replaced by the old RE_* names.
8363         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8364         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8365         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8366         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8367         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8368         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8369         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8370         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8371         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8372         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8373         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8374         Don't bother having these macros be independent of each others'
8375         values, since they no longer exist in the POSIX name space.
8376
8377         Rename the following member names back to their old names,
8378         unless !__USE_GNU_REGEX.  All uses changed back.
8379         (buffer): Renamed from re_buffer.
8380         (allocated): Renamed from re_allocated.
8381         (used): Renamed from re_used.
8382         (syntax): Renamed from re_syntax.
8383         (fastmap): Renamed from re_fastmap.
8384         (translate): Renamed from re_translate.
8385         (can_be_null): Renamed from re_can_be_null.
8386         (regs_allocated): Renamed from re_regs_allocated.
8387         (fastmap_accurate): Renamed from re_fastmap_accurate.
8388         (no_sub): Renamed from re_no_sub.
8389         (not_bol): Renamed from re_not_bol.
8390         (not_eol): Renamed from re_not_eol.
8391         (newline_anchor): Renamed from re_newline_anchor.
8392         (num_regs): Renamed from rm_num_regs.
8393         (start): Renamed from rm_start.
8394         (end): Renamed from rm_end.
8395
8396         (free_state): Move up a bit.
8397
8398         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8399         #define to be empty.
8400         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8401         when that is what is intended.
8402         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8403         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8404         (MAX): New macro.
8405         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8406         All uses changed back to re_malloc, etc.  It's now the caller's
8407         responsibility to check for overflow; all callers changed.
8408         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8409         (re_x2nrealloc): Remove.
8410         (free_state): Remove decl.
8411
8412         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8413         (re_set_registers, re_exec):
8414         Use K&R-style defn.
8415
8416         2006-01-31  Roland McGrath  <roland@redhat.com>
8417
8418         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8419         Reported by Mike Frysinger <vapier@gentoo.org>.
8420
8421         2006-01-15  Andreas Jaeger  <aj@suse.de>
8422
8423         [BZ #1950]
8424         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8425         build_wcs_upper_buffer change.
8426         (build_wcs_upper_buffer): Change return type.
8427
8428         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8429
8430         * lib/regex_internal.h: Include <stdint.h> if available.
8431
8432         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8433
8434         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8435
8436         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8437
8438         * lib/regcomp.c: Adjust for changed secondary hash function.
8439
8440         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8441
8442         * lib/regex.h: Pretty printing.
8443         Clean up namespace a bit.
8444
8445         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8446
8447         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8448         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8449
8450         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8451                     Ulrich Drepper  <drepper@redhat.com>
8452
8453         [BZ #1302]
8454         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8455         changed.
8456         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8457
8458         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8459
8460         [BZ #281]
8461         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8462         * lib/regcomp.c: Remove unnecessary uses of
8463         unsigned RE_TRANSLATE_TYPE.
8464         * lib/regex_internal.h: Likewise.
8465         * lib/regex_internal.c: Likewise.
8466         * lib/regexec.c: Likewise.
8467         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8468
8469         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8470
8471         * lib/regexec.c (find_recover_state): Remove unnecessary
8472         initialization.
8473         (transit_state_bkref): Make DFA a const pointer.
8474         (get_subexp): Likewise.
8475         (check_arrival): Likewise.
8476         (update_cur_sifted_state): Likewise.
8477         (re_search_internal): Likewise.
8478         (prune_impossible_nodes): Likewise.
8479         (acquire_init_state_context): Likewise.
8480         (proceed_next_node): Likewise.
8481         (set_regs): Likewise.
8482         (free_fail_stack_return): Likewise.
8483         (check_arrival_expand_ecl): Mark DFA parameter as const.
8484         (check_arrival_expand_ecl_sub): Likewise.
8485         (check_subexp_limits): Likewise.
8486         (sub_epsilon_src_nodes):  Likewise.
8487         (add_epsilon_src_nodes):  Likewise.
8488         (merge_state_array): Likewise.
8489         (update_regs): Likewise.
8490         (build_trtable): Likewise.
8491         (sift_states_backward): Mark MCTX parameter as const.
8492         (build_sifted_states): Likewise.
8493         (update_cur_sifted_state): Likewise.
8494         (sift_states_mkref): Likewise.
8495         (check_arrival_expand_ecl): Mark eclosure as const.
8496         (check_dst_limits_calc_pos_1): Likewise.
8497         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8498         pointer.
8499
8500         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8501
8502         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8503         (transit_state_sb): Likewise.
8504         (transit_state_mb): Likewise.
8505         (sift_states_iter_mb): Likewise.
8506         (check_arrival_add_next_nodes): Likewise.
8507         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8508         [_LIBC] (re_search_2_stub): Use mempcpy.
8509
8510         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8511         mbrtowc for very simple UTF-8 case.
8512
8513         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8514         a pointer-to-const.
8515         (re_acquire_state_context): Likewise.
8516         * lib/regex_internal.h: Adjust prototypes.
8517
8518         * lib/regex.c: Prevent using C++ compilers.
8519
8520         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8521         (re_acquire_state_context): Likewise.
8522
8523 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8524
8525         * modules/regex (Depends-on): Add ssize_t.
8526
8527 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8528
8529         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8530         translation table.
8531
8532 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8533
8534         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8535
8536 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8537             Bruno Haible  <bruno@clisp.org>
8538
8539         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8540         <sys/types.h> and <inttypes.h>.
8541
8542 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8543
8544         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8545         `__error_t_defined', so argp.h will not typedef the former.
8546
8547 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8548
8549         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8550         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8551         glibc names.  Even if glibc is changed to conform to POSIX, the
8552         traditional names will be available anyway, since regex depends on
8553         the extensions module.  Also, fix a longstanding typo in the
8554         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8555         reported by Emanuele Giaquinta.  Also, change sense of cached
8556         variable, so that the message makes sense.
8557
8558 2006-03-24  Simon Josefsson  <jas@extundo.com>
8559
8560         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8561         including some doc fixes.
8562         (base64_encode_alloc): Fix +1 bug on allocation failures.
8563
8564 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8565
8566         * lib/base64.c (base64_encode): Do not read past end of array with
8567         unsanitized input on systems with CHAR_BIT > 8.
8568
8569 2006-03-24  Eric Blake  <ebb9@byu.net>
8570
8571         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8572
8573 2006-03-22  Karl Berry  <karl@gnu.org>
8574
8575         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8576         * config/srclistvars.sh (COREUTILS): new var.
8577
8578 2006-03-17  Jim Meyering  <jim@meyering.net>
8579
8580         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8581         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8582
8583 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8584
8585         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8586         no longer needs it.  Instead, check that regoff_t is as least
8587         as wide as ptrdiff_t.
8588
8589         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8590         so that our regex.h stays compatible with the installed regex.
8591         This is helpful for installers who configure --without-included-regex.
8592         Problem reported by Emanuele Giaquinta.
8593
8594 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8595
8596         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8597         Typedef to long int, not to off_, as POSIX will likely change
8598         in that direction.
8599
8600 2006-03-15  Eric Blake  <ebb9@byu.net>
8601
8602         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8603
8604 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8605
8606         * lib/argp-help.c (validate_uparams): Fix typo
8607         * lib/argp-parse.c (argp_default_options): Consistently begin help
8608         messages with a lowercase letter.
8609
8610 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8611
8612         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8613         overrun buffers and shouldn't be used (much as gets shouldn't be
8614         used).
8615         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8616
8617 2006-03-08  Simon Josefsson  <jas@extundo.com>
8618
8619         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8620         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8621
8622 2006-03-08  Simon Josefsson  <jas@extundo.com>
8623
8624         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8625         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8626
8627 2006-03-08  Simon Josefsson  <jas@extundo.com>
8628
8629         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8630         signal that configure disabled the device.
8631
8632 2006-03-08  Simon Josefsson  <jas@extundo.com>
8633
8634         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8635         languages.
8636
8637 2006-03-07  Simon Josefsson  <jas@extundo.com>
8638
8639         * modules/getopt (Depends-on): Add unistd.
8640
8641         * modules/unistd: New file.
8642
8643 2006-03-07  Simon Josefsson  <jas@extundo.com>
8644
8645         * modules/gc-random: New file.
8646
8647 2006-03-07  Simon Josefsson  <jas@extundo.com>
8648
8649         * m4/unistd_h.m4: New file.
8650
8651 2006-03-07  Simon Josefsson  <jas@extundo.com>
8652
8653         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8654         test to be side-effect free by storing the result in the cache
8655         variable gl_cv_lib_readline, and moving the assignment of
8656         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8657         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8658
8659 2006-03-07  Simon Josefsson  <jas@extundo.com>
8660
8661         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8662         error on missing devices (the functions will return an error).
8663
8664         * m4/gc.m4: Move random stuff to gc-random.m4
8665
8666 2006-03-07  Simon Josefsson  <jas@extundo.com>
8667
8668         * lib/unistd_.h: New file.
8669
8670 2006-03-07  Simon Josefsson  <jas@extundo.com>
8671
8672         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8673
8674 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8675
8676         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8677         Problem reported by Juan Manuel Guerrero.
8678
8679 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8680
8681         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8682         the unistd module.
8683         * lib/getlogin_r.c: Likewise.
8684         * lib/getlogin_r.h: Likewise.
8685         * lib/glob.c: Likewise.
8686         * lib/pagealign_alloc.c: Likewise.
8687         * lib/unistd_.h: Remove; no longer needed.
8688
8689 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8690
8691         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8692         Add unistd.
8693         * modules/c-stack (Depends-on): Add unistd.
8694         * modules/getlogin_r: Likewise.
8695         * modules/glob: Likewise.
8696         * modules/pagealign_alloc: Likewise.
8697         * modules/unistd (Files): Remove lib/unistd_.h.
8698         (EXTRA_DIST): Remove.
8699         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8700         need unistd_.h.
8701         (MOSTLYCLEANFILES): Remove unistd.h-t.
8702
8703 2006-03-03  Simon Josefsson  <jas@extundo.com>
8704
8705         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8706
8707 2006-03-03  Simon Josefsson  <jas@extundo.com>
8708
8709         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8710         libidn and bison.
8711
8712 2006-03-03  Simon Josefsson  <jas@extundo.com>
8713
8714         * build-aux/maint.mk: Add indent target.
8715
8716 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8717
8718         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8719         our replacement poll.h in any case, to avoid a differing
8720         declaration from a system header.  Seen on AIX.
8721
8722 2006-03-01  Simon Josefsson  <jas@extundo.com>
8723
8724         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8725         <kasal@ucw.cz>.
8726
8727 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8728
8729         * modules/gettime (Depends-on): Add extensions module.
8730         * modules/nanosleep (Depends-on): Likewise.
8731         * modules/settime (Depends-on): Likewise.
8732
8733 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8734
8735         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8736         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8737         pedantically.
8738         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8739         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8740
8741         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8742         not "==".  Reported by Ralf Wildenhues.
8743
8744 2006-03-01  Karl Berry  <karl@gnu.org>
8745
8746         * doc/Copyright/request-*: new files, synced from gnuorg.
8747
8748 2006-03-01  Karl Berry  <karl@gnu.org>
8749
8750         * config/srclist.txt (Copyright/*): new entries.
8751
8752 2006-02-28  Simon Josefsson  <jas@extundo.com>
8753
8754         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8755
8756 2006-02-27  Simon Josefsson  <jas@extundo.com>
8757
8758         * lib/base64.h: Indent #define's.  From Jim Meyering
8759         <jim@meyering.net>.
8760
8761 2006-02-27  Jim Meyering  <jim@meyering.net>
8762
8763         Revert the change of 2006-02-24, so these files can continue
8764         to be sync'd from gettext.
8765         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8766         of `config.h'.
8767
8768 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8769
8770         * modules/intprops: New file.
8771         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8772         Add intprops.
8773         * modules/getloadavg (Files): Remove lib/intprops.h.
8774         (Depends-on): Add intprops.
8775         * modules/human: Likewise.
8776         * modules/inttostr: Likewise.
8777         * modules/openat: Likewise.
8778         * modules/sig2str: Likewise.
8779         * modules/userspec: Likewise.
8780         * modules/utimecmp: Likewise.
8781         * modules/xnanosleep: Likewise.
8782         * modules/xstrtol: Likewise.
8783
8784 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8785
8786         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8787         * modules/lock-tests (TESTS): Use $(EXEEXT).
8788         * modules/tls-tests: Likewise.
8789         * modules/argp-tests: Likewise.
8790         (check_PROGRAMS): New var, replacing...
8791         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8792
8793 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8794
8795         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8796         `config.h'.
8797
8798 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8799
8800         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8801
8802 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8803
8804         Sync from coreutils.
8805         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8806         gl_CHDIR_SAFER.
8807
8808 2006-02-22  Jim Meyering  <jim@meyering.net>
8809
8810         Sync from coreutils.
8811         * m4/chdir-safer.m4: New file.
8812
8813 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8814
8815         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8816         AT_FDCWD exceeds INT_MAX.
8817         * lib/openat.h (AT_FDCWD): Likewise.
8818
8819 2006-02-17  Eric Blake  <address@hidden>
8820
8821         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8822
8823 2006-02-16  Simon Josefsson  <jas@extundo.com>
8824
8825         * modules/getaddrinfo (Depends-on): Add sys_socket.
8826
8827 2006-02-15  Simon Josefsson  <jas@extundo.com>
8828
8829         * build-aux/maint.mk: Add dsyntax-check rule.
8830
8831 2006-02-15  Eric Blake  <ebb9@byu.net>
8832
8833         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8834         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8835         'present but cannot compile' warnings on cygwin.
8836         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8837         use ws2tcpip.h if sys/socket.h works.
8838         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8839         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8840
8841 2006-02-14  Simon Josefsson  <jas@extundo.com>
8842
8843         * modules/maintainer-makefile (Files): Rename.
8844
8845         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8846         and (the local) Makefile.cfg to maint-cfg.mk.
8847
8848         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8849         to the latter.
8850
8851         * modules/maintainer-makefile: New module.
8852
8853         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8854         severaly stripped to make it possible to build it up from scratch
8855         with reliable tests.
8856
8857         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8858         fixes to permit overriding the default actions when configure and
8859         makefile are not available.
8860
8861 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8862
8863         Sync from coreutils.
8864         * modules/lstat (Depends-on): Don't depend on xalloc.
8865         (License): Change from GPL to LGPL, since this is now simply a
8866         replacement for a libc function.
8867
8868 2006-02-14  Jim Meyering  <jim@meyering.net>
8869
8870         Sync from coreutils.
8871
8872         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8873         failure on deficient systems, and simplify gnulib lgpl dependencies.
8874         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8875         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8876
8877         * lib/xalloc-die.c: Remove unused definition of N_.
8878
8879 2006-02-14  Jim Meyering  <jim@meyering.net>
8880
8881         Sync from coreutils.
8882         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8883         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8884         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8885         double-quote uses of that variable, to accommodate the rare case in
8886         which getmntent is available in none of the libraries checked.  This
8887         happens at least on FreeBSD 5.0.
8888
8889 2006-02-13  Simon Josefsson  <jas@extundo.com>
8890
8891         * gnulib-tool (Usage): Fix --import, from
8892         karl@freefriends.org (Karl Berry).
8893
8894 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8895
8896         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8897
8898 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8899
8900         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8901         "autoupdate" on 2005-12-12.
8902
8903 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8904
8905         * modules/closeout (Depends-on): Remove atexit.
8906
8907 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8908
8909         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
8910         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
8911
8912 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
8915         __EXTENSIONS__ if this causes compilation to fail.  Problem
8916         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
8917         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
8918
8919 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
8920
8921         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
8922         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
8923         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
8924         All uses changed.
8925
8926 2006-01-26  Simon Josefsson  <jas@extundo.com>
8927
8928         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
8929         prototype is visible on mingw32.
8930
8931         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
8932         for mingw32.
8933
8934         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
8935         mingw32).
8936
8937 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
8938
8939         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
8940         attempt to open for write; this always fails, at least on POSIX
8941         hosts.  This reinstates the 2006-01-09 change, which was
8942         inadvertently removed.
8943
8944 2006-01-26  Bruno Haible  <bruno@clisp.org>
8945
8946         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
8947         Reported by Paul Eggert.
8948
8949 2006-01-26  Bruno Haible  <bruno@clisp.org>
8950             Paul Eggert  <eggert@cs.ucla.edu>
8951
8952         * lib/stdbool_.h (_Bool)
8953         [(! (defined __cplusplus || defined __BEOS__)
8954           && !defined __GNUC__
8955           && !(defined __HP_cc || defined __xlc__
8956                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
8957                || defined __sgi))]:
8958         #define to signed char in these cases too; this simplifies
8959         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
8960         etc., separately) and makes it more conservative.
8961
8962 2006-01-25  Simon Josefsson  <jas@extundo.com>
8963
8964         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
8965         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
8966         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
8967
8968 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8969
8970         * lib/argp-namefrob.h: Bugfix. Remove stray #
8971
8972 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
8973
8974         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
8975         so that we test the test.
8976         Check for yet another HP-UX cc bug involving *bool |= bool.
8977
8978 2006-01-25  Karl Berry  <karl@gnu.org>
8979
8980         * config/srclist.txt (vasnprintf.c): sync lost.
8981
8982 2006-01-25  Jim Meyering  <jim@meyering.net>
8983
8984         Sync from the stable (b5) branch of coreutils:
8985
8986         * lib/fts.c (fts_children): Don't let close() clobber errno from
8987         failed fchdir().
8988
8989         * lib/fts.c (fts_stat): When following a symlink-to-directory,
8990         don't necessarily interpret stat-fails+lstat-succeeds as indicating
8991         a dangling symlink.  That can also happen at least for ELOOP.
8992         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
8993         FYI, this bug predates the inclusion of fts.c in coreutils.
8994
8995         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
8996         in their own block, so pre-c99 compilers don't object.
8997
8998         Avoid the double-free (first in fts_read, second in fts_close) that
8999         would occur when an `active' directory is made inaccessible (e.g.,
9000         via chmod a-x) during a traversal.
9001         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9002         before returning.  Reproduce this failure by
9003         mkdir -p a/b; cd a; chmod a-x . b
9004         Reported by Stavros Passas.
9005
9006 2006-01-25  Jim Meyering  <jim@meyering.net>
9007
9008         * lib/fileblocks.c: Remove more useless parentheses.
9009         * lib/readutmp.h: Likewise.
9010
9011 2006-01-25  Bruno Haible  <bruno@clisp.org>
9012
9013         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9014         warnings.
9015         Reported by Paul Eggert.
9016
9017 2006-01-25  Bruno Haible  <bruno@clisp.org>
9018
9019         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9020         rid of a trap command. For Solaris sh.
9021         Reported by Mark D. Baushke <mdb@gnu.org>.
9022
9023 2006-01-24  Simon Josefsson  <jas@extundo.com>
9024
9025         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9026         Bruno.
9027
9028 2006-01-24  Karl Berry  <karl@gnu.org>
9029
9030         * config/srclist.txt (argp-namefrob.h): sync lost.
9031
9032 2006-01-24  Jim Meyering  <jim@meyering.net>
9033
9034         * modules/openat (Files): Add lib/intprops.h.
9035         From Mark D. Baushke.
9036
9037 2006-01-24  Jim Meyering  <jim@meyering.net>
9038
9039         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9040         Reported by Mark D. Baushke.
9041
9042 2006-01-24  Jim Meyering  <jim@meyering.net>
9043
9044         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9045
9046 2006-01-24  Bruno Haible  <bruno@clisp.org>
9047
9048         * modules/strnlen (Maintainer): Change from glibc to all.
9049
9050 2006-01-24  Bruno Haible  <bruno@clisp.org>
9051
9052         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9053         Patch by Paul Eggert.
9054
9055 2006-01-24  Bruno Haible  <bruno@clisp.org>
9056
9057         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9058         already has it.
9059         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9060         2005-11-26.
9061
9062         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9063         'signed char' to avoid problems with the built-in _Bool type.
9064         Reported by Paul Eggert on 2005-11-26.
9065
9066 2006-01-24  Bruno Haible  <bruno@clisp.org>
9067
9068         * gnulib-tool (func_import): Avoid constructing complicated sed
9069         expressions inside backquote.
9070         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9071
9072 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9073
9074         These changes imported from libc.
9075         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9076         test and two separate function calls.
9077         * lib/strndup.c (__strndup): Add libc_hidden_def.
9078
9079 2006-01-23  Simon Josefsson  <jas@extundo.com>
9080
9081         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9082         Remove the test_*_SOURCES variable: automake infers it by default.
9083         * modules/tls-tests: Likewise.
9084
9085 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9086
9087         Work around porting bugs reported by Dieter in
9088         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9089         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9090         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9091         Include "getopt.h" first, to check interface.
9092         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9093         !HAVE_DECL_GETENV.
9094         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9095         (__strndup): Revert to K&R-style function dfns, the glibc style.
9096         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9097         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9098         Include strnlen.h first, to get prototype properly.
9099         (strnlen): Renamed from __strnlen.
9100         Remove weak alias.
9101
9102 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9103
9104         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9105
9106 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9107
9108         * config/srclist.txt: Adjust to reflect glibc reorganization.
9109         This affects only comments.
9110
9111 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9112
9113          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9114          Reported by Bruce Korb <bkorb@gnu.org>.
9115
9116 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9117
9118         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9119         to pacify gcc -Wswitch-default.
9120
9121 2006-01-22  Bruno Haible  <bruno@clisp.org>
9122
9123         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9124         temporary buffer for sprintf, take into account the precision also
9125         for 'd', 'i', 'u', 'o', 'x', 'X'.
9126
9127 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9128
9129         * modules/argp-tests: New module
9130         * tests/test-argp.c: New file
9131         * tests/test-argp-2.sh: New file
9132
9133 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9134
9135         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9136         (__argp_base_name): Removed
9137         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9138         typo.
9139         (__argp_base_name): Provide macro definition or extern declaration
9140         depending on the configuration
9141
9142 2006-01-20  Simon Josefsson  <jas@extundo.com>
9143
9144         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9145
9146 2006-01-20  Simon Josefsson  <jas@extundo.com>
9147
9148         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9149
9150 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9151
9152         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9153         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9154         Suggested by Bruno Haible.
9155
9156 2006-01-20  Karl Berry  <karl@gnu.org>
9157
9158         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9159         until changes propagate, I guess.
9160
9161 2006-01-19  Simon Josefsson  <jas@extundo.com>
9162
9163         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9164
9165 2006-01-19  Simon Josefsson  <jas@extundo.com>
9166
9167         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9168
9169 2006-01-19  Simon Josefsson  <jas@extundo.com>
9170
9171         * gnulib-tool: Set check_PROGRAMS.
9172
9173         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9174         modules/des-tests, modules/gc-arcfour-tests,
9175         modules/gc-arctwo-tests, modules/gc-des-tests,
9176         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9177         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9178         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9179         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9180         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9181         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9182         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9183         test_*_SOURCES.
9184
9185 2006-01-18  Simon Josefsson  <jas@extundo.com>
9186
9187         * modules/socklen (Depends-on): Depend on sys_socket.
9188
9189 2006-01-18  Simon Josefsson  <jas@extundo.com>
9190
9191         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9192         modules/des-tests, modules/gc-arcfour-tests,
9193         modules/gc-arctwo-tests, modules/gc-des-tests,
9194         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9195         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9196         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9197         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9198         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9199         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9200         $(EXEEXT) to automake TESTS variable, for mingw32.
9201
9202 2006-01-17  Simon Josefsson  <jas@extundo.com>
9203
9204         * modules/socklen (Include): Need sys/socket.h.
9205
9206 2006-01-17  Bruno Haible  <bruno@clisp.org>
9207
9208         * modules/ssize_t (Include): Add <sys/types.h>.
9209
9210 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9211
9212         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9213         it's not portable and it doesn't work with cross-compiles.
9214         Problem reported by Bruno Haible.  Fix missing-$ typo in
9215         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9216         -zignore from being used with Sun's C compiler.
9217
9218 2006-01-12  Simon Josefsson  <jas@extundo.com>
9219
9220         * lib/base64.c: Fix warning, reported by Bruno Haible
9221         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9222
9223 2006-01-12  Bruno Haible  <bruno@clisp.org>
9224
9225         * modules/ldd: New file.
9226         * build-aux/ldd.sh.in: New file.
9227         * MODULES.html.sh (Support for building libraries and executables): Add
9228         ldd.
9229
9230 2006-01-12  Bruno Haible  <bruno@clisp.org>
9231
9232         * m4/ldd.m4: New file.
9233
9234 2006-01-12  Bruno Haible  <bruno@clisp.org>
9235
9236         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9237         endless loop while replacing $auxdir with build-aux.
9238
9239 2006-01-11  Simon Josefsson  <jas@extundo.com>
9240
9241         * lib/stdint_.h (SIZE_MAX): Add missing (.
9242
9243 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9244
9245         Sync from coreutils.
9246         * lib/md5.c: Fix commentary typos.
9247         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9248         * lib/md5.h (__attribute__): Remove; unused.
9249         * lib/sha1.c: Fix commentary to match md5 better.
9250         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9251         so that we don't need to worry about alignment.  All uses changed.
9252         This merges the 2005-10-28 md5 change into sha1.
9253
9254 2006-01-11  Jim Meyering  <jim@meyering.net>
9255
9256         Sync from coreutils.
9257         * lib/md5.c (OP): Fix spacing.
9258
9259 2006-01-11  Bruno Haible  <bruno@clisp.org>
9260
9261         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9262         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9263         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9264
9265 2006-01-11  Bruno Haible  <bruno@clisp.org>
9266
9267         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9268         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9269         the "early" section as well.
9270
9271 2006-01-11  Bruno Haible  <bruno@clisp.org>
9272
9273         Avoid "ar: no archive members specified" error on MacOS X.
9274         * gnulib-tool (func_modules_add_dummy): New function.
9275         (func_import, func_create_testdir): Invoke it.
9276
9277 2006-01-11  Bruno Haible  <bruno@clisp.org>
9278
9279         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9280         with $auxdir in AC_CONFIG_FILES statements.
9281
9282 2006-01-11  Bruno Haible  <bruno@clisp.org>
9283
9284         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9285         Initialize also noinst_HEADERS to empty.
9286
9287 2006-01-11  Bruno Haible  <bruno@clisp.org>
9288
9289         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9290         variables.
9291         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9292         autoreconf.
9293
9294 2006-01-11  Bruno Haible  <bruno@clisp.org>
9295
9296         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9297         overridable by the user.
9298         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9299
9300 2006-01-10  Simon Josefsson  <jas@extundo.com>
9301
9302         * modules/sys_socket: New file.
9303
9304 2006-01-10  Simon Josefsson  <jas@extundo.com>
9305
9306         * m4/sys_socket_h.m4: New file.
9307
9308 2006-01-10  Simon Josefsson  <jas@extundo.com>
9309
9310         * lib/socket_.h: New file.
9311
9312 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9313
9314         * modules/readutmp (Maintainer): Add myself.
9315
9316 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9317
9318         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9319         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9320         People who are still concerned with buggy memcmp implementations
9321         can invoke gl_FUNC_MEMCMP themselves.
9322
9323 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9324
9325         * lib/regex_internal.h (BITSET_WORD_BITS):
9326         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9327         preprocessor mishandles large unsigned values as if they were signed.
9328         Problem reported by Claudio Fontana in
9329         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9330
9331 2006-01-10  Jim Meyering  <jim@meyering.net>
9332
9333         Avoid the double-free (first in fts_read, second in fts_close) that
9334         would occur when an `active' directory is made inaccessible (e.g.,
9335         via chmod a-x) during a traversal.
9336         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9337         before returning.  Reproduce this failure by
9338         mkdir -p a/b; cd a; chmod a-x . b
9339         Reported by Stavros Passas.
9340
9341         Sync from coreutils.
9342         * lib/sha1.c: Tweak grammar in a comment.
9343
9344 2006-01-10  Jim Meyering  <jim@meyering.net>
9345
9346         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9347         Patch by Joerg Sonnenberger.
9348
9349 2006-01-10  Bruno Haible  <bruno@clisp.org>
9350
9351         * modules/readutmp: Depend on module free.
9352         * modules/strtok_r: Depend on module restrict.
9353
9354 2006-01-10  Bruno Haible  <bruno@clisp.org>
9355
9356         * modules/gettext (configure.ac): Add an invocation of
9357         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9358
9359 2006-01-10  Bruno Haible  <bruno@clisp.org>
9360
9361         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9362         Reported by Werner Lemberg <wl@gnu.org>.
9363
9364 2006-01-10  Bruno Haible  <bruno@clisp.org>
9365
9366         * lib/localcharset.c: Update from GNU gettext.
9367
9368 2006-01-10  Bruno Haible  <bruno@clisp.org>
9369
9370         * lib/argp.h (__const): Remove macro. Use const instead.
9371         * lib/argp-fmtstream.h (__const): Likewise.
9372         * lib/glob_.h (__const): Remove macro.
9373         * lib/glob-libc.h: Use const instead of __const.
9374
9375 2006-01-10  Bruno Haible  <bruno@clisp.org>
9376
9377         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9378         variable.
9379         Needed to avoid an automake error regarding the 'gettext' module.
9380
9381 2006-01-09  Simon Josefsson  <jas@extundo.com>
9382
9383         * modules/inet_ntop (Depends-on): Add restrict.
9384
9385 2006-01-09  Simon Josefsson  <jas@extundo.com>
9386
9387         * modules/gc-rijndael-tests (License): Put under LGPL.
9388
9389         * modules/gc-des-tests (License): Likewise.
9390
9391         * modules/gc-arcfour-tests (License): Likewise.
9392
9393         * modules/gc-arctwo-tests (License): Likewise.
9394
9395         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9396
9397         * modules/gc-hmac-sha1-tests (Files): Likewise.
9398
9399         * modules/gc-hmac-md5-tests (License): Likewise.
9400
9401         * modules/gc-sha1-tests (License): Likewise.
9402
9403         * modules/gc-md5-tests (License): Likewise.
9404
9405         * modules/gc-md4-tests (License): Likewise.
9406
9407         * modules/gc-md2-tests (License): Likewise.
9408
9409         * modules/gc-tests (License): Likewise.
9410
9411         * modules/des-tests (License): Likewise.
9412
9413         * modules/md4-tests (License): Likewise.
9414
9415         * modules/md2-tests (License): Likewise.
9416
9417 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9418
9419         Sync from coreutils:
9420
9421         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9422         * modules/lib-ignore: New file.
9423         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9424         chdir-safer.m4, lchmod.m4.
9425         * modules/openat: Add mkdirat.c, openat-priv.h.
9426
9427 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9428
9429         Sync from coreutils.
9430         * m4/lib-ignore.m4: New file.
9431         * m4/lchmod.m4: New file.
9432
9433 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9434
9435         Sync from coreutils.
9436         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9437         for write access: POSIX says that must fail.
9438         * lib/fts.c (diropen): Likewise.
9439         * lib/save-cwd.c (save_cwd): Likewise.
9440         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9441         well, for minor improvements on hosts that lack O_DIRECTORY.
9442         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9443         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9444         Fall back on chown if open failed with EACCES.
9445
9446         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9447         Report an error at compile-time if only a 1-second nominal clock
9448         resolution is found.
9449
9450         * lib/lchmod.h: New file.
9451         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9452         (make_dir_parents): Use lchown rather than chown, and
9453         lchmod rather than chmod.
9454
9455         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9456         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9457         "proc" reported by n0dalus.
9458
9459         * lib/mountlist.c: Include <limits.h>.
9460         (dev_from_mount_options)
9461         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9462         New function.  It no longer assumes "dev=" has the System V meaning
9463         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9464         (read_file_system_list)
9465         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9466         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9467         dev= in that case.
9468
9469         * lib/posixtm.h (PDS_PRE_2000): New macro.
9470         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9471         allow_century.  All usages changed.  Reject dates outside the range
9472         1969-1999 if PDS_PRE_2000 is used.
9473
9474 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9475
9476         Sync from coreutils.
9477         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9478         (Time of day items): Mention the possibility of leap seconds.
9479         Problem reported by Dr. David Alan Gilbert.
9480
9481 2006-01-09  Jim Meyering  <jim@meyering.net>
9482
9483         Sync from coreutils.
9484
9485         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9486
9487         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9488
9489         * lib/modechange.c (mode_compile): Reject an invalid mode string
9490         that starts with an octal digit.  From Andreas Gruenbacher.
9491
9492         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9493         and dup to open_safer and dup_safer, respectively.
9494         (openat_permissive): Fix typo in comment.
9495
9496         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9497         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9498         (_): Remove; no longer needed.
9499         (openat): Renamed from rpl_openat; no need for rpl_openat
9500         since openat.h renames openat for us.
9501         Replace most of the body with a call to openat_permissive,
9502         to avoid duplicate code.
9503         Port to (probably hypothetical) environments were mode_t is
9504         wider than int.
9505         (openat_permissive): Require mode arg, so that we can check
9506         types better.  Put it just after flags.  Change cwd failure
9507         indicator from pointer-to-bool to pointer-to-errno-value.
9508         All callers changed.
9509         Invoke openat_save_fail and/or openat_restore_fail if
9510         cwd_errno is null, so that openat can call us.
9511         (openat_permissive, fdopendir, fstatat, unlinkat):
9512         Simplify errno handling to avoid some duplicate code,
9513         as it's OK to set errno on success.
9514         * lib/openat.h: Revamp code so that function macros depend on
9515         __OPENAT_PREFIX only, not also on AT_FDCWD.
9516         (openat_ro): Remove.  Caller changed to use openat_permissive.
9517         (openat_permissive): Now a macro, if not a function.
9518         (openat_restore_fail, openat_save_fail): Now always functions,
9519         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9520
9521         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9522         and openat.c.
9523         * lib/mkdirat.c: Include openat-priv.h.
9524         Remove definitions of macros defined therein.
9525         * lib/openat.c: Likewise.
9526
9527         * lib/mkdirat.c (mkdirat): New file and function.
9528         * lib/openat.h (mkdirat): Declare.
9529
9530         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9531
9532         * lib/openat.h (openat_permissive): Declare.
9533         (openat_ro): Define.
9534
9535         * lib/openat.c (EXPECTED_ERRNO): New macro.
9536         (openat_permissive): New function -- used in remove.c rewrite.
9537         (all functions): Set errno just before returning, only if there
9538         was an actual failure.
9539         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9540
9541         Emulate openat-family functions using Linux's procfs, if possible.
9542         Idea and some code based on Ulrich Drepper's glibc changes.
9543
9544         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9545         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9546         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9547         before falling back on save_cwd and restore_cwd.
9548         (fdopendir, fstatat, unlinkat): Likewise.
9549
9550         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9551         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9552
9553         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9554         as second argument to va_arg.  Otherwise, some versions of gcc
9555         warn that `if this code is reached, the program will abort'.
9556
9557 2006-01-09  Jim Meyering  <jim@meyering.net>
9558
9559         Sync from coreutils.
9560         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9561         Require openat-priv.h.
9562
9563 2006-01-09  Bruno Haible  <bruno@clisp.org>
9564
9565         * modules/strnlen (Include): Use strnlen.h.
9566
9567 2006-01-09  Bruno Haible  <bruno@clisp.org>
9568
9569         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9570
9571 2006-01-09  Bruno Haible  <bruno@clisp.org>
9572
9573         * lib/sysexit_.h (EX_OK): New macro.
9574         Suggested by Martin Lambers <marlam@marlam.de>.
9575
9576 2006-01-09  Bruno Haible  <bruno@clisp.org>
9577
9578         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9579         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9580
9581 2006-01-09  Bruno Haible  <bruno@clisp.org>
9582
9583         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9584         numbers.
9585
9586 2006-01-09  Bruno Haible  <bruno@clisp.org>
9587
9588         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9589         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9590         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9591         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9592
9593 2006-01-09  Bruno Haible  <bruno@clisp.org>
9594
9595         * build-aux/javacomp.sh.in: New file, moved from lib/.
9596         * modules/javacomp-script (Files): Update.
9597         (configure.ac): Add AC_CONFIG_FILES invocation.
9598         (EXTRA_DIST): Remove variable.
9599
9600         * build-aux/javaexec.sh.in: New file, moved from lib/.
9601         * modules/javaexec (Files): Update.
9602         (configure.ac): Add AC_CONFIG_FILES invocation.
9603         (EXTRA_DIST): Remove javaexec.sh.in.
9604
9605         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9606         * modules/csharpcomp-script (Files): Update.
9607         (configure.ac): Add AC_CONFIG_FILES invocation.
9608         (EXTRA_DIST): Remove variable.
9609
9610         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9611         * modules/csharpexec (Files): Update.
9612         (configure.ac): Add AC_CONFIG_FILES invocation.
9613         (EXTRA_DIST): Remove csharpexec.sh.in.
9614
9615 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9616
9617         Sync from coreutils.
9618
9619         Add POSIX ACL support
9620         * lib/acl.h (copy_acl, set_acl): Add declarations.
9621         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9622         systems other than Linux.
9623         (chmod_or_fchmod): New function: use fchmod when possible,
9624         and chmod otherwise.
9625         (file_has_acl): Add a POSIX ACL implementation, with a
9626         Linux-specific subcase.
9627         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9628         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9629         acls are unsupported.
9630         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9631         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9632         are unsupported.
9633
9634 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9635
9636         Sync from coreutils.
9637         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9638
9639 2006-01-07  Bruno Haible  <bruno@clisp.org>
9640
9641         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9642         gl_EARLY.
9643
9644 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9645
9646         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9647         Problem reported for Mingw by Mark Junker.
9648
9649 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9650
9651         * README: Gnulib normally doesn't generate a tarball.
9652
9653 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9654
9655         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9656         long int, not int, for nanosecond counts, so that people who are
9657         used to POSIX struct timespec won't be surprised.  Reported by Jim
9658         Meyering.
9659
9660 2005-12-28  Bruno Haible  <bruno@clisp.org>
9661
9662         * build-aux/config.rpath: Update from GNU gettext.
9663
9664 2005-12-16  Jim Meyering  <jim@meyering.net>
9665
9666         * modules/fprintftime: New module.
9667         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9668
9669 2005-12-16  Jim Meyering  <jim@meyering.net>
9670
9671         * m4/fprintftime.m4: New file.
9672
9673 2005-12-16  Jim Meyering  <jim@meyering.net>
9674
9675         * lib/fprintftime.c, lib/fprintftime.h: New files.
9676
9677 2005-12-15  Simon Josefsson  <jas@extundo.com>
9678
9679         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9680         new m4/socklen.m4.
9681
9682 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9683
9684         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9685         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9686
9687 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9688
9689         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9690         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9691         struct uparams is valid. Fall back to the default values if it is
9692         not.
9693
9694 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9695
9696         * modules/argp (Files): Add argp-pin.c
9697         (Depends-on): dirname
9698         (lib_SOURCES): Add argp-pin.c
9699
9700 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9701
9702         * m4/argp.m4:  Check if program_invocation_name and
9703         program_invocation_short_name are declared and define appropriate
9704         macros if they are not.
9705
9706 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9707
9708         * lib/argp-help.c (__argp_base_name): New function
9709         (__argp_short_program_name): Rewrite using __argp_base_name
9710         * lib/argp-namefrob.h: Define program_invocation_name and
9711         program_invocation_short_name if requested
9712         (__argp_base_name): Add prototype
9713         * lib/argp-parse.c (argp_def): Use gettext wrappers
9714         (argp_default_parser): Use __argp_base_name
9715         * lib/argp-pin.c: New file. Defines program_invocation_name and
9716         program_invocation_short_name on systems that lack them.
9717
9718 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9719
9720         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9721         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9722         porting problem reported by Georg Schwarz in
9723         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9724
9725 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9726
9727         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9728         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9729         porting problem reported by Georg Schwarz in
9730         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9731
9732 2005-12-05  Bruno Haible  <bruno@clisp.org>
9733
9734         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9735         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9736         Reported by Mark Junker <mjscod@gmx.de>.
9737
9738 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9739
9740         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9741         Use implementation from Albert Chin, with some
9742         comments/corrections by Stepan Kasal and myself.
9743
9744 2005-12-02  Bruno Haible  <bruno@clisp.org>
9745
9746         * gnulib-tool (func_import): Accept GPLed build tool modules when
9747         --lgpl is given.
9748         * modules/csharpcomp-script: New file.
9749         * modules/csharpcomp: Depend on it.
9750         * modules/javacomp-script: New file.
9751         * modules/javacomp: Depend on it.
9752         Suggested by Simon Josefsson.
9753
9754 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9755
9756         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9757         statement, to work around an HP-UX 10.20 compiler bug reported by
9758         Peter O'Gorman.
9759
9760 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9761
9762         * modules/savedir (Depends-on): Add openat.
9763
9764 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9765
9766         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9767         (uintmax_t) [defined uintmax_t]: Do not declare.
9768         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9769         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9770         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9771         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9772         sake of portability to weird hosts that C allows (though we don't
9773         know of any practical examples).
9774
9775         * lib/savedir.h (fdsavedir): New decl.
9776         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9777         contains most of the former guts of savedir.
9778         (savedir): Use savedirstream.
9779         Include "openat.h".
9780
9781 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9782
9783         * modules/obstack (Files): Add m4/ulonglong.m4.
9784         Problem reported by Davide Angelocola.
9785
9786 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9787
9788         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9789         coreutils no longer futzes with rounding modes.
9790
9791 2005-11-14  Jim Meyering  <jim@meyering.net>
9792
9793         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9794         replacement of mkstemp.
9795
9796 2005-11-10  Simon Josefsson  <jas@extundo.com>
9797
9798         * lib/readline.c: Remove EOL.
9799
9800 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9801
9802         * modules/gethrxtime (Depends-on): Add gettime.
9803
9804 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9805
9806         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9807         or gettimeofday; no longer needed.
9808
9809 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9810
9811         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9812         time business.
9813         (gethrxtime) [! (HAVE_NANOUPTIME
9814         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9815         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9816         our own approximation.
9817
9818 2005-11-08  Eric Blake  <ebb9@byu.net>
9819
9820         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9821
9822 2005-11-08  Eric Blake  <ebb9@byu.net>
9823
9824         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9825
9826 2005-11-04  Bruno Haible  <bruno@clisp.org>
9827
9828         * gnulib-tool: Implement --update mode.
9829
9830 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9831
9832         Fix porting problem reported by Theodoros V. Kalamatianos.
9833         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9834         Don't assume that futimes failing means we must fail.
9835
9836 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9837
9838         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9839         variables to suggest the intended function of the PATH_MAX check.
9840
9841 2005-10-30  Kean Johnston  <jkj@sco.com>
9842
9843         Trivial changes to support SCO systems.
9844         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9845         as PATH_MAX.
9846         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9847         where __ptr is null when no I/O is pending.
9848
9849 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9850
9851         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9852         leave errno alone.  Problem reported by Dmitry V. Levin.
9853
9854 2005-10-28  Simon Josefsson  <jas@extundo.com>
9855
9856         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9857         Test more.
9858
9859         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9860
9861         * modules/md2, modules/md2-tests: New files.
9862
9863 2005-10-28  Simon Josefsson  <jas@extundo.com>
9864
9865         * m4/inet_ntop.m4: More tests.
9866
9867         * m4/gc-md2.m4, md2.m4: New file.
9868
9869 2005-10-28  Simon Josefsson  <jas@extundo.com>
9870
9871         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9872         "restrict" keywords, as per POSIX.  Protect the function
9873         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9874         Don't use K&R prototypes.  Check the sprintf return values.
9875         Re-define EAFNOSUPPORT if not present.  Indent.
9876
9877         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9878         suggested by Bruno Haible <bruno@clisp.org>.
9879
9880         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9881
9882         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9883
9884         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9885         libgcrypt).
9886
9887         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9888
9889         * lib/md2.h, lib/md2.c: New files.
9890
9891 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9892
9893         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9894         errno alone.  Problem reported by Frederic Jolliton.
9895
9896 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9897
9898         * modules/verify (License): Change from GPL to LGPL.  This is a
9899         tiny module and there are apparently near-equivalents that are
9900         under the BSD license.
9901
9902 2005-10-24  Simon Josefsson  <jas@extundo.com>
9903
9904         * modules/sha1: Relicense to LGPL.
9905
9906 2005-10-24  Simon Josefsson  <jas@extundo.com>
9907
9908         * lib/md4.h: Shrink buffer size, now that we changed the type.
9909
9910 2005-10-23  Simon Josefsson  <jas@extundo.com>
9911
9912         * gnulib-tool (func_import): Fix --tests-base.
9913
9914 2005-10-22  Simon Josefsson  <jas@extundo.com>
9915
9916         * modules/arcfour (Depends-on): Need stdint.
9917
9918 2005-10-22  Simon Josefsson  <jas@extundo.com>
9919
9920         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
9921         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
9922
9923 2005-10-22  Simon Josefsson  <jas@extundo.com>
9924
9925         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
9926         suggested by Bruno Haible <bruno@clisp.org>.
9927
9928 2005-10-22  Simon Josefsson  <jas@extundo.com>
9929
9930         * lib/crc.h: Include stddef.h, for size_t.
9931
9932 2005-10-22  Simon Josefsson  <jas@extundo.com>
9933
9934         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
9935         arcfour_context struct (simplify test vector testing in GNU
9936         Shishi).
9937
9938 2005-10-21  Simon Josefsson  <jas@extundo.com>
9939
9940         * modules/des, modules/des-tests: New files.
9941
9942         * modules/gc-des, modules/gc-des-tests: New files.
9943
9944         * tests/test-des.c, tests/test-gc-des.c: New file.
9945
9946 2005-10-21  Simon Josefsson  <jas@extundo.com>
9947
9948         * modules/arctwo, modules/arctwo-tests: New files.
9949
9950         * tests/test-arctwo.c: New file.
9951
9952         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
9953
9954         * tests/test-gc-arctwo.c: New file.
9955
9956 2005-10-21  Simon Josefsson  <jas@extundo.com>
9957
9958         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
9959         Bruno Haible <bruno@clisp.org>.
9960
9961         * m4/gc-des.m4: New file.
9962
9963 2005-10-21  Simon Josefsson  <jas@extundo.com>
9964
9965         * m4/arctwo.m4: New file.
9966
9967         * m4/gc-arctwo.m4: New file.
9968
9969 2005-10-21  Simon Josefsson  <jas@extundo.com>
9970
9971         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
9972         block.
9973
9974 2005-10-21  Simon Josefsson  <jas@extundo.com>
9975
9976         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
9977         <bruno@clisp.org>.
9978
9979         * lib/hmac-sha1.c (hmac_sha1): Likewise.
9980
9981         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
9982         Bruno Haible <bruno@clisp.org>.
9983
9984         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
9985         <bruno@clisp.org>.
9986
9987 2005-10-21  Simon Josefsson  <jas@extundo.com>
9988
9989         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
9990
9991 2005-10-21  Simon Josefsson  <jas@extundo.com>
9992
9993         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
9994
9995 2005-10-21  Simon Josefsson  <jas@extundo.com>
9996
9997         * lib/des.h, lib/des.c: New files.
9998
9999         * lib/gc-gnulib.c: Support DES.c
10000
10001 2005-10-21  Simon Josefsson  <jas@extundo.com>
10002
10003         * lib/arctwo.h, lib/arctwo.c: New files.
10004
10005         * lib/gc-gnulib.c: Support ARCTWO.
10006
10007 2005-10-21  Simon Josefsson  <jas@extundo.com>
10008
10009         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10010         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10011
10012 2005-10-21  Simon Josefsson  <jas@extundo.com>
10013
10014         * gnulib-tool (func_import, func_create_testdir): Define automake
10015         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10016         Makefile.am snippet),
10017         suggested by Bruno Haible <bruno@clisp.org>.
10018
10019         * modules/gc (Makefile.am): Use it.
10020
10021 2005-10-21  Bruno Haible  <bruno@clisp.org>
10022
10023         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10024         patch.
10025
10026 2005-10-19  Simon Josefsson  <jas@extundo.com>
10027
10028         * tests/test-gc-rijndael.c: New file.
10029
10030         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10031
10032 2005-10-19  Simon Josefsson  <jas@extundo.com>
10033
10034         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10035         interface too.
10036
10037 2005-10-19  Simon Josefsson  <jas@extundo.com>
10038
10039         * tests/test-gc-arcfour.c: New file.
10040
10041         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10042
10043 2005-10-19  Simon Josefsson  <jas@extundo.com>
10044
10045         * modules/gc-md4, modules/gc-md4-tests: New file.
10046
10047         * tests/test-gc-md4.c: New file.
10048
10049 2005-10-19  Simon Josefsson  <jas@extundo.com>
10050
10051         * m4/gc-md4.m4: New file.
10052
10053 2005-10-19  Simon Josefsson  <jas@extundo.com>
10054
10055         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10056         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10057         <kasal@ucw.cz>.
10058
10059 2005-10-19  Simon Josefsson  <jas@extundo.com>
10060
10061         * m4/gc-arcfour.m4: New file.
10062
10063         * m4/gc-rijndael.m4: New file.
10064
10065 2005-10-19  Simon Josefsson  <jas@extundo.com>
10066
10067         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10068
10069 2005-10-19  Simon Josefsson  <jas@extundo.com>
10070
10071         * lib/gc-gnulib.c: Support ARCFOUR.
10072
10073 2005-10-19  Simon Josefsson  <jas@extundo.com>
10074
10075         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10076         support.
10077
10078         * lib/gc.h: Add ECB enum type.
10079
10080         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10081
10082 2005-10-18  Simon Josefsson  <jas@extundo.com>
10083
10084         * tests/test-md5.c: New file.
10085
10086         * modules/md5-tests: New file.
10087
10088 2005-10-18  Simon Josefsson  <jas@extundo.com>
10089
10090         * tests/test-md4.c: New file.
10091
10092         * modules/md4, modules/md4-tests: New files.
10093
10094 2005-10-18  Simon Josefsson  <jas@extundo.com>
10095
10096         * m4/md4.m4: New file.
10097
10098 2005-10-18  Simon Josefsson  <jas@extundo.com>
10099
10100         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10101
10102 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10103
10104         * gnulib-tool (func_create_testdir): Omit the second check whether
10105         BUILT_SOURCES in nonempty.
10106
10107 2005-10-17  Simon Josefsson  <jas@extundo.com>
10108
10109         * tests/test-rijndael.c: New file.
10110
10111 2005-10-17  Simon Josefsson  <jas@extundo.com>
10112
10113         * modules/sha1: Depend on stdint instead of md5.
10114
10115         * modules/md5: Depend on stdint, remove uint32_t.
10116
10117 2005-10-17  Simon Josefsson  <jas@extundo.com>
10118
10119         * modules/gc-sha1-tests: New file.
10120
10121         * tests/test-gc-sha1.c: New file.
10122
10123 2005-10-17  Simon Josefsson  <jas@extundo.com>
10124
10125         * m4/md5.m4: Remove call to uint32_t.m4.
10126
10127 2005-10-17  Simon Josefsson  <jas@extundo.com>
10128
10129         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10130
10131         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10132         md5.h.
10133
10134         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10135
10136         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10137
10138 2005-10-17  Simon Josefsson  <jas@extundo.com>
10139
10140         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10141
10142 2005-10-17  Simon Josefsson  <jas@extundo.com>
10143
10144         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10145
10146 2005-10-17  Simon Josefsson  <jas@extundo.com>
10147
10148         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10149
10150         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10151
10152 2005-10-17  Bruno Haible  <bruno@clisp.org>
10153
10154         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10155         that it can also be used in a test.
10156
10157 2005-10-16  Bruno Haible  <bruno@clisp.org>
10158
10159         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10160         TESTS_ENVIRONMENT, so that individual tests can augment it.
10161
10162         * gnulib-tool (func_create_testdir): Use an intermediate target for
10163         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10164         macros, like $(ALLOCA_H), which cannot be passed through the command
10165         line.
10166
10167 2005-10-15  Simon Josefsson  <jas@extundo.com>
10168
10169         * modules/rijndael-tests: New file.
10170
10171         * modules/rijndael: New file.
10172
10173 2005-10-15  Simon Josefsson  <jas@extundo.com>
10174
10175         * m4/rijndael.m4: New file.
10176
10177 2005-10-15  Simon Josefsson  <jas@extundo.com>
10178
10179         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10180
10181         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10182
10183 2005-10-14  Simon Josefsson  <jas@extundo.com>
10184
10185         * tests/test-arcfour.c: New file.
10186
10187         * modules/arcfour, modules/arcfour-tests: New files.
10188
10189 2005-10-14  Simon Josefsson  <jas@extundo.com>
10190
10191         * m4/arcfour.m4: New file.
10192
10193 2005-10-14  Simon Josefsson  <jas@extundo.com>
10194
10195         * lib/arcfour.h, lib/arcfour.c: New files.
10196
10197 2005-10-14  Roland McGrath  <roland@redhat.com>
10198
10199         Import from libc.  [BZ #1331]
10200         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10201         macro argument.
10202         Reported by Matej Vela <vela@debian.org>.
10203
10204 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10205
10206         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10207         include <wchar.h>; no longer needed.
10208
10209 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10210
10211         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10212
10213 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10214         and  Ulrich Drepper  <drepper@redhat.com>
10215
10216         Import from libc.
10217         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10218         instead of inline stream orientation test and two separate
10219         function calls.  Pay no attention to USE_IN_LIBIO.
10220
10221 2005-10-13  Simon Josefsson  <jas@extundo.com>
10222
10223         * modules/gc-hmac-md5-tests: New file.
10224
10225         * tests/test-gc-hmac-sha1.c: New file.
10226
10227         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10228
10229         * modules/gc-hmac-md5-tests: New file.
10230
10231         * tests/test-gc-md5.c: New file.
10232
10233         * modules/gc-md5-tests: New file.
10234
10235 2005-10-13  Simon Josefsson  <jas@extundo.com>
10236
10237         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10238         Move memory allocation outside of loop.
10239
10240 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10241
10242         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10243         intermediate directory is in a read-only file system.  Problem
10244         reported by Eric Blake.
10245
10246 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10247
10248         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10249
10250 2005-10-12  Simon Josefsson  <jas@extundo.com>
10251
10252         * tests/test-hmac-sha1.c: New file.
10253
10254         * modules/hmac-sha1-tests: New file.
10255
10256         * modules/hmac-sha1: New file.
10257
10258 2005-10-12  Simon Josefsson  <jas@extundo.com>
10259
10260         * modules/gc-sha1: New file.
10261
10262 2005-10-12  Simon Josefsson  <jas@extundo.com>
10263
10264         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10265
10266         * tests/test-gc-pbkdf2-sha1.c: New file.
10267
10268 2005-10-12  Simon Josefsson  <jas@extundo.com>
10269
10270         * modules/gc-md5, modules/gc-hmac-md5: New files.
10271
10272         * modules/gc (Files): Remove md5, memxor and hmac files.
10273
10274 2005-10-12  Simon Josefsson  <jas@extundo.com>
10275
10276         * m4/gc-pbkdf2-sha1.m4: New file.
10277
10278         * m4/gc-hmac-sha1.m4: New file.
10279
10280         * m4/gc-sha1: New file.
10281
10282         * m4/hmac-sha1.m4: New file.
10283
10284 2005-10-12  Simon Josefsson  <jas@extundo.com>
10285
10286         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10287
10288         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10289
10290 2005-10-12  Simon Josefsson  <jas@extundo.com>
10291
10292         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10293         suggested by Bruno Haible <bruno@clisp.org>.
10294
10295 2005-10-12  Simon Josefsson  <jas@extundo.com>
10296
10297         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10298
10299 2005-10-12  Simon Josefsson  <jas@extundo.com>
10300
10301         * lib/gc-pbkdf2-sha1.c: New file.
10302
10303         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10304
10305 2005-10-12  Simon Josefsson  <jas@extundo.com>
10306
10307         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10308
10309         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10310
10311 2005-10-12  Simon Josefsson  <jas@extundo.com>
10312
10313         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10314         GC_USE_HMAC_MD5, respectively.
10315
10316         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10317         (gc_md5): Fix typo.
10318
10319         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10320
10321         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10322
10323         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10324
10325 2005-10-12  Bruno Haible  <bruno@clisp.org>
10326
10327         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10328         Reported by Stepan Kasal <kasal@ucw.cz>.
10329
10330 2005-10-11  Simon Josefsson  <jas@extundo.com>
10331
10332         * tests/test-crc.c: New file.
10333
10334         * modules/crc, modules/crc-tests: New files.
10335
10336 2005-10-11  Simon Josefsson  <jas@extundo.com>
10337
10338         * m4/crc.m4: New file.
10339
10340 2005-10-11  Simon Josefsson  <jas@extundo.com>
10341
10342         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10343
10344         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10345
10346         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10347
10348 2005-10-11  Simon Josefsson  <jas@extundo.com>
10349
10350         * lib/crc.h, lib/crc.c: New files.
10351
10352         * lib/gc.h (gc_hash_buffer): Add doc.
10353
10354 2005-10-11  Bruno Haible  <bruno@clisp.org>
10355
10356         * modules/c-strcasestr: New file.
10357         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10358
10359 2005-10-11  Bruno Haible  <bruno@clisp.org>
10360
10361         * modules/c-strcase: New file.
10362         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10363
10364 2005-10-11  Bruno Haible  <bruno@clisp.org>
10365
10366         * lib/strcasecmp.c: Include limits.h.
10367         (strcasecmp): Avoid integer overflow on exotic platforms.
10368         * lib/strncasecmp.c: Include limits.h.
10369         (strncasecmp): Avoid integer overflow on exotic platforms.
10370         Reported by Paul Eggert.
10371
10372 2005-10-11  Bruno Haible  <bruno@clisp.org>
10373
10374         * lib/c-strcasestr.h: New file, from GNU gettext.
10375         * lib/c-strcasestr.c: New file, from GNU gettext.
10376
10377 2005-10-11  Bruno Haible  <bruno@clisp.org>
10378
10379         * lib/c-strcase.h: New file, from GNU gettext.
10380         * lib/c-strcasecmp.c: New file, from GNU gettext.
10381         * lib/c-strncasecmp.c: New file, from GNU gettext.
10382
10383 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10384
10385         * modules/mempcpy (License): GPL -> LGPL.
10386         * modules/strchrnul (License): Likewise.
10387         * modules/sysexits (License): Likewise.
10388
10389 2005-10-08  Simon Josefsson  <jas@extundo.com>
10390
10391         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10392
10393 2005-10-07  Simon Josefsson  <jas@extundo.com>
10394
10395         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10396
10397 2005-10-06  Simon Josefsson  <jas@extundo.com>
10398
10399         * tests/test-hmac-md5.c: New file.
10400
10401         * modules/hmac-md5-tests: New file.
10402
10403         * modules/hmac-md5: New file.
10404
10405 2005-10-06  Simon Josefsson  <jas@extundo.com>
10406
10407         * m4/hmac-md5.m4: New file.
10408
10409         * m4/memxor.m4: Require gl_C_RESTRICT.
10410
10411 2005-10-06  Simon Josefsson  <jas@extundo.com>
10412
10413         * lib/memxor.c (memxor): Avoid casts and warnings.
10414
10415 2005-10-06  Simon Josefsson  <jas@extundo.com>
10416
10417         * lib/hmac-md5.c: New file.
10418
10419         * lib/hmac.h: New file.
10420
10421 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10422
10423         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10424         promotes to int, not unsigned int, to catch the AIX 5.3
10425         compiler bug.
10426
10427 2005-10-05  Simon Josefsson  <jas@extundo.com>
10428
10429         * modules/memxor: New file.
10430
10431         * modules/iconv (Files): Move config.rpath to havelib, it is used
10432         there.
10433
10434         * modules/havelib (Files): Add config.rpath.
10435
10436 2005-10-05  Simon Josefsson  <jas@extundo.com>
10437
10438         * m4/memxor.m4: New file.
10439
10440 2005-10-05  Simon Josefsson  <jas@extundo.com>
10441
10442         * lib/memxor.c (memxor): Fix compiler error.
10443
10444         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10445         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10446
10447         * lib/memxor.h, lib/memxor.c: New files.
10448
10449         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10450         we assume all systems have it, suggested by Jim Meyering
10451         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10452         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10453         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10454         same reasons.
10455
10456 2005-10-05  Simon Josefsson  <jas@extundo.com>
10457
10458         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10459
10460 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10461
10462         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10463         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10464         needed, since the source code now assumes these .h files.
10465
10466 2005-10-05  Derek Price  <derek@ximbiot.com>
10467
10468         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10469
10470 2005-10-05  Bruno Haible  <bruno@clisp.org>
10471
10472         * modules/stdint (License): Change to LGPL.
10473
10474 2005-10-04  Simon Josefsson  <jas@extundo.com>
10475
10476         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10477         D. Baushke" <mdb@gnu.org>.
10478
10479 2005-10-04  Bruno Haible  <bruno@clisp.org>
10480
10481         * lib/verify.h (verify_true): Provide alternative definition for C++.
10482
10483 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10484
10485         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10486         (SSIZE_MAX): New macro, if not already defined.
10487         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10488         than 2 GiB.
10489
10490 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10491
10492         Sync from coreutils.
10493         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10494         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10495         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10496         ULLONG_MAX doesn't work with 2.7.2.1.
10497
10498 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10499
10500         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10501         From Ben Pfaff.
10502
10503         * modules/exclude (Depends-on): Depend on verify.
10504         * modules/strtoimax (Depends-on): Likewise.
10505         * modules/utimecmp (Depends-on): Likewise.
10506
10507 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10508
10509         * lib/exclude.c: Include verify.h.
10510         (verify): Remove.  All callers changed to use verify.h's version.
10511         * lib/strtoimax.c: Likewise.
10512         * lib/utimecmp.c: Likewis.e
10513
10514         Sync from coreutils.
10515         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10516         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10517         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10518         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10519         bother returning ENOSYS if settimeofday or stime fails; just let
10520         them return whatever errno they want to return.
10521         * lib/utimens.c: Include unistd.h, for dup2.
10522         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10523         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10524
10525 2005-10-02  Jim Meyering  <jim@meyering.net>
10526
10527         Sync from coreutils.
10528         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10529         from glibc-2.2.5 that fails for read-only files.
10530
10531 2005-10-02  Jim Meyering  <jim@meyering.net>
10532
10533         Sync from coreutils.
10534         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10535         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10536         `#if HAVE_CONFIG_H'.
10537         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10538         Remove AT_FDCWD test.
10539         Do not consume the fd unless successful.
10540         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10541         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10542         block, so that we don't even try to compile it if settimeofday is
10543         available.  This works around a compilation failure on OSF1 V5.1,
10544         due to stime requiring a `long int*' while tv_sec is `int'.
10545
10546 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10547
10548         Sync from coreutils.
10549         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10550         against `yes', rather than just testing for nonempty.
10551
10552 2005-10-01  Simon Josefsson  <jas@extundo.com>
10553
10554         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10555         and Darwin.
10556
10557         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10558         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10559         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10560         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10561         Check if struct addrinfo is declared.
10562
10563 2005-10-01  Simon Josefsson  <jas@extundo.com>
10564
10565         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10566         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10567         AI_* and EAI_* definitions.  Protect function declarations.
10568
10569 2005-10-01  Jim Meyering  <jim@meyering.net>
10570
10571         Sync from coreutils.
10572
10573         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10574         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10575         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10576         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10577         in the inet and nsl libraries.  Required on Solaris 5.7.
10578
10579 2005-10-01  Jim Meyering  <jim@meyering.net>
10580
10581         Sync from coreutils.
10582         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10583         in the inet and nsl libraries.  Required on Solaris 5.7.
10584
10585 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10586
10587         * lib/getdelim.c (getdelim): Remove unused variables.
10588
10589 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10590
10591         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10592         so that the code works even with ancient cpp.  Portability problem
10593         with GCC 2.7.2.1 reported by Thomas M.Ott.
10594
10595 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10596
10597         * modules/regex (Depends-on): Add strcase.
10598
10599         * modules/gethostname (Licence): Change from GPL to LGPL, since
10600         gethostname.c is a trivial implementation of a standard library
10601         function.
10602         * modules/poll (License): Change from GPL to LGPL, since it's
10603         derived from LGPL code.
10604
10605 2005-09-27  Jim Meyering  <jim@meyering.net>
10606
10607         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10608         HAVE_CONFIG_H.
10609
10610         * lib/intprops.h (signed_type_or_expr__): Define.
10611         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10612         for unsigned types.
10613
10614 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10615
10616         * lib/verify.h (verify_expr): Remove, replacing with:
10617         (verify_true): New macro that returns true instead of void.
10618         (verify_type__): Remove.
10619         (verify): Use verify_true rather than verify_type__.
10620
10621 2005-09-26  Bruno Haible  <bruno@clisp.org>
10622
10623         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10624         is necessary.
10625         (lib_SOURCES): Remove mbchar.c.
10626         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10627         (Files): Add m4/mbrtowc.m4.
10628         * modules/mbiter: Likewise.
10629         * modules/mbuiter: Likewise.
10630
10631 2005-09-26  Bruno Haible  <bruno@clisp.org>
10632
10633         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10634         compile mbchar.c if they are not both present.
10635         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10636         * m4/mbiter.m4 (gl_MBITER): Likewise.
10637         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10638         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10639         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10640
10641 2005-09-25  Jim Meyering  <jim@meyering.net>
10642
10643         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10644         also uses socklen_t.
10645
10646 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10647
10648         * lib/utimens.c (ENOSYS): Define if not already defined.
10649         (futimens): Support having a null PATH if the file descriptor
10650         is nonnegative.
10651
10652         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10653         Remove.
10654         (__attribute): Define to empty unless GCC 3.1 or later.
10655         This works around a core dump on OpenBSD 3.4, which has GCC
10656         2.95.3, which dumps core when given __attribute__(()).  It also
10657         simplifies other tests, since we really don't want to bother with
10658         worrying about which ancient version of GCC supported what.
10659         Original problem reported by Yoann Vandoorselaere, with part of
10660         the fix suggested by Derek Price.
10661
10662 2005-09-24  Jim Meyering  <jim@meyering.net>
10663
10664         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10665         so we can once again use a positive bitfield width of 1 -- now we
10666         don't have to explain why we were using a bitfield width of 2.
10667
10668 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10669
10670         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10671         and similarly for the other external symbols.  Problem reported
10672         by James Gallager.
10673
10674         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10675         bug reported by Jim Meyering.
10676
10677         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10678         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10679         not needed, since socklen is a prerequisite module.
10680
10681 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10682
10683         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10684         Problem reported by Eric Blake.
10685         (getaddrinfo): Initialize se so that it's not garbage.
10686         Redo internal storage allocation so that it doesn't make unportable
10687         assumptions about alignment.
10688         Fix a memory leak.
10689
10690         * lib/utimens.c (futimens): Use futimesat if available.
10691         Prefer it to futimes since it doesn't have the futimes bug.
10692
10693         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10694         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10695         Instead, declare a function that returns a pointer to an array,
10696         and use verify_type__ to declare the size of the array.
10697         Problem and germ of a solution reported by Bruno Haible.
10698         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10699         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10700
10701 2005-09-23  Jim Meyering  <jim@meyering.net>
10702
10703         Sync from coreutils.
10704         Correct build failure (socklen_t not defined) on at least
10705         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10706         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10707
10708 2005-09-23  Jim Meyering  <jim@meyering.net>
10709
10710         * modules/getaddrinfo (Depends-on): Add socklen.
10711
10712 2005-09-23  Bruno Haible  <bruno@clisp.org>
10713
10714         * tests/test-verify.c: New file.
10715
10716 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10717
10718         Sync from coreutils.
10719
10720         * modules/argmatch (Depends-on): Add verify.
10721         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10722         unistd-safer.
10723         * modules/save-cwd (Depends-on): Likewise.
10724
10725         * modules/openat (Files): Add lib/openat-die.c.
10726         (Depends-on): Remove error, exitfail.
10727         Add dirname.
10728
10729         * modules/verify: New file.
10730         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10731         with "verify" module.
10732
10733 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10734
10735         Sync from coreutils.
10736
10737         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10738         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10739         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10740         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10741         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10742         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10743         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10744         Don't bother checking for string.h, stdlib.h, unistd.h.
10745         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10746         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10747         module's job.
10748         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10749         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10750
10751         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10752         (gl_GETDATE): Use it.
10753
10754         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10755
10756 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10757
10758         Sync from coreutils.
10759
10760         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10761         stat-time.h.
10762         * lib/argmatch.h: Include verify.h
10763         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10764         (ARGMATCH_ASSERT): Remove; unused.
10765         * lib/canonicalize.c: Assume STDC_HEADERS.
10766         * lib/exclude.c: Include "strcase.h".
10767         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10768         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10769         and stdio-safer.h.
10770         (getusershell): Call fopen, not fopen_safer.
10771         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10772         Do not include unistd-safer.h.
10773         (save_cwd): Don't call fd_safer; no longer needed
10774         now that we include fcntl--.h.
10775
10776         * lib/getdate.y (relative_time): New type.
10777         (RELATIVE_TIME_0): New constant.
10778         (parser_control): Use relative_time instead of doing it ourselves.
10779         (%union): Add new relative_time rel member.
10780         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10781         Now typeless.
10782         (relunit, relunit_snumber): Now of type rel.
10783         (zone, rel, relunit, get_date): Adjust to above changes.
10784
10785         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10786         Do not include unistd-safer.h.
10787         (getloadavg): Don't call fd_safer; no longer needed
10788         now that we include fcntl--.h.
10789
10790         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10791         (make_dir_parents): Treat ENOSYS like EEXIST.
10792
10793         Improve quality of diagnostics on restore_cwd failure.
10794         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10795         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10796         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10797         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10798         each time through the loop.  Do not diagnose restore_cwd failure;
10799         that is the caller's job (and perhaps the caller does not care).
10800
10801         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10802         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10803         If the file already exists but is not a directory, don't bother
10804         to try to make its parents.
10805         Close potential file descriptor leak if we can't chdir("/") (!).
10806         Don't always return true if chdir($PWD) fails; return true only
10807         if the requested action was done successfully (except for the
10808         chdir($PWD)).
10809         Don't log final directory unless we actually made it.
10810         Refactor to avoid duplicate code to fix up permissions.
10811         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10812
10813         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10814         to make it a bit faster and (I hope) clearer.
10815         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10816         Fix bug in formats like %2N.
10817
10818         * lib/verify.h: New file.
10819
10820 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10821
10822         Sync from coreutils.
10823         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10824
10825 2005-09-22  Jim Meyering  <jim@meyering.net>
10826
10827         Sync from coreutils.
10828
10829         * m4/lstat.m4 (gl_FUNC_LSTAT):
10830         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10831         Remove obsolete comment.
10832         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10833         * m4/xstrtod.m4: Likewise.
10834
10835         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10836
10837 2005-09-22  Jim Meyering  <jim@meyering.net>
10838
10839         Sync from coreutils.
10840
10841         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10842
10843         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10844         the .tm_year member, since otherwise gcc-4.0 would now warn about
10845         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10846
10847         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10848         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10849
10850         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10851         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10852         when run in a time zone for which daylight savings time is in effect
10853         for the starting date.
10854
10855         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10856         stop us from restricting permissions of just-created absolute-named
10857         directories.
10858         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10859         to restore initial working directory.
10860         * lib/mkdir-p.c (make_dir_parents): New parameter:
10861         different_working_dir, to tell caller if/when we change the working
10862         directory and are unable to return to the initial one.
10863         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10864         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10865         `return false'.  This fixes a bug introduced on 2004-07-30.
10866
10867         * lib/openat.c (fdopendir): Be sure to close the supplied
10868         file descriptor before returning.  This makes our replacement
10869         implementation a little closer to Solaris's, where fdopendir
10870         ties the file descriptor to the returned DIR* pointer.
10871         * lib/openat.c (unlinkat): New function.
10872         * lib/openat.h (unlinkat): Add prototype.
10873         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10874         (openat_restore_fail): Rename from openat_restore_die.
10875         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10876
10877         Provide an alternative to exiting immediately upon save_cwd or
10878         restore_cwd failure.  Now, an application can arrange e.g.,
10879         to perform a longjump in that case.
10880         * lib/openat.c: Include dirname.h.
10881         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10882         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10883         and openat_restore_die rather than calling error directly.
10884         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10885
10886         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10887         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10888         define.
10889
10890         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10891         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10892                             int utc, int nanoseconds);
10893         Background:
10894         date should not have to allocate a megabyte of virtual memory to
10895         handle a format argument like +%1048575T.  When implemented with
10896         strftime, it must allocate such a buffer, use strftime to fill it
10897         in, print it, then free it.
10898         With fprintftime, it simply prints everything and exits.
10899         With no need for memory allocation, that's one fewer way to fail.
10900         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10901         optional field width, not before, so we accept %9:z, not %:9z.
10902         (my_strftime): Be sure to use L_('x') for literals.
10903
10904         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10905         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10906         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10907         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10908         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
10909         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
10910         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
10911         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
10912         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
10913         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
10914         * lib/xgethostname.c, lib/xreadlink.c:
10915         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
10916
10917         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
10918         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
10919         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
10920         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
10921         and don't include <sys/file.h>).
10922
10923 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
10924
10925         Sync from coreutils.
10926
10927         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
10928         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
10929         [!LDAV_DONE]: Avoid unused variable warning.
10930
10931 2005-09-21  Bruno Haible  <bruno@clisp.org>
10932
10933         * lib/unicodeio.h (unicode_to_mb): New declaration.
10934
10935 2005-09-20  Derek Price  <derek@ximbiot.com>
10936
10937         * lib/getaddrinfo.c: Don't include <netdb.h> included from
10938         getaddrinfo.h.
10939
10940 2005-09-20  Bruno Haible  <bruno@clisp.org>
10941
10942         * gnulib-tool: Remove trailing slashes from the values specified for
10943         --source-base, --m4-base, --tests-base, --aux-dir.
10944         Suggested by Simon Josefsson <jas@extundo.com>.
10945
10946 2005-09-20  Bruno Haible  <bruno@clisp.org>
10947
10948         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
10949         func_modules_to_filelist, func_import, func_create_testdir): Make all
10950         sorting results locale-independent, so that gnulib-cache.m4 doesn't
10951         change when gnulib-tool is invoked in a different locale.
10952
10953 2005-09-19  Simon Josefsson  <jas@extundo.com>
10954
10955         * m4/socklen.m4: Fix typo.
10956
10957 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
10958
10959         Use a consistent style for including <config.h>.
10960         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
10961         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
10962         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
10963         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
10964         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
10965         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
10966         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
10967         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
10968         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
10969         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
10970         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
10971         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
10972         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
10973         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
10974         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
10975         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
10976         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
10977         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
10978         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
10979         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
10980         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
10981         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
10982         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
10983         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
10984         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
10985         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
10986         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
10987         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
10988         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
10989         lib/xstrtoumax.c, lib/yesno.c:
10990         Standardize inclusion of config.h.
10991         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
10992         lib/inttostr.h:  Removed inclusion of config.h from header files.
10993         * lib/inttostr.c:  Adjusted in-tree users.
10994         * lib/timespec.h: Remove superfluous warning to include config.h.
10995         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
10996         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
10997         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
10998         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
10999         config.h with HAVE_CONFIG_H.
11000
11001 2005-09-19  Jim Meyering  <jim@meyering.net>
11002
11003         * modules/pathmax (License): Change to LGPL.
11004
11005 2005-09-19  Derek Price  <derek@ximbiot.com>
11006
11007         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11008
11009 2005-09-19  Bruno Haible  <bruno@clisp.org>
11010
11011         * gnulib-tool (import): Provide default for --tests-base.
11012
11013 2005-09-19  Bruno Haible  <bruno@clisp.org>
11014
11015         * doc/quote.texi: New file, extracted from gnulib.texi.
11016         * doc/ctime.texi: New file, extracted from gnulib.texi.
11017         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11018         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11019         * doc/gnulib.texi: Include them.
11020
11021 2005-09-18  Bruno Haible  <bruno@clisp.org>
11022
11023         Portability fix.
11024         * gnulib-tool (func_readlink): New function.
11025         (func_ln_if_changed): Use it.
11026
11027 2005-09-18  Bruno Haible  <bruno@clisp.org>
11028
11029         * gnulib-tool: Support --with-tests also with --import.
11030         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11031         (func_import): Use variables $testsbase and $inctests. Emit a
11032         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11033         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11034         SUBDIRS += $testsdir.
11035         (func_create_testdir): Update.
11036
11037 2005-09-18  Bruno Haible  <bruno@clisp.org>
11038
11039         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11040         instead of $dry_run.
11041         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11042         (func_ln_if_changed): Don't handle dry-run here.
11043         (func_import): In dry-run mode, detect more precisely which actions
11044         would be performed, and don't use "...ing" verbs.
11045
11046 2005-09-18  Bruno Haible  <bruno@clisp.org>
11047
11048         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11049         (func_import): Use join on two temporary files instead of three nested
11050         loops, in order to determine which files are new or old.
11051
11052 2005-09-18  Bruno Haible  <bruno@clisp.org>
11053
11054         * gnulib-tool (func_import): Comment out code that spits out the
11055         new files with --dry-run.
11056
11057 2005-09-18  Bruno Haible  <bruno@clisp.org>
11058
11059         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11060
11061 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11062
11063         * lib/stat-time.h: New file.
11064         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11065         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11066         in a different way.
11067         (timespec_cmp): New function.
11068         * lib/utimecmp.c: Include stat-time.h.
11069         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11070         members exist, not on the obsolescent ST_MTIM_NSEC.
11071         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11072
11073 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11074
11075         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11076
11077 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11078
11079         * MODULES.html.sh (File system functions): Add stat-time.
11080         * modules/stat-time: New file.
11081         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11082         is now done in a different way, by the stat-time module.
11083         * modules/utimecmp (Depends-on): Add stat-time.
11084
11085 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11086
11087         * m4/st_mtim.m4: Remove.  Superseded by...
11088         * m4/stat-time.m4: New file.
11089         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11090         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11091
11092 2005-09-15  Derek Price  <derek@ximbiot.com>
11093
11094         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11095
11096 2005-09-15  Derek Price  <derek@ximbiot.com>
11097
11098         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11099         * lib/regex_internal.c: Ditto, using this...
11100         (__GNUC_PREREQ): ...new macro.
11101         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11102         using...
11103         (__GNUC_PREREQ): ...this new macro.
11104
11105         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11106
11107 2005-09-15  Derek Price  <derek@ximbiot.com>
11108             Paul Eggert  <eggert@cs.ucla.edu>
11109
11110         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11111         changes, consolidating in...
11112         * lib/regex_internal.h: ...this file.
11113
11114 2005-09-13  Jim Meyering  <jim@meyering.net>
11115
11116         * lib/canon-host.c: Filter through gnu indent and reword comments
11117         slightly.
11118         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11119
11120 2005-09-13  Derek Price  <derek@ximbiot.com>
11121
11122         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11123         failure.
11124         Reported by Jim Meyering  <jim@meyering.net>.
11125
11126 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11127
11128         * lib/base64.c: Typo.
11129         (base64_encode): Put b64str in initialized data section.
11130
11131 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11132
11133         Merge glibc and coreutils changes into gnulib, plus a few
11134         extra fixes.
11135         * lib/md5.c: Use #error rather than a string.
11136         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11137         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11138         (__attribute__): Define to empty for non recent-GCC.
11139         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11140         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11141         Renamed from their non-__ counterparts, with new macros replacing
11142         them if not _LIBC.  Add __THROW attribute.
11143         (rol): Remove.
11144         (struct md5_ctx): Align buffer if using GCC.
11145         * lib/sha1.h (struct sha1_ctx): Likewise.
11146         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11147         The old name was backwards.
11148         (NOTSWAP): Remove; not used.
11149         (rol): New macro, moved here from md5.h.
11150         (sha1_process_block): Remove a FIXME that doesn't make sense.
11151
11152 2005-09-12  Derek Price  <derek@ximbiot.com>
11153
11154         Return usable errors from canon-host.
11155         * lib/canon-host.h: New file.
11156         * lib/canon-host.c (canon_host): Wrap...
11157         (canon_host_r): ...this new function, which now relies exclusively on
11158         getaddrinfo.
11159         (ch_strerror): New function.
11160         (last_cherror): New global.
11161         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11162         interface.
11163         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11164         void *.
11165         (freeaddrinfo): Free ai->ai_canonname when set.
11166
11167 2005-09-12  Derek Price  <derek@ximbiot.com>
11168
11169         Make canon-host require getaddrinfo.
11170         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11171         AC_LIBSOURCE canon-host.h.  Call...
11172         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11173         gl_GETADDRINFO.
11174         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11175
11176 2005-09-12  Derek Price  <derek@ximbiot.com>
11177
11178         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11179         LGPL.
11180         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11181
11182 2005-09-12  Derek Price  <derek@ximbiot.com>
11183
11184         * lib/gai_strerror.c: Include config.h when available.  Include
11185         getaddrinfo.h before other headers to test interface.
11186         Reported by Larry Jones <lawrence.jones@ugs.com>.
11187
11188 2005-09-12  Derek Price  <derek@ximbiot.com>
11189             Paul Eggert  <eggert@cs.ucla.edu>
11190
11191         * modules/glob (Files): Add glob-libc.h.
11192
11193 2005-09-12  Derek Price  <derek@ximbiot.com>
11194             Paul Eggert  <eggert@cs.ucla.edu>
11195
11196         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11197         glob_.h, glob-libc.h.
11198         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11199
11200 2005-09-12  Derek Price  <derek@ximbiot.com>
11201             Paul Eggert  <eggert@cs.ucla.edu>
11202
11203         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11204         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11205         protecting things that should be done only in gnulib contexts.
11206         * lib/glob_.h: New file, containing only the glob things needed for
11207         gnulib.
11208         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11209         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11210         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11211         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11212         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11213         and to respect the namespace rules better.
11214
11215 2005-09-08  Simon Josefsson  <jas@extundo.com>
11216
11217         * modules/socklen: New file.
11218
11219 2005-09-08  Simon Josefsson  <jas@extundo.com>
11220
11221         * m4/socklen.m4: New file.
11222
11223 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11224
11225         * modules/utimens (Files): Add m4/utimbuf.m4, since
11226         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11227         Reported by Sergey Poznyakoff.
11228
11229 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11230
11231         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11232         definitions, since that's the preferred style in glibc.
11233         Fix a minor spacing issue, and update copyright notice to match
11234         glibc's.
11235
11236 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11237
11238         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11239
11240 2005-09-06  Simon Josefsson  <jas@extundo.com>
11241
11242         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11243         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11244
11245 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11246
11247         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11248         warning.
11249
11250 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11251
11252         * config/srclist.txt: Add glibc bug 1302.
11253
11254 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11255
11256         Change bitset word type from unsigned int to unsigned long int,
11257         as this has better performance on typical 64-bit hosts.
11258         Port bitset code to hosts with unusual word sizes.
11259         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11260         (build_collating_symbol):
11261         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11262         argument is a bitset.  This is merely a style issue, but it makes
11263         it clearer that an entire array is expected.
11264         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11265         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11266         Port to the case where bitset_word is not the same as unsigned int.
11267         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11268         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11269         Likewise.
11270         * lib/regexec.c (check_dst_limits_calc_pos_1,
11271         check_subexp_matching_top):
11272         (build_trtable, group_nodes_into_DFAstates):
11273         Likewise.
11274         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11275         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11276         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11277         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11278         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11279         * lib/regcomp.c (optimize_subexps, lower_subexp):
11280         Work even if bitset_word has holes in its bitwise representation.
11281         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11282         * lib/regexec.c (check_dst_limits_calc_pos_1,
11283         check_subexp_matching_top):
11284         Likewise.
11285         * lib/regex_internal.c (re_string_reconstruct):
11286         Don't assume UCHAR_MAX == 255.
11287         * lib/regex_internal.h (bitset_set_all): Likewise.
11288         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11289         All uses changed.
11290         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11291         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11292         All uses changed.
11293         (BITSET_WORD_MAX): New macro.
11294         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11295         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11296         (bitset_empty, bitset_copy):
11297         Prefer sizeof (bitset) to multiplying it out ourselves.
11298         (bitset_not_merge): Remove; unused.
11299         (bitset_contain): Return bool, not unsigned int with one bit on.
11300         All callers changed.
11301         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11302         alignment than re_node_set; do this by defining a new internal
11303         type struct dests_alloc and using it to allocate memory.
11304
11305 2005-09-05  Bruno Haible  <bruno@clisp.org>
11306
11307         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11308         links.
11309
11310 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11311
11312         * modules/size_max (Makefile.am): Add size_max.h
11313
11314 2005-09-04  Derek Price  <derek@ximbiot.com>
11315
11316         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11317
11318 2005-09-03  Simon Josefsson  <jas@extundo.com>
11319
11320         * gnulib-tool: Fix typo.
11321
11322 2005-09-03  Simon Josefsson  <jas@extundo.com>
11323
11324         * config/srclist.txt: Add glibc bug 1293.
11325
11326 2005-09-03  Derek Price  <derek@ximbiot.com>
11327
11328         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11329         From Larry Jones <lawrence.jones@ugs.com>.
11330
11331 2005-09-02  Simon Josefsson  <jas@extundo.com>
11332
11333         * modules/socklen: New file.
11334
11335 2005-09-02  Simon Josefsson  <jas@extundo.com>
11336
11337         * modules/havelib: New module.
11338
11339         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11340         Use havelib.
11341
11342 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11343
11344         Check for arithmetic overflow when calculating sizes, to prevent
11345         some buffer-overflow issues.  These patches are conservative, in the
11346         sense that when I couldn't determine whether an overflow was possible,
11347         I inserted a run-time check.
11348         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11349         macros.
11350         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11351         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11352         (re_xnrealloc, re_x2nrealloc): New inline functions.
11353         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11354         parse_bracket_exp):
11355         (build_equiv_class, build_charclass): Check for arithmetic overflow
11356         in size expression calculations.
11357         * lib/regex_internal.c (re_string_realloc_buffers):
11358         (build_wcs_upper_buffer, re_node_set_add_intersect):
11359         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11360         (re_dfa_add_node, register_state): Likewise.
11361         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11362         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11363         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11364         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11365
11366 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11367
11368         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11369         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11370
11371 2005-09-02  Bruno Haible  <bruno@clisp.org>
11372
11373         Support for lib vs. lib64 distinction on biarch platforms.
11374         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11375         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11376         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11377
11378 2005-09-02  Bruno Haible  <bruno@clisp.org>
11379
11380         * gnulib-tool (import): In the other first-use case, provide defaults
11381         as well.
11382
11383 2005-09-02  Bruno Haible  <bruno@clisp.org>
11384
11385         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11386         patches not yet found in the latest gettext release.
11387
11388 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11389
11390         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11391         to avoid a collision with bits/local_lim.h in glibc.
11392         All uses changed.  Problem reported by Dmitry V. Levin in
11393         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11394
11395         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11396         bugs in int versus size_t comparisons.
11397         (re_string_context_at): Fix bug where the code assumed that
11398         Idx is signed.
11399
11400         Use bool where appropriate.
11401         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11402         All callers changed.
11403         (calc_eclosure_iter): Likewise, for ROOT arg.
11404         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11405         (build_charclass_op): Likewise, for NON_MATCH arg.
11406         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11407         (re_string_construct_common): Likewise, for ICASE arg.
11408         * lib/regexec.c (re_search_2_stub, re_search_stub):
11409         Likewise, for RET_LEN arg.
11410         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11411         (set_regs): Likewise, for FL_BACKTRACK arg.
11412         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11413         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11414         (calc_eclosure_iter, parse_bracket_exp):
11415         Use bool for internal variables that are booleans.
11416         * lib/regexec.c (re_search_internal, check_matching,
11417         proceed_next_node):
11418         (set_regs, build_sifted_states, sift_states_bkref):
11419         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11420         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11421         (find_collation_sequence_value):
11422         Likewise.
11423         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11424         (re_node_set_compare):
11425         Return bool, not int. All callers changed.
11426         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11427         (build_trtable, check_node_accept): Likewise.
11428         * lib/regex_internal.h: Include stdbool.h.
11429
11430         Fix bugs uncovered when converting to bool.
11431         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11432         failure instead of charging ahead blindly.
11433         * lib/regex_internal.c (register_state): Likewise.
11434         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11435         for freeing internal storage.
11436         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11437         bitset pieces used as boolean, to avoid undefined behavior
11438         on hosts that do int overflow checking.
11439
11440 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11441
11442         * config/srclist.txt: Add glibc bugs 1285-1287.
11443
11444 2005-09-01  Jim Meyering  <jim@meyering.net>
11445
11446         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11447         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11448         Require gl_STAT_MACROS, too.
11449
11450 2005-09-01  Bruno Haible  <bruno@clisp.org>
11451
11452         * gnulib-tool (import): In the first-use case, provide defaults.
11453
11454 2005-09-01  Bruno Haible  <bruno@clisp.org>
11455
11456         * gnulib-tool (func_import): Remove the .tmp files.
11457
11458 2005-09-01  Bruno Haible  <bruno@clisp.org>
11459
11460         * gnulib-tool (func_import): Fix handling of symbolic links.
11461
11462 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11463
11464         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11465         old glibc regex code mishandles strings longer than 2**31 bytes.
11466         This patch fixes this when the regex code is used in gnulib
11467         (i.e., outside glibc).
11468
11469         This patch should not affect the use of the regex code inside
11470         glibc.  No doubt this problem also needs to be handled for glibc
11471         as well, but the result will be an incompatible change to the
11472         glibc ABI, and the old ABI will have to be supported too.  That
11473         can be the the subject for another patch.
11474
11475         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11476         governing whether the rest of this patch is active.  By default,
11477         the macro is disabled and the patch has no effect.
11478         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11479         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11480         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11481         (re_match_2, re_set_registers): Use the new types.
11482         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11483         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11484         New macros.
11485         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11486         (re_string_context_at, bin_tree_t, re_dfastate_t):
11487         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11488         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11489         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11490         (re_string_char_size_at, re_string_wchar_at):
11491         (re_string_elem_size_at):
11492         Use the new types and macros to port to 64-bit hosts.
11493         Use unsigned types for internal values, so that the code
11494         mostly works even for arrays larger than SSIZE_MAX.
11495         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11496         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11497         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11498         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11499         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11500         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11501         (calc_inveclosure, parse_dup_op, build_range_exp):
11502         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11503         (fetch_number, create_token_tree, mark_opt_subexp):
11504         Likewise.
11505         * lib/regex_internal.c (re_string_construct_common,
11506         create_ci_newstate):
11507         (create_cd_newstate, re_string_allocate, re_string_construct):
11508         (re_string_realloc_buffers, build_wcs_upper_buffer):
11509         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11510         (re_string_reconstruct, re_string_peek_byte_case):
11511         (re_string_fetch_byte_case, re_string_context_at):
11512         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11513         (re_node_set_init_copy, re_node_set_add_intersect):
11514         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11515         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11516         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11517         (re_acquire_state, re_acquire_state_context, register_state):
11518         Likewise.
11519         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11520         search_cur_bkref_entry):
11521         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11522         (re_search_internal, re_search_2_stub, re_search_stub)
11523         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11524         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11525         (update_cur_sifted_state, check_dst_limits):
11526         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11527         (check_subexp_limits, sift_states_bkref, merge_state_array):
11528         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11529         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11530         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11531         (expand_bkref_cache, check_node_accept_bytes):
11532         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11533         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11534         (acquire_init_state_context, check_halt_node_context):
11535         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11536         (sift_states_backward, clean_state_log_if_needed):
11537         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11538         (find_recover_state, transit_state_sb, transit_state_mb):
11539         (transit_state_bkref, build_trtable, match_ctx_clean):
11540         Likewise.
11541         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11542         to work around an assumption that REG_MISSING is negative.
11543
11544         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11545         (seek_collating_symbol_entry) [defined _LIBC]:
11546         (lookup_collation_sequence_value) [defined _LIBC]:
11547         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11548         Use prototypes rather than old-style function definitions.
11549         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11550         (transit_state_sb) [0]:
11551         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11552
11553         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11554         rm_eo.
11555
11556         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11557         (optimize_subexps, lower_subexp):
11558         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11559         since the signed shift might overflow.  Use 1u<<31 instead.
11560         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11561         Likewise.
11562         * lib/regexec.c (check_dst_limits_calc_pos_1,
11563         check_subexp_matching_top): Likewise.
11564
11565         * lib/regcomp.c (optimize_subexps, lower_subexp):
11566         Use CHAR_BIT rather than 8, for clarity.
11567         * lib/regexec.c (check_dst_limits_calc_pos_1):
11568         (check_subexp_matching_top): Likewise.
11569         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11570         have to worry about portability issues when shifting it left.
11571         Remove no-longer-needed test for table_size > 0.
11572         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11573         in a word, as the resulting behavior is undefined.
11574         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11575         in one case, a <= should have been an <, and in another case the
11576         whole test was missing.
11577         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11578         the standard name CHAR_BIT.
11579         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11580         this is not true on one's complement and signed-magnitude hosts.
11581
11582         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11583         next_last_offset.
11584         (struct re_dfa_t): Remove unused member states_alloc.
11585         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11586
11587 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11588
11589         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11590         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11591         and large-file glibc and in 32-bit large-file Solaris.
11592
11593 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11594
11595         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11596         lengths fit in regoff_t; this isn't true if regoff_t is the same
11597         width as size_t.
11598         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11599         (= START + RANGE) instead of RANGE.  This avoids overflow
11600         problems when regoff_t is the same width as size_t.
11601         All callers changed.
11602         (re_search_2_stub): Check for overflow when adding the
11603         sizes of the two strings.
11604         (re_search_stub): Check for overflow when adding START
11605         to RANGE; if it occurs, substitute the extreme value.
11606
11607 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11608
11609         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11610
11611 2005-08-31  Jim Meyering  <jim@meyering.net>
11612
11613         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11614         a pointer-to-const.
11615         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11616         (register_state): Likewise.
11617         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11618         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11619         (group_nodes_into_DFAstates): Likewise.
11620
11621 2005-08-31  Jim Meyering  <jim@meyering.net>
11622
11623         * check-module: Add a FIXME comment.
11624
11625 2005-08-31  Eric Blake  <ebb9@byu.net>
11626
11627         * modules/unistd-safer (Files): Add unistd--.h.
11628         * modules/stdio-safer (Files): Add stdio--.h.
11629
11630 2005-08-31  Derek Price  <derek@ximbiot.com>
11631
11632         * lib/getdelim.c (getdelim): Return EOF on EOF.
11633         Reported by Larry Jones <lawrence.jones@ugs.com>.
11634
11635 2005-08-31  Bruno Haible  <bruno@clisp.org>
11636
11637         Avoid unnecessary diffs in the generated lib/Makefile.am.
11638         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11639         the generated files.
11640         (func_import): Don't set cmd.
11641
11642 2005-08-31  Bruno Haible  <bruno@clisp.org>
11643
11644         * lib/strstr.c: Include <stddef.h>, for NULL.
11645         * lib/strcasestr.c: Likewise.
11646         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11647
11648 2005-08-31  Bruno Haible  <bruno@clisp.org>
11649
11650         * gnulib-tool: New option --macro-prefix.
11651         (func_import): Use macro_prefix.
11652         (import): Handle option --macro-prefix.
11653
11654 2005-08-31  Bruno Haible  <bruno@clisp.org>
11655
11656         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11657         Also use new variables cached_lgpl, cached_libtool.
11658
11659 2005-08-31  Bruno Haible  <bruno@clisp.org>
11660
11661         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11662         always instantiating them.
11663
11664 2005-08-31  Bruno Haible  <bruno@clisp.org>
11665
11666         * gnulib-tool (func_import): Read the previous cached settings
11667         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11668         earlier added by gnulib but are now dropped. Warn when a gnulib file
11669         overwrites a non-gnulib file.
11670
11671 2005-08-31  Bruno Haible  <bruno@clisp.org>
11672
11673         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11674         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11675         projects that don't keep autogenerated files in CVS. Put into
11676         actioncmd only the specified modules, not the transitive closure.
11677
11678 2005-08-31  Bruno Haible  <bruno@clisp.org>
11679
11680         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11681         Create directories that shall be filled.
11682         (import): Don't look for gl_* macros in configure.ac. Recurse across
11683         all directories containing a gnulib-cache.m4 files, if meaningful.
11684
11685 2005-08-31  Bruno Haible  <bruno@clisp.org>
11686
11687         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11688         (import): Set seen_libtool when we see gl_LIBTOOL.
11689
11690 2005-08-31  Bruno Haible  <bruno@clisp.org>
11691
11692         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11693         declaration macro definitions from generated gnulib.m4.
11694
11695 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11696
11697         * lib/iconvme.h: Add prototype for iconv_alloc.
11698
11699 2005-08-29  Simon Josefsson  <jas@extundo.com>
11700
11701         * lib/iconvme.c: Fix errno.
11702
11703 2005-08-29  Bruno Haible  <bruno@clisp.org>
11704
11705         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11706         that it works when the directory contains spaces.
11707
11708 2005-08-29  Bruno Haible  <bruno@clisp.org>
11709
11710         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11711
11712 2005-08-29  Bruno Haible  <bruno@clisp.org>
11713
11714         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11715         Emit more advice.
11716
11717 2005-08-29  Bruno Haible  <bruno@clisp.org>
11718         and Stepan Kasal  <kasal@ucw.cz>
11719
11720         * check-module: If more parameters are given, check each of them
11721         separately; add more exceptions, as noted by Jim Meyering.
11722         (check_module): New procedure.
11723         (%exempt_header): Now contains all exceptions.
11724
11725 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11726
11727         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11728
11729 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11730
11731         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11732
11733 2005-08-28  Bruno Haible  <bruno@clisp.org>
11734
11735         * m4/gnulib-tool.m4: New file.
11736
11737 2005-08-27  Jim Meyering  <jim@meyering.net>
11738
11739         * modules/unistd-safer (Files): Add pipe-safer.c.
11740         * modules/fcntl-safer (Files): Add creat-safer.c.
11741
11742 2005-08-27  Jim Meyering  <jim@meyering.net>
11743
11744         * m4/stdlib-safer.m4: New file.  From coreutils.
11745         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11746         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11747         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11748         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11749         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11750
11751 2005-08-27  Jim Meyering  <jim@meyering.net>
11752
11753         * lib/fopen-safer.c: Merge minor changes from coreutils.
11754         * lib/dup-safer.c: Likewise.
11755         * lib/fd-safer.c: Likewise.
11756
11757         Merge from coreutils.
11758         * lib/stdio--.h: New file.
11759         * lib/stdlib--.h: New file.
11760         * lib/mkstemp-safer.c: New file.
11761
11762         GNU tar needs these.
11763         * lib/pipe-safer.c: New file.
11764         * lib/creat-safer.c: New file.
11765         * lib/fcntl--.h (creat): Define to creat_safer.
11766         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11767         * lib/unistd--.h (pipe): Define to pipe_safer.
11768         * lib/unistd-safer.h: Declare pipe_safer.
11769
11770 2005-08-26  Simon Josefsson  <jas@extundo.com>
11771
11772         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11773         Haible <bruno@clisp.org>.
11774
11775 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11776
11777         * lib/regex_internal.h: Remove all references to
11778         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11779         or better.
11780         (bitset_not, bitset_merge, bitset_not_merge):
11781         (bitset_mask, re_string_allocate, re_string_construct):
11782         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11783         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11784         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11785         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11786         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11787         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11788         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11789         (re_acquire_state_context):
11790         Remove unnecessary forward decls.
11791         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11792         Put __attribute at function definition,
11793         now that the function decl has been removed.
11794         * lib/regex_internal.c (re_string_peek_byte_case):
11795         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11796         Likewise.
11797
11798 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11799
11800         * m4/regex.m4: Add AC_PREREQ(2.50).
11801         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11802
11803 2005-08-25  Simon Josefsson  <jas@extundo.com>
11804
11805         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11806         __fsetlocking.
11807
11808 2005-08-25  Simon Josefsson  <jas@extundo.com>
11809
11810         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11811         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11812         GLIBC specific code.
11813
11814 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11815
11816         Make regex safe for g++.  This fixes one real bug (an "err"
11817         that should have been "*err").  g++ problem reported by
11818         Sam Steingold.
11819         * lib/regex_internal.h (re_calloc): New macro, consistent with
11820         re_malloc etc.  All callers of calloc changed to use re_calloc.
11821         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11822         not int.  All callers changed.
11823         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11824         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11825         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11826         (find_recover_state): Change "err" to "*err"; this fixes what
11827         appears to be a real bug.
11828         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11829         versus int.
11830
11831 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11832
11833         * modules/regex (Depends-on): Add malloc, since the code
11834         assumes that !malloc(0) means failure.
11835
11836 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11837
11838         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11839
11840         alloca modernization/simplification for regex.
11841         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11842         needs to be at the start of the file, and can be moved into
11843         regex_internal.h and simplified.
11844         * lib/regex_internal.h: Include <alloca.h>.
11845         (__libc_use_alloca) [!defined _LIBC]: New macro.
11846         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11847         now works outside glibc.
11848
11849 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11850
11851         * config/srclist.txt: Add glibc bugs 1241, 1245.
11852
11853 2005-08-25  Jim Meyering  <jim@meyering.net>
11854
11855         * lib/open-safer.c: Include <config.h>.
11856         Otherwise, we'd lose LARGEFILE support in any file using
11857         e.g. "fcntl--.h"
11858
11859 2005-08-25  Bruno Haible  <bruno@clisp.org>
11860
11861         * m4/minmax.m4: Require autoconf 2.52.
11862         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11863         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11864         alternatives of translit over the alphabet.
11865         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11866
11867 2005-08-24  Simon Josefsson  <jas@extundo.com>
11868
11869         * tests/test-getpass.c: New file.
11870
11871 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11872
11873         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11874         for GNU regex features.
11875
11876 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11877
11878         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11879         * lib/regex.h (regerror): Likewise.
11880
11881         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11882         requires this.  (The code never needed it.)
11883
11884         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11885         All uses of recently-renamed identifiers changed to use the new,
11886         POSIX-compliant names.  The code will build and run just fine
11887         without these changes, but it's better to eat our own dog food
11888         and use the standard-conforming names.
11889
11890         * lib/regex.h: Fix a multitude of POSIX name space violations.
11891         These changes have an effect only for programs that define
11892         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11893         do not change anything for programs compiled in the normal way.
11894         Also, there is no effect on the ABI.
11895
11896         (_REGEX_SOURCE): New macro.
11897         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11898         defined and _GNU_SOURCE is not; this fixes a name space violation.
11899
11900         Rename the following macros to obey POSIX requirements.
11901         The old names are still visible as macros if _REGEX_SOURCE is defined.
11902         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11903         RE_BACKSLASH_ESCAPE_IN_LISTS.
11904         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11905         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11906         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11907         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11908         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
11909         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
11910         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
11911         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
11912         (REG_INTERVALS): renamed from RE_INTERVALS.
11913         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
11914         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
11915         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
11916         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
11917         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
11918         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
11919         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
11920         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
11921         RE_UNMATCHED_RIGHT_PAREN_ORD.
11922         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
11923         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
11924         (REG_DEBUG): renamed from RE_DEBUG.
11925         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
11926         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
11927         unusual, since we can't clash with the POSIX REG_ICASE.
11928         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
11929         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
11930         (REG_NO_SUB): renamed from RE_NO_SUB.
11931         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
11932         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
11933         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
11934         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
11935         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
11936         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
11937         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
11938         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
11939         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
11940         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
11941         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
11942         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
11943         RE_SYNTAX_POSIX_MINIMAL_BASIC.
11944         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
11945         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
11946         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
11947         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
11948         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
11949         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
11950         (REG_FIXED): Renamed from REGS_FIXED.
11951         (REG_NREGS): Renamed from RE_NREGS.
11952
11953         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
11954         of other REG_* macros, since POSIX says the user is allowed to
11955         #undef these macros selectively.
11956
11957         (reg_errcode_t): Update comment stating what other tables need
11958         to be consistent.
11959
11960         Rename the following enum values to obey POSIX requirements.
11961         The old names are still visible as macros.
11962         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
11963         is not defined, since GNU is supposed to be a superset of POSIX as
11964         much as possible, and since we want reg_errcode_t to be a signed
11965         type for implementation consistency.
11966         (_REG_NOERROR): Renamed from REG_NOERROR.
11967         (_REG_NOMATCH): Renamed from REG_NOMATCH.
11968         (_REG_BADPAT): Renamed from REG_BADPAT.
11969         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
11970         (_REG_ECTYPE): Renamed from REG_ECTYPE.
11971         (_REG_EESCAPE): Renamed from REG_EESCAPE.
11972         (_REG_ESUBREG): Renamed from REG_ESUBREG.
11973         (_REG_EBRACK): Renamed from REG_EBRACK.
11974         (_REG_EPAREN): Renamed from REG_EPAREN.
11975         (_REG_EBRACE): Renamed from REG_EBRACE.
11976         (_REG_BADBR): Renamed from REG_BADBR.
11977         (_REG_ERANGE): Renamed from REG_ERANGE.
11978         (_REG_ESPACE): Renamed from REG_ESPACE.
11979         (_REG_BADRPT): Renamed from REG_BADRPT.
11980         (_REG_EEND): Renamed from REG_EEND.
11981         (_REG_ESIZE): Renamed from REG_ESIZE.
11982         (_REG_ERPAREN): Renamed from REG_ERPAREN.
11983         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
11984         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
11985         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
11986         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
11987
11988         (_REG_RE_NAME, _REG_RM_NAME): New macros.
11989         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
11990         changed.  But support the old name if the new one is not defined
11991         and if _REGEX_SOURCE.
11992
11993         Change the following member names in struct re_pattern_buffer.
11994         The old names are still supported if !_REGEX_SOURCE.
11995         The new names are always supported, regardless of _REGEX_SOURCE.
11996         (re_buffer): Renamed from buffer.
11997         (re_allocated): Renamed from allocated.
11998         (re_used): Renamed from used.
11999         (re_syntax): Renamed from syntax.
12000         (re_fastmap): Renamed from fastmap.
12001         (re_translate): Renamed from translate.
12002         (re_can_be_null): Renamed from can_be_null.
12003         (re_regs_allocated): Renamed from regs_allocated.
12004         (re_fastmap_accurate): Renamed from fastmap_accurate.
12005         (re_no_sub): Renamed from no_sub.
12006         (re_not_bol): Renamed from not_bol.
12007         (re_not_eol): Renamed from not_eol.
12008         (re_newline_anchor): Renamed from newline_anchor.
12009
12010         Change the following member names in struct re_registers.
12011         The old names are still supported if !_REGEX_SOURCE.
12012         The new names are always supported, regardless of _REGEX_SOURCE.
12013         (rm_num_regs): Renamed from num_regs.
12014         (rm_start): Renamed from start.
12015         (rm_end): Renamed from end.
12016
12017         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12018         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12019         Prepend __ to parameter names.
12020
12021         Undo yesterday's changes.
12022
12023 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12024
12025         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12026         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12027         lib/regex.c.
12028
12029 2005-08-24  Jim Meyering  <jim@meyering.net>
12030
12031         Sync from coreutils.
12032         * m4/fcntl-safer.m4: New file.
12033
12034         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12035         and object files for this module.
12036
12037 2005-08-24  Jim Meyering  <jim@meyering.net>
12038
12039         Sync from coreutils.
12040         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12041
12042 2005-08-24  Jim Meyering  <jim@meyering.net>
12043
12044         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12045         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12046
12047 2005-08-24  Jim Meyering  <jim@meyering.net>
12048
12049         * modules/fcntl-safer: New module.
12050         * modules/fts (Depends-on): Add fcntl-safer.
12051         * MODULES.html.sh (File descriptor based Input/Output):
12052         Add fcntl-safer.
12053
12054 2005-08-24  Bruno Haible  <bruno@clisp.org>
12055
12056         Support for unit test modules.
12057         * modules/README: Mention tests modules.
12058         * modules/TEMPLATE-TESTS: New file.
12059         * gnulib-tool: New options --extract-tests-module, --with-tests and
12060         --tests-base (unused for the moment).
12061         (testsbase, inctests): New variables.
12062         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12063         (func_verify_module): Exclude TEMPLATE-TESTS.
12064         (func_verify_nontests_module, func_verify_tests_module): New functions.
12065         (func_get_dependencies): Add implicit dependency for tests modules.
12066         (func_get_tests_module): New function.
12067         (func_modules_transitive_closure): When --with-tests was specified,
12068         include the unit tests as well, unless explicitly avoided.
12069         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12070         (func_emit_tests_Makefile_am): New function.
12071         (func_create_testdir): When --with-tests was specified, emit a
12072         tests/ directory.
12073         * MODULES.html.sh (Future developments): Update.
12074
12075 2005-08-24  Bruno Haible  <bruno@clisp.org>
12076
12077         * modules/tls-tests: New file.
12078         * tests/test-tls.c: New file, from GNU gettext.
12079
12080 2005-08-24  Bruno Haible  <bruno@clisp.org>
12081
12082         * modules/lock-tests: New file.
12083         * tests/test-lock.c: New file, from GNU gettext.
12084
12085 2005-08-24  Bruno Haible  <bruno@clisp.org>
12086
12087         * lib/lock.h: Add multiple inclusion guard.
12088         * lib/tls.h: Add multiple inclusion guard.
12089
12090 2005-08-24  Bruno Haible  <bruno@clisp.org>
12091
12092         * gnulib-tool: Add support for the --aux-dir option to
12093         --create-testdir, --create-megatestdir, --test, --megatest.
12094         (func_create_testdir, func_create_megatestdir): Optionally emit a
12095         AC_CONFIG_AUX_DIR directive.
12096         (create-testdir, create-megatestdir, test, megatest): Provide a
12097         default value for $auxdir.
12098
12099 2005-08-24  Bruno Haible  <bruno@clisp.org>
12100
12101         * gnulib-tool (import): Use compound statement instead of subshell
12102         where possible.
12103
12104 2005-08-24  Bruno Haible  <bruno@clisp.org>
12105
12106         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12107
12108 2005-08-24  Bruno Haible  <bruno@clisp.org>
12109
12110         * gnulib-tool (func_version): Update.
12111
12112 2005-08-24  Bruno Haible  <bruno@clisp.org>
12113
12114         * gnulib-tool (func_import, func_create_testdir,
12115         func_create_megatestdir): Quote all autoconf macro arguments.
12116
12117 2005-08-24  Bruno Haible  <bruno@clisp.org>
12118
12119         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12120         option --force, because --force causes the aclocal.m4 of each
12121         subdirectory to be newer than the corresponding config.h.in.
12122
12123 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12124
12125         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12126         All contents moved to gl_REGEX.
12127         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12128         assume that it does.
12129
12130 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12131
12132         * lib/regex.h (REG_NOSYS)
12133         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12134         Define, since POSIX requires it as of 2001.
12135         (_REG_ENOSYS)
12136         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12137         New private symbol, used to keep the enum signed in all cases.
12138         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12139         Youngman in
12140         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12141
12142         * lib/regex_internal.c (re_string_skip_chars, register_state):
12143         (calc_state_hash):
12144         Remove forward decls; no longer needed now that we use prototypes.
12145         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12146         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12147         (clean_state_log_if_needed): Likewise.
12148
12149 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * config/srclist.txt: Add glibc bugs 1231-1233.
12152
12153 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12154
12155         Fix problems reported by Sam Steingold in
12156         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12157         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12158         assumed that reg_errcode_t is a signed type, which is not
12159         necessarily true if _XOPEN_SOURCE is not defined.
12160         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12161         since some compilers warn about it otherwise.
12162
12163 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12164
12165         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12166         (init_word_char, create_initial_state, duplicate_node_closure):
12167         (fetch_token, peek_token_bracket, build_range_exp):
12168         (build_collating_symbol): Remove forward decls; no longer needed
12169         now that we use prototypes.
12170
12171         * lib/regcomp.c:
12172         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12173         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12174         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12175         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12176         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12177         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12178         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12179         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12180         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12181         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12182         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12183         (build_charclass, build_charclass_op, fetch_number, create_tree):
12184         (create_token_tree, mark_opt_subexp, duplicate_tree):
12185         Use prototypes rather than old-style definitions.
12186
12187         * lib/regex_internal.c:
12188         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12189         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12190         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12191         (re_string_reconstruct, re_string_peek_byte_case):
12192         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12193         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12194         (re_node_set_init_copy, re_node_set_add_intersect):
12195         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12196         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12197         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12198         (re_acquire_state, re_acquire_state_context, register_state):
12199         (create_ci_newstate, create_cd_newstate, free_state):
12200         Likewise.
12201         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12202         re_search_2):
12203         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12204         (re_search_internal, prune_impossible_nodes):
12205         (acquire_init_state_context, check_matching, static):
12206         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12207         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12208         (update_regs, sift_states_backward, build_sifted_states):
12209         (clean_state_log_if_needed, merge_state_array):
12210         (update_cur_sifted_state, add_epsilon_src_nodes):
12211         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12212         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12213         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12214         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12215         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12216         (check_arrival, check_arrival_add_next_nodes):
12217         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12218         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12219         (check_node_accept_bytes, check_node_accept, extend_buffers):
12220         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12221         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12222         (sift_ctx_init):
12223         Likewise.
12224
12225         * lib/regex_internal.h:
12226         (re_string_allocate, re_string_construct, re_string_reconstruct):
12227         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12228         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12229         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12230         (re_string_context_at, re_string_peek_byte_case):
12231         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12232         is defined, since we now use prototypes always.
12233
12234         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12235         C89 or better.  All uses removed.
12236
12237 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12238
12239         * config/srclist.txt: Add glibc bugs 1220-1227.
12240
12241 2005-08-20  Jim Meyering  <jim@meyering.net>
12242
12243         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12244         of unused local, dfa.
12245
12246 2005-08-20  Bruno Haible  <bruno@clisp.org>
12247
12248         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12249
12250 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12251
12252         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12253         (re_node_set_insert_last, re_dfa_add_node):
12254         Rename local variables to avoid GCC shadowing warnings.
12255
12256 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12257
12258         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12259         [defined lint]: Suppress bogus uninitialized-variable warnings.
12260
12261         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12262         and let the caller return REG_ESPACE if out of space.  This
12263         removes an uninitialied-variable warning with GCC 4.0.1, and also
12264         avoids taking the address of a local variable.  All callers
12265         changed.
12266
12267 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12268
12269         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12270         $LIBCSRC/posix/regexec.c.
12271         Add glibc bug 1217 for regcomp.c.
12272
12273 2005-08-19  Jim Meyering  <jim@meyering.net>
12274
12275         * lib/regexec.c (proceed_next_node): Redo local variables to
12276         avoid GCC shadowing warnings.
12277
12278 2005-08-18  Bruno Haible  <bruno@clisp.org>
12279
12280         * lib/strstr.c (strstr): Fix return value in multibyte case.
12281         * lib/strcasestr.c (strcasestr): Likewise.
12282
12283 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12284
12285         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12286
12287 2005-08-17  Jim Meyering  <jim@meyering.net>
12288
12289         Make the %s format (seconds since the epoch) work for a negative
12290         number and when used with a zero-padded field width, e.g. %015s.
12291
12292         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12293         label so that it precedes the code to set `digits'.  Otherwise,
12294         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12295         print `00-22'.  Now, it prints `-0022', as it should.
12296
12297 2005-08-17  Bruno Haible  <bruno@clisp.org>
12298
12299         * modules/strstr (Files): Add m4/mbrtowc.m4.
12300         (Depends-on): Add mbuiter.
12301
12302 2005-08-17  Bruno Haible  <bruno@clisp.org>
12303
12304         * modules/strcasestr: New file.
12305         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12306         strcasestr.
12307
12308 2005-08-17  Bruno Haible  <bruno@clisp.org>
12309
12310         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12311
12312 2005-08-17  Bruno Haible  <bruno@clisp.org>
12313
12314         * modules/mbuiter: New file.
12315         * MODULES.html.sh (Extended multibyte and wide character utilities):
12316         Add mbuiter.
12317
12318 2005-08-17  Bruno Haible  <bruno@clisp.org>
12319
12320         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12321         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12322
12323 2005-08-17  Bruno Haible  <bruno@clisp.org>
12324
12325         * m4/strcasestr.m4: New file.
12326
12327 2005-08-17  Bruno Haible  <bruno@clisp.org>
12328
12329         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12330         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12331
12332 2005-08-17  Bruno Haible  <bruno@clisp.org>
12333
12334         * lib/strcasestr.h: New file.
12335         * lib/strcasestr.c: New file.
12336
12337 2005-08-17  Bruno Haible  <bruno@clisp.org>
12338
12339         * lib/strcasecmp.c: Use mbuiter.h.
12340
12341 2005-08-17  Bruno Haible  <bruno@clisp.org>
12342
12343         * lib/mbuiter.h: New file.
12344
12345 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12346
12347         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12348         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12349         and gl_GETOPT are both invoked via different paths (as happens
12350         with GNU tar CVS because it uses both argp and getopt), the former
12351         wins.
12352
12353 2005-08-16  Bruno Haible  <bruno@clisp.org>
12354
12355         * modules/tls: New file.
12356         * MODULES.html.sh (Multithreading): Add tls.
12357
12358 2005-08-16  Bruno Haible  <bruno@clisp.org>
12359
12360         * modules/strnlen1: New file.
12361         * MODULES.html.sh (String handling): Add strnlen1.
12362
12363 2005-08-16  Bruno Haible  <bruno@clisp.org>
12364
12365         * modules/strcase (Files): Add m4/mbrtowc.m4.
12366         (Depends-on): Add strnlen1, mbchar.
12367
12368 2005-08-16  Bruno Haible  <bruno@clisp.org>
12369
12370         * modules/mbiter: New file.
12371         * MODULES.html.sh (Extended multibyte and wide character utilities):
12372         Add mbiter.
12373
12374 2005-08-16  Bruno Haible  <bruno@clisp.org>
12375
12376         * modules/mbfile: New file.
12377         * MODULES.html.sh (Extended multibyte and wide character utilities):
12378         Add mbfile.
12379
12380 2005-08-16  Bruno Haible  <bruno@clisp.org>
12381
12382         * modules/mbchar: New file.
12383         * MODULES.html.sh (Extended multibyte and wide character utilities):
12384         New section.
12385
12386 2005-08-16  Bruno Haible  <bruno@clisp.org>
12387
12388         * m4/tls.m4: New file, from GNU gettext.
12389
12390 2005-08-16  Bruno Haible  <bruno@clisp.org>
12391
12392         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12393         always.
12394         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12395
12396 2005-08-16  Bruno Haible  <bruno@clisp.org>
12397
12398         * m4/mbiter.m4: New file.
12399
12400 2005-08-16  Bruno Haible  <bruno@clisp.org>
12401
12402         * m4/mbfile.m4: New file.
12403
12404 2005-08-16  Bruno Haible  <bruno@clisp.org>
12405
12406         * m4/mbchar.m4: New file.
12407
12408 2005-08-16  Bruno Haible  <bruno@clisp.org>
12409
12410         * lib/tls.h: New file, from GNU gettext.
12411         * lib/tls.c: New file, from GNU gettext.
12412
12413 2005-08-16  Bruno Haible  <bruno@clisp.org>
12414
12415         * lib/strnlen1.h: New file.
12416         * lib/strnlen1.c: New file.
12417
12418 2005-08-16  Bruno Haible  <bruno@clisp.org>
12419
12420         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12421         (mbi_init): Update.
12422         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12423         NUL byte, not after it.
12424
12425 2005-08-16  Bruno Haible  <bruno@clisp.org>
12426
12427         * lib/strcase.h (strcasecmp): Add note in comments.
12428         * lib/strncasecmp.c: Use code from strcasecmp.c.
12429         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12430         (strcasecmp): Work correctly in multibyte locales.
12431
12432 2005-08-16  Bruno Haible  <bruno@clisp.org>
12433
12434         * lib/mbiter.h: New file.
12435
12436 2005-08-16  Bruno Haible  <bruno@clisp.org>
12437
12438         * lib/mbfile.h: New file.
12439
12440 2005-08-16  Bruno Haible  <bruno@clisp.org>
12441
12442         * lib/mbchar.h: New file.
12443         * lib/mbchar.c: New file.
12444
12445 2005-08-16  Bruno Haible  <bruno@clisp.org>
12446
12447         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12448         the valid ones. Makes the comparison operations transitive:
12449         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12450         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12451
12452 2005-08-15  Simon Josefsson  <jas@extundo.com>
12453
12454         * modules/ssize_t (License): Change to 'unlimited'.
12455
12456         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12457
12458 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12459
12460         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12461         Add comments for each pending glibc patch.
12462
12463 2005-08-15  Bruno Haible  <bruno@clisp.org>
12464
12465         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12466         __cplusplus is defined.
12467
12468 2005-08-14  Jim Meyering  <jim@meyering.net>
12469
12470         Sync from coreutils.
12471
12472         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12473         Use the hash-table-based cycle-detection code not just when
12474         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12475         Reported by James Youngman in
12476         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12477         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12478         FTS_TIGHT_CYCLE_CHECK.
12479         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12480         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12481         once again.
12482         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12483         * lib/fts.c (fd_safer): Remove decl.
12484         Include fcntl--.h rather than unistd-safer.h
12485         (fts_safe_changedir): Don't call fd_safer; no longer needed
12486         now that we include fcntl--.h.
12487
12488 2005-08-12  Simon Josefsson  <jas@extundo.com>
12489
12490         * modules/getndelim2: Use ssize_t module.
12491         * modules/getnline: Likewise.
12492         * modules/safe-read: Likewise.
12493         * modules/xreadlink: Likewise.
12494
12495         * modules/ssize_t: New file.
12496
12497 2005-08-12  Simon Josefsson  <jas@extundo.com>
12498
12499         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12500
12501 2005-08-12  Simon Josefsson  <jas@extundo.com>
12502
12503         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12504         ssize_t.
12505
12506 2005-08-12  Simon Josefsson  <jas@extundo.com>
12507
12508         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12509         readline, getdelim and check_version.
12510         (Support for systems lacking ISO C 99: Sizes of integer types):
12511         Add size_max.
12512
12513 2005-08-12  Bruno Haible  <bruno@clisp.org>
12514
12515         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12516
12517 2005-08-11  Simon Josefsson  <jas@extundo.com>
12518
12519         * modules/readline: New file.
12520
12521         * modules/strnlen (Files): Add strnlen.h.
12522
12523 2005-08-11  Simon Josefsson  <jas@extundo.com>
12524
12525         * m4/readline.m4: New file.
12526
12527 2005-08-11  Simon Josefsson  <jas@extundo.com>
12528
12529         * lib/readline.h, readline.c: New file.
12530
12531 2005-08-11  Simon Josefsson  <jas@extundo.com>
12532
12533         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12534         gl_AVOID.
12535
12536 2005-08-11  Bruno Haible  <bruno@clisp.org>
12537
12538         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12539
12540 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12541
12542         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12543
12544 2005-08-10  Simon Josefsson  <jas@extundo.com>
12545
12546         * tests/test-iconvme.c: New file.
12547
12548 2005-08-10  Simon Josefsson  <jas@extundo.com>
12549
12550         * m4/strnlen.m4: New file.
12551
12552         * m4/strndup.m4: Don't check for strnlen declaration, done in
12553         strnlen.m4.
12554
12555 2005-08-10  Simon Josefsson  <jas@extundo.com>
12556
12557         * lib/strndup.c: Use strnlen.h.
12558
12559         * lib/strnlen.h: New file.
12560
12561 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12562
12563         * README: Typos.
12564
12565 2005-08-02  Simon Josefsson  <jas@extundo.com>
12566
12567         * modules/readline: New file.
12568
12569 2005-08-02  Simon Josefsson  <jas@extundo.com>
12570
12571         * modules/getdelim: New file.
12572
12573         * modules/getline: Rewrite, don't use getndelim2.
12574
12575 2005-08-02  Simon Josefsson  <jas@extundo.com>
12576
12577         * m4/getline.m4: Separate out getdelim stuff into separate module.
12578
12579         * m4/getdelim.m4: New file.
12580
12581 2005-08-02  Simon Josefsson  <jas@extundo.com>
12582
12583         * lib/getline.h, getline.c: Rewrite.
12584
12585         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12586
12587 2005-07-31  Bruno Haible  <bruno@clisp.org>
12588
12589         * lib/lock.h (gl_lock_initializer): New macro.
12590         (gl_lock_define_initialized): Use it.
12591         (gl_rwlock_initializer): New macro.
12592         (gl_rwlock_define_initialized): Use it.
12593         (gl_recursive_lock_initializer): New macro.
12594         (gl_recursive_lock_define_initialized): Use it.
12595
12596 2005-07-30  Karl Berry  <karl@gnu.org>
12597
12598         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12599         Report from Ben Pfaff, regarding getopt.
12600
12601 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12602
12603         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12604         normal way.
12605         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12606         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12607         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12608         (gl_GETOPT): Use the new macros.  Most of the implementation
12609         is moved to the new macros.  This is for programs like Emacs
12610         that don't want all the functionality of gl_GETOPT.
12611
12612 2005-07-26  Bruno Haible  <bruno@clisp.org>
12613
12614         * m4/lock.m4: Update from GNU gettext.
12615
12616 2005-07-26  Bruno Haible  <bruno@clisp.org>
12617
12618         * lib/lock.h: Update from GNU gettext.
12619         * lib/lock.c: Update from GNU gettext.
12620
12621 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12622
12623         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12624         obsolescent AC_TRY_RUN.  Include the default includes files, for
12625         'exit'.
12626
12627 2005-07-24  Bruno Haible  <bruno@clisp.org>
12628
12629         * modules/visibility: New file.
12630         * MODULES.html.sh (Misc): Add visibility.
12631
12632 2005-07-24  Bruno Haible  <bruno@clisp.org>
12633
12634         * m4/visibility.m4: New file.
12635
12636 2005-07-24  Bruno Haible  <bruno@clisp.org>
12637
12638         * doc/visibility.texi: New file.
12639
12640 2005-07-22  Bruno Haible  <bruno@clisp.org>
12641
12642         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12643         $(ALLOCA_H), redundant through BUILT_SOURCES.
12644         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12645         redundant through BUILT_SOURCES.
12646         * modules/byteswap (Makefile.am): Remove explicit dependency on
12647         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12648         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12649         $(FNMATCH_H), redundant through BUILT_SOURCES.
12650         * modules/getopt (Makefile.am): Remove explicit dependency on
12651         $(GETOPT_H), redundant through BUILT_SOURCES.
12652         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12653         redundant through BUILT_SOURCES.
12654         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12655         redundant through BUILT_SOURCES.
12656         * modules/stdbool (Makefile.am): Remove explicit dependency on
12657         $(STDBOOL_H), redundant through BUILT_SOURCES.
12658         * modules/stdint (Makefile.am): Remove explicit dependency on
12659         $(STDINT_H), redundant through BUILT_SOURCES.
12660         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12661         Remove explicit dependency on $(SYSEXITS_H).
12662         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12663
12664 2005-07-18  Simon Josefsson  <jas@extundo.com>
12665
12666         * lib/check-version.c (check_version): Accept identical versions too.
12667
12668 2005-07-18  Bruno Haible  <bruno@clisp.org>
12669
12670         * modules/lock: New file.
12671         * MODULES.html.sh (Multithreading): New section.
12672
12673 2005-07-18  Bruno Haible  <bruno@clisp.org>
12674
12675         * m4/lock.m4: New file, from GNU gettext.
12676
12677 2005-07-18  Bruno Haible  <bruno@clisp.org>
12678
12679         * lib/lock.h: New file, from GNU gettext.
12680         * lib/lock.c: New file, from GNU gettext.
12681
12682 2005-07-18  Bruno Haible  <bruno@clisp.org>
12683
12684         * lib/lock.h (gl_once_t): New type.
12685         (gl_once_define, gl_once): New macros.
12686         * lib/lock.c (fresh_once): New variable.
12687         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12688         functions.
12689
12690 2005-07-16  Simon Josefsson  <jas@extundo.com>
12691
12692         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12693         workaround, suggested by Bruno.
12694
12695 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12696
12697         * modules/xalloc (Depends-on): Add xalloc-die.
12698         * modules/xvasprintf (Depends-on): Add xalloc-die.
12699
12700 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12701
12702         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12703         with a minor change.
12704
12705 2005-07-15  Bruno Haible  <bruno@clisp.org>
12706
12707         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12708         When using lib/poll.c, define poll as rpl_poll.
12709
12710 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12711
12712         * modules/argp (Depends-on): Remove unlocked-io.
12713
12714 2005-07-14  Derek Price  <derek@ximbiot.com>
12715
12716         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12717         for glob symlink bug.
12718
12719 2005-07-14  Bruno Haible  <bruno@clisp.org>
12720
12721         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12722         Instead, test for *_unlocked function declarations directly.
12723
12724 2005-07-11  Simon Josefsson  <jas@extundo.com>
12725
12726         * modules/size_max: New file.
12727
12728         * modules/xsize: Depend on size_max module for size_max.m4.
12729
12730 2005-07-11  Simon Josefsson  <jas@extundo.com>
12731
12732         * lib/size_max.h: New file.
12733
12734 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12735
12736         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12737         copyright symbol and the year.
12738         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12739         (version_etc_va): Use parameterized copyright notice.
12740         Reword to conform to the current GNU coding standards.
12741
12742 2005-07-11  Karl Berry  <karl@gnu.org>
12743
12744         * doc/gnulib.texi (Quoting): new node.
12745         (Initial import): more info, from Patrice.
12746
12747 2005-07-11  Bruno Haible  <bruno@clisp.org>
12748
12749         * gnulib-tool (func_usage): Document option --avoid.
12750         (Command line options): Handle --avoid.
12751         (func_acceptable): New function.
12752         (func_modules_transitive_closure): Use it.
12753
12754 2005-07-11  Bruno Haible  <bruno@clisp.org>
12755
12756         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12757         Reported by Jim Meyering.
12758
12759 2005-07-10  Bruno Haible  <bruno@clisp.org>
12760
12761         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12762         Needed when size_t is smaller than 'unsigned int'.
12763         Reported by Paul Eggert.
12764
12765 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12766
12767         * modules/argp (Depends-on): Add unlocked-io
12768
12769 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12770
12771         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12772         block of defines.
12773
12774 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12775
12776         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12777         fix now.
12778
12779 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12780         and Paul Eggert  <eggert@cs.ucla.edu>
12781
12782         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12783         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12784
12785 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12786
12787         * modules/regex (Files): Add lib/regex_internal.c,
12788         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12789         (Depends-on): Add extensions.
12790         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12791
12792 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12793
12794         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12795         pathconf.
12796         * m4/same.m4 (gl_SAME): Likewise.
12797         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12798
12799         * m4/regex.m4: Adjust to new libc regex implementation.
12800         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12801         all the .c and .h parts of (the new) regex.
12802         Quote the m4 stuff better.
12803         Check for RE_ICASE bug of old gnulib.
12804         Check for REG_STARTEND of recent libc.
12805         Rename local variables from jm_* to gl_*.
12806         Quote operand of "test -f".
12807         Say "recent enough" version of libc, not "version 2".
12808         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12809         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12810         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12811         Remove check for btowc, isascii.
12812         Require AM_LANGINFO_CODESET.
12813
12814 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12815
12816         * lib/regex.c, regex.h: Sync from libc.
12817         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12818         * lib/regexec.c:
12819         New files, synced from libc, except that regex_internal.h
12820         currently has a small porting fix.
12821
12822 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12823
12824         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12825         regex_internal.c, regexec.c.
12826         Add regex_internal.h too, but as a comment, since the libc version
12827         is currently broken in gnulib mode.
12828
12829 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12830
12831         Support programs like Emacs that use gnulib but not gettext.
12832         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12833         * modules/gettext-h: New file.
12834         * modules/gettext (Files): Remove lib/gettext.h.
12835         (Depends-on): Add gettext-h.
12836         (Makefile.am): Remove lib_SOURCES.
12837         * modules/argmatch, modules/c-stack, modules/closeout:
12838         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12839         * modules/execute, modules/file-type, modules/getaddrinfo:
12840         * modules/getopt, modules/human, modules/javacomp:
12841         * modules/javaexec, modules/mkdir-p, modules/obstack:
12842         * modules/openat, modules/pagealign_alloc, modules/pipe:
12843         * modules/quotearg, modules/regex, modules/rpmatch:
12844         * modules/unicodeio, modules/userspec, modules/version-etc:
12845         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12846         * modules/xsetenv:
12847         Depend on gettext-h, not gettext.
12848
12849 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12850
12851         * gnulib-tool (func_import): Add support for 'public domain' license.
12852         * modules/alloca, modules/atexit, modules/memmove:
12853         Now public domain, not GPL.
12854         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12855         * modules/realloc, modules/strerror, modules/strtod:
12856         Now LGPL, not GPL.
12857
12858 2005-07-05  Bruno Haible  <bruno@clisp.org>
12859
12860         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12861         autoconf CVS. Needed for mingw.
12862
12863 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12864
12865         Remove the dependency of the strftime module on the tzset module.
12866         * modules/strftime (Depends-on): Remove dependency on tzset.
12867
12868 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12869
12870         Remove the dependency of the strftime module on the tzset module.
12871         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12872         gl_FUNC_TZSET_CLOBBER.
12873
12874 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12875
12876         Remove the dependency of the strftime module on the tzset module.
12877         * lib/strftime.c (my_strftime)
12878         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12879         Copy the input structure, to work around some of the bug with
12880         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12881         Solaris releases, you should also use the tzset module, but we won't
12882         require it as a dependency any more since we don't want LGPLed code
12883         to depend on GPLed code.
12884
12885 2005-07-02  Jim Meyering  <jim@meyering.net>
12886
12887         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12888         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12889         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12890         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12891
12892 2005-07-02  Jim Meyering  <jim@meyering.net>
12893
12894         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12895
12896 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12897
12898         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12899         declares only 'struct timespec;' (!).
12900
12901 2005-07-01  Jim Meyering  <jim@meyering.net>
12902
12903         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12904         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12905         * lib/save-cwd.c, tempname.c:
12906         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12907         and don't include <sys/file.h>).
12908
12909 2005-06-29  Jim Meyering  <jim@meyering.net>
12910
12911         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
12912         type name.  Use the variable name instead.
12913         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
12914         Likewise.
12915
12916 2005-06-28  Simon Josefsson  <jas@extundo.com>
12917
12918         * modules/check-version (Files): Add check-version.m4.
12919
12920 2005-06-28  Simon Josefsson  <jas@extundo.com>
12921
12922         * m4/check-version.m4: New file, suggested by Jim Meyering
12923         <jim@meyering.net>.
12924
12925 2005-06-28  Simon Josefsson  <jas@extundo.com>
12926
12927         * lib/check-version.h, lib/check-version.c: New files.
12928
12929 2005-06-28  Simon Josefsson  <jas@extundo.com>
12930
12931         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
12932         collision with global variable.  Better indentation.  Don't
12933         increment buffer pointer beyond buffer end.  Based on comments
12934         from Paul Eggert <eggert@cs.ucla.edu>.
12935
12936         * lib/base64.h: Indent.
12937
12938 2005-06-28  Simon Josefsson  <jas@extundo.com>
12939
12940         * doc/gnulib.texi (Library version handling): New section.
12941
12942 2005-06-28  Jim Meyering  <jim@meyering.net>
12943
12944         * check-module (find_included_lib_files): Hard-code another
12945         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
12946         but modules/fts-lgpl (correctly) does not list those files.
12947
12948         * modules/canonicalize (Files): Add lib/pathmax.h.
12949
12950 2005-06-25  Simon Josefsson  <jas@extundo.com>
12951
12952         * modules/check-version: New file.
12953
12954 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
12955
12956         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
12957         initializer of struct addrinfo, as an indication that we don't
12958         care how many members the structure has.
12959
12960 2005-06-24  Derek Price  <derek@ximbiot.com>
12961         and Bruno Haible  <bruno@clisp.org>
12962
12963         Remove stat module & update lstat.
12964         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
12965         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
12966         * m4/stat.m4: Remove this file.
12967
12968 2005-06-24  Derek Price  <derek@ximbiot.com>
12969         and Bruno Haible  <bruno@clisp.org>
12970
12971         Remove stat module & update lstat.
12972         * lib/stat.c: Remove this file...
12973         (slash_aware_lstat): ...moving this content and its support...
12974         * lib/lstat.c (rpl_lstat): ...into here.
12975         * lib/lstat.h: New file.
12976
12977 2005-06-24  Derek Price  <derek@ximbiot.com>
12978         and Bruno Haible  <bruno@clisp.org>
12979
12980         Remove stat module & update lstat.
12981         * config/srclist.txt (libc sources): Remove stat.
12982
12983 2005-06-24  Derek Price  <derek@ximbiot.com>
12984         and Bruno Haible  <bruno@clisp.org>
12985
12986         Remove stat module & update lstat.
12987         * MODULES.html.sh (stat): Remove.
12988         * MODULES.html: Regenerated.
12989         * modules/lstat (Description): Correct function name.
12990         (Files): Add "lstat.h".
12991         (Depends-on): Remove stat, add xalloc, stat-macros.
12992         * modules/stat: Remove this file.
12993         (Include): Add "lstat.h", remove <sys/stat.h>.
12994
12995 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
12996
12997         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
12998         (ranged_convert): Don't save conversion in a temporary struct.
12999         This causes a warning with GCC 4.0.0, and anyway in the typical
13000         case it's not worth the extra 100 bytes or so of code.
13001         (ranged_convert, __mktime_internal): When calling a function via a
13002         pointer P, use P () rather than (*P) (), as we now assume C89 or
13003         better.
13004
13005 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13006
13007         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13008         "who -r" failed to give output.  Problem reported by Tim Waugh.
13009
13010         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13011         (xcalloc): Use it to avoid needless tests.
13012         Problem reported by Jim Meyering.
13013
13014 2005-06-20  Derek Price  <derek@ximbiot.com>
13015
13016         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13017         unnecessary for Autoconfs > 2.59c.
13018
13019 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13020
13021         * lib/argp.h (__option_is_short): Check upper limit of
13022         __key. Isprint() requires its argument to have the value
13023         of an unsigned char or EOF.
13024
13025 2005-06-16  Jim Meyering  <jim@meyering.net>
13026
13027         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13028         when either N or S is zero.
13029
13030 2005-06-16  Derek Price  <derek@ximbiot.com>
13031
13032         * m4/bison.m4: Declare YACC & YFLAGS precious.
13033
13034 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13035
13036         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13037         multibyte string or pattern, fall back on unibyte matching.
13038         Problem reported by James Youngman.
13039
13040 2005-06-08  Bruno Haible  <bruno@clisp.org>
13041
13042         * modules/csharpcomp: New file.
13043         * MODULES.html.sh (C#): Add csharpcomp.
13044
13045 2005-06-08  Bruno Haible  <bruno@clisp.org>
13046
13047         * m4/csharpcomp.m4: New file, from GNU gettext.
13048
13049 2005-06-08  Bruno Haible  <bruno@clisp.org>
13050
13051         * lib/csharpcomp.h: New file, from GNU gettext.
13052         * lib/csharpcomp.c: New file, from GNU gettext.
13053         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13054
13055 2005-06-08  Bruno Haible  <bruno@clisp.org>
13056
13057         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13058         warning on mingw.
13059
13060 2005-06-07  Derek Price  <derek@ximbiot.com>
13061
13062         Sync from CVS.
13063         * lib/glob_.h: Indent nested #ifdef.
13064
13065 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13066
13067         Sync from coreutils.
13068         Use "file name" when talking about file names, instead of "filename"
13069         or "path", as per the GNU coding standards.
13070         * lib/mkdir-p.c: Renamed from makepath.c.
13071         (make_dir_parents): Renamed from make_path.  All callers changed.
13072         * lib/mkdir-p.h: Likewise.  All includers changed.
13073         * lib/filenamecat.c: Renamed from path-concat.c.
13074         (file_name_concat): Renamed from path_concat.  All callers changed.
13075         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13076         * lib/filenamecat.h: Likewise.  All includers changed.
13077         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13078         in comments or local variable names.
13079         * lib/basename.c: Likewise.
13080         * lib/canonicalize.c, canonicalize.h: Likewise.
13081         * lib/dirname.c, dirname.h: Likewise.
13082         * lib/euidaccess.c: Likewise.
13083         * lib/exclude.c: Likewise
13084         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13085         * lib/fsusage.c, fsuage.h: Likewise.
13086         * lib/fts.c, fts_.h: Likewise.
13087         * lib/getcwd.c: Likewise.
13088         * lib/getloadavg.c: Likewise.
13089         * lib/mkstemp.c: Likewise.
13090         * lib/mountlist.c, mountlist.h: Likewise.
13091         * lib/openat.c, openat.h: Likewise.
13092         * lib/readlink-stub.c: Likewise.
13093         * lib/readutmp.c, readutmp.h: Likewise.
13094         * lib/rename.c: Likewise.
13095         * lib/rmdir.c: Likewise.
13096         * lib/same.c: Likewise.
13097         * lib/savedir.c: Likewise.
13098         * lib/stripslash.c: Likewise.
13099         * lib/tempname.c: Likewise.
13100         * lib/xreadlink.c: Likewise.
13101         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13102         All uses changed.
13103         * lib/exclude.h: Likewise.
13104
13105         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13106         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13107         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13108         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13109         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13110         files have been getting away with it for years (MORE/BSD 4.3
13111         is extinct now).
13112         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13113         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13114
13115         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13116         Define to 256, not 255, as per modern POSIX.
13117
13118 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13119
13120         Sync from coreutils.
13121         Use "file name" when talking about file names, instead of "filename"
13122         or "path", as per the GNU coding standards.
13123         * MODULES.html.sh: mkdir-p renamed from makepath.
13124         filenamecat renamed from path-concat.
13125         * modules/filenamecat: Renamed from modules/path-concat.
13126         (Files): filenamecat.h and filenamecat.c renamed from
13127         path-concat.h and path-concat.c.
13128         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13129         (Include): filenamecat.h, not path-concat.h.
13130         * modules/mkdir-p: Renamed from modules/makepath.
13131         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13132         makepath.c.
13133         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13134         (Include): mkdir-p.h, not makepath.h.
13135
13136 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13137
13138         Sync from coreutils.
13139         * m4/mkdir-p.m4: Renamed from makepath.m4.
13140         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13141         Rename files from makepath.c to mkdir-p.c, and from
13142         makepath.h to mkdir-p.h.
13143         * m4/filenamecat.m4: Renamed from path-concat.m4.
13144         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13145         Rename files from path-concat.c to filenamecat.c,
13146         and from path-concat.h to filenamecat.h.
13147         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13148         "file name" in local variables or comments.
13149         * m4/rename.m4: Likewise.
13150
13151 2005-06-01  Bruno Haible  <bruno@clisp.org>
13152
13153         * modules/csharpexec: New file.
13154         * MODULES.html.sh (C#): New section.
13155
13156 2005-06-01  Bruno Haible  <bruno@clisp.org>
13157
13158         * m4/csharp.m4: New file, from GNU gettext.
13159         * m4/csharpexec.m4: New file, from GNU gettext.
13160
13161 2005-06-01  Bruno Haible  <bruno@clisp.org>
13162
13163         * lib/csharpexec.h: New file, from GNU gettext.
13164         * lib/csharpexec.c: New file, from GNU gettext.
13165         * lib/csharpexec.sh.in: New file, from GNU gettext.
13166
13167 2005-05-31  Derek Price  <derek@ximbiot.com>
13168             Paul Eggert  <eggert@cs.ucla.edu>
13169
13170         Sync from cvs.
13171         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13172
13173 2005-05-31  Derek Price  <derek@ximbiot.com>
13174             Paul Eggert  <eggert@cs.ucla.edu>
13175
13176         Sync from cvs.
13177         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13178
13179 2005-05-29  Derek Price  <derek@ximbiot.com>
13180
13181         * config/srclist.txt (glob_.h, glob.c): Add these files.
13182
13183 2005-05-29  Derek Price  <derek@ximbiot.com>
13184
13185         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13186         * modules/glob: New file.
13187         * modules/getlogin_r: Add link to POSIX spec in description.
13188
13189 2005-05-29  Derek Price  <derek@ximbiot.com>
13190             Paul Eggert  <eggert@cs.ucla.edu>
13191
13192         * m4/glob.m4: New file.
13193
13194 2005-05-29  Derek Price  <derek@ximbiot.com>
13195             Paul Eggert  <eggert@cs.ucla.edu>
13196
13197         * lib/glob_.h, lib/glob.c: New files.
13198
13199 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13200
13201         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13202         * modules/fts-lgpl (Depends-on): Remove gettext.
13203
13204 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13205
13206         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13207         and don't require gt_INTTYPES_PRI.
13208
13209 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13210
13211         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13212
13213         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13214         the configuration hassle isn't worth it.
13215         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13216         (LONGEST_MODIFIER, PRIuMAX): Remove.
13217
13218 2005-05-27  Bruno Haible  <bruno@clisp.org>
13219
13220         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13221
13222 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13225         _POSIX_PTHREAD_SEMANTICS for Solaris.
13226
13227 2005-05-25  Derek Price  <derek@ximbiot.com>
13228
13229         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13230
13231 2005-05-25  Derek Price  <derek@ximbiot.com>
13232             Paul Eggert  <eggert@cs.ucla.edu>
13233
13234         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13235         * lib/getlogin_r.c, getlogin_r.h: New files.
13236
13237 2005-05-25  Bruno Haible  <bruno@clisp.org>
13238             Derek Price  <derek@ximbiot.com>
13239
13240         * lib/getlogin_r.h: Simplify API documentation.
13241
13242 2005-05-23  Derek Price  <derek@ximbiot.com>
13243
13244         * modules/minmax (Files): Add m4/minmax.m4.
13245         (configure.ac): Add gl_MINMAX.
13246
13247 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13248
13249         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13250         so that unistd-safer.h (GPL'ed code) need not be included.
13251
13252 2005-05-22  Bruno Haible  <bruno@clisp.org>
13253
13254         * m4/minmax.m4: New file.
13255         Based on a patch by Derek Price <derek@ximbiot.com>.
13256
13257 2005-05-22  Bruno Haible  <bruno@clisp.org>
13258
13259         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13260         (INT64_MIN): Fix definition.
13261         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13262
13263         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13264         NEED_SIGNED_INT_TYPES.
13265
13266         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13267         HAVE_SYSTEM_INTTYPES.
13268
13269 2005-05-22  Bruno Haible  <bruno@clisp.org>
13270
13271         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13272         Also include <sys/param.h> if it defines MIN, MAX.
13273         Based on a patch by Derek Price <derek@ximbiot.com>.
13274
13275 2005-05-21  Jim Meyering  <jim@meyering.net>
13276
13277         * modules/fts (Files): Add m4/inttypes-pri.m4.
13278         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13279
13280 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13281
13282         New fts module.
13283         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13284         (setup_dir, free_dir): New functions.
13285         (enter_dir, leave_dir): Define trivial
13286         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13287         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13288         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13289         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13290         Move to fts-cycle.c.
13291         (fts_open): Use setup_dir.
13292         (fts_close): Use free_dir.
13293         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13294         This adds a label and some gotos, but the alternatives were messier.
13295         Check for memory allocation failure when entering a dir.
13296         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13297         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13298         (FTS): New member fts_cycle, that is a union that contains the
13299         old active_dir_ht and cycle_state.  All uses changed to mention
13300         fts_cycle.ht and fts_cycle.state.
13301         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13302         fts.c, with the following changes:
13303         (setup_dir, free_dir): New functions.
13304         (enter_dir): Now returns bool.  Return true if successful, false
13305         if memory exhausted.  All callers changed.
13306         Do not bother partly cleaning up on
13307         memory allocation failure; that is free_dir's job.
13308         However, free ad if hash_insert fails, to avoid memory leak.
13309         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13310         fts->fts_options to see which union member to use.
13311
13312 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13313
13314         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13315         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13316
13317 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13318
13319         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13320
13321 2005-05-20  Jim Meyering  <jim@meyering.net>
13322
13323         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13324         Now a macro, to pacify GCC.
13325
13326 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13327
13328         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13329         of -1.
13330
13331 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13332
13333         * lib/chown.c (rpl_chown): Return -1 on failure.
13334
13335 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13336
13337         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13338         Don't check for stddef.h.
13339         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13340         don't use its results.
13341         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13342         since we include them unconditionally.  Don't require
13343         AM_STDBOOL_H, since stdbool is a prerequisite.
13344         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13345         since we assume C89 or better.
13346         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13347         as we don't use their results.
13348         Don't check for fchdir, memmove, memset, strrchr, as we use
13349         them unconditionally.
13350         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13351         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13352
13353 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13354
13355         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13356         Include <stddef.h> unconditionally, since we assume C89 now.
13357         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13358         * lib/fts.c: Include fts_.h first, to check interface.
13359         Do not include intprops.h; no longer needed.
13360         Include cycle-check.h and hash.h, since fts_.h no longer does.
13361         Remove unnecessary casts of closedir to void.
13362         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13363         decide whether to decrement nlinks.
13364         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13365         (FTS): Use struct hash_table * instead of Hash_table, so that
13366         we no longer need to include hash.h here.
13367
13368 2005-05-18  Jim Meyering  <jim@meyering.net>
13369
13370         * modules/dirfd (License): Change to LGPL.  Most of the code
13371         is already in the public domain.
13372
13373 2005-05-18  Jim Meyering  <jim@meyering.net>
13374
13375         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13376         Reported by Yoann Vandoorselaere.
13377
13378 2005-05-17  Jim Meyering  <jim@meyering.net>
13379
13380         * m4/fts.m4: New file, from coreutils.
13381
13382 2005-05-17  Jim Meyering  <jim@meyering.net>
13383
13384         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13385
13386 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13387
13388         Sync from coreutils.
13389         * m4/unlinkdir.m4: New file.
13390
13391 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13392
13393         Sync from coreutils.
13394         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13395         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13396         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13397         White space changes only.
13398         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13399         special.
13400         * lib/yesno.c: Include getline.h, not ctype.h.
13401         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13402         Use getline to remove arbitrary restriction on response length.
13403
13404 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13405
13406         * config/srclist-update: Spell out "Street" in FSF postal
13407         mail address; this is the style the FSF seems to prefer.
13408
13409         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13410         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13411         this updates FSF postal mail address.
13412
13413         Sync from coreutils.
13414         * modules/unlinkdir: New file.
13415         * modules/yesno (Depends-on): Add getline.
13416         * MODULES.html.sh (File system functions): Add unlinkdir.
13417
13418 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13419
13420         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13421         lib/strsep.h:
13422         Change the initial comment to refer to GPL, not LGPL.
13423         gnulib-tool will change it to LGPL as needed.
13424
13425         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13426         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13427         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13428         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13429         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13430         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13431         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13432         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13433         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13434         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13435         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13436         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13437         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13438         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13439         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13440         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13441         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13442         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13443         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13444         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13445         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13446         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13447         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13448         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13449         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13450         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13451         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13452         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13453         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13454         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13455         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13456         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13457         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13458         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13459         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13460         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13461         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13462         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13463         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13464         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13465         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13466         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13467         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13468         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13469         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13470         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13471         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13472         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13473         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13474         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13475         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13476         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13477         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13478         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13479         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13480         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13481         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13482         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13483         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13484         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13485         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13486         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13487         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13488         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13489         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13490         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13491         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13492         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13493         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13494         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13495         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13496         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13497         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13498         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13499         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13500         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13501         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13502         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13503         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13504         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13505         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13506         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13507         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13508         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13509         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13510         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13511         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13512         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13513         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13514         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13515         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13516         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13517         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13518         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13519         lib/yesno.c, lib/yesno.h:
13520         Update FSF postal mail address.
13521
13522 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13523
13524         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13525         tests/test-memmem.c, tests/test-stpncpy.c:
13526         Update FSF postal mail address.
13527
13528 2005-05-13  Bruno Haible  <bruno@clisp.org>
13529
13530         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13531         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13532         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13533         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13534         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13535         Add support for 64-bit integers in the MSVC compiler.
13536
13537 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13538
13539         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13540
13541 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13542
13543         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13544
13545 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         * doc/getdate.texi (General date syntax): Don't say that date
13548         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13549         Problem reported by Nic Ferrier.
13550
13551 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13552
13553         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13554         specified in ai_socktype. Fix invalid ai_protocol
13555         check. ai_protocol is usually set to 0 or depending on
13556         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13557         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13558         ai_socktype / ai_protocol in the returned addrinfo structure.
13559
13560 2005-05-10  Simon Josefsson  <jas@extundo.com>
13561
13562         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13563         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13564
13565 2005-05-10  Karl Berry  <karl@gnu.org>
13566
13567         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13568         (from http://www.gnu.org/licenses).
13569         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13570         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13571         fdl.texi suffices.
13572
13573 2005-05-10  Karl Berry  <karl@gnu.org>
13574
13575         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13576         (COPYING.DOC): remove.
13577
13578         * config/srclist-update: new FSF address.
13579
13580 2005-05-10  Derek Price  <derek@ximbiot.com>
13581
13582         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13583         possible.
13584
13585 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13586             Bruno Haible  <bruno@clisp.org>
13587
13588         * modules/inet_ntop: New file.
13589         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13590         inet_ntop.
13591
13592 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13593             Bruno Haible  <bruno@clisp.org>
13594
13595         * m4/inet_ntop.m4: New file.
13596
13597 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13598             Bruno Haible  <bruno@clisp.org>
13599
13600         * lib/inet_ntop.h: New file.
13601         * lib/inet_ntop.c: New file, from glibc with modifications.
13602
13603 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13604
13605         * modules/time_r (License): Change to LGPL.
13606         * modules/extensions (License): Change to LGPL.  Actually,
13607         the license is more permissive than that, but currently gnulib-tool
13608         doesn't know how to handle more-permissive licenses.
13609
13610         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13611         Problem reported by Dave Love.
13612
13613 2005-05-08  Jim Meyering  <jim@meyering.net>
13614
13615         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13616         blank.
13617
13618 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13619
13620         * modules/argmatch (Depends-on): Add stdbool.
13621         * modules/backupfile (Depends-on): Likewise.
13622         * modules/chdir-long (Depends-on): Likewise.
13623         * modules/closeout (Depends-on): Likewise.
13624         * modules/cycle-check (Depends-on): Likewise.
13625         * modules/dirname (Depends-on): Likewise.
13626         * modules/fnmatch (Depends-on): Likewise.
13627         * modules/fsusage (Depends-on): Likewise.
13628         * modules/fwriteerror (Depends-on): Likewise.
13629         * modules/getcwd (Depends-on): Likewise.
13630         * modules/getloadavg (Depends-on): Likewise.
13631         * modules/hard-locale (Depends-on): Likewise.
13632         * modules/makepath (Depends-on): Likewise.
13633         * modules/mountlist (Depends-on): Likewise.
13634         * modules/nanosleep (Depends-on): Likewise.
13635         * modules/posixtm (Depends-on): Likewise.
13636         * modules/quotearg (Depends-on): Likewise.
13637         * modules/readtokens (Depends-on): Likewise.
13638         * modules/readtokens0 (Depends-on): Likewise.
13639         * modules/readutmp (Depends-on): Likewise.
13640         * modules/save-cwd (Depends-on): Likewise.
13641         * modules/strftime (Depends-on): Likewise.
13642         * modules/userspec (Depends-on): Likewise.
13643         * modules/utimecmp (Depends-on): Likewise.
13644         * modules/xgetcwd (Depends-on): Likewise.
13645         * modules/xnanosleep (Depends-on): Likewise.
13646         * modules/xstrtod (Depends-on): Likewise.
13647         * modules/yesno (Depends-on): Likewise.
13648
13649 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13650
13651         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13652         needless checks.
13653
13654 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13655
13656         Merge from coreutils.  Among other things,
13657         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13658         * lib/fd-safer.c: New file.
13659         * lib/fcntl-safer.h, open-safer.c: Remove.
13660         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13661         * lib/dup-safer.c: Include unistd-safer.h first.
13662         Don't include errno.h.
13663         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13664         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13665         * lib/file-type.c: Rely on file-type.h change.
13666         * lib/getloadavg.c: Include unistd-safer.h.
13667         (getloadavg): Use safer open.
13668         * lib/getusershell.c: Include "stdio-safer.h".
13669         (getusershell): Use safer fopen.
13670         * lib/long-options.c (long_options): Use NULL rather than 0.
13671         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13672         'free'.
13673         * lib/modechange.c: Likewise.
13674         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13675         (MODE_DONE): New constant.
13676         (struct mode_change): Remove 'next' member.
13677         (make_node_op_equals): New function; like the old one of the
13678         same name, except it allocates an array.
13679         (mode_compile, mode_create_from_ref): Use it.
13680         (mode_compile): Allocate result as an array, not a linked list.
13681         Parse octal string ourself, so that we catch mistakes like "+0".
13682         (mode_adjust): Arg is an array, not a linked list.
13683         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13684         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13685         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13686         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13687         Remove.  This is now stat-macros.h's job.
13688         (talloc): Remove.  All callers replaced by xalloc, so that
13689         our invokers don't have to worry about reporting memory failures.
13690         (make_node_op_equals): Remove.
13691         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13692         New constants.
13693         (struct mode_change): Moved here from modechange.h.
13694         (mode_append_entry): Remove.
13695         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13696         apps to have incorrect behavior.  Use simpler algorithm for head
13697         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13698         Detect more invalid usages rather than having somewhat-random behavior.
13699         Don't insert an "a=" action, as that leads to incorrect behavior.
13700         (mode_compile, mode_create_from_ref): Return NULL on error instead
13701         of an enum, since now there's only one way to have an error.  All
13702         callers changed.
13703         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13704         at the correct time.  Simplify calculation of "+u" and its ilk.
13705         Don't mishandle "+X".
13706         (mode_free): Remove "register" and localize decls.
13707         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13708         (struct mode_change): Move to modechange.c; callers don't
13709         need to see this stuff.
13710         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13711         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13712         (mode_change, mode_adjust): Reflect the new signatures noted above.
13713         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13714         that might redefine system include files.
13715         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13716         (my_usleep): Use NULL rather than (void *) 0.
13717         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13718         Use siginterrupt to specify that system calls should be interrupted.
13719         (rpl_nanosleep): Move initialization of suspended closer to call of
13720         my_usleep.
13721         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13722         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13723         (desirable_utmp_entry): New function.
13724         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13725         using x2nrealloc, to simplify logic.
13726         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13727         size calculation.  Do not assume utmp file is a regular file.
13728         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13729         (READ_UTMP_CHECK_PIDS): New constant.
13730         * lib/save-cwd.c: Include unistd-safer.h.
13731         (save_cwd): Use fd_safer.
13732         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13733         [!_LIBC] Include "stat-macros.h" instead.
13734         * lib/unistd-safer.h (fd_safer): New decl.
13735
13736 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13737
13738         * modules/getloadavg (Depends-on): Add unistd-safer.
13739         * modules/getusershell (Depends-on): Add stdio-safer.
13740         * modules/lstat (Depends-on): Remove xalloc.
13741         * modules/mkstemp (Depends-on): Add stat-macros.
13742         * modules/modechange (Depends-on): Remove xstrtol.
13743         Add stat-macros, xalloc.
13744         * modules/save-cwd (Depends-on): Add unistd-safer.
13745         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13746         * modules/unistd-safer (Files): Add lib/fd-safer.c
13747         (Makefile.am): Remove lib_SOURCES.
13748
13749         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13750         Remove fcntl-safer; unistd-safer supersedes it.
13751
13752 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13753
13754         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13755         AC_HEADER_STAT.
13756         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13757         (gl_PREREQ_CHOWN): Remove.
13758         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13759         it.  Don't require AC_HEADER_STAT.
13760         (gl_PREREQ_LSTAT): Remove.
13761         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13762         Don't require AC_HEADER_STAT.
13763         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13764         (gl_PREREQ_RMDIR): Remove.
13765         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13766         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13767         the stat-macros module a prerequisite.
13768         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13769         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13770         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13771         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13772         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13773         variable names.
13774         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13775         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13776         variable prefixes.
13777         * m4/fcntl-safer.m4: Remove.
13778         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13779         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13780         Invoke gl_PREREQ_FD_SAFER.
13781         (gl_PREREQ_FD_SAFER): New macro.
13782         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13783         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13784         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13785         Remove duplicate call to AC_LIBOBJ(readutmp).
13786         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13787
13788         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13789         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13790
13791 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13792
13793         * MODULES.html.sh (Misc): Add byteswap.
13794
13795 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13796
13797         * modules/getcwd (Depends-on): Add extensions.
13798         * modules/openat (Depends-on): Likewise.
13799
13800 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13801
13802         * modules/byteswap: New file.
13803
13804 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13805
13806         * m4/byteswap.m4: New file.
13807
13808 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13809
13810         * lib/byteswap_.h: New file.
13811
13812 2005-04-25  Karl Berry  <karl@gnu.org>
13813
13814         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13815
13816 2005-04-25  Albert Chin  <china@thewrittenword.com>
13817
13818         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13819         Toolkit C bug.
13820
13821 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13822
13823         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13824         (func_ln_if_changed) Remove forcibly for no error message
13825         in case file does not exist.
13826
13827 2005-04-19  Simon Josefsson  <jas@extundo.com>
13828
13829         * gnulib-tool (Options): Make --symlink mean --symbolic.
13830
13831 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13832
13833         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13834
13835 2005-04-16  Simon Josefsson  <jas@extundo.com>
13836
13837         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13838
13839 2005-04-15  Simon Josefsson  <jas@extundo.com>
13840
13841         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13842
13843 2005-04-15  Simon Josefsson  <jas@extundo.com>
13844
13845         * gnulib-tool: Rename --symlink to --symbolic.
13846
13847 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13848
13849         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13850         symbolic links to files instead of copying/moving.  Add --aux-dir,
13851         specifying directory relative --dir where auxiliary build tools
13852         are placed.
13853
13854 2005-04-14  Bruno Haible  <bruno@clisp.org>
13855
13856         * modules/allocsa (License): Change to LGPL.
13857         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13858
13859 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13862         that "UTC +1 second" continues to work.  Problem reported
13863         by Dmitry V. Levin.
13864         (relunit_snumber): New rule.
13865         (relunit): Use it.
13866
13867 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13868
13869         * lib/getdate.y (universal_time_zone_table): New constant.
13870         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13871         universal_time_zone_table.
13872         (lookup_zone): Prefer universal_time_zone_table to
13873         local_time_zone_table, so that "GMT" time stamps are allowed in
13874         London during the summer.  Problem reported by Ian Abbott.
13875
13876 2005-04-12  Jim Meyering  <jim@meyering.net>
13877
13878         * lib/human.c (humblock): Set *options even when returning due to
13879         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13880         warning from gcc-4.
13881
13882 2005-04-09  Jim Meyering  <jim@meyering.net>
13883
13884         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13885         -Wuninitialized: initialize tm0.tm_year.
13886
13887 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13888
13889         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13890         count, since there's no maximum.  All uses changed.
13891         Add member dsts_seen.
13892         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13893         not being INT_MAX.
13894         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13895         Use pc_rels_seen to decide whther a date is absolute.
13896
13897         * lib/getdate.y (number): Don't overwrite year.
13898         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13899         check.
13900
13901 2005-04-02  Simon Josefsson  <jas@extundo.com>
13902
13903         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13904         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13905
13906 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13907
13908         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
13909         where no absolute path name can be longer than PATH_MAX.
13910
13911 2005-03-27  Jim Meyering  <jim@meyering.net>
13912
13913         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
13914
13915 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
13916
13917         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
13918         "one's complement" -> "ones' complement" in comment, as per Knuth.
13919         "value of type" -> "type or expression" in comment.
13920         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
13921
13922 2005-03-26  Jim Meyering  <jim@meyering.net>
13923
13924         Comment nits.
13925         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
13926         Correct typos: s/or/of/.
13927
13928 2005-03-26  Jim Meyering  <jim@meyering.net>
13929
13930         * modules/check-include-files: Move to ../ and rename to...
13931         * check-module: ...this.
13932
13933 2005-03-25  Jim Meyering  <jim@meyering.net>
13934
13935         * modules/xvasprintf (Files): Add xalloc.h.
13936
13937 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
13938
13939         * modules/gettext (Files): config/config.rpath ->
13940         build-aux/config.rpath
13941         * modules/iconv (Files): Likewise.
13942         Problem reported by Oskar Liljeblad.
13943
13944 2005-03-23  Jim Meyering  <jim@meyering.net>
13945
13946         * modules/check-include-files: New script to check for
13947         missing dependencies, multiple includes, etc.
13948
13949         * modules/c-strtold (Depends-on): Add xalloc.
13950         * modules/c-strtod (Depends-on): Add xalloc.
13951         * modules/hash (Depends-on): Add xalloc.
13952         (Files): Remove lib/xalloc.h.
13953
13954         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
13955         * modules/userspec (Files): Add lib/inttostr.h.
13956
13957 2005-03-23  Jim Meyering  <jim@meyering.net>
13958
13959         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
13960
13961 2005-03-22  Jim Meyering  <jim@meyering.net>
13962
13963         * modules/stat-macros: New module.
13964         * modules/canonicalize, modules/euidaccess, modules/file-type,
13965         * modules/filemode, modules/lchown, modules/makepath,
13966         * modules/rmdir, modules/stat: Depend on new stat-macros module
13967         rather than listing lib/stat-macros.h manually.
13968         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
13969
13970 2005-03-22  Jim Meyering  <jim@meyering.net>
13971
13972         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
13973
13974 2005-03-22  Bruno Haible  <bruno@clisp.org>
13975
13976         * config/srclist.txt: Replace target directory 'config' with
13977         'build-aux'.
13978         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
13979         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
13980         ../build-aux/.
13981
13982 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
13983
13984         * modules/chdir-long (Depends-on): Add mempcpy.
13985
13986         * modules/acl, modules/backupfile, modules/c-strtod,
13987         modules/c-strtold, modules/canon-host, modules/canonicalize,
13988         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
13989         modules/exclude, modules/exitfail, modules/file-type,
13990         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
13991         modules/getdate, modules/getline, modules/getpagesize,
13992         modules/getpass, modules/getugroups, modules/group-member,
13993         modules/hard-locale, modules/hash, modules/human, modules/idcache,
13994         modules/inttostr, modules/long-options, modules/makepath,
13995         modules/md5, modules/memcasecmp, modules/memcoll,
13996         modules/modechange, modules/mountlist, modules/path-concat,
13997         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
13998         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
13999         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14000         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14001         modules/strftime, modules/strndup, modules/strverscmp,
14002         modules/timespec, modules/unlocked-io, modules/userspec,
14003         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14004         modules/yesno:
14005         Remove lib_SOURCES line from Makefile.am section, as this is now
14006         done automatically by the corresponding Autoconf macro.
14007
14008 2005-03-21  Jim Meyering  <jim@meyering.net>
14009
14010         Changes imported from coreutils.
14011
14012         * lib/cycle-check.c: Don't include xalloc.h.
14013
14014         * lib/path-concat.c: Don't include assert.h.
14015         (path_concat): Remove assertion that would have triggered
14016         for ABASE starting with more than one slash.
14017         Reported by Andreas Schwab.
14018
14019         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14020         properly when ABASE is an absolute file name.
14021         Correct the description of this function.
14022         Include <assert.h>.
14023         Add an assertion and a test driver.
14024         This fixes a bug introduced on 2004-07-02.
14025         Andreas Schwab reported the resulting failure of cp --parents:
14026         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14027
14028 2005-03-21  Jim Meyering  <jim@meyering.net>
14029
14030         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14031         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14032
14033 2005-03-21  Jim Meyering  <jim@meyering.net>
14034         and  Paul Eggert  <eggert@cs.ucla.edu>
14035
14036         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14037         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14038         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14039         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14040         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14041         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14042         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14043         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14044         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14045         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14046         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14047         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14048         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14049         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14050         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14051         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14052         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14053         for these modules.
14054
14055 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14056
14057         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14058         (which shouldn't happen), generate nothing instead of returning 0
14059         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14060
14061 2005-03-16  Bruno Haible  <bruno@clisp.org>
14062
14063         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14064         HAVE_LONGLONG_64BIT.
14065
14066 2005-03-16  Bruno Haible  <bruno@clisp.org>
14067
14068         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14069         HAVE_LONGLONG_64BIT.
14070
14071 2005-03-16  Bruno Haible  <bruno@clisp.org>
14072
14073         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14074         HAVE_LONGLONG_64BIT.
14075
14076 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14077
14078         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14079         reliably distinguish strftime failure from empty output on POSIX
14080         hosts.
14081
14082 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14083
14084         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14085         (iconv_string): Don't guess a size-zero buffer, as that might cause
14086         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14087         result would be 'too large', where 'too large' is (heuristically)
14088         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14089         overflow concerns.  This will prevent some unwanted malloc failures
14090         when the inputs are very large.
14091
14092 2005-03-15  Karl Berry  <karl@gnu.org>
14093
14094         * config/srclist.txt (config.rpath): from gettext.
14095         * config/config.rpath: update.
14096
14097 2005-03-15  Bruno Haible  <bruno@clisp.org>
14098
14099         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14100         to 'negate'.
14101
14102         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14103         variable.
14104
14105         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14106         results.
14107
14108 2005-03-14  Simon Josefsson  <jas@extundo.com>
14109
14110         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14111         <fx@gnu.org>.
14112
14113 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14114
14115         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14116         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14117         intprops.h.
14118         * lib/strtol.c: Likewise.
14119
14120 2005-03-14  Jim Meyering  <jim@meyering.net>
14121
14122         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14123         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14124         to be nonzero so that we (and caller) can detect the difference
14125         between a valid zero-length expansion and an error return, even
14126         when the underlying strftime fails before writing anything into
14127         that location.
14128
14129 2005-03-14  Bruno Haible  <bruno@clisp.org>
14130
14131         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14132         Update from GNU gettext 0.14.3.
14133
14134 2005-03-10  Jim Meyering  <jim@meyering.net>
14135
14136         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14137
14138 2005-03-10  Jim Meyering  <jim@meyering.net>
14139
14140         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14141         so that this module works on systems without fchdir.
14142
14143 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14144
14145         Factor int-properties macros into a single file, except for
14146         glibc-related files.
14147         * lib/intprops.h: New file.
14148         * lib/getloadavg.c: Include it instead of limits.h.
14149         (INT_STRLEN_BOUND): Remove.
14150         * lib/human.c: Include intprops.h.
14151         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14152         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14153         302/1000.
14154         * lib/inttostr.h: Include intprops.h instead of limits.h.
14155         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14156         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14157         for consistency with intprops.h.
14158         (time_t_is_integer, twos_complement_arithmetic): Use them.
14159         * lib/sig2str.h: Include <signal.h>, intprops.h.
14160         (INT_STRLEN_BOUND): Remove.
14161         * lib/strftime.c (TYPE_SIGNED): Remove.
14162         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14163         * lib/strtol.c: Adjust comments to match intprops.h.
14164         * lib/userspec.c: Include intprops.h.
14165         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14166         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14167         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14168         instead of rolling our own expressions.
14169         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14170
14171         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14172         instead of int.
14173         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14174         the right thing even if adding 1900 would overflow.  Similarly
14175         for tm_mon + 1 and tm_yday + 1.
14176         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14177         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14178         (DO_SIGNED_NUMBER): New macro.
14179         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14180
14181 2005-03-07  Bruno Haible  <bruno@clisp.org>
14182
14183         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14184
14185 2005-03-07  Bruno Haible  <bruno@clisp.org>
14186
14187         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14188
14189 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14190
14191         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14192         (func_import): Only replace files via --import when they have actually
14193         changed.
14194
14195 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14196
14197         * m4/mmap-anon.m4: New file.
14198         * m4/pagealign_alloc.m4: New file.
14199
14200 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14201             Bruno Haible  <bruno@clisp.org>
14202
14203         * modules/pagealign_alloc: New file.
14204         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14205
14206 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14207             Bruno Haible  <bruno@clisp.org>
14208
14209         * lib/pagealign_alloc.h: New file.
14210         * lib/pagealign_alloc.c: New file.
14211
14212 2005-03-03  Bruno Haible  <bruno@clisp.org>
14213
14214         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14215         Use an all-permissive copyright notice, recommended by RMS.
14216
14217 2005-03-02  Bruno Haible  <bruno@clisp.org>
14218
14219         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14220         of AIX, the replacement has to be done only after <string.h> is
14221         included, therefore not in config.h. stpncpy.h does the replacement,
14222         and stpncpy.c uses it.
14223
14224 2005-03-02  Bruno Haible  <bruno@clisp.org>
14225
14226         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14227         stpncpy.c uses it.
14228
14229 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14230
14231         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14232         The workaround isn't strictly needed for POSIX conformance, and
14233         it's too much of a pain to configure and maintain.  We'll ask
14234         people to fix their kernels instead.
14235         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14236         (NANOSLEEP_BUG_WORKAROUND): Remove.
14237         (xnanosleep): Remove the workaround.
14238
14239 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14240
14241         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14242         Reported by Derek Price.
14243         (Include): Add "timespec.h".
14244
14245         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14246
14247 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14248
14249         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14250         to detect nanosleep bug.
14251
14252 2005-03-01  Bruno Haible  <bruno@clisp.org>
14253
14254         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14255
14256 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14257
14258         * modules/gethrxtime: New file.
14259         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14260         (Depends-on): Add gethrxtime.
14261         (configure.ac): Add gl_XNANOSLEEP.
14262         (Makefile.am): Remove lib_SOURCES line.
14263
14264 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14265
14266         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14267         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14268
14269 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14270
14271         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14272         * lib/timespec.h (gettime): Return void, since it always
14273         succeeds now.  All uses changed.
14274         * lib/gettime.c (gettime) Likewise.
14275         [HAVE_NANOTIME]: Prefer nanotime.
14276         Assume gettimeofday succeeds, as POSIX requires.
14277         Assime time () succeeds, since other code already does.
14278         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14279         (timespec_subtract): Remove.
14280         (NANOSLEEP_BUG_WORKAROUND): New constant.
14281         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14282         things considerably.  Use it only on GNU/Linux hosts, since the
14283         workaround shouldn't be needed elsewhere.
14284
14285 2005-02-24  Bruno Haible  <bruno@clisp.org>
14286
14287         * modules/gettext (Files): Add m4/glibc2.m4.
14288
14289 2005-02-24  Bruno Haible  <bruno@clisp.org>
14290
14291         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14292         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14293         * m4/progtest.m4:
14294         Update from GNU gettext 0.14.2.
14295         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14296
14297 2005-02-24  Bruno Haible  <bruno@clisp.org>
14298
14299         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14300         * lib/config.charset: Update from GNU gettext 0.14.2.
14301
14302 2005-02-24  Bruno Haible  <bruno@clisp.org>
14303
14304         * lib/gettext.h: Update from GNU gettext 0.14.2.
14305
14306 2005-02-23  Simon Josefsson  <jas@extundo.com>
14307
14308         * m4/iconvme.m4: New file.
14309
14310 2005-02-23  Jim Meyering  <jim@meyering.net>
14311
14312         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14313         change.
14314         Thanks to Bruno Haible for catching it.
14315
14316 2005-02-22  Simon Josefsson  <jas@extundo.com>
14317
14318         * modules/iconvme: New file.
14319
14320         * MODULES.html.sh: Add iconvme.
14321
14322 2005-02-22  Simon Josefsson  <jas@extundo.com>
14323
14324         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14325
14326 2005-02-22  Simon Josefsson  <jas@extundo.com>
14327
14328         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14329
14330 2005-02-22  Jim Meyering  <jim@meyering.net>
14331
14332         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14333         s/ifndef/ifdef/.
14334
14335 2005-02-20  Neil Conway  <neilc@samurai.com>
14336
14337         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14338         returned by OSX/Darwin if the specified buffer is not large
14339         enough for the hostname.
14340
14341 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14342
14343         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14344         pass it to _help, otherwise the latter coredumps trying to
14345         dereference state.root_argp.
14346
14347 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14348
14349         * modules/chdir-long (Depends-on): Add memrchr.
14350         * modules/memrchr (Files): Add lib/memrchr.h.
14351         (Include): "memrchr.h".
14352
14353 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14354
14355         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14356
14357 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14358
14359         * lib/memrchr.h: New file.
14360         * lib/chdir-long.c: Include it.
14361         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14362         Don't bother including stddef.h.
14363
14364 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14365
14366         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14367         inclusion.
14368         Include <sys/types.h>, for dev_t.
14369         (ME_DUMMY, ME_REMOTE): Move from here....
14370         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14371         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14372         Dmitry V. Levin.
14373         Include mountlist.h first, to test the interface.
14374
14375 2005-01-29  Bruno Haible  <bruno@clisp.org>
14376
14377         * lib/progname.c (program_name): Initialize.
14378         Needed when linking statically on MacOS X.
14379
14380 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14381
14382         Sync from coreutils.
14383         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14384         (Depends-on): Add c-strtod.
14385         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14386
14387 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14388
14389         Sync from coreutils.
14390         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14391
14392         Remove files that are specific to coreutils.
14393         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14394
14395 2005-01-28  Bruno Haible  <bruno@clisp.org>
14396
14397         * modules/javacomp: New file.
14398         * MODULES.html.sh (Java): Add javacomp.
14399
14400 2005-01-28  Bruno Haible  <bruno@clisp.org>
14401
14402         * m4/javacomp.m4: New file, from GNU gettext.
14403
14404 2005-01-28  Bruno Haible  <bruno@clisp.org>
14405
14406         * lib/javacomp.sh.in: New file, from GNU gettext.
14407         * lib/javacomp.h: New file, from GNU gettext.
14408         * lib/javacomp.c: New file, from GNU gettext.
14409
14410 2005-01-26  Simon Josefsson  <jas@extundo.com>
14411
14412         * lib/gai_strerror.c: Use GPL in header.
14413
14414 2005-01-26  Bruno Haible  <bruno@clisp.org>
14415
14416         * modules/javaexec: New file.
14417         * MODULES.html.sh (Java): Add javaexec.
14418
14419 2005-01-26  Bruno Haible  <bruno@clisp.org>
14420
14421         * m4/javaexec.m4: New file, from GNU gettext.
14422
14423 2005-01-26  Bruno Haible  <bruno@clisp.org>
14424
14425         * lib/javaexec.sh.in: New file, from GNU gettext.
14426         * lib/javaexec.h: New file, from GNU gettext.
14427         * lib/javaexec.c: New file, from GNU gettext.
14428
14429 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14430
14431         * modules/lchown (Depends-on): Remove lchown.h
14432
14433 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14434
14435         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14436         must be defined if the header file was not found, in order
14437         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14438
14439 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14440
14441         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14442         initializers for struct pentry_state.
14443         (__argp_error): Check return value of __asprintf
14444         (__argp_failure): Translate error message
14445
14446         * lib/argp-parse.c: Removed braces around the expansion of N_()
14447
14448 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14451         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14452         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14453         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14454         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14455         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14456         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14457         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14458         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14459         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14460         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14461         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14462         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14463         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14464         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14465         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14466         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14467         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14468         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14469         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14470         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14471         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14472         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14473         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14474         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14475         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14476         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14477         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14478         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14479         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14480         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14481         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14482         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14483         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14484         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14485         Use an all-permissive copyright notice, recommended by RMS.
14486
14487 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14488
14489         * modules/chdir-long (Depends-on): Remove mempcpy.
14490
14491 2005-01-21  Jim Meyering  <jim@meyering.net>
14492
14493         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14494         same value as for Solaris 9.
14495
14496         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14497         component length.  This included changing the parameter to be
14498         of type `char *' rather than `char const *'.
14499         * lib/chdir-long.h (chdir_long): Update prototype.
14500
14501         * lib/openat.c (fdopendir, fstatat): New functions.
14502         * lib/openat.h: Include headers required for use of DIR and struct
14503         stat.
14504         [AT_SYMLINK_NOFOLLOW]: Define.
14505         (fdopendir, fstatat): Add prototypes.
14506
14507 2005-01-21  Bruno Haible  <bruno@clisp.org>
14508
14509         * modules/classpath: New file.
14510         * MODULES.html.sh (Java): Add classpath.
14511
14512 2005-01-21  Bruno Haible  <bruno@clisp.org>
14513
14514         * lib/classpath.h: New file, from GNU gettext.
14515         * lib/classpath.c: New file, from GNU gettext.
14516
14517 2005-01-20  Simon Josefsson  <jas@extundo.com>
14518
14519         * modules/version-etc-fsf: New file.
14520
14521 2005-01-20  Simon Josefsson  <jas@extundo.com>
14522
14523         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14524         * lib/version-etc.c: Remove version_etc_copyright.
14525         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14526         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14527
14528 2005-01-20  Simon Josefsson  <jas@extundo.com>
14529
14530         * lib/base64.h (isbase64): Add.
14531
14532         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14533         using a unsigned prototype, don't inline.
14534         (base64_decode): Use it.
14535
14536 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14537
14538         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14539         it.
14540
14541 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14542
14543         * lib/save-cwd.c (save_cwd): Remove code to support the case
14544         where fchdir is missing or flaky.
14545
14546 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14547
14548         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14549
14550 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14551
14552         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14553         AC_LIBSOURCES now does this.
14554         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14555         with new ullong_max module.
14556
14557 2005-01-19  Bruno Haible  <bruno@clisp.org>
14558
14559         * modules/sh-quote: New file.
14560         * MODULES.html.sh (Executing programs): Add sh-quote.
14561
14562 2005-01-19  Bruno Haible  <bruno@clisp.org>
14563
14564         * lib/sh-quote.h: New file, from GNU gettext.
14565         * lib/sh-quote.c: New file, from GNU gettext.
14566
14567 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14568
14569         Merge from coreutils.
14570         * m4/ullong_max.m4: New file.
14571         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14572         (gl_MACROS): Assume localeconv exists.
14573
14574 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14575
14576         Merge changes from coreutils, as described below in several
14577         changelogs dated today.
14578
14579         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14580         (O_DIRECTORY): Remove; not needed here, since "." must be
14581         a directory.  All uses removed.
14582         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14583         universal on Suns, and we also need to test for IRIX.
14584         Revamp code to use 'if' rather than '#if'.
14585         Avoid unnecessary comparison of cwd->desc to 0.
14586
14587         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14588         for known valid error numbers rather than observed invalid ones.
14589
14590 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14591
14592         * modules/ullong_max: New file.
14593
14594         * modules/chdir-long, modules/openat: New files.
14595         * modules/save-cwd (Depends-on): Depend on chdir-long.
14596         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14597
14598 2005-01-18  Jim Meyering  <jim@meyering.net>
14599
14600         Merge from coreutils.
14601         * m4/chdir-long.m4, m4/openat.m4: New files.
14602         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14603         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14604         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14605         is sane and DOES follow symlinks.  Besides, testing 20 different
14606         systems found no broken chown implementations.
14607         Prompted by a change in rsync's copy of this macro.
14608         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14609
14610         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14611
14612         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14613         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14614         NULL-means-set-to-current-time semantics.
14615         Remove temporary file immediately, rather than waiting
14616         for configure's at-exit trap code to do it.
14617
14618 2005-01-18  Jim Meyering  <jim@meyering.net>
14619
14620         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14621
14622         * lib/utimens.c (futimens): Account for the fact that futimes
14623         can also fail with errno == ENOSYS or errno == ENOENT.
14624         Patch from Dmitry V. Levin.
14625
14626         Change the name of the robust chdir function from chdir to chdir_long.
14627         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14628         (restore_cwd): Use chdir_long, not chdir.
14629         * lib/chdir-long.c: Renamed from chdir.c.
14630         * lib/chdir-long.h: Renamed from chdir.h.
14631         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14632         Hurd.
14633
14634 2005-01-18  Bruno Haible  <bruno@clisp.org>
14635
14636         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14637         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14638         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14639         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14640         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14641         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14642         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14643         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14644         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14645         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14646         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14647         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14648         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14649         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14650         Use an all-permissive copyright notice, recommended by RMS.
14651
14652 2005-01-18  Bob Proulx  <bob@proulx.com>
14653
14654         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14655         simplify offsetof() macro construct to avoid compile failure with
14656         native HP-UX 11.0 ANSI C compiler.
14657
14658 2005-01-17  Bruno Haible  <bruno@clisp.org>
14659
14660         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14661         redundant because stpncpy.m4 takes care of it.
14662
14663 2005-01-17  Bruno Haible  <bruno@clisp.org>
14664
14665         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14666
14667 2005-01-17  Bruno Haible  <bruno@clisp.org>
14668
14669         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14670         used.
14671
14672 2005-01-17  Bruno Haible  <bruno@clisp.org>
14673
14674         * lib/fwriteerror.h (fwriteerror): Change specification to include
14675         fclose.
14676         * lib/fwriteerror.c: Include <stdbool.h>.
14677         (fwriteerror): At the end, close the file stream. Record whether
14678         stdout was already closed.
14679
14680 2005-01-17  Bruno Haible  <bruno@clisp.org>
14681
14682         * lib/execute.c (environ): Declare if needed.
14683         * lib/pipe.c (environ): Likewise.
14684         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14685
14686 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14687
14688         * modules/argp: Depend on vsnprintf
14689
14690 2005-01-10  Jim Meyering  <jim@meyering.net>
14691
14692         * modules/closeout (Depends-on): Add atexit.
14693
14694 2005-01-06  Bruno Haible  <bruno@clisp.org>
14695
14696         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14697
14698 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14699
14700         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14701         definitions to be after all include files, to avoid collisions.
14702         Problem reported by Bob Proulx.
14703
14704 2005-01-04  Jim Meyering  <jim@meyering.net>
14705
14706         Changes imported from coreutils.
14707         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14708         as the mkstemp template, use a temporary directory and an
14709         8.3-friendly template to avoid trouble on systems like DJGPP.
14710         Reported by Juan M. Guerrero via Stepan Kasal.
14711         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14712         close. Remove the temporary directory right away, rather than waiting
14713         for configure's at-exit trap code to do it.
14714         Suggestion from Stepan Kasal.
14715
14716 2005-01-01  Simon Josefsson  <jas@extundo.com>
14717
14718         * gnulib-tool: Print #include directives when --import'ing.
14719
14720 2004-12-28  Simon Josefsson  <jas@extundo.com>
14721
14722         * tests/test-base64.c: Include required header files.  Remove
14723         unused variables.
14724
14725 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14726
14727         * modules/error (Depends-on): Remove gettext.
14728
14729 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14730
14731         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14732         not needed.  This removes a dependency on the gettext module.
14733         [defined _LIBC]: Do not include <libintl.h>; not needed.
14734
14735 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14736
14737         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14738         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14739
14740 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14741
14742         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14743         HAVE_DECL_STRTOLD.
14744
14745 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14746
14747         * modules/getdate (Depends-on): Remove alloca-opt.
14748
14749 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14750
14751         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14752
14753 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14754
14755         * lib/argp-parse.c: Include <stddef.h>.
14756         (alignof, alignto): New macros.
14757         (parser_init): Don't assume that void * is aligned sufficiently
14758         for struct option.
14759
14760         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14761         need to extend the stack.
14762         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14763         large.
14764
14765 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14766
14767         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14768
14769 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14770
14771         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14772         (2004-10-24) change.  Apparently this was a false alarm.
14773
14774         * modules/getdate: Depend on alloca-opt, not alloca.
14775
14776 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14777
14778         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14779         Remove now-obsolete comment about AIX.
14780         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14781         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14782         (YYMAXDEPTH): New macro.
14783
14784 2004-12-18  Simon Josefsson  <jas@extundo.com>
14785
14786         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14787
14788 2004-12-18  Bruno Haible  <bruno@clisp.org>
14789
14790         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14791
14792 2004-12-18  Bruno Haible  <bruno@clisp.org>
14793
14794         * lib/fatal-signal.c (fatal_signals): Make non-const.
14795         (init_fatal_signals): New function.
14796         (uninstall_handlers, install_handlers): Ignore signals that were set to
14797         SIG_IGN.
14798         (at_fatal_signal): Call init_fatal_signals.
14799         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14800         SIG_IGN.
14801         Reported by Paul Eggert.
14802
14803 2004-12-18  Bruno Haible  <bruno@clisp.org>
14804
14805         * doc/alloca.texi: New file.
14806         * doc/alloca-opt.texi: New file.
14807
14808 2004-12-17  Jim Meyering  <jim@meyering.net>
14809
14810         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14811         Otherwise, install-sh could exit with improper exit status when
14812         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14813
14814 2004-12-16  Simon Josefsson  <jas@extundo.com>
14815
14816         * tests/test-base64.c: Add license.
14817
14818 2004-12-15  Stepan Kasal  <address@hidden>
14819
14820         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14821
14822 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14823
14824         * modules/getcwd (Files): Add m4/d-ino.m4.
14825         Suggested by Mark D. Baushke.
14826
14827 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14828
14829         * lib/getdate.y (textint): New member "negative".
14830         (time_zone_hhmm): New function.
14831         Expect 14 shift-reduce conflicts, not 13.
14832         (o_colon_minutes): New rule.
14833         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14834         (yylex): Set the "negative" member of signed numbers.
14835
14836 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14837
14838         * doc/getdate.texi (Time of day items, Time zone items):
14839         Describe new formats +00:00, UTC+00:00.
14840
14841 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14842
14843         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14844         spurious "-l"s.  Problem reported by Stepan Kasal.
14845
14846 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14847
14848         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14849         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14850
14851 2004-12-04  Simon Josefsson  <jas@extundo.com>
14852
14853         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14854         Vandoorselaere <yoann@prelude-ids.org>.
14855
14856 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14857
14858         Changes imported from coreutils.
14859         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14860         exist.
14861         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14862
14863 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14864
14865         Changes imported from coreutils.
14866         * lib/hard-locale.c: Assume <locale.h> exists.
14867         Include "strdup.h".
14868         (GLIBC_VERSION): New macro.
14869         (hard_locale): Assume setlocale exists.
14870         Rewrite to avoid #ifdef.
14871         Use strdup rather than malloc + strcpy.
14872         * lib/human.c: Assume <locale.h> exists.
14873         (human_readable): Assume localeconv exists.
14874
14875 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14876
14877         * modules/hard-locale (Depends-on): Add strdup.
14878
14879 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14880
14881         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14882         convert T2, not T.  (Imported from libc.)
14883
14884 2004-11-30  Simon Josefsson  <jas@extundo.com>
14885
14886         * modules/restrict (License): Change to LGPL.
14887
14888 2004-11-30  Simon Josefsson  <jas@extundo.com>
14889
14890         * m4/restrict.m4: Add copyright and copying conditions.
14891
14892 2004-11-30  Simon Josefsson  <jas@extundo.com>
14893
14894         * m4/base64.m4: New file.
14895
14896 2004-11-30  Simon Josefsson  <jas@extundo.com>
14897
14898         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14899         base64.
14900
14901         * tests/test-base64.c: New file.
14902
14903         * modules/base64: New file.
14904
14905 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14906
14907         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14908         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
14909
14910         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
14911
14912 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14913
14914         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
14915         (__getcwd.c): Don't restore errno; glibc doesn't.
14916         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
14917         first, falling back to our code only if its results look suspicious.
14918         Ensure that the resulting buffer is only as large as necessary.
14919
14920         * lib/readutmp.c: Include readutmp.h first.
14921         Include <errno.h>, since readutmp.h no longer does that.
14922         * lib/readutmp.h: Don't include <errno.h>,
14923         <sys/param.h>, <time.h>; not needed to establish interface.
14924         (errno): Remove decl.
14925         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
14926         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
14927         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
14928
14929 2004-11-28  Simon Josefsson  <jas@extundo.com>
14930
14931         * lib/base64.h, base64.c: New file.
14932
14933 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
14934
14935         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
14936
14937 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
14938
14939         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
14940         (Depends-on): Remove pathmax, same.  Add mempcpy.
14941         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
14942         (Makefile.am): Append getcwd.h to lib_SOURCES.
14943         (Include): Add getcwd.h.
14944         (Maintainer): Change from Jim Meyering to "all, glibc",
14945         since getdate now uses intended-for-glibc code.
14946         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
14947         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
14948
14949 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
14950
14951         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
14952         HP's ANSI C compiler.
14953         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
14954         Declaring int functions causes warnings on some modern systems and
14955         shouldn't be needed to compile on ancient ones.
14956         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
14957         defined.
14958
14959         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
14960         with the following changes.
14961         (__set_errno): Parenthesize properly.
14962         Include <stdbool.h>.
14963         (MIN, MAX, MATCHING_INO): New macros.
14964         (__getcwd): Define with prototype, not K&R form.
14965         Use heuristics to allocate default buffer on stack if possible.
14966         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
14967         behavior, and to avoid the PATH_MAX limit when computing
14968         ../../../../...
14969         Use MATCHING_INO to compare inode number to file.
14970         Check for arithmetic overflow in size calculations.
14971         Fix bug in reallocation of dot array that caused getcwd to fail
14972         on directories nested deeper than 75.
14973         Be more careful about saving errno on error.
14974         Do not use realloc; use only free+malloc, as this is a bit
14975         more flexible and avoids a needless copy operation.
14976         Do not inspect st_dev and st_ino for symbolic links; POSIX
14977         doesn't specify the latter.
14978         Check for closedir errors.
14979         Avoid needless casts.
14980         Use "#ifdef weak_alias" around weak_alias, to be like other
14981         glibc code.
14982         The following changes to getcwd.c have effect only when used in
14983         gnulib; they have no effect inside glibc proper.
14984         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
14985         as alloca isn't used.
14986         (alloca, __alloca): Likewise.
14987         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
14988         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
14989         unconditionally, as gnulib assumes C89 or better.
14990         Do not include <sys/param.h>.
14991         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
14992         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
14993         better.
14994         (NULL) [!defined NULL]: Remove; we assume C89 or better.
14995         Include <dirent.h> in a way that is compatible with modern Autoconf.
14996         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
14997         New macros, if not already defined.
14998         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
14999         Use "_LIBC", not "defined _LIBC", for consistency.
15000         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15001         a mempcpy module.
15002         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15003         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15004         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15005         credit only to Jim Meyering and adjust the copyright dates.
15006         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15007         <stdlib.h>, <unistd.h>, "pathmax.h".
15008         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15009         (INITIAL_BUFFER_SIZE): Remove.
15010         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15011
15012 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15013
15014         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15015         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15016         Use the _ONCE methods, for efficiency.
15017         Check for fcntl.h.  In test program, include <errno.h>
15018         and <fcntl.h> if available.  Remove old K&R cruft from
15019         test program.  Check for common errors in GNU/Linux,
15020         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15021         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15022         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15023         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15024         name accordingly.
15025         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15026         accommodate new getcwd.c.
15027         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15028         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15029         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15030         that's all we need now.
15031
15032 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15033
15034         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15035         argp-parse.c depends on getopt internals, that means we should
15036         always use our getopt, to be on the safe side.
15037         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15038         order not to spoil the result of an eventual previous invocation
15039         of gl_GETOPT_SUBSTITUTE.
15040
15041 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15042
15043         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15044         redefinition warnings. To avoid them, include the defines
15045         in `#if !defined __need_getopt ... #endif'. The only place
15046         where __getopt_argv_const is used is in definitions
15047         of getopt_long and getopt_long_only below, which are as well
15048         protected by `#ifndef __need_getopt'.
15049         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15050         __need_getopt after including <stdio.h> and <unistd.h> These
15051         headers might have defined it.
15052
15053 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15054
15055         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15056
15057 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15058
15059         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15060         (futimens): New function, which uses futimes if available.
15061         (futimens, utimens): Support timespec==NULL, with same semantics
15062         as utime and utimens.
15063         * lib/utimens.h (futimens): New decl.
15064
15065 2004-11-23  Jim Meyering  <jim@meyering.net>
15066
15067         * lib/getopt_.h: Remove trailing blanks.
15068
15069 2004-11-23  Jim Meyering  <jim@meyering.net>
15070
15071         * lib/__fpending.c: Add comment.
15072
15073 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15074
15075         * modules/canonicalize (Depends-on): Add xreadlink.
15076         Problem reported by James Youngman.
15077
15078 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15079
15080         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15081         New macros.
15082         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15083         optopt): Use them instead of invoking ## directly; otherwise, the
15084         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15085
15086 2004-11-19  Bruno Haible  <bruno@clisp.org>
15087
15088         * lib/strtok_r.c: Move comments from here...
15089         * lib/strtok_r.h: ... to here.
15090
15091 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15092
15093         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15094         implementations that mishandle size_t overflow.
15095
15096 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15097
15098         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15099         might fail.  Problem reported by Yoann Vandoorselaere.
15100         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15101         implementations that mishandle size_t overflow.
15102
15103 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         * modules/canon-host (Depends-on): Add strdup.
15106
15107 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15108
15109         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15110
15111 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15112
15113         * lib/canon-host.c: Include "strdup.h".
15114         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15115         Use strdup instead of malloc/strcpy to duplicate strings.
15116
15117         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15118         (human_space_before_unit): New constant.
15119         * lib/human.c (human_readable): Support it.
15120
15121         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15122         (xgetcwd): Set errno correctly when failing.
15123         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15124         the failure is actually due to a PATH_MAX problem.
15125
15126         Further getopt changes to make it more likely that glibc will
15127         buy the changes back.
15128         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15129         (getopt): Use it, so to preserve glibc semantic
15130         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15131         when compiling for libc.
15132         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15133         (getopt_long, getopt_long_only): Use it.
15134
15135         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15136         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15137         (getopt): Argv is now char * const *, as per standard.
15138         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15139         not char *__getopt_argv_const *.
15140         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15141         _getopt_long_only_r): Likewise.
15142         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15143         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15144         _getopt_long_r, _getopt_long_only_r): Likewise.
15145         * lib/getopt_.h (__getopt_argv_const): Remove.
15146         (getopt): Argv is now char * const *, as per standard.
15147
15148         * lib/getdate.y (tORDINAL): New token.
15149         (day, relunit): Allow it for relative times.
15150         (relative_time_table): Use tORDINAL for ordinals.
15151
15152 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15153
15154         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15155         Document that "second" isn't allowed as an ordinal number.
15156
15157 2004-11-16  Jim Meyering  <jim@meyering.net>
15158
15159         * modules/closeout (Depends-on): Add fpending.
15160
15161 2004-11-15  Jim Meyering  <jim@meyering.net>
15162
15163         * lib/closeout.c: Include "__fpending.h" once again.
15164         Include <stdbool.h>.
15165         (close_stdout): Don't fail just because stdout was closed initially,
15166         since some programs don't write to stdout in the normal course of
15167         operation (other than --version and --help), and we don't want this
15168         function to make e.g. `touch file >&-' fail.
15169         But do fail if it was closed and someone has tried to write to it.
15170         E.g., `printf foo >&-' must fail.
15171
15172 2004-11-13  Jim Meyering  <jim@meyering.net>
15173
15174         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15175
15176 2004-11-12  Simon Josefsson  <jas@extundo.com>
15177
15178         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15179         small doc fix is still pending.
15180
15181 2004-11-11  Simon Josefsson  <jas@extundo.com>
15182
15183         * modules/strtok_r: New file.
15184
15185         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15186         strtok_r.
15187
15188 2004-11-11  Simon Josefsson  <jas@extundo.com>
15189
15190         * m4/strtok_r.m4: New file.
15191
15192         * m4/getopt.m4: Replace opterr.
15193
15194 2004-11-11  Simon Josefsson  <jas@extundo.com>
15195
15196         * lib/strtok_r.h, strtok_r.c: New file.
15197
15198 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15201         of replacing opterr, getopt, etc.  This should handle the
15202         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15203
15204 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15205
15206         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15207         we can stop lying to compilers about the constness of argv when we
15208         are compiled outside glibc.
15209         (getopt, getopt_long, getopt_long_only): Use it.
15210         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15211         _getopt_internal, getopt): Likewise.
15212         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15213         _getopt_long_only_r): Likewise.
15214         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15215         _getopt_long_r, _getopt_long_only_r): Likewise.
15216
15217         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15218         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15219         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15220         the other external symbols.
15221         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15222         declaration, since the above renaming now works around collisions.
15223
15224 2004-11-11  Jim Meyering  <jim@meyering.net>
15225
15226         * lib/linebreak.c: Remove trailing blanks.
15227         * lib/alloca_.h: Likewise.
15228         * lib/acosl.c: Likewise.
15229         * lib/euidaccess.c: Likewise.
15230         * lib/allocsa.h: Likewise.
15231
15232 2004-11-10  Simon Josefsson  <jas@extundo.com>
15233
15234         * m4/getaddrinfo.m4: New file.
15235
15236 2004-11-10  Simon Josefsson  <jas@extundo.com>
15237
15238         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15239
15240 2004-11-10  Simon Josefsson  <jas@extundo.com>
15241
15242         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15243         getaddrinfo.
15244
15245         * modules/getaddrinfo: New file.
15246
15247 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15248
15249         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15250
15251 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15252
15253         * lib/mktime.c (SHR): New macro, which is a portable
15254         substitute for >> that should work even on Crays.
15255         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15256         Problem reported by Mark D. Baushke in
15257         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15258         * lib/getdate.y (SHR): Likewise.
15259         (tm_diff): Use it.
15260         * lib/strftime.c (SHR): Likewise.
15261         (tm_diff): Use it.
15262         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15263         quote_these_too, so that right shifts are well defined.  All uses
15264         changed.
15265
15266 2004-11-10  Jim Meyering  <jim@meyering.net>
15267
15268         Ensure that no close failure goes unreported.
15269         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15270         return early when it seems there's nothing to flush.
15271         Don't include __fpending.h.
15272
15273 2004-11-10  Jim Meyering  <jim@meyering.net>
15274
15275         * modules/closeout (Depends-on): Remove fpending.
15276
15277 2004-11-10  Jim Meyering  <jim@meyering.net>
15278
15279         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15280
15281 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15282
15283         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15284         gl_FUNC_STRFTIME.
15285         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15286         and AC_REQUIRE when possible, to avoid duplicate checks.
15287         Check for <wchar.h>.
15288
15289 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15290
15291         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15292
15293 2004-11-09  Bruno Haible  <bruno@clisp.org>
15294
15295         * m4/sockpfaf.m4: New file.
15296
15297 2004-11-05  Bruno Haible  <bruno@clisp.org>
15298
15299         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15300         Reported by Mark D. Baushke <mdb@cvshome.org>.
15301
15302 2004-11-04  Bruno Haible  <bruno@clisp.org>
15303
15304         2004-09-11  Bruno Haible  <bruno@clisp.org>
15305                 * allocsa.valgrind: New file.
15306         2004-02-06  Bruno Haible  <bruno@clisp.org>
15307                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15308                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15309                 Reported by Christopher Seip <chris.seip@hp.com>.
15310
15311 2004-11-04  Bruno Haible  <bruno@clisp.org>
15312
15313         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15314         (Makefile.am): Distribute it.
15315
15316 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15317
15318         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15319         with errno == ERANGE if the buffer is too small.
15320         Problem reported by Mark D. Baushke.
15321
15322 2004-11-03  Albert Chin  <china@thewrittenword.com>
15323             Paul Eggert  <eggert@cs.ucla.edu>
15324
15325         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15326         equivalent, substitute $ac_type for equivalent type rather than
15327         blindly using uint32_t *always* which won't work if uint32_t is not
15328         available.  Define _UINT32_T to work around typedef of uint32_t if
15329         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15330         2.5.1.
15331
15332 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15333
15334         * m4/jm-macros.m4: Sync from coreutils.
15335         (gl_MACROS): Check for mbrlen, for pathchk.
15336         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15337
15338 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * lib/xreadlink.c (MAXSIZE): New macro.
15341         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15342         size does not exceed MAXSIZE.  Avoid cast.
15343         As suggested by Mark D. Baushke in
15344         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15345         if readlink fails with buffer size just under MAXSIZE, try again
15346         with MAXSIZE.
15347
15348 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15349
15350         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15351
15352 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15353         and  Paul Eggert  <eggert@cs.ucla.edu>
15354
15355         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15356         (get_date): Overparenthesize to avoid GCC warning.
15357
15358 2004-11-02  Bruno Haible  <bruno@clisp.org>
15359
15360         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15361         returns void.
15362
15363 2004-11-02  Bruno Haible  <bruno@clisp.org>
15364
15365         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15366         function returns void.
15367
15368 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15371         fflush_unlocked, flockfile, funlockfile, funlockfile,
15372         fputs_unlocked, putc_unlocked.
15373
15374 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15375
15376         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15377         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15378         already declared.
15379
15380 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15381
15382         * modules/getdate (Files): Add doc/getdate.texi.
15383         (Depends-on): Add setenv, xalloc.
15384
15385 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15386
15387         * lib/getdate.y: Add support for TZ="foo" within a date string.
15388         Fix some bugs near time_t boundaries.  Reject dates with
15389         out-of-range components, e.g., "Sept 31".
15390         Include <stdlib.h>, "setenv.h", "xalloc.h".
15391         (ISDIGIT_LOCALE): Remove; unused.
15392         Note that the TZ and time functions used here are not reentrant.
15393         (mktime_ok, get_tz): New functions.
15394         (TZBUFSIZE): New constant.
15395         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15396         This requires that we sometimes generate our own TZ="XXX..." setting.
15397
15398 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15399
15400         * doc/getdate.texi: New file, from coreutils with modifications for
15401         the new TZ parsing.
15402
15403 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15404
15405         * lib/mktime.c (not_equal_tm): Remove redundant check.
15406
15407 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15408
15409         * modules/regex (lib_SOURCES): Add regex.c.
15410         Reported by James Youngman in
15411         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15412
15413 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15414
15415         * lib/getdate.y: Use Bison 1.875 features, and some minor
15416         code cleanups.  This change does not affect semantics.
15417         Don't include <stdlib.h>; no longer needed.
15418         Don't include unlocked-io.h; only the "#if TEST" code uses
15419         stdio, and performance isn't crucial there.
15420         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15421         Bison 1.875 features as described below.
15422         All uses of "PC." replaced by "pc->".
15423         (YYSTYPE): Add a forward declaration.
15424         (yylex, yyerror): Use full prototypes in forward decls.
15425         Use "%pure-parser" rather than obsolescent "%pure_parser".
15426         Use %parse-param and %lex-param instead of obsolescent
15427         YYPARSE_PARAM and YYLEX_PARAM.
15428         (meridian_table, month_and_day_table, time_units_table,
15429         relative_time_table, time_zone_table, military_table,
15430         lookup_zone, lookup_word, get_date):
15431         Use NULL instead of 0 where appropriate.
15432         (to_hour): Avoid abort (), to avoid a dependency on
15433         stdlib.h.
15434         (yyerror, yylex): Now accepts parser_control * arg.
15435         (main) [TEST]: Use '\0' rather than 0 for char.
15436
15437 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15438
15439         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15440
15441 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15442
15443         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15444         It's now the caller's responsibility to handle the case where
15445         !HAVE_GETPAGESIZE && !defined getpagesize.
15446
15447         * lib/mktime.c (leapyear): Arg is long int, not int.
15448
15449 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15450
15451         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15452
15453 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15454
15455         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15456         missing.  Problem reported by James Youngman.
15457
15458 2004-10-16  Simon Josefsson  <jas@extundo.com>
15459
15460         * gnulib-tool: Fix comments.  Fix parse problem.
15461         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15462
15463 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15464
15465         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15466         implementation of getopt_long.  Problem reported by Alexander Taler in:
15467         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15468
15469 2004-10-15  Bruno Haible  <bruno@clisp.org>
15470
15471         * gnulib-tool: Untabify. Initialize supplied_libname.
15472         (func_usage): More homogenous output.
15473         (func_modules_transitive_closure, func_modules_to_filelist,
15474         func_emit_lib_Makefile_am): New functions.
15475         (func_import): New function, extracted from big case statement. Use
15476         func_get_license, func_modules_transitive_closure,
15477         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15478         opt_lgpl. Don't use test -a, as it's not portable.
15479         (func_create_testdir): Use func_modules_transitive_closure,
15480         func_modules_to_filelist, func_emit_lib_Makefile_am.
15481
15482 2004-10-15  Bruno Haible  <bruno@clisp.org>
15483
15484         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15485
15486 2004-10-15  Bruno Haible  <bruno@clisp.org>
15487
15488         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15489         the portions belonging to each module.
15490         Suggested by Derek Robert Price <derek@ximbiot.com>.
15491
15492 2004-10-12  Simon Josefsson  <jas@extundo.com>
15493
15494         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15495         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15496         to real functions.
15497
15498 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15499
15500         * modules/vsnprintf: New file.
15501
15502 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15503
15504         * m4/vsnprintf.m4: New file.
15505
15506 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15507
15508         * lib/vsnprintf.h: New file.
15509         * lib/vsnprintf.c: New file.
15510
15511 2004-10-11  Bruno Haible  <bruno@clisp.org>
15512
15513         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15514         vsnprintf.
15515
15516 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15517
15518         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15519
15520 2004-10-07  Bruno Haible  <bruno@clisp.org>
15521
15522         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15523         fits into the provided buffer.
15524
15525 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15526
15527         * lib/diacrit.c, diacrit.h: Add GPL notice.
15528
15529         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15530         notice.
15531         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15532         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15533         This avoids a potential constant-folding bug.
15534
15535 2004-10-05  Bruno Haible  <bruno@clisp.org>
15536
15537         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15538         for the declaration of strsep.
15539
15540 2004-10-05  Bruno Haible  <bruno@clisp.org>
15541
15542         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15543
15544 2004-10-04  Simon Josefsson  <jas@extundo.com>
15545
15546         * modules/memmem: New file.
15547         * tests/test-memmem.c: New file.
15548         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15549
15550 2004-10-04  Simon Josefsson  <jas@extundo.com>
15551
15552         * m4/memmem.m4: New file.
15553
15554 2004-10-04  Simon Josefsson  <jas@extundo.com>
15555
15556         * lib/memmem.h: New file.
15557         * lib/memmem.c: New file, taken from glibc.
15558
15559 2004-10-04  Simon Josefsson  <jas@extundo.com>
15560
15561         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15562         '#ifdef USE_UNLOCKED_IO'.
15563
15564 2004-10-04  Simon Josefsson  <jas@extundo.com>
15565
15566         * config/srclist.txt: Add memmem from glibc.
15567
15568 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15569
15570         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15571
15572         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15573         modules/exclude, modules/getdate, modules/getline,
15574         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15575         modules/getusershell, modules/linebuffer, modules/md5,
15576         modules/mountlist, modules/posixtm, modules/readtokens,
15577         modules/readutmp, modules/regex, modules/sha1,
15578         modules/version-etc, modules/yesno:
15579         Remove dependency on unlocked-io.
15580
15581 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15582
15583         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15584
15585         * m4/unlocked-io.m4: Add copyright notice.
15586         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15587
15588 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15589
15590         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15591         * lib/xmalloc.c (xmemdup): Likewise.
15592         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15593         XFREE): Remove these long-obsolescent macros.
15594         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15595         * lib/xstrdup.c: Remove.
15596
15597         * lib/regex.c (re_comp): Cast gettext return value to char *,
15598         Problem reported by Martin Neitzel via Mark D. Baushke.
15599
15600 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15601
15602         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15603         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15604         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15605         regex.c, sha1.c, version-etc.c, yesno.c:
15606         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15607         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15608         the includer's responsibility.
15609
15610         Sync from coreutils.
15611
15612         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15613         points to the start of a string, as the C Standard says the
15614         resulting behavior is undefined.
15615
15616         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15617         simple -> simple_backups, numbered_existing ->
15618         numbered_existing_backups, numbered -> numbered_backups
15619         to avoid shadowing problems.  All uses changed.
15620         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15621         * lib/backupfile.c (check_extension, numbered_backup):
15622         Rename locals to avoid shadowing 'basename'.
15623         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15624         once.
15625
15626         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15627         * lib/.cvsignore: Add getopt.h.
15628
15629 2004-10-04  Bruno Haible  <bruno@clisp.org>
15630
15631         * modules/README: New file.
15632         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15633         not a module.
15634
15635 2004-10-02  Jim Meyering  <jim@meyering.net>
15636
15637         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15638
15639 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15640
15641         * modules/strsep: New file.
15642
15643 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15644
15645         * m4/strsep.m4: New file.
15646
15647 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15648
15649         * lib/strsep.h: New file.
15650         * lib/strsep.c: New file.
15651
15652 2004-10-01  Simon Josefsson  <jas@extundo.com>
15653
15654         * lib/snprintf.c (snprintf): Handle size==0.
15655
15656 2004-10-01  Simon Josefsson  <jas@extundo.com>
15657             Bruno Haible  <bruno@clisp.org>
15658
15659         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15660         (snprintf): Declare 'args'.
15661
15662 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15663
15664         * lib/snprintf.c: Remove comments as to why each header is needed.
15665
15666 2004-10-01  Bruno Haible  <bruno@clisp.org>
15667
15668         * MODULES.html.sh: Add strsep.
15669
15670 2004-09-30  Simon Josefsson  <jas@extundo.com>
15671
15672         * modules/snprintf: New file.
15673
15674 2004-09-30  Simon Josefsson  <jas@extundo.com>
15675
15676         * m4/snprintf.m4: New file.
15677
15678 2004-09-30  Simon Josefsson  <jas@extundo.com>
15679
15680         * lib/snprintf.h, lib/snprintf.c: New files.
15681
15682 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15683
15684         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15685         (hol_entry_help): Never translate an empty string.
15686         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15687         * lib/argp.h (OPTION_NO_TRANS): New option.
15688
15689 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15690
15691         * modules/argp (Maintainer): Replace Simon Josefsson
15692         by Sergey Poznyakoff.
15693
15694 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15695
15696         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15697         changes merged back into glibc.
15698
15699 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15700
15701         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15702
15703 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15704
15705         * lib/xvasprintf.c: Include xalloc.h.
15706         (xvasprintf): Use xalloc_die, not xmalloc_die.
15707
15708 2004-09-29  Bruno Haible  <bruno@clisp.org>
15709
15710         * modules/alloca-opt: New file, derived from modules/alloca.
15711         * modules/allocsa: Depend on alloca-opt instead of alloca.
15712         * modules/setenv: Likewise.
15713         * modules/vasnprintf: Likewise.
15714         * MODULES.html.sh: Add alloca-opt.
15715
15716 2004-09-28  Simon Josefsson  <jas@extundo.com>
15717
15718         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15719         LGPL, and to replace license template from GPL to LGPL.
15720
15721 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15722
15723         * modules/dummy: Change license to LGPL.
15724
15725 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15726
15727         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15728
15729 2004-09-24  Simon Josefsson  <jas@extundo.com>
15730
15731         * modules/minmax (License): Change from GPL to LGPL.
15732
15733 2004-09-23  Simon Josefsson  <jas@extundo.com>
15734
15735         * gnulib-tool (--import): Typo.
15736
15737 2004-09-23  Simon Josefsson  <jas@extundo.com>
15738
15739         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15740
15741 2004-09-22  Bruno Haible  <bruno@clisp.org>
15742
15743         * modules/*: Add 'License' field.
15744         * gnulib-tool: Accept --extract-license option.
15745         (func_get_license): New function.
15746
15747 2004-09-21  Bruno Haible  <bruno@clisp.org>
15748
15749         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15750         Reported by Simon Josefsson.
15751
15752 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15753
15754         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15755         gl_AC_TYPE_LONG_LONG.
15756
15757 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15758
15759         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15760
15761 2004-09-18  Simon Josefsson  <jas@extundo.com>
15762         and  Paul Eggert  <eggert@cs.ucla.edu>
15763
15764         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15765         calls with autoreconf.  Define GL_LIB.
15766
15767 2004-09-14  Karl Berry  <karl@gnu.org>
15768
15769         * config/srclist.txt: unsync setenv.c, sigh.
15770
15771 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15772
15773         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15774         Problem reported by Bruno Haible in:
15775         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15776
15777 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15778
15779         * config/srclist.txt: Comment out argp-pvh.c.
15780
15781 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15782
15783         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15784         in case some system header has #define'd it.  Problem reported by
15785         Soeren D. Schulze in
15786         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15787
15788 2004-09-09  Karl Berry  <karl@gnu.org>
15789
15790         * regex.[ch]: delete from the root.  These were supposed to be
15791                 synced with emacs cvs, but this has not happened for about
15792                 a year, and anyway nothing else uses emacs regex.[ch].
15793                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15794                 lib/regex[.ch] is untouched.
15795
15796 2004-09-09  Bruno Haible  <bruno@clisp.org>
15797
15798         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15799
15800 2004-09-09  Bruno Haible  <bruno@clisp.org>
15801
15802         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15803         modifications.
15804         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15805
15806 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15807
15808         * modules/xvasprintf: New file.
15809         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15810
15811 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15812
15813         * lib/xvasprintf.h: New file.
15814         * lib/xvasprintf.c: New file.
15815         * lib/xasprintf.c: New file.
15816
15817 2004-09-08  Bruno Haible  <bruno@clisp.org>
15818
15819         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15820
15821 2004-09-08  Bruno Haible  <bruno@clisp.org>
15822
15823         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15824         length is > INT_MAX.
15825         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15826         more.
15827
15828 2004-09-08  Bruno Haible  <bruno@clisp.org>
15829
15830         * lib/stdint_.h: New file, taken from GNU clisp.
15831
15832 2004-09-08  Bruno Haible  <bruno@clisp.org>
15833             Oskar Liljeblad  <oskar@osk.mine.nu>
15834
15835         * modules/stdint: New file.
15836         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15837
15838 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15839
15840         Import from coreutils.
15841         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15842         strings on unbounded length.  alloca's performance benefits aren't
15843         that important here.
15844         (V_STRDUP): Remove.
15845         (parse_with_separator): New function, with most of the internals
15846         of the old parse_user_spec.  Allow user to omit both user and group,
15847         for compatibility with FreeBSD.
15848         Clone only the user name, not the entire spec.
15849         Do not set *uid, *gid unless entirely successful.
15850         Avoid memory leak in some failing cases.
15851         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15852         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15853         (parse_user_spec): Rewrite to use parse_with_separator.
15854
15855 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15856
15857         * modules/userspec: Don't depend on alloca.
15858
15859 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15860
15861         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15862
15863 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15864
15865         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15866         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15867         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15868
15869 2004-08-16  Simon Josefsson  <jas@extundo.com>
15870
15871         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15872         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15873         Add --dry-run for --import.
15874         Let user provided command line parameters override configure.ac
15875         settings.
15876
15877 2004-08-12  Simon Josefsson  <jas@extundo.com>
15878
15879         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15880         as discussed with Paul Eggert in threads rooted at
15881         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15882         and
15883         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15884         Before, the test was empty, and relied on ELIDE_CODE in source
15885         code.)
15886         (gl_PREREQ_GETOPT): New macro.
15887         (gl_GETOPT): Use them.
15888
15889 2004-08-12  Simon Josefsson  <jas@extundo.com>
15890
15891         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15892         * lib/getopt_.h: Renamed from getopt.h.
15893
15894 2004-08-12  Simon Josefsson  <jas@extundo.com>
15895
15896         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15897         Change default library name from libfoo to libgnu.
15898         Now, if you have a configure.ac that says:
15899                 gl_SOURCE_BASE(gl)
15900                 gl_M4_BASE(gl/m4)
15901                 gl_MODULES(error getopt etcetera)
15902                 gl_INIT
15903         you can import all you need by running:
15904                 ../gnulib/gnulib-tool --import
15905
15906         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15907         (Makefile.am): Rewrite, use logic from argz.
15908         (Include): Use <getopt.h> instead of "getopt.h".
15909
15910 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15911
15912         * modules/argp (Files): Add m4/unlocked-io.m4.
15913         (Depends-on): Add extensions.
15914
15915 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15916
15917         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
15918         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
15919         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
15920         Check for program_invocation_name, program_invocation_short_name,
15921         flockfile, funlockfile, features.h, _getopt_long_only_r.
15922
15923 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15924
15925         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
15926         its complicated substitute.
15927         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
15928         and program_invocation_name.
15929         (__argp_basename) [!_LIBC]: Remove; the only use was
15930         replaced by its body.
15931         (__argp_short_program_name): Change condition from
15932         !defined __argp_short_program_name to
15933         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
15934         to match argp-namefrob.h.
15935         (__argp_failure): Don't assume strerror_r returns char *.
15936         * lib/argp-parse.c (N_): Define unconditionally.
15937         (argp_default_options): Fill out initializers with 0 to avoid
15938         gcc warnings.
15939
15940 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
15941
15942         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
15943         getopt1.c.
15944
15945 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15946
15947         Merge from coreutils.
15948
15949         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
15950
15951         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
15952         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
15953
15954 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         Merge from coreutils.
15957
15958         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
15959         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
15960         for Reliant Unix 5.43.
15961
15962         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
15963         (union fooround): Use uintmax_t, not long int.
15964         The rest is a merge from libc:
15965         [defined _LIBC]: Include <shlib-compat.h>.
15966         (_obstack) [defined _LIBC]: Remove after 2.3.4.
15967
15968         * lib/settime.c (settime): Recode to avoid warning with
15969         Sun Forte C 6U2.
15970
15971         * lib/strverscmp.c: Convert to UTF-8.
15972
15973 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
15974
15975         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
15976         m4/uintmax_t.m4.
15977
15978 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15979
15980         * modules/xalloc-die: New file.
15981         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
15982
15983         * modules/md5 (Files): Add m4/uint32_t.m4.
15984         * modules/sha1: Renamed from modules/sha.
15985         (Files):
15986         Rename lib/sha.h to lib/sha1.h.
15987         Rename lib/sha.c to lib/sha1.c.
15988         Rename m4/sha.m4 to m4/sha1.m4.
15989         (lib_SOURCES): Likewise.
15990         (configure.ac): Rename gl_SHA to gl_SHA1.
15991         (Include): sha.h -> sha1.h.
15992
15993 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
15994
15995         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
15996         * m4/sha1.m4: Renamed from sha.m4.
15997         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
15998
15999 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16000
16001         * lib/obstack.h (obstack_empty_p):
16002         Don't assume that chunk->contents is suitably aligned.
16003         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16004         Likewise. Problem reported by Benno in
16005         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16006
16007         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16008         readable.  This could be improved further but it'd take some work.
16009
16010 2004-08-08  Simon Josefsson  <jas@extundo.com>
16011
16012         * modules/xgethostname (Depends-on): Remove exit and error (not
16013         used).
16014
16015         * modules/getpass-gnu: Add getpass.h.
16016         (Depends-on): Add stdbool.
16017         * modules/getpass: Add getpass.h.
16018
16019 2004-08-08  Simon Josefsson  <jas@extundo.com>
16020
16021         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16022         Check getpass declaration.
16023
16024 2004-08-08  Simon Josefsson  <jas@extundo.com>
16025
16026         * lib/xgethostname.c: Don't include error.h (not used).
16027
16028         * lib/getpass.h: Add.
16029         * lib/getpass.c: Include getpass.h first.
16030
16031 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16032
16033         * lib/xalloc-die.c: New file.
16034         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16035         All uses removed.
16036         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16037         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16038         xalloc-die.c.
16039         (_, N_, xalloc_die): Move to xalloc-die.c.
16040         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16041         so that we needn't mess with xalloc_msg_memory_exhausted.
16042
16043         * lib/sha1.h: Renamed from sha.h.
16044         (SHA1_H): Renamed from _SHA_H.
16045         (sha1_ctx): Renamed from sha_ctx.
16046         (sha1_init_ctx): Renamed from sha_init_ctx.
16047         (sha1_process_block): Renamed from sha_process_block.
16048         (sha1_process_bytes): Renamed from sha_process_bytes.
16049         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16050         (sha1_read_ctx): Renamed from sha_read_ctx.
16051         (sha1_stream): Renamed from sha_stream.
16052         (sha1_buffer): Renamed from sha_buffer.
16053         * lib/sha1.c: Likewise; renamed from sha.c.
16054         Do not include <sys/types.h>.
16055         Include <stddef.h> rather than <stdlib.h>.
16056
16057 2004-08-08  Bruno Haible  <bruno@clisp.org>
16058
16059         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16060         FILESYSTEM_PREFIX_LEN.
16061         * lib/progreloc.c: Likewise.
16062         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16063
16064 2004-08-06  Simon Josefsson  <jas@extundo.com>
16065
16066         * modules/progname (Depends-on): Don't depend on stdbool.
16067
16068 2004-08-06  Simon Josefsson  <jas@extundo.com>
16069
16070         * modules/getsubopt: New file.
16071         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16072         getsubopt.
16073
16074 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16075
16076         More merge from coreutils.
16077
16078         * m4/utimens.m4, m4/utimecmp.m4: New files.
16079         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16080         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16081         prereq.m4, sha.m4: Import changes from coreutils.
16082
16083 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16084
16085         More merge from coreutils.
16086         * modules/raise, modules/readtokens0, modules/utimens:
16087         * modules/utimecmp, module/xnanosleep: New files.
16088         * modules/strftime: Add lib/strftime.h.
16089         Change include from <time.h> to "strftime.h".
16090         * modules/yesno: Add lib/yesno.h.
16091         * modules/backupfile: Remove lib/addext.c.
16092         * modules/euidaccess: Add stat-macros.h.
16093         * modules/canonicalize, modules/euidaccess,
16094         modules/filemode, modules/lchown, modules/makepath,
16095         modules/rmdir, modules/stat: Likewise.
16096
16097 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16098
16099         Merge from tar.
16100         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16101         SIZE_MAX is a valid preprocessor constant.
16102         (__argp_basename): Change from "#ifndef _LIBC"
16103         to "#ifndef __argp_short_program_name", so that
16104         we don't compile these functions for tar.
16105
16106         More merges from coreutils.
16107         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16108         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16109         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16110         * lib/addext.c: Remove; no longer needed.
16111         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16112         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16113         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16114         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16115         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16116         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16117         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16118         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16119         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16120         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16121         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16122         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16123         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16124         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16125         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16126         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16127         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16128         Import changes from coreutils.
16129
16130 2004-08-05  Simon Josefsson  <jas@extundo.com>
16131
16132         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16133
16134 2004-08-05  Simon Josefsson  <jas@extundo.com>
16135
16136         * m4/getsubopt.m4: New file.
16137
16138 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16139
16140         Merge from coreutils.
16141
16142         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16143         * m4/getcwd-path-max.m4: New files.
16144
16145         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16146         FILESYSTEM_PREFIX_LEN ->
16147         FILE_SYSTEM_PREFIX_LEN.
16148         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16149         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16150         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16151         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16152
16153         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16154         prerequisite modules now handle the DOS stuff.
16155         Don't check for unistd.h.
16156
16157 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16158
16159         Merge from coreutils.
16160
16161         * lib/.gdb-history: Remove; this doesn't belong here.
16162
16163         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16164         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16165         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16166         * lib/getcwd.c: New files.
16167
16168         * lib/dirname.h: Include <stdbool.h>.
16169         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16170         for consistency with POSIX terminology.  All uses changed.
16171         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16172         (strip_trailing_slashes): Use bool for booleans.
16173         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16174
16175         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16176         sometimes returns a positive errno value even when it succeeds.
16177         (print_errno_message) [!LIBC]: Fall back on strerror if
16178         __strerror_r fails.
16179
16180         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16181         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16182         (longest_relative_suffix): New function.
16183         (path_concat): Use it.  Assume first argument is not NULL.
16184         Port to DOS.  Omit redundant separators.
16185         Report an error instead of returning NULL.
16186         Use mempcpy instead of memcpy.
16187         (xpath_concat): Remove: not declared or used.
16188
16189         * lib/same.h: Include <stdbool.h>
16190         (same_name): Return bool, not int.
16191         * lib/same.c (same_name): Likewise.
16192         (errno): Don't declare; we assume C89 or better now.
16193
16194         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16195         if not already defined.
16196
16197         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16198         * lib/dup-safer.c (errno): Likewise.
16199
16200 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16201
16202         Merge from coreutils.
16203         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16204         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16205         * modules/path-concat: Don't depend on strdup.
16206
16207 2004-08-03  Simon Josefsson  <jas@extundo.com>
16208
16209         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16210         * lib/progname.h: Don't include stdbool.h.
16211
16212 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16213
16214         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16215         * MODULES.html.sh (func_all_modules): Remove fatal.
16216
16217 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16218
16219         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16220
16221 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16222
16223         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16224         working.
16225
16226 2004-08-02  Simon Josefsson  <jas@extundo.com>
16227
16228         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16229         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16230         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16231
16232 2004-08-01  Simon Josefsson  <jas@extundo.com>
16233
16234         * lib/xgetdomainname.c: Include stdlib.h, for free().
16235
16236 2004-07-19  Bruno Haible  <bruno@clisp.org>
16237
16238         * MODULES.html.sh (func_all_modules): Add dummy.
16239
16240 2004-07-16  Simon Josefsson  <jas@extundo.com>
16241
16242         * modules/dummy: New file.
16243
16244 2004-07-16  Simon Josefsson  <jas@extundo.com>
16245
16246         * lib/dummy.c: New file.
16247
16248 2004-07-16  Bruno Haible  <bruno@clisp.org>
16249
16250         * lib/backupfile.h: Add extern "C" for C++.
16251         * lib/closeout.h: Likewise.
16252         * lib/copy-file.h: Likewise.
16253         * lib/findprog.h: Likewise.
16254         * lib/full-write.h: Likewise.
16255         * lib/pathname.h: Likewise.
16256         * lib/progname.h: Likewise.
16257         * lib/stpcpy.h: Likewise.
16258         * lib/stpncpy.h: Likewise.
16259         * lib/strcase.h: Likewise.
16260         * lib/strstr.h: Likewise.
16261         * lib/xalloc.h: Likewise.
16262
16263         * lib/mbswidth.h: Add extern "C" for C++.
16264         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16265
16266 2004-07-13  Robert Millan  <robertmh@gnu.org>
16267
16268         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16269
16270 2004-07-09  Simon Josefsson  <jas@extundo.com>
16271
16272         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16273         failed without this.)
16274
16275 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16276
16277         * modules/chown (Files): Add lib/fchown-stub.c, since
16278         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16279
16280 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16281
16282         * lib/fchown-stub.c: New file.
16283
16284 2004-06-24  Jim Meyering  <jim@meyering.net>
16285
16286         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16287
16288 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16289
16290         * modules/argz: Omit "#include".
16291
16292         * MODULES.html.sh (func_all_modules): Add calloc, to match
16293         2004-06-01 addition of calloc module.
16294
16295 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16296
16297         * m4/argz.m4: New file, which is autoupdated from libtool.
16298
16299 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16300
16301         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16302         libtool.
16303
16304 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16305
16306         * config/srclist-update: Don't insist on "USA." before the
16307         close-comment, as libtool omits the period and puts the */ on a
16308         separate line.
16309         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16310         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16311
16312 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16313
16314         * modules/argz: New file.
16315         * MODULES.html.sh (func_all_modules): Add argz.
16316
16317 2004-06-12  Jim Meyering  <jim@meyering.net>
16318         and  Paul Eggert  <eggert@cs.ucla.edu>
16319
16320         * modules/hash (Files): Add lib/xalloc.h.
16321         * modules/pipe (Depends-on): Add wait-process.
16322         * modules/stat (Depends-on): Add xalloc.
16323         * modules/userspec (Files): Add lib/userspec.h.
16324         * modules/xstrto
16325
16326         Upgrade from gettext-0.13.
16327         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16328         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16329         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16330
16331 2004-06-10  Jim Meyering  <jim@meyering.net>
16332
16333         * lib/calloc.c: New file.
16334
16335 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16336
16337         * lib/getdate.y (yylex): Allow space between sign and number.
16338         Problem reported by Dan Jacobson.
16339
16340 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16341
16342         Merge from coreutils CVS.
16343
16344         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16345         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16346         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16347         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16348         xstrtol.m4: Fix copyright date and/or serial number.
16349
16350         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16351         See if we need an fchown replacement.
16352         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16353         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16354         and use the replacement function if we detect either defect.
16355
16356         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16357         gl_UTIMECMP.
16358
16359 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16360         and  Jim Meyering  <jim@meyering.net>
16361
16362         Merge from coreutils CVS.
16363
16364         * lib/stat-macros.h: New file, with contents from file-type.h
16365         and coreutils' system.h.
16366         * lib/file-type.c: Include "stat-macros.h".
16367         * lib/file-type.h (file_type): Move all macro definitions to new file,
16368         stat-macros.h.
16369
16370         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16371         Wrap old code with this conditional.
16372         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16373         function that does not dereference symlinks.
16374         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16375
16376         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16377         dependency problems.
16378         (xreadlink): Accept new arg SIZE, for efficiency.
16379         All decls and uses changed.
16380         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16381
16382         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16383         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16384
16385         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16386         sysexits.h.
16387
16388 2004-06-01  Jim Meyering  <jim@meyering.net>
16389
16390         * m4/calloc.m4: New file.
16391
16392 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16393
16394         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16395         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16396         Also, fix a typo in a diagnostic.
16397
16398 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16399
16400         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16401         or AC_FUNC_REALLOC.
16402
16403 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16404
16405         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16406         macros to be defined.
16407         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16408         the allocator returns NULL because the requested size is zero.
16409
16410 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16411
16412         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16413         var.  Add comment explaining why libc still defines it.  This
16414         merges the following patch from glibc:
16415         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16416
16417 2004-05-20  Andreas Schwab  <schwab@suse.de>
16418
16419         * m4/free.m4: Replace free if it not known to work, not the other
16420         way round.
16421
16422 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16423
16424         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16425         present in glibc since revision 1.1 of this file.
16426         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16427         obstack_alignment_mask, obstack_alloc, obstack_base,
16428         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16429         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16430         obstack_grow0, obstack_init, obstack_int_grow,
16431         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16432         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16433         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16434         nonexistent functions.
16435
16436 2004-05-18  Karl Berry  <karl@gnu.org>
16437
16438         * config/srclist.txt: break link for vasnprintf.c.
16439
16440 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16441
16442         Port obstack to the AS/400, where pointers are 16 bytes wide and
16443         you cannot cast an integer to a valid pointer.  This patch is
16444         currently waiting to be integrated into glibc; see
16445         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16446
16447         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16448         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16449         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16450         (struct obstack): temp member is now a union of a pointer and
16451         an integer, instead of an integer.  All integer uses changed.
16452         This does not affect the physical layout of struct obstack,
16453         except on hosts (like the AS/400) where the size or alignment of
16454         void * is greater than that of ptrdiff_t.
16455         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16456         __STDC__)]: Store temporary in pointer member of union, not
16457         integer member.
16458         * lib/obstack.c: Include <stddef.h>, for offsetof.
16459         (struct fooalign): Remove; it doesn't need a name.
16460         (union fooround): Change double to long double, and add void *.
16461         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16462         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16463         not a macro.  Hence the values are always int; so remove all
16464         casts-to-int in uses.
16465
16466 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16467
16468         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16469         we can get this patch merged into glibc.
16470
16471 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16472             Paul Eggert  <eggert@cs.ucla.edu>
16473
16474         * m4/argp: Depend on alloca.
16475
16476 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16477             Paul Eggert  <eggert@cs.ucla.edu>
16478
16479         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16480         freecoding.
16481
16482 2004-05-17  Bruno Haible  <bruno@clisp.org>
16483
16484         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16485         precision that consists of a '.' followed by an empty digit string.
16486         Patch by Tor Lillqvist <tml@iki.fi>.
16487
16488 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16489
16490         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16491         for backward compatibility with older code.  We need our own
16492         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16493         it under some other name, and our alloca.h will define it.
16494
16495 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16496             Derek Price  <derek@ximbiot.com>
16497
16498         * lib/alloca.c: Include <alloca.h>, to get our interface.
16499         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16500         include <alloca.h> first.  Use C89 prototype for alloca; this
16501         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16502         Use #elif for simplicity, since we can assume C89 now.
16503         Don't try to source the system alloca.h since it will not be found
16504         and to prevent recursively including its replacement.
16505         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16506         * lib/regex.c: Likewise.
16507
16508 2004-05-16  Derek Price  <derek@ximbiot.com>
16509             Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         getline cleanup.  This changes the getndelim2 API: both order of
16512         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16513         no delimiter).
16514
16515         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16516         interface does that.
16517         (getline): Always use getdelim, so that we don't have two
16518         copies of this code.
16519         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16520         if available.
16521         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16522         (GETNDELIM2_MAXIMUM): New macro.
16523         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16524         instead of the old practice of delim2==0.  All callers changed.
16525         Return -1 on overflow, instead of returning junk.
16526         Do not set *linesize unless allocation succeeds.
16527         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16528         that we include sys/types.h.
16529         * lib/getnline.h: Likewise.
16530         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16531         (getndelim2): Reorder arguments.
16532         * lib/getnline.c (getnline, getndelim):
16533         Don't discard the NMAX argument.
16534         (getnline): Invoke getndelim, to avoid code duplication.
16535         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16536         of (size_t) -1 by callers of the getnline family.
16537
16538 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16539
16540         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16541         Check for gettimeofday.
16542         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16543         Check for settimeofday, stime.
16544
16545 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16546
16547         * lib/nanosleep.c (suspended): Change its type from int to
16548         sig_atomic_t volatile.
16549         (first_call): Make it private to rpl_nanosleep, and have it
16550         be zero initially as that's a bit faster.
16551         (my_usleep): Round up fractional times instead of truncating them,
16552         as this is the usual meaning for 'sleep'.
16553
16554         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16555         doesn't work.
16556         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16557         (ENOSYS): Define if not defined.
16558         (settime): Fall back on stime if it exists and settimeofday fails.
16559         But don't bother with fallbacks if a method fails with errno == EPERM.
16560
16561 2004-05-11  Jim Meyering  <jim@meyering.net>
16562
16563         Prior to this change, the save_cwd caller required read access to the
16564         current directory on most systems (ones with the fchdir function).
16565
16566         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16567         fails, try write-only, and finally, resort to using xgetcwd.
16568
16569 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16570
16571         * lib/obstack.c, obstack.h: Import changes from libc.
16572
16573 2004-04-28  Bruno Haible  <bruno@clisp.org>
16574
16575         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16576         also implicitly appends .exe to executables.
16577         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16578         accepts Windows pathnames.
16579         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16580         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16581         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16582         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16583         Reported by Derek Robert Price <derek@ximbiot.com>.
16584
16585 2004-04-21  Karl Berry  <karl@gnu.org>
16586
16587         * config/srclist.txt (localcharset.c): break sync.
16588
16589 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16590
16591         * m4/host-os.m4: Add a copyright notice.
16592
16593 2004-04-20  Jim Meyering  <jim@meyering.net>
16594
16595         Change UTILS_ to gl_ in AC_DEFINE'd names.
16596         Change utils_- and jm_-prefixed variables, too.
16597         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16598         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16599         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16600
16601         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16602         Don't emit trailing blanks.
16603         Also rename jm_-prefixed variables to have gl_ prefix.
16604
16605         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16606         Also rename jm_-prefixed variables to have gl_ prefix.
16607
16608         * m4/jm-macros.m4: Reflect the renamings.
16609         * m4/prereq.m4: Likewise.
16610
16611 2004-04-20  Jim Meyering  <jim@meyering.net>
16612
16613         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16614         memory.
16615
16616 2004-04-20  Jim Meyering  <jim@meyering.net>
16617             Bruno Haible  <bruno@clisp.org>
16618
16619         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16620         memory when realloc fails.
16621
16622 2004-04-19  Jim Meyering  <jim@meyering.net>
16623
16624         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16625         now that readutmp.c may call `free (0)'.
16626
16627 2004-04-19  Bruno Haible  <bruno@clisp.org>
16628
16629         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16630         * m4/inttypes_h.m4: Likewise.
16631         * m4/stdint_h.m4: Likewise.
16632         * m4/intmax_t.m4: Likewise.
16633         * m4/uintmax_t.m4: Likewise.
16634
16635 2004-04-18  Jim Meyering  <jim@meyering.net>
16636
16637         * m4/prereq.m4: Don't forbid jm_ prefix.
16638
16639         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16640         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16641         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16642         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16643         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16644         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16645         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16646         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16647         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16648         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16649         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16650         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16651         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16652         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16653         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16654         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16655         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16656         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16657         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16658
16659 2004-04-18  Jim Meyering  <jim@meyering.net>
16660
16661         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16662         failure, don't leak memory and do call END_UTMP_ENT.
16663
16664 2004-04-16  Jim Meyering  <jim@meyering.net>
16665
16666         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16667         coreutils' stat program.
16668         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16669
16670 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16671
16672         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16673         C89.
16674         (CHAR_BIT): Remove, since we assume C89.
16675         Include <stdint.h> if available, as per current Autoconf CVS advice.
16676
16677 2004-03-31  Jim Meyering  <jim@meyering.net>
16678
16679         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16680         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16681         * m4/xalloc.m4: Likewise.
16682
16683 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16684
16685         Merge from coreutils.
16686
16687         * m4/inttostr.m4: New file.
16688         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16689         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16690         Require gl_CLOCK_TIME.
16691         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16692
16693 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16694
16695         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16696         not bool, to be more consistent with Unix conventions.
16697         Suggested by Bruno Haible.
16698
16699         Merge from coreutils.
16700
16701         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16702         * lib/umaxtostr.c: New files.
16703
16704         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16705         the usual <time.h> dance.
16706         (get_date): Change signature to support fractional time stamps.
16707         All callers changed.
16708         * lib/getdate.y: Include "getdate.h" first, as we can now
16709         assume C89 and don't need to worry about 'const'.
16710         Similarly, include "unlocked-io.h" near start, not in middle.
16711         Include <limits.h>.
16712         (textint.value): Use long int rather than int.
16713         (textint.digits): Use size_t rather than int.
16714         (BILLION, LOG10_BILLION): New constants.
16715         (parser_control): New member rel_ns.  Members day_ordinal,
16716         time_zone, month, day, hour, minutes, rel_year, rel_month,
16717         rel_day, rel_hour, rel_minutes, rel_seconds
16718         are now long int, not int.  Member seconds is now struct timespec,
16719         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16720         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16721         not int.
16722         (%union.intval): Now long int, not int.
16723         New member timespec.
16724         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16725         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16726         (spec): Now is a timespec or an item list.
16727         (timespec, items): New nonterminals.
16728         (time, rel, relunit, number, get_date):
16729         Add support for fractional seconds.
16730         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16731         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16732         (to_hour): First arg is now long int, not int.
16733         (to_year): Returns long int, not int.
16734         Don't treat year -70 like 70.
16735         (tm_diff): Returns long int, not int.
16736         (lookup_word): Use bool instead of int when appropriate.
16737         (yylex): Use size_t for count, not int.
16738         Detect overflow when parsing large integer constants.
16739         Add support for fractions.
16740         (get_date): Make pointers 'const' if possible.
16741         Use more-portable code to detect integer overflow.
16742         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16743         Don't use ctime; it's not reliable if the year has >4 digits.
16744
16745         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16746         This is for compatibility with BSD.
16747
16748         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16749         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16750         From coreutils' system.h.
16751
16752         * lib/userspec.c: Don't include "posixver.h".
16753         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16754         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16755         compatible extension.  Simplify code by removing a boolean int
16756         that was always nonzero if a string was nonnull.
16757
16758 2004-03-30  Jim Meyering  <jim@meyering.net>
16759
16760         Merge from coreutils.
16761
16762         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16763         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16764         on some systems one must include <grp.h> before it.
16765         Reported by Christian Krackowizer.
16766
16767 2004-03-30  Jim Meyering  <jim@meyering.net>
16768
16769         Merge from coreutils.
16770
16771         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16772
16773         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16774         an empty input stream.
16775
16776         * lib/readtokens.c: Include <stdbool.h>.
16777         (readtoken): Use `size_t' rather than int/long.
16778         All callers adjusted.
16779         Use `bool' rather than `int' where appropriate.
16780         Use memset rather than an explicit loop.
16781         Use x2nrealloc rather than xrealloc.
16782         Allow the use of `\0' as a delimiter.
16783         (readtokens): Likewise.
16784         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16785
16786 2004-03-30  Jim Meyering  <jim@meyering.net>
16787
16788         * m4/realloc.m4: Remove file, since now it does no more than
16789         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16790         the `configure.ac' section of module/realloc.
16791         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16792
16793 2004-03-30  Bruno Haible  <bruno@clisp.org>
16794
16795         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16796         nonnull.
16797
16798 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16799
16800         Merge changes to getloadavg.c from coreutils and Emacs.
16801
16802         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16803         Define to an expression, not to the empty string.
16804         Include cloexec.h and xalloc.h.
16805         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16806         Use set_cloexec_flag rather than rolling our own.
16807         * lib/cloexec.c, lib/cloexec.h: New files.
16808
16809 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16810
16811         * m4/cloexec.m4: New file.
16812
16813 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16814
16815         * lib/getopt.h: Sync with libc CVS.
16816
16817 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16818             Bruno Haible  <bruno@clisp.org>
16819
16820         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16821         mbswidth.
16822
16823 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16824             Bruno Haible  <bruno@clisp.org>
16825
16826         * lib/mbswidth.h: Include <wchar.h> only if
16827         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16828         <wchar.h>.
16829         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16830
16831 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16832
16833         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16834         Sync with libc CVS.
16835         * lib/getopt_int.h: New file, also synced from libc.
16836
16837 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16838
16839         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16840         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16841         Bring back getopt.c, getopt.h, getopt1.c.
16842
16843 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16844
16845         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16846         All uses changed.  Check for sa_sigaction member; this fixes
16847         a bug first reported by Jason Andrade in
16848         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16849
16850 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16851
16852         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16853         '#if' expressions.  Unlike the code it replaces, it does not
16854         depend on (defined _SC_PAGESIZE).  However, it does depend on
16855         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16856         first reported by Jason Andrade in
16857         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16858
16859 2004-02-25  Simon Josefsson  <jas@extundo.com>
16860
16861         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16862
16863 2004-02-25  Simon Josefsson  <jas@extundo.com>
16864
16865         * lib/strdup.h: New file.
16866         * lib/strdup.c: Include it.
16867         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16868         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16869
16870 2004-02-23  Karl Berry  <karl@gnu.org>
16871
16872         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16873         (from fencepost.gnu.org:/gd/gnuorg).
16874
16875 2004-02-23  Karl Berry  <karl@gnu.org>
16876
16877         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16878         * config/srclist.txt: add maintain/standards documents.
16879
16880 2004-02-18  Bruno Haible  <bruno@clisp.org>
16881
16882         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16883         Reported by Derek Robert Price <derek@ximbiot.com>.
16884
16885 2004-02-16  Karl Berry  <karl@gnu.org>
16886
16887         * config/mkinstalldirs, install-sh: update from automake.
16888
16889 2004-02-06  Karl Berry  <karl@gnu.org>
16890
16891         * m4/po.m4: update from gettext 0.14.1.
16892
16893 2004-02-06  Karl Berry  <karl@gnu.org>
16894
16895         * lib/config.charset: update from gettext 0.14.1.
16896
16897 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16898
16899         Add comments and code, prompted by suggestions from Bruno Haible
16900         for sh-quote.
16901         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16902         describing the enum quoting_style values.
16903         * lib/quotearg.c (quotearg_alloc): New function.
16904         (quotearg_buffer_restyled): Treat lone { and } as special.
16905         Treat = as special.  Work around bug with older shells
16906         that "see" a '\' that is really the 2nd byte of a multibyte char.
16907         Quote empty string with shell_quoting_style.
16908
16909 2004-02-03  Bruno Haible  <bruno@clisp.org>
16910
16911         * m4/pipe.m4: New file, from GNU gettext.
16912
16913 2004-02-03  Bruno Haible  <bruno@clisp.org>
16914
16915         * lib/pipe.h: New file, from GNU gettext.
16916         * lib/pipe.c: New file, from GNU gettext.
16917
16918 2004-01-27  Bruno Haible  <bruno@clisp.org>
16919
16920         * m4/execute.m4: New file, from GNU gettext.
16921
16922 2004-01-27  Bruno Haible  <bruno@clisp.org>
16923
16924         * lib/execute.h: New file, from GNU gettext.
16925         * lib/execute.c: New file, from GNU gettext.
16926         * lib/w32spawn.h: New file, from GNU gettext.
16927
16928 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16929
16930         Merge from diffutils.
16931
16932         * lib/file-type.c (file_type): Add typed memory objects.
16933         * lib/file-type.h (S_TYPEISTMO): New macro.
16934
16935         * lib/c-stack.h (c_stack_action): Remove argv argument.
16936         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
16937         (die): Don't calculate message unless segv_action returns.
16938         (get_stack_location, min_address_from_argv, max_address_from_argv,
16939         volatile stack_base, volatile_stack_size): Remove.
16940         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
16941         that every segmentation violation is a stack overflow.  (Ouch!)
16942         See Debian bug 136249 (still outstanding) for more info about why
16943         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
16944
16945 2004-01-24  Paul Eggert  <eggert@twinsun.com>
16946
16947         Exit-status fix from coreutils.
16948
16949         Use exit_failure consistently in place of EXIT_FAILURE,
16950         so that program exit statuses are consistent on failure.
16951
16952         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
16953         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
16954         * lib/argmatch.h: Comment fix to match the above.
16955         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
16956         Now a macro referring to exit_failure, instead of a separate
16957         variable.  Include "exitfail.h" to get it.
16958         * lib/xstrtol.h: Include "exitfail.h".
16959         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
16960
16961         * lib/long-options.c (parse_long_options): Use prototype
16962         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
16963         for clarity.
16964
16965 2004-01-21  Jim Meyering  <jim@meyering.net>
16966
16967         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
16968         so as not to conflict with a different-sized __mktime_internal
16969         function in GNU libc.
16970         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
16971         Problem building statically-linked `ls' reported by Michael Brunnbauer.
16972
16973 2004-01-20  Karl Berry  <karl@gnu.org>
16974
16975         * config/config.guess: update from config.
16976
16977         * config/srclistvars.sh: GNUWWWLICENSES for karl.
16978
16979 2004-01-20  Bruno Haible  <bruno@clisp.org>
16980
16981         Safer stack allocation.
16982         * lib/setenv.c: Include allocsa.h.
16983         (alloca): Remove fallback definition.
16984         (freea): Remove macro.
16985         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
16986         instead of freea.
16987
16988 2004-01-20  Bruno Haible  <bruno@clisp.org>
16989
16990         * m4/eealloc.m4: New file, from GNU gettext.
16991
16992 2004-01-20  Bruno Haible  <bruno@clisp.org>
16993
16994         * m4/allocsa.m4: New file, from GNU gettext.
16995
16996 2004-01-20  Bruno Haible  <bruno@clisp.org>
16997
16998         * lib/xallocsa.h: New file, from GNU gettext.
16999         * lib/xallocsa.c: New file, from GNU gettext.
17000
17001 2004-01-20  Bruno Haible  <bruno@clisp.org>
17002
17003         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17004
17005 2004-01-20  Bruno Haible  <bruno@clisp.org>
17006
17007         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17008         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17009         specially.
17010
17011 2004-01-20  Bruno Haible  <bruno@clisp.org>
17012
17013         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17014         patch.
17015
17016 2004-01-20  Bruno Haible  <bruno@clisp.org>
17017
17018         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17019
17020 2004-01-20  Bruno Haible  <bruno@clisp.org>
17021
17022         * lib/eealloc.h: New file.
17023
17024 2004-01-20  Bruno Haible  <bruno@clisp.org>
17025
17026         * lib/binary-io.h: Avoid warnings on Cygwin.
17027
17028 2004-01-20  Bruno Haible  <bruno@clisp.org>
17029
17030         * lib/allocsa.h: New file, from GNU gettext.
17031         * lib/allocsa.c: New file, from GNU gettext.
17032
17033 2004-01-18  Karl Berry  <karl@gnu.org>
17034
17035         * doc/gpl.texi, doc/lgpl.texi: new files.
17036
17037 2004-01-18  Karl Berry  <karl@gnu.org>
17038
17039         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17040         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17041
17042 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17043
17044         Merge from coreutils.
17045
17046         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17047         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17048         (gl_DEFAULT_POSIX2_VERSION): Move
17049         the documentation from 'configure' into 'config.hin',
17050         so that 'configure --help' isn't burdened by it and
17051         we don't have to worry about its formatting there.
17052         Reword the documentation so that it's more succinct
17053         and can be run together into a single paragraph.
17054         * m4/same.m4 (gl_SAME): Check for pathconf.
17055
17056 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17057
17058         Merge from coreutils.
17059
17060         * lib/posixver.c: Include posixver.h.
17061
17062         * lib/same.c: Include <stdbool.h>, <limits.h>.
17063         (_POSIX_NAME_MAX): Define if not defined.
17064         (MIN): New macro.
17065         (same_name): If file names are silently truncated, report
17066         that the file names are the same if they are the same after
17067         the silent truncation.
17068
17069         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17070         conversion function.
17071         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17072         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17073         longer needed.
17074
17075 2004-01-15  Jim Meyering  <jim@meyering.net>
17076
17077         Merge from coreutils.
17078
17079         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17080         if no library is required.
17081         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17082         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17083         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17084         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17085         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17086         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17087         value, $ac_cv_search_crypt, if it's "none required".
17088         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17089         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17090         not gl_FUNC_GETLOADAVG.
17091         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17092         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17093
17094 2004-01-15  Jim Meyering  <jim@meyering.net>
17095
17096         Merge from coreutils.
17097
17098         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17099         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17100         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17101
17102         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17103         optional configure-time default.
17104
17105         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17106
17107         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17108
17109 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17110
17111         Merge from coreutils.
17112
17113         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17114         value, $ac_cv_search_nanosleep, if it's "none required".
17115
17116 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17117
17118         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17119         with like-named macro in fnmatch.c.
17120         (EXT): Use an internal constant instead.
17121
17122         Merge fnmatch patches from glibc.
17123         * lib/fnmatch.c (mbsinit): Remove define.
17124         Add libc_hidden_ver (__fnmatch, fnmatch).
17125         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17126         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17127
17128 2004-01-14  Karl Berry  <karl@gnu.org>
17129
17130         * config/install-sh: update from automake.
17131
17132 2004-01-13  Karl Berry  <karl@gnu.org>
17133
17134         * config/install-sh: update from automake.
17135
17136 2004-01-09  Karl Berry  <karl@gnu.org>
17137
17138         * config/install-sh: update from automake.
17139
17140 2004-01-05  Karl Berry  <karl@gnu.org>
17141
17142         * config/config.{sub,guess}: update from config.
17143
17144 2003-12-31  Karl Berry  <karl@gnu.org>
17145
17146         * config/depcomp: update from automake.
17147
17148 2003-12-14  Karl Berry  <karl@gnu.org>
17149
17150         * lib/config.charset: update from gettext-runtime.
17151
17152 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17153
17154         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17155         Bug reported by Alfred M. Szmidt.
17156
17157 2003-12-03  Bruno Haible  <bruno@clisp.org>
17158
17159         * m4/gettext.m4: Upgrade from gettext-0.13.
17160         * m4/po.m4: Upgrade from gettext-0.13.
17161         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17162         * m4/intmax.m4: New file, from gettext-0.13.
17163         * m4/printf-posix.m4: New file, from gettext-0.13.
17164
17165 2003-11-29  Karl Berry  <karl@gnu.org>
17166
17167         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17168
17169 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17170             Bruno Haible  <bruno@clisp.org>
17171
17172         * lib/printf-parse.h: Don't include sys/types.h.
17173         (ARG_NONE): New macro.
17174         (char_directive): Change type of *arg_index fields to size_t.
17175         * lib/printf-parse.c: Don't include sys/types.h.
17176         (SSIZE_MAX): Remove macro.
17177         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17178         Remove unnecessary overflow check.
17179         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17180         fields.
17181
17182 2003-11-25  Bruno Haible  <bruno@clisp.org>
17183
17184         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17185
17186 2003-11-25  Bruno Haible  <bruno@clisp.org>
17187
17188         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17189         gt_TYPE_SSIZE_T.
17190
17191 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17192
17193         * modules/alloca: Remove dependency on xalloc.
17194
17195 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17196
17197         * lib/alloca.c: Remove dependency on xalloc module.
17198         (xalloc_die): Remove.
17199         (memory_full) [!defined emacs]: New macro.
17200         [!defined emacs]: Don't include xalloc.h.
17201         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17202         address arithmetic overflows.  Change datatypes a bit to avoid
17203         unnecessary casts.
17204
17205 2003-11-22  Jim Meyering  <jim@meyering.net>
17206
17207         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17208         s/size/size_t/.
17209
17210 2003-11-21  Karl Berry  <karl@gnu.org>
17211
17212         * config/config.{sub,guess}: update from config.
17213
17214 2003-11-18  Karl Berry  <karl@gnu.org>
17215
17216         * config/config.{sub,guess}: update from config.
17217
17218         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17219
17220 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17221
17222         * README: Mention that S+T cannot overflow if S is the size of
17223         an existing object and T is sufficiently small.
17224
17225 2003-11-17  Jim Meyering  <jim@meyering.net>
17226
17227         On systems without utime and without a utimes function capable of
17228         dealing with a NULL struct utimbuf* argument, this utime replacement
17229         could -- in unusual circumstances -- leak a file descriptor.
17230         * lib/utime.c: Include <unistd.h> and <errno.h>.
17231         (utime_null): Be sure to close `fd' and to preserve errno.
17232         Reported by Geoff Collyer via Arnold Robbins.
17233
17234 2003-11-17  Bruno Haible  <bruno@clisp.org>
17235
17236         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17237         (Depends-on): Add xsize.
17238
17239 2003-11-17  Bruno Haible  <bruno@clisp.org>
17240
17241         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17242
17243 2003-11-17  Bruno Haible  <bruno@clisp.org>
17244
17245         * lib/vasnprintf.c (alloca): Remove fallback definition.
17246         (freea): Remove definition.
17247         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17248         Reported by Paul Eggert.
17249
17250 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17251             Bruno Haible  <bruno@clisp.org>
17252
17253         Protect against address arithmetic overflow.
17254         * lib/printf-args.h: Include stddef.h.
17255         (arguments): Change type of field 'count' to size_t.
17256         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17257         'unsigned int' where appropriate.
17258         * lib/printf-parse.h: Include sys/types.h.
17259         (char_directive): Change type of *arg_index fields to ssize_t.
17260         (char_directives): Change type of fields 'count', max_*_length to
17261         size_t.
17262         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17263         (SSIZE_MAX): Define fallback value.
17264         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17265         instead of 'int' where appropriate. Check a_allocated, d_allocated
17266         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17267         * lib/vasnprintf.c: Include xsize.h.
17268         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17269         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17270         overflow. Avoid wraparound when converting a width or precision from
17271         decimal to binary.
17272
17273 2003-11-16  Bruno Haible  <bruno@clisp.org>
17274
17275         Update from GNU gettext.
17276         * lib/printf-parse.c: Generalize to it can be compiled for wide
17277         strings.
17278         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17279         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17280         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17281         SNPRINTF): New macros.
17282         Don't include <alloca.h> if the file is used inside libintl.
17283         (local_wcslen): New function, for Solaris 2.5.1.
17284         (VASNPRINTF): Use it instead of wcslen.
17285
17286 2003-11-16  Bruno Haible  <bruno@clisp.org>
17287
17288         * lib/xsize.h (xmax): New function.
17289         (xsum, xsum3, xsum4): Declare as "pure" functions.
17290
17291 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17292
17293         * modules/xalloc (Files): Undo latest change, since xalloc.h
17294         no longer needs SIZE_MAX or PTRDIFF_MAX.
17295
17296 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17297
17298         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17299         gl_PTRDIFF_MAX.
17300
17301 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17302
17303         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17304         "return", to pacify some unknown compiler.  Problem reported
17305         by Joerg Schilling.
17306
17307 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17308
17309         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17310         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17311         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17312         heuristic is just as accurate as far as we know, and it removes a
17313         dependency on size_max.m4 and ptrdiff_max.m4.
17314
17315 2003-11-11  Bruno Haible  <bruno@clisp.org>
17316
17317         * modules/xsize (Files): Add m4/size_max.m4.
17318         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17319
17320 2003-11-11  Bruno Haible  <bruno@clisp.org>
17321
17322         * m4/size_max.m4: New file.
17323         * m4/ptrdiff_max.m4: New file.
17324         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17325         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17326         (gl_XALLOC): Invoke it.
17327
17328 2003-11-11  Bruno Haible  <bruno@clisp.org>
17329
17330         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17331         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17332         defined.
17333
17334 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17335
17336         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17337         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17338         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17339         From Bruno Haible.
17340         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17341         not (size_t) -1, since it's defined here.
17342
17343 2003-11-09  Karl Berry  <karl@gnu.org>
17344
17345         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17346
17347 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17348
17349         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17350         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17351         Reject sizes of exactly SIZE_MAX bytes.
17352         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17353         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17354
17355 2003-11-05  Bruno Haible  <bruno@clisp.org>
17356
17357         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17358         SIZE_MAX defined in <limits.h> on Solaris.
17359
17360 2003-11-04  Jim Meyering  <jim@meyering.net>
17361
17362         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17363         variable names, rather than @VAR@.
17364         * modules/poll: Likewise.
17365
17366 2003-11-04  Bruno Haible  <bruno@clisp.org>
17367
17368         * modules/xsize: New file.
17369         * modules/linebreak: Depend on xsize.
17370         * MODULES.html.sh (func_all_modules): Add xsize.
17371
17372 2003-11-04  Bruno Haible  <bruno@clisp.org>
17373
17374         * m4/xsize.m4: New file.
17375
17376 2003-11-04  Bruno Haible  <bruno@clisp.org>
17377
17378         * lib/xsize.h: New file.
17379         * lib/linebreak.c: Include xsize.h.
17380         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17381         argument for overflow.
17382         Suggested by Paul Eggert.
17383
17384 2003-11-03  Karl Berry  <karl@gnu.org>
17385
17386         * config/config.{guess,sub}: update from config.
17387
17388 2003-11-03  Jim Meyering  <jim@meyering.net>
17389
17390         * modules/userspec (lib_SOURCES): Add userspec.h.
17391         (Include): Add "userspec.h".
17392         Improve description.
17393
17394 2003-11-03  Jim Meyering  <jim@meyering.net>
17395
17396         * lib/userspec.c: Include "userspec.h".
17397         * lib/userspec.h: New file.
17398
17399 2003-11-03  Bruno Haible  <bruno@clisp.org>
17400
17401         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17402
17403 2003-11-03  Bruno Haible  <bruno@clisp.org>
17404
17405         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17406         available, to avoid (extremely rare) race condition.
17407         Suggested by Paul Eggert.
17408
17409 2003-11-02  Karl Berry  <karl@gnu.org>
17410
17411         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17412
17413 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17414
17415         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17416         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17417         (read_filesystem_list): Set and use me_type_malloced.
17418         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17419         whatever the type happens to be), for brevity and consistency.
17420         Check for size calculation overflow on Alphas running OSF/1.
17421
17422 2003-10-31  Jim Meyering  <jim@meyering.net>
17423
17424         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17425
17426         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17427
17428 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17429             Bruno Haible  <bruno@clisp.org>
17430
17431         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17432         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17433
17434 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17435
17436         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17437         netbsd*-gnu*.  Suggested by Robert Millan.
17438
17439 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17440
17441         * modules/group-member: Depend on stdbool.
17442
17443 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17444
17445         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17446
17447 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17448
17449         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17450         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17451         after the 'gnu' in these cases.  This fixes some bugs in the
17452         previous change, and is based on suggestions by Robert Millan.
17453
17454 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17455
17456         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17457         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17458         no longer needed.
17459         * lib/quotearg.c (quotearg_n_options): Use it.
17460         * lib/group-member.c: Include <stdbool.h>.
17461         (free_group_info): Arg is now const *; don't free arg.
17462         (get_group_info): Now returns bool and accepts struct group_info *,
17463         rather than returning a malloc'ed struct group_info *.
17464         All uses changed.  Check for overflow in internal size calculation.
17465
17466         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17467         rather than xmalloc/xrealloc.
17468         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17469         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17470         conformance bug: the old code used a pointer after freeing the
17471         storage that it addressed.
17472         * lib/hash.c (hash_initialize): Simplify the code by using
17473         xalloc_oversized rather than doing it by hand.
17474         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17475         the buffer preserved.  Use free and xmalloc instead.
17476         * lib/quotearg.c (quotearg_n_options): Likewise.
17477         Use a simpler test for size overflow.  Don't use xalloc_oversized
17478         because unsigned int might be wider than size_t (!); this suggests
17479         that we should switch from unsigned int to size_t for slot numbers.
17480
17481 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17482
17483         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17484         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17485         NetBSD kernels.  Requested by Richard Stallman.
17486
17487 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17488
17489         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17490         to allocate the returned structure.  Do not allocate a subarray,
17491         as x2nrealloc will do that.
17492         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17493         instead of xnrealloc.
17494         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17495
17496 2003-10-27  Bruno Haible  <bruno@clisp.org>
17497
17498         * lib/stdbool_.h: Better support for BeOS.
17499
17500 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17501
17502         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17503         now uses inline.
17504
17505 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17506
17507         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17508         callers that want to do their own size-overflow checking.  Include
17509         <stdbool.h>, since xalloc_oversized returns bool.
17510         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17511         to use xalloc_oversized.
17512
17513         Add two functions x2realloc, x2nrealloc, for programs that grow
17514         arrays dynamically by doubling their sizes.
17515         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17516         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17517         New functions.
17518
17519         Port to C99 semantics for 'inline' of external functions.
17520         Bug reported by Bruno Haible.
17521         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17522         with the old contents of xnmalloc.
17523         (xnmalloc, xmalloc): Use it.
17524         (xnrealloc_inline): New static inline function,
17525         with the old contents of xnrealloc.
17526         (xnrealloc, xrealloc): Use it.
17527
17528         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17529         that.
17530
17531 2003-10-26  Karl Berry  <karl@gnu.org>
17532
17533         * config/srclist.txt (COPYING.DOC): no longer available from
17534         /gd/gnuorg; don't know where the ultimate source is.
17535
17536 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17537
17538         Fix several address-calculation bugs in the hash modules,
17539         plus some minor code cleanup.
17540
17541         * lib/hash.h: Include <stdbool.h>, for bool.
17542         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17543         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17544         hash_get_n_entries, hash_get_max_bucket_length,
17545         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17546         hash_rehash): Use size_t rather than unsigned.
17547         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17548         hash_get_n_buckets_used, hash_get_n_entries,
17549         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17550         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17551         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17552         Likewise.
17553         (SIZE_MAX): Define if not defined.
17554         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17555         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17556         hash_print):
17557         Use const * when possible.
17558         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17559         (check_tuning): Fix bug: if tuning parameters were very close to
17560         0 or 1, rounding errors could have caused subscript violations.
17561         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17562         (hash_initialize): Add 'fail:' label
17563         to free table and return NULL, and use it to simplify code.
17564         Use calloc rather than clearing the storage ourself.
17565         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17566         buffer size calculations.
17567         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17568         Include <stddef.h>, for size_t.
17569         * lib/hash-pjw.c (hash_pjw): Likewise.
17570         Switch to method described by Bruno Haible.
17571         Include <limits.h>, for CHAR_BIT.
17572         (SIZE_BITS): New macro.
17573
17574 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17575
17576         * m4/getline.m4 (AM_FUNC_GETLINE):
17577         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17578         hosts.  Problem reported by Derek Robert Price in
17579         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17580         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17581         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17582
17583 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17584
17585         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17586         ceiling the allocation at NMAX bytes rather than silently
17587         discarding input bytes before NMAX is reached.  This makes
17588         a difference only if NMAX exceeds SIZE_MAX / 2.
17589
17590         * lib/obstack.c: Merge from glibc.
17591         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17592         Add libc_hidden_def (_obstack_newchunk).
17593         (_obstack_free) [! defined _LIBC]: Remove.
17594         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17595         a clone of the function body.
17596         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17597         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17598
17599         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17600         glibc.
17601         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17602         arg to memcpy.
17603
17604         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17605         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17606         Don't use lvalue casts, as GCC plans to remove support for them
17607         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17608         was also present in the non-GCC version, indicating that this
17609         code had always been buggy and had never been widely used.
17610         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17611         Use the fast variant of each macro, rather than copying the
17612         definiens of the fast variant; that way, we'll be more likely to
17613         catch future bugs in the fast variants.
17614
17615 2003-10-20  Bruno Haible  <bruno@clisp.org>
17616
17617         * modules/wait-process: New file.
17618         * MODULES.html.sh (func_all_modules): Add wait-process.
17619
17620 2003-10-20  Bruno Haible  <bruno@clisp.org>
17621
17622         * m4/wait-process.m4: New file.
17623
17624 2003-10-20  Bruno Haible  <bruno@clisp.org>
17625
17626         * lib/wait-process.h: New file, from GNU gettext.
17627         * lib/wait-process.c: New file, from GNU gettext.
17628
17629 2003-10-19  Jim Meyering  <jim@meyering.net>
17630
17631         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17632         HPUX 10.20.
17633
17634 2003-10-18  Karl Berry  <karl@gnu.org>
17635
17636         * config/config.guess: update from config.
17637
17638 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17639
17640         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17641         (getgroups): First arg is int, not size_t.
17642         Don't let 'free' mangle errno.
17643
17644 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17645
17646         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17647
17648 2003-10-16  Karl Berry  <karl@gnu.org>
17649
17650         * config/config.{guess,sub}: update from config.
17651
17652 2003-10-16  Jim Meyering  <jim@meyering.net>
17653
17654         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17655         memcpy.
17656
17657 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17658
17659         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17660         (SIZE_MAX): Remove.
17661         (new_exclude, add_exclude_file): Initial size no longer needs to
17662         be a power of 2.
17663         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17664         our own address arithmetic overflow checking.
17665
17666         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17667         (fnmatch): Do not alloca more than 2000 wide characters;
17668         instead, use malloc for large buffers.
17669         Check for address arithmetic overflow, and return -1
17670         with errno set to ENOMEM in that case.
17671         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17672         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17673         instead, return -1.  Check for address arithmetic overflow.
17674
17675 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17676
17677         Handle invalid suffixes and overflow independently, so that
17678         callers can treat them independently as needed.  Fix some bugs in
17679         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17680         suffix for a human-readable blocksize.  The major caller-visible
17681         change is the addition of a new
17682         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17683         that both overflow and suffix chars were found.
17684
17685         * lib/human.c (humblock): Don't check separately for invalid suffix
17686         char; that is xstrtoumax's job (now that its bug is fixed).
17687         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17688         INTMAX_MAX]: New macros.
17689         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17690         TYPE_MAXIMUM): New macros.
17691         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17692         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17693         if overflow occurs, as it's what __strtol does and it's more useful
17694         in practice.
17695         (__xstrtol): If __strtol reports some error other than ERANGE,
17696         reflect it to the caller as LONGINT_INVALID.  If it reports
17697         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17698         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17699         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17700         value.
17701         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17702         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17703         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17704         [defined UINTMAX_MAX]: New macros.
17705
17706 2003-10-14  Bruno Haible  <bruno@clisp.org>
17707
17708         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17709
17710 2003-10-14  Bruno Haible  <bruno@clisp.org>
17711
17712         * m4/sig_atomic_t: New file, from GNU gettext.
17713         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17714
17715 2003-10-14  Bruno Haible  <bruno@clisp.org>
17716
17717         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17718         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17719         Also use volatile where needed.
17720
17721 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17722
17723         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17724         Change maintainer from Bruno Haible to 'all'.
17725
17726 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17727
17728         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17729
17730 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17731
17732         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17733         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17734         and define in terms of the other primitives.
17735         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17736         (SIZE_MAX): Define if not already defined.
17737         (array_size_overflow): New function.
17738         (xalloc_die): Abort instead of exiting if 'error' returns.
17739         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17740         (xmalloc, xrealloc): Use them.
17741         (xcalloc): Check for address arithmetic overflow.
17742         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17743         a bit faster than strcpy.
17744
17745 2003-10-10  Simon Josefsson  <jas@extundo.com>
17746
17747         * modules/argp (Depends-on): Add restrict and strcase.
17748
17749 2003-10-10  Simon Josefsson  <jas@extundo.com>
17750
17751         * m4/argp.m4: Add AC_C_INLINE.
17752
17753 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17754
17755         Merge getpass from libc, plus a few fixes.
17756
17757         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17758         Include <stdbool.h>.
17759         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17760         __fsetlocking to empty.
17761         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17762         do include <bits/libc-lock.h>.
17763         Do not include <fcntl.h>; not needed.
17764         [_LIBC]: Include <wchar.h>.
17765         (NOTCANCEL_MODE): New macro.
17766         (flockfile, funlockfile) [_LIBC]: New macros.
17767         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17768         [!_LIBC]: New macros.
17769         (call_fclose): New function.
17770         (getpass): Use it.  Save tty stream separately; this simplifies the
17771         code and makes it more reliable if stdin happens to equal stdout.
17772         Invoke __fsetlocking on tty.
17773         Handle thread cancellation if needed.
17774         Namespace cleanup (use __tcgetattr, __getline).
17775         Use bool for Booleans.
17776         [USE_IN_LIBIO]: Handle wide streams.
17777         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17778         stream might go where.
17779
17780         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17781         doesn't have to include <stdio.h> before us.
17782         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17783         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17784         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17785         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17786         if not declared, so that we can use getpass.c code from libc without
17787         rewriting it.
17788         (flockfile, ftrylockfile, funlockfile): New macros.
17789
17790 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17791
17792         * modules/getpass: Depend on stdbool.
17793
17794 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17795
17796         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17797
17798 2003-10-07  Karl Berry  <karl@gnu.org>
17799
17800         * config/config.{guess,sub}: update from config.
17801
17802 2003-10-06  Jim Meyering  <jim@meyering.net>
17803             Bruno Haible  <bruno@clisp.org>
17804
17805         This lets translators provide better translations for the
17806         "Written by ..." part of --version output.
17807         * lib/version-etc.h: Include stdarg.h.
17808         (version_etc_copyright): Declare as readonly.
17809         (version_etc): Make this function variadic with a NULL-terminated list
17810         of author name strings.
17811         (version_etc_va): New declaration.
17812         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17813         (version_etc_copyright): Declare as readonly.
17814         (version_etc_va): New function. Provide a different translatable string
17815         for each possible number of authors < 10. Abbreviate when there are 10
17816         authors or more.
17817         (version_etc): Make this function variadic. Call version_etc_va.
17818         Suggestion from Gary V. Vaughan.
17819
17820         * lib/long-options.h (parse_long_options): Change prototype: the
17821         authors string is moved to the end and becomes variadic.
17822         * lib/long-options.c: Include stdarg.h.
17823         (parse_long_options): Make this function variadic, too.
17824         Call version_etc_va, not version_etc.
17825
17826 2003-10-06  Bruno Haible  <bruno@clisp.org>
17827
17828         * modules/version-etc-2: Remove file.
17829         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17830
17831 2003-10-06  Bruno Haible  <bruno@clisp.org>
17832
17833         * modules/fatal-signal: New file.
17834         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17835
17836 2003-10-06  Bruno Haible  <bruno@clisp.org>
17837
17838         * m4/fatal-signal.m4: New file.
17839         * m4/signalblocking.m4: New file, from GNU gettext.
17840
17841 2003-10-06  Bruno Haible  <bruno@clisp.org>
17842
17843         * lib/version-etc-2.h: Remove file.
17844         * lib/version-etc-2.c: Remove file.
17845
17846 2003-10-06  Bruno Haible  <bruno@clisp.org>
17847
17848         * lib/fatal-signal.h: New file, from GNU gettext.
17849         * lib/fatal-signal.c: New file, from GNU gettext.
17850
17851 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17852
17853         * README: Rework advice for preventing empty .o files.
17854         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17855         not <sys/types.h>.
17856
17857 2003-10-04  Karl Berry  <karl@gnu.org>
17858
17859         * lib/argp*: update from libc.
17860
17861 2003-10-04  Karl Berry  <karl@gnu.org>
17862
17863         * config/config.{guess,sub}: update from config.
17864
17865 2003-10-02  Bruno Haible  <bruno@clisp.org>
17866
17867         * modules/lchown (Include): Add lchown.h.
17868         * modules/time_r (Include): Use "..." syntax.
17869         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17870
17871 2003-10-01  Simon Josefsson  <jas@extundo.com>
17872
17873         * MODULES.html.sh (func_all_modules): Move gethostname from section
17874         'based on' to section 'lacking' POSIX:2001.
17875
17876 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17877
17878         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17879         to output mode on the same stream.
17880
17881 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17882
17883         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17884         Fix arg typo in previous patch.
17885
17886 2003-09-28  Jim Meyering  <jim@meyering.net>
17887
17888         * lib/error.c: Correct cpp indentation.
17889
17890 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17891
17892         * modules/free: New file.
17893
17894 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17895
17896         * m4/free.m4: New file.
17897
17898 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17899
17900         * lib/minmax.h (MIN, MAX)
17901         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17902         Omit the special code that used __typeof__, since we worry that
17903         it could be more trouble than it's worth.  See:
17904         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17905         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17906
17907         * lib/free.c: New file.
17908
17909 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
17910
17911         Trivial fixes to Makefile.am parts of module listings.
17912         * modules/strstr: Append strstr.h to lib_SOURCES.
17913         * modules/strcase: Likewise, for strcase.h.
17914
17915 2003-09-27  Karl Berry  <karl@gnu.org>
17916
17917         * config/mkinstalldirs: update from automake.
17918
17919 2003-09-26  Paul Eggert  <eggert@twinsun.com>
17920
17921         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
17922         (error_tail): Do not loop, reallocating temporary buffer, since
17923         the output cannot contain more wide characters than the input
17924         contains bytes, the size must be big enough already.  This avoids
17925         one potential size overflow calculation.  Check for size overflow
17926         when calculating temporary buffer size.  Free temporary buffer
17927         when done, if it was allocated with malloc; this plugs a memory
17928         leak.  Remove casts from void * to pointers, that are no longer
17929         needed now that we're assuming C89 or better.
17930
17931         Merge error changes from glibc.
17932
17933         * lib/error.c, error.h: Update copyright notice header to match glibc.
17934         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
17935         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
17936         Disable cancellation while printing error.
17937         * lib/error.h: Prepend __ to parameter names.
17938
17939 2003-09-26  Jim Meyering  <jim@meyering.net>
17940
17941         * lib/error.c (error_tail): Move some declarations
17942         into inner scope where the local variables are used.
17943
17944 2003-09-26  Bruno Haible  <bruno@clisp.org>
17945
17946         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
17947         stpncpy().
17948         Don't define stpncpy through config.h; it's now done through stpncpy.h.
17949
17950 2003-09-26  Bruno Haible  <bruno@clisp.org>
17951
17952         * lib/stpncpy.h (gnu_stpncpy): New declaration.
17953         (stpncpy): Define as alias for gnu_stpncpy.
17954         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
17955
17956 2003-09-25  Simon Josefsson  <jas@extundo.com>
17957
17958         * lib/xgetdomainname.h: New file.
17959         * lib/xgetdomainname.c: New file.
17960
17961 2003-09-25  Simon Josefsson  <jas@extundo.com>
17962             Bruno Haible  <bruno@clisp.org>
17963
17964         * modules/getdomainname: New file.
17965         * modules/xgetdomainname: New file.
17966         * MODULES.html.sh (func_all_modules): Add getdomainname,
17967         xgetdomainname.
17968
17969 2003-09-25  Simon Josefsson  <jas@extundo.com>
17970             Bruno Haible  <bruno@clisp.org>
17971
17972         * m4/getdomainname.m4: New file.
17973
17974 2003-09-25  Simon Josefsson  <jas@extundo.com>
17975             Bruno Haible  <bruno@clisp.org>
17976
17977         * lib/getdomainname.h: New file.
17978         * lib/getdomainname.c: New file.
17979
17980 2003-09-25  Karl Berry  <karl@gnu.org>
17981
17982         * lib/argp-fmtstream.c, argp-help.c: update from libc.
17983
17984 2003-09-25  Karl Berry  <karl@gnu.org>
17985
17986         * config/install-sh: update from automake.
17987
17988 2003-09-25  Bruno Haible  <bruno@clisp.org>
17989
17990         * modules/version-etc-2: New file, from modules/version-etc with
17991         modifications.
17992         * MODULES.html.sh (func_all_modules): Add version-etc-2.
17993
17994 2003-09-25  Bruno Haible  <bruno@clisp.org>
17995
17996         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
17997         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
17998
17999 2003-09-24  Simon Josefsson  <jas@extundo.com>
18000
18001         * modules/xgethostname: Add xgethostname.h.
18002
18003 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18004
18005         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18006         the buffer associated with the argument.  Bug reported by
18007         Simon Josefsson.
18008
18009 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18010
18011         * README: Document assumptions that 'int' is at least 32 bits
18012         wide, that integer arithmetic is 2's complement without overflow,
18013         that there are no holes in integer values, that adding sizes of
18014         two nonoverlapping objects can't overflow, and that all-bits-zero
18015         yields scalar zero.  Fix spelling and capitalization typos.
18016
18017 2003-09-19  Karl Berry  <karl@gnu.org>
18018
18019         * lib/argp.h: update from libc.
18020
18021 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18022
18023         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18024         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18025         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18026
18027 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18028
18029         * gnulib-tool: Use "test -h", not "test -L", for portability
18030         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18031         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18032         (sed_extract_prog): Issue s commands one-by-one, rather than
18033         using \| in one s command.
18034
18035 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18036
18037         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18038         input error, instead of returning NULL the next time we are called
18039         (and therefore losing track of errno).
18040
18041 2003-09-16  Bruno Haible  <bruno@clisp.org>
18042
18043         * gnulib-tool (func_create_testdir): Warn about duplicated
18044         dependencies.
18045
18046 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18047
18048         * modules/argmatch, modules/fatal, modules/obstack,
18049         modules/xalloc, modules/xgethostname: Sort dependencies by
18050         importance, not alphabetically.
18051
18052 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18053
18054         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18055         fails, so that the caller gets the proper errno.
18056
18057         * lib/readutmp.c (read_utmp): Likewise.
18058         Check for fstat error.  Close stream and free storage
18059         when failing.
18060
18061 2003-09-14  Karl Berry  <karl@gnu.org>
18062
18063         * config/srclist.txt (strdup.c): disable for c89 changes.
18064
18065 2003-09-14  Jim Meyering  <jim@meyering.net>
18066
18067         * lib/getloadavg.c: Correct cpp indentation.
18068         * lib/strdup.c: Likewise.
18069         * lib/vasnprintf.c: Likewise.
18070
18071 2003-09-14  Bruno Haible  <bruno@clisp.org>
18072
18073         * modules/fwriteerror: New file.
18074         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18075
18076 2003-09-14  Bruno Haible  <bruno@clisp.org>
18077
18078         * lib/fwriteerror.h: New file.
18079         * lib/fwriteerror.c: New file.
18080
18081 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18082
18083         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18084         modules/xgethostname, modules/xalloc: Depend on exit.
18085
18086 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18087
18088         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18089
18090         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18091         and AC_MINIX, too, so that their extensions are available.
18092
18093         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18094         This macro has been superseded by gl_BACKUPFILE.
18095
18096         More patches to assume C89 or better.
18097
18098         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18099
18100         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18101         unconditionally.
18102         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18103         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18104         Include <string.h>, <stdlib.h> unconditionally.
18105         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18106         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18107         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18108         headers or for string.h.
18109         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18110         or strtoul.
18111
18112         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18113         headers.
18114         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18115         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18116         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18117         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18118         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18119         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18120         memcpy, memset.
18121         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18122         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18123         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18124         strtol.
18125         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18126         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18127         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18128         strtoul.
18129
18130 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18131
18132         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18133         * lib/obstack.c [!defined _LIBC]: Likewise.
18134         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18135         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18136         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18137
18138         More changes to assume C89 or better.
18139
18140         * lib/error.c (error_tail): Assume vprintf.
18141
18142         * lib/argmatch.c (getenv): Remove decl.
18143         * lib/progreloc.c (get_full_program_name): Define via prototype.
18144         * lib/setenv.c (clearenv): Likewise.
18145         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18146         needed.
18147         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18148         (malloc, memcpy): Remove decls.
18149         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18150         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18151         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18152         (memcpy): Remove macro.
18153         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18154         (__P): Remove.  All uses removed.
18155         (PTR): Remove.  All uses changed to void *.
18156         (CHAR_BIT, NULL): Remove.
18157         (spaces, zeros, memset_space, memset_zero)
18158         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18159         Remove.
18160         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18161         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18162         Define with prototype.
18163         Remove now-unnecessary prototype decl.
18164         (extra_args_spec): Assume ANSI C.  All uses changed.
18165         (extra_args_spec_iso): Remove.
18166         (my_strftime, emacs_strftimeu): Define via prototype.
18167         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18168         unconditionally.
18169         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18170         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18171         (strtoul, strtol): Remove decls.
18172         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18173         LONG_MAX): Remove.
18174         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18175         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18176         (LOCALE_PARAM_PROTO): New macro.
18177         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18178         (INTERNAL (strtol), strtol): Define with a prototype.
18179         (PARAMS): Remove.  All uses removed.
18180         * lib/tempname.c: Include <string.h> unconditionally.
18181         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18182         * lib/xgethostname.c (main): Define with a prototype.
18183         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18184         Include <stdlib.h> unconditionally.
18185         (calloc, malloc, realloc, free): Remove decls.
18186         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18187         Include <stdlib.h> unconditionally.  Sort include file names.
18188         (strtod): Remove.
18189         (xstrtod): Define with a prototype.
18190         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18191         (strtol, strtoul): Remove decls.
18192
18193 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18194
18195         More patches to assume C89 or better.
18196         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18197         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18198         string.h, memchr, STDC_HEADERS.
18199
18200 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18201
18202         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18203         Include <stdlib.h>, <string.h> unconditionally.
18204         Remove now-unnecessary cast to char *.
18205         * lib/strnlen.c: Include <string.h> unconditionally.
18206         * lib/yesno.c (yesno): Define with a prototype.
18207
18208 2003-09-11  Bruno Haible  <bruno@clisp.org>
18209
18210         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18211
18212 2003-09-10  Jim Meyering  <jim@meyering.net>
18213
18214         * lib/error.c: Correct indentation of cpp directives.
18215
18216 2003-09-10  Bruno Haible  <bruno@clisp.org>
18217
18218         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18219         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18220         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18221         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18222         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18223         <stdlib.h> and <string.h> checks.
18224         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18225         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18226
18227 2003-09-10  Bruno Haible  <bruno@clisp.org>
18228
18229         * lib/strcspn.c: Include <string.h> unconditionally.
18230         * lib/strpbrk.c: Include <string.h> unconditionally.
18231         * lib/strstr.c: Include <string.h> unconditionally.
18232         * lib/unicodeio.c: Include <string.h> unconditionally.
18233         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18234         * lib/unsetenv.c: Likewise.
18235         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18236         * lib/yesno.c: Include <stdlib.h> unconditionally.
18237         (rpmatch): Add prototype.
18238
18239 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18240
18241         More patches to assume C89 or better.
18242         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18243         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18244         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18245         or for string.h.
18246         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18247         stdlib.h.
18248         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18249         C headers.
18250         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18251         string.h.
18252         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18253         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18254         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18255         or for string.h.
18256         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18257         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18258         C headers.
18259         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18260         memcpy.
18261         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18262         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18263         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18264         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18265         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18266         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18267         string.h, free.
18268         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18269         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18270         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18271         C headers, or for string.h.
18272         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18273         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18274         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18275         headers, memory.h, stdlib.h, string.h, strings.h.
18276         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18277         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18278         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18279         strchr.
18280         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18281         headers, memory.h, string.h.
18282         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18283         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18284         free.
18285         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18286         headers.
18287         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18288         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18289         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18290         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18291         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18292
18293 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18294
18295         More K&R removal.
18296
18297         * lib/acosl.c (main): Use a prototype.
18298         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18299         tanl.c: Likewise.
18300
18301         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18302
18303         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18304         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18305         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18306         with a prototype.
18307         * lib/getopt.c (const): Remove macro.
18308         Include <string.h> unconditionally.
18309         (my_index): Remove; all uses changed to strchr.
18310         (strlen): Remove decl.
18311         (exchange): Remove forward decl; no longer needed.
18312         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18313         Define with prototype.
18314         * lib/getopt1.c (const): Remove macro.
18315         (getopt_long, getopt_long_only, main): Define with prototype.
18316
18317         * lib/getugroups.c: Include <string.h> unconditionally.
18318
18319         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18320         (getusershell, setusershell, endusershell, readname, main):
18321         Define with prototypes.
18322
18323         * lib/group-member.c: Include group-member.h first.
18324         Include <stdlib.h> unconditionally.
18325
18326         * lib/hard-locale.c: Include hard-locale.h first.
18327         Include <stdlib.h>, <string.h> unconditionally.
18328
18329         * lib/hash.c (free, malloc): Remove decls.
18330         Include <stdlib.h> unconditionally.
18331
18332         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18333         (getenv): Do not declare.
18334
18335         * lib/idcache.c: Include <string.h> unconditionally.
18336
18337         * lib/long-options.c: Include long-options.h first, to test interface.
18338         Include <stdlib.h> unconditionally.
18339
18340         * lib/makepath.c: Include makepath.h first, to test interface.
18341         Include <stdlib.h> and <string.h> unconditionally.
18342
18343         * lib/linebuffer.c: Include <stdlib.h>.
18344         (free): Remove decl.
18345
18346         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18347         stddef.h. rpl_malloc returns void *, not char *.
18348         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18349         prototype.
18350
18351         * lib/md5.h: Include <limits.h> unconditionally.
18352         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18353         (__P): Remove; all uses removed.
18354         * lib/md5.c: Include "md5.h" first.
18355         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18356         md5_buffer, md5_process_bytes, md5_process_block):
18357         Define with prototypes.
18358         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18359         * lib/sha.c: Include "sha.h" first.
18360         Include <stdlib.h>, <string.h> unconditionally.
18361
18362         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18363         * lib/memcmp.c (__ptr_t): Likewise.
18364         * lib/memrchr.c (__ptr_t): Likewise.
18365         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18366         Include <string.h> unconditionally.
18367         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18368         * lib/memchr.c: Include <stdlib.h> unconditionally.
18369         * lib/memchr.c (LONG_MAX): Remove.
18370         * lib/memrchr.c (LONG_MAX): Likewise.
18371         * lib/memchr.c (__memchr): Define via a prototype.
18372         * lib/memrchr.c (__memrchr): Likewise.
18373         * lib/memcmp.c (__P): Remove, and remove all uses.
18374         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18375         Remove forward decls; no longer needed.
18376         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18377         Use types required by C89 in prototype.
18378
18379         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18380         * lib/savedir.c: Likewise.
18381         * lib/mkdir.c (free): Remove decl.
18382         * lib/rmdir.c (rmdir): Define with a prototype.
18383         * lib/savedir.c: Include savedir.h first, to test interface.
18384
18385         * lib/mktime.c (STDC_HEADERS): Remove.
18386         Include <stdlib.h>, <string.h> unconditionally.
18387
18388         * lib/modechange.c: Include <stdlib.h> unconditionally.
18389         (malloc): Remove decl.
18390
18391         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18392         (free): Remove decl.
18393
18394         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18395         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18396         (This type really should be intptr_t, but that's a C99ism.)
18397         (_obstack_memcpy): Remove: all uses changed to memcpy.
18398         Include <string.h> unconditionally.
18399         (struct obstack): Assume __STDC__ for types of members
18400         chunkfun, freefun, extra_arg.
18401         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18402         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18403         obstack_begin, obstack_specify_allocation,
18404         obstack_specify_allocation_with_arg, obstack_chunkfun,
18405         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18406         Remove unprototyped decls and the macros that use them.
18407         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18408         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18409         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18410         (defined __STDC__ && __STDC__)]:
18411         Remove nonprototyped code.
18412         Include <stdlib.h> unconditionally.
18413         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18414         _obstack_allocated_p, _obstack_free, obstack_free,
18415         _obstack_memory_used, print_and_abort):
18416         Define using prototypes.
18417         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18418         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18419         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18420         obstack_next_free, obstack_object_size, obstack_room) [0]:
18421         Remove unused, unprototyped code.
18422
18423         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18424
18425         * lib/physmem.c (physmem_total, physmem_available, main): Define
18426         with prototypes.
18427
18428         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18429         (main): Define with a prototype.
18430
18431         * lib/posixver.c (getenv): Remove decl.
18432
18433         * lib/putenv.c (malloc): Returns void *, not char *.
18434         Include <string.h> unconditionally.
18435         (strchr, memcpy, NULL): Do not define.
18436
18437         * lib/readtokens.c: Include readtokens.h first, to test interface.
18438         Include <stdlib.h>, <string.h> unconditionally.
18439         (init_tokenbuffer): Define with a prototype.
18440
18441         * lib/regex.c (PARAMS): Remove.  All uses removed.
18442         All uses of _RE_ARGS removed, too.
18443         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18444         unconditionally.
18445         (bzero): Assume memset exists.
18446         (memcmp, memcpy, NULL): Remove.
18447         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18448         char, or assignments to local vars of type signed char.
18449         (init_syntax_once, PREFIX(extract_number_and_incr),
18450         PREFIX(print_partial_compiled_pattern),
18451         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18452         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18453         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18454         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18455         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18456         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18457         wcs_compile_range, byte_compile_range, truncate_wchar,
18458         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18459         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18460         count_mbs_length, wcs_re_match_2_internal,
18461         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18462         PREFIX(alt_match_null_string_p),
18463         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18464         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18465         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18466         now-unnecessary declaration, if any.
18467         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18468         regcomp, regexec):
18469         Remove now-unnecessary casts among pointer types.
18470         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18471
18472         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18473         (free): Remove decl.
18474
18475         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18476
18477         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18478         (free): Remove decl.
18479
18480         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18481         * lib/xgetcwd.c: Likewise.
18482
18483         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18484         (free): Remove decl.
18485
18486         * lib/strchrnul.c (strchrnul): Define with a prototype.
18487         Fix bug: c_in was not converted to char before searching.
18488
18489         The following changes are not K&R related:
18490
18491         * lib/group-member.h: Include <sys/types.h>, so that this file is
18492         self-contained.
18493         * lib/makepath.h: Likewise.
18494
18495         * lib/getusershell.c (readname, default_index, line_size, readname):
18496         Use size_t, not int, for sizes.
18497         (readname): If the size overflows, report an error instead of
18498         looping forever.
18499
18500 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18501
18502         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18503         libc.
18504
18505 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18506
18507         * README: New section: portability guidelines.
18508
18509 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18510
18511         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18512         C89 spec.
18513
18514 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18515
18516         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18517
18518 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18519
18520         Assume C89 or better; remove K&R cruft.
18521         A few of these changes were first proposed by Derek Robert Price
18522         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18523
18524         * lib/addext.c: Include <string.h> unconditionally.
18525         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18526         Don't declare getenv or malloc.
18527
18528         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18529         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18530         (NULL): Remove.
18531         (find_stack_direction, alloca): Use prototypes.
18532
18533         * lib/atexit.c (atexit): Define using a prototype.
18534
18535         * lib/basename.c, dirname.c, stripslash.c:
18536         Include <string.h> unconditionally.
18537
18538         * lib/bcopy.c: Include <stddef.h>.
18539         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18540
18541         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18542
18543         * lib/error.h (error, error_at_line, error_print_progname)
18544         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18545         * lib/error.c: Include error.h first, to check interface.
18546         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18547         (VA_START): Remove; all uses changeed to va_start.
18548         (exit, strerror): Remove decls.
18549         (error_print_progname): Prototype uncondionally.
18550         Don't include <errno.h>; no longer needed.
18551         (private_strerror): Remove.
18552         (error_tail): Always define.
18553         (error, error_at_line): Assume C89 or better; always use prototypes.
18554         * lib/fatal.c: Include "fatal.h" first, to test interface.
18555         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18556         (VA_START): Remove; all uses changed to va_start.
18557         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18558         this case.
18559         (exit): Remove decl.
18560         (fatal): Prototype unconditionally.  Assume va_start works.
18561         Abort at end, to pacify gcc.
18562
18563         * lib/euidaccess.c (main): Define with a prototype.
18564
18565         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18566
18567         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18568
18569         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18570         prototypes.
18571         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18572         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18573         (getenv): Remove decl.
18574         (fnmatch): Define using a prototype.
18575         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18576         (FCT): Define using a prototype.
18577
18578         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18579
18580         * lib/gethostname.c: Include <stddef.h>.
18581         (gethostname): Define with prototype.  Length is size_t, not int.
18582
18583 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18584
18585         Assume C89 or better; remove K&R cruft.
18586         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18587         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18588         string.h, getenv, malloc.
18589         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18590         headers.
18591         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18592         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18593         do not check for strerror.
18594         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18595         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18596         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18597         do not check for doprnt or vprintf.
18598         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18599         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18600
18601 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18602
18603         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18604         getversion.c should have been removed then, but was accidentally
18605         preserved.
18606
18607         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18608         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18609
18610 2003-09-08  Karl Berry  <karl@gnu.org>
18611
18612         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18613                 config, forget about prep.
18614
18615         * config/depcomp, missing: update from automake.
18616
18617 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18618
18619         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18620         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18621
18622 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18623
18624         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18625         copy_tm_result.  Bug reported by Simon Josefsson in
18626         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18627
18628 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18629
18630         * m4/time_r.m4: New file.
18631         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18632         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18633         is. Check for timegm declaration.
18634         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18635         Do not check for gmtime_r.
18636         Replace mktime if __mktime_internal does not exist and if mktime
18637         hasn't been replaced already.
18638
18639 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18640
18641         * lib/time_r.c, lib/time_r.h: New files.
18642
18643         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18644         __localtime_r.
18645         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18646         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18647
18648         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18649         __gmtime_r.
18650         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18651         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18652         Include <time_r.h>.
18653
18654         * lib/timegm.c: Switch to glibc implementation, with the following
18655         changes:
18656         [defined HAVE_CONFIG_H]: Include <config.h>.
18657         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18658         (__mktime_internal) [!defined _LIBC]: New decl.
18659         (__gmtime_r) [!defined _LIBC]: New macro and function.
18660         (timegm): Use a prototype, since gnulib assumes C89.
18661         Do not bother declaring tmp to be const, as it's not really usefu.
18662         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18663         (timegm): Declare only if HAVE_DECL_TIMEGM.
18664
18665 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18666
18667         * MODULES.html.sh (func_all_modules): Add time_r.
18668         * modules/time_r: New file.
18669         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18670         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18671
18672 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18673
18674         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18675         Bug reported by Lute Kamstra in
18676         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18677
18678         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18679         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18680         course with correspondingly smaller numbers for tomorrow and
18681         yesterday.  From Tadayoshi Funaba.  Originally installed into
18682         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18683         coreutils merge?).
18684
18685 2003-08-31  Simon Josefsson  <jas@extundo.com>
18686
18687         * modules/timegm: New file.
18688         * MODULES.html.sh (func_all_modules): Add timegm.
18689
18690 2003-08-31  Simon Josefsson  <jas@extundo.com>
18691
18692         * m4/timegm.m4: New file.
18693
18694 2003-08-31  Simon Josefsson  <jas@extundo.com>
18695
18696         * lib/timegm.h: New file.
18697         * lib/timegm.c: New file.  Based on
18698         wget-1.8.2/src/http.c:mktime_from_utc.
18699
18700 2003-08-31  Karl Berry  <karl@gnu.org>
18701
18702         * lib/argp.h: update from libc.
18703
18704 2003-08-28  Bruno Haible  <bruno@clisp.org>
18705
18706         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18707         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18708         followed by '#define fnmatch fnmatch_posix' gives an error.
18709
18710 2003-08-28  Bruno Haible  <bruno@clisp.org>
18711
18712         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18713         warning on QNX, which defines O_BINARY to 000000.
18714
18715 2003-08-27  Jim Meyering  <jim@meyering.net>
18716
18717         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18718         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18719         would fail after 32.  Reported by Danny Levinson.  Details here:
18720         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18721
18722 2003-08-24  Bruno Haible  <bruno@clisp.org>
18723
18724         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18725         MSVC7 <stdio.h> is included later.
18726
18727 2003-08-22  Simon Josefsson  <jas@extundo.com>
18728
18729         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18730
18731 2003-08-20  Karl Berry  <karl@gnu.org>
18732
18733         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18734
18735 2003-08-20  Bruno Haible  <bruno@clisp.org>
18736
18737         * modules/progname: New file.
18738         * MODULES.html.sh (func_all_modules): Add progname.
18739
18740 2003-08-20  Bruno Haible  <bruno@clisp.org>
18741
18742         * lib/progname.h: New file, from GNU gettext.
18743         * lib/progname.c: New file, from GNU gettext.
18744         * lib/progreloc.c: New file, from GNU gettext.
18745
18746 2003-08-19  Jim Meyering  <jim@meyering.net>
18747
18748         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18749         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18750
18751 2003-08-19  Bruno Haible  <bruno@clisp.org>
18752
18753         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18754         more.
18755
18756 2003-08-19  Bruno Haible  <bruno@clisp.org>
18757
18758         * lib/xstrdup.c: Assume <string.h> exists.
18759
18760 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18761
18762         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18763         in makefile rules.
18764
18765 2003-08-18  Jim Meyering  <jim@meyering.net>
18766
18767         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18768         * m4/lib-ld.m4: Likewise.
18769
18770 2003-08-18  Jim Meyering  <jim@meyering.net>
18771
18772         * lib/setenv.h: Indent nested cpp directive.
18773         * lib/vasnprintf.c: Remove trailing blanks.
18774
18775 2003-08-17  Simon Josefsson  <jas@extundo.com>
18776
18777         * modules/xstrndup: New file.
18778         * MODULES.html.sh (func_all_modules): Add xstrndup.
18779
18780 2003-08-17  Simon Josefsson  <jas@extundo.com>
18781
18782         * modules/argp: Fix autoconf macro name. Add more dependencies.
18783
18784 2003-08-17  Simon Josefsson  <jas@extundo.com>
18785
18786         * m4/xstrndup.m4: New file.
18787
18788 2003-08-17  Simon Josefsson  <jas@extundo.com>
18789
18790         * m4/argp.m4: New file.
18791
18792 2003-08-17  Simon Josefsson  <jas@extundo.com>
18793             Bruno Haible  <bruno@clisp.org>
18794
18795         * lib/xstrndup.h: New file.
18796         * lib/xstrndup.c: New file.
18797
18798 2003-08-17  Bruno Haible  <bruno@clisp.org>
18799
18800         * modules/strndup (Files, Include): Add lib/strndup.h.
18801
18802 2003-08-17  Bruno Haible  <bruno@clisp.org>
18803
18804         * modules/euidaccess (Files): Add lib/euidaccess.h.
18805
18806 2003-08-17  Bruno Haible  <bruno@clisp.org>
18807
18808         * lib/strndup.h: New file.
18809
18810 2003-08-17  Bruno Haible  <bruno@clisp.org>
18811
18812         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18813         like AC_GNU_SOURCE.
18814         * modules/extensions (configure.ac): Comment out the invocation of
18815         gl_USE_SYSTEM_EXTENSIONS.
18816
18817 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18818
18819         Merges from coreutils, etc.
18820         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18821         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18822         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18823         fixing a typo.
18824         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18825         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18826
18827 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18828
18829         Document merge from coreutils.
18830         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18831         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18832         * modules/utime: Add m4/utimes-null.m4.
18833
18834 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18835
18836         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18837         space, undoing this 2003-08-12 change:
18838         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18839
18840 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18841
18842         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18843         strtoul.c from libc, undoing this 2003-08-12 change:
18844         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18845
18846 2003-08-16  Jim Meyering  <jim@meyering.net>
18847
18848         Merges from coreutils.
18849         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18850         prefix.  Adjust cache variables similarly.  Create 500 rather than
18851         just 300 files, to exercise bug on Darwin6.5, too.
18852         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18853         $missing_dir.
18854         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18855         AM_SYS_POSIX_TERMIOS.
18856         Reported by mkc@mathdogs.com.
18857         Also change use of $am_cv_sys_posix_termios
18858         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18859         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18860         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18861         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18862         in /proc/mounts until it finds one with matching device number.  This
18863         is unnecessary when the FILE argument *is* a mount point.  No stat call
18864         is necessary in that case.  So, disable the statvfs-testing code on
18865         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18866         as RedHat bug# 84846.
18867         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18868         to 1MB, so as not to render systems with no stack size limit (e.g.,
18869         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18870         Include <unistd.h>.  On some systems,
18871         it is required for the definition of _SC_PAGESIZE.
18872
18873 2003-08-16  Jim Meyering  <jim@meyering.net>
18874
18875         Merge from coreutils.
18876         * lib/xstrtoimax.c: #else #if -> #elif.
18877         * lib/xstrtoumax.c: Likewise.
18878
18879 2003-08-16  Jim Meyering  <jim@meyering.net>
18880
18881         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18882         * m4/utimes.m4: Removed.
18883         * m4/utimes-null.m4: Renamed from utimes.m4.
18884
18885         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18886         to 1MB, so as not to render systems with no stack size limit (e.g.,
18887         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18888         Include <unistd.h>.  On some systems,
18889         it is required for the definition of _SC_PAGESIZE.
18890
18891 2003-08-16  Jim Meyering  <jim@meyering.net>
18892         and Paul Eggert  <eggert@cs.ucla.edu>
18893
18894         Merges from coreutils, etc.
18895
18896         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18897         using the latest version from cvs.  This avoids problems with #line
18898         directives using a vendor (Sun) compiler.
18899         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18900         Don't set GETGROUPS_LIB here; now it's
18901         done via getgroups.m4's wrapper function.
18902         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18903         rather than just in sh-util/configure.in, so that the
18904         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18905         same.
18906         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18907         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18908         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
18909         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
18910         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
18911         Remove code that is now done by the newly-required macros.
18912         Append $(EXEEXT) to DF_PROG.
18913         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
18914         Do not invoke or require the following here,
18915         since prereq.m4 or some gnulib .m4 now does this for us:
18916         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
18917         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
18918         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
18919         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
18920         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
18921         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
18922         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
18923         AC_FUNC_OBSTACK.
18924         Do not replace the following functions, as this is now the job
18925         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
18926         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
18927         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
18928         atexit getpass, strdup, getpagesize.
18929         Replace 'raise'.
18930         Do not check for the following functions, as this is now the job
18931         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
18932         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
18933         setregid.
18934         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
18935         Check for sys/sysctl.h.
18936         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
18937         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
18938         of checking for ssize_t ourselves.
18939
18940         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
18941         Require every macro that gnulib/modules/* suggests for us.
18942         (jm_PREREQ_ADDEXT): New macro.
18943         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
18944         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
18945
18946         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
18947         (gl_PHYSMEM): Use it.
18948         Also check for `table' function.
18949         Check for new headers and functions.
18950         Add check for sys/sysmp.h.
18951         With suggestions from Kaveh Ghazi.
18952         Ignore headers that are present but cannot be compiled.  This
18953         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
18954         C 5.4.
18955
18956 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18957
18958         Document merge from coreutils.
18959         * modules/userspec: Depend on posixver.
18960         * modules/strftime: Depend on tzset.
18961
18962 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18963
18964         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
18965         rather than tab, after '#' in shell-script copyright notices.
18966         Suggested by Bruno Haible.
18967
18968 2003-08-15  Paul Eggert  <eggert@twinsun.com>
18969
18970         * config/srclist-update: Use three spaces, rather than tab, after '#'
18971         in shell-script copyright notices.  Suggested by Bruno Haible.
18972         Remove unnecessary parenthesization in regular expression.
18973
18974 2003-08-15  Jim Meyering  <jim@meyering.net>
18975
18976         Merge from coreutils.
18977         * lib/xgethostname.c: Include <stdlib.h>.
18978         (xghostname): Don't exit for anything other than memory-related
18979         failure; just return NULL.
18980         * lib/userspec.c: Include "posixver.h".
18981         (parse_user_spec): Accept `.' as a separator only
18982         in pre-POSIX-200112 mode.
18983         * lib/strtoimax.c: Use #elif rather than #else #if.
18984         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
18985         Remove function, now that we can rely on a working tzset function.
18986         [!_LIBC]: Ensure that the required autoconf test has been run.
18987         [!defined _NL_CURRENT && HAVE_STRFTIME]:
18988         Use underlying_strftime for %r.
18989         * lib/sha.c: Merge in some clean-up and optimization changes from
18990         glibc.
18991         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
18992         Ensure that it is a multiple of 64.
18993         Rearrange loop exit tests so as to avoid performing an
18994         additional fread after encountering an error or EOF.
18995         * lib/realloc.c: Update copyright date.
18996
18997 2003-08-15  Jim Meyering  <jim@meyering.net>
18998         and Paul Eggert  <eggert@twinsun.com>
18999
19000         Merge from coreutils.
19001         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19002         member but strut utmpx does not.  Needed for AIX 4.3.3.
19003         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19004
19005 2003-08-15  Jim Meyering  <jim@meyering.net>
19006         and Paul Eggert  <eggert@cs.ucla.edu>
19007
19008         Merges from coreutils, etc.
19009         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19010         Require gl_FUNC_TZSET_CLOBBER.
19011         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19012         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19013         members.
19014
19015 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19016
19017         Help the merge from coreutils.
19018         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19019         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19020         * m4/tzset.m4: Use it too.
19021
19022 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19023
19024         * modules/tzset: New file.
19025
19026 2003-08-14  Jim Meyering  <jim@meyering.net>
19027
19028         Merges from coreutils.
19029         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19030         variable names, rather than @FNMATCH_H@.
19031         * modules/alloca: Likewise for $(ALLOCA_H).
19032
19033         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19034         the three copies of the literal target, `fnmatch.h'.
19035         * modules/alloca (alloca.h): Likewise.
19036
19037 2003-08-14  Jim Meyering  <jim@meyering.net>
19038
19039         Merge from coreutils.
19040         * m4/tzset.m4: New file.
19041         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19042         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19043         otherwise, AIX 5.1 systems would end up using the latter.
19044         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19045         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19046         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19047         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19048
19049 2003-08-14  Jim Meyering  <jim@meyering.net>
19050
19051         Merge from coreutils.
19052         * lib/obstack.h: Whitespace changes.
19053         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19054         and xcalloc return values.
19055         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19056         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19057         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19058         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19059         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19060         error from mntctl.
19061         Use mntctl's return value to drive the entry-processing loop, since
19062         we can't rely on the value of the vmt_length member in the last
19063         entry.  On some systems doing so could result in exhausting
19064         virtual memory.  Based in part on a patch from Mike Jetzer.
19065
19066 2003-08-14  Jim Meyering  <jim@meyering.net>
19067         and Paul Eggert  <eggert@twinsun.com>
19068
19069         Merges from coreutils, plus other fixes.
19070         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19071         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19072         for credits and details.  Thanks to Kaveh Ghazi for helping
19073         to keep these files in sync.
19074         (ARRAY_SIZE): Define it.
19075         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19076         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19077         (memcasecmp): Don't assume size_t fits in unsigned int.
19078         Remove casts and duplicate code.
19079         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19080         (memcpy): Remove definition.
19081         Merge in some clean-up and optimization changes from glibc.
19082         [BLOCKSIZE]: Move definition to top of file.
19083         Ensure that it is a multiple of 64.
19084         Rearrange loop exit tests so as to avoid performing an
19085         additional fread after encountering an error or EOF.
19086         * lib/md5.h (md5_uintptr): Define.
19087         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19088         return to the initial working directory.  Preserve errno
19089         for caller.
19090         * lib/idcache.c: Include "xalloc.h".
19091         (xmalloc, xrealloc): Remove decls.
19092         (getuser): Remove casts no longer required in C89.
19093         * lib/human.c: Include stdio.h, for sprintf.
19094         * lib/group-member.c: Include "xalloc.h".
19095         (xmalloc, xrealloc): Remove decls.
19096         (get_group_info): Remove casts no longer required in C89.
19097         * lib/getusershell.c (readname): Remove casts no longer required in
19098         C89.
19099         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19100         * lib/getline.c: Whitespace fix, from coreutils.
19101
19102 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19103
19104         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19105         Check for isascii.
19106
19107         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19108         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19109         Undo previous (whitespace-only) change.
19110
19111 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19112
19113         * lib/exclude.c: Include <ctype.h>
19114         (IN_CTYPE_DOMAIN): New macro.
19115         (is_space): New fn.
19116         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19117         and empty lines.
19118
19119         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19120         Undo previous (whitespace-only) change.
19121
19122 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19123
19124         * config/srclist-update: Change update back to the old behavior,
19125         leaving whitespace alone.  Use one 'sed' command rather than a
19126         pipeline.
19127         (fixlicense): Now a variable, not a function.
19128         (remove_trailing_blanks): Remove.
19129         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19130         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19131         Undo previous (whitespace-only) change.
19132
19133 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19134
19135         Merge from coreutils.
19136         * modules/euidaccess: Add lib_SOURCES, include for new
19137         file euidaccess.h
19138
19139 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19140
19141         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19142         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19143         Normalize leading white space and remove trailing white space.
19144
19145         Merge from coreutils
19146         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19147
19148         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19149         0.12.1.  These files are now being upgraded automatically by
19150         ../config/srclist-update.
19151
19152 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19153
19154         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19155         Normalize leading white space and remove trailing white space.
19156         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19157         notice, as per ../config/srclist-update.
19158
19159         Merge from coreutils.
19160         * lib/euidaccess.h: New file.
19161         * lib/euidaccess.c: Include it.
19162         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19163         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19164         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19165
19166 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19167
19168         * config/srclist-update: Add copyright notice.
19169         (remove_id_lines, remove_trailing_blanks): New constants.
19170         (fixfile): Use them to normalize spacing a bit in copied files.
19171         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19172         Normalize leading white space and remove trailing white space.
19173
19174         * config/texinfo.tex: Sync with texinfo.
19175
19176         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19177         strtoul.c from libc, to merge coreutils whitespace changes.
19178
19179         * config/srclist.txt: Get the following m4 files from gettext:
19180         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19181         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19182         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19183         wint_t.m4.
19184
19185 2003-08-12  Karl Berry  <karl@gnu.org>
19186
19187         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19188         been made.
19189
19190 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19191
19192         * modules/gnu-source, m4/gnu-source.m4:
19193         Remove; we're assuming Autoconf 2.54 or later now.
19194         Suggested by Bruno Haible.
19195         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19196
19197 2003-08-11  Bruno Haible  <bruno@clisp.org>
19198
19199         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19200
19201 2003-08-11  Bruno Haible  <bruno@clisp.org>
19202
19203         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19204         (vasnprintf): Use it instead of wcslen.
19205
19206 2003-08-11  Bruno Haible  <bruno@clisp.org>
19207
19208         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19209         value to ensure that _Bool promotes to int. Use #define for _Bool when
19210         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19211
19212 2003-08-10  Karl Berry  <karl@gnu.org>
19213
19214         * lib/regex.h: update from libc (whitespace fix).
19215
19216 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19217
19218         Merge some files from coreutils.  These changes were
19219         originally made by Jim Meyering.
19220         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19221         many older Unixes require this.
19222         * lib/alloca.c (alloca): Remove cast to argument of free;
19223         no longer needed in C89.
19224         * lib/alloca_.h, regex.h: Fix white space to match
19225         what GNU indent does.
19226
19227 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19228
19229         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19230         apparently Emacs's Unicode mode got confused before my 2003-08-05
19231         checkin.
19232
19233 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19234
19235         * m4/extensions.m4: New file.
19236         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19237         Require gl_USE_SYSTEM_EXTENSIONS.
19238         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19239         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19240
19241 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19242
19243         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19244         * modules/extensions, modules/gnu-source: New files.
19245         * modules/timespec, modules/unlocked-io: Depend on extensions.
19246
19247 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19248
19249         * modules/restrict: New file.
19250         * MODULES.html.sh (func_all_modules): Add restrict.
19251         * modules/regex: Depend on restrict.
19252
19253 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19254
19255         * m4/restrict.m4: New file.
19256         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19257
19258 2003-08-07  Bruno Haible  <bruno@clisp.org>
19259
19260         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19261         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19262
19263 2003-08-07  Bruno Haible  <bruno@clisp.org>
19264
19265         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19266         makes the module 'getndelim2' compatible with the module 'getline'.
19267
19268 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19269
19270         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19271         byte with "\201" to avoid glitches when editing that source file
19272         with multi-gnome-terminal.
19273
19274 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19275
19276         * lib/bumpalloc.h: Remove.
19277
19278 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19279
19280         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19281         * modules/bumpalloc: Remove.
19282
19283 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19284
19285         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19286         GNU coding style.
19287
19288         Merge from coreutils.
19289         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19290         1. From glibc.
19291         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19292         from Karl Berry, implemented by Jim Meyering.
19293         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19294         from Dmitry V. Levin.
19295         Remove anachronistic cast of xrealloc.
19296         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19297         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19298         type. Otherwise, it wouldn't compile with at least /bin/cc on
19299         ymp-cray-unicos9.0.2.X.
19300         Combine two mostly-identical uses of alloca into one.
19301         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19302
19303 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19304
19305         [From Emacs.]
19306
19307         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19308         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19309         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19310         obsolete NLIST_NAME_UNION.
19311         [__GNU__]: Undef BSD and FSCALE.
19312         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19313
19314 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19315
19316         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19317         an enum type, so that it's guaranteed to promote to int.  See:
19318         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19319
19320 2003-08-03  Karl Berry  <karl@gnu.org>
19321
19322         * config/depcomp: update from automake.
19323
19324 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19325
19326         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19327         (strerror): Don't assume that a printable int fits in 14 bytes.
19328
19329 2003-07-31  Bruno Haible  <bruno@clisp.org>
19330
19331         * modules/getpass-gnu: New file.
19332         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19333
19334 2003-07-31  Bruno Haible  <bruno@clisp.org>
19335
19336         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19337
19338 2003-07-24  Karl Berry  <karl@gnu.org>
19339
19340         * config/missing: update from automake.
19341
19342 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19343             Bruno Haible  <bruno@clisp.org>
19344
19345         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19346         * lib/getline.c (getline, getdelim): Likewise.
19347         Remove _GNU_SOURCE define; now it's defined in config.h through
19348         m4/getline.m4.
19349
19350 2003-07-23  Karl Berry  <karl@gnu.org>
19351
19352         * config/config.sub: update from prep.
19353
19354 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19355
19356         * modules/xalloc (Depends-on): Add exitfail.
19357         * modules/xmemcoll: Likewise.
19358
19359 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19360
19361         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19362         over-parenthesization in macros.
19363
19364         Sync with coreutils.
19365
19366         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19367         required by C99.
19368
19369         Use `exit_failure' for xalloc and xmemcoll instead of their own
19370         private exit-failure variables.
19371         * lib/xalloc.h (xalloc_exit_failure): Remove.
19372         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19373         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19374         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19375         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19376         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19377
19378 2003-07-20  Jim Meyering  <jim@meyering.net>
19379
19380         * modules/closeout (Depends-on): Add exitfail.
19381         Suggestion from Bruno Haible.
19382
19383 2003-07-19  Karl Berry  <karl@gnu.org>
19384
19385         * config/config.sub: update from prep.
19386
19387 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19388
19389         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19390         Remove.
19391         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19392         to test that it can stand by itself.  Include "exitfail.h".
19393         Clients should set exit_failure instead.
19394         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19395
19396 2003-07-18  Bruno Haible  <bruno@clisp.org>
19397
19398         * modules/getndelim2: New file.
19399         * modules/getline: Share files with module getndelim2.
19400         * modules/getnline: Depend on getndelim2 instead of sharing files with
19401         it. Add getnline.c to lib_SOURCES.
19402         * MODULES.html.sh (func_all_modules): Add getndelim2.
19403
19404 2003-07-18  Bruno Haible  <bruno@clisp.org>
19405
19406         * m4/getndelim2.m4: New file.
19407         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19408         invoke gl_PREREQ_GETNDELIM2.
19409         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19410         gl_PREREQ_GETNDELIM2.
19411         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19412         gl_GETNDELIM2.
19413
19414 2003-07-18  Bruno Haible  <bruno@clisp.org>
19415
19416         * lib/getndelim2.h: New file.
19417         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19418         getndelim2.h.
19419         (getndelim2): Make non-static. Change return type to ssize_t.
19420         * lib/getline.h: Change argument names.
19421         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19422         * lib/getnline.c: Include getndelim2.h.
19423
19424 2003-07-18  Andreas Schwab  <schwab@suse.de>
19425
19426         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19427
19428 2003-07-17  Karl Berry  <karl@gnu.org>
19429
19430         * config/config.sub: update from prep.
19431
19432 2003-07-17  Bruno Haible  <bruno@clisp.org>
19433
19434         * modules/getnline: New file.
19435         * modules/getline: Add lib/getndelim2.c to source file list.
19436         * MODULES.html.sh (func_all_modules): Add getnline.
19437
19438 2003-07-17  Bruno Haible  <bruno@clisp.org>
19439
19440         * m4/getnline.m4: New file.
19441
19442 2003-07-17  Bruno Haible  <bruno@clisp.org>
19443
19444         * m4/Makefile.am.in: Remove file.
19445         * m4/Makefile.am: Remove file.
19446         * m4/Makefile.in: Remove file.
19447
19448 2003-07-17  Bruno Haible  <bruno@clisp.org>
19449
19450         * lib/getnline.h: New file.
19451         * lib/getnline.c: New file.
19452         * lib/getndelim2.c: New file, extracted from getline.c.
19453         (getndelim2): Renamed from getdelim2, with added nmax argument.
19454         * lib/getline.c: Include getndelim2.c.
19455         (getdelim2): Moved out to getndelim2.c.
19456         (getline, getdelim): Update.
19457
19458 2003-07-17  Bruno Haible  <bruno@clisp.org>
19459
19460         * lib/Makefile.am: Remove file.
19461         * lib/Makefile.in: Remove file.
19462
19463 2003-07-17  Bruno Haible  <bruno@clisp.org>
19464
19465         * configure.in: Remove file.
19466         * Makefile.in: Remove file.
19467
19468 2003-07-17  Bruno Haible  <bruno@clisp.org>
19469
19470         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19471
19472 2003-07-16  Karl Berry  <karl@gnu.org>
19473
19474         * config/srclist-update: was running fixlicense twice, which caused
19475                 texinfo.tex to be nullified for some reason.  Simplify,
19476                 $gplsrc is no longer needed as far as I can see?
19477
19478 2003-07-16  Jim Meyering  <jim@meyering.net>
19479
19480         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19481
19482 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19483
19484         * config/srclist.txt: Get the following files from gettext-runtime/intl
19485         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19486         ref-del.sin.  From Bruno Haible.
19487         * config/srclist-update (fixfile): Change grep pattern again, since the
19488         previous fix didn't work (there was another trailing $).  Use
19489         '[$]' to escape the $s.
19490
19491 2003-07-15  Karl Berry  <karl@gnu.org>
19492
19493         * lib/vasnprintf.c: update from gettext.
19494
19495 2003-07-15  Karl Berry  <karl@gnu.org>
19496
19497         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19498         gets expanded when surrounded by '$'.
19499
19500 2003-07-15  Jim Meyering  <jim@meyering.net>
19501
19502         * modules/save-cwd: Don't depend on error.  From Derek Price.
19503
19504 2003-07-15  Jim Meyering  <jim@meyering.net>
19505
19506         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19507
19508 2003-07-14  Simon Josefsson  <jas@extundo.com>
19509
19510         * modules/mempcpy: New file.
19511         * MODULES.html.sh (func_all_modules): Add mempcpy.
19512
19513 2003-07-14  Simon Josefsson  <jas@extundo.com>
19514
19515         * m4/mempcpy.m4: New file.
19516
19517 2003-07-14  Simon Josefsson  <jas@extundo.com>
19518
19519         * lib/mempcpy.h: New file.
19520         * lib/mempcpy.c: New file.
19521
19522 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19523
19524         * modules/getdate, modules/posixtm: Depend on mktime.
19525
19526 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19527
19528         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19529         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19530         unicodeio.c, unicodeio.h, unlocked-io.h:
19531         Switch from LGPL to GPL.
19532
19533 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19534
19535         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19536         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19537         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19538         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19539         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19540         updated automatically by ../config/srclist-update.  This changes
19541         their license from LPGL to GPL.
19542
19543 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19544
19545         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19546         assumed to refer to the root of the most recent stable gettext version.
19547         * config/srclistvars.sh: Add defaults for eggert.
19548         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19549         Match "This program" as well as "The program".  This is needed
19550         for gettext.
19551
19552 2003-07-14  Jim Meyering  <jim@meyering.net>
19553
19554         Don't emit diagnostics.  Let callers do that.
19555         * lib/save-cwd.c: Don't include "error.h".
19556         (save_cwd): Don't call error.  Ensure that errno is valid
19557         when returning nonzero.
19558
19559         * lib/save-cwd.h (restore_cwd): Update prototype.
19560         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19561         Simplify.  Don't call error upon failure.  Let callers do that.
19562         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19563         when auditing is enabled.  But don't bother updating the #if.
19564
19565 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19566
19567         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19568         it breaks C++ compilation.
19569         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19570
19571 2003-07-10  Simon Josefsson  <jas@extundo.com>
19572
19573         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19574
19575 2003-07-10  Jim Meyering  <jim@meyering.net>
19576
19577         * m4/clock_time.m4: Remove trailing blank.
19578         * m4/intmax_t.m4: Likewise.
19579
19580 2003-07-10  Jim Meyering  <jim@meyering.net>
19581
19582         * lib/vasnprintf.c: Remove trailing blanks.
19583         Make cpp indentation consistent.
19584
19585 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19586
19587         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19588         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19589         Switch from LGPL to GPL.
19590
19591 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19592
19593         * config/srclist.txt: Sort sublists.  Add
19594         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19595         that differ from gnulib for one reason or another; we'd like this list
19596         to be smaller but for now let's document what we have.
19597
19598 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19599
19600         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19601         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19602         and sweeter "eval x=$x".
19603         * config/srclist.txt: Get lib/argp* from glibc.
19604
19605 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19606
19607         * lib/mktime.c: Fix some boundary cases and remove need for floating
19608         point.
19609
19610         Issue a compile-time diagnostic if time_t is floating point, or if
19611         two's complement arithmetic is not in effect, or if arithmetic
19612         right shift does not propagate the sign.  These assumptions were
19613         all in the original code but they weren't checked.
19614
19615         (TIME_T_MIDPOINT, verify): New macros.
19616         (__isleap): Remove; it has integer overflow problems.
19617         (leapyear): New function, without those problems.
19618         (ydhms_tm_diff): Remove; splitting into two parts.
19619         (ydhms_diff): New function, containing the arithmetic part of
19620         the old ydhms_tm_diff function.  Issue a compile-time
19621         diagnostic if we are not using C99 integer division.
19622         Avoid casts when possible.
19623         (guess_time_tm): New function, containing the checking part of
19624         the old ydhms_tm_diff function.  Return the new value, rather than
19625         the difference between it and the old.  Accept a new argument T
19626         so that *T specifies the old value.  Check for overflow in the result.
19627
19628         (__mktime_internal): Use a time_t offset, not a long int offset.
19629         This undoes the 2003-06-04 change, which is no longer needed now
19630         that we have better overflow checking.
19631         (localtime_offset): Likewise.
19632
19633         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19634         and long are 64-bit but int is only 32-bit.
19635         (ydhms_diff): Use long int to store year1 and yday1.
19636         Issue a compile-time diagnostic if long int is not wide enough.
19637
19638         (__mktime_internal): Use long int to store adjusted year and yday.
19639         Use plain C rather than preprocessor commands, if that doesn't
19640         affect efficiency.
19641         Check for overflow (and try to repair) after each probe
19642         rather than checking only at the very end.  This avoids some bugs
19643         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19644         does not equal GMT offset at maximum time).
19645         Use integer to check for overflow rather than floating point; this
19646         is more portable to non-IEEE hosts, and is a tad faster.
19647         When we detect that we are oscillating between two values,
19648         don't check whether tm_isdst has the requested value, since
19649         we already know the answer.  When tm_isdst has the wrong value,
19650         use a different heuristic to find the right one, based on the
19651         extreme values actually observed in practice in tz2003a,
19652         rather than the (overly optimistic) "previous 3 calendar quarters".
19653
19654         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19655         "T const" to accommodate glibc style.
19656         (check_result): Use less-confusing report format.  "long" -> "long int.
19657         (main): Likewise.
19658         Don't loop if the iteration overflows time_t.
19659         Allow a negative step in the iteration.
19660
19661 2003-07-06  Karl Berry  <karl@gnu.org>
19662
19663         * config/depcomp: update from automake.
19664         * config/config.sub: update from prep.
19665
19666 2003-07-03  Karl Berry  <karl@gnu.org>
19667
19668         * config/config.guess: update from prep.
19669
19670 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19671
19672         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19673         xreadlink.c now includes it unconditionally.
19674
19675 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19676
19677         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19678         having it depend on HAVE_SYS_TYPES_H.
19679
19680 2003-07-01  Bruno Haible  <bruno@clisp.org>
19681
19682         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19683         <sys/types.h> should be sufficient.
19684         Reported by Paul Eggert.
19685
19686 2003-06-26  Karl Berry  <karl@gnu.org>
19687
19688         * config/depcomp: update from automake.
19689
19690 2003-06-26  Bruno Haible  <bruno@clisp.org>
19691
19692         * modules/human: Depend on module stdbool.
19693
19694 2003-06-25  Bruno Haible  <bruno@clisp.org>
19695
19696         * modules/readlink: New file.
19697         * modules/xreadlink: Depend on it.
19698         * MODULES.html.sh (func_all_modules): Add readlink.
19699
19700 2003-06-25  Bruno Haible  <bruno@clisp.org>
19701
19702         * m4/readlink.m4: New file.
19703
19704 2003-06-25  Bruno Haible  <bruno@clisp.org>
19705
19706         * lib/readlink.c: New file.
19707
19708 2003-06-22  Karl Berry  <karl@gnu.org>
19709
19710         * config/srclist.txt: update mkinstalldirs from automake.
19711         * config/mkinstalldirs: update.
19712
19713 2003-06-22  Bruno Haible  <bruno@clisp.org>
19714
19715         Portability to mingw32.
19716         * m4/ssize_t.m4: New file, from GNU gettext.
19717         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19718         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19719
19720 2003-06-22  Bruno Haible  <bruno@clisp.org>
19721
19722         * modules/safe-read: Add m4/ssize_t.m4.
19723         * modules/xreadlink: Add m4/ssize_t.m4.
19724
19725 2003-06-20  Bruno Haible  <bruno@clisp.org>
19726
19727         Assume C89, so PARAMS isn't needed.
19728         * lib/unicodeio.h (PARAMS): Remove.
19729         * lib/unicodeio.c: Don't use PARAMS.
19730
19731 2003-06-18  Karl Berry  <karl@gnu.org>
19732
19733         * config/config.{guess,sub}: update from prep.
19734
19735 2003-06-18  Jim Meyering  <jim@meyering.net>
19736
19737         Merge changes from coreutils.
19738         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19739         Remove explicit declarations of xmalloc and realloc.
19740         Include xalloc.h.
19741         (read_utmp): Remove anachronistic cast of xmalloc.
19742
19743 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19744
19745         Assume C89, so PARAMS isn't needed.
19746         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19747         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19748         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19749         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19750         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19751         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19752         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19753         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19754         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19755         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19756         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19757         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19758         no longer needed. Anyway, config.h should always be included before any
19759         other file.
19760
19761 2003-06-11  Simon Josefsson  <jas@extundo.com>
19762
19763         * modules/sysexits: New file.
19764         * MODULES.html.sh (func_all_modules): Add sysexits.
19765
19766 2003-06-11  Simon Josefsson  <jas@extundo.com>
19767
19768         * lib/sysexit_.h: New file.
19769
19770 2003-06-11  Derek Price  <derek@ximbiot.com>
19771
19772         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19773         necessary.
19774
19775 2003-06-11  Bruno Haible  <bruno@clisp.org>
19776
19777         * m4/sysexits.m4: New file.
19778
19779 2003-06-10  Simon Josefsson  <jas@extundo.com>
19780
19781         * lib/argp.h: New file, from glibc.
19782         * lib/argp-ba.c: New file, from glibc.
19783         * lib/argp-eexst.c: New file, from glibc.
19784         * lib/argp-fmtstream.c: New file, from glibc.
19785         * lib/argp-fmtstream.h: New file, from glibc.
19786         * lib/argp-fs-xinl.c: New file, from glibc.
19787         * lib/argp-help.c: New file, from glibc.
19788         * lib/argp-namefrob.h: New file, from glibc.
19789         * lib/argp-parse.c: New file, from glibc.
19790         * lib/argp-pv.c: New file, from glibc.
19791         * lib/argp-pvh.c: New file, from glibc.
19792         * lib/argp-xinl.c: New file, from glibc.
19793
19794 2003-06-10  Simon Josefsson  <jas@extundo.com>
19795
19796         * modules/strchrnul: New file.
19797
19798 2003-06-10  Simon Josefsson  <jas@extundo.com>
19799
19800         * modules/argp: New file.
19801
19802 2003-06-10  Simon Josefsson  <jas@extundo.com>
19803
19804         * m4/strchrnul.m4: New file.
19805
19806 2003-06-10  Simon Josefsson  <jas@extundo.com>
19807
19808         * lib/strchrnul.h: New file.
19809         * lib/strchrnul.c: New file.
19810
19811 2003-06-10  Bruno Haible  <bruno@clisp.org>
19812
19813         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19814
19815 2003-06-07  Karl Berry  <karl@gnu.org>
19816
19817         * config/config.{guess,sub}: update from prep.
19818
19819 2003-06-07  Jim Meyering  <jim@meyering.net>
19820
19821         * modules/strtod: Use $(...) notation, not @...@ for
19822         AC_REPLACE'd variables.
19823         * modules/localcharset: Likewise.
19824
19825 2003-06-07  Jim Meyering  <jim@meyering.net>
19826
19827         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19828         in place of my name in the copyright comment.
19829         Remove definition and uses of __P.
19830
19831         From coreutils.
19832         * lib/stat.c: Don't declare xmalloc explicitly.
19833         Instead, include "xalloc.h".
19834         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19835         xrealloc, and xcalloc return values.
19836         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19837         Improve comment.
19838         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19839
19840 2003-06-07  Bruno Haible  <bruno@clisp.org>
19841
19842         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19843         avoid AC_CONFIG_LINKS.
19844         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19845         fnmatch.h, to avoid AC_CONFIG_LINKS.
19846         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19847
19848 2003-06-07  Bruno Haible  <bruno@clisp.org>
19849
19850         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19851         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19852         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19853         directory.
19854         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19855         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19856         directory.
19857
19858 2003-06-06  Jim Meyering  <jim@meyering.net>
19859
19860         Merge from coreutils.
19861         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19862         Consolidate declarations and initializations of *_base* locals.
19863
19864         Merge from coreutils.
19865         This avoids a core dump on systems without GNU putenv,
19866         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19867         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19868         (unsetenv): New static function, from GNU libc.
19869         (rpl_putenv): Use it.
19870
19871         * lib/modechange.c: Remove trailing blanks.
19872
19873         Merge from coreutils.
19874         * lib/fsusage.c: Remove declaration of statfs.
19875         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19876
19877         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19878
19879 2003-06-06  Jim Meyering  <jim@meyering.net>
19880
19881         * lib/stdbool_.h: Renamed from stdbool.h.in.
19882
19883 2003-06-06  Jim Meyering  <jim@meyering.net>
19884             Bruno Haible  <bruno@clisp.org>
19885
19886         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19887         Adjust Makefile.am snippet not to redirect directly to target.
19888         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19889
19890 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19891
19892         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19893         mismatch, look in future quarters as well as past.  This fixes a
19894         bug when processing fall-backwards gaps immediately after a long
19895         period of daylight-saving time.
19896
19897         * lib/mktime.c: Assume freestanding C89 or better.
19898         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19899         (__P): Remove; not used.
19900         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19901         (mktime, not_equal_tm, print_tm, check_result,
19902         main): Use prototypes.  Use const * where appropriate.
19903         (main): Fix typo in testing code that uncovered by above changes.
19904         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19905
19906 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19907
19908         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
19909         locale.h, localeconv.  This merges changes from coreutils.
19910
19911         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
19912         It can be removed after the next Autoconf is released.
19913         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
19914         needed.
19915
19916 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19917
19918         * lib/mktime.c: Fix Debian bug 177940
19919         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
19920         (localtime_offset): Now long int, not time_t, because we want it
19921         to be guaranteed to be signed.  All uses changed.
19922         (__mktime_internal): If overflow would occur when adding offset,
19923         don't add it.
19924
19925         Merge 'human' changes from coreutils.  Rewrite to support
19926         locale-specific notations like thousands separators.
19927         * lib/human.c: Simplify authorship notice.
19928         Include human.h immediately after config.h.
19929         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
19930         <limits.h>: Do not include, since human.h does.
19931         (SIZE_MAX, UINTMAX_MAX): New macros.
19932         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
19933         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
19934         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
19935         (power_letter): Renamed from suffixes.
19936         (generate_suffix_backwards): Remove.
19937         (adjust_value): Now takes int style (because of human.h changes)
19938         and long double value (for greater precision on some platforms).
19939         (group_number): New function.
19940         (human_readable): Use it.  Use integer options, not enum.
19941         Put the options before the sizes in the arg list.
19942         Support all the new options.
19943         The old human_readable function has been removed;
19944         use inttostr.h instead.
19945         (human_readable, default_block_size, humblock):
19946         Use uintmax_t, not int, for block sizes.
19947         (human_readable_inexact, block_size_types): Remove.
19948         (block_size_opts): New constant.
19949         (human_options): Renamed from human_block_size, with new signature
19950         that allows block sizes up to UINTMAX_MAX.  All callers changed.
19951         * lib/human.h: Add copyright and authorship notice.
19952         Include <limits.h> and <stdbool.h> unconditionally.
19953         (PARAMS): Remove.  All uses removed.
19954         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
19955         (enum human_inexact_style): Remove tag; now a nameless enum.
19956         (human_floor, human_ceiling, human_round_to_even): Now have
19957         values 2, 0, 1 rather than -1, 1, 0.
19958         (human_group_digits, human_suppress_point_zero, human_autoscale,
19959         human_base_1024, human_SI, human_B): New constants.
19960         (human_readable_inexact, human_block_size): Remove.
19961         (human_readable): Size args are now uintmax_t, not int.
19962         (human_options): New decl.
19963
19964         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
19965         unnecessary now that we assume C89 or better.  This change
19966         imported from coreutils.
19967
19968         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
19969         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
19970         in the 2003-05-30 sync from glibc.
19971
19972         .h files should stand alone, but we shouldn't include <sys/types.h>
19973         if we can get away with just <stddef.h>.
19974
19975         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
19976         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
19977         rather than <sys/types.h>, as we merely need size_t.
19978         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
19979         to get size_t.
19980         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
19981         Include <stdio.h>, to get FILE.
19982         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
19983         memcasecmp.h has included <stddef.h> and all we need is size_t.
19984         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
19985         our interface, instead of including <sys/types.h>
19986
19987 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19988
19989         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
19990         now, as glibc mktime is buggy on non-glibc systems.
19991
19992 2003-06-03  Karl Berry  <karl@gnu.org>
19993
19994         * config/config.sub: update from prep.
19995
19996 2003-06-02  Paul Eggert  <eggert@twinsun.com>
19997
19998         [from coreutils]
19999         Fix some minor time-related bugs with POSIX time arguments.
20000         Some valid time stamps were being rejected (notably -1, and
20001         time stamps before 1900 on 64-bit hosts).  And some invalid
20002         time stamps were being accepted, e.g. September 31.
20003
20004         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20005         that we can return (time_t) -1 successfully.
20006         * lib/posixtm.c: Likewise.
20007         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20008         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20009         (t): Remove static var.
20010         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20011         of static var.  All uses changed.
20012         (year): Do not reject years before 1900; they can occur with
20013         64-bit time_t.
20014         (posix_time_parse): Do not check for out-of-range components;
20015         that is now the caller's responsibility, since our checks were
20016         only approximations.
20017         (posixtime): Use mktime to check for out-of-range components,
20018         since it knows them exactly.
20019         If mktime returns (time_t) -1, check whether an error actually occurred
20020         by invoking localtime on -1.
20021         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20022         posixtime failures better.
20023         Improve the test data (in comments only).
20024
20025 2003-06-02  Karl Berry  <karl@gnu.org>
20026
20027         * config/mkinstalldirs (version): new variable.
20028         (--version): new option.
20029         (usage): improve message.
20030
20031 2003-05-30  Karl Berry  <karl@gnu.org>
20032
20033         * lib/mktime.c: update from libc.
20034
20035 2003-05-30  Bruno Haible  <bruno@clisp.org>
20036
20037         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20038         * config/config.rpath: Upgrade to gettext-0.12.1.
20039
20040 2003-05-30  Bruno Haible  <bruno@clisp.org>
20041
20042         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20043         * m4/nls.m4: New file, from gettext-0.12.1.
20044         * m4/po.m4: New file, from gettext-0.12.1.
20045         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20046
20047 2003-05-30  Bruno Haible  <bruno@clisp.org>
20048
20049         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20050         * lib/localcharset.h: Likewise.
20051         * lib/localcharset.c: Likewise.
20052
20053 2003-05-29  Karl Berry  <karl@gnu.org>
20054
20055         * config/config.rpath: update from gettext.
20056
20057 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20058
20059         Assume the headers required for C89 freestanding compilers.
20060         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20061         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20062         * m4/human.m4 (gl_HUMAN): Likewise.
20063         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20064         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20065         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20066         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20067         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20068         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20069
20070 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20071
20072         Assume the headers required for C89 freestanding compilers.
20073         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20074         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20075         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20076         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20077         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20078         define, since <limits.h> is guaranteed to do that.
20079         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20080         * lib/exclude.c: Include <stdbool.h> unconditionally.
20081         * lib/tempname.c: Include <stddef.h> unconditionally.
20082         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20083         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20084         <stddef.h> does that.
20085         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20086         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20087         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20088         needed.
20089         * lib/xstrtol.c: Likewise.
20090         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20091         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20092
20093         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20094         warnings on some platforms.
20095
20096         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20097         arbitrarily.
20098
20099 2003-05-26  Jim Meyering  <jim@meyering.net>
20100
20101         Merge in a change from coreutils:
20102         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20103         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20104         that condition, rather than `-1' which is slightly misleading.
20105         Change the name of the cache variable to have the gl_ prefix.
20106         Prompted by a patch from Richard Dawe for DJGPP.
20107
20108 2003-05-24  Karl Berry  <karl@gnu.org>
20109
20110         * config/config.guess: update from prep.
20111
20112 2003-05-22  Karl Berry  <karl@gnu.org>
20113
20114         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20115
20116 2003-05-20  Karl Berry  <karl@gnu.org>
20117
20118         * config/config.guess: update from prep.
20119
20120 2003-05-18  Karl Berry  <karl@gnu.org>
20121
20122         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20123         might actually be set by the user.
20124
20125         * config/depcomp, install-sh, mdate-sh: update from automake.
20126
20127 2003-05-17  Bruno Haible  <bruno@clisp.org>
20128
20129         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20130         invalid expansion for AC_EGREP_CPP.
20131         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20132         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20133         Suggested by Akim Demaille <akim@epita.fr> in
20134         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20135
20136 2003-05-12  Jim Meyering  <jim@meyering.net>
20137
20138         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20139         the space-padded-by-default conversion specifiers, %e, %k, %l.
20140
20141 2003-05-12  Bruno Haible  <bruno@clisp.org>
20142
20143         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20144         the string is longer than 4 KB.
20145
20146 2003-05-11  Karl Berry  <karl@gnu.org>
20147
20148         * config/config.{guess,sub}: update from prep.
20149
20150 2003-05-09  Bruno Haible  <bruno@clisp.org>
20151
20152         * modules/error: Add m4/strerror_r.m4 to file list.
20153
20154 2003-05-03  Bruno Haible  <bruno@clisp.org>
20155
20156         Upgrade to Unicode-4.0.
20157         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20158         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20159         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20160         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20161         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20162         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20163         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20164         Change width of U+E0100..U+E01EF from 1 to 0.
20165
20166 2003-04-25  Jim Meyering  <jim@meyering.net>
20167
20168         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20169         of type size_t, not int.
20170
20171 2003-04-25  Bruno Haible  <bruno@clisp.org>
20172
20173         * lib/copy-file.c: Include <stddef.h>, for size_t.
20174
20175 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20176
20177         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20178         code which expansion is under static control.  Patch imported from
20179         Akim Demaille's patch to Bison; see
20180         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20181
20182 2003-04-14  Bruno Haible  <bruno@clisp.org>
20183
20184         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20185
20186 2003-04-11  Jim Meyering  <jim@meyering.net>
20187
20188         Merge changes from Coreutils.
20189
20190         2003-03-22  Jim Meyering  <jim@meyering.net>
20191
20192         * lib/strftime.c (widen): Cast alloca return value to proper type.
20193
20194         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20195
20196         From GNU libc.
20197         * lib/strftime.c (my_strftime): Handle very large width
20198         specifications for numeric values correctly.  Improve checks for
20199         overflow.
20200
20201         2003-01-19  Jim Meyering  <jim@meyering.net>
20202
20203         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20204         definitions.
20205         (nl_get_alt_digit) [! defined my_strftime]: Define.
20206         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20207         _nl_get_alt_digit and _nl_get_walt_digit.
20208
20209         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20210         libc. These changes have no effect outside of _LIBC.
20211
20212 2003-04-10  Bruno Haible  <bruno@clisp.org>
20213
20214         * modules/findprog: New file.
20215         * MODULES.html.sh (func_all_modules): Add it.
20216
20217 2003-04-10  Bruno Haible  <bruno@clisp.org>
20218
20219         * m4/findprog.m4: New file.
20220         * m4/eaccess.m4: New file.
20221
20222 2003-04-10  Bruno Haible  <bruno@clisp.org>
20223
20224         * lib/findprog.h: New file, from GNU gettext.
20225         * lib/findprog.c: New file, from GNU gettext.
20226
20227 2003-04-05  Jim Meyering  <jim@meyering.net>
20228
20229         Merge changes from Coreutils.
20230
20231         * lib/exclude.h (PARAMS): Remove definition and uses.
20232         * lib/exclude.c: Remove uses of `PARAMS'.
20233
20234         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20235         Add test-cases for DOS filenames. Declare program_name.
20236         (main): Set up program_name.  Patch by Rich Dawe.
20237
20238         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20239         error from mntctl.
20240         Use mntctl's return value to drive the entry-processing loop, since
20241         we can't rely on the value of the vmt_length member in the last
20242         entry.  On some systems doing so could result in exhausting
20243         virtual memory.  Based in part on a patch from Mike Jetzer.
20244
20245 2003-04-04  Bruno Haible  <bruno@clisp.org>
20246
20247         * modules/linebreak: New file.
20248         * MODULES.html.sh (func_all_modules): Add it.
20249
20250 2003-04-04  Bruno Haible  <bruno@clisp.org>
20251
20252         * m4/linebreak.m4: New file.
20253
20254 2003-04-04  Bruno Haible  <bruno@clisp.org>
20255
20256         * lib/linebreak.h: New file, from GNU gettext.
20257         * lib/linebreak.c: New file, from GNU gettext with slight
20258         modifications.
20259         * lib/lbrkprop.h: New file, from GNU gettext.
20260
20261 2003-04-03  Bruno Haible  <bruno@clisp.org>
20262
20263         * modules/utf8-ucs4: New file.
20264         * modules/utf16-ucs4: New file.
20265         * modules/ucs4-utf8: New file.
20266         * modules/ucs4-utf16: New file.
20267         * MODULES.html.sh (func_all_modules): Add them.
20268
20269 2003-04-03  Bruno Haible  <bruno@clisp.org>
20270
20271         * m4/utf-ucs4.m4: New file.
20272         * m4/ucs4-utf.m4: New file.
20273
20274 2003-04-03  Bruno Haible  <bruno@clisp.org>
20275
20276         * lib/utf8-ucs4.h: New file, from GNU gettext.
20277         * lib/utf16-ucs4.h: New file, from GNU gettext.
20278         * lib/ucs4-utf8.h: New file, from GNU gettext.
20279         * lib/ucs4-utf16.h: New file, from GNU gettext.
20280
20281 2003-04-02  Bruno Haible  <bruno@clisp.org>
20282
20283         * modules/binary-io: New file.
20284         * MODULES.html.sh (func_all_modules): Add it.
20285
20286 2003-04-02  Bruno Haible  <bruno@clisp.org>
20287
20288         * lib/binary-io.h: New file, from GNU gettext.
20289
20290 2003-04-01  Bruno Haible  <bruno@clisp.org>
20291
20292         * modules/pathname: New file.
20293         * MODULES.html.sh (func_all_modules): Add it.
20294
20295 2003-04-01  Bruno Haible  <bruno@clisp.org>
20296
20297         * lib/pathname.h: New file, from GNU gettext.
20298         * lib/concatpath.c: New file, from GNU gettext.
20299
20300 2003-03-30  Bruno Haible  <bruno@clisp.org>
20301
20302         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20303
20304 2003-03-30  Bruno Haible  <bruno@clisp.org>
20305
20306         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20307         function chown() doesn't exist.
20308
20309 2003-03-28  Bruno Haible  <bruno@clisp.org>
20310
20311         * modules/copy-file: New file.
20312         * MODULES.html.sh (func_all_modules): Add it.
20313
20314 2003-03-28  Bruno Haible  <bruno@clisp.org>
20315
20316         * m4/copy-file.m4: New file.
20317
20318 2003-03-28  Bruno Haible  <bruno@clisp.org>
20319
20320         * lib/copy-file.h: New file, from GNU gettext.
20321         * lib/copy-file.c: New file, from GNU gettext.
20322
20323 2003-03-18  Jim Meyering  <jim@meyering.net>
20324
20325         * lib/quote.c (quote_n): Fix typo in comment.
20326
20327 2003-03-18  Bruno Haible  <bruno@clisp.org>
20328
20329         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20330         checking.
20331         * m4/onceonly_2_57.m4: Likewise.
20332
20333 2003-03-17  Bruno Haible  <bruno@clisp.org>
20334
20335         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20336         (m4_quote): Remove macro.
20337         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20338
20339 2003-03-14  Jim Meyering  <jim@meyering.net>
20340
20341         Merge changes from Coreutils.
20342         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20343         to be const, in order to avoid warnings.
20344         (obstack_room): Likewise.
20345         (obstack_empty_p): Likewise.
20346
20347 2003-03-14  Bruno Haible  <bruno@clisp.org>
20348
20349         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20350         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20351
20352 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20353
20354         Merge changes from Bison.
20355         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20356         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20357         when compiling Bison 1.875's `bitset bset = obstack_alloc
20358         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20359         * lib/hash.c: Include <stdbool.h> unconditionally.
20360
20361 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20362
20363         * m4/onceonly.m4 (m4_quote): New macro.
20364         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20365         Quote AC_FOREACH variable-expansions properly.
20366
20367 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20368
20369         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20370
20371 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20372
20373         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20374         Reported by Bruce Becker; see:
20375         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20376
20377 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20378             Bruno Haible  <bruno@clisp.org>
20379
20380         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20381         Reported by John Hughes, see
20382         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20383
20384 2003-02-20  Bruno Haible  <bruno@clisp.org>
20385
20386         * MODULES.html.sh (func_all_modules): Add poll.
20387
20388 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20389
20390         * modules/poll: New file.
20391
20392 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20393
20394         * lib/poll_.h: New file.
20395         * lib/poll.c: New file.
20396
20397 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20398
20399         * m4/poll.m4: New file.
20400
20401 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20402
20403         * modules/mathl: New file.
20404
20405 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20406
20407         * lib/mathl.h: New file.
20408         * lib/acosl.c: New file.
20409         * lib/asinl.c: New file.
20410         * lib/atanl.c: New file.
20411         * lib/ceill.c: New file.
20412         * lib/cosl.c: New file.
20413         * lib/expl.c: New file.
20414         * lib/floorl.c: New file.
20415         * lib/frexpl.c: New file.
20416         * lib/ldexpl.c: New file.
20417         * lib/logl.c: New file.
20418         * lib/sincosl.c: New file.
20419         * lib/sinl.c: New file.
20420         * lib/sqrtl.c: New file.
20421         * lib/tanl.c: New file.
20422         * lib/trigl.c: New file.
20423         * lib/trigl.h: New file.
20424
20425 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20426
20427         * m4/mathl.m4: New file.
20428
20429 2003-02-18  Bruno Haible  <bruno@clisp.org>
20430
20431         * MODULES.html.sh (func_all_modules): Add mathl.
20432
20433 2003-02-17  Bruno Haible  <bruno@clisp.org>
20434
20435         * modules/mkdtemp: New module.
20436         * MODULES.html.sh (func_all_modules): Add it.
20437
20438 2003-02-17  Bruno Haible  <bruno@clisp.org>
20439
20440         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20441
20442 2003-02-17  Bruno Haible  <bruno@clisp.org>
20443
20444         * lib/mkdtemp.h: New file, from GNU gettext.
20445         * lib/mkdtemp.c: New file, from GNU gettext.
20446
20447 2003-02-02  Jim Meyering  <jim@meyering.net>
20448
20449         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20450         e.g. glibc-2.2.93.
20451
20452 2003-01-31  Bruno Haible  <bruno@clisp.org>
20453
20454         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20455         'rpl_rename'.
20456         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20457         'rpl_strnlen'.
20458         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20459         'rpl_strtod'.
20460         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20461         'rpl_utime'.
20462
20463 2003-01-31  Bruno Haible  <bruno@clisp.org>
20464
20465         * lib/rename.c: #undef rename before defining rpl_rename.
20466         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20467
20468 2003-01-30  Bruno Haible  <bruno@clisp.org>
20469
20470         * modules/vasnprintf, modules/vasprintf: New modules.
20471         * MODULES.html.sh (func_all_modules): Add them.
20472
20473 2003-01-30  Bruno Haible  <bruno@clisp.org>
20474
20475         * m4/signed.m4: New file, from GNU gettext.
20476         * m4/longdouble.m4: New file, from GNU gettext.
20477         * m4/wchar_t.m4: New file, from GNU gettext.
20478         * m4/wint_t.m4: New file, from GNU gettext.
20479         * m4/vasnprintf.m4: New file.
20480         * m4/vasprintf.m4: New file.
20481
20482 2003-01-30  Bruno Haible  <bruno@clisp.org>
20483
20484         * lib/printf-args.h: New file, from GNU gettext.
20485         * lib/printf-args.c: New file, from GNU gettext.
20486         * lib/printf-parse.h: New file, from GNU gettext.
20487         * lib/printf-parse.c: New file, from GNU gettext.
20488         * lib/vasnprintf.h: New file, from GNU gettext.
20489         * lib/vasnprintf.c: New file, from GNU gettext.
20490         * lib/asnprintf.c: New file, from GNU gettext.
20491         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20492         * lib/vasprintf.c: New file, from GNU gettext.
20493         * lib/asprintf.c: New file, from GNU gettext.
20494
20495 2003-01-29  Bruno Haible  <bruno@clisp.org>
20496
20497         * modules/stpncpy: New module.
20498         * MODULES.html.sh (func_all_modules): Add it.
20499
20500 2003-01-29  Bruno Haible  <bruno@clisp.org>
20501
20502         * m4/stpncpy.m4: New file.
20503
20504 2003-01-29  Bruno Haible  <bruno@clisp.org>
20505
20506         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20507         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20508
20509 2003-01-28  Bruno Haible  <bruno@clisp.org>
20510
20511         * modules/c-ctype: New module.
20512         * MODULES.html.sh (func_all_modules): Add it.
20513
20514 2003-01-28  Bruno Haible  <bruno@clisp.org>
20515
20516         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20517         Paul Eggert.
20518         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20519         Paul Eggert.
20520
20521 2003-01-27  Bruno Haible  <bruno@clisp.org>
20522
20523         * modules/xsetenv: New module.
20524         * MODULES.html.sh (func_all_modules): Add it.
20525
20526 2003-01-27  Bruno Haible  <bruno@clisp.org>
20527
20528         * lib/xsetenv.h: New file, from GNU gettext.
20529         * lib/xsetenv.c: New file, from GNU gettext.
20530
20531 2003-01-23  Jim Meyering  <jim@meyering.net>
20532
20533         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20534         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20535
20536 2003-01-23  Bruno Haible  <bruno@clisp.org>
20537
20538         * modules/minmax: New module.
20539         * MODULES.html.sh (func_all_modules): Add it.
20540
20541 2003-01-23  Bruno Haible  <bruno@clisp.org>
20542
20543         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20544         Eggert.
20545
20546 2003-01-22  Bruno Haible  <bruno@clisp.org>
20547
20548         * modules/exit: New module.
20549         * MODULES.html.sh (func_all_modules): Add it.
20550
20551 2003-01-22  Bruno Haible  <bruno@clisp.org>
20552
20553         * lib/exit.h: New file, from GNU gettext.
20554
20555 2003-01-19  Bruno Haible  <bruno@clisp.org>
20556
20557         * gnulib-tool: Recognize option --extract-maintainer.
20558         (func_get_maintainer): New function.
20559         * modules/*: Add Maintainer entry.
20560
20561 2003-01-16  Jim Meyering  <jim@meyering.net>
20562
20563         * m4/regex.m4: The `regex' struct is both input and output.
20564         Initialize it before each use.  Patch by Tim Waugh.
20565
20566 2003-01-16  Bruno Haible  <bruno@clisp.org>
20567
20568         * MODULES.html.sh: Add a table of contents. Add the module name as
20569         leftmost column. Add hyperlinks.
20570
20571 2003-01-15  Bruno Haible  <bruno@clisp.org>
20572
20573         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20574
20575 2003-01-15  Bruno Haible  <bruno@clisp.org>
20576
20577         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20578         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20579         suffix.
20580
20581 2003-01-15  Bruno Haible  <bruno@clisp.org>
20582
20583         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20584
20585 2003-01-15  Bruno Haible  <bruno@clisp.org>
20586
20587         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20588         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20589
20590 2003-01-14  Jim Meyering  <jim@meyering.net>
20591
20592         * lib/same.c (same_name): Tweak a comment.
20593
20594 2003-01-14  Bruno Haible  <bruno@clisp.org>
20595
20596         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20597         when a string comparison is sufficient.
20598
20599 2003-01-14  Bruno Haible  <bruno@clisp.org>
20600
20601         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20602         'unsigned int'.
20603
20604 2003-01-14  Bruno Haible  <bruno@clisp.org>
20605
20606         * lib/hash-pjw.c: Add comment about low quality of this function.
20607
20608 2003-01-13  Bruno Haible  <bruno@clisp.org>
20609
20610         * modules/stpcpy: Distribute lib/stpcpy.h.
20611         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20612
20613 2003-01-13  Bruno Haible  <bruno@clisp.org>
20614
20615         * modules/*: Add a description.
20616         * modules/strpbrk: Fix Makefile.am snippet.
20617         * modules/strtoimax: Fix dependencies.
20618         * modules/strtoumax: Likewise.
20619
20620 2003-01-13  Bruno Haible  <bruno@clisp.org>
20621
20622         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20623         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20624         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20625
20626 2003-01-13  Bruno Haible  <bruno@clisp.org>
20627
20628         * gnulib-tool (func_create_testdir): Store config/* files in the main
20629         directory.
20630         * config.rpath: Move to ...
20631         * config/config.rpath: ... here.
20632         * modules/gettext: Contains config/config.rpath, not config.rpath.
20633         * modules/iconv: Likewise.
20634
20635 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20636
20637         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20638         to avoid collisions with libcurses and libreadline.
20639
20640         * m4/getstr.m4: Remove.
20641         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20642
20643 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20644
20645         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20646         to avoid collisions with libcurses and libreadline.
20647
20648         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20649         * lib/getstr.h, getstr.c: Remove.
20650         * lib/getline.c: Include "getline.h", to check interface.
20651         Move body of old getstr.c here: this defines MIN_CHUNK and
20652         declares getdelim2, which is renamed from getstr.
20653         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20654
20655         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20656         All uses changed.
20657         * lib/linebuffer.h: Likewise.
20658         (readline): Remove backward-compatibility macro.
20659
20660 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20661
20662         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20663         to avoid collisions with libcurses and libreadline.
20664         * getstr: Remove.
20665         * MODULES.html.sh: Remove getstr.
20666         * modules/getline: Depend on unlocked-io, not getstr.
20667
20668 2003-01-12  Jim Meyering  <jim@meyering.net>
20669
20670         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20671
20672 2003-01-10  Bruno Haible  <bruno@clisp.org>
20673
20674         * modules/alloca: Change Makefile.am requirements. Simplify Include
20675         requirements. Add lib/alloca_.h to file list.
20676
20677 2003-01-10  Bruno Haible  <bruno@clisp.org>
20678
20679         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20680
20681 2003-01-10  Bruno Haible  <bruno@clisp.org>
20682
20683         * lib/alloca_.h: New file.
20684         * lib/getdate.y: Unconditionally include alloca.h.
20685         * lib/makepath.c: Likewise.
20686         * lib/setenv.c: Likewise.
20687         * lib/userspec.c: Likewise.
20688
20689 2003-01-09  Karl Berry  <karl@gnu.org>
20690
20691         * MODULES.html.sh: include `dirname $0` in PATH, to find
20692         gnulib-tool.
20693
20694 2003-01-09  Bruno Haible  <bruno@clisp.org>
20695
20696         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20697         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20698
20699 2003-01-09  Bruno Haible  <bruno@clisp.org>
20700
20701         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20702
20703 2003-01-09  Bruno Haible  <bruno@clisp.org>
20704
20705         * lib/stdbool.h.in: New file.
20706
20707 2003-01-09  Bruno Haible  <bruno@clisp.org>
20708
20709         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20710         * MODULES.html.sh: Likewise.
20711
20712 2003-01-08  Jim Meyering  <jim@meyering.net>
20713
20714         * lib/full-write.c: Undefine and define-away `const' after inclusion
20715         of errno.h, not before.  Suggestion from Bruno Haible.
20716
20717 2003-01-08  Bruno Haible  <bruno@clisp.org>
20718
20719         * modules/full-read: Depend on full-write.
20720
20721 2003-01-08  Bruno Haible  <bruno@clisp.org>
20722
20723         * lib/safe-read.c: Include specification header first, to ensure its
20724         selfcontainedness.
20725         * lib/full-write.c: Likewise.
20726
20727 2003-01-07  Jim Meyering  <jim@meyering.net>
20728
20729         * lib/full-write.c: Rework so that it may serve to define full_read,
20730         too.
20731         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20732
20733 2003-01-07  Bruno Haible  <bruno@clisp.org>
20734
20735         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20736         <inttypes.h>.
20737         * lib/xstrtol.h: Likewise.
20738         * lib/xstrtoimax.c: Likewise.
20739         * lib/xstrtoumax.c: Likewise.
20740         * lib/human.h: Likewise.
20741
20742         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20743         on systems that have <inttypes.h> but not <stdint.h>.
20744
20745 2003-01-07  Bruno Haible  <bruno@clisp.org>
20746
20747         * MODULES.html.sh: Add copyright notice.
20748         (missed_files): Omit CVS directory entries.
20749         (func_module): Make it work with sed-3.02.
20750         * MODULES.txt: Remove file.
20751
20752 2003-01-06  Jim Meyering  <jim@meyering.net>
20753
20754         * lib/version-etc.c: Update year in translatable copyright string.
20755
20756 2003-01-03  Karl Berry  <karl@gnu.org>
20757
20758         * config/config.{guess,sub}: update from prep.
20759
20760 2003-01-02  Karl Berry  <karl@gnu.org>
20761
20762         * doc/COPYING.DOC: belatedly updated to 1.2.
20763
20764 2003-01-01  Karl Berry  <karl@gnu.org>
20765
20766         * gnulib-tool (func_verify_module): report module name $module in
20767         error message, not $1.
20768         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20769         be created, only if it doesn't exist.
20770         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20771
20772 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20773
20774         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20775
20776 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20777
20778         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20779         memcmp if strcoll doesn't work.
20780
20781 2002-12-31  Bruno Haible  <bruno@clisp.org>
20782
20783         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20784         nonempty.
20785
20786 2002-12-31  Bruno Haible  <bruno@clisp.org>
20787
20788         * lib/memcoll.c (STRCOLL): New macro.
20789         (memcoll): Use it.
20790
20791 2002-12-31  Bruno Haible  <bruno@clisp.org>
20792
20793         * lib/localcharset.h: New file.
20794         * lib/localcharset.c: Include it.
20795         * lib/unicodeio.c: Likewise.
20796
20797 2002-12-31  Bruno Haible  <bruno@clisp.org>
20798
20799         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20800         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20801
20802 2002-12-31  Bruno Haible  <bruno@clisp.org>
20803
20804         * lib/getline.h: Include <stddef.h>, for size_t.
20805
20806         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20807         * lib/unicodeio.c: Don't include <stddef.h>.
20808
20809 2002-12-31  Bruno Haible  <bruno@clisp.org>
20810
20811         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20812         HAVE_TM_ZONE.
20813
20814 2002-12-24  Karl Berry  <karl@gnu.org>
20815
20816         * config/config.guess: update from prep.
20817
20818 2002-12-24  Bruno Haible  <bruno@clisp.org>
20819
20820         General infrasructure.
20821         * m4/README: Rewritten.
20822         * m4/onceonly.m4: New file.
20823         * m4/onceonly_2_57.m4: New file.
20824
20825         Module atexit.
20826         * m4/atexit.m4: New file.
20827
20828         Module strtod.
20829         * m4/strtod.m4: New file.
20830
20831         Module strtol.
20832         * m4/strtol.m4: New file.
20833
20834         Module strtoul.
20835         * m4/strtoul.m4: New file.
20836
20837         Module memchr.
20838         * m4/memchr.m4: New file.
20839
20840         Module memcmp.
20841         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20842         (jm_FUNC_MEMCMP): Invoke it.
20843
20844         Module memcpy.
20845         * m4/memcpy.m4: New file.
20846
20847         Module memmove.
20848         * m4/memmove.m4: New file.
20849
20850         Module memset.
20851         * m4/memset.m4: New file.
20852
20853         Module strcspn.
20854         * m4/strcspn.m4: New file.
20855
20856         Module strpbrk.
20857         * m4/strpbrk.m4: New file.
20858
20859         Module strstr.
20860         * m4/strstr.m4: New file.
20861
20862         Module strerror.
20863         * m4/strerror.m4: New file.
20864
20865         Module mktime.
20866         * m4/mktime.m4: Renamed from jm-mktime.m4.
20867         (gl_PREREQ_MKTIME): New macro.
20868         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20869
20870         Module malloc.
20871         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20872         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20873         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20874
20875         Module realloc.
20876         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20877         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20878         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20879
20880         Module strftime.
20881         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20882         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20883         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20884         gl_TM_GMTOFF.
20885         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20886
20887         Module xalloc.
20888         * m4/xalloc.m4: New file.
20889
20890         Module alloca.
20891         * m4/alloca.m4: New file.
20892
20893         Module putenv.
20894         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20895         (jm_FUNC_PUTENV): Invoke it.
20896
20897         Module setenv.
20898         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20899         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20900         when invoked twice.
20901         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20902         gt_FUNC_SETENV.
20903
20904         Module memrchr.
20905         * m4/memrchr.m4: New file.
20906
20907         Module stpcpy.
20908         * m4/stpcpy.m4: New file.
20909
20910         Module strcase.
20911         * m4/strcase.m4: New file.
20912
20913         Module strdup.
20914         * m4/strdup.m4: New file.
20915
20916         Module strnlen.
20917         * m4/strnlen.m4: New file.
20918
20919         Module strndup.
20920         * m4/strndup.m4: New file.
20921
20922         Module xstrtod.
20923         * m4/xstrtod.m4: New file.
20924
20925         Module xstrtol.
20926         * m4/xstrtol.m4: New file.
20927
20928         Module getdate.
20929         * m4/getdate.m4: New file.
20930
20931         Module unlocked-io.
20932         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
20933         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
20934         * m4/jm-glibc-io.m4n: Remove file.
20935
20936         Module long-options.
20937         * m4/long-options.m4: New file.
20938
20939         Module md5.
20940         * m4/md5.m4: New file.
20941
20942         Module sha.
20943         * m4/sha.m4: New file.
20944
20945         Module getstr.
20946         * m4/getstr.m4: New file.
20947
20948         Module getline.
20949         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
20950         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
20951         <sys/types.h>, for size_t. Use the function name gnu_getline, not
20952         simply getline. Infoke gl_PREREQ_GETLINE.
20953
20954         Module obstack.
20955         * m4/obstack.m4: New file.
20956
20957         Module hash.
20958         * m4/hash.m4: New file.
20959
20960         Module readtokens.
20961         * m4/readtokens.m4: New file.
20962
20963         Module strverscmp.
20964         * m4/strverscmp.m4: New file.
20965
20966         Module stdbool.
20967         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
20968         OSF/1.
20969
20970         Module strtoll.
20971         * m4/strtoll.m4: New file.
20972
20973         Module strtoull.
20974         * m4/strtoull.m4: New file.
20975
20976         Module strtoimax.
20977         * m4/strtoimax.m4: New file.
20978
20979         Module strtoumax.
20980         * m4/strtoumax.m4: New file.
20981
20982         Module xstrtoimax.
20983         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
20984         jm_AC_PREREQ_XSTRTOIMAX.
20985         Moved the strtol prerequisites to strtol.m4.
20986         Moved the strtoll prerequisites to strtoll.m4.
20987         Moved the strtoimax prerequisites to strtoimax.m4.
20988
20989         Module xstrtoumax.
20990         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
20991         jm_AC_PREREQ_XSTRTOUMAX.
20992         Moved the strtoul prerequisites to strtoul.m4.
20993         Moved the strtoull prerequisites to strtoull.m4.
20994         Moved the strtoumax prerequisites to strtoumax.m4.
20995
20996         Module chown.
20997         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
20998         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
20999
21000         Module dup2.
21001         * m4/dup2.m4: New file.
21002
21003         Module ftruncate.
21004         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21005         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21006
21007         Module getgroups.
21008         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21009         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21010
21011         Module gettimeofday.
21012         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21013         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21014         gl_PREREQ_GETTIMEOFDAY.
21015
21016         Module mkdir.
21017         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21018         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21019
21020         Module mkstemp.
21021         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21022         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21023         jm_AC_TYPE_UINTMAX_T.
21024         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21025
21026         Module stat.
21027         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21028         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21029
21030         Module lstat.
21031         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21032         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21033
21034         Module timespec.
21035         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21036         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21037         * m4/st_mtim.m4: Indentation.
21038
21039         Module nanosleep.
21040         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21041         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21042         gl_PREREQ_NANOSLEEP.
21043
21044         Module regex.
21045         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21046         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21047         (gl_REGEX): New macro.
21048
21049         Module rename.
21050         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21051         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21052
21053         Module rmdir.
21054         * m4/rmdir.m4: New file.
21055
21056         Module utime.
21057         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21058         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21059         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21060
21061         Module dirname.
21062         * m4/dirname.m4: New file.
21063
21064         Module getopt.
21065         * m4/getopt.m4: New file.
21066
21067         Module unistd-safer.
21068         * m4/unistd-safer.m4: New file.
21069
21070         Module fnmatch.
21071         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21072         declaration.
21073         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21074         (gl_FUNC_FNMATCH_POSIX): New macro.
21075         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21076         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21077         simply fnmatch.
21078
21079         Module exclude.
21080         * m4/exclude.m4: New file.
21081
21082         Module human.
21083         * m4/human.m4: New file.
21084
21085         Module acl.
21086         * m4/acl.m4: Nop.
21087
21088         Module backupfile.
21089         * m4/backupfile.m4: New file.
21090         * m4/d-ino.m4: Indentation.
21091
21092         Module fsusage.
21093         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21094         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21095         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21096
21097         Module dirfd.
21098         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21099         requirements.
21100
21101         Module euidaccess.
21102         * m4/euidaccess.m4: New file.
21103
21104         Module file-type.
21105         * m4/file-type.m4: New file.
21106
21107         Module fileblocks.
21108         * m4/fileblocks.m4: New file.
21109
21110         Module filemode.
21111         * m4/filemode.m4: New file.
21112
21113         Module isdir.
21114         * m4/isdir.m4: New file.
21115
21116         Module lchown.
21117         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21118         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21119
21120         Module makepath.
21121         * m4/makepath.m4: New file.
21122
21123         Module modechange.
21124         * m4/modechange.m4: New file.
21125
21126         Module mountlist.
21127         * m4/mountlist.m4: New file.
21128         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21129         Indentation.
21130
21131         Module path-concat.
21132         * m4/path-concat.m4: New file.
21133
21134         Module pathmax.
21135         * m4/pathmax.m4: New file.
21136
21137         Module same.
21138         * m4/same.m4: New file.
21139
21140         Module save-cwd.
21141         * m4/save-cwd.m4: New file.
21142
21143         Module savedir.
21144         * m4/savedir.m4: New file.
21145
21146         Module xgetcwd.
21147         * m4/xgetcwd.m4: New file.
21148         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21149
21150         Module xreadlink.
21151         * m4/xreadlink.m4: New file.
21152
21153         Module safe-read.
21154         * m4/safe-read.m4: New file.
21155
21156         Module safe-write.
21157         * m4/safe-write.m4: New file.
21158
21159         Module closeout.
21160         * m4/closeout.m4: New file.
21161
21162         Module stdio-safer.
21163         * m4/stdio-safer.m4: New file.
21164
21165         Module getpass.
21166         * m4/getpass.m4: New file.
21167
21168         Module getugroups.
21169         * m4/getugroups.m4: New file.
21170
21171         Module group-member.
21172         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21173         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21174
21175         Module idcache.
21176         * m4/idcache.m4: New file.
21177
21178         Module userspec.
21179         * m4/userspec.m4: New file.
21180
21181         Module gettime.
21182         * m4/clock_time.m4: New file.
21183         * m4/gettime.m4: New file.
21184
21185         Module settime.
21186         * m4/settime.m4: New file.
21187
21188         Module posixtm.
21189         * m4/posixtm.m4: New file.
21190
21191         Module gethostname.
21192         * m4/gethostname.m4: New file.
21193
21194         Module canon-host.
21195         * m4/canon-host.m4: New file.
21196
21197         Module gettext.
21198         * m4/codeset.m4: New file, from gettext-0.11.5.
21199         * m4/gettext.m4: New file, from gettext-0.11.5.
21200         * m4/glibc21.m4: New file, from gettext-0.11.5.
21201         * m4/iconv.m4: New file, from gettext-0.11.5.
21202         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21203         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21204         * m4/inttypes.m4: New file, from gettext-0.11.5.
21205         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21206         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21207         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21208         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21209         * m4/lib-link.m4: New file, from gettext-0.11.5.
21210         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21211         * m4/progtest.m4: New file, from gettext-0.11.5.
21212         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21213         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21214         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21215
21216         Module localcharset.
21217         * m4/localcharset.m4: New file.
21218
21219         Module hard-locale.
21220         * m4/hard-locale.m4: New file.
21221
21222         Module mbswidth.
21223         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21224         onceonly macros.
21225         * m4/mbrtowc.m4: Add comment.
21226
21227         Module memcasecmp.
21228         * m4/memcasecmp.m4: New file.
21229
21230         Module memcoll.
21231         * m4/memcoll.m4: New file.
21232
21233         Module unicodeio.
21234         * m4/unicodeio.m4: New file.
21235
21236         Module rpmatch.
21237         * m4/rpmatch.m4: New file.
21238
21239         Module yesno.
21240         * m4/yesno.m4: New file.
21241
21242         Module exitfail.
21243         * m4/exitfail.m4: New file.
21244
21245         Module c-stack.
21246         * m4/c-stack.m4 (gl_C_STACK): New macro.
21247         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21248
21249         Module error.
21250         * m4/error.m4 (gl_ERROR): New macro.
21251         (jm_PREREQ_ERROR): Use onceonly macros.
21252
21253         Module fatal.
21254         * m4/fatal.m4: New file.
21255
21256         Module getloadavg.
21257         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21258         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21259
21260         Module getpagesize.
21261         * m4/getpagesize.m4: New file.
21262
21263         Module getusershell.
21264         * m4/getusershell.m4: New file.
21265
21266         Module physmem.
21267         * m4/physmem.m4: New file.
21268
21269         Module posixver.
21270         * m4/posixver.m4: New file.
21271
21272         Module quotearg.
21273         * m4/quotearg.m4: New file.
21274
21275         Module quote.
21276         * m4/quote.m4: New file.
21277
21278         Module readutmp.
21279         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21280
21281         Module sig2str.
21282         * m4/sig2str.m4: New file.
21283
21284         Other.
21285         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21286         ulonglong.m4.
21287         * m4/intmax_t.m4: New file.
21288         * m4/d-type.m4: Indentation.
21289         * m4/jm-macros.m4: Update.
21290         * m4/prereq.m4 (jm_PREREQ): Update.
21291         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21292         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21293         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21294         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21295         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21296         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21297         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21298         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21299         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21300         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21301         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21302         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21303         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21304         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21305         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21306         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21307         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21308         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21309         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21310
21311 2002-12-24  Bruno Haible  <bruno@clisp.org>
21312
21313         * MODULES.txt: Update according to m4/ changes.
21314
21315         Module gettext.
21316         * config.rpath: New file, from gettext-0.11.5.
21317
21318         * modules/*: New module descriptions.
21319         * gnulib-tool: New file.
21320         * MODULES.html.sh: New file.
21321
21322 2002-12-21  Karl Berry  <karl@gnu.org>
21323
21324         * doc/fdl.texi: update to version 1.2.
21325
21326 2002-12-19  Karl Berry  <karl@gnu.org>
21327
21328         * config/config.guess: update from prep.
21329
21330 2002-12-18  Bruno Haible  <bruno@clisp.org>
21331
21332         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21333         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21334
21335 2002-12-17  Bruno Haible  <bruno@clisp.org>
21336
21337         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21338         stdlib.h, string.h.
21339
21340 2002-12-17  Bruno Haible  <bruno@clisp.org>
21341
21342         * lib/canon-host.c (strdup): Remove unused declaration.
21343
21344         * lib/fsusage.c: Include full_read.h.
21345         (get_fs_usage): Use full_read instead of safe_read.
21346
21347         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21348
21349 2002-12-12  Karl Berry  <karl@gnu.org>
21350
21351         * config/config.guess: update from prep.
21352
21353 2002-12-11  Bruno Haible  <bruno@clisp.org>
21354
21355         * m4/setenv.m4: New file, from gettext-0.11.5.
21356
21357 2002-12-11  Bruno Haible  <bruno@clisp.org>
21358
21359         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21360         not unsetenv().
21361         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21362         modifications:
21363
21364         2002-12-11  Bruno Haible  <bruno@clisp.org>
21365
21366                 * setenv.c (alloca): Fall back to malloc.
21367                 (freea): New macro.
21368                 (setenv): Use freea() to free memory allocated with alloca().
21369
21370         2002-11-13  Bruno Haible  <bruno@clisp.org>
21371
21372                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21373                 function declarations.
21374                 * unsetenv.c (unsetenv): Likewise.
21375
21376         2002-03-04  Bruno Haible  <bruno@clisp.org>
21377
21378                 Portability to AIX 4.3.3.
21379                 * unsetenv.c: New file, extracted from setenv.c.
21380                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21381
21382         2001-12-20  Bruno Haible  <bruno@clisp.org>
21383
21384                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21385                 use malloc instead. For SunOS 4.
21386
21387         2001-12-11  Bruno Haible  <bruno@clisp.org>
21388
21389                 * setenv.c: Declare alloca.
21390                 (compar_fn_t): New typedef.
21391                 (KNOWN_VALUE, STORE_VALUE): Use it.
21392
21393         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21394         setenv.h.
21395
21396 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21397
21398         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21399         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21400         Choose values that are less likely to collide with system fnmatch
21401         options.
21402         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21403         defined (e.g., a pure POSIX system).
21404         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21405         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21406
21407 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21408
21409         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21410         a pain in practice to deal with generated m4 files.  This change
21411         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21412
21413         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21414         and jm-glibc-io.m4, as they are no longer a special case.
21415         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21416         kludge and the auto-generation stuff.  Check only whether the
21417         functions are declared, not whether they exist, since older hosts
21418         that don't declare the functions can't use the optimization anyway.
21419
21420 2002-12-06  Jim Meyering  <jim@meyering.net>
21421
21422         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21423
21424         Merge in changes from libc's misc/error.c, in preparation
21425         for the merge of gnulib's changes back into libc.
21426
21427         * lib/error.c (_): Define only if not already defined.
21428         Move definition to follow all #include directives.
21429         Include unlocked-io.h only if !_LIBC.
21430         [_LIBC]: Include <libio/libioP.h>.
21431         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21432         (fflush): Tweak definition to use INTUSE.
21433         (putc): Define.
21434
21435 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21436
21437         * lib/alloca.c [defined emacs]: Include "lisp.h".
21438         (xalloc_die) [defined emacs]: New macro.
21439         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21440         [! defined emacs]: Include <xalloc.h>.
21441         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21442         (pointer): Typedef to POINTER_TYPE *.
21443         (malloc): Remove decl; we now always use xmalloc.
21444         (alloca): Use old-style definition, since Emacs needs this.
21445         Check for arithmetic overflow when computing combined size.
21446
21447 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21448
21449         Do not generate unlocked-io.h automatically, since it's easier to
21450         maintain it by hand.
21451
21452         * lib/unlocked-io.h: New file, from GNU diffutils,
21453         but with proper copyright notice and attribution.
21454         * lib/gen-uio: Remove.
21455         * lib/Makefile.am: Add copyright notice.
21456         (libfetish_a_SOURCES): Add unlocked-io.h.
21457         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21458         (DISTCLEANFILES, io_functions): Remove macros.
21459         (EXTRA_DIST): Remove gen_uio.
21460         (unlocked-io.h): Remove rule.
21461
21462 2002-12-04  Jim Meyering  <jim@meyering.net>
21463
21464         Reflect the fact that stat.c and lstat.c are no longer generated.
21465         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21466         (DISTCLEANFILES): Likewise.
21467         (EXTRA_DIST): Likewise.
21468         (all_local): Don't depend on stat.c or lstat.c.
21469         (stat.c, lstat.c): Remove rules.
21470         (EXTRA_DIST): Remove xstat.in.
21471
21472         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21473         * lib/stat.c: New file.  Contents mostly from xstat.in.
21474         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21475         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21476
21477         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21478         too.
21479         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21480
21481 2002-12-03  Jim Meyering  <jim@meyering.net>
21482
21483         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21484         but not semantics, to minimize the differences between these two files.
21485         (safe_read): Change comment to mention SAFE_READ_ERROR.
21486
21487         * lib/safe-read.c (IS_EINTR): Define.
21488         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21489
21490 2002-12-02  Jim Meyering  <jim@meyering.net>
21491
21492         * lib/safe-read.c (EINTR): Define.
21493         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21494         (INT_MAX): Provide fallback.
21495         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21496
21497         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21498
21499 2002-12-02  Bruno Haible  <bruno@clisp.org>
21500
21501         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21502         Define, taken from safe-read.c.
21503         (INT_MAX): Provide fallback.
21504         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21505         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21506
21507         * lib/safe-read.c (EINTR): Remove definition.
21508         (safe_read): Don't use EINTR if it is absent.
21509
21510 2002-12-01  Jim Meyering  <jim@meyering.net>
21511
21512         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21513         zero.
21514         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21515
21516 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21517
21518         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21519         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21520         with `if (! (value < limit)) abort ();', for readability.
21521
21522 2002-11-26  Karl Berry  <karl@gnu.org>
21523
21524         * lib/strdup.c: copy from libc again, with jim's ok.
21525         * lib/.cppi-disable: re-add strdup.c
21526
21527 2002-11-25  Karl Berry  <karl@gnu.org>
21528
21529         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21530         instead of "strtol.c".
21531
21532 2002-11-25  Karl Berry  <karl@gnu.org>
21533
21534         * config/install-sh: update from automake for variable quoting, $0 in
21535         error msgs, etc.
21536
21537         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21538         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21539         entry.
21540
21541 2002-11-25  Jim Meyering  <jim@meyering.net>
21542
21543         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21544
21545 2002-11-24  Karl Berry  <karl@gnu.org>
21546
21547         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21548         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21549
21550 2002-11-24  Jim Meyering  <jim@meyering.net>
21551
21552         Update from coreutils:
21553
21554         * lib/mktime.c: Merge in changes from libc.
21555
21556         Avoid a link-time failure on some Linux systems.
21557         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21558         (otherwise).
21559         (__mon_yday): Declare with the STATIC attribute.
21560         (__mktime_internal): Likewise.
21561         Based on a report from Greg Schafer.
21562
21563 2002-11-23  Jim Meyering  <jim@meyering.net>
21564
21565         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21566         Use `unsigned', not `int', as type of index.
21567
21568         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21569
21570         * lib/fsusage.c: Remove unneeded parentheses around operands of
21571         `defined'.
21572
21573 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21574
21575         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21576         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21577         so that we can be included first.
21578         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21579         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21580         No need to include stddef.h or sys/types.h any more.
21581         Surround local include files with "", not "<>".
21582         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21583         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21584         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21585         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21586         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21587         (ISPRINT): Remove; no longer needed now that we assume C89.
21588
21589         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21590         Preserve errno.
21591
21592         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21593         quotearg_char): Use SIZE_MAX rather than
21594         (size_t) -1 when we are talking about "infinity".
21595
21596         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21597
21598 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21599
21600         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21601         hint that one should use `if (! x) abort ();' rather than `assert
21602         (x);', and anyway it's one less thing to worry about configuring.
21603         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21604         hash_rehash, hash_insert): Use abort rather than assert.
21605
21606 2002-11-22  Bruno Haible  <bruno@clisp.org>
21607
21608         * lib/safe-read.h: Assume C89. Add comments.
21609         (safe_read): Change return type to size_t.
21610         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21611         byte counts > SSIZE_MAX correctly.
21612         * lib/safe-write.h: New file.
21613         * lib/safe-write.c: New file.
21614         * lib/full-read.h: New file.
21615         * lib/full-read.c: New file.
21616         * lib/full-write.h: Assume C89. Add comments.
21617         * lib/full-write.c: Include safe-write.h.
21618         (full_write): Rewritten to use safe_write.
21619         Suggested by Jim Meyering and Paul Eggert.
21620
21621 2002-11-21  Jim Meyering  <jim@meyering.net>
21622
21623         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21624
21625         Merge in changes from the coreutils.
21626
21627         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21628         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21629         <stdint.h>.
21630         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21631         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21632         int.  Work more efficiently if X is the same width as uintmax_t.
21633         Do not compare X to -1, to avoid bogus compiler warning.
21634         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21635         Don't assume that f_frsize and f_bsize are the same type.
21636
21637         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21638         warning on FreeBSD.
21639
21640         * lib/makepath.c (make_path): Restore umask *before* creating the final
21641         component.
21642         (make_path): Minor reformatting.
21643
21644         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21645         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21646         HAVE_MALLOC/HAVE_REALLOC.
21647
21648         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21649         dummy ones.  At least on GNU/Linux systems, `auto' means something
21650         else.
21651         From Michael Stone.
21652
21653 2002-11-21  Bruno Haible  <bruno@clisp.org>
21654
21655         Remove case insensitive option matching.
21656         * lib/argmatch.h (argcasematch): Remove declaration.
21657         (ARGCASEMATCH): Remove macro.
21658         (__xargmatch_internal): Remove case_sensitive argument.
21659         (XARGMATCH): Update.
21660         (XARGCASEMATCH): Remove macro.
21661         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21662         case_sensitive argument.
21663         (argcasematch): Remove function.
21664         (__xargmatch_internal): Remove case_sensitive argument.
21665         (main): Use XARGMATCH instead of XARGCASEMATCH.
21666
21667         * lib/xmalloc.c: Change compile-time error message. Add comment about
21668         required autoconf version.
21669
21670 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21671
21672         Merge argmatch cleanups from Bison.  Assume C89.
21673
21674         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21675         Include stdlib.h, for EXIT_FAILURE.
21676         Always include <string.h>, since we assume C89.
21677         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21678         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21679         Include <stddef.h> instead, since it's all we need for size_t.
21680         (PARAMS): Remove.  All uses removed.
21681         (ARRAY_CARDINALITY): Do not bother to #undef.
21682         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21683         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21684         Remove unnecessary parentheses.
21685         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21686         Insert necessary parentheses.
21687         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21688         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21689
21690 2002-11-19  Bruno Haible  <bruno@clisp.org>
21691
21692         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21693         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21694
21695         * lib/mbswidth.h (PARAMS): Remove macro.
21696         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21697         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21698
21699         * lib/gcd.h (PARAMS): Remove macro.
21700         (gcd): Use ANSI C function declarations.
21701         * lib/gcd.c (gcd): Likewise.
21702
21703 2002-11-15  Bruno Haible  <bruno@clisp.org>
21704
21705         * lib/strcspn.c: Include <stddef.h>.
21706         (strcspn): Use ANSI C function declaration. Change return type to
21707         size_t. Use NULL.
21708         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21709         (strpbrk): Use NULL.
21710         * lib/strpbrk.h (PARAMS): Remove macro.
21711         (strpbrk): Use ANSI C function declaration.
21712         * lib/strstr.c: Don't include <sys/types.h>.
21713         * lib/strstr.h (PARAMS): Remove macro.
21714         (strstr): Use ANSI C function declarations.
21715
21716 2002-11-14  Karl Berry  <karl@gnu.org>
21717
21718         * config/mkinstalldirs: `do' on separate line, instead of
21719         `for var; do'.
21720
21721 2002-11-06  Bruno Haible  <bruno@clisp.org>
21722
21723         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21724         * lib/gcd.c (gcd): Likewise.
21725
21726 2002-11-05  Bruno Haible  <bruno@clisp.org>
21727
21728         * lib/gcd.h: New file, from gettext-0.11.5.
21729         * lib/gcd.c: New file, from gettext-0.11.5.
21730
21731 2002-11-05  Bruno Haible  <bruno@clisp.org>
21732
21733         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21734         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21735         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21736         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21737
21738         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21739         <libintl.h>.
21740         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21741         <libintl.h>.
21742
21743         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21744         * lib/human.c: Include gettext.h instead of <libintl.h>.
21745         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21746         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21747         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21748         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21749         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21750         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21751         (textdomain): Remove definition.
21752         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21753
21754         * lib/long-options.c: Remove include of <libintl.h> and definition of
21755         _.
21756         * lib/same.c: Remove include of <libintl.h> and definition of _.
21757
21758 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21759
21760         * lib/config.charset: A few additions for Solaris.
21761
21762 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21763
21764         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21765         * lib/localcharset.c (locale_charset): Declare as extern "C".
21766
21767 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21768
21769         * lib/config.charset: msdos in uk_UA uses CP1125.
21770
21771 2002-11-04  Bruno Haible  <bruno@clisp.org>
21772
21773         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21774         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21775         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21776         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21777         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21778
21779 2002-11-04  Bruno Haible  <bruno@clisp.org>
21780
21781         * lib/localcharset.c (locale_charset): Don't return an empty string.
21782
21783 2002-11-04  Bruno Haible  <bruno@clisp.org>
21784
21785         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21786         aliases.
21787
21788 2002-11-04  Bruno Haible  <bruno@clisp.org>
21789
21790         * lib/config.charset: Update for newest glibc. Add canonical names
21791         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21792
21793 2002-11-04  Bruno Haible  <bruno@clisp.org>
21794
21795         * lib/config.charset: Add support for NetBSD.
21796
21797 2002-11-04  Bruno Haible  <bruno@clisp.org>
21798
21799         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21800
21801 2002-11-01  Bruno Haible  <bruno@clisp.org>
21802
21803         * configure.in: Add AC_CONFIG_AUX_DIR call.
21804         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21805         test/Makefile.
21806         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21807
21808 2002-09-28  Karl Berry  <karl@gnu.org>
21809
21810         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21811         installed automake until the next release, since changes have been
21812         made.
21813
21814 2002-09-25  Karl Berry  <karl@gnu.org>
21815
21816         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21817         * lib/getopt*: copy from libc/posix.
21818         * lib/gettext.h: copy from gettext.
21819         * lib/.cppi-disable: add strdup.c, gettext.h.
21820
21821 2002-09-25  Karl Berry  <karl@gnu.org>
21822
21823         * config/srclist.txt: enable gettext.h check.
21824         * config/config.{guess,sub}: update from prep.
21825         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21826                 from automake 1.6.3.
21827         See srclist*.
21828
21829 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21830
21831         * regex.c (PATFETCH): Remove the translating fetch.
21832         (PATFETCH_RAW): Rename to PATFETCH.
21833         (set_image_of_range): New fun.
21834         (SET_RANGE_TABLE_WORK_AREA): Use it.
21835         (regex_compile): Don't translate the pattern chars so eagerly.
21836         Only do it when inserting an `exactn' bytecode or when handling
21837         a char-range.
21838         (mutually_exclusive_p): Avoid empty statement.
21839
21840 2002-07-06  Jim Meyering  <meyering@lucent.com>
21841
21842         * m4/README: Don't mention Makefile.am.in.
21843         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21844
21845 2002-07-01  Jim Meyering  <meyering@lucent.com>
21846
21847         * lib/c-stack.c: Include sys/time.h.
21848         From Volker Borchert.
21849
21850 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21851
21852         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21853
21854 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21855
21856         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21857         New macro.  Use it uniformly instead of
21858         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21859         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21860         reported by Vin Shelton.
21861
21862 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21863
21864         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21865         Do not assume SA_SIGINFO behavior.
21866         Bug reported by Jim Meyering on NetBSD 1.5.2.
21867
21868 2002-06-22  Jim Meyering  <meyering@lucent.com>
21869
21870         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21871         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21872
21873         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21874         now that configure.ac uses AC_GNU_SOURCE.
21875         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21876         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21877
21878         Update to latest tools.  Suggestions from Paul Eggert.
21879         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21880         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21881         * m4/fnmatch.m4: Likewise.
21882         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21883         to AC_HEADER_STDBOOL
21884
21885 2002-06-22  Jim Meyering  <meyering@lucent.com>
21886
21887         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21888         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21889
21890 2002-06-22  Jim Meyering  <meyering@lucent.com>
21891
21892         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21893
21894         * lib/exitfail.c, exitfail.h: Likewise.
21895         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21896
21897         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21898         of fnmatch.h.
21899         (EXTRA_DIST): Add fnmatch_loop.c.
21900         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21901
21902         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21903         * lib/fnmatch.c: Update from diffutils-2.8.2.
21904         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21905         * lib/fnmatch.h: Remove file.
21906
21907 2002-06-21  Jim Meyering  <meyering@lucent.com>
21908
21909         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
21910         * m4/mbrtowc.m4: Likewise.
21911
21912         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
21913         * m4/mbswidth.m4: Reflect name change:
21914         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
21915         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21916
21917         * m4/lib-link.m4: Update from gettext-0.11.2.
21918         * m4/gettext.m4: Likewise.
21919
21920         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
21921         From Alfred M. Szmidt.
21922
21923 2002-06-18  Paul Eggert  <eggert@twinsun.com>
21924
21925         * lib/file-type.h: Report an error if neither S_ISREG nor
21926         S_IFREG is defined, instead of using a test specific to glibc
21927         2.2.  This should be safe, since POSIX requires S_ISREG and
21928         Unix Version 7 had S_IFREG.  We don't need to check for
21929         <sys/types.h> since we don't use any symbols that it defines.
21930
21931 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
21932
21933         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
21934         $@-t, so that each temporary file name is unique and valid in the first
21935         8 characters, for operation under DOS.
21936
21937 2002-06-15  Paul Eggert  <eggert@twinsun.com>
21938
21939         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
21940
21941 2002-06-15  Jim Meyering  <meyering@lucent.com>
21942
21943         Work even with DJGPP 2.03, which lacks support for symlinks.
21944         From Richard Dawe.
21945         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
21946         is defined.
21947         * lib/lchown.c (S_ISLNK): Likewise.
21948
21949 2002-06-15  Jim Meyering  <meyering@lucent.com>
21950
21951         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
21952         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
21953         have been included before this file.
21954
21955 2002-06-14  Jim Meyering  <meyering@lucent.com>
21956
21957         * lib/file-type.h: Use the version from diffutils-2.8.2.
21958         * lib/file-type.c: Likewise.
21959
21960 2002-06-07  Jim Meyering  <meyering@lucent.com>
21961
21962         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
21963         They're needed at least for NetBSD 1.5.2.
21964         ($statxfs_includes): Include those same headers.
21965         ($statxfs_includes): Include sys/vfs.h if available.
21966         ($statxfs_includes): Likewise for sys/statvfs.h.
21967         Check for the following members in both structs statfs and statvfs:
21968         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
21969
21970 2002-06-01  Jim Meyering  <meyering@lucent.com>
21971
21972         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
21973         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
21974
21975 2002-05-28  Jim Meyering  <meyering@lucent.com>
21976
21977         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
21978         Reported by Volker Borchert.
21979
21980 2002-05-27  Jim Meyering  <meyering@lucent.com>
21981
21982         Fix a problem seen only on nonconforming systems whereby ls.c's
21983         use of localtime, and then of gettimeofday would cause trouble:
21984         the localtime call used to initialize rpl_gettimeofday's save
21985         mechanism would clobber ls's current local time information so
21986         that in any long listing the first file would always be listed
21987         with date 1970-01-01.  Analysis by Volker Borchert.
21988
21989         * lib/gettimeofday.c (localtime): Undefine.
21990         (rpl_localtime): New function.
21991
21992 2002-05-27  Jim Meyering  <meyering@lucent.com>
21993
21994         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
21995         localtime.
21996
21997         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
21998         use the replacement function; it wouldn't resolve at link time.
21999         Reported by Volker Borchert.
22000
22001 2002-05-22  Jim Meyering  <meyering@lucent.com>
22002
22003         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22004         file-type.h.
22005         * lib/file-type.h: New file.
22006         * lib/file-type.c (file_type): New file/function.  Extracted from
22007         diffutils.
22008
22009 2002-04-30  Jim Meyering  <meyering@lucent.com>
22010
22011         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22012
22013 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22014
22015         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22016
22017 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22018
22019         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22020         Do not check for alloca.h (no longer used) or stdbool.h (was never
22021         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22022
22023 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22024
22025         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22026
22027 2002-04-29  Jim Meyering  <meyering@lucent.com>
22028
22029         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22030         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22031         Use AC_FUNC_STRNLEN here instead.
22032
22033         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22034         With autoconf-2.53a, it's part of AC_PROG_CC.
22035
22036 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22037
22038         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22039         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22040
22041 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22042
22043         * lib/sig2str.h, lib/sig2str.c: New files.
22044         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22045
22046 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22047
22048         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22049         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22050         of 127, since 64 is the largest conceivable number for ancient
22051         nonstandard hosts.
22052         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22053
22054 2002-04-28  Jim Meyering  <meyering@lucent.com>
22055
22056         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22057
22058 2002-04-24  Jim Meyering  <meyering@lucent.com>
22059
22060         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22061         (jm_PREREQ): Use it.
22062
22063         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22064         mach/mach.h fcntl.h.
22065         Check for this function: setlocale.
22066
22067 2002-04-24  Jim Meyering  <meyering@lucent.com>
22068
22069         * lib/gettext.h: New file, from Gettext.
22070         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22071         (libfetish_a_SOURCES): Add gettext.h.
22072
22073 2002-04-16  Jim Meyering  <meyering@lucent.com>
22074
22075         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22076         ut_pid, ut_id, ut_exit.
22077
22078 2002-04-16  Jim Meyering  <meyering@lucent.com>
22079
22080         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22081         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22082         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22083
22084 2002-04-12  Jim Meyering  <meyering@lucent.com>
22085
22086         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22087         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22088         existence of the getmntinfo function.  Needed for Darwin 5.3.
22089
22090         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22091         This is necessary at least on Darwin 5.3.
22092
22093         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22094         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22095         strnlen.o in the library, and that makes some versions of ranlib
22096         object.
22097
22098 2002-04-12  Jim Meyering  <meyering@lucent.com>
22099
22100         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22101
22102 2002-04-09  Jim Meyering  <meyering@lucent.com>
22103
22104         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22105         to be more precise.  Rather than saying we're checking whether the
22106         function `works', say what we're testing.
22107         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22108         Reported by Bruno Haible.
22109
22110 2002-03-10  Jim Meyering  <meyering@lucent.com>
22111
22112         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22113         Suggestion from Santiago Vila.
22114
22115 2002-03-08  Jim Meyering  <meyering@lucent.com>
22116
22117         * lib/rename.c: Mention that this wrapper is needed also on
22118         mips-dec-ultrix4.4 systems.
22119
22120 2002-03-02  Jim Meyering  <meyering@lucent.com>
22121
22122         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22123         not HAVE_CLOCK_SETTIME.
22124
22125 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22126
22127         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22128         Check for clock_settime.
22129
22130 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22131
22132         * lib/nanosleep.h: Rename to....
22133         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22134
22135         * lib/gettime.c: New file.
22136         * lib/settime.c: New file.
22137         * lib/stime.c: Remove.
22138
22139         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22140         timespec.h.  Remove nanosleep.h.
22141
22142 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22143
22144         * m4/acl.m4: New file.
22145         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22146         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22147
22148 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22149
22150         * lib/acl.c, lib/acl.h: New files.
22151         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22152
22153 2002-02-24  Jim Meyering  <meyering@lucent.com>
22154
22155         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22156         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22157         cause trouble.  Reported by Nelson Beebe.
22158
22159 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22160
22161         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22162         compilers that don't know that xalloc_die never returns.
22163
22164 2002-02-20  Jim Meyering  <meyering@lucent.com>
22165
22166         * lib/getdate.c: Regenerate using bison-1.33.
22167
22168 2002-02-17  Jim Meyering  <meyering@lucent.com>
22169
22170         * config/config.guess (main): Don't use `head -1'; it's no longer
22171         portable. Use `sed 1q' instead.
22172
22173 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22174
22175         * m4/codeset.m4: Upgrade to gettext-0.11.
22176         * m4/gettext.m4: Upgrade to gettext-0.11.
22177         * m4/glibc21.m4: Upgrade to gettext-0.11.
22178         * m4/iconv.m4: Upgrade to gettext-0.11.
22179         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22180         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22181         * m4/lib-ld.m4: New file, from gettext-0.11.
22182         * m4/lib-link.m4: New file, from gettext-0.11.
22183         * m4/lib-prefix.m4: New file, from gettext-0.11.
22184         * m4/progtest.m4: Upgrade to gettext-0.11.
22185
22186 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22187
22188         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22189         (jm_PREREQ): Use it.
22190
22191 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22192
22193         * lib/posixver.c, lib/posixver.h: New files.
22194         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22195
22196 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22197             Bruno Haible  <bruno@clisp.org>
22198
22199         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22200         (fwrite_success_callback): New declaration.
22201         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22202         print_unicode_char. Call failure callback instead of error.
22203         (fwrite_success_callback): New function.
22204         (exit_failure_callback): New function.
22205         (fallback_failure_callback): New function.
22206         (print_unicode_char): Call unicode_to_mb.
22207
22208 2002-01-26  Jim Meyering  <meyering@lucent.com>
22209
22210         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22211         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22212
22213 2002-01-26  Jim Meyering  <meyering@lucent.com>
22214
22215         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22216
22217 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22218
22219         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22220
22221 2002-01-22  Jim Meyering  <meyering@lucent.com>
22222
22223         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22224         Otherwise, some versions of automake would omit the rule that makes
22225         Makefile from Makefile.in.
22226
22227 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22228
22229         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22230         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22231         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22232         (memcoll): Set errno to zero if there is no error.
22233
22234         * lib/quotearg.c (quotearg_buffer_restyled):
22235         Fix bug with quoting buffers containing NUL when backslashing escapes.
22236         This bug was exposed by the other changes in this patch.
22237         (quotearg_n_options): New arg ARGSIZE.
22238         All callers changed.
22239         (quoting_options_from_style): New function.
22240         (quotearg_n_style): Use it.
22241         (quotearg_n_style_mem): New function.
22242
22243         * lib/quotearg.h (quotearg_n_style_mem): New function.
22244
22245 2002-01-19  Jim Meyering  <meyering@lucent.com>
22246
22247         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22248         Remove useless quotes: DF_PROG="df".
22249         * m4/strnlen.m4: New file.
22250
22251 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22252
22253         * lib/backupfile.c (ISDIGIT): Comment fix.
22254         * lib/getdate.y (ISDIGIT): Likewise.
22255         * lib/posixtm.c (ISDIGIT, year): Likewise.
22256         * lib/strverscmp.c (ISDIGIT): Likewise.
22257         * lib/userspec.c (ISDIGIT): Likewise.
22258
22259 2002-01-16  Jim Meyering  <meyering@lucent.com>
22260
22261         * lib/getdate.y: Add three semicolons, each just before a closing
22262         brace. Bison (as of version 1.31) no longer papers over that mistake.
22263
22264 2002-01-05  Jim Meyering  <meyering@lucent.com>
22265
22266         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22267
22268 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22269
22270         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22271         not silently exit merely because the output buffer happens to
22272         have nothing pending.
22273
22274 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22275
22276         See the big note in ../ChangeLog.
22277         * lib/human.c (suffixes): Prefer K to k for 1024.
22278         (generate_suffix_backwards): New function.
22279         (human_readable_inexact): Use it.
22280         * lib/xstrtol.c (__xstrtol): If there is no number but there
22281         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22282         Accept 'K' as well as 'k'.
22283
22284 2001-12-15  Jim Meyering  <meyering@lucent.com>
22285
22286         * lib/regex.h (__restrict_arr): Update from libc.
22287
22288         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22289         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22290         (STREQ): Define.
22291
22292 2001-12-14  Jim Meyering  <meyering@lucent.com>
22293
22294         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22295         Suggestion from Bruno Haible.
22296
22297 2001-12-10  Jim Meyering  <meyering@lucent.com>
22298
22299         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22300         xrealloc, Instead, include "xalloc.h".
22301         (initbuffer): Don't cast xmalloc return value to char*.
22302         (readline): Reword comment.
22303         Don't cast xrealloc return value to char*
22304         Return NULL, not 0.
22305
22306 2001-12-09  Jim Meyering  <meyering@lucent.com>
22307
22308         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22309         about `signed and unsigned type in conditional expression'.
22310         * lib/posixtm.c (posix_time_parse): Likewise.
22311
22312         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22313
22314         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22315         to avoid a pedantic warning.
22316
22317         * lib/getstr.c: Don't include assert.h.
22318         (getstr): Remove warning-evoking assertions.
22319         Return -1 if offset parameter is out of bounds.
22320         Change the type of a local from int to size_t.
22321
22322         * lib/strftime.c (my_strftime_localtime_r): Include this function
22323         definition in the `#if ! HAVE_TM_GMTOFF' block.
22324
22325         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22326         Include xalloc.h instead.
22327
22328 2001-12-02  Jim Meyering  <meyering@lucent.com>
22329
22330         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22331         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22332         included.
22333
22334         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22335         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22336
22337 2001-11-30  Akim Demaille  <akim@epita.fr>
22338
22339         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22340         before being defined.
22341
22342 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22343
22344         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22345         First arg is int, not unsigned.
22346         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22347         (SIZE_MAX, UINT_MAX): New macros.
22348         (quotearg_n_options): Abort if N is negative.
22349         Avoid overflow check on hosts where size_t is 64 bits and int
22350         is 32 bits, as overflow is impossible there.
22351         Fix off-by-one typo that caused unnecessary reallocation.
22352
22353 2001-11-27  Jim Meyering  <meyering@lucent.com>
22354
22355         * lib/tempname.c: Merge with version from libc.
22356         * lib/regex.c: Likewise.
22357
22358         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22359         systems for which STDC_HEADERS is 0, it was not included, resulting in
22360         a warning about an integer-to-pointer conversion problem with getenv.
22361         Reported by Volker Borchert.
22362
22363 2001-11-26  Jim Meyering  <meyering@lucent.com>
22364
22365         * lib/gtod.h: Remove file.
22366         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22367         * lib/gettimeofday.c: Don't include gtod.h.
22368         (GTOD_init): Remove function.
22369         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22370         Suggestion from Volker Borchert.
22371
22372 2001-11-23  Jim Meyering  <meyering@lucent.com>
22373
22374         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22375         it.
22376         * lib/hash.c (struct hash_table): Define it here instead.
22377
22378 2001-11-22  Jim Meyering  <meyering@lucent.com>
22379
22380         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22381
22382 2001-11-20  Jim Meyering  <meyering@lucent.com>
22383
22384         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22385         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22386
22387 2001-11-19  Jim Meyering  <meyering@lucent.com>
22388
22389         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22390         directory.  Use "conftestXXXXXX" as the template.
22391         Suggestion from Paul Eggert.
22392
22393         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22394         immediately, so the test doesn't mistakenly hit the max-open-files
22395         limit.
22396
22397 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22398
22399         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22400         (TEMPORARIES): New macro.
22401         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22402         removes an artificial limitation (e.g. HP-UX 10.20, where
22403         TMP_MAX is 17576).
22404
22405 2001-11-18  Jim Meyering  <meyering@lucent.com>
22406
22407         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22408
22409 2001-11-18  Jim Meyering  <meyering@lucent.com>
22410
22411         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22412         on SunOS 4.
22413
22414         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22415         files will be created before anything else.
22416
22417 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22418
22419         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22420         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22421
22422 2001-11-17  Jim Meyering  <meyering@lucent.com>
22423
22424         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22425         Prompted by a report from Bob Proulx.
22426
22427         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22428         Instead, require UTILS_FUNC_MKSTEMP.
22429
22430 2001-11-17  Jim Meyering  <meyering@lucent.com>
22431
22432         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22433         Now, that's done as part of AC_FUNC_STRTOD.
22434
22435 2001-11-17  Jim Meyering  <meyering@lucent.com>
22436
22437         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22438         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22439         rather than group writable.  Patch by Juan F. Codagnone.
22440
22441         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22442         xrealloc, Instead, include "xalloc.h".
22443
22444         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22445         Remove explicit declarations of xmalloc, xrealloc,
22446         and xstrdup.  Instead, include "xalloc.h".
22447
22448         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22449         unlocked-io.h.
22450         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22451         Likewise.
22452         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22453
22454         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22455         Reported by Padraig Brady.
22456
22457         * lib/mkstemp.c: #undef mkstemp.
22458         Include config.h.
22459         (rpl_mkstemp): Rename from mkstemp.
22460         Protoize.
22461
22462 2001-11-16  Jim Meyering  <meyering@lucent.com>
22463
22464         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22465         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22466         determine the amount of total physical memory, use pstat_getstatic.
22467         HPUX-11 doesn't define _SC_PHYS_PAGES.
22468         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22469         If sysconf couldn't be used to determine the amount of available
22470         physical memory, use both pstat_getstatic and pstat_getdynamic.
22471         Based on a patch from Bob Proulx.
22472
22473 2001-11-10  Jim Meyering  <meyering@lucent.com>
22474
22475         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22476         (jm_PREREQ): Use it.
22477
22478 2001-11-09  Jim Meyering  <meyering@lucent.com>
22479
22480         * m4/jm-macros.m4: Require autoconf-2.52f.
22481         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22482         Use these AC_-prefixed names, not the AM_-prefixed ones.
22483
22484         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22485
22486 2001-11-05  Jim Meyering  <meyering@lucent.com>
22487
22488         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22489
22490 2001-11-04  Jim Meyering  <meyering@lucent.com>
22491
22492         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22493         $DEFS.
22494
22495 2001-11-03  Jim Meyering  <meyering@lucent.com>
22496
22497         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22498         of AC_DEFUN.
22499
22500         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22501         know the name of the variable in the macro definition.
22502
22503 2001-11-03  Jim Meyering  <meyering@lucent.com>
22504
22505         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22506         in argmatch_to_argument call.
22507
22508         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22509         argument.
22510
22511         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22512         e.g., a fault due to an attempt to free a NULL pointer.
22513
22514 2001-11-01  Jim Meyering  <meyering@lucent.com>
22515
22516         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22517         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22518
22519 2001-11-01  Jim Meyering  <meyering@lucent.com>
22520
22521         * lib/dirfd.c, lib/dirfd.h: New files.
22522         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22523
22524         * lib/hash.c (hash_print) [TESTING]: Clean up.
22525
22526 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22527
22528         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22529         to avoid a warning if -Wall.
22530
22531 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22532
22533         * README: New file
22534         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22535         (per RMS's instructions, this is now the canonical source)
22536         * lgpl/, gpl/: New directories.
22537
22538 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22539
22540         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22541
22542 2001-10-21  Jim Meyering  <meyering@lucent.com>
22543
22544         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22545         this code would end up calling gettext even in packages built
22546         with --disable-nls.
22547         * lib/getopt.c (_): Likewise.
22548         * lib/regex.c (_): Likewise.
22549
22550 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22551
22552         * m4/error.m4 (jm_PREREQ_ERROR):
22553         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22554         AC_FUNC_STRERROR_R does that.
22555         Check for strerror declaration.
22556
22557         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22558         are supposed to have them these days.
22559         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22560         Merge changes from latest Autoconf CVS.
22561         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22562         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22563         POSIX decided to standardize on the int flavor of strerror_r.
22564
22565 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22566
22567         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22568         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22569         Use strerror_r that is only a macro, even if it is not a function.
22570         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22571         (private_strerror): Use prototypes, not old-style function definition.
22572         (print_errno_message): New function.
22573         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22574         char*-flavored one.
22575         (error_tail, error, error_at_line): Use it.
22576
22577 2001-10-11  Jim Meyering  <meyering@lucent.com>
22578
22579         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22580         and quote_n (1, ... to avoid clobbering a buffer.
22581
22582 2001-10-05  Jim Meyering  <meyering@lucent.com>
22583
22584         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22585         hash-pjw.h.
22586         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22587         * lib/hash-pjw.h: New file.
22588
22589 2001-09-30  Jim Meyering  <meyering@lucent.com>
22590
22591         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22592         `struct fsstat' has the `f_fstypename' member.
22593         Use that to define FS_TYPE, which is now used to make
22594         the getfsstat link test tighter.
22595
22596 2001-09-30  Jim Meyering  <meyering@lucent.com>
22597
22598         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22599         Include <sys/ucred.h>, for Apple Darwin.
22600         Include sys/mount.h and sys/fs_types.h only if available.
22601         (FS_TYPE): Define.
22602         (read_filesystem_list): Use FS_TYPE.
22603
22604 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22605
22606         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22607         a boolean context.
22608
22609 2001-09-29  Jim Meyering  <meyering@lucent.com>
22610
22611         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22612         [one-argument getmntent function]): Include stdio.h before mntent.h.
22613         SunOS 4.1.x needs it for the declaration of `FILE'.
22614         Patch by Volker Borchert.
22615
22616         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22617         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22618         sys/fs_types.h, and make the link-test for getfsstat guard #include
22619         directives with appropriate #if HAVE_*_H tests so that we can
22620         detect getfsstat on Apple Darwin1.3.7 systems.
22621         Reported by Nelson Beebe.
22622         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22623
22624 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22625
22626         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22627         #defines strtoimax.  Also treat the other strto* functions
22628         like strtoimax.
22629
22630         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22631         Check for strtoul and strtoumax,
22632         as those declarations are made even in the signed case.
22633         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22634         Likewise, for strtol and strtoimax.
22635
22636 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22637
22638         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22639         #defines strtoimax.  Also treat the other strto* functions
22640         like strtoimax.
22641
22642         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22643         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22644         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22645
22646 2001-09-26  Jim Meyering  <meyering@lucent.com>
22647
22648         Most macros in unlocked-io.h had the wrong number of arguments.
22649         * lib/gen-uio: New script.
22650         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22651         * lib/unlocked-io.hin: Remove file.
22652         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22653         rather than trying to embed it here.
22654         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22655         Reported by Padraig Brady.
22656
22657 2001-09-25  Volker Borchert  <bt@teknon.de>
22658
22659         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22660         `result'.
22661
22662 2001-09-24  Jim Meyering  <meyering@lucent.com>
22663
22664         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22665
22666 2001-09-23  Jim Meyering  <meyering@lucent.com>
22667
22668         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22669         instead of the mere test for existence of mntent.h.  The latter
22670         would get a false-positive on AIX 3.4 systems.
22671         In the outer getmntent if-block, don't die if neither of the getmntent
22672         tests succeeds.  Instead, just fall through and continue with the
22673         remaining tests.
22674
22675 2001-09-23  Jim Meyering  <meyering@lucent.com>
22676
22677         * lib/mountlist.c: Remove useless parentheses in #if directives.
22678         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22679         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22680
22681 2001-09-22  Jim Meyering  <meyering@lucent.com>
22682
22683         * m4/gettext.m4: New file.  From gettext.
22684         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22685         * m4/progtest.m4: Likewise
22686         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22687         * m4/glibc21.m4: Likewise.
22688
22689         * m4/libintl.m4: Remove.  No longer used.
22690
22691 2001-09-22  Jim Meyering  <meyering@lucent.com>
22692
22693         * lib/localcharset.c: Update from latest gettext.
22694         * lib/config.charset: Likewise.
22695
22696 2001-09-20  Jim Meyering  <meyering@lucent.com>
22697
22698         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22699         strtoimax.
22700         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22701         strtoumax.
22702
22703 2001-09-20  Jim Meyering  <meyering@lucent.com>
22704
22705         * lib/xstrtol.c (strtoimax): Guard declaration with
22706         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22707         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22708         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22709         (strtoumax): Likewise, for completeness (it wasn't necessary).
22710
22711 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22712
22713         * lib/strtoimax.c (HAVE_LONG_LONG):
22714         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22715         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22716         to work around bug in IBM C compiler.
22717
22718 2001-09-17  Jim Meyering  <meyering@lucent.com>
22719
22720         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22721         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22722         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22723         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22724         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22725         whenever the right hand side need not be expanded by the shell.
22726
22727 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22728
22729         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22730         library.  It's not correct, as some older glibcs are buggy.
22731         fnmatch wasn't fixed until glibc 2.2.
22732
22733         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22734         special shell magic here.
22735
22736 2001-09-16  Jim Meyering  <meyering@lucent.com>
22737
22738         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22739         * m4/jm-macros.m4: Require it.
22740
22741 2001-09-16  Jim Meyering  <meyering@lucent.com>
22742
22743         * lib/mkdir.c: New file.
22744
22745 2001-09-15  Jim Meyering  <meyering@lucent.com>
22746
22747         * m4/jm-macros.m4: Check for help2man.
22748
22749 2001-09-11  Jim Meyering  <meyering@lucent.com>
22750
22751         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22752         The body, by Paul Eggert, was moved here from configure.in.
22753         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22754
22755 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22756
22757         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22758         (jm_PREREQ): Use it.
22759
22760 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22761
22762         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22763         Use ssize_t, not int, to store result of readlink.
22764         Check for ssize_t overflow as well as size_t overflow,
22765         as POSIX says the result of readlink is implementation-defined
22766         when ssize_t overflows.
22767         Remove unnecessary cast to char*.
22768         Use free+malloc instead of realloc, as the storage doesn't need
22769         to be preserved and it's clearer and can be more efficient that way.
22770         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22771         * lib/xreadlink.h (xreadlink): Update prototype.
22772
22773 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22774
22775         * lib/xgetcwd.c: Revert some of the previous change; intead,
22776         fix the HAVE_GETCWD_NULL code to behave more like the
22777         !HAVE_GETCWD_NULL code used to.
22778
22779         Include "xalloc.h".
22780         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22781         invoke xalloc_die.
22782
22783 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22784
22785         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22786         sys/param.h, as pathmax.h includes them.
22787
22788 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22789
22790         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22791         (jm_PREREQ_XGETCWD): New macro.
22792
22793         * m4/getcwd.m4: New file.
22794
22795 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22796
22797         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22798         like the HAVE_GETCWD_NULL code.
22799         Include pathmax.h if not HAVE_GETCWD.
22800         Do not include xalloc.h.
22801         (INITIAL_BUFFER_SIZE): New symbol.
22802         Do not use xmalloc / xrealloc, since the caller is responsible for
22803         handling errors.  Preserve errno around `free' during failure.
22804         Do not overrun buffer when using getwd.
22805
22806 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22807
22808         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22809         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22810         getcwd (NULL, 0).
22811
22812 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22813
22814         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22815         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22816         spotted by Jim Meyering.
22817
22818 2001-09-03  Jim Meyering  <meyering@lucent.com>
22819
22820         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22821         failure.
22822
22823 2001-09-02  Jim Meyering  <meyering@lucent.com>
22824
22825         * lib/error.c: Update from GNU libc.
22826
22827 2001-09-01  Jim Meyering  <meyering@lucent.com>
22828
22829         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22830         Used by df.
22831
22832 2001-09-01  Jim Meyering  <meyering@lucent.com>
22833
22834         * lib/xreadlink.c: New file.
22835         * lib/xreadlink.h: New file.
22836         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22837         xreadlink.h.
22838
22839         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22840         doesn't conflict with sparc Solaris 7's definition in
22841         /usr/include/sys/int_types.h.
22842
22843         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22844         files.
22845         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22846         and strncasecmp as r-values.  Unixware didn't have declarations.
22847
22848 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22849
22850         * lib/xstrtol.h: Add copyright notice.
22851         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22852         LONGINT_INVALID_SUFFIX_CHAR.
22853
22854 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22855
22856         * lib/xstrtol.c (strtoimax): New decl.
22857
22858 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22859
22860         * lib/xgetcwd.c: Don't include pathmax.h.
22861         Include stdlib.h and unistd.h if available.
22862         Include xalloc.h.
22863         (xmalloc, xstrdup, free): Remove decls.
22864         (xgetcwd): Don't assume sizes fit in unsigned.
22865         Check for overflow when computing sizes.
22866         Simplify reallocation code.
22867
22868 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22869
22870         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22871         a directory's st_size can have an arbitrary value, so the old
22872         usage could waste an arbitrary amount of memory.  All uses
22873         changed.
22874         * lib/savedir.h: Update prototype.
22875
22876 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22877
22878         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22879
22880         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22881         old strtoimax.c.
22882
22883         Also, make the following further changes to make this file's
22884         configuration more similar to that of strtol.c:
22885         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22886         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22887         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22888         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22889         changed to signed values.
22890
22891         And make the following changes as well:
22892         Fix copyright notice, as 1999 was missing.
22893         (verify): New macro.
22894         (strtoimax): Check sizes at compile-time, not run-time.
22895         Prefer strtol to strtoll if both work.
22896         (main): Remove; it was not that useful and was a pain to maintain.
22897
22898         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22899
22900 2001-08-31  Jim Meyering  <meyering@lucent.com>
22901
22902         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22903         Use an initial, malloc'd, buffer of length 128 rather than
22904         a statically allocated one of length 1024.
22905
22906 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22907
22908         Simplify code, partly by assuming autoconf 2.52 semantics.
22909
22910         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
22911
22912         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
22913         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
22914         All uses removed.
22915         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
22916         Move AC_REQUIRE to next-to-top level, to avoid confusion.
22917         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
22918         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
22919         jm_AC_HEADER_INTTYPES_H.
22920         * m4/jm-macros.m4 (jm_MACROS): Likewise.
22921
22922         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
22923
22924         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22925         Quote first arg of AC_DEFUN.
22926         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
22927         since they are needed to parse the include file even if we need
22928         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
22929         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
22930         but with opposite signedness.
22931
22932 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22933
22934         Merge 'exclude' changes from tar 1.13.22.
22935         This fixes one or two unlikely storage allocation overflow bugs,
22936         but doesn't change user-visible behavior otherwise.
22937
22938 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22939
22940         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
22941         (jm_PREREQ_EXCLUDE): New macro.
22942
22943 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22944
22945         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
22946         tm to be declared.
22947
22948 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22949
22950         * lib/hash.c: Remove '2001' from copyright notice.
22951
22952 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22953
22954         * lib/full-write.h: New file.
22955         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
22956         * lib/full-write.c: Correct credits, as cccp.c no longer
22957         exists and anyway it was so heavily changed from the old cccp
22958         code as to be unrecognizable.  Include full-write.h.
22959         (full_write) Return size_t, with short writes meaning failure.
22960         All callers changed.  This fixes a bug with large buffers
22961         on 64-bit hosts.
22962         * lib/utime.c: Include full-write.h.
22963
22964 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22965
22966         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
22967         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
22968         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
22969         Include if available.
22970         (<xalloc.h>): Include
22971         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
22972         (verify): New macro.  Use it to verify that EXCLUDE macros do not
22973         collide with FNM macros.
22974         (struct patopts): New struct.
22975         (struct exclude): Use it, as exclude patterns now come with options.
22976         (new_exclude): Support above changes.
22977         (new_exclude, add_exclude_file):
22978         Initial size must now be a power of two to simplify overflow checking.
22979         (free_exclude, fnmatch_no_wildcards): New function.
22980         (excluded_filename): No longer requires options arg, as the options
22981         are determined by add_exclude.  Now returns bool, not int.
22982         (excluded_filename, add_exclude):
22983         Add support for the fancy new exclusion options.
22984         (add_exclude, add_exclude_file): Now takes int options arg.
22985         Check for arithmetic overflow when computing sizes.
22986         (add_exclude_file): xrealloc might modify errno, so don't
22987         realloc until after errno might be used.
22988
22989         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
22990         New macros.
22991         (free_exclude): New decl.
22992         (add_exclude, add_exclude_file): Now takes int options arg.
22993         (excluded_filename): No longer requires options arg, as the options
22994         are determined by add_exclude.  Now returns bool, not int.
22995
22996 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22997
22998         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
22999
23000 2001-08-27  Jim Meyering  <meyering@lucent.com>
23001
23002         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23003
23004         * lib/version-etc.c (N_): Remove definition.
23005         Revert most of last change.
23006         Instead, simply don't mark the `Copyright...' string for translation.
23007         Based on advice from Paul Eggert.
23008
23009         * lib/strtoxmax.c: Tweak comment.
23010
23011 2001-08-26  Jim Meyering  <meyering@lucent.com>
23012
23013         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23014
23015         * m4/xstrtoimax.m4: New file.
23016         * m4/xstrtoumax.m4: Add comments explaining why we
23017         AC_REPLACE_FUNCS(strtol).
23018
23019 2001-08-26  Jim Meyering  <meyering@lucent.com>
23020
23021         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23022         of copyright with `%s' so translators don't get an untranslated
23023         message in 2002.
23024         (COPYRIGHT_YEAR): Define.
23025         (version_etc): Use fprintf rather than fputs.
23026         Suggestion from Ulrich Drepper.
23027
23028         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23029
23030         * lib/strtoll.c: New file, from GNU libc.
23031         * lib/xstrtoimax.c: New file.
23032
23033         * lib/xstrtol.h: Add xstrtoimax.
23034         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23035         * lib/strtoimax.c: New file.  Likewise, but first define
23036         STRTOUXMAX_SIGNED.
23037
23038         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23039         ...
23040         * lib/strtoxmax.c: ... then renamed to this.
23041
23042 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23043
23044         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23045         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23046         (jm_AC_TYPE_INTMAX_T): New macro.
23047         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23048
23049         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23050
23051         * m4/longlong.m4: Renamed from ulonglong.m4.
23052         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23053         * m4/uintmax_t.m4: Removed.
23054
23055 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23056
23057         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23058         Port to Solaris 8, where 'sed' requires a space after the 'r'
23059         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23060         Redirect output to $tmp just once.
23061
23062 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23063
23064         * lib/addext.c (<errno.h>): Include.
23065         (errno): Declare if not defined.
23066         (addext): Work correctly when pathconf returns -1 and leaves
23067         errno alone because there is no limit.  Also, work even if
23068         pathconf returns a value greater than SIZE_MAX.
23069
23070 2001-08-12  Jim Meyering  <meyering@lucent.com>
23071
23072         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23073         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23074         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23075         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23076         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23077         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23078         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23079         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23080         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23081         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23082         utime.m4, utimes.m4, xstrtoumax.m4:
23083         Quote the first argument in each use of AC_DEFUN.
23084
23085 2001-08-12  Jim Meyering  <meyering@lucent.com>
23086
23087         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23088         Simply `return getcwd (NULL, 0);'.
23089         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23090         Use 1300 as initial value for length, not PATH_MAX.
23091
23092         * lib/pathmax.h: Clean up cpp syntax.
23093
23094 2001-08-12  Jim Meyering  <meyering@lucent.com>
23095
23096         * lib/gettimeofday.c: New file.
23097         * lib/gtod.h: New file.
23098         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23099
23100 2001-08-05  Jim Meyering  <meyering@lucent.com>
23101
23102         * m4/jm-macros.m4: Require autoconf-2.52.
23103
23104 2001-08-04  Jim Meyering  <meyering@lucent.com>
23105
23106         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23107         stmt, to get in sync with glibc.
23108
23109 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23110
23111         The following changes are from gettext 0.10.39 as maintained by
23112         Bruno Haible.
23113
23114         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23115         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23116         with inverted sense.  All uses changed.
23117
23118         * lib/mbswidth.c: Don't include <limits.h>.
23119         Include <stdlib.h> and <string.h> unconditionally.
23120         (iswcntrl, mbsinit, ISCNTRL): New macros.
23121         (mbsnwidth): Use K&R style function declarations.
23122         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23123         can optimize it when MB_CUR_MAX == 1.
23124         The width of control characters is zero, not 1.
23125
23126 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23127
23128         The following changes are from gettext 0.10.39 as maintained by
23129         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23130
23131         * m4/codeset.m4: Upgrade to serial AM1.
23132         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23133         all uses changed.  Quote first arg of AC_DEFUN.
23134         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23135
23136         * m4/iconv.m4: Upgrade to serial AM2.
23137         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23138         Add --with-libconv-prefix.
23139         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23140         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23141         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23142         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23143         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23144
23145         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23146         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23147         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23148         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23149         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23150         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23151         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23152         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23153         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23154
23155         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23156         string.h any more.
23157
23158         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23159         not the default value.
23160
23161         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23162         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23163         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23164         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23165         Also check for iswcntrl, used for wcwidth fallback.
23166         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23167         to Autoconf 2.13.
23168
23169 2001-08-03  Jim Meyering  <meyering@lucent.com>
23170
23171         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23172         as it was in the original.  Reported by Paul Eggert.
23173
23174 2001-07-16  Jim Meyering  <meyering@lucent.com>
23175
23176         * m4/gettimeofday.m4: New file.
23177         Prompted by a report from Bernhard Baehr.
23178
23179 2001-07-15  Jim Meyering  <meyering@lucent.com>
23180
23181         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23182         stuff. Now it's in ../Makefile.cfg.
23183
23184 2001-07-15  Jim Meyering  <meyering@lucent.com>
23185
23186         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23187         (BUILT_SOURCES): Add unlocked-io.h.
23188         (io_functions): Define.
23189         (unlocked-io.h): New rule.
23190         (DISTCLEANFILES): Add unlocked-io.h.
23191         (all-local): Depend on unlocked-io.h, to ensure it is created.
23192
23193         * lib/unlocked-io.hin: New file
23194
23195         * lib/regex.c: Update from glibc.
23196
23197 2001-07-05  Jim Meyering  <meyering@lucent.com>
23198
23199         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23200         recommendation.
23201         (libfetish_a_SOURCES): Put all .h files here instead.
23202         Remove a thus-exposed (better checks in automake) duplicate and
23203         two unnecessary .h files.
23204
23205 2001-07-04  Jim Meyering  <meyering@lucent.com>
23206
23207         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23208         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23209         distcheck failure.
23210
23211 2001-07-02  Jim Meyering  <meyering@lucent.com>
23212
23213         The following changes were prompted by suggestions from Bruno Haible.
23214
23215         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23216         is now generated.
23217         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23218         definition of EXTRA_DIST.
23219         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23220         ensure that the generated file is created/updated whenever the list
23221         of $(unlocked_functions) is changed.
23222         (jm-glibc-io.m4): New rule.
23223         (unlocked-io.h): New rule -- currently unused.
23224
23225 2001-06-24  Jim Meyering  <meyering@lucent.com>
23226
23227         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23228         unmatched right bracket, rather than kludging it with an extra,
23229         falsely-matching quote in a comment.  Patch by Akim Demaille.
23230
23231 2001-06-11  Jim Meyering  <meyering@lucent.com>
23232
23233         * lib/regex.c: Update from GNU libc.
23234
23235 2001-05-27  Jim Meyering  <meyering@lucent.com>
23236
23237         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23238         Check for ut_type in struct utmp.
23239
23240 2001-05-27  Jim Meyering  <meyering@lucent.com>
23241
23242         * lib/readutmp.h (UT_TYPE): Define.
23243
23244 2001-05-24  Jim Meyering  <meyering@lucent.com>
23245
23246         * lib/argmatch.c: Include "quote.h".
23247         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23248         quote function.  Reported by Göran Uddeborg.
23249
23250 2001-05-22  Jim Meyering  <meyering@lucent.com>
23251
23252         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23253         now that we use the package-supplied version unconditionally.
23254         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23255
23256 2001-05-21  Jim Meyering  <meyering@lucent.com>
23257
23258         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23259         shell syntax errors.
23260
23261 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23262
23263         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23264
23265 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23266
23267         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23268         Don't bother to check library strftime, since
23269         we'll be using our own my_strftime function anyway.
23270         Define my_strftime instead of strftime.
23271
23272 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23273
23274         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23275         which is not yet declared.
23276
23277 2001-05-15  Jim Meyering  <meyering@lucent.com>
23278
23279         * m4/regex.m4: Use proper quoting so brackets appear in the test
23280         program.
23281         Reported by, and with help from, Bruno Haible.
23282
23283 2001-05-13  Jim Meyering  <meyering@lucent.com>
23284
23285         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23286         undefined.
23287
23288 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23289
23290         dirname code cleanup.  base_name now behaves more compatibly
23291         with POSIX basename when given file names that have trailing
23292         slashes, and similarly for dir_name.  Add new primitives
23293         base_len and dir_len.  Put the directory-name-related decls
23294         into dirname.h.
23295
23296         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23297         * lib/backupfile.c (base_name): Likewise.
23298         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23299         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23300         * lib/makepath.c (strip_trailing_slashes): Likewise.
23301         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23302         ISSLASH): Likewise.
23303         * lib/rename.c (strip_trailing_slashes): Likewise.
23304         * lib/same.c (base_name): Likewise.
23305         * lib/stripslash.c (ISSLASH): Likewise.
23306
23307         * lib/addext.c: Include <dirname.h> after size_t is defined.
23308         * lib/backupfile.c: Likewise.
23309
23310         * lib/addext.c (addext): Use base_len to trim redundant
23311         trailing slashes instead of doing it ourselves.
23312         But do not trim the last slash if it is not redundant.
23313
23314         * lib/backupfile.c (find_backup_file_name,
23315         max_backup_version): Use base_len instead of rolling it ourselves.
23316         Handle the case of "" and (on DOS) "C:" correctly.
23317
23318         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23319         needed. Include <string.h>, <dirname.h>.
23320         (base_name): Allow file names ending in slashes, other than names
23321         that are all slashes.  In this case, return the basename followed
23322         by the slashes.  This is more general, and can be used in places
23323         where the original base_name purposely had an assertion failure.
23324         (base_len): New function.
23325
23326         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23327         Do not include <assert.h>; no longer needed.
23328         Include xalloc.h.
23329         (memrchr): Remove decl.
23330         (dir_name_r): Remove.
23331         (dir_len): Renamed from dirlen.  All callers changed.
23332         Rewrite in terms of base_name, for simplicity and consistency.
23333         (dir_name): Never return NULL.  All callers changed.
23334         Do not include <stdlib.h> in test program; no longer needed.
23335         return 0; is fine for test program.
23336
23337         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23338         New macros.
23339         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23340
23341         * lib/path-concat.c (path_concat): Use base_len to compute
23342         base length, not strlen; this means we cannot rely on memcpy
23343         to null-terminate.
23344
23345         * lib/same.c (STREQ): Remove.
23346         (same_name): Handle the case where the basename ends in trailing '/'.
23347
23348         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23349         a slash was stripped.  Do not strip the last slash after a
23350         file system prefix.
23351
23352 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23353
23354         * lib/Makefile.am (libfetish_a_SOURCES):
23355         Add strftime.c, since we now compile it on all hosts.
23356
23357         * lib/strftime.c (my_strftime):
23358         Define to nstrftime if emacs, but only if my_strftime is not defined.
23359         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23360         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23361         Add one more extra argument: a nanoseconds value.
23362         All uses changed.
23363         (ns): New macro.
23364         (my_strftime function): Add %N format.
23365         (emacs_strftimeu): Renamed from emacs_strftime,
23366         with extra ut argument.
23367
23368 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23369
23370         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23371
23372 2001-04-21  Jim Meyering  <meyering@lucent.com>
23373
23374         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23375         doesn't interfere.
23376
23377 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23378
23379         * m4/ftruncate.m4: Check for chsize.
23380         Link with ftruncate.o unconditionally if ftruncate is missing.
23381         This was required when cross-compiling to i586-mingw32msvc.
23382
23383 2001-04-08  Jim Meyering  <meyering@lucent.com>
23384
23385         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23386         recomputed; that's necessary when the offset spans a DST transition.
23387         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23388
23389 2001-04-02  Jim Meyering  <meyering@lucent.com>
23390
23391         * lib/regex.h, regex.c: Update from GNU libc.
23392
23393 2001-03-24  Jim Meyering  <meyering@lucent.com>
23394
23395         * m4/jm-macros.m4: Require autoconf-2.49d.
23396
23397 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23398
23399         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23400
23401 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23402
23403         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23404
23405 2001-03-17  Jim Meyering  <meyering@lucent.com>
23406
23407         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23408         now that the version in autoconf is equivalent.
23409         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23410
23411         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23412         Suggestion from Akim Demaille.
23413
23414         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23415         (jm_PREREQ_TEMPNAME): New function.
23416
23417 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23418
23419         * lib/tempname.c (uint64_t): Define to uintmax_t if
23420         not defined, and if UINT64_MAX is not defined.
23421         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23422         Reported by John David Anglin.
23423
23424 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23425
23426         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23427         resolve alias if codeset is empty.
23428         * lib/config.charset (BeOS): Use wildcard syntax.
23429
23430 2001-03-13  Jim Meyering  <meyering@lucent.com>
23431
23432         * lib/path-concat.c (path_concat)
23433         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23434         concatenating e.g., `C:' and `foo'.
23435         From Bruno Haible.
23436
23437 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23438
23439         * lib/localcharset.c (locale_charset): Don't use
23440         setlocale(LC_CTYPE,NULL). Don't return NULL.
23441         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23442
23443 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23444
23445         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23446         support for DOS/DJGPP.
23447
23448 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23449
23450         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23451         lacks mkstemp.  Compile our own tempname.c if we compile our own
23452         mkstemp.c, as mkstemp relies on tempname.
23453
23454 2001-03-01  Jim Meyering  <meyering@lucent.com>
23455
23456         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23457         AH_VERBATIM really does output its argument verbatim.
23458
23459 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23460
23461         * lib/Makefile.am (libfetish_a_SOURCES):
23462         Add dup-safer.c, fopen-safer.c.
23463         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23464
23465         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23466         * lib/unistd-safer.h: New files.
23467
23468 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23469
23470         The mkstemp replacement is taken from glibc 2.2.2, with some
23471         portability fixes for use outside glibc, as follows:
23472
23473         * lib/tempname.c (struct_stat64): New macro.
23474         (direxists, __gen_tempname): Use it.
23475         This avoids a portability problem with Solaris 8.
23476
23477         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23478         (<stddef.h>, <stdint.h>, <string.h>):
23479         Include only if STDC_HEADERS || _LIBC.
23480         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23481         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23482         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23483         (__set_errno): Define this macro if <errno.h> doesn't.
23484         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23485         Define these macros if <stdio.h> doesn't.
23486         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23487         Define these macros if <sys/stat.h>
23488         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23489         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23490         __xstat64): Define if not _LIBC.
23491         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23492         (__gen_tempname): Invoke gettimeofday only if
23493         HAVE_GETTIMEOFDAY || _LIBC;
23494         otherwise, fall back on plain "time".
23495         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23496
23497         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23498
23499         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23500
23501 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23502
23503         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23504
23505 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23506
23507         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23508         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23509         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23510         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23511
23512 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23513
23514         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23515         Remove workaround macros for hosts that have mbrtowc but not
23516         mbstate_t, as we now insist on proper declarations for both
23517         before using mbrtowc.
23518
23519 2001-02-17  Jim Meyering  <meyering@lucent.com>
23520
23521         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23522         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23523         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23524         UnixWare 7.1.1.
23525
23526         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23527         rather than AC_CACHE_VAL.
23528
23529 2001-02-17  Jim Meyering  <meyering@lucent.com>
23530
23531         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23532         around included file name.
23533
23534         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23535
23536         * lib/strftime.c: Update from GNU libc (the only changes were to
23537         comments).
23538
23539 2001-02-17  Jim Meyering  <meyering@lucent.com>
23540
23541         * lib/regex.c: Update from libc.
23542
23543 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23544
23545         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23546         clash.
23547
23548 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23549
23550         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23551         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23552         Reported by Mark Hounschell via Paul Eggert.
23553
23554 2001-02-07  Jim Meyering  <meyering@lucent.com>
23555
23556         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23557
23558 2001-02-05  Jim Meyering  <meyering@lucent.com>
23559
23560         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23561         it includes the patch required for `large file' support with at least
23562         HP-UX's 10.20 /bin/cc.
23563
23564 2001-02-03  Jim Meyering  <meyering@lucent.com>
23565
23566         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23567         AS_IF, now that it works once again (mysteriously).
23568         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23569
23570 2001-01-30  Jim Meyering  <meyering@lucent.com>
23571
23572         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23573         * m4/chown.m4: Rename conftestchown to conftest.chown.
23574         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23575         s/conftestdir2/conftest.d2/.
23576         * m4/utimes.m4: s/conftestdata/conftest.data/
23577         Inspired by Pavel Roskin's change in autoconf.
23578
23579 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23580
23581         * lib/config.charset: Update for FreeBSD 4.2.
23582
23583 2001-01-27  Jim Meyering  <meyering@lucent.com>
23584
23585         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23586         a use of AS_IF.
23587         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23588
23589 2001-01-26  Jim Meyering  <meyering@lucent.com>
23590
23591         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23592         quotearg.c includes it.
23593
23594 2001-01-26  Jim Meyering  <meyering@lucent.com>
23595
23596         * lib/quotearg.c: Include stddef.h.
23597         * lib/quote.c: Include stddef.h.
23598         Reported by Axel Kittenberger.
23599
23600         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23601         line in double quotes so that it evokes a better diagnostic.
23602         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23603         Reported by Axel Kittenberger.
23604
23605 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23606
23607         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23608         as if it was a `charset'.
23609
23610 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23611
23612         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23613         has const.
23614
23615 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23616
23617         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23618         to avoid a warning.  Add back 'const' to inptr.
23619
23620 2001-01-20  Jim Meyering  <meyering@lucent.com>
23621
23622         Be sure that headers are checked before used in code compiled
23623         for the type checks.
23624         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23625         In place of that, invoke jm_CHECK_ALL_TYPES.
23626         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23627         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23628         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23629         The check for ssize_t was mistakenly run before the test for unistd.h.
23630
23631         The configure-time check for stdbool.h was missing.
23632         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23633         (jm_PREREQ_HASH): New function.
23634
23635 2001-01-17  Jim Meyering  <meyering@lucent.com>
23636
23637         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23638         for autoconf-2.49c.
23639         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23640
23641 2001-01-16  Jim Meyering  <meyering@lucent.com>
23642
23643         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23644         From Bruno Haible.
23645
23646 2001-01-14  Jim Meyering  <meyering@lucent.com>
23647
23648         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23649         foo and bar.  Create conftestdir/ in the script, not in the C code.
23650         Remove directories in the script, not in the C code.
23651         Remove conftestdir{,2} before trying to create the directory.
23652         Make the entire configure script fail if the mkdir fails.
23653
23654 2001-01-14  Jim Meyering  <meyering@lucent.com>
23655
23656         * lib/rename.c: New file.  From Volker Borchert.
23657         Include stdlib.h, string.h or strings.h, and xalloc.h.
23658         Use strip_trailing_slashes rather than open-coding it.
23659
23660 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23661
23662         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23663
23664 2001-01-03  Jim Meyering  <meyering@lucent.com>
23665
23666         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23667         of local `inptr' to avoid warning with some system declarations of
23668         iconv.
23669
23670 2001-01-02  Volker Borchert  <bt@teknon.de>
23671
23672         * m4/rename.m4: New file.
23673         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23674
23675 2001-01-01  Jim Meyering  <meyering@lucent.com>
23676
23677         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23678         even on systems with utmpx.h.  It's necessary for the declaration of
23679         utmp's ut_user member.  Reported by Andreas Jaeger.
23680
23681         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23682         available. They are required for the declarations of getgrgid and
23683         getpwuid resp.
23684         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23685         Reported by Andreas Jaeger.
23686
23687 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23688
23689         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23690         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23691         so `make install' also works in VPATH builds.
23692
23693 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23694
23695         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23696         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23697         can be used in subdirectories.
23698
23699 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23700
23701         * lib/modechange.c: Do not assume that mode_t uses the
23702         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23703         the other-execute bit of FOO even if S_IXOTH != 1.
23704
23705         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23706         WOTH, XOTH, ALLM): New macros.
23707         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23708          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23709         Use them.
23710         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23711         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23712         (mode_compile):
23713         No need to use uintmax_t; unsigned long is long enough.
23714         Don't bother to get suffix since we don't use it.
23715
23716 2000-12-26  Jim Meyering  <meyering@lucent.com>
23717
23718         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23719         better with autoheader.
23720
23721 2000-12-24  Jim Meyering  <meyering@lucent.com>
23722
23723         * lib/hash.c (is_prime): Return explicit boolean values.
23724         (hash_get_first): Return NULL to appease Irix5.6's 89.
23725         Reported by Nelson Beebe.
23726
23727 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23728
23729         * lib/localcharset.c (locale_charset): Add support for Win32.
23730
23731 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23732
23733         * lib/physmem.h, lib/physmem.c: New files.
23734
23735         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23736         (noinst_HEADERS): Add physmem.h.
23737
23738         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23739         't' for compatibility with Solaris 8 sort.
23740
23741 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23742
23743         * lib/config.charset: Add support for BeOS.
23744
23745 2000-12-17  Jim Meyering  <meyering@lucent.com>
23746
23747         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23748         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23749
23750 2000-12-16  Jim Meyering  <meyering@lucent.com>
23751
23752         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23753         N and M) would have treated it like `chown N:N FILE'.
23754
23755         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23756
23757 2000-12-16  Jim Meyering  <meyering@lucent.com>
23758
23759         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23760         SHELLS_FILE to a file name that's useful on djgpp systems.
23761         Include stdlib.h.
23762         (ADDITIONAL_DEFAULT_SHELLS): Define.
23763         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23764         Based mostly on a patch from Prashant TR.
23765
23766 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23767
23768         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23769         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23770         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23771
23772 2000-12-08  Andreas Schwab  <schwab@suse.de>
23773
23774         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23775         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23776
23777 2000-12-07  Jim Meyering  <meyering@lucent.com>
23778
23779         * lib/stripslash.c (ISSLASH): Define.
23780         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23781         `/'.
23782         From Prashant TR.
23783
23784         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23785         (dir_name_r): Declare this function as static.
23786         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23787         manifest itself on a name containing a mix of slashes and
23788         backslashes.
23789         Make this function work with names starting with a DOS-style
23790         drive letter and colon prefix.
23791         (dir_name): Append `.' if necessary.
23792         Based mostly on patches from Prashant TR and Eli Zaretskii.
23793
23794         * lib/dirname.h (dir_name_r): Remove prototype.
23795
23796 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23797
23798         * m4/off_t-format.m4: Remove this file.
23799         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23800
23801 2000-12-06  Jim Meyering  <meyering@lucent.com>
23802
23803         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23804         replacement strtoull, we may well need the replacement strtoul, too.
23805         Check for declarations of strtoul and strtoull.
23806         Check for strtol.  Mainly as a cue to cause automake to include
23807         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23808         Check for limits.h -- strtol.c needs it.
23809
23810 2000-12-05  Jim Meyering  <meyering@lucent.com>
23811
23812         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23813
23814 2000-12-04  Jim Meyering  <meyering@lucent.com>
23815
23816         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23817         Also include memory.h, stdlib.h, unistd.h if appropriate.
23818         Reported by Andreas Jaeger (conflicting declaration of malloc).
23819
23820 2000-12-02  Jim Meyering  <meyering@lucent.com>
23821
23822         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23823         * m4/jm-macros.m4 (jm_MACROS): require it.
23824
23825 2000-12-02  Jim Meyering  <meyering@lucent.com>
23826
23827         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23828
23829 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23830
23831         * lib/memrchr.c: Include <config.h> before any system include file.
23832
23833 2000-11-30  Jim Meyering  <meyering@lucent.com>
23834
23835         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23836
23837 2000-11-30  Jim Meyering  <meyering@lucent.com>
23838
23839         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23840
23841 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23842
23843         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23844
23845 2000-11-26  Jim Meyering  <meyering@lucent.com>
23846
23847         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23848
23849 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23850
23851         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23852         size of (size_t) -1; it's not portable.
23853
23854 2000-11-17  Jim Meyering  <meyering@lucent.com>
23855
23856         * lib/strstr.c: Update from GNU libc.
23857
23858 2000-11-17  Akim Demaille  <akim@epita.fr>
23859
23860         * lib/obstack.h: Formatting changes.
23861         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23862         prevent type checking.
23863         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23864         cast the value to (void *): assigning a `foo *' to a `void *'
23865         variable is valid.
23866         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23867
23868 2000-11-16  Jim Meyering  <meyering@lucent.com>
23869
23870         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23871
23872 2000-11-11  Jim Meyering  <meyering@lucent.com>
23873
23874         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23875
23876 2000-11-10  Jim Meyering  <meyering@lucent.com>
23877
23878         * lib/obstack.h: Update from GNU libc.
23879         * lib/obstack.c: Likewise.
23880
23881 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23882
23883         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23884
23885 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23886
23887         * lib/getusershell.c (setusershell): Use rewind rather than
23888         fseek/fseeko, to avoid configuration hassles with fseeko.
23889         Don't bother opening SHELLS_FILE if shellstream is NULL;
23890         it's not necessary.
23891
23892 2000-11-05  Jim Meyering  <meyering@lucent.com>
23893
23894         * lib/makepath.h (make_dir): Declare.
23895         * lib/makepath.c (make_dir): Remove `static' attribute.
23896         Tweak a comment.
23897
23898 2000-11-04  Jim Meyering  <meyering@lucent.com>
23899
23900         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23901
23902 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23903
23904         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23905         last one in a bucket, advance to the next bucket.
23906
23907 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23908
23909         * lib/fnmatch.c: Do not comment out all the code if we are using
23910         the GNU C library, because in some cases we are replacing buggy
23911         code in the GNU C library itself.
23912
23913 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
23914
23915         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
23916         (regex_compile): Catch bogus \(\1\).
23917
23918 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23919
23920         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
23921         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
23922         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
23923
23924 2000-10-30  Paul Eggert  <eggert@twinsun.com>
23925
23926         * lib/error.h, getline.h, modechange.h:
23927         Remove "2000" from Copyright line, as the file hasn't been
23928         changed this year other than in the copyright notice.
23929
23930         * lib/xalloc.h: Add "2000" to Copyright line, as this file
23931         was changed this year.
23932
23933 2000-10-29  Jim Meyering  <meyering@lucent.com>
23934
23935         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
23936         renaming.
23937         * m4/ls-mntd-fs.m4: Likewise
23938
23939 2000-10-29  Jim Meyering  <meyering@lucent.com>
23940
23941         * lib/xstat.in: Fix grammar in comment.
23942
23943 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
23944
23945         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
23946         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
23947         doesn't define __restrict_arr.
23948
23949 2000-10-28  Jim Meyering  <meyering@lucent.com>
23950
23951         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
23952         (jm_PREREQ_MEMCHR): New function.
23953
23954 2000-10-28  Jim Meyering  <meyering@lucent.com>
23955
23956         * lib/memchr.c: Update from libc.
23957         Adjust for portability:
23958         [HAVE_STDLIB_H]: Include stdlib.h.
23959         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
23960         Undef __memchr, too.
23961         [!weak_alias]: Define __memchr to memchr.
23962
23963         * lib/regex.c: Update from libc.
23964         * lib/regex.h: Likewise.
23965         * lib/getopt1.c: Likewise.
23966         * lib/memcmp.c: Likewise.
23967
23968         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
23969         Avoid using fseek, when possible -- it's broken by design.
23970         Patch by Ulrich Drepper.
23971
23972 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
23973
23974         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
23975         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
23976         Giving in to popular pressure to shut up the compiler with casts.
23977
23978 2000-10-26  Jim Meyering  <meyering@lucent.com>
23979
23980         * lib/strftime.c: Update from libc.
23981
23982 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
23983
23984         * regex.c: More `unsigned char' -> `re_char' changes.
23985         Also change several `int' into `re_wchar_t'.
23986         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
23987         (PUSH_FAILURE_POINTER): Don't cast any more.
23988         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
23989         We want GCC to complain, since this piece of code makes
23990         re_match non-reentrant, which *should* be fixed.
23991         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
23992         (EXTEND_BUFFER): Use RETALLOC.
23993         (SET_LIST_BIT): Don't cast.
23994         (re_wchar_t): New type.
23995         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
23996         that those two functions will always properly return.
23997         (IMMEDIATE_QUIT_CHECK): Cast to void.
23998         (analyse_first): Use recursion rather than an explicit stack.
23999         (re_compile_fastmap): Can't fail anymore.
24000         (re_search_2): Don't check re_compile_fastmap for failure.
24001         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24002         Now also sets the new value (passed in a new argument).
24003         (re_match_2_internal): Use it.
24004         Also, use a new var `reg' of type size_t when looping through regs
24005         rather than reuse the inappropriate `mcnt'.
24006
24007 2000-10-25  Jim Meyering  <meyering@lucent.com>
24008
24009         * lib/obstack.c: Update from libc.
24010
24011 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24012
24013         * regex.c (regex_compile): Change the way of handling a range from
24014         a char less than 256 to a char not less than 256.
24015
24016 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24017
24018         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24019         NT-Emacs only.
24020         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24021         so that re_search functions only quit when callers expect them to.
24022
24023 2000-10-23  Jim Meyering  <meyering@lucent.com>
24024
24025         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24026         wrong.  That set_locale call must not have any side effects.
24027         From Paul Eggert.
24028
24029 2000-10-22  Jim Meyering  <meyering@lucent.com>
24030
24031         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24032         [CYCLIC]: Remove now-unused definition.
24033
24034         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24035         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24036         Suggestion from Ulrich Drepper.
24037
24038 2000-10-21  Jim Meyering  <meyering@lucent.com>
24039
24040         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24041         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24042         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24043
24044 2000-10-21  Jim Meyering  <meyering@lucent.com>
24045
24046         * lib/dirname.c (memrchr): Declare if necessary.
24047         (dir_name): Remove the restriction that there be no
24048         trailing slashes.  Now, this code skips past them, effectively
24049         ignoring them.
24050         [TEST_DIRNAME] (main): New unit tests.
24051
24052         * lib/memrchr.c: New file from GNU libc.
24053         Undef __memrchr, too.
24054         [!weak_alias]: Define __memrchr to memrchr.
24055         Guard weak_alias use with `#ifdef weak_alias'.
24056
24057 2000-10-21  Jim Meyering  <meyering@lucent.com>
24058
24059         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24060         (dir_name): Use dir_name_r.
24061         * lib/dirname.h (dir_name_r): Declare it.
24062
24063 2000-10-17  Jim Meyering  <meyering@lucent.com>
24064
24065         * lib/quote.h (PARAMS): Define and use.
24066         Reported by Akim Demaille.
24067
24068         * lib/getopt.c: Update from libc.
24069
24070 2000-10-16  Jim Meyering  <meyering@lucent.com>
24071
24072         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24073         setlocale.
24074         From Jan Fedak.
24075
24076 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24077
24078         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24079
24080 2000-09-25  Jim Meyering  <meyering@lucent.com>
24081
24082         * lib/md5.h (rol): Define (from GnuPG).
24083
24084         * lib/sha.c: Give credit (GnuPG) where due.
24085         (M): Use rol rather than open-coding it.
24086         Add a FIXME comment.
24087
24088 2000-09-21  Jim Meyering  <meyering@lucent.com>
24089
24090         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24091         Reported by Michael Stone.
24092
24093 2000-09-20  Jim Meyering  <meyering@lucent.com>
24094
24095         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24096         (noinst_HEADERS): Add sha.h.
24097         Based on code from Scott G. Miller and from GnuPG.
24098
24099 2000-09-18  Jim Meyering  <meyering@lucent.com>
24100
24101         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24102         LIBS. Otherwise, everyone ends up linking with -lelf for some
24103         configurations.
24104         Reported by Mike Stone.
24105
24106 2000-09-15  Jim Meyering  <meyering@lucent.com>
24107
24108         * lib/regex.c: Update from libc.
24109
24110 2000-09-10  Jim Meyering  <meyering@lucent.com>
24111
24112         * lib/getopt.c (_getopt_internal): Update from glibc.
24113
24114 2000-09-09  Jim Meyering  <meyering@lucent.com>
24115
24116         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24117         think it should be used as a general replacement for isascii.
24118         * lib/fnmatch.c: Likewise.
24119         * lib/mbswidth.c: Likewise
24120         * lib/regex.c: Likewise.
24121
24122         Don't use atoi.
24123         * lib/userspec.c: Include sys/param.h and limits.h.
24124         Include xstrtol.h.
24125         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24126         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24127         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24128         UID, GID.  Check range.
24129
24130 2000-09-06  Jim Meyering  <meyering@lucent.com>
24131
24132         * lib/getopt.c (_getopt_internal): Update from glibc.
24133
24134 2000-08-30  Jim Meyering  <meyering@lucent.com>
24135
24136         * lib/strftime.c: Merge in changes from GNU libc.
24137
24138 2000-08-26  Jim Meyering  <meyering@lucent.com>
24139
24140         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24141         * m4/fpending.m4: New file.
24142
24143 2000-08-26  Jim Meyering  <meyering@lucent.com>
24144
24145         * lib/closeout.c: Include "__fpending.h".
24146         (close_stdout_status): Return right away if there's nothing to flush.
24147
24148         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24149         * lib/__fpending.c: New file.
24150         * lib/__fpending.h: New file.
24151
24152 2000-08-20  Jim Meyering  <meyering@lucent.com>
24153
24154         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24155         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24156         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24157
24158 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24159
24160         Improve fileutils installation on systems where running
24161         programs (like install) can't be unlinked.
24162         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24163         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24164
24165 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24166
24167         Standardize on "memory exhausted" instead of "Memory exhausted"
24168         or "virtual memory exhausted".
24169         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24170         "virtual memory exhausted".
24171         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24172         our own message.
24173         * lib/userspec.c (parse_user_spec): Likewise.
24174         * lib/bumpalloc.h: comment fix
24175         * lib/same.c, userspec.c: Include xalloc.h.
24176
24177         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24178         not char *const and pointing to a constant array.
24179         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24180         (xrealloc): Comment fix.
24181
24182         * lib/userspec.c (parse_user_spec):
24183         Don't translate a message until just before returning,
24184         to avoid unnecessary translation.
24185
24186 2000-08-07  Jim Meyering  <meyering@lucent.com>
24187
24188         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24189         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24190         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24191         getgroups.c, gethostname.c, getopt.h, group-member.c,
24192         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24193         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24194         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24195         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24196         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24197         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24198         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24199         yesno.c: Back out Copyright date changes for each file with no change
24200         this year.  This eases coordination with other programs using the same
24201         source code modules.  From Paul Eggert.
24202
24203 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24204
24205         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24206         not char, for compatibility with glibc 2.1.3 strftime.c.
24207
24208 2000-08-03  Greg McGary  <greg@mcgary.org>
24209
24210         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24211         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24212         (EXTEND_BUFFER): Use them.
24213
24214 2000-08-01  Jim Meyering  <meyering@lucent.com>
24215
24216         * lib/dirname.c (ISSLASH): Define.
24217         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24218         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24219         both `\' and `/' may be use as path separators.
24220         Based on a patch from Prashant TR.
24221
24222 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24223
24224         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24225         slot vector a constant, since it might get modified.
24226
24227 2000-07-31  Jim Meyering  <meyering@lucent.com>
24228
24229         * lib/xmalloc.c: Use `virtual memory exhausted', not
24230         `Memory exhausted'.
24231         * lib/obstack.c (print_and_abort): Likewise.
24232
24233 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24234
24235         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24236         buffer, so that the caller can always quote one small
24237         component of a "memory exhausted" message in slot 0.
24238         From a suggestion by Jim Meyering.
24239
24240 2000-07-30  Jim Meyering  <meyering@lucent.com>
24241
24242         * lib/makepath.c (make_path): Quote the other instance, too.
24243
24244         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24245         (STATIC_BUF_SIZE): Define.
24246         (quotearg_n_options): Use only statically allocated storage when
24247         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24248         than STATIC_BUF_SIZE.
24249
24250 2000-07-29  Jim Meyering  <meyering@lucent.com>
24251
24252         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24253         * lib/dirname.c (dir_name): Likewise.
24254
24255         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24256         `/'.
24257
24258         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24259         (dir_name): Assert that there are no trailing slashes.
24260
24261 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24262
24263         * lib/mbswidth.h (mbswidth): Add a flags argument.
24264         (mbswidth): New declaration.
24265         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24266         * lib/mbswidth.c (mbswidth): Add a flags argument.
24267         (mbsnwidth): New function.
24268
24269 2000-07-24  Jim Meyering  <meyering@lucent.com>
24270
24271         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24272
24273 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24274
24275         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24276
24277 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24278
24279         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24280         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24281         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24282         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24283         invoke multibyte primitives.
24284
24285 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24286
24287         * lib/quotearg.c:
24288         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24289         so that mbstate_t is always defined.
24290
24291         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24292         be 1 in at least one GCC installation, and this configuration
24293         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24294         performance on hosts that have mbrtowc but have only unibyte
24295         locales, but I assume these hosts are rare.
24296
24297 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24298
24299         * lib/mbswidth.c (_XOPEN_SOURCE):
24300         Don't define; this causes problems on Solaris 7.
24301         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24302
24303 2000-07-23  Jim Meyering  <meyering@lucent.com>
24304
24305         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24306         too: getgrgid, getpwuid, getuid.
24307
24308 2000-07-23  Jim Meyering  <meyering@lucent.com>
24309
24310         * lib/basename.c (base_name): Add an assertion.
24311
24312 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24313
24314         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24315         shadow its mbsinit function.
24316
24317 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24318
24319         * lib/mbswidth.h: New file.
24320         * lib/mbswidth.c: New file.
24321         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24322         (noinst_HEADERS): Add mbswidth.h.
24323
24324 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24325
24326         * lib/config.charset: Add support for FreeBSD. Improve support for
24327         HP-UX and IRIX 6.
24328
24329 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24330
24331         * m4/mbswidth.m4: New file.
24332         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24333
24334 2000-07-15  Jim Meyering  <meyering@lucent.com>
24335
24336         * lib/makepath.c: Include quote.h.
24337         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24338         corresponding argument in a `quote (...)' call.
24339         Give better diagnostics.
24340
24341         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24342         (noinst_HEADERS): Add quote.h.
24343
24344         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24345         from tar's src/misc.c.
24346         * lib/quote.h: New file.  Prototypes for same.
24347
24348 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24349
24350         From a suggestion by Bruno Haible.
24351         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24352         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24353         to decide whether to define the BeOS workaround macro;
24354         this adjusts to the change to AC_MBSTATE_T.
24355
24356 2000-07-14  Jim Meyering  <meyering@lucent.com>
24357
24358         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24359         jm_AC_TYPE_UINTMAX_T.
24360
24361 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24362
24363         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24364
24365         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24366         quotearg_buffer_restyled): Add support for
24367         clocale_quoting_style.  Undo previous change to
24368         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24369         and "{RIGHT QUOTATION MARK}" msgids.
24370
24371 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24372
24373         From a suggestion by Bruno Haible.
24374         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24375         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24376         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24377         and mbstate_t, to a single-part test that simply defines mbstate_t.
24378         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24379         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24380
24381 2000-07-10  Jim Meyering  <meyering@lucent.com>
24382
24383         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24384
24385         * m4/gnu-source.m4: Output to confdefs.h directly.
24386         Suggestion from Akim Demaille.
24387
24388 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24389
24390         The old behavior of quoting `like this' doesn't look good with
24391         newer, ISO-style fonts.  See:
24392         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24393
24394         Instead, quote "like this" by default.  Let the translator
24395         tailor the locale-specific quoting behavior by providing
24396         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24397
24398         * lib/quotearg.c (N_): New macro.
24399         (gettext_default): New function.
24400         (quotearg_buffer_restyled): Use
24401         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24402         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24403
24404 2000-07-09  Jim Meyering  <meyering@lucent.com>
24405
24406         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24407         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24408
24409         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24410         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24411
24412 2000-07-09  Jim Meyering  <meyering@lucent.com>
24413
24414         * lib/Most files: Update copyright dates to include 2000.
24415
24416 2000-07-08  Jim Meyering  <meyering@lucent.com>
24417
24418         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24419         if not defined.
24420         (xgethostname): Remove now-unnecessary #ifdef.
24421         Move declaration of `err' into loop where it's used.
24422
24423 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24424         and Bruno Haible  <haible@clisp.cons.org>
24425
24426         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24427         only if the test for an object-type mbstate_t fails.  This
24428         prevents us from mistakenly reporting that mbstate_t is a
24429         system object type after we "#define mbstate_t int" to work
24430         around its lack.
24431
24432 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24433         and Bruno Haible  <haible@clisp.cons.org>
24434
24435         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24436
24437 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24438
24439         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24440         to strerror_r.
24441         Include <ctype.h> for use of isalpha.
24442
24443 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24444
24445         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24446         by allocating a larger buffer. Test the gethostname return value for
24447         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24448         returns an error and ENAMETOOLONG isn't defined.
24449
24450 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24451
24452         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24453         dimension.
24454
24455 2000-07-04  Jim Meyering  <meyering@lucent.com>
24456
24457         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24458         of the deprecated AC_CHECKING.
24459
24460 2000-07-04  Jim Meyering  <meyering@lucent.com>
24461
24462         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24463         Reported by Bruno Haible.
24464
24465 2000-07-04  Jim Meyering  <meyering@lucent.com>
24466
24467         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24468         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24469         lacks mbrtowc.
24470
24471 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24472
24473         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24474         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24475
24476 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24477         and Bruno Haible  <haible@clisp.cons.org>
24478
24479         * lib/quotearg.c (mbrtowc):
24480         Assign to *pwc, and return 1 only if result is nonzero.
24481         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24482
24483 2000-07-03  Jim Meyering  <meyering@lucent.com>
24484
24485         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24486
24487 2000-07-03  Jim Meyering  <meyering@lucent.com>
24488
24489         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24490         This is necessary to get a definition of e.g., UTMP_FILE on
24491         HP-UX 10.20.
24492         From Bob Proulx.
24493
24494 2000-07-02  Jim Meyering  <meyering@lucent.com>
24495
24496         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24497
24498         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24499         AC_LIBOBJ(function_name).
24500         * m4/chown.m4: Likewise.
24501         * m4/fnmatch.m4: Likewise.
24502         * m4/ftruncate.m4: Likewise.
24503         * m4/getgroups.m4: Likewise.
24504         * m4/getline.m4: Likewise.
24505         * m4/group-member.m4: Likewise.
24506         * m4/jm-macros.m4: Likewise.
24507         * m4/lstat.m4: Likewise.
24508         * m4/malloc.m4: Likewise.
24509         * m4/memcmp.m4: Likewise.
24510         * m4/nanosleep.m4: Likewise.
24511         * m4/putenv.m4: Likewise.
24512         * m4/realloc.m4: Likewise.
24513         * m4/regex.m4: Likewise.
24514         * m4/stat.m4: Likewise.
24515         * m4/strftime.m4: Likewise.
24516
24517 2000-07-02  Jim Meyering  <meyering@lucent.com>
24518
24519         * lib/quotearg.c (mbstate_t): Don't define here.
24520
24521 2000-07-02  Jim Meyering  <meyering@lucent.com>
24522
24523         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24524
24525 2000-07-01  Jim Meyering  <meyering@lucent.com>
24526
24527         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24528
24529 2000-07-01  Jim Meyering  <meyering@lucent.com>
24530
24531         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24532         problem.
24533
24534 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24535
24536         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24537         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24538
24539 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24540
24541         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24542         per change in ../m4/ls-mntd-fs.m4.
24543         (read_filesystem_list): Ignore symbolic links.
24544
24545 2000-06-29  Jim Meyering  <meyering@lucent.com>
24546
24547         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24548         for declaration of strcmp.
24549
24550         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24551
24552         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24553         Avoid warning by casting result to `char *' to remove `const'.
24554
24555 2000-06-28  Jim Meyering  <meyering@lucent.com>
24556
24557         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24558         included by quotearg.c, for which we perform this test.  From
24559         Bruno Haible.
24560
24561 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24562
24563         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24564         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24565         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24566
24567 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24568
24569         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24570
24571 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24572
24573         savedir now sets errno on failure and invokes xmalloc to get memory.
24574         Fix a couple of other minor bugs while we're at it.
24575
24576         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24577         (NAMLEN): Remove macro.
24578         (malloc, realloc): Remove decls.
24579         (stpcpy): Likewise.
24580         ("xalloc.h"): Include.
24581         (NAME_SIZE_DEFAULT): New macro.
24582         (savedir): Use xmalloc / xrealloc to allocate memory.
24583         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24584         Skip "" directory entries.
24585         Use strlen to calculate directory entry length, since the old method
24586         is rarely used these days and isn't worth supporting.
24587         Don't use a pointer after freeing it.
24588         Check for integer overflow when calculating allocation size.
24589         Use memcpy to copy entries, instead of stpcpy.
24590         Set errno properly when returning NULL.
24591         Check for readdir error.
24592
24593 2000-06-26  Jim Meyering  <meyering@lucent.com>
24594
24595         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24596
24597 2000-06-25  Jim Meyering  <meyering@lucent.com>
24598
24599         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24600         Linux header bug when _XOPEN_SOURCE is defined to 500.
24601
24602 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24603
24604         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24605         deficiency.
24606
24607 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24608
24609         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24610         Include xalloc.h.
24611         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24612
24613 2000-06-24  Jim Meyering  <meyering@lucent.com>
24614
24615         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24616         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24617         for which strerror does return char*, but which lacks a conveniently
24618         accessible declaration of the function.  If the compile-test says
24619         strerror_r doesn't work, then resort to a `run'-test that works on
24620         BeOS and segfaults on DEC Unix.
24621
24622 2000-06-24  Jim Meyering  <meyering@lucent.com>
24623
24624         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24625
24626 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24627
24628         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24629         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24630
24631 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24632
24633         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24634         (mbrtowc, mbstate_t): Define substitutes if
24635         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24636         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24637         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24638
24639 2000-06-23  Jim Meyering  <meyering@lucent.com>
24640
24641         * m4/afs.m4: Add missing AC_MSG_RESULT.
24642         Reported by Bruno Haible.
24643
24644         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24645         Suggestion from Bruno Haible.
24646
24647 2000-06-23  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24650
24651 2000-06-21  Jim Meyering  <meyering@lucent.com>
24652
24653         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24654
24655 2000-06-21  Jim Meyering  <meyering@lucent.com>
24656
24657         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24658         (noinst_HEADERS): Add getstr.h.
24659
24660         * lib/getline.c (getstr): Move into a separate file.
24661         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24662         the following changes: new parameter, delim2; both delim[12]
24663         parameters have type `int', not `char'.  The latter would lose
24664         with 8-bit delimiters.
24665         * lib/getstr.h: New file.
24666
24667 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24668
24669         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24670         than 1024, return a memory chunk of least possible size, instead
24671         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24672         Use free/xmalloc instead of xrealloc to avoid copying for very long
24673         paths.
24674
24675 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24676
24677         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24678         the empty string.
24679
24680 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24681
24682         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24683         address, not strdup.  Include <stdlib.h> and don't declare free().
24684
24685 2000-06-19  Jim Meyering  <meyering@lucent.com>
24686
24687         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24688
24689 2000-06-18  Jim Meyering  <meyering@lucent.com>
24690
24691         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24692
24693         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24694         `checking whether...' message to be consistent with that of the
24695         lstat test.
24696
24697 2000-06-18  Jim Meyering  <meyering@lucent.com>
24698
24699         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24700         Besides, these days every porting target provides a mkdir function.
24701
24702         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24703         needed. (this snippet comes from src/system.h).
24704
24705 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24706
24707         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24708
24709 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24710
24711         * lib/human.c (adjust_value): New function.
24712         (human_readable_inexact): Apply rounding style even when
24713         printing approximate values.
24714
24715 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24716
24717         * lib/human.c (human_readable_inexact): Allow an input block
24718         size that is not a multiple of the output block size, and vice versa.
24719         Reported by Piergiorgio Sartor.
24720
24721 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24722
24723         * lib/getdate.y (get_date): Apply relative times after time
24724         zone indicator, not before.  Reported by Todd A. Jacobs.
24725
24726 2000-06-13  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24729
24730         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24731
24732 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24733
24734         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24735
24736 2000-06-12  Jim Meyering  <meyering@lucent.com>
24737
24738         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24739         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24740         optional argument.
24741         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24742         the optional argument, `lib'.
24743
24744 2000-06-08  Jim Meyering  <meyering@lucent.com>
24745
24746         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24747
24748 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24749
24750         Rewrite largefile configuration so that we don't need to run
24751         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24752         AC_CANONICAL_HOST in configure.in -- jmm]
24753
24754         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24755         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24756         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24757         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24758         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24759         All uses changed.
24760         Instead of inspecting the output of getconf, try to compile the
24761         test program without and with the macro definition.
24762         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24763         for getconf.  Instead, check for the needed flags by compiling
24764         test programs.
24765
24766 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24767
24768         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24769
24770 2000-06-04  Jim Meyering  <meyering@lucent.com>
24771
24772         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24773         SunOS 4.1.4 for which gid_t is an unsigned type.
24774
24775 2000-06-03  Jim Meyering  <meyering@lucent.com>
24776
24777         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24778         now that autoconf requires that.
24779
24780         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24781         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24782         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24783
24784 2000-06-03  Jim Meyering  <meyering@lucent.com>
24785
24786         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24787
24788 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24789
24790         * m4/glibc21.m4: New file.
24791         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24792
24793 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24794
24795         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24796         newer, don't install charset.alias.
24797         * lib/config.charset: Change the Linux/glibc rules so they become empty
24798         on glibc-2.1 or newer.
24799
24800 2000-06-02  Jim Meyering  <meyering@lucent.com>
24801
24802         * lib/mountlist.c: Back out last change.  Instead, do this...
24803         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24804         me_dummy member using the same `ignore'-testing code.
24805         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24806         fs_type strings.
24807         From Mark D. Roth.
24808
24809 2000-05-29  Jim Meyering  <meyering@lucent.com>
24810
24811         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24812         mounts with the `ignore' attribute.  Based on a patch from
24813         Mark D. Roth.
24814
24815 2000-05-28  Jim Meyering  <meyering@lucent.com>
24816
24817         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24818         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24819         * m4/stat.m4: Likewise.
24820         * m4/lstat.m4: Likewise.
24821         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24822
24823         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24824         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24825
24826 2000-05-26  Jim Meyering  <meyering@lucent.com>
24827
24828         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24829
24830 2000-05-24  Jim Meyering  <meyering@lucent.com>
24831
24832         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24833         autoconf requires that.
24834         * m4/lib-check.m4: Likewise.
24835         * m4/jm-macros.m4: Likewise.
24836         * m4/strftime.m4: Likewise.
24837
24838         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24839         AC_CHECK_DECLS, now that autoconf requires that.
24840
24841 2000-05-22  Jim Meyering  <meyering@lucent.com>
24842
24843         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24844         * m4/lstat.m4: Likewise.
24845
24846 2000-05-22  Jim Meyering  <meyering@lucent.com>
24847
24848         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24849
24850 2000-05-20  Jim Meyering  <meyering@lucent.com>
24851
24852         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24853         (jm_PREREQ): Use it.
24854
24855 2000-05-18  Jim Meyering  <meyering@lucent.com>
24856
24857         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24858         back, too, since it may have been modified by allocate_entry.
24859         (hash_delete): Rewrite to use neither the assignment operator
24860         nor the comma operator in an if-expression.
24861
24862 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24863
24864         * lib/closeout.c:
24865         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24866         Remove; no longer needed.
24867         "quotearg.h": Add include.
24868         (file_name): Do not bother to explicitly initialize to NULL; it's less
24869         efficient on some hosts.
24870         (close_stdout_status): Remove test as to whether stdout was already
24871         closed; it breaks for the case "echo x | sort >&-".
24872         Quote file name colons.
24873         Do not assume that _("write error") lacks format strings.
24874
24875 2000-05-15  Jim Meyering  <meyering@lucent.com>
24876
24877         * lib/version-etc.c (version_etc_copyright): Update the copyright
24878         string used in all --version output.
24879
24880 2000-05-14  Jim Meyering  <meyering@lucent.com>
24881
24882         * lib/closeout.c (close_stdout_set_file_name): New function.
24883         (close_stdout_status): Use new file-scoped global.
24884         Return right away if fstat says the stdout file descriptor is invalid.
24885         * lib/closeout.h (close_stdout_set_file_name): Declare.
24886
24887 2000-05-10  Jim Meyering  <meyering@lucent.com>
24888
24889         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24890         (close_stdout_set_status): New function.
24891         * lib/closeout.h (close_stdout_set_status): Declare.
24892
24893 2000-05-09  Jim Meyering  <meyering@lucent.com>
24894
24895         * m4/gettext.m4: Rename this...
24896         * m4/libintl.m4: ...to this.
24897
24898 2000-05-08  Jim Meyering  <meyering@lucent.com>
24899
24900         * lib/long-options.c: Don't include closeout.h.
24901         (parse_long_options): Don't call close_stdout for --version.
24902
24903 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24904
24905         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24906         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24907         2.1.3 bug.  This avoids a clash when files like regex.c define
24908         _GNU_SOURCE.
24909
24910 2000-05-06  Jim Meyering  <meyering@lucent.com>
24911
24912         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
24913         (AC_REPLACE_FUNCS): Add strnlen.
24914
24915         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
24916         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
24917
24918         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
24919         AC_SEARCH_LIBS call for nanosleep.
24920         (LIB_NANOSLEEP): Set and AC_SUBST.
24921
24922 2000-05-06  Jim Meyering  <meyering@lucent.com>
24923
24924         * lib/strnlen.c: Undefine __strnlen and strnlen.
24925         [!weak_alias]: Define __strnlen to strnlen.
24926
24927         * lib/atexit.c: New file, from libiberty.
24928
24929 2000-05-06  Jim Meyering  <meyering@lucent.com>
24930
24931         * lib/closeout.c (close_stdout_status): Also check for errors on the
24932         stderr stream.
24933
24934 2000-05-05  Jim Meyering  <meyering@lucent.com>
24935
24936         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
24937         AC_SEARCH_LIBS call for clock_gettime.
24938         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
24939
24940         * m4/search-libs.m4: Update from autoconf.
24941
24942         su doesn't work on Solaris 2.6.
24943         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
24944         <shadow.h>.  Reported by Dragos Harabor.
24945
24946 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
24947
24948         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
24949         memcpy instead of xmalloc, xrealloc, path_concat.
24950         (locale_charset): Treat empty environment variables as absent.
24951         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
24952
24953 2000-05-04  Jim Meyering  <meyering@lucent.com>
24954
24955         * lib/getopt.c: Update from glibc.
24956         * lib/obstack.c: Likewise.
24957         * lib/obstack.h: Likewise.
24958         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
24959         file
24960
24961         * lib/regex.h: Likewise.
24962         * lib/strndup.c: Likewise.
24963         * lib/strnlen.c: New file, from glibc.
24964
24965 2000-05-03  Jim Meyering  <meyering@lucent.com>
24966
24967         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
24968
24969 2000-05-02  Paul Eggert  <eggert@twinsun.com>
24970
24971         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
24972         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
24973         compile-time test, rather than inspecting host and OS, to
24974         decide whether to define _LARGEFILE_SOURCE.
24975
24976 2000-05-01  Jim Meyering  <meyering@lucent.com>
24977
24978         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
24979
24980         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
24981         Based on a patch from Bruno Haible.
24982
24983 2000-05-01  Jim Meyering  <meyering@lucent.com>
24984
24985         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
24986
24987 2000-04-29  Jim Meyering  <meyering@lucent.com>
24988
24989         * lib/path-concat.c: Declare strdup only if it's not defined.
24990         * lib/canon-host.c: Likewise.
24991
24992 2000-04-28  Jim Meyering  <meyering@lucent.com>
24993
24994         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
24995         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
24996         is included first, then limits.h is included by locale.h by libintl.h.
24997         From John David Anglin.
24998
24999 2000-04-25  Jim Meyering  <meyering@lucent.com>
25000
25001         * lib/makepath.c (S_IRWXUGO): Define.
25002         (make_path): Always perform explicit chmod if MODE specifies any
25003         of the `special' permission bits.  Prompted by a bug report against
25004         install from Mate Wierdl and Joost van Baal.
25005
25006 2000-04-18  Jim Meyering  <meyering@lucent.com>
25007
25008         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25009         (jm_PREREQ): Use it.
25010
25011 2000-04-18  Jim Meyering  <meyering@lucent.com>
25012
25013         * lib/README: New file.
25014
25015         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25016         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25017
25018 2000-04-17  Jim Meyering  <meyering@lucent.com>
25019
25020         Get it right :-)
25021         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25022         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25023         Suggestion from Akim Demaille.
25024
25025 2000-04-17  Jim Meyering  <meyering@lucent.com>
25026
25027         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25028         the definition of it to rpl_strftime also defined-away the system's
25029         declaration.
25030
25031 2000-04-15  Jim Meyering  <meyering@lucent.com>
25032
25033         Use `C' to denote so-called `contiguous' files, the same way
25034         that tar does.
25035         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25036         (ftypelet): Use S_ISCTG.
25037         From Michael Deutschmann.
25038
25039 2000-04-14  Jim Meyering  <meyering@lucent.com>
25040
25041         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25042         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25043         clobbered.
25044
25045 2000-04-14  Jim Meyering  <meyering@lucent.com>
25046
25047         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25048
25049 2000-04-13  Jim Meyering  <meyering@lucent.com>
25050
25051         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25052         AH_VERBATIM to insert required #ifndef into config.h.in.
25053         Suggestion from Akim Demaille.
25054
25055 2000-04-12  Jim Meyering  <meyering@lucent.com>
25056
25057         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25058         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25059         Christian Krackowizer.
25060
25061         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25062         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25063         (AC_SYS_LARGEFILE): Require.
25064         (AM_C_PROTOTYPES): Require.
25065
25066 2000-04-08  Jim Meyering  <meyering@lucent.com>
25067
25068         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25069         names don't conflict.  Reported by Eli Zaretskii.
25070
25071 2000-04-07  Jim Meyering  <meyering@lucent.com>
25072
25073         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25074         sys/types.h, to work around system header problems on AIX 3.2.5.
25075         From Bruno Haible.
25076
25077 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25078
25079         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25080         bug.  Deal with the different error behavior of Irix iconv.
25081
25082 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25083
25084         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25085         IRIX if the installer said otherwise.
25086
25087 2000-04-05  Jim Meyering  <meyering@lucent.com>
25088
25089         Portability tweaks required for ultrix4.3.
25090         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25091         (jm_CHECK_DECLS): Add getutent to the list of functions.
25092         (_jm_DECL_HEADERS): Add utmpx.h.
25093         From John David Anglin.
25094
25095         * m4/strftime.m4: Back out the 2000-04-02 change.
25096         Instead of that change, simply undefine putenv in the test program.
25097
25098 2000-04-05  Jim Meyering  <meyering@lucent.com>
25099
25100         Portability tweaks required for ultrix4.3.
25101         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25102         getutent.
25103         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25104         * lib/canon-host.c: Declare strdup.
25105         * lib/path-concat.c: Likewise.
25106         From John David Anglin.
25107
25108 2000-04-04  Jim Meyering  <meyering@lucent.com>
25109
25110         Be more DOS 8.3-friendly.
25111         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25112         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25113         * lib/Makefile.am: Reflect renaming.
25114         Reported by Eli Zaretskii.
25115
25116         Use a temporary file name that won't clash with `charset.alias'
25117         in the DOS 8.3 name space.
25118         * lib/Makefile.am (charset_tmp): Define.
25119         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25120         (uninstall-local): Likewise.
25121         Reported by Eli Zaretskii.
25122
25123 2000-04-03  Jim Meyering  <meyering@lucent.com>
25124
25125         * m4/gettext.m4: Fix typo in comment.
25126
25127         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25128         textutils/configure.in).  Suggestion from Paul Eggert.
25129         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25130
25131 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25132
25133         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25134         variable in the shell rather than using putenv, which isn't
25135         portable.  This avoids the configure-time inter-test dependency
25136         on the potentially-renamed putenv function.
25137
25138 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25139
25140         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25141         before checking struct stat.st_blksize, so that
25142         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25143
25144 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25145
25146         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25147         since strftime.c uses HAVE_STRFTIME to decide whether to use
25148         the underlying strftime.
25149
25150 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25151
25152         * lib/time/strftime.c (my_strftime): Make sure we call the system
25153         strftime, not ourselves, when invoking the underlying strftime.
25154
25155 2000-03-24  Jim Meyering  <meyering@lucent.com>
25156
25157         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25158         (charset_alias): Define.
25159         (install-exec-local): Factor out common code.
25160         (uninstall-local): Split lines longer than 80.
25161         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25162         (SUFFIXES): Define.
25163         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25164         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25165
25166 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25167
25168         * lib/config.charset: Output a line containing "Packages using this
25169         file".
25170         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25171         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25172         ref-del.sed): New rules.
25173
25174 2000-03-17  Jim Meyering  <meyering@lucent.com>
25175
25176         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25177         Otherwise, include <strings.h>
25178
25179 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25180
25181         * lib/unicodeio.c (utf8_wctomb): New function.
25182         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25183         format instead of in UCS-4 with platform dependent endianness.
25184
25185 2000-03-10  Jim Meyering  <meyering@lucent.com>
25186
25187         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25188         From Marco Franzen.
25189
25190 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25191
25192         * lib/savedir.c (savedir): Work even if directory size is
25193         negative; this can happen with some screwy NFS configurations.
25194
25195 2000-03-06  Jim Meyering  <meyering@lucent.com>
25196
25197         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25198         if it's NULL (because we ran out of memory).  From Bruno Haible.
25199
25200 2000-03-05  Jim Meyering  <meyering@lucent.com>
25201
25202         * lib/localcharset.c ("path-concat.h"): Include.
25203         (get_charset_aliases): Use path_concat instead of ANSI string
25204         concatenation.
25205
25206         * lib/unicodeio.h (PARAMS): Define.
25207         Use it to guard prototype.
25208
25209 2000-03-04  Jim Meyering  <meyering@lucent.com>
25210
25211         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25212         for lib/localcharset.c.
25213
25214 2000-03-04  Jim Meyering  <meyering@lucent.com>
25215
25216         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25217         installing into it.
25218         (uninstall-local): Uncomment this rule so `make distcheck' works
25219         once again.
25220
25221         * lib/unicodeio.c (<errno.h>): Include it.
25222         (errno): Declare if not defined.
25223
25224         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25225
25226         * lib/config.charset: New version, incorporating remarks from a linux
25227         i18n mailing list.  From Bruno Haible.
25228
25229 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25230
25231         * m4/codeset.m4: New file.
25232         * m4/iconv.m4: New file.
25233         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25234
25235 2000-03-03  Jim Meyering  <meyering@lucent.com>
25236
25237         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25238
25239 2000-03-02  Jim Meyering  <meyering@lucent.com>
25240
25241         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25242         the messages come out on separate lines.
25243
25244         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25245         rather than jm_CHECK_DECLARATIONS.
25246         * m4/decl.m4: Remove now-unused file.
25247
25248         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25249         geteuid.
25250
25251 2000-03-02  Jim Meyering  <meyering@lucent.com>
25252
25253         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25254
25255 2000-03-01  Jim Meyering  <meyering@lucent.com>
25256
25257         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25258         * lib/unicodeio.c: Likewise.
25259
25260 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25261
25262         * lib/config.charset: New file.
25263         * lib/localcharset.c: New file.
25264         * lib/unicodeio.h, lib/unicodeio.c: New files.
25265         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25266         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25267         (noinst_HEADERS): Add unicodeio.h.
25268         (all-local, install-exec-local, charset.alias): New targets.
25269
25270 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25271
25272         * lib/quotearg.c (ALERT_CHAR): New macro.
25273         (quotearg_buffer_restyled): Use it.
25274
25275 2000-02-27  Jim Meyering  <meyering@lucent.com>
25276
25277         * m4/check-decl.m4: Add getenv to the list.
25278
25279 2000-02-27  Jim Meyering  <meyering@lucent.com>
25280
25281         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25282         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25283
25284         * lib/backupfile.c: Guard inclusion of stdlib.h with
25285         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25286         Declare malloc if needed.
25287
25288         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25289         `#ifndef HAVE_DECL..'
25290         now that autoconf always defines the HAVE_DECL_ symbols.
25291         * lib/human.c: Likewise.
25292         * lib/same.c: Likewise.
25293         * lib/strtoumax.c: Likewise.
25294
25295         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25296         declaration check was not run.
25297         * lib/hash.c: Likewise.
25298         * lib/human.c: Likewise.
25299         * lib/same.c: Likewise.
25300         * lib/strtoumax.c: Likewise.
25301
25302         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25303         `.', then first look up the entire `.'-containing string as a login
25304         name.
25305
25306 2000-02-23  Jim Meyering  <meyering@lucent.com>
25307
25308         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25309         in place of my hack.
25310
25311 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25312
25313         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25314         (textint): New typedef.
25315         (parser_control): Member year changed from int to textint.
25316         All uses changed.
25317         (YYSTYPE): Removed; replaced by %union with int and textint members.
25318         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25319         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25320         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25321         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25322         (date, number, to_year): Use width of number in digits, not its value,
25323         to determine whether it's a 2-digit year, or a 2-digit time.
25324         (yylex): Store number of digits of numeric tokens.
25325         Reported by John Kendall.
25326
25327         (parser_control): Changed from struct parser_control to typedef (for
25328         consistency).  All uses changed.
25329
25330         (tID): Removed; not used.
25331         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25332
25333 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25334
25335         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25336         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25337
25338 2000-02-12  Jim Meyering  <meyering@lucent.com>
25339
25340         * lib/userspec.c (ISDIGIT): Define it.
25341         (isdigit): Remove definition.
25342         (is_number): Use ISDIGIT, not isdigit.
25343         <libintl.h>: Include.
25344         (_ and N_): Define.
25345         (parse_user_spec): Mark translatable strings.
25346
25347 2000-02-10  Jim Meyering  <meyering@lucent.com>
25348
25349         With these changes, nanosleep.[ch] are finally enough like the other
25350         lib/* replacement files to compile on a few more losing systems.
25351
25352         * lib/nanosleep.h: Don't include config.h.
25353         Remove prototype from declaration of nanosleep.
25354         (PARAMS): Remove now-unneeded definition.
25355         * lib/nanosleep.c: #undef nanosleep.
25356         (rpl_nanosleep): Rename from nanosleep.
25357
25358 2000-02-10  Jim Meyering  <meyering@lucent.com>
25359
25360         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25361         gnu_nanosleep to rpl_nanosleep.
25362
25363 2000-02-09  Jim Meyering  <meyering@lucent.com>
25364
25365         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25366         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25367
25368 2000-02-08  Akim Demaille  <akim@epita.fr>
25369
25370         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25371         `[' and `]' and remove uses of `changequote'.
25372         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25373         (AC_SYS_LARGEFILE): Likewise.
25374         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25375         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25376         of changequote.
25377         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25378         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25379         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25380         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25381
25382 2000-02-05  Jim Meyering  <meyering@lucent.com>
25383
25384         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25385         Remove explicit use of AC_HEADER_TIME.  It is required by
25386         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25387         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25388         in autoconf whereby the expansion of the latter ended up preceding
25389         the expansion of its prerequisite, AC_HEADER_TIME.
25390         Reported by Volker Borchert.
25391
25392 2000-02-03  Jim Meyering  <meyering@lucent.com>
25393
25394         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25395
25396 2000-02-03  Jim Meyering  <meyering@lucent.com>
25397
25398         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25399         rather than with `#if HAVE_UTMPNAME'.
25400
25401 2000-02-02  Jim Meyering  <meyering@lucent.com>
25402
25403         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25404         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25405         Reported by Eli Zaretskii.
25406
25407 2000-02-01  Jim Meyering  <meyering@lucent.com>
25408
25409         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25410
25411 2000-01-31  Jim Meyering  <meyering@lucent.com>
25412
25413         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25414         functions.  Add the time.h and sys/time.h headers along with the
25415         AC_REQUIRE'ment of AC_HEADER_TIME.
25416
25417 2000-01-31  Jim Meyering  <meyering@lucent.com>
25418
25419         * lib/nanosleep.h (nanosleep): Guard declaration with
25420         `#if ! HAVE_DECL_NANOSLEEP'.
25421         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25422         the declaration in that vendor's sys/timers.h.
25423         Reported by Christian Krackowizer.
25424
25425         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25426         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25427         (ISPRINT): Likewise.
25428         Reported by Tom Tromey.
25429
25430 2000-01-30  Jim Meyering  <meyering@lucent.com>
25431
25432         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25433
25434         * m4/prereq.m4 (utmp_includes): Define.
25435         Check for ut_user and ut_name members in both struct utmpx
25436         and struct utmp.
25437
25438 2000-01-30  Jim Meyering  <meyering@lucent.com>
25439
25440         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25441         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25442         header files where only utmpx.ut_user is declared.
25443
25444         * lib/readutmp.h (UT_USER): Define.
25445
25446 2000-01-29  Jim Meyering  <meyering@lucent.com>
25447
25448         * m4/lib-check.m4: New file containing library-related checks from
25449         fileutils and sh-utils (textutils had none).
25450
25451 2000-01-28  Jim Meyering  <meyering@lucent.com>
25452
25453         * m4/perl.m4: Change format of warning message to look more like that
25454         from the missing script.  Suggestion from François Pinard.
25455
25456 2000-01-25  Jim Meyering  <meyering@lucent.com>
25457
25458         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25459         well as time.h in the compile check.
25460         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25461         Fix typo in cross-compiling case: s/yes/no/.
25462
25463 2000-01-23  Jim Meyering  <meyering@lucent.com>
25464
25465         * m4/jm-macros.m4: Move df-related tests here from
25466         fileutils/configure.in
25467
25468         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25469         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25470
25471         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25472         s/space/ac_fsusage_space/.
25473         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25474
25475         * m4/ftruncate.m4: New file (derived from part of
25476         fileutils/configure.in).
25477         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25478         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25479
25480         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25481         AC_SUBST these here, rather than just in sh-util/configure.in, so
25482         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25483         all the same.
25484         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25485         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25486         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25487         (AC_SUBST(POW_LIBM)): Likewise.
25488         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25489
25490 2000-01-23  Jim Meyering  <meyering@lucent.com>
25491
25492         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25493         obstack.c.
25494
25495 2000-01-22  Jim Meyering  <meyering@lucent.com>
25496
25497         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25498
25499         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25500
25501         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25502         configure.in
25503         (AC_CHECK_HEADERS): Likewise for sh-utils.
25504         (AC_CHECK_HEADERS): Likewise for textutils.
25505         Merge the three lists of headers.
25506
25507         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25508         from fileutils' configure.in.
25509
25510         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25511         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25512         check-decl.m4.
25513
25514         * m4/check-decl.m4: Use #if rather than #ifdef.
25515         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25516         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25517         (_jm_DECL_HEADERS): Define new function.
25518         (jm_CHECK_DECLARATIONS): Require it.
25519
25520 2000-01-22  Jim Meyering  <meyering@lucent.com>
25521
25522         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25523         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25524         Required for some AIX systems.  Reported by Christian Krackowizer.
25525         [TESTING] (main): New function.
25526
25527         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25528         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25529         letters.
25530
25531         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25532         iswprint.
25533
25534         * lib/strverscmp.c (ISDIGIT): Define.
25535         (strverscmp): Use ISDIGIT, not isdigit.
25536
25537 2000-01-19  Jim Meyering  <meyering@lucent.com>
25538
25539         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25540         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25541         defines `struct timespec' in <sys/time.h>
25542
25543         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25544         Thanks to Akim for explaining.
25545
25546 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25547
25548         * lib/nanosleep.c (nanosleep):
25549         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25550         POSIX.1 doesn't require SA_INTERRUPT and some systems
25551         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25552         it's been part of POSIX.1 since day 1 (in 1988).
25553
25554 2000-01-17  Jim Meyering  <meyering@lucent.com>
25555
25556         * lib/interlock: Remove unused file.  Reported by François Pinard.
25557
25558 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25559
25560         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25561         alert, backslash, formfeed, and vertical tab unnecessarily in
25562         shell quoting style.
25563
25564 2000-01-16  Jim Meyering  <meyering@lucent.com>
25565
25566         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25567         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25568         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25569         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25570
25571 2000-01-16  Jim Meyering  <meyering@lucent.com>
25572
25573         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25574         because the latter didn't work.
25575
25576 2000-01-15  Jim Meyering  <meyering@lucent.com>
25577
25578         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25579         (AC_REPLACE_FUNCS): Add memcpy and memset.
25580         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25581         Add strpbrk.
25582         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25583
25584 2000-01-12  Jim Meyering  <meyering@lucent.com>
25585
25586         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25587         (jm_PREREQ): Use it.
25588         (jm_PREREQ_READUTMP): New macro.
25589         (jm_PREREQ): Use it.
25590
25591 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25592
25593         Quote multibyte characters correctly.
25594         * m4/c-bs-a.m4: New file.
25595         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25596         (jm_PREREQ): Use it.
25597
25598 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25599
25600         * m4/uintmax_t.m4: Port to autoconf 2.13.
25601
25602 2000-01-08  Jim Meyering  <meyering@ascend.com>
25603
25604         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25605         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25606
25607 2000-01-04  Jim Meyering  <meyering@ascend.com>
25608
25609         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25610         jm_STRUCT_DIRENT_D_TYPE.
25611         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25612         jm_STRUCT_DIRENT_D_INO.
25613         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25614         jm_STRUCT_UTIMBUF.
25615         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25616         renamings.
25617         * m4/utime.m4: Likewise.
25618
25619         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25620         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25621
25622 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25623
25624         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25625         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25626
25627 2000-01-02  Jim Meyering  <meyering@ascend.com>
25628
25629         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25630         remember if this is necessary.
25631
25632 1999-12-26  Jim Meyering  <meyering@ascend.com>
25633
25634         * m4/jm-macros.m4: Use it here.
25635         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25636
25637 1999-12-23  Jim Meyering  <meyering@ascend.com>
25638
25639         * m4/jm-macros.m4: Check for clock_gettime (moved from
25640         fileutils/configure.in)
25641         Check for gettimeofday.
25642
25643 1999-12-20  Jim Meyering  <meyering@ascend.com>
25644
25645         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25646         autoconf-2.14a-1999-12-20.
25647
25648 1999-12-19  Jim Meyering  <meyering@ascend.com>
25649
25650         * m4/lstat-slash.m4: New file.
25651         * m4/jm-macros.m4: Use the new macro:
25652         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25653
25654 1999-12-07  Jim Meyering  <meyering@ascend.com>
25655
25656         * m4/perl.m4: Require that File::Compare be available, too.
25657         Too many systems seem to lack it.
25658
25659         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25660         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25661
25662 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25663
25664         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25665         problem with the QNX 4.25 shell, which doesn't propagate exit
25666         status of failed commands inside shell assignments.
25667
25668 1999-11-17  Jim Meyering  <meyering@ascend.com>
25669
25670         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25671
25672 1999-11-07  Jim Meyering  <meyering@ascend.com>
25673
25674         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25675
25676 1999-11-06  Jim Meyering  <meyering@ascend.com>
25677
25678         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25679         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25680
25681 1999-11-05  Jim Meyering  <meyering@ascend.com>
25682
25683         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25684         configure.in of textutils, fileutils, and sh-utils into this one
25685         (shared between those packages) file.
25686         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25687         AC_STRUCT_ST_BLKSIZE.
25688
25689 1999-11-03  Jim Meyering  <meyering@ascend.com>
25690
25691         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25692         of AC_CHECK_TYPE checks includes unistd.h.
25693         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25694         Suggestion from Akim Demaille.
25695
25696 1999-10-30  Jim Meyering  <meyering@ascend.com>
25697
25698         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25699         m4-quoted string.
25700         * m4/ls-mntd-fs.m4: Likewise.
25701         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25702         * m4/jm-winsz1.m4: Likewise.
25703
25704         * m4/const.m4: Remove file, since the fix made it into the experimental
25705         version of autoconf.
25706         * m4/mktime.m4: Likewise.
25707
25708         * m4/check-type.m4: Remove file, now that the latest version of
25709         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25710
25711         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25712         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25713         AC_CHECK_TYPE.
25714
25715 1999-10-04  Jim Meyering  <meyering@ascend.com>
25716
25717         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25718
25719 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25720
25721         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25722         2.95.1 bug with HP-UX 10.20.
25723
25724 1999-09-17  Jim Meyering  <meyering@ascend.com>
25725
25726         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25727         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25728         due to missing strdup (against sh-utils-2.0).
25729
25730 1999-08-29  Jim Meyering  <meyering@ascend.com>
25731
25732         * m4/jm-macros.m4: Require jm_BISON.
25733         * m4/bison.m4: New file.
25734
25735 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25736
25737         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25738         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25739
25740 1999-08-05  Jim Meyering  <meyering@ascend.com>
25741
25742         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25743         to avoid conflicts with `conftest' on 8+3 filesystems.
25744         Suggestion from Eli Zaretskii.
25745
25746 1999-08-04  Jim Meyering  <meyering@ascend.com>
25747
25748         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25749         fileutils and sh-utils (textutils's getline test was inadequate).
25750         (AM_FUNC_GETLINE): Run this test.
25751         (AC_CHECK_FUNCS): Check for getdelim.
25752         Reported by Bob Proulx.
25753
25754 1999-08-02  Jim Meyering  <meyering@ascend.com>
25755
25756         * m4/jm-macros.m4: Add a comment.
25757
25758 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25759
25760         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25761         <inttypes.h> defines strtoumax as a macro (and not as a
25762         function).
25763
25764 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25765
25766         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25767         that we can shift, multiply and divide unsigned long long
25768         values; Ultrix cc can't do it.
25769
25770 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25771
25772         * m4/mktime.m4: New file, which is a preview of what should appear
25773         in the next public autoconf release.
25774
25775 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25776
25777         * m4/lfs.m4: Remove this file.
25778         * m4/largefile.m4: New file.  It contains the old contents of
25779         lfs.m4, except that all names with prefix AC_LFS have been
25780         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25781         compatible with future autoconf versions.  Also, some minor m4
25782         quoting problems have been fixed.
25783
25784 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25785
25786         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25787         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25788         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25789         and simplify the shell code.
25790
25791 1999-08-01  Jim Meyering  <meyering@ascend.com>
25792
25793         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25794         m4.
25795
25796 1999-07-20  Jim Meyering  <meyering@ascend.com>
25797
25798         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25799
25800 1999-07-15  Jim Meyering  <meyering@ascend.com>
25801
25802         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25803
25804 1999-05-22  Jim Meyering  <meyering@ascend.com>
25805
25806         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25807
25808 1999-05-20  Jim Meyering  <meyering@ascend.com>
25809
25810         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25811         Add a colon after each `then' in case $4 is empty.
25812
25813 1999-05-16  Jim Meyering  <meyering@ascend.com>
25814
25815         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25816
25817 1999-05-10  Jim Meyering  <meyering@ascend.com>
25818
25819         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25820
25821         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25822         AC_FUNC_MKTIME.
25823
25824 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25825
25826         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25827
25828 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25829
25830         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25831         not CPPFLAGS, so that linking works correctly in IRIX.
25832
25833 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25834
25835         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25836
25837 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25838
25839         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25840         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25841         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25842         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25843         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25844
25845         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25846
25847 1999-04-20  Jim Meyering  <meyering@ascend.com>
25848
25849         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25850         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25851         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25852
25853 1999-04-18  Jim Meyering  <meyering@ascend.com>
25854
25855         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25856         * m4/jm-macros.m4: Use it.
25857
25858 1999-04-06  Jim Meyering  <meyering@ascend.com>
25859
25860         * m4/strftime.m4: Remove test for %f.
25861
25862 1999-03-29  Jim Meyering  <meyering@ascend.com>
25863
25864         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25865         superset of the AC_TYPE_* checks in the textutils, fileutils,
25866         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25867         AC_TYPE_PID_T.
25868
25869 1999-03-28  Jim Meyering  <meyering@ascend.com>
25870
25871         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25872         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25873         replaced e.g., in the *.sh files of the sh-utils.
25874
25875 1999-03-20  Jim Meyering  <meyering@ascend.com>
25876
25877         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25878         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25879         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25880
25881 1999-03-19  Jim Meyering  <meyering@ascend.com>
25882
25883         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25884
25885 1999-03-12  Jim Meyering  <meyering@ascend.com>
25886
25887         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25888
25889 1999-03-07  Jim Meyering  <meyering@ascend.com>
25890
25891         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25892         declared.
25893
25894 1999-02-17  Jim Meyering  <meyering@ascend.com>
25895
25896         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25897         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25898
25899 1999-02-07  Jim Meyering  <meyering@ascend.com>
25900
25901         * m4/group-member.m4: New file -- extracted from sh-utils'
25902         configure.in.
25903
25904         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25905         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25906
25907 1999-02-06  Jim Meyering  <meyering@ascend.com>
25908
25909         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
25910         * m4/fnmatch.m4: Likewise.
25911         * m4/getgroups.m4: Likewise.
25912         * m4/lstat.m4: Likewise.
25913         * m4/malloc.m4: Likewise.
25914         * m4/putenv.m4: Likewise.
25915         * m4/realloc.m4: Likewise.
25916         * m4/regex.m4: Likewise.
25917         * m4/stat.m4: Likewise.
25918         * m4/strftime.m4: Likewise.
25919         Suggestion from Alain Magloire.
25920
25921         * m4/chown.m4: Use `.$ac_objext', not `.o'.
25922         * m4/fnmatch.m4: Likewise.
25923         * m4/getgroups.m4: Likewise.
25924         * m4/getline.m4: Likewise.
25925         * m4/lstat.m4: Likewise.
25926         * m4/malloc.m4: Likewise.
25927         * m4/memcmp.m4: Likewise.
25928         * m4/putenv.m4: Likewise.
25929         * m4/realloc.m4: Likewise.
25930         * m4/regex.m4: Likewise.
25931         * m4/stat.m4: Likewise.
25932         * m4/strftime.m4: Likewise.
25933         Suggestion from Alain Magloire.
25934
25935         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
25936         an argument.
25937
25938         * m4/regex.m4: Add a run-time Test for proper operation of
25939         re_compile_pattern.
25940
25941 1999-01-31  Jim Meyering  <meyering@ascend.com>
25942
25943         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
25944
25945 1999-01-30  Jim Meyering  <meyering@ascend.com>
25946
25947         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
25948
25949         * m4/jm-mktime.m4: Make this a wrapper around the official
25950         AM_FUNC_MKTIME rather than my private copy, now that the official one
25951         is up to date.
25952         * m4/mktime.m4: Remove file.
25953
25954         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
25955         * m4/uptime.m4: Likewise.
25956         * m4/uintmax_t.m4: Likewise.
25957
25958 1999-01-28  Jim Meyering  <meyering@ascend.com>
25959
25960         * m4/jm-macros.m4: Use jm_AFS.
25961         * m4/afs.m4: New file (from fileutils' configure.in).
25962
25963         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
25964         * m4/chown.m4: Likewise.
25965         * m4/d-ino.m4: Likewise.
25966         * m4/d-type.m4: Likewise.
25967         * m4/fnmatch.m4: Likewise.
25968         * m4/getgroups.m4: Likewise.
25969         * m4/gettext.m4: Likewise.
25970         * m4/jm-mktime.m4: Likewise.
25971         * m4/jm-winsz2.m4: Likewise.
25972         * m4/lcmessage.m4: Likewise.
25973         * m4/ls-mntd-fs.m4: Likewise.
25974         * m4/malloc.m4: Likewise.
25975         * m4/memcmp.m4: Likewise.
25976         * m4/putenv.m4: Likewise.
25977         * m4/realloc.m4: Likewise.
25978         * m4/st_mtim.m4: Likewise.
25979         * m4/strftime.m4: Likewise.
25980
25981 1999-01-16  Jim Meyering  <meyering@ascend.com>
25982
25983         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
25984         (ARGMATCH_DIE_DECL): Define.
25985
25986 1999-01-12  Jim Meyering  <meyering@ascend.com>
25987
25988         * m4/Makefile.am.in: Rewrite to avoid using fmt.
25989         Reported by Lars Hecking.
25990
25991 1999-01-10  Jim Meyering  <meyering@ascend.com>
25992
25993         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
25994         gross kludge.
25995         * m4/inttypes_h.m4: Likewise.
25996         * m4/lstat.m4: Likewise.
25997         * m4/malloc.m4: Likewise.
25998         * m4/readdir.m4: Likewise.
25999         * m4/realloc.m4: Likewise.
26000         * m4/st_dm_mode.m4: Likewise.
26001         * m4/stat.m4: Likewise.
26002         * m4/utimbuf.m4: Likewise.
26003         * m4/utimes.m4: Likewise.
26004
26005         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26006         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26007         comments in config.h.in are meaningful.
26008
26009         * m4/jm-macros.m4: Require autoconf-2.13 here.
26010
26011         * m4/regex.m4: By default, don't use the included regex.c on systems
26012         with glibc 2.  Suggestion from Uli Drepper.
26013
26014 1999-01-02  Jim Meyering  <meyering@ascend.com>
26015
26016         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26017
26018 1998-12-18  Jim Meyering  <meyering@ascend.com>
26019
26020         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26021         Based on a suggestion from Lars Hecking.
26022
26023 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26024
26025         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26026
26027 1998-11-16  Jim Meyering  <meyering@ascend.com>
26028
26029         * m4/lfs.m4: Double-quote the `uname...` expression.
26030
26031 1998-11-14  Jim Meyering  <meyering@ascend.com>
26032
26033         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26034         * m4/stat.m4: Likewise.
26035
26036 1998-11-03  Jim Meyering  <meyering@ascend.com>
26037
26038         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26039         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26040
26041 1998-10-18  Jim Meyering  <meyering@ascend.com>
26042
26043         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26044
26045 1998-10-17  Jim Meyering  <meyering@ascend.com>
26046
26047         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26048         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26049         calls for those previously hard-coded headers.  Instead, take a new
26050         parameter.
26051         (jm_CHECK_DECLARATIONS): Reflect interface change.
26052         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26053         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26054
26055         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26056
26057 1998-10-14  Jim Meyering  <meyering@ascend.com>
26058
26059         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26060         instead of "TZ=America/Vancouver".  From Paul Eggert.
26061
26062 1998-10-11  Jim Meyering  <meyering@ascend.com>
26063
26064         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26065         This adds a test for a recently added compatibility fix for mktime.c.
26066         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26067
26068 1998-09-27  Jim Meyering  <meyering@ascend.com>
26069
26070         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26071
26072         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26073         ../configure.in, including a change from Gordon Matzigkeit to allow
26074         cross-compiling for the Hurd.
26075
26076         * m4/glibc.m4: New file/macro to test for the GNU C Library
26077         versions 1 and 2.  From Gordon Matzigkeit.
26078         Indent.
26079
26080 1998-09-21  Jim Meyering  <meyering@ascend.com>
26081
26082         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26083
26084 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26085
26086         Port nanosecond-resolution times to UnixWare 2.1.2 and
26087         pedantic Solaris 2.6.
26088
26089         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26090         AC_STRUCT_ST_MTIM.
26091         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26092         Generate name of ns member, instead of just 1 or undef.
26093         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26094
26095 1998-08-15  Jim Meyering  <meyering@ascend.com>
26096
26097         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26098         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26099         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26100         instead of jm_TYPE_SSIZE_T.
26101
26102 1998-08-12  Jim Meyering  <meyering@ascend.com>
26103
26104         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26105
26106 1998-08-02  Jim Meyering  <meyering@ascend.com>
26107
26108         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26109         in acconfig.h manually.
26110
26111 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26112
26113         * m4/st_mtim.m4: New file.
26114
26115 1998-07-28  Jim Meyering  <meyering@ascend.com>
26116
26117         * m4/utimes.m4: Undef stat.
26118
26119 1998-07-25  Jim Meyering  <meyering@ascend.com>
26120
26121         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26122         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26123
26124 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26125
26126         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26127         uid and gid actually remain unchanged.
26128
26129 1998-07-07  Jim Meyering  <meyering@ascend.com>
26130
26131         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26132
26133 1998-07-04  Jim Meyering  <meyering@ascend.com>
26134
26135         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26136         to prove that this macro can be used in packages without regex.c.
26137
26138 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26139
26140         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26141         is to be used.
26142
26143 1998-07-03  Jim Meyering  <meyering@ascend.com>
26144
26145         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26146
26147         * m4/gettext.m4: New file -- from gettext-0.10.35.
26148         * m4/lcmessage.m4: Likewise.
26149         * m4/progtest.m4: Likewise.
26150
26151         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26152         * m4/jm-macros.m4: Require the new macro.
26153
26154 1998-06-29  Jim Meyering  <meyering@ascend.com>
26155
26156         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26157         for the definition of NGROUPS (used in a system header included
26158         by sys/mount.h).
26159
26160 1998-06-28  Jim Meyering  <meyering@ascend.com>
26161
26162         * m4/ls-mntd-fs.m4: New file.
26163         * m4/fstypename.m4: New file.
26164
26165         * m4/jm-macros.m4: Require the new macro.
26166         * m4/jm-glibc-io.m4: New file.
26167
26168 1998-05-19  Jim Meyering  <meyering@ascend.com>
26169
26170         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26171         * m4/lchown.m4: New file.
26172
26173         * m4/Makefile.am.in: New file.
26174         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26175
26176 1998-05-14  Jim Meyering  <meyering@ascend.com>
26177
26178         * m4/Makefile.am (EXTRA_DIST): Add them.
26179         * m4/jm-macros.m4: New file.
26180         * m4/utimbuf.m4: New file.
26181
26182 1998-05-12  Jim Meyering  <meyering@ascend.com>
26183
26184         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26185
26186 1998-05-11  Jim Meyering  <meyering@ascend.com>
26187
26188         * m4/isc-posix.m4: New file.
26189
26190 1998-05-10  Jim Meyering  <meyering@ascend.com>
26191
26192         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26193
26194 1998-05-09  Jim Meyering  <meyering@ascend.com>
26195
26196         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26197         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26198         with automake.
26199
26200         * m4/ssize_t.m4: New file.
26201         * m4/mktime.m4: Remove file -- the new automake has this now.
26202
26203 1998-04-26  Jim Meyering  <meyering@ascend.com>
26204
26205         * m4/assert.m4: New file.
26206         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26207
26208 1998-04-05  Jim Meyering  <meyering@ascend.com>
26209
26210         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26211         (jm_PREREQ): Use it here.
26212
26213 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26214
26215         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26216         in acconfig.h.
26217
26218 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26219
26220         * m4/prereq.m4: New file.
26221         * m4/error.m4: New file.
26222         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26223
26224 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26225
26226         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26227         cache-check for the same variable -- that defeated the purpose of
26228         the test; the test program was never run.  This was a problem only
26229         on systems with losing getline functions -- HP-UX 10.20 is one.
26230         Reported by Bjorn Helgaas.
26231
26232 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26233
26234         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26235
26236 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26237
26238         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26239
26240         * m4/const.m4: New file.  Use an initializer in this declaration
26241         typedef int charset[2]; const charset x;
26242         Reported by Bob Glickstein.
26243
26244 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26245
26246         * m4/chown.m4: Fix reversed types on -1 args to chown.
26247         From Kaveh Ghazi.
26248
26249 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26250
26251         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26252         Add lseek and memchr.
26253
26254         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26255         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26256         have a 20-character limit on names.
26257
26258 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26259
26260         * m4/inttypes_h.m4: New file.
26261         * m4/uintmax_t.m4: New file.
26262         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26263
26264 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26265   Free Software Foundation, Inc.
26266 Copying and distribution of this file, with or without modification,
26267 are permitted provided the copyright notice and this notice are preserved.