New module description section 'configure.ac-early'.
[gnulib.git] / ChangeLog
1 2007-02-04  Bruno Haible  <bruno@clisp.org>
2
3         New module description section 'configure.ac-early'.
4         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
5         (func_get_autoconf_early_snippet): New function.
6         (func_import, func_create_testdir): Use it. Remove special cases for
7         modules 'extensions' and 'lock'.
8
9 2007-02-04  Bruno Haible  <bruno@clisp.org>
10
11         Make use of gcj-4.3's -fsource and -ftarget option.
12         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
13         and if so try the options -fsource and -ftarget.
14         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
15         source_version, ftarget_option, target_version arguments.
16         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
17         (is_envjavac_oldgcj_14_14_usable): Renamed from
18         is_envjavac_gcj_14_14_usable.
19         (is_envjavac_oldgcj_14_13_usable): Renamed from
20         is_envjavac_gcj_14_13_usable.
21         (is_gcj_present): Update.
22         (is_gcj_43, is_gcj43_usable): New functions.
23         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
24         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
25         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
26         try the options -fsource and -ftarget.
27
28 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
29
30         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
31         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
32         larger value.
33
34 2007-02-03  Jim Meyering  <jim@meyering.net>
35
36         Give tools a better chance to allocate space for very large buffers.
37         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
38
39         Make pwd and readlink work also when run with an unreadable parent dir
40         on systems with openat support.
41         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
42         provided getcwd function, even when we have openat support.
43         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
44
45 2007-02-02  Bruno Haible  <bruno@clisp.org>
46
47         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
48         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
49         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
50         portability problems if one of these functions is only used on specific
51         platforms.
52         Reported by Paul Eggert.
53
54 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
55
56         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
57         is causing more trouble than it's curing.
58         * lib/regex_internal.h (__mempcpy): Remove.
59         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
60         (and make the code a tad smaller to boot).
61         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
62
63 2007-02-02  Jim Meyering  <jim@meyering.net>
64
65         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
66         section, not in the Makefile.am: one.
67
68 2007-02-02  Eric Blake  <ebb9@byu.net>
69
70         * lib/strchrnul.c: Always include config.h first.
71
72         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
73         gnulib strstr is not necessary here.
74
75 2007-02-02  Simon Josefsson  <simon@josefsson.org>
76
77         * m4/socklen.m4: Fix typo.
78
79 2007-02-02  Eric Blake  <ebb9@byu.net>
80
81         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
82         * modules/netinet_in (Makefile.am): Likewise.
83
84 2007-02-01  Bruno Haible  <bruno@clisp.org>
85
86         * lib/string_.h (GL_LINK_WARNING): New macro.
87         (strcasecmp, strstr, strcasestr): If provided by the system,
88         conditionally define as a macro that leads to a warning instead of to
89         an error.
90         (strncasecmp): Conditionally define as a macro that leads to a warning.
91
92 2007-02-01  Jim Meyering  <jim@meyering.net>
93
94         Give tools a better chance to allocate space for very large buffers.
95         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
96
97 2007-02-01  Karl Berry  <karl@gnu.org>
98
99         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
100
101 2007-02-01  Bruno Haible  <bruno@clisp.org>
102
103         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
104         renamings.
105
106 2007-02-01  Eric Blake  <ebb9@byu.net>
107
108         * modules/regex (Depends-on): Revert dependence on mempcpy.
109         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
110         module's definition of mempcpy.
111         Reported by Paul Eggert.
112
113 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
114
115         * lib/string_.h: If the gnulib module XYZ is not present, undefine
116         the symbol XYZ before redefining it.  This fixes a problem with
117         programs that don't use XYZ, when compiled on systems that define
118         XYZ to something else.
119
120 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
121
122         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
123         occurs when "mkdir -m foo" creates a setgid directory that is (1)
124         writeable to group or other and (2) is intended to have a special
125         mode bit that is set or cleared.  In such a case, the directory
126         should be neither group- nor other-writeable until the special
127         mode bits are right.
128
129 2007-01-31  Eric Blake  <ebb9@byu.net>
130
131         * modules/mountlist (Depends-on): Add strstr.
132
133         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
134         bug.
135         * modules/string (Makefile.am): Remove redundant replacement.
136         * modules/regex (Depends-on): Add mempcpy.
137
138 2007-01-31  Bruno Haible  <bruno@clisp.org>
139
140         New module description field 'Link'.
141         * gnulib-tool (func_usage): Document --extract-link-directive.
142         (sed_extract_prog): Recognize 'Link' directive.
143         (func_get_link_directive): New function.
144         (func_import): Show summary of link directives.
145         Handle --extract-link-directive option.
146         * modules/acl (Link): New section.
147         * modules/clock-time (Link): New section.
148         * modules/euidaccess (Link): New section.
149         * modules/gettext (Link): New section.
150         * modules/iconv (Link): New section.
151         * modules/lock (Link): New section.
152         * modules/nanosleep (Link): New section.
153         * modules/readline (Link): New section.
154
155 2007-01-27  Bruno Haible  <bruno@clisp.org>
156
157         Enforce the use of gnulib modules for unportable <string.h> functions.
158         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
159         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
160         (gl_HEADER_STRING_H_BODY): Require it.
161         * lib/string_.h: If the gnulib module XYZ is not present, redefine
162         the symbol XYZ to one that gives a link error.
163         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
164         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
165         * modules/mempcpy (configure.ac): Likewise.
166         * modules/memrchr (configure.ac): Likewise.
167         * modules/stpcpy (configure.ac): Likewise.
168         * modules/stpncpy (configure.ac): Likewise.
169         * modules/strcase (configure.ac): Likewise.
170         * modules/strcasestr (configure.ac): Likewise.
171         * modules/strchrnul (configure.ac): Likewise.
172         * modules/strdup (configure.ac): Likewise.
173         * modules/strndup (configure.ac): Likewise.
174         * modules/strnlen (configure.ac): Likewise.
175         * modules/strpbrk (configure.ac): Likewise.
176         * modules/strsep (configure.ac): Likewise.
177         * modules/strstr (configure.ac): Likewise.
178         * modules/strtok_r (configure.ac): Likewise.
179
180 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
181
182         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
183
184 2007-01-30  Jim Meyering  <jim@meyering.net>
185
186         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
187
188 2007-01-29  Bruno Haible  <bruno@clisp.org>
189
190         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
191         * lib/execute.c: Likewise.
192         * lib/pipe.c: Likewise.
193         * lib/printf-args.h: Likewise.
194         * lib/printf-args.c: Likewise.
195         * lib/printf-parse.c: Likewise.
196         * lib/vasnprintf.c: Likewise.
197
198 2007-01-29  Eric Blake  <ebb9@byu.net>
199
200         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
201         declaration.
202
203 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
204
205         * lib/strptime.h (strptime): Use 'restrict' for args where
206         POSIX requires this.
207         * lib/strptime.c (strptime): Likewise.
208         Change license notice from LGPL to GPL, since gnulib-tool will
209         change this as needed.
210         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
211         defined.
212         Include "strptime.h" first, to check interface.
213         Do not #undef _LIBC and _NL_CURRENT.
214         Do not include <stdlib.h>; no longer needed.
215         Include "time_r.h" and declare ptime_locale_status
216         only if _LIBC is not defined.
217         (__P): Remove unused macro.
218         (match_string): Bring back glibc version, but use it only if _LIBC
219         is defined.
220         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
221         Remove unnecessary assertion and abort() call.
222         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
223         * m4/strptime.m4: Fix serial number comment.
224         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
225         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
226         (Depends-on): Add time_r.
227
228 2007-01-29  Bruno Haible  <bruno@clisp.org>
229
230         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
231         strptime.
232         * modules/strptime (Depends-on): Add stdbool.
233         * lib/strptime.h: Include <time.h> always. Add comments.
234
235 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
236
237         * modules/strptime: New file.
238         * lib/strptime.h: New file.
239         * lib/strptime.c: New file.
240         * m4/strptime.m4: New file.
241
242 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
243
244         * MODULES.html.sh: New module mpsort.
245         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
246
247         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
248         a circularity problem with HP-UX ia64 reported by Bob Proulx in
249         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
250         All uses changed.
251         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
252         All uses changed.
253         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
254         to _Restrict_.
255         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
256         the parameter matches the prototype.
257
258 2007-01-28  Jim Meyering  <jim@meyering.net>
259
260         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
261         sys/time.h here, reverting that part of the previous patch:
262         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
263
264 2007-01-28  Bruno Haible  <bruno@clisp.org>
265
266         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
267         value of $(SYS_TIME_H).
268         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
269         remove it conditionally, too. [added by Jim Meyering]
270         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
271         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
272         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
273         GETTIMEOFDAY_REPLACEMENT to 1.
274
275 2007-01-28  Bruno Haible  <bruno@clisp.org>
276
277         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
278         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
279         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
280         Set UNISTD_H instead of UNISTD_H2.
281         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
282
283 2007-01-28  Bruno Haible  <bruno@clisp.org>
284
285         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
286         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
287
288 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
289
290         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
291         (func_create_testdir): Ensure C locale for `grep' and `tr'
292         character ranges.
293         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
294         ACLOCAL_AMFLAGS parsing state machine.
295
296 2007-01-27  Bruno Haible  <bruno@clisp.org>
297
298         * modules/unistr/base: Update.
299
300 2007-01-27  Bruno Haible  <bruno@clisp.org>
301
302         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
303         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
304         * modules/unistr/u32-mbtouc-unsafe: Renamed from
305         modules/unistr/u32-mbtouc.
306         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
307         * lib/unistr.h: Update.
308         * lib/linebreak.c: Update.
309         * modules/unistr/u32-mbtouc: Renamed from
310         modules/unistr/u32-mbtouc-safe.
311         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
312         * lib/unistr.h: Update.
313         * lib/unistr/u32-to-u8.c: Update.
314         * lib/unistr/u32-to-u16.c: Update.
315
316 2007-01-27  Bruno Haible  <bruno@clisp.org>
317
318         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
319         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
320         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
321         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
322         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
323         * modules/unistr/u16-mbtouc-unsafe: Renamed from
324         modules/unistr/u16-mbtouc.
325         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
326         * lib/unistr.h: Update.
327         * lib/linebreak.c: Update.
328         * modules/linebreak: Update.
329         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
330         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
331         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
332         * modules/unistr/u16-mbtouc: Renamed from
333         modules/unistr/u16-mbtouc-safe.
334         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
335         * lib/unistr.h: Update.
336         * lib/unistr/u16-to-u8.c: Update.
337         * modules/unistr/u16-to-u8: Update.
338         * lib/unistr/u16-to-u32.c: Update.
339         * modules/unistr/u16-to-u32: Update.
340
341 2007-01-27  Bruno Haible  <bruno@clisp.org>
342
343         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
344         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
345         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
346         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
347         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
348         * modules/unistr/u8-mbtouc-unsafe: Renamed from
349         modules/unistr/u8-mbtouc.
350         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
351         * lib/unistr.h: Update.
352         * lib/striconveh.c: Update.
353         * modules/striconveh: Update.
354         * lib/linebreak.c: Update.
355         * modules/linebreak: Update.
356         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
357         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
358         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
359         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
360         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
361         * lib/unistr.h: Update.
362         * lib/striconveh.c: Update.
363         * modules/striconveh: Update.
364         * lib/unistr/u8-to-u16.c: Update.
365         * modules/unistr/u8-to-u16: Update.
366         * lib/unistr/u8-to-u32.c: Update.
367         * modules/unistr/u8-to-u32: Update.
368
369 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
370
371         Sync from Libtool.
372         * lib/argz.c: Do not include strings.h nor memory.h, include
373         string.h unconditionally.  Patch by Simon Josefsson.
374
375 2007-01-27  Bruno Haible  <bruno@clisp.org>
376
377         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
378         from gl_HEADER_STRING_H_BODY.
379         (gl_HEADER_STRING_H_BODY): Require it.
380         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
381         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
382         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
383         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
384         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
385         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
386         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
387         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
388         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
389         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
390         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
391         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
392         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
393         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
394         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
395
396 2007-01-27  Bruno Haible  <bruno@clisp.org>
397
398         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
399         check_PROGRAMS into noinst_PROGRAMS.
400         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
401         check_PROGRAMS in this case.
402         (func_import): Set for_test to false.
403         (func_create_testdir): Set for_test to true.
404
405 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
406             Bruno Haible  <bruno@clisp.org>
407
408         * modules/strcasestr (Files): Remove lib/strcasestr.h.
409         (Depends-on): Add string.
410         (Includes): Use <string.h> instead of strcasestr.h.
411         * modules/string (Makefile.am): Also substitute the value of
412         REPLACE_STRCASESTR.
413         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
414         assume strcasestr is declared in <string.h> not <strings.h>. Also
415         set REPLACE_STRCASESTR.
416         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
417         REPLACE_STRCASESTR.
418         * lib/strcasestr.h: Remove file.
419         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
420         * lib/string_.h (strcasestr): New declaration.
421
422 2007-01-27  Bruno Haible  <bruno@clisp.org>
423
424         * lib/string_.h: Use 'extern'.
425
426 2007-01-27  Jim Meyering  <jim@meyering.net>
427
428         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
429         of set-but-not-used local, "q".
430
431         * lib/mempcpy.c: Include <config.h> before <string.h>.
432         This fixes a compilation error on HP-UX, due to the system's
433         "restrict"-using mempcpy prototype.
434
435 2007-01-26  Bruno Haible  <bruno@clisp.org>
436
437         Small optimization.
438         * lib/javacomp.c: Include c-strstr.h.
439          (is_envjavac_gcj): Use c_strstr instead of strstr.
440         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
441
442 2007-01-26  Bruno Haible  <bruno@clisp.org>
443
444         * MODULES.html.sh (Unicode string functions): Add the new modules.
445
446         * modules/uniconv/u32-strconv-to-locale: New file.
447         * lib/uniconv/u32-strconv-to-locale.c: New file.
448
449         * modules/uniconv/u16-strconv-to-locale: New file.
450         * lib/uniconv/u16-strconv-to-locale.c: New file.
451
452         * modules/uniconv/u8-strconv-to-locale: New file.
453         * lib/uniconv/u8-strconv-to-locale.c: New file.
454
455         * modules/uniconv/u32-strconv-from-locale: New file.
456         * lib/uniconv/u32-strconv-from-locale.c: New file.
457
458         * modules/uniconv/u16-strconv-from-locale: New file.
459         * lib/uniconv/u16-strconv-from-locale.c: New file.
460
461         * modules/uniconv/u8-strconv-from-locale: New file.
462         * lib/uniconv/u8-strconv-from-locale.c: New file.
463
464         * modules/uniconv/u32-strconv-to-enc: New file.
465         * lib/uniconv/u32-strconv-to-enc.c: New file.
466         * modules/uniconv/u32-strconv-to-enc-tests: New file.
467         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
468
469         * modules/uniconv/u16-strconv-to-enc: New file.
470         * lib/uniconv/u16-strconv-to-enc.c: New file.
471         * lib/uniconv/u-strconv-to-enc.h: New file.
472         * modules/uniconv/u16-strconv-to-enc-tests: New file.
473         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
474
475         * modules/uniconv/u8-strconv-to-enc: New file.
476         * lib/uniconv/u8-strconv-to-enc.c: New file.
477         * modules/uniconv/u8-strconv-to-enc-tests: New file.
478         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
479
480         * modules/uniconv/u32-strconv-from-enc: New file.
481         * lib/uniconv/u32-strconv-from-enc.c: New file.
482         * modules/uniconv/u32-strconv-from-enc-tests: New file.
483         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
484
485         * modules/uniconv/u16-strconv-from-enc: New file.
486         * lib/uniconv/u16-strconv-from-enc.c: New file.
487         * modules/uniconv/u16-strconv-from-enc-tests: New file.
488         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
489
490         * modules/uniconv/u8-strconv-from-enc: New file.
491         * lib/uniconv/u8-strconv-from-enc.c: New file.
492         * lib/uniconv/u-strconv-from-enc.h: New file.
493         * modules/uniconv/u8-strconv-from-enc-tests: New file.
494         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
495
496         * modules/uniconv/u32-conv-from-enc: New file.
497         * lib/uniconv/u32-conv-from-enc.c: New file.
498         * modules/uniconv/u32-conv-from-enc-tests: New file.
499         * tests/uniconv/test-u32-conv-from-enc.c: New file.
500
501         * modules/uniconv/u16-conv-from-enc: New file.
502         * lib/uniconv/u16-conv-from-enc.c: New file.
503         * lib/uniconv/u-conv-from-enc.h: New file.
504         * modules/uniconv/u16-conv-from-enc-tests: New file.
505         * tests/uniconv/test-u16-conv-from-enc.c: New file.
506
507         * modules/uniconv/u8-conv-from-enc: New file.
508         * lib/uniconv/u8-conv-from-enc.c: New file.
509         * modules/uniconv/u8-conv-from-enc-tests: New file.
510         * tests/uniconv/test-u8-conv-from-enc.c: New file.
511
512         * modules/uniconv/base: New file.
513         * lib/uniconv.h: New file.
514
515 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
516
517         * doc/gnulib-tool.texi (Initial import): Update to match current
518         behavior with strdup module.
519         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
520         * lib/memmem.h: Remove; all uses removed.  This is now done
521         by <string.h>.
522         * lib/mempcpy.h: Likewise.
523         * lib/memrchr.h: Likewise.
524         * lib/stpcpy.h: Likewise.
525         * lib/stpncpy.h: Likewise.
526         * lib/strcase.h: Likewise.
527         * lib/strchrnul.h: Likewise.
528         * lib/strdup.h: Likewise.
529         * lib/strndup.h: Likewise.
530         * lib/strnlen.h: Likewise.
531         * lib/strpbrk.h: Likewise.
532         * lib/strsep.h: Likewise.
533         * lib/strstr.h: Likewise.
534         * lib/strtok_r.h: Likewise.
535         * lib/string_.h: New file.
536         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
537         Rely on <string.h> instead.
538         * lib/canon-host.c: Likewise.
539         * lib/chdir-long.c: Likewise.
540         * lib/concatpath.c: Likewise.
541         * lib/exclude.c: Likewise.
542         * lib/fchdir.c: Likewise.
543         * lib/getaddrinfo.c: Likewise.
544         * lib/getcwd.c: Likewise.
545         * lib/getsubopt.c: Likewise.
546         * lib/glob.c: Likewise.
547         * lib/hard-locale.c: Likewise.
548         * lib/iconvme.c: Likewise.
549         * lib/javacomp.c: Likewise.
550         * lib/mempcpy.c: Likewise.
551         * lib/memrchr.c: Likewise.
552         * lib/regex_internal.h: Likewise.
553         * lib/stpncpy.c: Likewise.
554         * lib/strcasecmp.c: Likewise.
555         * lib/strchrnul.c: Likewise.
556         * lib/strdup.c: Likewise.
557         * lib/striconv.c: Likewise.
558         * lib/striconveh.c: Likewise.
559         * lib/striconveha.c: Likewise.
560         * lib/strncasecmp.c: Likewise.
561         * lib/strndup.c: Likewise.
562         * lib/strnlen.c: Likewise.
563         * lib/strsep.c: Likewise.
564         * lib/strstr.c: Likewise.
565         * lib/strtok_r.c: Likewise.
566         * lib/userspec.c: Likewise.
567         * lib/w32spawn.h: Likewise.
568         * lib/xstrndup.c: Likewise.
569         * lib/mountlist.c (strstr): Remove decl.
570         * m4/string_h.m4: New file.
571         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
572         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
573         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
574         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
575         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
576         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
577         Set REPLACE_STRCASECMP if necessary.
578         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
579         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
580         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
581         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
582         HAVE_DECL_STRDUP if necessary.
583         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
584         since gl_FUNC_STRNDUP does that now.
585         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
586         Check for decl here...
587         (gl_PREREQ_STRNLEN): ... not here.
588         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
589         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
590         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
591         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
592         necessary.
593         * modules/string: New file.
594         * modules/memmem (Files): Remove special-purpose include file.
595         (Depends-on): Add string.
596         (Include): Include <string.h>, not the removed file.
597         * modules/mempcpy: Likewise.
598         * modules/memrchr: Likewise.
599         * modules/stpcpy: Likewise.
600         * modules/stpncpy: Likewise.
601         * modules/strcase: Likewise.
602         * modules/strchrnul: Likewise.
603         * modules/strdup: Likewise.
604         * modules/strndup: Likewise.
605         * modules/strnlen: Likewise.
606         * modules/strpbrk: Likewise.
607         * modules/strsep: Likewise.
608         * modules/strstr: Likewise.
609         * modules/strtok_r: Likewise.
610         * tests/test-dirname.c: Don't include "strdup.h", since
611         <string.h> now suffices.
612         * tests/test-memmem.c: Don't include "memmem.h", since
613         <string.h> now suffices.
614
615 2007-01-25  Bruno Haible  <bruno@clisp.org>
616
617         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
618         *resultp is 0.
619
620         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
621         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
622         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
623         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
624
625         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
626         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
627         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
628         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
629         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
630         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
631
632 2007-01-24  Bruno Haible  <bruno@clisp.org>
633
634         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
635         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
636         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
637         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
638         gl_FUNC_FTS_CORE.
639         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
640         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
641         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
642         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
643         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
644         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
645         gl_FUNC_FCHOWNAT.
646         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
647         gl_FUNC_STRFTIME.
648         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
649         Reported by Ralf Wildenhues.
650
651 2007-01-24  Bruno Haible  <bruno@clisp.org>
652
653         Drop AC_REQUIRE calls that are redundant with the module dependencies.
654         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
655         gl_GETADDRINFO.
656         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
657         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
658         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
659
660 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
661
662         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
663         Don't use 'exit'; just return from 'main'.
664         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
665
666         * lib/fnmatch_.h: Readjust white space and comments to match
667         glibc, to avoid spurious diffs.
668
669 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
670
671         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
672         2004-12-01 change by Jakub Jelinek, since this code won't compile
673         if !LIBC.  Problem reported by Bob Proulx.
674
675 2007-01-23  Bruno Haible  <bruno@clisp.org>
676
677         * lib/striconveh.c: Include c-strcaseeq.h.
678         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
679         * modules/striconveh (Depends-on): Add c-strcaseeq.
680
681 2007-01-23  Bruno Haible  <bruno@clisp.org>
682
683         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
684
685         * modules/c-strcaseeq: New file.
686         * lib/c-strcaseeq.h: New file.
687
688         * modules/streq: New file.
689         * lib/streq.h: New file.
690
691 2007-01-23  Bruno Haible  <bruno@clisp.org>
692
693         * modules/striconveha-tests: New file.
694         * tests/test-striconveha.c: New file.
695
696         * lib/striconveha.h: Include <stdbool.h>.
697         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
698         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
699         (mem_iconveha_notranslit): Renamed from mem_iconveha.
700         (mem_iconveha): New function.
701         (str_iconveha_notranslit): Renamed from str_iconveha.
702         (str_iconveha): New function.
703         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
704         c-strcase.
705
706 2007-01-23  Bruno Haible  <bruno@clisp.org>
707
708         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
709         encodings without forgiving before trying any encoding with handler.
710         (str_iconveha): Try all encodings without forgiving before trying any
711         encoding with handler.
712
713 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
714
715         Import the following changes from libc.
716
717         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
718
719         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
720
721         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
722
723         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
724         normal_bracket label.
725
726         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
727
728         [BZ #361]
729         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
730         to normal_bracket after fetching the next character.
731
732 2007-01-22  Bruno Haible  <bruno@clisp.org>
733
734         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
735         argument.
736         * lib/striconveh.c (iconv_carefully_1): New function.
737         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
738         argument.
739         (str_cd_iconveh): Update.
740         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
741         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
742         * tests/test-striconveh.c (MAGIC): New macro.
743         (new_offsets): New function.
744         (main): Test call with and without offsets.
745
746 2007-01-22  Bruno Haible  <bruno@clisp.org>
747
748         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
749         * modules/sys_select (Makefile.am): Likewise.
750         * modules/sys_socket (Makefile.am): Likewise.
751         * modules/sys_time (Makefile.am): Likewise.
752
753 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
754
755         * modules/gettimeofday (License): Change from GPL to LGPL, since
756         gettimeofday is a library function.
757
758 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
759
760         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
761
762 2007-01-21  Bruno Haible  <bruno@clisp.org>
763
764         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
765
766 2007-01-21  Bruno Haible  <bruno@clisp.org>
767
768         * modules/striconveha: New file.
769         * lib/striconveha.h: New file.
770         * lib/striconveha.c: New file.
771         * MODULES.html.sh (Internationalization functions): Add striconveha.
772         * lib/striconv.c (str_iconv): Optimize the case of an empty input
773         string.
774         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
775
776 2007-01-21  Bruno Haible  <bruno@clisp.org>
777
778         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
779         * lib/striconveh.c (str_iconveh): Likewise.
780
781 2007-01-21  Bruno Haible  <bruno@clisp.org>
782
783         * lib/striconveh.h (mem_iconveh): New declaration.
784         * lib/striconveh.c (mem_iconveh): New function.
785         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
786
787 2007-01-21  Bruno Haible  <bruno@clisp.org>
788
789         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
790
791         * lib/striconveh.h (mem_cd_iconveh): Change specification.
792         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
793         original result buffer.
794         (str_cd_iconveh): Update.
795         * tests/test-striconveh.c (main): Update.
796
797         * lib/striconv.h (mem_cd_iconv): Change specification.
798         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
799         result buffer.
800         (str_cd_iconv): Update.
801         * tests/test-striconv.c (main): Update.
802
803 2007-01-21  Bruno Haible  <bruno@clisp.org>
804
805         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
806
807 2007-01-20  Jim Meyering  <jim@meyering.net>
808
809         * lib/userspec.c (parse_with_separator): If a user or group string
810         starts with "+", skip the corresponding name-to-ID look-up, since
811         such a look-up must fail: user and group names may not include "+".
812
813 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
814
815         * lib/poll.c: Include sys/time.h and time.h unconditionally,
816         since we now assume the sys_time module.
817         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
818         check for sys/time.h; no longer needed.
819         * modules/poll (Depends-on): Depend on sys_time.
820
821 2007-01-18  Bruno Haible  <bruno@clisp.org>
822
823         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
824         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
825
826         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
827         gettimeofday.
828
829         * tests/test-gettimeofday.c: Include <time.h>.
830         (dummy): Remove variable.
831
832         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
833         gl_HEADER_SYS_TIME_H.
834         (gl_HEADER_SYS_TIME_H): New macro.
835
836         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
837         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
838         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
839         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
840         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
841         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
842         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
843         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
844         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
845         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
846         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
847
848         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
849         last change; it caused a compilation error when cross-compiling to
850         Cygwin.
851
852 2007-01-18  Jim Meyering  <jim@meyering.net>
853
854         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
855         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
856         than the race-prone "test -d sys || mkdir sys".
857         (configure.ac): Use AC_PROG_MKDIR_P.
858         * modules/sys_select: Likewise.
859         * modules/sys_socket: Likewise.
860         * modules/sys_time: Likewise.
861
862 2007-01-18  Eric Blake  <ebb9@byu.net>
863
864         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
865         replace gettimeofday.
866         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
867         name, to avoid infinite recursion.
868
869 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
870
871         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
872         module sys_time.
873         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
874         assume timespec.h defines struct timeval.
875         * lib/settime.c: Likewise.
876         * lib/utimens.c: Likewise.
877         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
878         since we now assume the gettimeofday module.
879         * lib/tempname.c (__gen_tempname): Likewise.
880         * lib/gettimeofday.h: Remove.
881         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
882         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
883         Include <time.h>, for 'time()'.
884         (localtime_buffer_addr): Also use this workaround if
885         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
886         to simplify the uses.  All uses changed.
887         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
888         that #undef is inside {}, and 'const' follows type name consistently.
889         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
890         (gettimeofday): Do not use the maximum possible value for
891         tv->tv_usec, since that might break usages other than ls.c.
892         Instead, we'll leave ls.c alone.  This undoes today's patch
893         by Bruno.  Add a compile-time warning for 1s-clock resolution;
894         we've never observed the problem but might as well keep the
895         canary.
896         * lib/nanosleep.c: Include timespec.h first, for interface check.
897         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
898         now assume the sys_time module.
899         * lib/tempname.c: Likewise.
900         * lib/timespec.h: Likewise.
901         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
902         needed.
903         * lib/strftime.c: Likewise.
904         * lib/timespec.h: Likewise.
905         * lib/posixtm.c: Include posixtm.h first, for interface check.
906         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
907         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
908         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
909         * lib/sys_time_.h: New file.
910         * lib/timespec.h (struct timespec): Use long int, not long.
911         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
912         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
913         Remove obsolescent call to AC_HEADER_TIME.
914         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
915         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
916         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
917         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
918         Likewise.
919         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
920         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
921         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
922         into the sys_time module.  Check for gettimeofday just once.
923         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
924         for gettimeofday signature to just check the signature.  Merely
925         compile it, since linking doesn't test signature.  Improve test for
926         whether gettimeofday.o is actually needed.
927         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
928         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
929         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
930         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
931         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
932         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
933         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
934         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
935         than worrying about sys/time.h.
936         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
937         Don't bother worrying about TIME_WITH_SYS_TIME.
938         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
939         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
940         * m4/sys_time_h.m4: New file.
941         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
942         Don't include sys/time.h.  Return from main rather than exiting.
943         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
944         all uses changed.
945         * modules/gethrxtime (Depends-on): Add sys_time.
946         * modules/gettime (Depends-on): Likewise.
947         * modules/gettimeofday (Depends-on): Likewise.
948         * modules/nanosleep (Depends-on): Likewise.
949         * modules/settime (Depends-on): Likewise.
950         * modules/tempname (Depends-on): Likewise.
951         * modules/utimens (Depends-on): Likewise.
952         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
953         (Include:) Change back to <sys/time.h>.
954         (Maintainer:) Add self.
955         * modules/sys_time: New file.
956         * modules/tempname (Depends-on): Add gettimeofday.
957         * tests/test-gettimeofday.c: Include <sys/time.h>
958         rather than gettimeofday.h.
959
960 2007-01-17  Bruno Haible  <bruno@clisp.org>
961
962         * gnulib-tool (func_get_license): Revert last patch. Instead, let
963         the license default to GPL.
964         (func_create_testdir): Don't complain if a module is LGPL and its
965         tests module depends on GPLed modules.
966
967 2007-01-17  Bruno Haible  <bruno@clisp.org>
968
969         * lib/gettimeofday.c (gettimeofday): Add code for the case
970         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
971         maximum possible value for tv->tv_usec, rather than the minimum one.
972
973 2005-10-08  Martin Lambers  <marlam@marlam.de>
974 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
975 2007-01-16  Bruno Haible  <bruno@clisp.org>
976
977         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
978         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
979         gl_FUNC_GETTIMEOFDAY.
980         (Include): Add gettimeofday.h.
981         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
982         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
983         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
984         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
985         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
986         * lib/gettimeofday.h: New file.
987         * lib/gettimeofday.c: Include <sys/timeb.h>.
988         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
989         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
990         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
991         fall back on time().
992
993         * tests/test-gettimeofday.c: New file.
994         * modules/gettimeofday-tests: New file.
995
996 2007-01-16  Eric Blake  <ebb9@byu.net>
997
998         * modules/fnmatch (Depends-on): Depend on wchar.
999         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1000         * m4/fnmatch.m4: Likewise.
1001         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1002         * m4/mbchar.m4: Likewise.
1003         * modules/mbswidth (Depends-on): Depend on wchar.
1004         * lib/mbswidth.c: Assume <wchar.h>.
1005         * m4/mbswidth.m4: Likewise.
1006         * modules/quotearg (Depends-on): Depend on wchar.
1007         * lib/quotearg.c: Assume <wchar.h>.
1008         * m4/quotearg.m4: Likewise.
1009         * modules/regex (Depends-on): Depend on wchar.
1010         * lib/regex_internal.h: Assume <wchar.h>.
1011         * m4/regex.m4: Likewise.
1012         * modules/stdint (Depends-on): Depend on wchar.
1013         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1014         * m4/stdint.m4: Likewise.
1015         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1016         * modules/strftime (Depends-on): Depend on wchar.
1017         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1018         * modules/strtol (Depends-on): Depend on wchar.
1019         * lib/strtol.c: Assume <wchar.h>.
1020         * modules/wcwidth (Depends-on): Depend on wchar.
1021         * lib/wcwidth.h: Assume <wchar.h>.
1022         * m4/wcwidth.m4: Likewise.
1023
1024 2007-01-16  Bruno Haible  <bruno@clisp.org>
1025
1026         * modules/csharpexec-script: New, created from...
1027         * modules/csharpexec: ... this.
1028
1029 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1030
1031         * modules/javaexec-script: New, created from...
1032         * modules/javaexec: ... this.
1033
1034 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1035
1036         * modules/poll (Dependencies): Add sys_select.
1037
1038 2007-01-15  Jim Meyering  <jim@meyering.net>
1039
1040         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1041         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1042         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1043         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1044
1045 2007-01-15  Bruno Haible  <bruno@clisp.org>
1046
1047         * modules/striconveh: New file.
1048         * lib/striconveh.h: New file.
1049         * lib/striconveh.c: New file.
1050         * MODULES.html.sh (Internationalization functions): Add striconveh.
1051
1052         * modules/striconveh-tests: New file.
1053         * tests/test-striconveh.c: New file.
1054
1055 2007-01-15  Bruno Haible  <bruno@clisp.org>
1056
1057         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1058         not from GNU libiconv or GNU libc.
1059
1060 2007-01-15  Bruno Haible  <bruno@clisp.org>
1061
1062         * doc/gnulib-intro.texi (Copyright): Explain the different license
1063         terms for module descriptions, autoconf macros, tests, documentation.
1064
1065 2007-01-14  Bruno Haible  <bruno@clisp.org>
1066
1067         * modules/striconv-tests: New file.
1068         * tests/test-striconv.c: New file.
1069
1070 2007-01-14  Bruno Haible  <bruno@clisp.org>
1071
1072         * modules/iconv-tests: New file.
1073         * tests/test-iconv.c: New file.
1074
1075 2007-01-14  Bruno Haible  <bruno@clisp.org>
1076
1077         * gnulib-tool (func_get_license): For test modules, use the license of
1078         the main module.
1079
1080 2007-01-14  Bruno Haible  <bruno@clisp.org>
1081
1082         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1083         if iconv is found to exist.
1084
1085 2007-01-14  Bruno Haible  <bruno@clisp.org>
1086
1087         * modules/c-ctype-tests: New file.
1088         * tests/test-c-ctype.c: New file.
1089
1090 2007-01-14  Bruno Haible  <bruno@clisp.org>
1091
1092         * modules/binary-io-tests: New file.
1093         * tests/test-binary-io.sh: New file.
1094         * tests/test-binary-io.c: New file.
1095
1096 2007-01-14  Bruno Haible  <bruno@clisp.org>
1097
1098         * modules/array-oset-tests: New file.
1099         * tests/test-array_oset.c: New file.
1100
1101 2007-01-14  Bruno Haible  <bruno@clisp.org>
1102
1103         * modules/array-list-tests: New file.
1104         * tests/test-array_list.c: New file.
1105
1106 2007-01-14  Bruno Haible  <bruno@clisp.org>
1107
1108         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1109         and make.
1110         Reported by Simon Josefsson in
1111         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1112
1113 2007-01-14  Bruno Haible  <bruno@clisp.org>
1114
1115         * modules/allocsa-tests: New file.
1116         * tests/test-allocsa.c: New file.
1117
1118 2007-01-14  Bruno Haible  <bruno@clisp.org>
1119
1120         * modules/fchdir (Depends-on): Add absolute-header.
1121         * modules/unistd (Depends-on): Likewise.
1122
1123 2006-12-30  Bruno Haible  <bruno@clisp.org>
1124
1125         * modules/fchdir: New file.
1126         * modules/unistd (Files): Add lib/unistd_.h.
1127         (Makefile.am): Generate unistd.h from unistd_.h.
1128         * lib/fchdir.c: New file.
1129         * lib/dirent_.h: New file.
1130         * lib/unistd_.h: New file.
1131         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1132         * m4/fchdir.m4: New file.
1133         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1134         (gl_HEADER_UNISTD): Invoke it.
1135         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1136         function.
1137         * lib/backupfile.c (opendir, closedir): Undefine.
1138         * lib/chown.c (open, close): Undefine.
1139         * lib/clean-temp.c (open, close): Undefine.
1140         * lib/copy-file.c (open, close): Undefine.
1141         * lib/execute.c (open, close): Undefine.
1142         * lib/fsusage.c (open, close): Undefine.
1143         * lib/gc-gnulib.c (open, close): Undefine.
1144         * lib/getcwd.c (opendir, closedir): Undefine.
1145         * lib/glob.c (opendir, closedir): Undefine.
1146         * lib/javacomp.c (open, close): Undefine.
1147         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1148         * lib/openat-proc.c (open, close): Undefine.
1149         * lib/pagealign_alloc.c (open, close): Undefine.
1150         * lib/pipe.c (open, close): Undefine.
1151         * lib/progreloc.c (open, close): Undefine.
1152         * lib/savedir.c (opendir, closedir): Undefine.
1153         * lib/utime.c (open, close): Undefine.
1154         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1155
1156 2007-01-10  Bruno Haible  <bruno@clisp.org>
1157
1158         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1159
1160 2007-01-12  Eric Blake  <ebb9@byu.net>
1161
1162         Provide a robust <wchar.h>.  Further simplifications are now
1163         possible in other modules, but not included here.
1164         * modules/wchar: New module.
1165         * m4/wchar.m4: New file.
1166         * lib/wchar_.h: Likewise.
1167         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1168         of the new module.
1169         * MODULES.html.sh (Extended multibyte and wide character utilities):
1170         New section.
1171
1172 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1173
1174         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1175         to a reasonable default for memory allocation.
1176         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1177         file system that reports garbage st_size values for symlinks.
1178         Problem reported by Liyang Hu.
1179
1180 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1181
1182         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1183         Emacs .#* auto-save files).
1184
1185 2007-01-11  Bruno Haible  <bruno@clisp.org>
1186
1187         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1188         directory.
1189
1190 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1191
1192         Use @...@ consistently in lib/wctype_.h.
1193         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1194         on it being set to 1 or 0.
1195         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1196         go back to AC_SUBSTing it.
1197         * modules/wctype (Makefile.am): Undo previous change.
1198
1199 2007-01-10  Eric Blake  <ebb9@byu.net>
1200
1201         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1202         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1203         * modules/wctype (Makefile.am): Likewise.
1204         Reported by Chris McGuire.
1205
1206 2007-01-10  Jim Meyering  <jim@meyering.net>
1207
1208         fts.c: a small readability/maintainability improvement
1209         * lib/fts.c (fts_read): Make this code slightly more readable and
1210         maintainable by hoisting the "sp->fts_cur = p" assignments to
1211         immediately follow the statements that set P.  Derived from
1212         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1213
1214 2007-01-10  Eric Blake  <ebb9@byu.net>
1215
1216         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1217         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1218         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1219         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1220         Reported by Chris McGuire.
1221
1222 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1223
1224         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1225         in sed script.
1226
1227 2007-01-09  Bruno Haible  <bruno@clisp.org>
1228
1229         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1230         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1231         variables.
1232         (func_module): Use them.
1233
1234 2007-01-09  Bruno Haible  <bruno@clisp.org>
1235
1236         * modules/unistr/base: New file.
1237         * lib/unistr.h: New file.
1238
1239         * modules/unistr/u8-to-u16: New file.
1240         * lib/unistr/u8-to-u16.c: New file.
1241
1242         * modules/unistr/u8-to-u32: New file.
1243         * lib/unistr/u8-to-u32.c: New file.
1244
1245         * modules/unistr/u16-to-u8: New file.
1246         * lib/unistr/u16-to-u8.c: New file.
1247
1248         * modules/unistr/u16-to-u32: New file.
1249         * lib/unistr/u16-to-u32.c: New file.
1250
1251         * modules/unistr/u32-to-u8: New file.
1252         * lib/unistr/u32-to-u8.c: New file.
1253
1254         * modules/unistr/u32-to-u16: New file.
1255         * lib/unistr/u32-to-u16.c: New file.
1256
1257         * modules/unistr/u8-check: New file.
1258         * modules/unistr/u16-check: New file.
1259         * modules/unistr/u32-check: New file.
1260         * lib/unistr/u8-check.c: New file.
1261         * lib/unistr/u16-check.c: New file.
1262         * lib/unistr/u32-check.c: New file.
1263
1264         * modules/unistr/u8-chr: New file.
1265         * modules/unistr/u16-chr: New file.
1266         * modules/unistr/u32-chr: New file.
1267         * lib/unistr/u8-chr.c: New file.
1268         * lib/unistr/u16-chr.c: New file.
1269         * lib/unistr/u32-chr.c: New file.
1270
1271         * modules/unistr/u8-cmp: New file.
1272         * modules/unistr/u16-cmp: New file.
1273         * modules/unistr/u32-cmp: New file.
1274         * lib/unistr/u8-cmp.c: New file.
1275         * lib/unistr/u16-cmp.c: New file.
1276         * lib/unistr/u32-cmp.c: New file.
1277
1278         * modules/unistr/u8-cpy: New file.
1279         * modules/unistr/u16-cpy: New file.
1280         * modules/unistr/u32-cpy: New file.
1281         * lib/unistr/u8-cpy.c: New file.
1282         * lib/unistr/u16-cpy.c: New file.
1283         * lib/unistr/u32-cpy.c: New file.
1284         * lib/unistr/u-cpy.h: New file.
1285
1286         * modules/unistr/u8-cpy-alloc: New file.
1287         * modules/unistr/u16-cpy-alloc: New file.
1288         * modules/unistr/u32-cpy-alloc: New file.
1289         * lib/unistr/u8-cpy-alloc.c: New file.
1290         * lib/unistr/u16-cpy-alloc.c: New file.
1291         * lib/unistr/u32-cpy-alloc.c: New file.
1292         * lib/unistr/u-cpy-alloc.h: New file.
1293
1294         * modules/unistr/u8-endswith: New file.
1295         * modules/unistr/u16-endswith: New file.
1296         * modules/unistr/u32-endswith: New file.
1297         * lib/unistr/u8-endswith.c: New file.
1298         * lib/unistr/u16-endswith.c: New file.
1299         * lib/unistr/u32-endswith.c: New file.
1300         * lib/unistr/u-endswith.h: New file.
1301
1302         * modules/unistr/u8-mblen: New file.
1303         * modules/unistr/u16-mblen: New file.
1304         * modules/unistr/u32-mblen: New file.
1305         * lib/unistr/u8-mblen.c: New file.
1306         * lib/unistr/u16-mblen.c: New file.
1307         * lib/unistr/u32-mblen.c: New file.
1308
1309         * modules/unistr/u8-mbtouc: New file.
1310         * modules/unistr/u16-mbtouc: New file.
1311         * modules/unistr/u32-mbtouc: New file.
1312         * lib/unistr/u8-mbtouc.c: New file.
1313         * lib/unistr/u16-mbtouc.c: New file.
1314         * lib/unistr/u32-mbtouc.c: New file.
1315
1316         * modules/unistr/u8-mbtouc-safe: New file.
1317         * modules/unistr/u16-mbtouc-safe: New file.
1318         * modules/unistr/u32-mbtouc-safe: New file.
1319         * lib/unistr/u8-mbtouc-safe.c: New file.
1320         * lib/unistr/u16-mbtouc-safe.c: New file.
1321         * lib/unistr/u32-mbtouc-safe.c: New file.
1322
1323         * modules/unistr/u8-move: New file.
1324         * modules/unistr/u16-move: New file.
1325         * modules/unistr/u32-move: New file.
1326         * lib/unistr/u8-move.c: New file.
1327         * lib/unistr/u16-move.c: New file.
1328         * lib/unistr/u32-move.c: New file.
1329         * lib/unistr/u-move.h: New file.
1330
1331         * modules/unistr/u8-next: New file.
1332         * modules/unistr/u16-next: New file.
1333         * modules/unistr/u32-next: New file.
1334         * lib/unistr/u8-next.c: New file.
1335         * lib/unistr/u16-next.c: New file.
1336         * lib/unistr/u32-next.c: New file.
1337
1338         * modules/unistr/u8-prev: New file.
1339         * modules/unistr/u16-prev: New file.
1340         * modules/unistr/u32-prev: New file.
1341         * lib/unistr/u8-prev.c: New file.
1342         * lib/unistr/u16-prev.c: New file.
1343         * lib/unistr/u32-prev.c: New file.
1344
1345         * modules/unistr/u8-set: New file.
1346         * modules/unistr/u16-set: New file.
1347         * modules/unistr/u32-set: New file.
1348         * lib/unistr/u8-set.c: New file.
1349         * lib/unistr/u16-set.c: New file.
1350         * lib/unistr/u32-set.c: New file.
1351         * lib/unistr/u-set.h: New file.
1352
1353         * modules/unistr/u8-startswith: New file.
1354         * modules/unistr/u16-startswith: New file.
1355         * modules/unistr/u32-startswith: New file.
1356         * lib/unistr/u8-startswith.c: New file.
1357         * lib/unistr/u16-startswith.c: New file.
1358         * lib/unistr/u32-startswith.c: New file.
1359         * lib/unistr/u-startswith.h: New file.
1360
1361         * modules/unistr/u8-stpcpy: New file.
1362         * modules/unistr/u16-stpcpy: New file.
1363         * modules/unistr/u32-stpcpy: New file.
1364         * lib/unistr/u8-stpcpy.c: New file.
1365         * lib/unistr/u16-stpcpy.c: New file.
1366         * lib/unistr/u32-stpcpy.c: New file.
1367         * lib/unistr/u-stpcpy.h: New file.
1368
1369         * modules/unistr/u8-stpncpy: New file.
1370         * modules/unistr/u16-stpncpy: New file.
1371         * modules/unistr/u32-stpncpy: New file.
1372         * lib/unistr/u8-stpncpy.c: New file.
1373         * lib/unistr/u16-stpncpy.c: New file.
1374         * lib/unistr/u32-stpncpy.c: New file.
1375         * lib/unistr/u-stpncpy.h: New file.
1376
1377         * modules/unistr/u8-strcat: New file.
1378         * modules/unistr/u16-strcat: New file.
1379         * modules/unistr/u32-strcat: New file.
1380         * lib/unistr/u8-strcat.c: New file.
1381         * lib/unistr/u16-strcat.c: New file.
1382         * lib/unistr/u32-strcat.c: New file.
1383         * lib/unistr/u-strcat.h: New file.
1384
1385         * modules/unistr/u8-strchr: New file.
1386         * modules/unistr/u16-strchr: New file.
1387         * modules/unistr/u32-strchr: New file.
1388         * lib/unistr/u8-strchr.c: New file.
1389         * lib/unistr/u16-strchr.c: New file.
1390         * lib/unistr/u32-strchr.c: New file.
1391
1392         * modules/unistr/u8-strcmp: New file.
1393         * modules/unistr/u16-strcmp: New file.
1394         * modules/unistr/u32-strcmp: New file.
1395         * lib/unistr/u8-strcmp.c: New file.
1396         * lib/unistr/u16-strcmp.c: New file.
1397         * lib/unistr/u32-strcmp.c: New file.
1398
1399         * modules/unistr/u8-strcpy: New file.
1400         * modules/unistr/u16-strcpy: New file.
1401         * modules/unistr/u32-strcpy: New file.
1402         * lib/unistr/u8-strcpy.c: New file.
1403         * lib/unistr/u16-strcpy.c: New file.
1404         * lib/unistr/u32-strcpy.c: New file.
1405         * lib/unistr/u-strcpy.h: New file.
1406
1407         * modules/unistr/u8-strcspn: New file.
1408         * modules/unistr/u16-strcspn: New file.
1409         * modules/unistr/u32-strcspn: New file.
1410         * lib/unistr/u8-strcspn.c: New file.
1411         * lib/unistr/u16-strcspn.c: New file.
1412         * lib/unistr/u32-strcspn.c: New file.
1413         * lib/unistr/u-strcspn.h: New file.
1414
1415         * modules/unistr/u8-strdup: New file.
1416         * modules/unistr/u16-strdup: New file.
1417         * modules/unistr/u32-strdup: New file.
1418         * lib/unistr/u8-strdup.c: New file.
1419         * lib/unistr/u16-strdup.c: New file.
1420         * lib/unistr/u32-strdup.c: New file.
1421         * lib/unistr/u-strdup.h: New file.
1422
1423         * modules/unistr/u8-strlen: New file.
1424         * modules/unistr/u16-strlen: New file.
1425         * modules/unistr/u32-strlen: New file.
1426         * lib/unistr/u8-strlen.c: New file.
1427         * lib/unistr/u16-strlen.c: New file.
1428         * lib/unistr/u32-strlen.c: New file.
1429         * lib/unistr/u-strlen.h: New file.
1430
1431         * modules/unistr/u8-strmblen: New file.
1432         * modules/unistr/u16-strmblen: New file.
1433         * modules/unistr/u32-strmblen: New file.
1434         * lib/unistr/u8-strmblen.c: New file.
1435         * lib/unistr/u16-strmblen.c: New file.
1436         * lib/unistr/u32-strmblen.c: New file.
1437
1438         * modules/unistr/u8-strmbtouc: New file.
1439         * modules/unistr/u16-strmbtouc: New file.
1440         * modules/unistr/u32-strmbtouc: New file.
1441         * lib/unistr/u8-strmbtouc.c: New file.
1442         * lib/unistr/u16-strmbtouc.c: New file.
1443         * lib/unistr/u32-strmbtouc.c: New file.
1444
1445         * modules/unistr/u8-strncat: New file.
1446         * modules/unistr/u16-strncat: New file.
1447         * modules/unistr/u32-strncat: New file.
1448         * lib/unistr/u8-strncat.c: New file.
1449         * lib/unistr/u16-strncat.c: New file.
1450         * lib/unistr/u32-strncat.c: New file.
1451         * lib/unistr/u-strncat.h: New file.
1452
1453         * modules/unistr/u8-strncmp: New file.
1454         * modules/unistr/u16-strncmp: New file.
1455         * modules/unistr/u32-strncmp: New file.
1456         * lib/unistr/u8-strncmp.c: New file.
1457         * lib/unistr/u16-strncmp.c: New file.
1458         * lib/unistr/u32-strncmp.c: New file.
1459
1460         * modules/unistr/u8-strncpy: New file.
1461         * modules/unistr/u16-strncpy: New file.
1462         * modules/unistr/u32-strncpy: New file.
1463         * lib/unistr/u8-strncpy.c: New file.
1464         * lib/unistr/u16-strncpy.c: New file.
1465         * lib/unistr/u32-strncpy.c: New file.
1466         * lib/unistr/u-strncpy.h: New file.
1467
1468         * modules/unistr/u8-strnlen: New file.
1469         * modules/unistr/u16-strnlen: New file.
1470         * modules/unistr/u32-strnlen: New file.
1471         * lib/unistr/u8-strnlen.c: New file.
1472         * lib/unistr/u16-strnlen.c: New file.
1473         * lib/unistr/u32-strnlen.c: New file.
1474         * lib/unistr/u-strnlen.h: New file.
1475
1476         * modules/unistr/u8-strpbrk: New file.
1477         * modules/unistr/u16-strpbrk: New file.
1478         * modules/unistr/u32-strpbrk: New file.
1479         * lib/unistr/u8-strpbrk.c: New file.
1480         * lib/unistr/u16-strpbrk.c: New file.
1481         * lib/unistr/u32-strpbrk.c: New file.
1482         * lib/unistr/u-strpbrk.h: New file.
1483
1484         * modules/unistr/u8-strrchr: New file.
1485         * modules/unistr/u16-strrchr: New file.
1486         * modules/unistr/u32-strrchr: New file.
1487         * lib/unistr/u8-strrchr.c: New file.
1488         * lib/unistr/u16-strrchr.c: New file.
1489         * lib/unistr/u32-strrchr.c: New file.
1490
1491         * modules/unistr/u8-strspn: New file.
1492         * modules/unistr/u16-strspn: New file.
1493         * modules/unistr/u32-strspn: New file.
1494         * lib/unistr/u8-strspn.c: New file.
1495         * lib/unistr/u16-strspn.c: New file.
1496         * lib/unistr/u32-strspn.c: New file.
1497         * lib/unistr/u-strspn.h: New file.
1498
1499         * modules/unistr/u8-strstr: New file.
1500         * modules/unistr/u16-strstr: New file.
1501         * modules/unistr/u32-strstr: New file.
1502         * lib/unistr/u8-strstr.c: New file.
1503         * lib/unistr/u16-strstr.c: New file.
1504         * lib/unistr/u32-strstr.c: New file.
1505         * lib/unistr/u-strstr.h: New file.
1506
1507         * modules/unistr/u8-strtok: New file.
1508         * modules/unistr/u16-strtok: New file.
1509         * modules/unistr/u32-strtok: New file.
1510         * lib/unistr/u8-strtok.c: New file.
1511         * lib/unistr/u16-strtok.c: New file.
1512         * lib/unistr/u32-strtok.c: New file.
1513         * lib/unistr/u-strtok.h: New file.
1514
1515         * modules/unistr/u8-uctomb: New file.
1516         * modules/unistr/u16-uctomb: New file.
1517         * modules/unistr/u32-uctomb: New file.
1518         * lib/unistr/u8-uctomb.c: New file.
1519         * lib/unistr/u16-uctomb.c: New file.
1520         * lib/unistr/u32-uctomb.c: New file.
1521
1522         * MODULES.html.sh (Unicode string functions): Add the new modules.
1523
1524 2007-01-08  Bruno Haible  <bruno@clisp.org>
1525
1526         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1527         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1528         subdirectories.
1529
1530 2007-01-08  Karl Berry  <karl@gnu.org>
1531
1532         * doc/error.texi: mention that main() fns must set program_name
1533         when progname is used.
1534
1535 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1536
1537         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1538         WCTYPE_H is empty, for the benefit of builds from non-distclean
1539         directories.  Problem reported by Eric Blake in
1540         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1541
1542 2007-01-08  Bruno Haible  <bruno@clisp.org>
1543
1544         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1545         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1546         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1547         PROVIDE_CANONICALIZE_FILENAME_MODE.
1548         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1549
1550 2007-01-08  Bruno Haible  <bruno@clisp.org>
1551
1552         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1553         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1554         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1555         * lib/fts.c: Likewise.
1556         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1557
1558 2006-12-25  Bruno Haible  <bruno@clisp.org>
1559
1560         * modules/utf8-ucs4-safe: New file.
1561         * lib/utf8-ucs4-safe.h: New file.
1562         * lib/unistr/utf8-ucs4-safe.c: New file.
1563
1564         * modules/utf16-ucs4-safe: New file.
1565         * lib/utf16-ucs4-safe.h: New file.
1566         * lib/unistr/utf16-ucs4-safe.c: New file.
1567
1568         * MODULES.html.sh (Unicode string functions): Add the new modules.
1569
1570 2007-01-08  Bruno Haible  <bruno@clisp.org>
1571
1572         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1573         (Depends-on): Add unitypes.
1574         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1575         (u8_mbtouc_aux): Move out to separate file.
1576         (u8_mbtouc): Use ucs4_t, uint8_t types.
1577         * lib/unistr/utf8-ucs4.c: New file.
1578
1579         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1580         (Depends-on): Add unitypes.
1581         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1582         (u16_mbtouc_aux): Move out to separate file.
1583         (u16_mbtouc): Use ucs4_t, uint16_t types.
1584         * lib/unistr/utf16-ucs4.c: New file.
1585
1586         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1587         (Depends-on): Add unitypes.
1588         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1589         (u8_uctomb_aux): Move out to separate file.
1590         (u8_uctomb): Use ucs4_t, uint8_t types.
1591         * lib/unistr/ucs4-utf8.c: New file.
1592
1593         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1594         (Depends-on): Add unitypes.
1595         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1596         (u16_uctomb_aux): Move out to separate file.
1597         (u16_uctomb): Use ucs4_t, uint16_t types.
1598         * lib/unistr/ucs4-utf16.c: New file.
1599
1600 2006-12-25  Bruno Haible  <bruno@clisp.org>
1601
1602         * modules/unitypes: New file.
1603         * lib/unitypes.h: New file.
1604         * MODULES.html.sh (func_all_modules): New section "Unicode string
1605         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1606         this section. Add unitypes.
1607
1608 2007-01-08  Bruno Haible  <bruno@clisp.org>
1609
1610         Avoid variable names that conflict with those from libtool.
1611         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1612         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1613         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1614         library_names_spec to acl_library_names_spec, hardcode_* to
1615         acl_hardcode_*.
1616         Reported by Ralf Wildenhues.
1617
1618 2007-01-08  Bruno Haible  <bruno@clisp.org>
1619
1620         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1621         definition.
1622         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1623         definition.
1624         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1625         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1626         definition.
1627         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1628         definition.
1629         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1630         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1631         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1632         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1633         definition.
1634         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1635         definition.
1636         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1637         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1638         GC_USE_<algorithm>.
1639         * lib/gc-libgcrypt.c: Likewise.
1640         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1641         * modules/gc-arctwo (configure.ac): Likewise.
1642         * modules/gc-des (configure.ac): Likewise.
1643         * modules/gc-hmac-md5 (configure.ac): Likewise.
1644         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1645         * modules/gc-md2 (configure.ac): Likewise.
1646         * modules/gc-md4 (configure.ac): Likewise.
1647         * modules/gc-md5 (configure.ac): Likewise.
1648         * modules/gc-random (configure.ac): Likewise.
1649         * modules/gc-rijndael (configure.ac): Likewise.
1650         * modules/gc-sha1 (configure.ac): Likewise.
1651
1652 2007-01-08  Bruno Haible  <bruno@clisp.org>
1653
1654         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1655         macro definition.
1656         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1657         definition.
1658         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1659         definition.
1660         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1661         * modules/fcntl-safer (configure.ac): Likewise.
1662         * modules/fopen-safer (configure.ac): Likewise.
1663         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1664         GNULIB_FWRITEERROR macro definition.
1665
1666 2007-01-08  Bruno Haible  <bruno@clisp.org>
1667
1668         * m4/gnulib-common.m4: New file.
1669         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1670         (func_get_filelist): Add m4/gnulib-common.m4.
1671
1672 2007-01-08  Bruno Haible  <bruno@clisp.org>
1673
1674         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1675         command.
1676
1677 2007-01-08  Jim Meyering  <jim@meyering.net>
1678
1679         Use a more robust test for a "can't happen" condition.
1680         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1681         narrowed the st_size value.  Presuming the "can't happen" condition
1682         is true, that narrowing could conceivably convert an invalid st_size
1683         value into a valid one.  Instead, use a change based on Matthew
1684         Woehlke's original patch.
1685
1686         Slight readability improvement: use an assert-like macro
1687         in place of literal "abort ()" uses.
1688         * lib/fts.c (fts_assert): Define.
1689         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1690         Use this macro instead of a bare 'abort'.
1691
1692 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1693
1694         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1695         simply work around them.
1696         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1697         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1698         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1699         Don't bother to define as macros, since the standard doesn't require it.
1700         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1701         longer worry about IRIX 5.3.
1702         (HAVE_WCTYPE_CTMP_BUG): Remove.
1703
1704 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1705
1706         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1707         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1708         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1709         Problems reported by Georg Schwarz for IRIX 5.3.
1710
1711         * gnulib-tool (autoconf_minversion): Take the maximum version number
1712         found, not the minimum.  Problem reported by James Youngman.
1713
1714 2007-01-03  Karl Berry  <karl@gnu.org>
1715
1716         * doc/error.texi: new file, explaining interaction with progname.
1717         * doc/gnulib.texi: include it.  Update copyright.
1718
1719 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1720
1721         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1722         AC_CANONICAL_HOST, to improve autobuild outputs.
1723
1724 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1725             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1726
1727         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1728         sockets, server sockets, and other file descriptors.  Count errors
1729         to compute the return value.  Reorder the code a bit to be easier
1730         to follow.  Don't set event bits that were not requested (except
1731         POLLERR and POLLHUP).
1732
1733 2007-01-01  Bruno Haible  <bruno@clisp.org>
1734
1735         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1736
1737 2007-01-03  Jim Meyering  <jim@meyering.net>
1738
1739         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1740
1741 2007-01-02  Bruno Haible  <bruno@clisp.org>
1742
1743         * modules/settime (Include): Require timespec.h.
1744         * modules/nanosleep (Include): Likewise.
1745
1746 2007-01-01  Bruno Haible  <bruno@clisp.org>
1747
1748         * gnulib-tool (func_emit_copyright_notice): Bump year.
1749         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1750
1751 2007-01-01  Bruno Haible  <bruno@clisp.org>
1752
1753         Improve support for OpenBSD.
1754         * build-aux/config.rpath (libname_spec): Export.
1755         (library_names_spec): New variable. Export.
1756         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1757         library_names_spec from the config.rpath output. Locate shared library
1758         through the name pattern in library_names_spec.
1759
1760 2007-01-01  Eric Blake  <ebb9@byu.net>
1761
1762         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1763
1764 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1765
1766         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1767         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1768         assume the C locale, and avoid an "eval" that could cause trouble.
1769         Problem with SORT reported by Bob Proulx.
1770
1771         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1772         Define.  Trivial patch from Henning Nielsen Lund, originally
1773         sent to bug-grep@gnu.org today.
1774
1775 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1776
1777         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1778         struct stat.  Problem reported by Henning Nielsen Lund.
1779         * lib/acl.c: Include acl.h first, to check interface.  Don't
1780         bother to include sys/types.h and sys/stat.h again.
1781
1782 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1783
1784         Import the following change from libc; problem reported by
1785         Sven Verdoolaege.
1786
1787         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1788
1789         [BZ #1373]
1790         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1791
1792 2006-12-28  Jim Meyering  <jim@meyering.net>
1793
1794         * build-aux/announce-gen: Do not assume that the package
1795         builds any of tar.gz, tar.bz2, and .xdelta files.
1796         Suggestion from Simon Josefsson.
1797
1798 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1799
1800         * modules/announce-gen: New file.
1801
1802 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1803
1804         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1805         handles its gotchas now.
1806         * lib/mbswidth.c: Likewise.
1807         * lib/wcwidth.h: Likewise.
1808         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1809         and iswcntrl; the wctype module does this stuff now.
1810         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1811         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1812         * modules/mbchar (Depends-on): Add wctype.
1813         * modules/mbswidth (Depends-on): Likewise.
1814         * modules/wcwidth (Depends-on): Likewise.
1815
1816 2006-12-27  Eric Blake  <ebb9@byu.net>
1817
1818         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1819         module uses more than what <wctype.h> is required to provide.
1820
1821 2006-12-26  Eric Blake  <ebb9@byu.net>
1822
1823         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1824
1825 2006-12-26  Eric Blake  <ebb9@byu.net>
1826
1827         * modules/absolute-header: New module.
1828         * modules/fcntl (Depends-on): Depend on it.
1829         * modules/inttypes (Depends-on): Likewise.
1830         * modules/stdint (Depends-on): Likewise.
1831         * modules/sys_stat (Depends-on): Likewise.
1832         * modules/wctype (Depends-on): Likewise.
1833         * MODULES.html.sh (Support for building libraries and
1834         executables): Document it.
1835
1836 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1837
1838         * gnulib-tool (SED): Remove, undoing previous change.
1839         The problem was that it broke coreutils on Solaris, because
1840         "sed --posix" leaked into a makefile.
1841         (sed): New alias, if 'alias' and GNU sed.
1842
1843 2006-12-24  Jim Meyering  <jim@meyering.net>
1844
1845         Work around an fchownat bug in glibc-2.4:
1846         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1847         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1848         in spite of the -P option.
1849         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1850         New macros.
1851         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1852         * modules/openat (Files): Add lib/fchownat.c.
1853         * lib/openat.c (fchownat): Don't define here.  Move to...
1854         * lib/fchownat.c: ...this new file.
1855
1856 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
1857
1858         Fix bug reported by Bruno Haible in
1859         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
1860         where quotearg.c didn't compile on Mac OS X 10.2 because it
1861         lacks <wchar.h> and wint_t.
1862         * lib/wctype_.h (__wctype_wint_t): New type.
1863         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
1864         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
1865         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
1866         Arg is now of type __wctype_wint_t, not wint_t.
1867         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
1868         substitute HAVE_WINT_T.
1869         * modules/wctype (Files): Add m4/wint_t.m4.
1870         (wctype.h): Substitute HAVE_WINT_T.
1871
1872 2006-12-23  Bruno Haible  <bruno@clisp.org>
1873
1874         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
1875
1876 2006-12-23  Bruno Haible  <bruno@clisp.org>
1877
1878         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
1879         S_ISLNK.
1880         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
1881         mingw.
1882
1883 2006-12-22  Bruno Haible  <bruno@clisp.org>
1884
1885         * lib/copy-file.c: Include acl.h.
1886         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
1887         Close the file descriptors only after being done with copy_acl.
1888         * modules/copy-file (Depends-on): Add acl.
1889
1890 2006-12-22  Bruno Haible  <bruno@clisp.org>
1891
1892         * gnulib-tool (SED): New variable.
1893         Use $SED instead of sed everywhere.
1894
1895 2006-12-22  Bruno Haible  <bruno@clisp.org>
1896
1897         * modules/no-c++: New file.
1898         * m4/no-c++.m4: New file.
1899         * MODULES.html.sh (Support for building libraries and executables):
1900         Add no-c++.
1901
1902 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
1903
1904         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
1905         Include <limits.h>, and use its INT_MAX to rewrite the
1906         j loop so that it does not overflow 'int'.  Problem reported by
1907         Ralf Wildenhues in
1908         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
1909         Play it safe by shifting left by 1 rather than multiplying by 2,
1910         as GCC is less likely to optimize this away when the value
1911         is signed (when it assumes overflow leads to undefined behavior).
1912         Also, don't assume time_t uses two's complement.
1913
1914 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
1915
1916         * MODULES.html.sh: New module wctype.
1917         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
1918         * lib/fnmatch.c: Don't bother to include <wchar.h> before
1919         <wctype.h>, since the new wctype module should fix this.
1920         * lib/quotearg.c: Include <wctype.h> unconditionally, since
1921         the wctype module should arrange for it.
1922         * lib/regex_internal.h: Likewise.
1923         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
1924         since the wctype module should handle this now.
1925         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
1926         * modules/fnmatch (Depends-on): Add wctype.
1927         * modules/quotearg (Depends-on): Likewise.
1928         * modules/regex (Depends-on): Likewise.
1929
1930 2006-12-19  Bruno Haible  <bruno@clisp.org>
1931
1932         * lib/strdup.h [C++]: Wrap definitions in extern "C".
1933         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
1934
1935 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1936
1937         * modules/savewd (Depends-on): Fix dependency on fcntl.
1938
1939 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1940
1941         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
1942         conforms to C99, rather than relying on the user's environment
1943         setting of STDINT_H.
1944
1945 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
1946         and Eric Blake  <ebb9@byu.net>
1947
1948         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
1949         This is more consistent with the other defines here.
1950         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
1951         Port to z/OS.  Problem reported by Paul Gilmartin.
1952         Change local vars to use gl_ prefix rather than ac_.
1953         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
1954         with other defines.
1955         * modules/double-slash-root: New module.
1956         * modules/dirname (Files): Remove m4/double-slash-root.m4.
1957         (Depends-on): Add double-slash-root.
1958         * MODULES.html.sh (File system functions): Mention new module.
1959
1960 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
1961
1962         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
1963         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
1964         This is for the benefit of gzip, which doesn't do i18n.
1965
1966 2006-12-12  Jim Meyering  <jim@meyering.net>
1967
1968         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
1969         Reported by Andreas Schwab <schwab@suse.de>.
1970
1971 2006-12-12  Bruno Haible  <bruno@clisp.org>
1972
1973         Merge these changes.
1974         2006-09-05  Bruno Haible  <bruno@clisp.org>
1975         * lib/iconvme.c (iconv_string): No need to save and restore errno when
1976         iconv_alloc succeeded.
1977         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
1978         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
1979         test for " && dest " at the end - dest is always != NULL there. Call
1980         iconv with 4xNULL arguments initially, to reset the state. Call iconv
1981         with 2xNULL arguments, also to flush the state storage. Handle the
1982         IRIX iconv behaviour. Realloc the final result, to throw away unused
1983         memory.
1984
1985 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
1986
1987         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
1988         and fchmodat unconditionally, since glibc 2.4 has them.
1989         Problem reported by Arkadiusz Miskiewicz.
1990
1991 2006-12-10  Bruno Haible  <bruno@clisp.org>
1992
1993         * gnulib-tool (func_import): Show the include files only for those
1994         modules that are copied and specified.
1995         Reported by Karl Berry.
1996
1997 2006-12-08  Jim Meyering  <jim@meyering.net>
1998
1999         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2000         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2001
2002         * build-aux/announce-gen: Add two new options, both optional:
2003         --bootstrap-tools=TOOL_LIST
2004               a comma-separated list of tools, e.g.,
2005               autoconf,automake,bison,gnulib
2006         --gnulib-snapshot-date=DATE
2007               if gnulib is in the bootstrap tool list,
2008               then report this as the snapshot date.
2009               If not specified, use the current date/time.
2010               If you specify a date here, be sure it's UTC.
2011
2012 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2013
2014         * tests/test-argp-2.sh: Fix test to match actual output.
2015         (func_compare): Fix sed script to be portable.
2016
2017 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2018
2019         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2020         workaround for this case.  It is not autoconfigured now; offhand
2021         it's hard to see how to autoconfigure it.
2022
2023 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2024
2025         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2026         a directory that is about to be chowned.  Such a directory's
2027         initial file permissions should permit the owner only and this
2028         should not be changed until after the chown, since the group and
2029         other bits would be incorrect if they granted permission before
2030         the chown.
2031
2032         Fix porting problem for iswctype reported by Georg Schwarz in:
2033         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2034         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2035         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2036         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2037         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2038
2039 2006-12-03  Jim Meyering  <jim@meyering.net>
2040
2041         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2042         p->fts_statp may not yet be defined.
2043         (fts_read): Instead, set it in the caller, once p->fts_statp is
2044         sure to be defined, and corresponds to a top-level directory.
2045         This bug made du -x fail.  Here's the coreutils test case:
2046         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2047         Reported by Mike Frysinger.
2048
2049 2006-12-01  Jim Meyering  <jim@meyering.net>
2050
2051         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2052         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2053         Reported by Simon Josefsson.
2054
2055 2006-11-30  Jim Meyering  <jim@meyering.net>
2056
2057         * m4/warning.m4: Use the all-permissive copyright notice
2058         recommended by RMS (rather than LGPL).
2059         * m4/vararrays.m4: Likewise.
2060         * m4/flexmember.m4: Likewise.
2061
2062 2006-11-29  Bruno Haible  <bruno@clisp.org>
2063
2064         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2065         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2066         using +=.
2067         Reported by Simon Josefsson <simon@josefsson.org>.
2068
2069 2006-11-28  James Youngman <jay@gnu.org>
2070
2071         * README: Advise users that they might find the bug-gnulib@gnu.org
2072         and autotools-announce@gnu.org mailing lists useful.
2073
2074 2006-11-28  Bruno Haible  <bruno@clisp.org>
2075
2076         * m4/ptrdiff_max.m4: Remove file.
2077
2078 2006-11-21  Bruno Haible  <bruno@clisp.org>
2079
2080         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2081         _AC_COMPUTE_INT.
2082         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2083         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2084         _AC_COMPUTE_INT.
2085         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2086         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2087         _AC_COMPUTE_INT.
2088         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2089
2090 2006-11-28  Jim Meyering  <jim@meyering.net>
2091
2092         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2093         warning from "gcc -Wshadow" about shadowing the builtin.
2094
2095 2006-11-27  Bruno Haible  <bruno@clisp.org>
2096
2097         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2098         _AC_COMPUTE_INT.
2099         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2100
2101 2006-11-27  Bruno Haible  <bruno@clisp.org>
2102             Paul Eggert  <eggert@cs.ucla.edu>
2103
2104         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2105
2106 2006-11-26  Bruno Haible  <bruno@clisp.org>
2107
2108         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2109         noinst_LTLIBRARIES.
2110
2111 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2112             Bruno Haible  <bruno@clisp.org>
2113
2114         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2115         if compiling with "gcc -ansi".
2116
2117 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2118
2119         Fix some incompatibilities with gcc -ansi -pedantic.
2120         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2121         if compiling pedantically with GCC, unless it's C99 or later.
2122         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2123         it mishandles gcc -ansi -pedantic as well.
2124         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2125         if gcc -pedantic.
2126         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2127         initializers for struct if -pedantic, unless it's C99 or later.
2128
2129 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2130
2131         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2132         Don't close an fd more than once. Identical atimes indicate
2133         success, not failure.
2134
2135 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2136
2137         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2138
2139 2006-11-23  Jim Meyering  <jim@meyering.net>
2140
2141         * build-aux/announce-gen: New file.  From coreutils.
2142
2143 2006-11-22  Jim Meyering  <jim@meyering.net>
2144
2145         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2146         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2147         (fts_read): Use a temporary to narrow the overused st_size member
2148         before using it in a switch statement.  Reported by Matthew Woehlke.
2149
2150         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2151         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2152
2153 2006-11-20  Bruno Haible  <bruno@clisp.org>
2154
2155         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2156         changequote instead of pairs of brackets.
2157         Reported by Andreas Schwab <schwab@suse.de>.
2158
2159 2006-11-21  Jim Meyering  <jim@meyering.net>
2160
2161         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2162         so as to remain compatible with older compilers.
2163         Patch from Michael Deutschmann.
2164
2165 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2166
2167         * MODULES.html.sh (File system functions): Add openat.
2168
2169         * lib/openat.h (rpl_fstatat): New macro, if
2170         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2171         (fstatat): Define to rpl_fstatat under the same conditions,
2172         unless COMPILING_FSTATAT.
2173         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2174         seems to have the bug.
2175         * lib/fstatat.c: New file.
2176         * modules/openat (Files): Add it.
2177
2178 2006-11-20  Bruno Haible  <bruno@clisp.org>
2179
2180         * Makefile: New file.
2181
2182 2006-11-20  Jim Meyering  <jim@meyering.net>
2183
2184         The beginnings of syntax-related checks for gnulib.
2185         * lib/Makefile: New file.
2186         * lib/t-idcache: New script.  Ensure that the two halves of
2187         idcache.c stay in sync.
2188
2189         * lib/idcache.c: Adjust comments in user- and group- portions to
2190         be more accurate, and to be consistent with one another.
2191
2192 2006-11-20  Jim Meyering  <jim@meyering.net>
2193
2194         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2195         continue using the flexible array member (thus, this module performs
2196         half as many malloc calls), with the addition that...
2197         (getgroup, getuser): Consistently record a non-match via an empty
2198         "name" string, and map an empty string match to a NULL return value.
2199         * modules/idcache (Depends-on): Re-add flexmember.
2200
2201         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2202         (getuidbyname, getgroup, getgidbyname): Likewise.
2203
2204         Use cleaner syntax: NULL rather than 0.
2205         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2206
2207 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2208
2209         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2210         It mishandled the case where the group was missing.
2211         Problem reported by Greg Schafer.
2212         * modules/idcache: Likewise.
2213
2214 2006-11-18  Jim Meyering  <jim@meyering.net>
2215
2216         * check-module (%exempt_header): Add exception for some
2217         conditionally-included headers.
2218
2219         * modules/i-ring (Depends-on): Add verify.
2220         (License): Change to LGPL.
2221
2222 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2223
2224         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2225         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2226         and inttostr.h.  Use snprintf rather than uinttostr, so that
2227         LGPLed code doesn't depend on GPLed.
2228
2229 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2230
2231         * modules/inline (License): Change from GPL to LGPL.
2232
2233 2006-11-17  Jim Meyering  <jim@meyering.net>
2234
2235         * modules/d-type (License): Switch to LGPL.
2236
2237 2006-11-15  Bruno Haible  <bruno@clisp.org>
2238
2239         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2240
2241 2006-11-15  Eric Blake  <ebb9@byu.net>
2242
2243         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2244         the module dependency.
2245
2246 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2247             Bruno Haible  <bruno@clisp.org>
2248
2249         * gnulib-tool (func_create_testdir): Add license consistency check.
2250
2251 2006-11-15  Eric Blake  <ebb9@byu.net>
2252
2253         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2254         random "(cached)" in configure output.
2255
2256 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2257
2258         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2259         test for conforming inttypes.h is both announced and cached.
2260
2261         * MODULES.html.sh (seen_modules, seen_files): New variables.
2262         (func_module): Rewrite to use a few less gnulib-tool and sed
2263         invocations.  Avoid a couple of quadratic algorithms for ...
2264         (missed_modules, missed_files): ... these, with ...
2265         (func_append, func_tmpdir): ... these new functions, from
2266         gnulib-tool.  Analogously, install traps for cleanup.
2267
2268         * tests/test-gc.c (main): Remove unused variables.
2269         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2270
2271 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2272
2273         * modules/inttostr (License): Change to LGPL.
2274
2275 2006-11-14  Eric Blake  <ebb9@byu.net>
2276
2277         * modules/tempname (License): Change to LGPL.
2278
2279 2006-11-14  Eric Blake  <ebb9@byu.net>
2280
2281         * doc/functions.texi (Function Portability): *printf functions on
2282         Cygwin now understand all POSIX size specifiers.
2283
2284 2006-11-14  Bruno Haible  <bruno@clisp.org>
2285
2286         * modules/c-ctype (License): Change to LGPL.
2287
2288 2006-11-12  Bruno Haible  <bruno@clisp.org>
2289
2290         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2291         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2292         for GNOME libraries, for which the include files are installed in
2293         subdirectories of $prefix/include.
2294
2295 2006-11-12  Bruno Haible  <bruno@clisp.org>
2296
2297         * m4/lib-link.m4: Require at least autoconf-2.54.
2298         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2299         name to underscores for the --with option.
2300
2301 2006-11-13  Bruno Haible  <bruno@clisp.org>
2302
2303         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2304         the tests directory.
2305         Reported by Ralf Wildenhues.
2306
2307 2006-11-13  Bruno Haible  <bruno@clisp.org>
2308
2309         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2310         (func_emit_initmacro_end): Undo the override here.
2311         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2312         Works around the famous automake error in coreutils.
2313
2314 2006-11-13  Eric Blake  <ebb9@byu.net>
2315
2316         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2317         element, not its node.
2318
2319 2006-11-12  Bruno Haible  <bruno@clisp.org>
2320
2321         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2322         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2323
2324 2006-11-12  Bruno Haible  <bruno@clisp.org>
2325
2326         * gnulib-tool: New option --local-symlink.
2327         (func_usage): Document it.
2328         (lsymbolic): New variable.
2329         (func_import, func_create_testdir): If --symlink was not specified,
2330         test whether --local-symlink was specified and the file comes from
2331         the local_gnulib_dir.
2332
2333 2006-11-12  Bruno Haible  <bruno@clisp.org>
2334
2335         * gnulib-tool (func_ln): New function.
2336         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2337
2338 2006-11-12  Bruno Haible  <bruno@clisp.org>
2339
2340         Finish support for source files in subdirectories.
2341         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2342         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2343         AUTOMAKE_OPTIONS.
2344         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2345
2346 2006-11-12  Bruno Haible  <bruno@clisp.org>
2347
2348         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2349         EXTRA_lib_SOURCES augmentation.
2350         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2351
2352 2006-11-12  Jim Meyering  <jim@meyering.net>
2353
2354         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2355         file descriptors.  This also averts a failure on systems with
2356         native openat support when a traversed directory lacks "x" access.
2357         * lib/fts_.h: Include "i-ring.h"
2358         (struct FTS) [fts_fd_ring]: New member.
2359         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2360         (FCHDIR): Add parentheses.
2361         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2362         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2363         When descending, rather than simply closing the previous
2364         fts_cwd_fd value, push that file descriptor onto the ring.
2365         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2366         (fts_open): Initialize the new fd_ring member.
2367         (fts_close): Clear the ring.
2368         (fts_safe_changedir): When possible, use our new fd_ring to skip
2369         the diropen and fstat and dev/ino comparison that would normally
2370         accompany a virtual `chdir ("..")'.
2371
2372         * modules/fts (Depends-on): Add i-ring.
2373         * modules/i-ring: New module.
2374         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2375         * m4/i-ring.m4: New file.
2376
2377 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2378
2379         * gnulib-tool (func_create_testdir): Fix replacement of
2380         `build-aux' in configure.ac.  Run autotools in gltests
2381         subdirectory.
2382         (func_create_testdir, func_create_megatestdir, test): There is
2383         no need for '--force' in most autotool invocations in a new
2384         tree.  Actually fail the whole test if any of the tools, or the
2385         configure or make stages fail.
2386
2387         Sync from Automake.
2388         * build-aux/gnupload: Revert last change.  Add pointer to upload
2389         instructions of the GNU Maintenance Instructions.
2390         Suggestion by Karl Berry.
2391
2392 2006-11-10  Jim Meyering  <jim@meyering.net>
2393
2394         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2395
2396 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2397
2398         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2399         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2400         (bind_textdomain_codeset) [! ENABLE_NLS]:
2401         Evaluate all the arguments.  That way, callers get compatible behavior
2402         if the arguments have side effects.  Also, it avoids some GCC
2403         diagnostics in some cases; Joel E. Denny reported problems when Bison
2404         was configured with --enable-gcc-warnigs.
2405
2406 2006-11-10  Jim Meyering  <jim@meyering.net>
2407
2408         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2409         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2410         account.
2411
2412 2006-11-10  Jim Meyering  <jim@meyering.net>
2413
2414         * modules/inline: New file/module.
2415         * modules/xalloc (Files): Remove m4/inline.m4.
2416         (Depends-on): Add inline, instead.
2417         * modules/oset: Likewise.
2418         * modules/list: Likewise.
2419
2420 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2421
2422         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2423         Problem reported by Matthew Woehlke.
2424
2425 2006-11-09  Bruno Haible  <bruno@clisp.org>
2426
2427         * lib/tempname.c (gen_tempname): Remove variant that invokes
2428         __gen_tempname.
2429         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2430         __gen_tempname.
2431
2432 2006-11-08  Bruno Haible  <bruno@clisp.org>
2433
2434         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2435         to 'yes' instead of 'cross-compiling'.
2436
2437 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2438
2439         * lib/quotearg.h (quotearg_free): New decl.
2440         * lib/quotearg.c (quotearg_free): New function.
2441         (slot0, nslots, slotvec0, slotvec):
2442         Now file-scope so that quotearg_free can get at them.
2443
2444 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2445
2446         Sync from Automake.
2447         * build-aux/gnupload: Add missing 'gnu' to example URL.
2448         Report by Karl Berry.
2449
2450 2006-11-08  Bruno Haible  <bruno@clisp.org>
2451
2452         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2453         Suggested by Paul Eggert.
2454
2455 2006-11-08  Jim Meyering  <jim@meyering.net>
2456
2457         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2458         It's already included if !_LIBC.
2459         (fts_safe_changedir): Add a comment.
2460
2461 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2462
2463         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2464         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2465         Matthew Woehlke.
2466
2467         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2468         definitions up, to avoid colliding with change below.
2469         (static_inline) [HAVE_INLINE]: New macro.
2470         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2471         Provide extern decls when !HAVE_INLINE.  Do not define unless
2472         static_inline is defined, either by us or by xmalloc.c.  Use
2473         static_inline rather than static inline.
2474         (XCALLOC): Optimize sizeof(T) = 1 case.
2475         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2476
2477 2006-11-07  Bruno Haible  <bruno@clisp.org>
2478
2479         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2480         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2481         AC_C_INLINE.
2482         * modules/xalloc (Files): Add m4/inline.m4.
2483
2484 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2485
2486         * README: Fix typo.
2487         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2488         (Miscellanous Notes): ...from this.
2489
2490 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2491
2492         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2493         Mention that offsetof should be used instead of sizeof.
2494         From Bruno Haible.
2495
2496 2006-11-07  Bruno Haible  <bruno@clisp.org>
2497
2498         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2499
2500 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2501
2502         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2503         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2504         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2505         (gl_tree_add_before, gl_tree_add_after):
2506         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2507         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2508         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2509         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2510         (gl_linked_add_after, gl_linked_add_at): Likewise.
2511         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2512         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2513         (gl_tree_add_before, gl_tree_add_after): Likewise.
2514         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2515         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2516         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2517
2518 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2519
2520         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2521
2522 2006-11-06  Bruno Haible  <bruno@clisp.org>
2523
2524         * m4/inline.m4: New file.
2525         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2526         * modules/list (Files): Add m4/inline.m4.
2527         * modules/oset (Files): Likewise.
2528
2529 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2530
2531         * lib/idcache.c: Include <stddef.h>, for offsetof.
2532         (struct userid.name): Change from char * to a flexible array member.
2533         All uses changed.
2534         * modules/idcache (Depends-on): Add flexmember.
2535
2536         * MODULES.html.sh (Core language properties): New module flexmember.
2537         * modules/flexmember, m4/flexmember.m4: New files.
2538
2539         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2540         inline functions that are identical with the old xnmalloc_inline,
2541         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2542         that we can avoid some unnecessary integer multiplications and
2543         divisions in the common case where the element size is known at
2544         compile time.
2545         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2546         needed.
2547         (xnboundedmalloc): Remove.
2548         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2549         arguments, for consistency with rest of this header.
2550         (xcharalloc): Rewrite using XNMALLOC.
2551         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2552         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2553         versions have been moved to lib/xalloc.h and renamed to be the
2554         non-*_inline versions.
2555         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2556         and xnrealloc functions, since those functions are now inline and
2557         now call us.
2558         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2559         renaming described above.
2560         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2561         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2562         captures the dependency in AC_C_INLINE.
2563
2564         New module canonicalize-lgpl, proposed by Charles Wilson in
2565         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2566         with a few small changes afterwards.
2567         * MODULES.html.sh (File system functions): New module
2568         canonicalize-lgpl.
2569         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2570         and canonicalize_file_name.
2571         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2572         * modules/canonicalize-lgpl: New files.
2573
2574 2006-11-05  Bruno Haible  <bruno@clisp.org>
2575
2576         * gnulib-tool (func_import, func_create_testdir): Create directories
2577         also for files in subdirectories of lib/.
2578
2579 2006-11-05  Bruno Haible  <bruno@clisp.org>
2580
2581         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2582         ANSI C compliant.
2583
2584 2006-11-03  Bruno Haible  <bruno@clisp.org>
2585
2586         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2587         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2588         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2589         (xnboundedmalloc): New inline function.
2590         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2591         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2592         xmalloc.
2593         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2594         xmalloc.
2595         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2596         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2597         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2598         xmalloc.
2599         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2600         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2601         xmalloc.
2602         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2603         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2604         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2605         xmalloc.
2606         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2607         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2608         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2609         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2610         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2611         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2612         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2613
2614 2006-11-03  Bruno Haible  <bruno@clisp.org>
2615
2616         * lib/c-ctype.h [C++]: Define functions without name mangling.
2617         * lib/fwriteerror.h [C++]: Likewise.
2618         * lib/gcd.h [C++]: Likewise.
2619         * lib/linebreak.h [C++]: Likewise.
2620
2621 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2622
2623         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2624         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2625         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2626         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2627         Check for functions and headers just once.
2628         Check for declaration of canonicalize_file_name.
2629         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2630
2631 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2632
2633         * gnulib-tool (func_import): Fix typo in actioncmd.
2634
2635 2006-11-02  Bruno Haible  <bruno@clisp.org>
2636
2637         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2638         newline sequence in the Makefile.am snippet as a space, like "make"
2639         does.
2640         Reported by Roger Persson <perrog@gmail.com>.
2641
2642 2006-11-01  Bruno Haible  <bruno@clisp.org>
2643
2644         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2645         already declared in <string.h>.
2646         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2647
2648 2006-11-01  Bruno Haible  <bruno@clisp.org>
2649
2650         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2651         * lib/strcase.h: Include <string.h>.
2652         (strcasecmp): Define to rpl_strcasecmp here.
2653
2654 2006-11-01  Bruno Haible  <bruno@clisp.org>
2655
2656         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2657
2658 2006-11-01  Eric Blake  <ebb9@byu.net>
2659
2660         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2661
2662         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2663
2664 2006-10-29  Bruno Haible  <bruno@clisp.org>
2665
2666         Make it compile in C++ mode.
2667         * lib/full-write.c (full_rw): Add a cast.
2668
2669 2006-11-01  Bruno Haible  <bruno@clisp.org>
2670
2671         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2672         be POSIX compliant.
2673         Reported by Roger Persson <perrog@gmail.com>.
2674
2675 2006-11-01  Eric Blake  <ebb9@byu.net>
2676
2677         * lib/getopt_.h: Fix comments.
2678
2679 2006-10-31  Eric Blake  <ebb9@byu.net>
2680
2681         * modules/tmpdir (Depends-on): Add sys_stat.
2682         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2683         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2684         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2685         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2686         tempname.
2687
2688 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2689
2690         Avoid some C++ diagnostics reported by Bruno Haible.
2691         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2692         xmalloc.
2693         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2694         (struct slotvec): Move to top level.
2695         (quotearg_n_options): Rewrite to avoid xmalloc.
2696         * lib/xalloc.h (xcharalloc): New function.
2697         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2698         [defined __cplusplus]: Add function template that provides result
2699         type propagation.  This part of the change is from Bruno Haible.
2700
2701 2006-10-29  Bruno Haible  <bruno@clisp.org>
2702
2703         Make it compile in C++ mode.
2704         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2705         * lib/strnlen1.c (strnlen1): Cast memchr result.
2706         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2707         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2708         (create_temp_dir): Rename local variable 'template'.
2709         (compile_csharp_using_sscli): Add cast.
2710         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2711         * lib/findprog.c (find_in_path): Likewise.
2712         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2713         * lib/wait-process.c (register_slave_subprocess): Likewise.
2714
2715 2006-10-22  Bruno Haible  <bruno@clisp.org>
2716
2717         * modules/tsearch: New file.
2718         * lib/tsearch.h: New file.
2719         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2720         * m4/tsearch.m4: New file.
2721         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2722
2723 2006-10-29  Eric Blake  <ebb9@byu.net>
2724
2725         * lib/arcfour.c: Assume config.h.
2726         * lib/arctwo.c: Likewise.
2727         * lib/base64.c: Likewise.
2728         * lib/check-version.c: Likewise.
2729         * lib/crc.c: Likewise.
2730         * lib/des.c: Likewise.
2731         * lib/gc-gnulib.c: Likewise.
2732         * lib/gc-libgcrypt.c: Likewise.
2733         * lib/gc-pbkdf2-sha1.c: Likewise.
2734         * lib/getaddrinfo.c: Likewise.
2735         * lib/getdelim.c: Likewise.
2736         * lib/getline.c: Likewise.
2737         * lib/hmac-md5.c: Likewise.
2738         * lib/hmac-sha1.c: Likewise.
2739         * lib/iconvme.c: Likewise.
2740         * lib/md2.c: Likewise.
2741         * lib/md4.c: Likewise.
2742         * lib/memxor.c: Likewise.
2743         * lib/read-file.c: Likewise.
2744         * lib/readline.c: Likewise.
2745         * lib/rijndael-alg-fst.c: Likewise.
2746         * lib/rijndael-api-fst.c: Likewise.
2747         * lib/xgetdomainname.c: Likewise.
2748
2749 2006-10-28  Eric Blake  <ebb9@byu.net>
2750
2751         * lib/xstrndup.c: Assume config.h.
2752
2753 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2754
2755         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2756         stat-macros.h is now for our own macros, whereas stat_h is for
2757         macros in the <sys/stat.h> name space.
2758         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2759         (STAT_MACROS_H): Remove.
2760         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2761         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2762         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2763         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2764         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2765         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2766         Move these macros to ...
2767         * lib/stat_.h: here.  Don't include stat-macros.h.
2768         * lib/canonicalize.c: Don't include stat-macros.h.
2769         * lib/chown.c: Likewise.
2770         * lib/euidaccess.c: Likewise.
2771         * lib/file-type.c: Likewise.
2772         * lib/filemode.c: Likewise.
2773         * lib/glob.c: Likewise.
2774         * lib/isapipe.c: Likewise.
2775         * lib/lchown.c: Likewise.
2776         * lib/lstat.c: Likewise.
2777         * lib/mkdir-p.c: Likewise.
2778         * lib/rmdir.c: Likewise.
2779         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2780         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2781         unless mkdir isn't declared, to speed up 'configure'.
2782         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2783         would define all the S_* symbols.
2784         * modules/canonicalize (Depends-on):
2785         Depend on sys_stat, not stat-macros.
2786         * modules/chown: Likewise.
2787         * modules/euidaccess: Likewise.
2788         * modules/filemode: Likewise.
2789         * modules/file-type: Likewise.
2790         * modules/glob: Likewise.
2791         * modules/isapipe: Likewise.
2792         * modules/lchown: Likewise.
2793         * modules/lstat: Likewise.
2794         * modules/mkancesdirs: Likewise.
2795         * modules/rmdir: Likewise.
2796         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2797         * modules/modechange: Likewise.
2798         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2799         (configure.ac): Remove gl_STAT_MACROS.
2800         * modules/sys_stat (Depends-on): Remove stat-macros.
2801
2802 2006-10-27  Bruno Haible  <bruno@clisp.org>
2803
2804         * m4/signed.m4: Remove file.
2805         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2806         invocation.
2807         * modules/vasnprintf (Files): Remove m4/signed.m4.
2808
2809 2006-10-27  Bruno Haible  <bruno@clisp.org>
2810
2811         Update to GNU gettext 0.16.
2812         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2813         m4/inttypes-h.m4, m4/signed.m4.
2814         * m4/gettext.m4: Update to GNU gettext 0.16.
2815         * m4/intl.m4: New file, from GNU gettext.
2816         * m4/intldir.m4: New file, from GNU gettext.
2817         * config/srclist.txt: Update
2818
2819 2006-10-27  Eric Blake  <ebb9@byu.net>
2820
2821         * MODULES.html.sh: Document tempname.
2822         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2823         dependencies.
2824         (Files): Move lib/tempname.c...
2825         * modules/tempname: ...to this new module.
2826         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2827         (gl_PREREQ_TEMPNAME): Move...
2828         * m4/tempname.m4: ...to this new file.
2829         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2830         * modules/sys_stat (Depends-on): Add stat-macros.
2831         * lib/stat_.h (includes): Pick up stat macros.
2832         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2833         if stat macros are broken.
2834         * lib/tempname.c (includes): No need to include "stat-macros.h".
2835         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2836         (direxists, __path_search) [!_LIBC]: Don't compile these in
2837         gnulib; the tmpdir module covers that.
2838         * lib/tempname.h: New file.
2839
2840 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2841
2842         * COPYING: Explain how gnulib-tool converts licence headers.
2843         Almost all wording by Eric Blake.
2844
2845 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2846
2847         * lib/mbchar.h (is_basic_table): Make read-only.
2848         * lib/mbchar.c (is_basic_table): Likewise.
2849         Reported by John Darrington.
2850
2851 2006-10-25  Bruno Haible  <bruno@clisp.org>
2852
2853         * lib/progname.h (set_program_name): Undefine before defining.
2854
2855 2006-10-25  Bruno Haible  <bruno@clisp.org>
2856
2857         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
2858         false for non-gcc C++ compilers.
2859         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
2860
2861 2006-10-24  Bruno Haible  <bruno@clisp.org>
2862
2863         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
2864         iconv implementations like Irix iconv.
2865
2866 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2867
2868         * modules/vararrays: New file.
2869         * m4/vararrays.m4: New file, taken from diffutils.
2870         * MODULES.html.sh: New module vararrays.
2871
2872 2006-10-24  Karl Berry  <karl@gnu.org>
2873
2874         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
2875         Don't call GNU Unix.
2876
2877 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2878
2879         * users.txt: Add Libtool.
2880
2881         Sync from Libtool:
2882
2883         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2884
2885         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
2886         to gnulib's policy of including config.h unconditionally.
2887
2888 2006-10-24  Bruno Haible  <bruno@clisp.org>
2889
2890         * modules/wcwidth (Files): Add m4/wint_t.m4.
2891         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
2892         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
2893
2894 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
2895
2896         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
2897         to pacify GCC with some -W flags enabled.  Problem reported by
2898         Bruno Haible.
2899
2900 2006-10-24  Jim Meyering  <jim@meyering.net>
2901
2902         * MODULES.html.sh: Remove uinttostr.  It's not a module.
2903         Reported by Karl Berry.
2904
2905 2006-10-23  Bruno Haible  <bruno@clisp.org>
2906
2907         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
2908
2909 2006-10-24  Bruno Haible  <bruno@clisp.org>
2910
2911         * lib/gl_list.h: Use C comment style, not C++ comment style.
2912
2913 2006-10-23  Eric Blake  <ebb9@byu.net>
2914
2915         * lib/getaddrinfo.c (includes): Add missing include.
2916
2917 2006-10-23  Bruno Haible  <bruno@clisp.org>
2918             Paul Eggert  <eggert@cs.ucla.edu>
2919
2920         Ability to rename obstack_free.
2921         * lib/obstack.h (__obstack_free): New macro. Declare instead of
2922         obstack_free.
2923         (obstack_free): Invoke the __obstack_free macro.
2924         * lib/obstack.c (obstack_free): Use __obstack_free macro.
2925
2926 2006-10-23  Bruno Haible  <bruno@clisp.org>
2927             Paul Eggert  <eggert@cs.ucla.edu>
2928
2929         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
2930         __argc, __argv from the declaration. (They are defined as macros on
2931         mingw.)
2932
2933 2006-10-22  Bruno Haible  <bruno@clisp.org>
2934
2935         * doc/gnulib-intro.texi: New file.
2936         * doc/gnulib.texi: Include it.
2937
2938 2006-10-21  Bruno Haible  <bruno@clisp.org>
2939
2940         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
2941         "Introduction", "Miscellanous Notes", "Particular Modules".
2942
2943 2006-10-21  Bruno Haible  <bruno@clisp.org>
2944
2945         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2946         Change mostlyclean-local rule to avoid sh syntax error from bash
2947         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
2948
2949 2006-10-23  Jim Meyering  <jim@meyering.net>
2950
2951         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
2952         in place of snprintf.
2953
2954         * modules/inttostr (Files): Add lib/uinttostr.c.
2955         * lib/uinttostr.c (inttostr): New file/function.
2956         * lib/inttostr.h (uinttostr): Declare.
2957         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
2958         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
2959         Add uinttostr.
2960         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
2961
2962 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2963
2964         * lib/canonicalize.c (ELOOP): Define if not already defined.
2965         Problem reported by Bruno Haible in
2966         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
2967
2968 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
2969
2970         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
2971         Problem reported by Perry Smith and Ville Laurikari.
2972
2973         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
2974         uses.
2975
2976 2006-10-19  Bruno Haible  <bruno@clisp.org>
2977
2978         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
2979         for mingw.
2980
2981 2006-10-19  Bruno Haible  <bruno@clisp.org>
2982
2983         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
2984         Needed for mingw.
2985
2986 2006-10-19  Bruno Haible  <bruno@clisp.org>
2987
2988         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
2989
2990 2006-10-19  Bruno Haible  <bruno@clisp.org>
2991
2992         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
2993         it.
2994
2995 2006-10-19  Bruno Haible  <bruno@clisp.org>
2996
2997         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
2998         invocation.
2999
3000 2006-10-19  Bruno Haible  <bruno@clisp.org>
3001
3002         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3003         mountlist by default.
3004
3005 2006-10-16  Bruno Haible  <bruno@clisp.org>
3006
3007         * lib/c-strstr.c: Include c-strstr.h.
3008
3009 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3010
3011         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3012         in a slash.
3013
3014 2006-10-18  Bruno Haible  <bruno@clisp.org>
3015
3016         * lib/lock.h [C++]: Wrap definitions in extern "C".
3017
3018 2006-10-18  Bruno Haible  <bruno@clisp.org>
3019
3020         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3021         gl_LIBOBJS list.
3022
3023 2006-10-18  Bruno Haible  <bruno@clisp.org>
3024
3025         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3026
3027 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3028
3029         * lib/xstrtol.h: Include gettext.h.
3030         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3031         Problem reported by Eric Blake.
3032         * modules/xstrtol (Depends-on): Add gettext-h.
3033
3034 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3035
3036         * lib/strftime.c (advance): New macro.
3037         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3038         incomplete type, so you can't add 0 to it.  Problem and patch
3039         reported by Eelco Dolstra for dietlibc.
3040
3041 2006-10-18  Jim Meyering  <jim@meyering.net>
3042
3043         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3044         type for a local, and rename it: s/up/user_proc/.
3045
3046 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3047
3048         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3049         READ_UTMP_USER_PROCESS.
3050         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3051
3052 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3053
3054         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3055         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3056
3057 2006-10-17  Eric Blake  <ebb9@byu.net>
3058
3059         * lib/sigprocmask.c (sigprocmask): Fix typo.
3060
3061         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3062
3063         * modules/clean-temp (Makefile.am): Don't add to make output...
3064         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3065         config.h.
3066
3067 2006-10-17  Bruno Haible  <bruno@clisp.org>
3068
3069         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3070         differently if DEFAULT_TEXT_DOMAIN is set.
3071
3072 2006-10-16  Bruno Haible  <bruno@clisp.org>
3073
3074         * lib/clean-temp.c: Include fwriteerror.h.
3075
3076 2006-10-16  Bruno Haible  <bruno@clisp.org>
3077
3078         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3079
3080 2006-10-16  Bruno Haible  <bruno@clisp.org>
3081
3082         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3083         * lib/sigprocmask.h: Include <sys/types.h>.
3084         (sigset_t): Use the system's definition if present.
3085
3086 2006-10-17  Eric Blake  <ebb9@byu.net>
3087
3088         * lib/xvasprintf.c (includes): Assume config.h.
3089         * lib/xasprintf.c (includes): Likewise.
3090
3091 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3092
3093         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3094         at least as wide as intmax_t.
3095
3096 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3097
3098         (Imported from Automake.)
3099         * build-aux/gnupload: Update to version 1.1 of directive file.
3100
3101 2006-10-16  Eric Blake  <ebb9@byu.net>
3102
3103         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3104         match Automake 1.10a.
3105
3106 2006-10-14  Bruno Haible  <bruno@clisp.org>
3107
3108         * modules/sigprocmask: New file.
3109         * lib/sigprocmask.h: New file.
3110         * lib/sigprocmask.c: New file.
3111         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3112         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3113         request sigprocmask.o.
3114         (gl_PREREQ_SIGPROCMASK): New macro.
3115         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3116         (Depends-on): Add sigprocmask.
3117         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3118         gt_SIGNALBLOCKING. Test for 'raise' only once.
3119         * lib/fatal-signal.c: Include sigprocmask.h.
3120         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3121         unblock_fatal_signals): Define always.
3122         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3123         sigprocmask.
3124
3125 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3126
3127         Sync from Automake.
3128         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3129         which incorrectly sets the mode of an existing destination
3130         directory.  In some cases the unpatched install-sh could do the
3131         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3132         system.  We hope this is rare in practice, but it's clearly worth
3133         fixing.  Problem reported by Alex Unleashed in
3134         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3135         Also, don't bother to check for -m bugs unless we're using -m;
3136         suggested by Stepan Kasal.
3137
3138 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3139
3140         Sync from Automake.
3141         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3142         `-c' flag, so they appear at the same position as in %FASTDEP%
3143         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3144         which ignores unknown options only after the first non-option.
3145         Bug report against M4 by Nelson H. F. Beebe.
3146
3147 2006-10-13  Jim Meyering  <jim@meyering.net>
3148
3149         Fix a bug in yesterday's change.
3150         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3151         p->fts_statp->st_dev would be used uninitialized.
3152         Ensures that we always call fts_stat on the very first entry.
3153         Miklos Szeredi reported that find -xdev stopped working.
3154
3155 2006-10-12  Bruno Haible  <bruno@clisp.org>
3156
3157         * gnulib-tool (func_get_automake_snippet): Append an automatically
3158         computed EXTRA_DIST augmentation.
3159         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3160         * modules/alloca-opt (Makefile.am): Likewise.
3161         * modules/allocsa (Makefile.am): Likewise.
3162         * modules/arcfour (Makefile.am): Likewise.
3163         * modules/arctwo (Makefile.am): Likewise.
3164         * modules/argmatch (Makefile.am): Likewise.
3165         * modules/argz (Makefile.am): Likewise.
3166         * modules/atexit (Makefile.am): Likewise.
3167         * modules/backupfile (Makefile.am): Likewise.
3168         * modules/byteswap (Makefile.am): Likewise.
3169         * modules/c-strtod (Makefile.am): Likewise.
3170         * modules/c-strtold (Makefile.am): Likewise.
3171         * modules/calloc (Makefile.am): Likewise.
3172         * modules/canon-host (Makefile.am): Likewise.
3173         * modules/canonicalize (Makefile.am): Likewise.
3174         * modules/chdir-long (Makefile.am): Likewise.
3175         * modules/chdir-safer (Makefile.am): Likewise.
3176         * modules/check-version (Makefile.am): Likewise.
3177         * modules/chown (Makefile.am): Likewise.
3178         * modules/cloexec (Makefile.am): Likewise.
3179         * modules/close-stream (Makefile.am): Likewise.
3180         * modules/closeout (Makefile.am): Likewise.
3181         * modules/crc (Makefile.am): Likewise.
3182         * modules/csharpexec (Makefile.am): Likewise.
3183         * modules/cycle-check (Makefile.am): Likewise.
3184         * modules/des (Makefile.am): Likewise.
3185         * modules/dev-ino (Makefile.am): Likewise.
3186         * modules/dirfd (Makefile.am): Likewise.
3187         * modules/dirname (Makefile.am): Likewise.
3188         * modules/dup2 (Makefile.am): Likewise.
3189         * modules/eealloc (Makefile.am): Likewise.
3190         * modules/error (Makefile.am): Likewise.
3191         * modules/euidaccess (Makefile.am): Likewise.
3192         * modules/exclude (Makefile.am): Likewise.
3193         * modules/exitfail (Makefile.am): Likewise.
3194         * modules/fcntl-safer (Makefile.am): Likewise.
3195         * modules/fcntl (Makefile.am): Likewise.
3196         * modules/file-type (Makefile.am): Likewise.
3197         * modules/fileblocks (Makefile.am): Likewise.
3198         * modules/filemode (Makefile.am): Likewise.
3199         * modules/filenamecat (Makefile.am): Likewise.
3200         * modules/fnmatch (Makefile.am): Likewise.
3201         * modules/fopen-safer (Makefile.am): Likewise.
3202         * modules/fpending (Makefile.am): Likewise.
3203         * modules/fprintftime (Makefile.am): Likewise.
3204         * modules/free (Makefile.am): Likewise.
3205         * modules/fsusage (Makefile.am): Likewise.
3206         * modules/ftruncate (Makefile.am): Likewise.
3207         * modules/fts (Makefile.am): Likewise.
3208         * modules/gc-arcfour (Makefile.am): Likewise.
3209         * modules/gc-des (Makefile.am): Likewise.
3210         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3211         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3212         * modules/gc-md4 (Makefile.am): Likewise.
3213         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3214         * modules/gc-sha1 (Makefile.am): Likewise.
3215         * modules/gc (Makefile.am): Likewise.
3216         * modules/getaddrinfo (Makefile.am): Likewise.
3217         * modules/getcwd (Makefile.am): Likewise.
3218         * modules/getdelim (Makefile.am): Likewise.
3219         * modules/getdomainname (Makefile.am): Likewise.
3220         * modules/getgroups (Makefile.am): Likewise.
3221         * modules/gethostname (Makefile.am): Likewise.
3222         * modules/gethrxtime (Makefile.am): Likewise.
3223         * modules/getline (Makefile.am): Likewise.
3224         * modules/getloadavg (Makefile.am): Likewise.
3225         * modules/getlogin_r (Makefile.am): Likewise.
3226         * modules/getndelim2 (Makefile.am): Likewise.
3227         * modules/getopt (Makefile.am): Likewise.
3228         * modules/getpagesize (Makefile.am): Likewise.
3229         * modules/getpass-gnu (Makefile.am): Likewise.
3230         * modules/getpass (Makefile.am): Likewise.
3231         * modules/getsubopt (Makefile.am): Likewise.
3232         * modules/gettime (Makefile.am): Likewise.
3233         * modules/gettimeofday (Makefile.am): Likewise.
3234         * modules/getugroups (Makefile.am): Likewise.
3235         * modules/getusershell (Makefile.am): Likewise.
3236         * modules/glob (Makefile.am): Likewise.
3237         * modules/group-member (Makefile.am): Likewise.
3238         * modules/hard-locale (Makefile.am): Likewise.
3239         * modules/hash (Makefile.am): Likewise.
3240         * modules/hmac-md5 (Makefile.am): Likewise.
3241         * modules/hmac-sha1 (Makefile.am): Likewise.
3242         * modules/human (Makefile.am): Likewise.
3243         * modules/idcache (Makefile.am): Likewise.
3244         * modules/imaxabs (Makefile.am): Likewise.
3245         * modules/imaxdiv (Makefile.am): Likewise.
3246         * modules/inet_ntop (Makefile.am): Likewise.
3247         * modules/inet_pton (Makefile.am): Likewise.
3248         * modules/intprops (Makefile.am): Likewise.
3249         * modules/inttostr (Makefile.am): Likewise.
3250         * modules/inttypes (Makefile.am): Likewise.
3251         * modules/isapipe (Makefile.am): Likewise.
3252         * modules/javaversion (Makefile.am): Likewise.
3253         * modules/lchmod (Makefile.am): Likewise.
3254         * modules/lchown (Makefile.am): Likewise.
3255         * modules/localcharset (Makefile.am): Likewise.
3256         * modules/long-options (Makefile.am): Likewise.
3257         * modules/lstat (Makefile.am): Likewise.
3258         * modules/malloc (Makefile.am): Likewise.
3259         * modules/mathl (Makefile.am): Likewise.
3260         * modules/mbchar (Makefile.am): Likewise.
3261         * modules/md2 (Makefile.am): Likewise.
3262         * modules/md4 (Makefile.am): Likewise.
3263         * modules/md5 (Makefile.am): Likewise.
3264         * modules/memcasecmp (Makefile.am): Likewise.
3265         * modules/memchr (Makefile.am): Likewise.
3266         * modules/memcmp (Makefile.am): Likewise.
3267         * modules/memcoll (Makefile.am): Likewise.
3268         * modules/memcpy (Makefile.am): Likewise.
3269         * modules/memmem (Makefile.am): Likewise.
3270         * modules/memmove (Makefile.am): Likewise.
3271         * modules/mempcpy (Makefile.am): Likewise.
3272         * modules/memrchr (Makefile.am): Likewise.
3273         * modules/memset (Makefile.am): Likewise.
3274         * modules/memxor (Makefile.am): Likewise.
3275         * modules/mkancesdirs (Makefile.am): Likewise.
3276         * modules/mkdir-p (Makefile.am): Likewise.
3277         * modules/mkdir (Makefile.am): Likewise.
3278         * modules/mkdtemp (Makefile.am): Likewise.
3279         * modules/mkstemp (Makefile.am): Likewise.
3280         * modules/mktime (Makefile.am): Likewise.
3281         * modules/modechange (Makefile.am): Likewise.
3282         * modules/mountlist (Makefile.am): Likewise.
3283         * modules/nanosleep (Makefile.am): Likewise.
3284         * modules/obstack (Makefile.am): Likewise.
3285         * modules/openat (Makefile.am): Likewise.
3286         * modules/pagealign_alloc (Makefile.am): Likewise.
3287         * modules/pathmax (Makefile.am): Likewise.
3288         * modules/physmem (Makefile.am): Likewise.
3289         * modules/poll (Makefile.am): Likewise.
3290         * modules/posixtm (Makefile.am): Likewise.
3291         * modules/posixver (Makefile.am): Likewise.
3292         * modules/putenv (Makefile.am): Likewise.
3293         * modules/quote (Makefile.am): Likewise.
3294         * modules/quotearg (Makefile.am): Likewise.
3295         * modules/raise (Makefile.am): Likewise.
3296         * modules/read-file (Makefile.am): Likewise.
3297         * modules/readline (Makefile.am): Likewise.
3298         * modules/readlink (Makefile.am): Likewise.
3299         * modules/readtokens (Makefile.am): Likewise.
3300         * modules/readutmp (Makefile.am): Likewise.
3301         * modules/realloc (Makefile.am): Likewise.
3302         * modules/regex (Makefile.am): Likewise.
3303         * modules/rename-dest-slash (Makefile.am): Likewise.
3304         * modules/rename (Makefile.am): Likewise.
3305         * modules/rijndael (Makefile.am): Likewise.
3306         * modules/rmdir (Makefile.am): Likewise.
3307         * modules/rpmatch (Makefile.am): Likewise.
3308         * modules/safe-read (Makefile.am): Likewise.
3309         * modules/safe-write (Makefile.am): Likewise.
3310         * modules/same-inode (Makefile.am): Likewise.
3311         * modules/same (Makefile.am): Likewise.
3312         * modules/save-cwd (Makefile.am): Likewise.
3313         * modules/savedir (Makefile.am): Likewise.
3314         * modules/setenv (Makefile.am): Likewise.
3315         * modules/settime (Makefile.am): Likewise.
3316         * modules/sha1 (Makefile.am): Likewise.
3317         * modules/sig2str (Makefile.am): Likewise.
3318         * modules/snprintf (Makefile.am): Likewise.
3319         * modules/stat-macros (Makefile.am): Likewise.
3320         * modules/stat-time (Makefile.am): Likewise.
3321         * modules/stdbool (Makefile.am): Likewise.
3322         * modules/stdint (Makefile.am): Likewise.
3323         * modules/stdlib-safer (Makefile.am): Likewise.
3324         * modules/stpcpy (Makefile.am): Likewise.
3325         * modules/stpncpy (Makefile.am): Likewise.
3326         * modules/strcase (Makefile.am): Likewise.
3327         * modules/strcasestr (Makefile.am): Likewise.
3328         * modules/strchrnul (Makefile.am): Likewise.
3329         * modules/strcspn (Makefile.am): Likewise.
3330         * modules/strdup (Makefile.am): Likewise.
3331         * modules/strerror (Makefile.am): Likewise.
3332         * modules/strftime (Makefile.am): Likewise.
3333         * modules/strndup (Makefile.am): Likewise.
3334         * modules/strnlen (Makefile.am): Likewise.
3335         * modules/strpbrk (Makefile.am): Likewise.
3336         * modules/strsep (Makefile.am): Likewise.
3337         * modules/strstr (Makefile.am): Likewise.
3338         * modules/strtod (Makefile.am): Likewise.
3339         * modules/strtoimax (Makefile.am): Likewise.
3340         * modules/strtok_r (Makefile.am): Likewise.
3341         * modules/strtol (Makefile.am): Likewise.
3342         * modules/strtoll (Makefile.am): Likewise.
3343         * modules/strtoul (Makefile.am): Likewise.
3344         * modules/strtoull (Makefile.am): Likewise.
3345         * modules/strtoumax (Makefile.am): Likewise.
3346         * modules/strverscmp (Makefile.am): Likewise.
3347         * modules/sys_socket (Makefile.am): Likewise.
3348         * modules/sys_stat (Makefile.am): Likewise.
3349         * modules/sysexits (Makefile.am): Likewise.
3350         * modules/time_r (Makefile.am): Likewise.
3351         * modules/timegm (Makefile.am): Likewise.
3352         * modules/timespec (Makefile.am): Likewise.
3353         * modules/tmpfile-safer (Makefile.am): Likewise.
3354         * modules/trim (Makefile.am): Likewise.
3355         * modules/unistd-safer (Makefile.am): Likewise.
3356         * modules/unlinkdir (Makefile.am): Likewise.
3357         * modules/unlocked-io (Makefile.am): Likewise.
3358         * modules/userspec (Makefile.am): Likewise.
3359         * modules/utime (Makefile.am): Likewise.
3360         * modules/utimecmp (Makefile.am): Likewise.
3361         * modules/utimens (Makefile.am): Likewise.
3362         * modules/vasnprintf (Makefile.am): Likewise.
3363         * modules/vasprintf (Makefile.am): Likewise.
3364         * modules/vsnprintf (Makefile.am): Likewise.
3365         * modules/xalloc (Makefile.am): Likewise.
3366         * modules/xgetcwd (Makefile.am): Likewise.
3367         * modules/xnanosleep (Makefile.am): Likewise.
3368         * modules/xreadlink (Makefile.am): Likewise.
3369         * modules/xstrtod (Makefile.am): Likewise.
3370         * modules/xstrtol (Makefile.am): Likewise.
3371         * modules/xstrtold (Makefile.am): Likewise.
3372         * modules/yesno (Makefile.am): Likewise.
3373         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3374
3375 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3376
3377         * modules/error (Makefile.am): Distribute files through
3378         EXTRA_DIST, not lib_SOURCES.
3379
3380 2006-10-12  Eric Blake  <ebb9@byu.net>
3381
3382         * modules/error (Makefile.am): Distribute files in /lib.
3383         * modules/obstack (Makefile.am): Likewise.
3384
3385 2006-10-12  Bruno Haible  <bruno@clisp.org>
3386
3387         * modules/acl (Makefile.am): Distribute all files in lib/ through
3388         EXTRA_DIST.
3389         * modules/arcfour (Makefile.am): Likewise.
3390         * modules/arctwo (Makefile.am): Likewise.
3391         * modules/argmatch (Makefile.am): Likewise.
3392         * modules/argz (Makefile.am): Likewise.
3393         * modules/atexit (Makefile.am): Likewise.
3394         * modules/backupfile (Makefile.am): Likewise.
3395         * modules/c-strtod (Makefile.am): Likewise.
3396         * modules/c-strtold (Makefile.am): Likewise.
3397         * modules/calloc (Makefile.am): Likewise.
3398         * modules/canon-host (Makefile.am): Likewise.
3399         * modules/canonicalize (Makefile.am): Likewise.
3400         * modules/chdir-long (Makefile.am): Likewise.
3401         * modules/chdir-safer (Makefile.am): Likewise.
3402         * modules/check-version (Makefile.am): Likewise.
3403         * modules/chown (Makefile.am): Likewise.
3404         * modules/cloexec (Makefile.am): Likewise.
3405         * modules/close-stream (Makefile.am): Likewise.
3406         * modules/closeout (Makefile.am): Likewise.
3407         * modules/crc (Makefile.am): Likewise.
3408         * modules/cycle-check (Makefile.am): Likewise.
3409         * modules/des (Makefile.am): Likewise.
3410         * modules/dirfd (Makefile.am): Likewise.
3411         * modules/dirname (Makefile.am): Likewise.
3412         * modules/dup2 (Makefile.am): Likewise.
3413         * modules/euidaccess (Makefile.am): Likewise.
3414         * modules/exclude (Makefile.am): Likewise.
3415         * modules/exitfail (Makefile.am): Likewise.
3416         * modules/fcntl-safer (Makefile.am): Likewise.
3417         * modules/file-type (Makefile.am): Likewise.
3418         * modules/fileblocks (Makefile.am): Likewise.
3419         * modules/filemode (Makefile.am): Likewise.
3420         * modules/filenamecat (Makefile.am): Likewise.
3421         * modules/fnmatch (Makefile.am): Likewise.
3422         * modules/fopen-safer (Makefile.am): Likewise.
3423         * modules/fpending (Makefile.am): Likewise.
3424         * modules/fprintftime (Makefile.am): Likewise.
3425         * modules/free (Makefile.am): Likewise.
3426         * modules/fsusage (Makefile.am): Likewise.
3427         * modules/ftruncate (Makefile.am): Likewise.
3428         * modules/fts (Makefile.am): Likewise.
3429         * modules/gc (Makefile.am): Likewise.
3430         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3431         * modules/getaddrinfo (Makefile.am): Likewise.
3432         * modules/getcwd (Makefile.am): Likewise.
3433         * modules/getdelim (Makefile.am): Likewise.
3434         * modules/getdomainname (Makefile.am): Likewise.
3435         * modules/getgroups (Makefile.am): Likewise.
3436         * modules/gethostname (Makefile.am): Likewise.
3437         * modules/gethrxtime (Makefile.am): Likewise.
3438         * modules/getline (Makefile.am): Likewise.
3439         * modules/getloadavg (Makefile.am): Likewise.
3440         * modules/getlogin_r (Makefile.am): Likewise.
3441         * modules/getopt (Makefile.am): Likewise.
3442         * modules/getpass (Makefile.am): Likewise.
3443         * modules/getpass-gnu (Makefile.am): Likewise.
3444         * modules/getsubopt (Makefile.am): Likewise.
3445         * modules/gettime (Makefile.am): Likewise.
3446         * modules/gettimeofday (Makefile.am): Likewise.
3447         * modules/getugroups (Makefile.am): Likewise.
3448         * modules/getusershell (Makefile.am): Likewise.
3449         * modules/glob (Makefile.am): Likewise.
3450         * modules/group-member (Makefile.am): Likewise.
3451         * modules/hard-locale (Makefile.am): Likewise.
3452         * modules/hash (Makefile.am): Likewise.
3453         * modules/hmac-md5 (Makefile.am): Likewise.
3454         * modules/hmac-sha1 (Makefile.am): Likewise.
3455         * modules/human (Makefile.am): Likewise.
3456         * modules/idcache (Makefile.am): Likewise.
3457         * modules/imaxabs (Makefile.am): Likewise.
3458         * modules/imaxdiv (Makefile.am): Likewise.
3459         * modules/inet_ntop (Makefile.am): Likewise.
3460         * modules/inet_pton (Makefile.am): Likewise.
3461         * modules/inttostr (Makefile.am): Likewise.
3462         * modules/isapipe (Makefile.am): Likewise.
3463         * modules/lchown (Makefile.am): Likewise.
3464         * modules/long-options (Makefile.am): Likewise.
3465         * modules/lstat (Makefile.am): Likewise.
3466         * modules/malloc (Makefile.am): Likewise.
3467         * modules/mathl (Makefile.am): Likewise.
3468         * modules/mbchar (Makefile.am): Likewise.
3469         * modules/md2 (Makefile.am): Likewise.
3470         * modules/md4 (Makefile.am): Likewise.
3471         * modules/md5 (Makefile.am): Likewise.
3472         * modules/memcasecmp (Makefile.am): Likewise.
3473         * modules/memchr (Makefile.am): Likewise.
3474         * modules/memcmp (Makefile.am): Likewise.
3475         * modules/memcoll (Makefile.am): Likewise.
3476         * modules/memcpy (Makefile.am): Likewise.
3477         * modules/memmem (Makefile.am): Likewise.
3478         * modules/memmove (Makefile.am): Likewise.
3479         * modules/mempcpy (Makefile.am): Likewise.
3480         * modules/memrchr (Makefile.am): Likewise.
3481         * modules/memset (Makefile.am): Likewise.
3482         * modules/memxor (Makefile.am): Likewise.
3483         * modules/mkancesdirs (Makefile.am): Likewise.
3484         * modules/mkdir (Makefile.am): Likewise.
3485         * modules/mkdir-p (Makefile.am): Likewise.
3486         * modules/mkdtemp (Makefile.am): Likewise.
3487         * modules/mkstemp (Makefile.am): Likewise.
3488         * modules/mktime (Makefile.am): Likewise.
3489         * modules/modechange (Makefile.am): Likewise.
3490         * modules/mountlist (Makefile.am): Likewise.
3491         * modules/nanosleep (Makefile.am): Likewise.
3492         * modules/openat (Makefile.am): Likewise.
3493         * modules/pagealign_alloc (Makefile.am): Likewise.
3494         * modules/physmem (Makefile.am): Likewise.
3495         * modules/poll (Makefile.am): Likewise.
3496         * modules/posixtm (Makefile.am): Likewise.
3497         * modules/posixver (Makefile.am): Likewise.
3498         * modules/putenv (Makefile.am): Likewise.
3499         * modules/quote (Makefile.am): Likewise.
3500         * modules/quotearg (Makefile.am): Likewise.
3501         * modules/raise (Makefile.am): Likewise.
3502         * modules/read-file (Makefile.am): Likewise.
3503         * modules/readline (Makefile.am): Likewise.
3504         * modules/readlink (Makefile.am): Likewise.
3505         * modules/readtokens (Makefile.am): Likewise.
3506         * modules/readutmp (Makefile.am): Likewise.
3507         * modules/realloc (Makefile.am): Likewise.
3508         * modules/regex (Makefile.am): Likewise.
3509         * modules/rename (Makefile.am): Likewise.
3510         * modules/rename-dest-slash (Makefile.am): Likewise.
3511         * modules/rijndael (Makefile.am): Likewise.
3512         * modules/rmdir (Makefile.am): Likewise.
3513         * modules/rpmatch (Makefile.am): Likewise.
3514         * modules/safe-read (Makefile.am): Likewise.
3515         * modules/safe-write (Makefile.am): Likewise.
3516         * modules/same (Makefile.am): Likewise.
3517         * modules/save-cwd (Makefile.am): Likewise.
3518         * modules/savedir (Makefile.am): Likewise.
3519         * modules/setenv (Makefile.am): Likewise.
3520         * modules/settime (Makefile.am): Likewise.
3521         * modules/sha1 (Makefile.am): Likewise.
3522         * modules/sig2str (Makefile.am): Likewise.
3523         * modules/snprintf (Makefile.am): Likewise.
3524         * modules/stdlib-safer (Makefile.am): Likewise.
3525         * modules/stpcpy (Makefile.am): Likewise.
3526         * modules/stpncpy (Makefile.am): Likewise.
3527         * modules/strcase (Makefile.am): Likewise.
3528         * modules/strcasestr (Makefile.am): Likewise.
3529         * modules/strchrnul (Makefile.am): Likewise.
3530         * modules/strcspn (Makefile.am): Likewise.
3531         * modules/strdup (Makefile.am): Likewise.
3532         * modules/strerror (Makefile.am): Likewise.
3533         * modules/strftime (Makefile.am): Likewise.
3534         * modules/strndup (Makefile.am): Likewise.
3535         * modules/strnlen (Makefile.am): Likewise.
3536         * modules/strpbrk (Makefile.am): Likewise.
3537         * modules/strsep (Makefile.am): Likewise.
3538         * modules/strstr (Makefile.am): Likewise.
3539         * modules/strtod (Makefile.am): Likewise.
3540         * modules/strtoimax (Makefile.am): Likewise.
3541         * modules/strtok_r (Makefile.am): Likewise.
3542         * modules/strtol (Makefile.am): Likewise.
3543         * modules/strtoll (Makefile.am): Likewise.
3544         * modules/strtoul (Makefile.am): Likewise.
3545         * modules/strtoull (Makefile.am): Likewise.
3546         * modules/strtoumax (Makefile.am): Likewise.
3547         * modules/strverscmp (Makefile.am): Likewise.
3548         * modules/time_r (Makefile.am): Likewise.
3549         * modules/timegm (Makefile.am): Likewise.
3550         * modules/tmpfile-safer (Makefile.am): Likewise.
3551         * modules/unistd-safer (Makefile.am): Likewise.
3552         * modules/unlinkdir (Makefile.am): Likewise.
3553         * modules/userspec (Makefile.am): Likewise.
3554         * modules/utime (Makefile.am): Likewise.
3555         * modules/utimecmp (Makefile.am): Likewise.
3556         * modules/utimens (Makefile.am): Likewise.
3557         * modules/vasnprintf (Makefile.am): Likewise.
3558         * modules/vasprintf (Makefile.am): Likewise.
3559         * modules/vsnprintf (Makefile.am): Likewise.
3560         * modules/xalloc (Makefile.am): Likewise.
3561         * modules/xgetcwd (Makefile.am): Likewise.
3562         * modules/xnanosleep (Makefile.am): Likewise.
3563         * modules/xreadlink (Makefile.am): Likewise.
3564         * modules/xstrtod (Makefile.am): Likewise.
3565         * modules/xstrtol (Makefile.am): Likewise.
3566         * modules/xstrtold (Makefile.am): Likewise.
3567         * modules/yesno (Makefile.am): Likewise.
3568
3569 2006-10-12  Jim Meyering  <jim@meyering.net>
3570
3571         * m4/getloadavg.m4: Revert the change below.
3572
3573         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3574         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3575         fail with a symlink, which is what coreutils' ./bootstrap now
3576         creates by default.
3577
3578 2006-10-12  Bruno Haible  <bruno@clisp.org>
3579
3580         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3581         mingw.
3582         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3583         MSVC and mingw explicitly.
3584
3585 2006-10-11  Simon Josefsson  <jas@extundo.com>
3586             Bruno Haible  <bruno@clisp.org>
3587
3588         Add support for multiple gnulib-tool invocations in the scope of a
3589         single configure.ac file.
3590         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3591         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3592         with the same contents as the _LIBADD variable.
3593         (func_emit_initmacro_start, func_emit_initmacro_end,
3594         func_emit_initmacro_done): New functions.
3595         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3596         gl_LIBOBJS and gl_LTLIBOBJS.
3597
3598 2006-10-11  Bruno Haible  <bruno@clisp.org>
3599
3600         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3601         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3602         autoreconf. Instead, invoke autopoint explicitly but move back the
3603         *.m4 files from gnulib.
3604
3605 2006-10-11  Bruno Haible  <bruno@clisp.org>
3606
3607         * gnulib-tool (func_usage): Make module names after --create-testdir
3608         optional.
3609         (func_create_testdir): If no module was specified, use nearly all
3610         modules.
3611
3612 2006-10-12  Jim Meyering  <jim@meyering.net>
3613
3614         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3615         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3616         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3617         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3618         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3619         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3620         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3621         (fts_set_stat_required): New function.
3622         (fts_open): Defer the calls to fts_stat, if possible or requested.
3623         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3624         into fts_stat itself.
3625         (fts_read): Perform any required (deferred) fts_stat call.
3626         (fts_build): Likewise, for the directory we're about to open and read.
3627         In the readdir loop, carefully decide whether each entry will require
3628         an eventual call to fts_stat, using dirent.d_type info if available.
3629         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3630         a command line argument into this function.  Update all callers.
3631         Map a return value of FTS_DOT to FTS_D for a command line argument.
3632         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3633         Thanks to Miklos Szeredi for his tenacity and for the initial
3634         bug report about "find" failing on a FUSE-based file system.
3635
3636         * lib/fts.c (fts_open): Use consistent indentation.
3637
3638 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3639
3640         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3641         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3642         reported by Jim Meyering.  All uses of cache variables renamed
3643         to match Autoconf's.
3644         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3645         the other one.
3646
3647         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3648         Fix misspelling in diagnostic.
3649
3650 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3651
3652         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3653         defined.  Problem reported by Matthew Woehlke.
3654
3655         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3656         Add support for Tandem NonStop R series.
3657         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3658         Use new macro.
3659
3660         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3661         (has_trailing_slash): Omit size arg; all callers changed.
3662         Omit 'inline', since it doesn't help performance and we'd
3663         need to configure it.
3664         Don't count //, ///, etc. as having a trailing slash.
3665         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3666         (rpl_rename_dest_slash): On failure, use rename's errno rather
3667         than (in some cases) an incorrect or junk errno.
3668         Simplify code by removing need to compute length; this does
3669         cause it to make two passes instead of one over the file name,
3670         but it's worth it.
3671
3672         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3673         change, since Autoconf's version may no longer be appropriate now
3674         that we are using CVS Autoconf's version.  Add support for Tandem.
3675
3676 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3677             Bruno Haible  <bruno@clisp.org>
3678
3679         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3680         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3681         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3682         gl_AC_TYPE_LONG_LONG.
3683
3684         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3685         instead of HAVE_LONG_LONG.
3686         * lib/printf-args.c (printf_fetchargs): Likewise.
3687         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3688         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3689         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3690         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3691         gl_AC_TYPE_LONG_LONG.
3692
3693 2006-10-11  Bruno Haible  <bruno@clisp.org>
3694
3695         * m4/longlong.m4: Add comments.
3696         * m4/ulonglong.m4: Likewise.
3697
3698 2006-10-10  Bruno Haible  <bruno@clisp.org>
3699
3700         Make it possible to #define stpcpy, strdup to aliases.
3701         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3702         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3703
3704 2006-10-10  Bruno Haible  <bruno@clisp.org>
3705
3706         Make it possible to #define gcd to an alias.
3707         * lib/gcd.c: Include config.h.
3708
3709 2006-10-10  Bruno Haible  <bruno@clisp.org>
3710
3711         Make it possible to #define c_isascii to an alias.
3712         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3713         defined. Undefine the macros before defining them, to avoid gcc
3714         warnings.
3715         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3716         define NO_C_CTYPE_MACROS early.
3717
3718 2006-10-10  Bruno Haible  <bruno@clisp.org>
3719
3720         Make it possible to #define set_program_name to an alias.
3721         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3722         ENABLE_RELOCATABLE early.
3723
3724 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3725
3726         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3727         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3728         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3729         More generally, don't assume that 64-bit signed int is available
3730         if unsigned int is, and vice versa.
3731         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3732         unsigned symbols, not on their signed counterparts.
3733         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3734         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3735         (UINT64_C, UINTMAX_C):
3736         Likewise.
3737         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3738         unsigned counterparts.
3739         (Have_long_long, Unsigned): New macros.
3740         (Int): Renamed from INT.
3741         (strtoimax): Use the new macros.
3742         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3743         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3744         * modules/inttypes (inttypes.h): Substitute
3745         HAVE_UNSIGNED_LONG_LONG_INT.
3746         * modules/stdint (stdint.h): Likewise.
3747         (Files): Add m4/ulonglong.m4.
3748
3749 2006-10-10  Bruno Haible  <bruno@clisp.org>
3750
3751         Fix a gcc -Wshadow warning.
3752         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3753         to 'bucket'.
3754         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3755         gl_linked_indexof_from_to): Likewise.
3756         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3757         Likewise.
3758         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3759         Likewise.
3760         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3761         Reported by Eric Blake.
3762
3763 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3764
3765         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3766         for NetBSD.  Problem reported by Bruno Haible.
3767
3768 2006-10-09  Jim Meyering  <jim@meyering.net>
3769
3770         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3771         Patch from Bruno Haible.
3772
3773 2006-10-09  Jim Meyering  <jim@meyering.net>
3774
3775         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3776         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3777         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3778
3779 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3780
3781         Don't include <config.h> twice; this doesn't work in some cases,
3782         e.g., when config.h has "#define intmax_t long long int" and
3783         we include <config.h>, <inttypes.h>, <config.h> in that order.
3784         Problem reported by Matthew Woehlke in:
3785         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3786         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3787         * lib/fts-cycle.c: Don't include config.h.
3788         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3789         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3790         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3791         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3792         inttypes.h.
3793         * lib/xstrtoumax.c: Likewise.
3794         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3795         __strtol and the like, so that this module is more like its siblings.
3796         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3797         Remove; no longer needed now that we assume gnulib inttypes.h.
3798
3799 2006-10-08  Bruno Haible  <bruno@clisp.org>
3800
3801         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3802         option.
3803
3804 2006-10-07  Jim Meyering  <jim@meyering.net>
3805
3806         * modules/inttypes (inttypes.h): Revert what seems to have been
3807         an inadvertent part of today's change: use "|", not "/" in the
3808         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3809
3810 2006-10-07  Bruno Haible  <bruno@clisp.org>
3811
3812         * modules/sublist: New file.
3813
3814 2006-10-07  Bruno Haible  <bruno@clisp.org>
3815
3816         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3817         * modules/argz (argz.h): Likewise.
3818         * modules/arpa_inet (arpa/inet.h): Likewise.
3819         * modules/byteswap (byteswap.h): Likewise.
3820         * modules/configmake (configmake.h): Likewise.
3821         * modules/fcntl (fcntl.h): Likewise.
3822         * modules/fnmatch (fnmatch.h): Likewise.
3823         * modules/getopt (getopt.h): Likewise.
3824         * modules/glob (glob.h): Likewise.
3825         * modules/inttypes (inttypes.h): Likewise.
3826         * modules/netinet_in (netinet/in.h): Likewise.
3827         * modules/poll (poll.h): Likewise.
3828         * modules/stdbool (stdbool.h): Likewise.
3829         * modules/stdint (stdint.h): Likewise.
3830         * modules/sys_select (sys/select.h): Likewise.
3831         * modules/sys_socket (sys/socket.h): Likewise.
3832         * modules/sys_stat (sys/stat.h): Likewise.
3833         * modules/sysexits (sysexits.h): Likewise.
3834         * modules/unistd (unistd.h): Likewise.
3835         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3836         Add a "DO NOT EDIT" comment to the generated file.
3837         (func_import): Likewise for gnulib-comp.m4.
3838
3839 2006-10-07  Bruno Haible  <bruno@clisp.org>
3840
3841         * lib/gl_sublist.h: New file.
3842         * lib/gl_sublist.c: New file.
3843
3844 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3845
3846         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3847         name (relative to the original working directory) and the file
3848         name component (relative to the temporary working directory).  All
3849         callers changed.
3850         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3851         * lib/mkdir-p.c (make_dir_parents): Likewise.
3852         * lib/mkdir-p.h (make_dir_parents): Likewise.
3853
3854 2006-10-06  Eric Blake  <ebb9@byu.net>
3855
3856         Define several macros for use by the clean-temp module.
3857         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
3858         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
3859         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
3860
3861         * lib/clean-temp.h (close_stream_temp): New declaration.
3862         * lib/clean-temp.c (includes): Pull in headers according to what
3863         other modules are in use.
3864         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
3865
3866 2006-10-06  Bruno Haible  <bruno@clisp.org>
3867
3868         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
3869         instead of fopen, fwriteerror.
3870
3871 2006-10-06  Bruno Haible  <bruno@clisp.org>
3872
3873         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
3874         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
3875         int.
3876         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
3877         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
3878         Return an error indicator.
3879         Suggested by Eric Blake.
3880
3881 2006-10-06  Bruno Haible  <bruno@clisp.org>
3882
3883         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
3884         Reported by Eric Blake.
3885
3886 2006-10-06  Bruno Haible  <bruno@clisp.org>
3887
3888         * modules/closeout (Description): Mention stderr too.
3889
3890 2006-10-06  Bruno Haible  <bruno@clisp.org>
3891         and Paul Eggert  <eggert@cs.ucla.edu>
3892
3893         * lib/closeout.c (close_stdout): Also close stderr.
3894         * lib/closeout.h: Update comment.
3895
3896 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
3897
3898         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
3899         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
3900         * lib/dirchownmod.c: Include lchown.h.
3901         * lib/lchown.c: Don't include files that lchown.h now includes.
3902         Don't declare chown, since lchown.h now does that.
3903         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
3904         (lchown): Define to rpl_chown if lchown is declared but
3905         does not exist.  Declare using a prototype if lchown is not
3906         declared.  Add a copyright notice.
3907         * lib/mkstemp.h: Include <unistd.h>.
3908         * lib/openat.c: Include lchown.h.
3909
3910         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
3911         we now test for that separately.
3912         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
3913         rather than O_NOFOLLOW, when testing whether it's possible to
3914         avoid a race condition reliably.
3915         * lib/savewd.c (savewd_chdir): Likewise.
3916
3917         Remove macros that are no longer needed now that stdint.h is
3918         reliable.
3919         * lib/fsusage.c (UINTMAX_MAX): Remove.
3920         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
3921         * lib/utimecmp.c (SIZE_MAX): Remove.
3922
3923         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
3924
3925         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
3926         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
3927         O_NOATIME works.
3928
3929 2006-10-05  Bruno Haible  <bruno@clisp.org>
3930
3931         * lib/gl_list.h (gl_sortedlist_search_from_to,
3932         gl_sortedlist_indexof_from_to): New declarations.
3933         (gl_list_implementation): New fields sortedlist_search_from_to,
3934         sortedlist_indexof_from_to.
3935         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
3936         inline functions.
3937         * lib/gl_list.c (gl_sortedlist_search_from_to,
3938         gl_sortedlist_indexof_from_to): New functions.
3939         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
3940         function.
3941         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
3942         (gl_array_sortedlist_search_from_to): New function.
3943         (gl_array_list_implementation): Update.
3944         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
3945         function.
3946         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
3947         (gl_carray_sortedlist_search_from_to): New function.
3948         (gl_carray_list_implementation): Update.
3949         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
3950         gl_linked_sortedlist_indexof_from_to): New functions.
3951         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3952         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3953         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
3954         gl_tree_sortedlist_indexof_from_to): New functions.
3955         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
3956         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
3957         Update.
3958         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
3959         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
3960         Update.
3961
3962 2006-10-05  Bruno Haible  <bruno@clisp.org>
3963
3964         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
3965         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
3966         (struct gl_list_implementation): Add fields search_from_to,
3967         indexof_from_to. Remove fields search, indexof.
3968         (gl_list_search): Use the search_from_to method.
3969         (gl_list_search_from, gl_list_search_from_to): New functions.
3970         (gl_list_indexof): Use the indexof_from_to method.
3971         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3972         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
3973         (gl_list_search_from, gl_list_search_from_to): New functions.
3974         (gl_list_indexof): Use the indexof_from_to method.
3975         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
3976         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
3977         gl_array_indexof. Add start_index, end_index arguments.
3978         (gl_array_search_from_to): Renamed from gl_array_search. Add
3979         start_index, end_index arguments.
3980         (gl_array_remove, gl_array_list_implementation): Update.
3981         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
3982         gl_carray_indexof. Add start_index, end_index arguments.
3983         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
3984         start_index, end_index arguments.
3985         (gl_carray_remove, gl_carray_list_implementation): Update.
3986         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
3987         gl_linked_search. Add start_index, end_index arguments.
3988         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
3989         start_index, end_index arguments.
3990         (gl_linked_remove): Update.
3991         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
3992         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
3993         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
3994         field to 'size_t'.
3995         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
3996         gl_tree_search. Add start_index, end_index arguments.
3997         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
3998         start_index, end_index arguments.
3999         (gl_tree_remove): Update.
4000         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4001         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4002         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4003         function.
4004         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4005         gl_tree_search. Add start_index, end_index arguments.
4006         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4007         start_index, end_index arguments.
4008         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4009         Update.
4010         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4011
4012 2006-10-05  Bruno Haible  <bruno@clisp.org>
4013
4014         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4015
4016         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4017         fwriteerror_temp): New declarations.
4018         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4019         (descriptors): New variable.
4020         (cleanup): First, close the descriptors.
4021         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4022         fclose_temp, fwriteerror_temp): New functions.
4023
4024 2006-10-04  Jim Meyering  <jim@meyering.net>
4025
4026         * lib/fts.c (fts_open): Tiny comment change.
4027
4028 2006-10-04  Bruno Haible  <bruno@clisp.org>
4029
4030         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4031         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4032         gl_LOCK_BODY.
4033         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4034         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4035         gl_LOCK_EARLY_BODY.
4036         (gl_LOCK): Require gl_LOCK_BODY.
4037
4038 2006-10-04  Bruno Haible  <bruno@clisp.org>
4039
4040         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4041         (gl_oset_search_atleast): New declaration.
4042         (struct gl_oset_implementation): Add field 'search_atleast'.
4043         (gl_oset_search_atleast): New inline function.
4044         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4045         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4046         (gl_array_oset_implementation): Update.
4047         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4048         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4049         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4050
4051 2006-10-04  Bruno Haible  <bruno@clisp.org>
4052
4053         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4054
4055 2006-10-03  Bruno Haible  <bruno@clisp.org>
4056
4057         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4058         from gl_avltreehash_list_implementation.
4059
4060 2006-10-03  Bruno Haible  <bruno@clisp.org>
4061
4062         * lib/gl_oset.c (gl_oset_add): Fix return type.
4063
4064 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4065
4066         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4067
4068 2006-10-02  Eric Blake  <ebb9@byu.net>
4069
4070         * modules/strnlen (Depends-on): Add extensions.
4071
4072 2006-10-02  Eric Blake  <ebb9@byu.net>
4073
4074         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4075         definition in 2.60+.
4076
4077 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4078
4079         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4080         checks.
4081
4082 2006-10-02  Bruno Haible  <bruno@clisp.org>
4083
4084         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4085         to the AUTOMAKE_OPTIONS.
4086         Reported by Jim Meyering.
4087
4088 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4089
4090         Work around bug in Solaris 10 /proc file system:
4091         /proc/self/fd/NNN/.. isn't the parent directory of
4092         the directory whose file descriptor is NNN.  This needs to
4093         be worked around at run time, not compile time, since a
4094         program might be built on Solaris 8, where things work, and
4095         run on Solaris 10.
4096         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4097         to use the following interface instead:
4098         (OPENAT_BUFFER_SIZE): New macro.
4099         (openat_proc_name): New function.
4100         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4101         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4102         Likewise.
4103         * lib/openat-proc.c: New file.
4104         * modules/openat (Files): Add lib/openat-proc.c.
4105         (Depends-on): Add same-inode, stdbool.
4106         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4107
4108 2006-09-29  Bruno Haible  <bruno@clisp.org>
4109
4110         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4111         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4112         argument. Set stdout_closed before testing for ferror, not after.
4113         (fwriteerror, fwriteerror_no_ebadf): New functions.
4114
4115 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4116
4117         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4118
4119 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4120
4121         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4122         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4123
4124 2006-09-28  Jim Meyering  <jim@meyering.net>
4125
4126         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4127         Include <unistd.h>.
4128
4129 2006-09-28  Bruno Haible  <bruno@clisp.org>
4130
4131         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4132         * modules/linkedhash-list (Depends-on): Likewise.
4133         * modules/rbtreehash-list (Depends-on): Likewise.
4134
4135 2006-09-28  Bruno Haible  <bruno@clisp.org>
4136
4137         * lib/strndup.h: Simplify the redefinition of strndup.
4138         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4139         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4140
4141 2006-09-28  Bruno Haible  <bruno@clisp.org>
4142
4143         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4144         * lib/gl_linkedhash_list.c: Likewise.
4145         * lib/gl_rbtreehash_list.c: Likewise.
4146
4147 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4148
4149         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4150         getaddrinfo.
4151
4152         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4153         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4154         it causes <stdio_ext.h> to cause a compile-time error.
4155         Problem reported by Nelson H. F. Beebe.
4156         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4157         of HAVE_DECL___PENDING.
4158
4159         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4160         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4161         declaration.
4162
4163 2006-09-27  Jim Meyering  <jim@meyering.net>
4164
4165         This file could end up with a definition for a function
4166         named __strndup, rather than rpl_strndup on a system with
4167         incomplete weak_alias support.
4168         * lib/strndup.c (strndup): Rename from __strndup.
4169         Remove #defines that used to map __strndup to strndup.
4170         Don't use K&R prototypes.
4171         Remove LIBC-related code, since this file is not sync'd with glibc.
4172         * lib/strndup.h: Revamp, accordingly.
4173         * m4/strndup.m4: Modernize.
4174
4175 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4176
4177         * modules/savewd (Depends-on): Add 'raise'.
4178         * lib/savewd.c: Include <signal.h>, for 'raise'.
4179
4180 2006-09-26  Jim Meyering  <jim@meyering.net>
4181
4182         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4183         when we detect Darwin 8.7.0's acl_get_file bug.
4184         Rearrange to perform the new (below) run-test while $LIBS
4185         contains any acl-related library.  Set USE_ACL at the end.
4186         (gl_ACL_GET_FILE): New function.
4187
4188 2006-09-26  Eric Blake  <ebb9@byu.net>
4189
4190         * lib/verror.c: Include <config.h> unconditionally.
4191
4192 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4193
4194         * modules/clock-time (Maintainer): Add self.
4195         * modules/getlogin_r (Depends-on): Add extensions.
4196
4197 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4198
4199         * modules/clock-time: New module.
4200         * modules/nanosleep (Depends-on): Add clock-time.
4201         * modules/gethrxtime (Depends-on): Likewise.
4202         * modules/gettime (Depends-on): Likewise.
4203         * modules/settime (Depends-on): Likewise.
4204
4205         * modules/fts-lgpl: Depend on openat.
4206         * modules/mkancesdirs: Depend on savewd.
4207         * modules/mkdir-p: Likewise.
4208
4209 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4210
4211         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4212
4213         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4214         `gl_have_arbitrary_file_name_length_limit' to
4215         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4216         actually works between configure runs.
4217
4218 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4219             Bruno Haible  <bruno@clisp.org>
4220
4221         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4222
4223 2006-09-25  Jim Meyering  <jim@meyering.net>
4224
4225         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4226         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4227
4228 2006-09-25  Eric Blake  <ebb9@byu.net>
4229
4230         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4231         exec's in 2006-09-18 patch when shuffling fds.
4232
4233 2006-09-25  Bruno Haible  <bruno@clisp.org>
4234
4235         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4236         Reported by Jim Meyering.
4237
4238 2006-09-24  Jim Meyering  <jim@meyering.net>
4239
4240         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4241         compare a pointer against a literal "0".  That caused failures with
4242         at least HP-UX's hpcc.
4243
4244 2006-09-22  Simon Josefsson  <jas@extundo.com>
4245
4246         * modules/gc-sha1:
4247         * modules/gc-md4:
4248         * modules/gc-hmac-sha1:
4249         * modules/gc-hmac-md5:
4250         * modules/gc-des:
4251         * modules/gc-arcfour: Distribute more files.
4252
4253 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4254
4255         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4256         (gl_linked_iterator_from_to): Initialize struct completely.
4257         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4258         (gl_tree_iterator_from_to): Likewise
4259         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4260         * lib/gl_array_list.c [lint] (gl_array_iterator)
4261         (gl_array_iterator_from_to): Likewise.
4262         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4263         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4264         (gl_carray_iterator_from_to): Likewise.
4265
4266         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4267         * lib/md4.c (md4_process_block): Remove unused variable.
4268         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4269         parentheses for clarity.
4270
4271 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4272
4273         * modules/bison-i18n (Depends-on): Add gettext.
4274
4275 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4276
4277         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4278         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4279         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4280         also add missing comma that caused broken test.
4281         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4282         stdlib.h, for `abort'.
4283         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4284         variables.
4285         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4286         include unistd.h if present, for `rmdir'.
4287         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4288         variables.
4289         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4290         in the process include standard headers for prototypes.
4291         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4292         gets declared on GNU/Linux.
4293         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4294         unistd.h, for `rmdir'.
4295         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4296
4297         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4298         always true.
4299         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4300
4301         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4302
4303 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4304
4305         * gnulib-tool (func_version): Create output all at once.  This
4306         may help avoid triggering unnecessary SIGPIPEs, and at any
4307         rate it doesn't hurt.
4308
4309 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4310             Bruno Haible  <bruno@clisp.org>
4311
4312         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4313         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4314         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4315
4316         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4317         (gl_FUNC_VASPRINTF): Invoke it.
4318
4319 2006-09-22  Bruno Haible  <bruno@clisp.org>
4320
4321         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4322         getloadavg.c as first argument.
4323
4324 2006-09-22  Bruno Haible  <bruno@clisp.org>
4325
4326         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4327         at the beginning of the gl_INIT macro.
4328         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4329         gl_GETLOADAVG.
4330
4331 2006-09-22  Bruno Haible  <bruno@clisp.org>
4332
4333         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4334         module.
4335         Suggested by Ralf Wildenhues.
4336
4337 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4338
4339         Import this patch from libc:
4340
4341         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4342
4343         * lib/regex_internal.c (re_string_reconstruct): Handle
4344         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4345         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4346         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4347         re_string_context_at.
4348
4349         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4350         now requires it.
4351         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4352         gl_REGEX now does it for us.
4353         (gl_REGEX): Add test taken from
4354         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4355
4356         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4357         Check that large offsets work.  Modernize Autoconf usages.
4358         Prefer "yes" to mean a good thing rather than a bad.
4359         Don't put "#define mkstemp" in config.h, as this might interfere
4360         with standard system headers that "#define mkstemp mkstemp64".
4361
4362         * modules/mkstemp (Depends-on): Add extensions, so that
4363         mkstemp is visible on some platforms.
4364         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4365         (Include): Change to "mkstemp.h" from <stdlib.h>.
4366         (Files): Add mkstemp.h.
4367
4368         * lib/mkstemp.h: New file, since some standard headers
4369         #define mkstemp.
4370         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4371         Include "mkstemp.h".
4372         Make the _LIBC code resemble glibc original more,
4373         e.g., use K&R style.
4374         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4375         (mkstemp): Remove, since mkstemp.h does this for us.
4376         * lib/stdlib--.h: Include mkstemp.h.
4377
4378         Import this patch from libc:
4379
4380         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4381
4382         * lib/tempname.c (__gen_tempname): Change attempts_min
4383         into a macro.  Use preprocessor to decide how to initialize
4384         attempts [Coverity CID 67].
4385
4386 2006-09-20  Bruno Haible  <bruno@clisp.org>
4387
4388         * lib/mkdtemp.c: Import from libc.
4389         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4390                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4391                 attempts_min into a macro.  Use preprocessor to decide how to
4392                 initialize attempts [Coverity CID 67].
4393         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4394                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4395                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4396
4397 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4398
4399         * gnulib-tool (func_exit): New function, to allow to pass the
4400         exit status portably through the trap.  Use everywhere.
4401         (--help, --version): Signal a write error.
4402         (trap): catch SIGPIPE, for write errors.
4403         Exit at the end of the trap, with the correct exit status.
4404
4405 2006-09-19  Karl Berry  <karl@gnu.org>
4406
4407         * doc/gnulib.texi: note about the license texinfo files.
4408
4409 2006-09-19  Eric Blake  <ebb9@byu.net>
4410
4411         * gnulib-tool: Avoid space-tab.
4412
4413 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4414
4415         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4416         that prevented coreutils 6.1 from building.  Problem reported
4417         by Petter Reinholdtsen.
4418
4419 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4420
4421         * gnulib-tool (avoidlist): Fix typo that broke options like
4422         --avoid=lock that are used by coreutils bootstrap.
4423
4424 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4425
4426         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4427         more systematically.
4428
4429 2006-09-18  Jim Meyering  <jim@meyering.net>
4430
4431         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4432
4433 2006-09-18  Bruno Haible  <bruno@clisp.org>
4434
4435         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4436
4437 2006-09-18  Bruno Haible  <bruno@clisp.org>
4438
4439         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4440         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4441         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4442         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4443         * m4/gettext.m4: Require autoconf >= 2.52.
4444         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4445         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4446         of gl_cv_header_inttypes_h.
4447
4448 2006-09-18  Bruno Haible  <bruno@clisp.org>
4449
4450         * lib/javaversion.c: Include configmake.h.
4451
4452 2006-09-18  Bruno Haible  <bruno@clisp.org>
4453
4454         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4455         avoid that the while loops be executed in a subshell.
4456
4457 2006-09-18  Bruno Haible  <bruno@clisp.org>
4458
4459         * MODULES.html.sh (func_module): Break long lines.
4460         Suggested by Bruce Korb <bkorb@gnu.org>.
4461
4462 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4463
4464         Speed up by a factor of 1.12.
4465         * gnulib-tool (nl): New variable.
4466         (func_import): Rewrite include directive extraction to only read each
4467         directive once.
4468
4469 2006-09-17  Bruno Haible  <bruno@clisp.org>
4470
4471         * modules/javaversion (Makefile.am): Remove DEFS setting.
4472         (Depends-on): Add configmake, for PKGDATADIR definition.
4473
4474 2006-09-17  Bruno Haible  <bruno@clisp.org>
4475
4476         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4477
4478 2006-09-17  Bruno Haible  <bruno@clisp.org>
4479
4480         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4481         (func_modules_transitive_closure, func_modules_add_dummy,
4482         func_modules_to_filelist, func_import, func_create_testdir,
4483         func_create_megatestdir, ...): Use it wherever possible.
4484         Suggested by Ralf Wildenhues.
4485
4486 2006-09-16  Karl Berry  <karl@gnu.org>
4487
4488         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4489         to avoid sectioning errors.
4490         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4491         [ifinfo]: blank line after @center-ed titles.
4492         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4493         Spell FSF address consistently with others.
4494         (These changes approved by rms.)
4495
4496 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4497
4498         Speed up by a factor of 1.61.
4499         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4500         already checked module names again.
4501
4502 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4503
4504         Speed up by a factor of 1.13.
4505         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4506         for new_files, and the input to func_add_or_update.
4507
4508 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4509
4510         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4511         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4512
4513 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4514
4515         * modules/mkancesdirs (Depends-on): Add fcntl.
4516         * modules/savewd: New file.
4517         * MODULES.html.sh (File system functions): Add savewd.
4518
4519         * modules/configmake (Makefile.am): Add support for the
4520         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4521
4522 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4523
4524         * m4/savewd.m4: New file.
4525
4526 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4527
4528         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4529         (dirchownmod): New arg FD.  All callers changed.
4530         Use FD rather than opening the directory ourself, as opening is
4531         now the caller's responsibility.
4532         * lib/dirchownmod.h: Likewise.
4533         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4534         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4535         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4536         (test_dir): Remove.
4537         (mkancesdirs): Return length of prefix of FILE that has already
4538         been made, or -2 if there is a child doing the work.  Redo
4539         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4540         ".", and treat ".." specially since it might stray back into
4541         already-created areas.  Use a subprocess if necessary.  New arg
4542         WD; all users changed.  MAKE_DIR function should now return 1
4543         if it creates a directory that is not readable.  Return -2 if
4544         a child process is spun off.
4545         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4546         Adjust signature to match code.
4547         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4548         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4549         all users changed.
4550         * lib/savewd.c, lib/savewd.h: New files.
4551
4552 2006-09-15  Jim Meyering  <jim@meyering.net>
4553
4554         * modules/rename-dest-slash: New module.
4555         * MODULES.html.sh (posix_compat): Add it here.
4556
4557         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4558
4559 2006-09-15  Jim Meyering  <jim@meyering.net>
4560
4561         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4562         file.
4563
4564         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4565
4566 2006-09-15  Jim Meyering  <jim@meyering.net>
4567
4568         * lib/rename-dest-slash.c (has_trailing_slash): Use
4569         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4570         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4571         test before testing whether SRC is a directory.
4572         Suggestions from Bruno Haible.
4573
4574         Avoid a warning about an unused variable.
4575         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4576         into the #ifdef block where it's used.
4577
4578         * lib/rename-dest-slash.c: New file.
4579
4580 2006-09-14  Bruno Haible  <bruno@clisp.org>
4581
4582         * lib/allocsa.c: Include <config.h> unconditionally.
4583         * lib/asnprintf.c: Likewise.
4584         * lib/asprintf.c: Likewise.
4585         * lib/c-strcasecmp.c: Likewise.
4586         * lib/c-strcasestr.c: Likewise.
4587         * lib/c-strncasecmp.c: Likewise.
4588         * lib/c-strstr.c: Likewise.
4589         * lib/classpath.c: Likewise.
4590         * lib/clean-temp.c: Likewise.
4591         * lib/concatpath.c: Likewise.
4592         * lib/copy-file.c: Likewise.
4593         * lib/csharpcomp.c: Likewise.
4594         * lib/csharpexec.c: Likewise.
4595         * lib/execute.c: Likewise.
4596         * lib/fatal-signal.c: Likewise.
4597         * lib/findprog.c: Likewise.
4598         * lib/fwriteerror.c: Likewise.
4599         * lib/gl_array_list.c: Likewise.
4600         * lib/gl_array_oset.c: Likewise.
4601         * lib/gl_avltree_list.c: Likewise.
4602         * lib/gl_avltree_oset.c: Likewise.
4603         * lib/gl_avltreehash_list.c: Likewise.
4604         * lib/gl_carray_list.c: Likewise.
4605         * lib/gl_linked_list.c: Likewise.
4606         * lib/gl_linkedhash_list.c: Likewise.
4607         * lib/gl_list.c: Likewise.
4608         * lib/gl_oset.c: Likewise.
4609         * lib/gl_rbtree_list.c: Likewise.
4610         * lib/gl_rbtree_oset.c: Likewise.
4611         * lib/gl_rbtreehash_list.c: Likewise.
4612         * lib/imaxabs.c: Likewise.
4613         * lib/imaxdiv.c: Likewise.
4614         * lib/javacomp.c: Likewise.
4615         * lib/javaexec.c: Likewise.
4616         * lib/javaversion.c: Likewise.
4617         * lib/linebreak.c: Likewise.
4618         * lib/localcharset.c: Likewise.
4619         * lib/lock.c: Likewise.
4620         * lib/mbchar.c: Likewise.
4621         * lib/mbswidth.c: Likewise.
4622         * lib/mkdtemp.c: Likewise.
4623         * lib/pipe.c: Likewise.
4624         * lib/printf-args.c: Likewise.
4625         * lib/printf-parse.c: Likewise.
4626         * lib/progname.c: Likewise.
4627         * lib/progreloc.c: Likewise.
4628         * lib/readlink.c: Likewise.
4629         * lib/sh-quote.c: Likewise.
4630         * lib/stpcpy.c: Likewise.
4631         * lib/stpncpy.c: Likewise.
4632         * lib/strcasecmp.c: Likewise.
4633         * lib/strcasestr.c: Likewise.
4634         * lib/strcspn.c: Likewise.
4635         * lib/striconv.c: Likewise.
4636         * lib/strncasecmp.c: Likewise.
4637         * lib/strnlen1.c: Likewise.
4638         * lib/strstr.c: Likewise.
4639         * lib/strtok_r.c: Likewise.
4640         * lib/tls.c: Likewise.
4641         * lib/tmpdir.c: Likewise.
4642         * lib/unicodeio.c: Likewise.
4643         * lib/unsetenv.c: Likewise.
4644         * lib/vasnprintf.c: Likewise.
4645         * lib/vasprintf.c: Likewise.
4646         * lib/wait-process.c: Likewise.
4647         * lib/xallocsa.c: Likewise.
4648         * lib/xsetenv.c: Likewise.
4649         * lib/xstriconv.c: Likewise.
4650
4651 2006-09-13  Simon Josefsson  <jas@extundo.com>
4652
4653         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4654         that internally, suggested by Ralf Wildenhues
4655         <Ralf.Wildenhues@gmx.de>.
4656
4657 2006-09-13  Simon Josefsson  <jas@extundo.com>
4658
4659         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4660         @LIBOBJS@.
4661         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4662
4663 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4664
4665         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4666         longer worry about uses that don't define HAVE_CONFIG_H.
4667         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4668         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4669         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4670         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4671         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4672         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4673         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4674         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4675         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4676         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4677         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4678         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4679         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4680         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4681         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4682         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4683         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4684         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4685         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4686         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4687         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4688         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4689         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4690         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4691         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4692         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4693         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4694         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4695         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4696         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4697         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4698         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4699         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4700         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4701         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4702         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4703         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4704         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4705         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4706         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4707         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4708         Likewise.
4709
4710 2006-09-13  Eric Blake  <ebb9@byu.net>
4711
4712         * lib/getopt.c: Fix typo in last commit.
4713
4714 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4715
4716         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4717         dgettext.
4718
4719 2006-09-12  Jim Meyering  <jim@meyering.net>
4720
4721         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4722         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4723         Reported by Nelson H. F. Beebe.
4724
4725 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4726
4727         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4728         program_invocation_name and program_invocation_short_name are
4729         initialized.
4730         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4731         and program_invocation_short_name to argp.h, so they are visible
4732         to user programs.
4733         * lib/argp.h: Likewise
4734
4735 2006-09-10  Bruno Haible  <bruno@clisp.org>
4736
4737         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4738         m4/inttypes_h.m4, m4/uintmax_t.m4.
4739
4740 2006-09-10  Bruno Haible  <bruno@clisp.org>
4741
4742         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4743         gl_AC_TYPE_UINTMAX_T.
4744
4745 2006-09-10  Bruno Haible  <bruno@clisp.org>
4746
4747         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4748
4749 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4750
4751         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4752         convention.  Text proposed by Bruno Haible.
4753         (struct argp_option): Document the use of N_() wrappers.
4754
4755         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4756         '\v', and translate the two parts separately, instead of feeding
4757         the whole string to gettext.  This allows to exclude
4758         '\v' from the strings visible to the translator by writing doc
4759         strings as N_("..") "\v" N_("..").
4760
4761 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4762
4763         * config/srclist.txt: Undo latest change; the bug was fixed.
4764
4765 2006-09-09  Bruno Haible  <bruno@clisp.org>
4766
4767         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4768         assignments if building a library without libtool.
4769         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4770         in func_emit_lib_Makefile_am.
4771         (func_import): When building a static library libfoo.a, arrange to
4772         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4773         (func_create_testdir): Likewise.
4774         * modules/gc (configure.ac, Makefile.am): If building statically,
4775         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4776         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4777         * modules/striconv (configure.ac, Makefile.am): Likewise.
4778         Based on a suggestion by Ralf Wildenhues.
4779
4780 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4781
4782         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4783         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4784         Also:
4785
4786         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4787         Add year_2050_test to catch glibc bug 2821
4788         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4789
4790         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4791         Prefer #ifdef to #if.
4792
4793         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4794         Return from 'main' instead of calling 'exit'.
4795
4796 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4797
4798         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4799         returned the maximum time_t value rather than (time_t) -1.
4800         Problem originally reported by William Bardwell
4801         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4802
4803         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4804         Moved to here ...
4805         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4806         ... from here.
4807
4808 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4809
4810         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4811         2821 is fixed.
4812
4813 2006-09-08  Jim Meyering  <jim@meyering.net>
4814
4815         Don't make generated files read-only.  That would bother too many
4816         people.  However, do retain the ability to work when targets are
4817         read-only: remove the destination and temporary files before writing
4818         them (when generated via sed or echo), or by using the -f option for
4819         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4820         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4821         * modules/byteswap, modules/configmake, modules/fcntl:
4822         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4823         * modules/localcharset, modules/netinet_in, modules/poll:
4824         * modules/stdbool, modules/stdint, modules/sys_select:
4825         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4826
4827 2006-09-08  Jim Meyering  <jim@meyering.net>
4828
4829         Avoid new build failure on FreeBSD 6.0.
4830         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4831         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4832         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4833
4834 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4835
4836         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4837
4838 2006-09-07  Jim Meyering  <jim@meyering.net>
4839
4840         Fix global typo in last change: use chmod u-w, not chmod u-x.
4841         Spotted by Paul Eggert and Bruce Korb.
4842         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4843         * modules/byteswap, modules/configmake, modules/fcntl:
4844         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4845         * modules/localcharset, modules/netinet_in, modules/poll:
4846         * modules/stdbool, modules/stdint, modules/sys_select:
4847         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4848
4849 2006-09-06  Jim Meyering  <jim@meyering.net>
4850
4851         Make generated files be read-only.
4852         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4853         Ensure that each generated file is now read-only.
4854         * modules/argz: Likewise.
4855         * modules/arpa_inet: Likewise.
4856         * modules/byteswap: Likewise.
4857         * modules/configmake: Likewise.
4858         * modules/fcntl: Likewise.
4859         * modules/fnmatch: Likewise.
4860         * modules/getopt: Likewise.
4861         * modules/glob: Likewise.
4862         * modules/inttypes: Likewise.
4863         * modules/netinet_in: Likewise.
4864         * modules/poll: Likewise.
4865         * modules/stdbool: Likewise.
4866         * modules/stdint: Likewise.
4867         * modules/sys_select: Likewise.
4868         * modules/sys_socket: Likewise.
4869         * modules/sys_stat: Likewise.
4870         * modules/sysexits: Likewise.
4871         * modules/localcharset: Same as above, but continue using temporary
4872         file named "t-$@" (why different?) rather than the "$@-t" used
4873         everywhere else.
4874
4875         * modules/sysexits (Makefile.am): Replace literal occurrences
4876         of "sysexit.h" more readable, and more consistent, "$@".
4877
4878 2006-09-06  Bruno Haible  <bruno@clisp.org>
4879
4880         * modules/striconv: New file.
4881         * modules/xstriconv: New file.
4882         * MODULES.html.sh (Internationalization functions): Add striconv,
4883         xstriconv.
4884
4885 2006-09-06  Bruno Haible  <bruno@clisp.org>
4886
4887         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
4888         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
4889         not using libtool correctly.
4890
4891 2006-09-06  Bruno Haible  <bruno@clisp.org>
4892
4893         * lib/striconv.h: New file.
4894         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
4895         iconvstring.c.
4896         * lib/xstriconv.h: New file.
4897         * lib/xstriconv.c: New file.
4898
4899 2006-09-06  Bruno Haible  <bruno@clisp.org>
4900
4901         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
4902         lib_..._LDFLAGS.
4903
4904 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4905
4906         * lib/argz_.h: Sync from Libtool.
4907
4908         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
4909                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4910
4911         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
4912
4913 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4914
4915         * modules/trim: New file.
4916
4917 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
4918
4919         * lib/trim.h: New file.
4920         * lib/trim.c: New file.
4921
4922 2006-09-05  Bruno Haible  <bruno@clisp.org>
4923
4924         * MODULES.html.sh (String handling): Add trim.
4925
4926 2006-09-04  Karl Berry  <karl@gnu.org>
4927
4928         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
4929         until next release.
4930
4931 2006-09-03  Bruno Haible  <bruno@clisp.org>
4932
4933         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
4934         correctly.
4935
4936 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4937
4938         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
4939         not gl_GETLOADAVG.  Omit unneeded semicolons.
4940         Problems reported by Ralf Wildenhues in
4941         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4942         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
4943         at the end, which is the usual gnulib style.
4944
4945         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
4946         of doing all the work ourselves.
4947         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
4948         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
4949
4950 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4951
4952         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
4953         Problem reported by Ralf Wildenhues in
4954         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
4955
4956         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
4957         HAVE_STRUCT_STATFS_F_FSTYPENAME.
4958
4959 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
4960
4961         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
4962         yesterday's patch by changing test -n to test -z.
4963
4964 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4965
4966         * modules/getloadavg (Files): Add m4/getloadavg.m4.
4967         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
4968         the former is now obsolescent.
4969
4970         * modules/chdir-long (Depends-on): Add fcntl.
4971
4972 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4973
4974         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
4975         obsolescent, and programs should use gnulib instead.
4976         * m4/getloadavg.m4: New file, with contents taken from Autoconf
4977         but with prefixes changed.
4978
4979 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
4980
4981         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
4982         or stdbool.h, because they might not exist while configuring.
4983
4984         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
4985         Don't include unistd.h or limits.h; not needed, since chdir-long.h
4986         does that for us.
4987         (O_DIRECTORY): Remove.
4988
4989 2006-08-31  Eric Blake  <ebb9@byu.net>
4990
4991         * gnulib-tool: Don't let emacs change spaces to TAB.
4992
4993 2006-08-31  Bruno Haible  <bruno@clisp.org>
4994
4995         * gnulib-tool: When calling func_import more than once, do it in a
4996         subshell.
4997         Reported by Eric Blake <ebb9@byu.net>.
4998
4999 2006-08-31  Bruno Haible  <bruno@clisp.org>
5000
5001         * gnulib-tool (nl): Remove variable.
5002         (sed_transform_lib_file): Use more robust test for config-h module.
5003         (func_import): Fix typo in 2006-08-25 patch.
5004
5005 2006-08-31  Bruno Haible  <bruno@clisp.org>
5006
5007         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5008         specified, augment Makefile.am variables instead of assigning them.
5009
5010 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5011
5012         Work around a bug in both the Linux and SunOS 64-bit kernels:
5013         nanosleep mishandles sleeps for longer than 2**31 seconds.
5014         Problem reported by Frank v Waveren in
5015         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5016         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5017         Check for nanosleep bug.
5018         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5019
5020 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5021
5022         Work around a bug in both the Linux and SunOS 64-bit kernels:
5023         nanosleep mishandles sleeps for longer than 2**31 seconds.
5024         Problem reported by Frank v Waveren in
5025         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5026         * lib/nanosleep.c (BILLION): New constant.
5027         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5028         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5029         implementation.
5030
5031 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5032
5033         * modules/nanosleep (Depends-on): Add gettime.
5034
5035 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5036         and Simon Josefsson  <jas@extundo.com>
5037         and Oskar Liljeblad  <oskar@osk.mine.nu>
5038
5039         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5040         * gnulib-tool (func_import): New license type 'unmodifiable license
5041         text'.
5042         * modules/fdl: Use it.  Longer description.
5043         * module/gpl, module/lgpl: New files.
5044
5045 2006-08-30  Jim Meyering  <jim@meyering.net>
5046
5047         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5048         shadowing the parameter.
5049
5050 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5051
5052         Sync from Libtool:
5053
5054         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5055
5056         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5057         sharing with gnulib.  Report by Eric Blake.
5058
5059 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5060
5061         * modules/isapipe: New file.
5062         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5063
5064 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5065
5066         * modules/configmake (Makefile.am): Add a comment, and omit
5067         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5068         by Bruno Haible.
5069
5070 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5071
5072         * m4/isapipe.m4: New file.
5073
5074 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5075
5076         * lib/isapipe.c, lib/isapipe.h: New files.
5077
5078 2006-08-29  Jim Meyering  <jim@meyering.net>
5079
5080         * modules/configmake (Makefile.am): Make configmake.h depend on
5081         Makefile.  Otherwise, a stale configmake.h could hang around.
5082
5083 2006-08-29  Eric Blake  <ebb9@byu.net>
5084
5085         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5086         resolution of upstream bug 3044.
5087
5088 2006-08-29  Bruno Haible  <bruno@clisp.org>
5089
5090         * modules/localcharset (Depends-on): Add configmake.
5091         (Makefile.am): Remove setting of LIBDIR through DEFS.
5092
5093 2006-08-29  Bruno Haible  <bruno@clisp.org>
5094
5095         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5096         defined.
5097
5098 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5099
5100         * modules/fcntl: New file.
5101         * modules/chdir-safer (Depends-on): Add fcntl.
5102         * modules/fts: Likewise.
5103         * modules/mkdir-p: Likewise.
5104
5105         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5106         This undoes the most recent change, since we're now addressing the
5107         problem in a different way.
5108
5109         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5110         into output, since the output might be called Makefile.am even
5111         if $makefile_name is something different.
5112         (func_import): Use $makefile_am rather than
5113         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5114         empty.
5115
5116         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5117
5118 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5119
5120         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5121         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5122         recent change to stdint.m4, since we're now addressing the problem in a
5123         different way.
5124
5125 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5126
5127         * m4/fcntl_h.m4: New file.
5128
5129 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5130
5131         * lib/fcntl_.h: New file.
5132         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5133         the fcntl module.
5134         * lib/dirchownmod.c: Likewise.
5135         * lib/fts.c: Likewise.
5136
5137         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5138         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5139         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5140         just before including <inttypes.h>, to avoid circular inclusion.
5141
5142 2006-08-28  Jim Meyering  <jim@meyering.net>
5143
5144         * doc/visibility.texi: Actually read and correct the grammar of the
5145         sentence affected by yesterday's change.
5146
5147 2006-08-28  Eric Blake  <ebb9@byu.net>
5148
5149         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5150         needs wrapper.
5151
5152 2006-08-28  Eric Blake  <ebb9@byu.net>
5153
5154         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5155
5156 2006-08-28  Eric Blake  <ebb9@byu.net>
5157
5158         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5159
5160 2006-08-28  Bruno Haible  <bruno@clisp.org>
5161
5162         * modules/c-strstr: New file, from GNU gettext.
5163         * MODULES.html.sh (String handling): Add c-strstr.
5164
5165 2006-08-28  Bruno Haible  <bruno@clisp.org>
5166
5167         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5168         macros.
5169         Reported by Eric Blake.
5170
5171 2006-08-28  Bruno Haible  <bruno@clisp.org>
5172
5173         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5174         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5175         * lib/vasprintf.c: Include errno.h, limits.h.
5176         (EOVERFLOW): New fallback definition.
5177         (vasprintf): Test here whether the string length is > INT_MAX.
5178         * lib/vsnprintf.c: Include errno.h, limits.h.
5179         (EOVERFLOW): New fallback definition.
5180         (vsnprintf): Fix bug when generated string was too long for the buffer.
5181         Test here whether the string length is > INT_MAX.
5182
5183 2006-08-28  Bruno Haible  <bruno@clisp.org>
5184
5185         * lib/inttypes_.h (SCNX*): Remove definitions.
5186         Reported by Eric Blake.
5187
5188 2006-08-28  Bruno Haible  <bruno@clisp.org>
5189
5190         * lib/c-strstr.h: New file, from GNU gettext.
5191         * lib/c-strstr.c: New file, from GNU gettext.
5192
5193 2006-08-28  Bruno Haible  <bruno@clisp.org>
5194
5195         * gnulib-tool: Reorder some statements.
5196
5197 2006-08-28  Bruno Haible  <bruno@clisp.org>
5198
5199         * gnulib-tool: New option --makefile-name.
5200         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5201         $makefile_name.
5202         (func_import): Write $makefile_name to the cache file, and read it from
5203         there unless explicitly specified. Use $makefile_name as file name
5204         instead of Makefile.am. Adjust the recommendations accordingly.
5205
5206 2006-08-28  Bruno Haible  <bruno@clisp.org>
5207
5208         * gnulib-tool (func_verify_module): Check against misapplying patch.
5209
5210 2006-08-28  Bruno Haible  <bruno@clisp.org>
5211
5212         * gnulib-tool (func_relativize, func_relconcat): New functions.
5213         Give an error if --local-dir is given with --update.
5214         Remove trailing slashes from $local_gnulib_dir.
5215         (func_import): Store the relativized $local_gnulib_dir in
5216         gnulib-cache.m4, and read it from there if not specified explicitly.
5217
5218 2006-08-28  Bruno Haible  <bruno@clisp.org>
5219
5220         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5221         is the current directory. Respect also $local_gnulib_dir.
5222
5223 2006-08-28  Bruno Haible  <bruno@clisp.org>
5224             Simon Josefsson  <jas@extundo.com>
5225
5226         BeOS portability.
5227         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5228
5229 2006-08-27  Jim Meyering  <jim@meyering.net>
5230
5231         * doc/visibility.texi: Remove duplicate word: "pointer".
5232
5233 2006-08-26  Bruno Haible  <bruno@clisp.org>
5234
5235         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5236         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5237         (Makefile.am): Create inttypes.h from inttypes_.h.
5238         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5239
5240         * modules/imaxabs: New file.
5241
5242         * modules/imaxdiv: New file.
5243
5244 2006-08-26  Bruno Haible  <bruno@clisp.org>
5245
5246         * m4/inttypes.m4: New file.
5247         * m4/_inttypes_h.m4: Remove file.
5248         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5249         PRI_MACROS_BROKEN.
5250         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5251
5252         * m4/imaxabs.m4: New file.
5253
5254         * m4/imaxdiv.m4: New file.
5255
5256 2006-08-26  Bruno Haible  <bruno@clisp.org>
5257
5258         * lib/inttypes_.h: New file.
5259         * lib/inttypes.h: Remove file.
5260         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5261
5262         * lib/imaxabs.c: New file.
5263
5264         * lib/imaxdiv.c: New file.
5265
5266 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5267
5268         New config-h module, so that "make" output needn't be cluttered
5269         by -DHAVE_CONFIG_H.
5270         * MODULES.html.sh (Support for building libraries and executables):
5271         Add config-h.
5272         * modules/config-h: New file.
5273         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5274         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5275         the config-h module is used.
5276
5277         New configmake module, so that "make" output needn't be cluttered
5278         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5279         * MODULES.html.sh (Support for building libraries and executables):
5280         Add configmake.
5281         * modules/configmake: New file.
5282
5283 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5284
5285         * m4/config-h.m4: New file.
5286
5287 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5288
5289         * config/srclist.txt: Add elisp-comp.
5290
5291 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5292
5293         * MODULES.html.sh (Support for building libraries and executables):
5294         Add elisp-comp.
5295         * build-aux/elisp-comp: New file.
5296         * modules/elisp-comp: New file.
5297
5298 2006-08-24  Bruno Haible  <bruno@clisp.org>
5299
5300         * gnulib-tool (func_create_testdir): Use non-default values of
5301         sourcebase and m4base.
5302
5303 2006-08-24  Bruno Haible  <bruno@clisp.org>
5304
5305         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5306         HTML structure.
5307
5308 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5309
5310         * modules/openat (Depends-on): Add lchown.
5311
5312 2006-08-23  Bruno Haible  <bruno@clisp.org>
5313
5314         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5315         of gl_LOCK_EARLY instead of gl_LOCK.
5316
5317 2006-08-23  Bruno Haible  <bruno@clisp.org>
5318
5319         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5320         on OSF/1 to no.
5321         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5322
5323 2006-08-23  Bruno Haible  <bruno@clisp.org>
5324
5325         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5326         as unusable.
5327
5328         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5329         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5330         (gl_LOCK): New macro.
5331
5332 2006-08-22  Simon Josefsson  <jas@extundo.com>
5333
5334         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5335         to md5 module.
5336
5337 2006-08-22  Simon Josefsson  <jas@extundo.com>
5338
5339         * MODULES.html.sh: Add "Support for maintaining and release
5340         projects".
5341
5342         * build-aux/gnupload: New file, from coreutils.
5343
5344 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5345
5346         Avoid the need for AC_LIBSOURCES in m4 macros.
5347         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5348         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5349         * modules/check-version (EXTRA_DIST): Add check-version.h.
5350         * modules/crc (EXTRA_DIST): Add crc.h.
5351         * modules/des (EXTRA_DIST): Add des.h.
5352         * modules/gc (EXTRA_DIST): Add gc.h.
5353         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5354         * modules/getline (EXTRA_DIST): Add getline.h.
5355         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5356         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5357         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5358         * modules/md2 (EXTRA_DIST): Add md2.h.
5359         * modules/md4 (EXTRA_DIST): Add md4.h.
5360         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5361         * modules/read-file (EXTRA_DIST): Add read-file.h.
5362         * modules/readline (EXTRA_DIST): Add readline.h.
5363         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5364         rijndael-api-fst.h.
5365
5366 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5367
5368         * m4/rijndael.m4 (gl_ARCFOUR):
5369         * m4/arctwo.m4 (gl_ARCTWO):
5370         * m4/check-version.m4 (gl_CHECK_VERSION):
5371         * m4/crc.m4 (gl_CRC):
5372         * m4/des.m4 (gl_DES):
5373         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5374         * m4/gc.m4 (gl_GC):
5375         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5376         * m4/getline.m4 (gl_FUNC_GETLINE):
5377         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5378         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5379         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5380         * m4/md2.m4 (gl_MD2):
5381         * m4/md4.m4 (gl_MD4):
5382         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5383         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5384         * m4/readline.m4 (gl_FUNC_READLINE):
5385         * m4/rijndael.m4 (gl_RIJNDAEL):
5386         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5387         to get the necessary .h files and whatnot.
5388
5389 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5390
5391         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5392         gnulib rather than the other way around.
5393         * config/srclistvars.sh (COREUTILS): Remove.
5394
5395 2006-08-22  Jim Meyering  <jim@meyering.net>
5396
5397         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5398
5399         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5400
5401 2006-08-22  Eric Blake  <ebb9@byu.net>
5402
5403         * modules/regexprops-generic: New file.
5404         * MODULES.html.sh (Support for building documentation): List it.
5405
5406 2006-08-22  Eric Blake  <ebb9@byu.net>
5407
5408         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5409         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5410         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5411         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5412
5413 2006-08-22  Bruno Haible  <bruno@clisp.org>
5414
5415         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5416         and lib_LTLIBRARIES like the other lib_* variables.
5417
5418 2006-08-22  Bruno Haible  <bruno@clisp.org>
5419
5420         * build-aux/x-to-1.in: New file, from GNU gettext.
5421
5422 2006-08-22  Bruno Haible  <bruno@clisp.org>
5423
5424         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5425         <utmpx.h> exists.
5426
5427 2006-08-22  Bruno Haible  <bruno@clisp.org>
5428
5429         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5430         <utmpx.h> exists.
5431
5432 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5433
5434         BeOS portability.
5435         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5436         exist.
5437         Problem reported by Bruno Haible.
5438
5439 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5440
5441         Avoid the need for AC_LIBSOURCES in m4 macros.
5442         * modules/acl (EXTRA_DIST): Add acl.h.
5443         * modules/argmatch (Files): Add m4/argmatch.m4.
5444         (configure.ac): Add gl_ARGMATCH.
5445         (EXTRA_DIST): Renamed from lib_SOURCES, for
5446         consistency with the other modules.  Remove argmatch.c.
5447         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5448         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5449         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5450         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5451         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5452         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5453         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5454         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5455         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5456         * modules/closeout (EXTRA_DIST): Add closeout.h.
5457         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5458         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5459         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5460         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5461         dirname.h; remove basename.c and stripslash.c.
5462         * modules/exclude (EXTRA_DIST): Add exclude.h.
5463         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5464         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5465         * modules/file-type (EXTRA_DIST): Add file-type.h.
5466         * modules/filemode (EXTRA_DIST): Add filemode.h.
5467         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5468         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5469         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5470         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5471         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5472         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5473         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5474         * modules/getdate (EXTRA_DIST): Add getdate.c.
5475         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5476         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5477         * modules/getpass (EXTRA_DIST): Add getpass.h.
5478         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5479         * modules/group-member (EXTRA_DIST): Add group-member.h.
5480         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5481         * modules/hash (EXTRA_DIST): Add hash.h.
5482         * modules/human (EXTRA_DIST): Add human.h.
5483         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5484         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5485         * modules/lchown (EXTRA_DIST): Add lchown.h.
5486         * modules/long-options (EXTRA_DIST): Add long-options.h.
5487         * modules/lstat (EXTRA_DIST): Add lstat.h.
5488         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5489         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5490         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5491         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5492         * modules/memxor (EXTRA_DIST): Add memxor.h.
5493         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5494         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5495         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5496         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5497         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5498         * modules/physmem (EXTRA_DIST): Add physmem.h.
5499         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5500         * modules/posixver (EXTRA_DIST): Add posixver.h.
5501         * modules/quote (EXTRA_DIST): Add quote.h.
5502         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5503         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5504         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5505         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5506         regex_internal.h regexec.c.
5507         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5508         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5509         * modules/same (EXTRA_DIST): Add same.h.
5510         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5511         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5512         * modules/savedir (EXTRA_DIST): Add savedir.h.
5513         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5514         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5515         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5516         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5517         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5518         * modules/strdup (EXTRA_DIST): Add strdup.h.
5519         * modules/strftime (EXTRA_DIST): Add strftime.h.
5520         * modules/strndup (EXTRA_DIST): Add strndup.h.
5521         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5522         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5523         * modules/time_r (EXTRA_DIST): Add time_r.h.
5524         * modules/timespec (EXTRA_DIST): Add timespec.h.
5525         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5526         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5527         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5528         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5529         * modules/userspec (EXTRA_DIST): Add userspec.h.
5530         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5531         * modules/utimens (EXTRA_DIST): Add utimens.h.
5532         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5533         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5534         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5535         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5536         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5537         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5538         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5539         * modules/yesno (EXTRA_DIST): Add yesno.h.
5540
5541 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5542
5543         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5544
5545         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5546         * m4/dev-ino.m4, same-inode.m4: Remove.
5547
5548         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5549         * m4/acl.m4 (AC_FUNC_ACL):
5550         * m4/backupfile.m4 (gl_BACKUPFILE):
5551         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5552         * m4/canon-host.m4 (gl_CANON_HOST):
5553         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5554         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5555         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5556         * m4/cloexec.m4 (gl_CLOEXEC):
5557         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5558         * m4/closeout.m4 (gl_CLOSEOUT):
5559         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5560         * m4/dirname.m4 (gl_DIRNAME):
5561         * m4/exclude.m4 (gl_EXCLUDE):
5562         * m4/exitfail.m4 (gl_EXITFAIL):
5563         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5564         * m4/file-type.m4 (gl_FILE_TYPE):
5565         * m4/filemode.m4 (gl_FILEMODE):
5566         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5567         * m4/fpending.m4 (gl_FUNC_FPENDING):
5568         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5569         * m4/fts.m4 (gl_FUNC_FTS):
5570         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5571         * m4/getdate.m4 (gl_GETDATE):
5572         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5573         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5574         * m4/getpass.m4 (gl_FUNC_GETPASS):
5575         * m4/gettime.m4 (gl_GETTIME):
5576         * m4/getugroups.m4 (gl_GETUGROUPS):
5577         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5578         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5579         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5580         * m4/hash.m4 (gl_HASH):
5581         * m4/idcache.m4 (gl_IDCACHE):
5582         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5583         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5584         * m4/long-options.m4 (gl_LONG_OPTIONS):
5585         * m4/lstat.m4 (gl_FUNC_LSTAT):
5586         * m4/md5.m4 (gl_MD5):
5587         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5588         * m4/memcoll.m4 (gl_MEMCOLL):
5589         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5590         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5591         * m4/memxor.m4 (gl_MEMXOR):
5592         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5593         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5594         * m4/modechange.m4 (gl_MODECHANGE):
5595         * m4/mountlist.m4 (gl_MOUNTLIST):
5596         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5597         * m4/openat.m4 (gl_FUNC_OPENAT):
5598         * m4/pathmax.m4 (gl_PATHMAX):
5599         * m4/physmem.m4 (gl_PHYSMEM):
5600         * m4/posixtm.m4 (gl_POSIXTM):
5601         * m4/posixver.m4 (gl_POSIXVER):
5602         * m4/quote.m4 (gl_QUOTE):
5603         * m4/quotearg.m4 (gl_QUOTEARG):
5604         * m4/readtokens.m4 (gl_READTOKENS):
5605         * m4/readutmp.m4 (gl_READUTMP):
5606         * m4/regex.m4 (gl_REGEX):
5607         * m4/safe-read.m4 (gl_SAFE_READ):
5608         * m4/safe-write.m4 (gl_SAFE_WRITE):
5609         * m4/same.m4 (gl_SAME):
5610         * m4/save-cwd.m4 (gl_SAVE_CWD):
5611         * m4/savedir.m4 (gl_SAVEDIR):
5612         * m4/settime.m4 (gl_SETTIME):
5613         * m4/sha1.m4 (gl_SHA1):
5614         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5615         * m4/stat-macros.m4 (gl_STAT_MACROS):
5616         * m4/stat-time.m4 (gl_STAT_TIME):
5617         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5618         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5619         * m4/strdup.m4 (gl_FUNC_STRDUP):
5620         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5621         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5622         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5623         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5624         * m4/time_r.m4 (gl_TIME_R):
5625         * m4/timespec.m4 (gl_TIMESPEC):
5626         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5627         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5628         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5629         * m4/userspec.m4 (gl_USERSPEC):
5630         * m4/utimecmp.m4 (gl_UTIMECMP):
5631         * m4/utimens.m4 (gl_UTIMENS):
5632         * m4/xalloc.m4 (gl_XALLOC):
5633         * m4/xgetcwd.m4 (gl_XGETCWD):
5634         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5635         * m4/xreadlink.m4 (gl_XREADLINK):
5636         * m4/xstrtod.m4 (gl_XSTRTOD):
5637         * m4/yesno.m4 (gl_YESNO):
5638         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5639         to get the necessary .h files and whatnot.
5640
5641 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5642             Bruno Haible  <bruno@clisp.org>
5643
5644         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5645         /bin/sh understanding of '!' conditional negation.
5646
5647 2006-08-21  Jim Meyering  <jim@meyering.net>
5648
5649         * modules/openat (Depends-on): Really alphabetize.
5650
5651         * modules/acl (Depends-on): Add error and quote.
5652
5653         * check-module (find_included_lib_files): Add at-func.c to the
5654         ok-to-include-more-than-once white list.
5655
5656         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5657
5658 2006-08-21  Bruno Haible  <bruno@clisp.org>
5659
5660         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5661         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5662         Reported by Martin Lambers <marlam@marlam.de>.
5663
5664 2006-08-21  Bruno Haible  <bruno@clisp.org>
5665
5666         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5667         specify an installation location, don't emit a noinst_LIBRARIES or
5668         noinst_LTLIBRARIES assignment.
5669
5670 2006-08-21  Bruno Haible  <bruno@clisp.org>
5671
5672         BeOS portability.
5673         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5674         BeOS has mbrtowc() but no <wctype.h>.
5675
5676 2006-08-21  Bruno Haible  <bruno@clisp.org>
5677
5678         BeOS portability.
5679         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5680         exist.
5681
5682 2006-08-21  Bruno Haible  <bruno@clisp.org>
5683
5684         BeOS portability.
5685         * lib/mbchar.h: Include <wctype.h> only if it exists.
5686
5687 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5688
5689         Remove files that are no longer needed by their respective modules.
5690         * m4/obstack.m4: Remove.
5691         * m4/strerror_r.m4: Remove.
5692         * m4/uint32_t.m4: Remove.
5693         * m4/uintptr_t.m4: Remove.
5694         * m4/ullong_max.m4: Remove.
5695         * m4/xstrtoimax.m4: Remove.
5696         * m4/xstrtoumax.m4: Remove.
5697
5698         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5699         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5700         dependencies now capture this.
5701
5702         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5703         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5704         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5705         * m4/human.m4 (gl_HUMAN): Likewise.
5706         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5707         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5708
5709         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5710
5711         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5712         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5713         stdint.
5714         * m4/human.m4 (gl_HUMAN): Likewise.
5715         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5716         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5717         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5718         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5719         * m4/xstrtol (gl_XSTRTOL): Likewise.
5720
5721         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5722         AC_TYPE_LONG_LONG_INT.
5723         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5724         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5725         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5726         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5727
5728         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5729         on stdbool.
5730
5731         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5732         (gl_PREREQ_XSTRTOUL): Remove.
5733
5734         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5735
5736         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5737         mode.
5738
5739 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5740
5741         Add and change modules to make it easier for coreutils to use
5742         gnulib-tool.
5743         * modules/backupfile (Files): Remove m4/d-ino.m4.
5744         (Depends-on): Add d-ino.
5745         * modules/cycle-check (Depends-on): Add stdint.
5746         (lib_SOURCES): Add cycle-check.h.
5747         * modules/d-ino: New module.
5748         * modules/d-type: New module.
5749         * modules/error (Files): Remove m4/strerror_r.m4.
5750         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5751         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5752         m4/inttypes_h.m4, m4/uintmax_t.m4.
5753         (Depends-on): Add stdint.
5754         (lib_SOURCES): Add fsusage.h.
5755         * modules/getcwd (Files): Remove d-ino.m4.
5756         (Depends-on): Add d-ino.
5757         * modules/getndelim2 (Depends-on): Add stdint.
5758         * modules/glob (Files): Remove m4/d-type.m4.
5759         (Depends-on): Add d-type.
5760         * modules/host-os: New module.
5761         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5762         m4/inttypes_h.m4, m4/uintmax_t.m4.
5763         * Depends-on: Add stdint.
5764         (lib_SOURCES): Add human.h.
5765         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5766         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5767         m4/uintmax_t.m4, m4/ulonglong.m4.
5768         (Depends-on): Add stdint.
5769         (EXTRA_DIST): Add inttostr.h.
5770         * modules/lchmod: New module.
5771         * modules/link-follow: New module.
5772         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5773         (Depends-on): Add lchmod.
5774         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5775         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5776         (Depends-on): Add stdint.
5777         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5778         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5779         (Depends-on): Add stdint.
5780         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5781         * modules/perl: New module.
5782         * modules/regex (Depends-on): Add stdint.
5783         * modules/rmdir-errno: New module.
5784         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5785         m4/intmax_t.m4.
5786         (Depends-on): Add stdint.
5787         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5788         m4/uintmax_t.m4.
5789         (Depends-on): Add stdint.
5790         * modules/unlink-busy: New module.
5791         * modules/utimecmp (Depends-on): Add stdint.
5792         * modules/uptime: New module.
5793         * modules/winsz-ioctl: New module.
5794         * modules/winsz-termios: New module.
5795         * modules/xnanosleep (Depends-on): Add nanosleep.
5796         * modules/ullong_max: Remove.
5797         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5798         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5799         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5800         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5801         (Depends-on): Add inttypes.
5802         (lib_SOURCES): Add xstrtol.h.
5803         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5804         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5805         * MODULES.html.sh: Move 'assert' into the assert section.
5806         Move 'dummy' into the linking section.
5807         Remove ullong_max.
5808         Add section for compatibility checks for POSIX:2001 functions,
5809         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5810         winsz-ioctl, and winsz-termios into it.
5811         Add lchmod.
5812         Add top-level Misc section and put host-os, perl, and uptime
5813         into it.
5814
5815 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5816
5817         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5818         now assume the stdint module.  Do not include inttypes.h.
5819         * lib/fsusage.h: Likewise.
5820         * lib/getndelim2.c: Likewise.
5821         * lib/human.h: Likewise.
5822         * lib/inttostr.h: Likewise.
5823         * lib/obstack.c: Likewise.
5824         * lib/regex_internal.h: Likewise.
5825         * lib/tempname.c: Likewise.
5826         * lib/utimecmp.c: Likewise.
5827         * lib/xstrtol.h: Likewise.
5828
5829         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5830
5831         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5832         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5833         * lib/xtime.h: Likewise.
5834
5835 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5836
5837         * modules/openat (Files): Add lib/fchmodat.c.
5838         Fixes problem reported by Jay Youngman.
5839
5840 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5841
5842         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5843         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5844
5845 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5846             Bruno Haible  <bruno@clisp.org>
5847
5848         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5849         and is a script that invokes bison. Tighten the code. Add comments.
5850
5851 2006-08-18  Jim Meyering  <jim@meyering.net>
5852
5853         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5854         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5855         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5856         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
5857
5858 2006-08-18  Bruno Haible  <bruno@clisp.org>
5859
5860         * modules/bison-i18n: New file.
5861         * MODULES.html.sh (Internationalization functions): Add it.
5862
5863 2006-08-18  Bruno Haible  <bruno@clisp.org>
5864
5865         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
5866         sys/statvfs.h. When getmntinfo was found, check its declaration and
5867         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
5868
5869 2006-08-18  Bruno Haible  <bruno@clisp.org>
5870
5871         * m4/bison-i18n.m4: New file, from bison.
5872
5873 2006-08-18  Bruno Haible  <bruno@clisp.org>
5874
5875         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
5876         (ME_DUMMY): Treat "kernfs" as a dummy.
5877         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
5878
5879 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5880
5881         Update from coreutils.
5882
5883         2006-08-15  Jim Meyering  <jim@meyering.net>
5884
5885         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
5886
5887         2006-01-17  Jim Meyering  <jim@meyering.net>
5888
5889         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
5890
5891         2006-01-11  Jim Meyering  <jim@meyering.net>
5892
5893         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
5894         Check for the lchmod function.
5895
5896 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
5897
5898         Update from coreutils.
5899
5900         * lib/__fpending.h: Add copyright notice.
5901         * lib/fprintftime.h: Likewise.
5902         * lib/savedir.c: Use (C) in copyright notice.
5903         * lib/savedir.h: Likewise.
5904
5905         2006-08-15  Jim Meyering  <jim@meyering.net>
5906
5907         * lib/at-func.c: New file, with the logic of all emulated at-functions.
5908         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
5909         in support of the EXPECTED_ERRNO macro.
5910         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
5911         definitions.  Instead, define the appropriate symbols and include
5912         "at-func.c".
5913         * lib/mkdirat.c (mkdirat): Likewise.
5914         * lib/fchmodat.c (fchmodat): Likewise.
5915         (ENOSYS): Remove definition.
5916         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
5917         it.  Don't include "unistd--.h" -- it wasn't ever used.
5918
5919         2006-01-17  Jim Meyering  <jim@meyering.net>
5920
5921         Rewrite fts.c not to change the current working directory,
5922         by using openat, fstatat, fdopendir, etc..
5923
5924         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
5925         (HAVE_OPENAT_SUPPORT): Define.
5926         [_LIBC] (fchdir): Don't undef or define; no longer used.
5927         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
5928         Now, this `function' always succeeds, and consumes its file descriptor
5929         parameter -- so callers must not close such FDs.  Update callers.
5930         (diropen_fd, opendirat, cwd_advance_fd): New functions.
5931         (diropen): Add parameter, SP.  Adjust all callers.
5932         Implement using diropen_fd, rather than open.
5933         (fts_open): Initialize new member, fts_cwd_fd.
5934         Remove fts_rft-setting code.
5935         (fts_close): Close fts_cwd_fd, if necessary.
5936         (__opendir2): Define in terms of opendir or opendirat,
5937         depending on whether the FST_NOCHDIR flag is set.
5938         (fts_build): Since fts_safe_changedir consumes its FD, and since
5939         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
5940         and close the dup'd file descriptor upon failure.
5941         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
5942         (fts_safe_changedir): Tweak semantics to reflect that this function
5943         now calls cwd_advance_fd and hence consumes its FD argument.
5944         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
5945         [struct FTS] (fts_rft): Remove now-unused member.
5946         [struct FTS] (fts_cycle.state): Improve comment.
5947
5948         * lib/openat.c (openat_needs_fchdir): New function.
5949         * lib/openat.h (openat_needs_fchdir): Declare it.
5950
5951 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
5952
5953         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
5954         Problem and fix reported by Pádraig Brady in
5955         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
5956
5957 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5958
5959         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
5960
5961 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5962
5963         * lib/memcoll.c (memcoll): Optimize for the common case where the
5964         arguments are bytewise equal.
5965
5966 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5967
5968         * doc/regexprops-generic.texi: Add a copyright notice.
5969
5970 2006-08-15  Bruno Haible  <bruno@clisp.org>
5971
5972         * modules/tmpdir (License): Change to LGPL.
5973
5974 2006-08-15  Bruno Haible  <bruno@clisp.org>
5975
5976         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
5977         module.
5978
5979 2006-08-14  Simon Josefsson  <jas@extundo.com>
5980
5981         * config/srclist.txt: Add gnupload.
5982
5983 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
5984
5985         Change copyright notice from LGPL 2 to GPL 2, since that's the
5986         standard form used in the gnulib repository.
5987         * tests/test-lock.c: Likewise.
5988         * tests/test-stdint.c: Likewise.
5989         * tests/test-tls.c: Likewise.
5990
5991         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
5992         prelude-manager.  User shorter URLs for GNU projects, without '?'.
5993         Add copyright notice.
5994
5995         * check-module: Add copyright notice.  Output a copyright
5996         notice if "--version" is specified.
5997         * modules/COPYING: New file.
5998         * tests/test-getaddrinfo.c: Add copyright notice.
5999         * tests/test-verify.c: Likewise.
6000
6001 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6002
6003         Change copyright notice from LGPL 2 to GPL 2, since that's the
6004         standard form used in the gnulib repository.
6005         * lib/lock.c: LGPL -> GPL.
6006         * lib/lock.h: Likewise.
6007         * lib/strnlen1.c: Likewise.
6008         * lib/strnlen1.h: Likewise.
6009         * lib/tls.c: Likewise.
6010         * lib/tls.h: Likewise.
6011         * lib/tmpdir.c: Likewise.
6012
6013         * lib/TODO: Remove; this belongs only in coreutils.
6014
6015 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6016
6017         Add copyright notices to long-enough files that lack them, since
6018         otherwise the files aren't clearly free.  Use the same notice that
6019         getdate.texi already uses.
6020         * doc/alloca-opt.texi: Add copyright notice.
6021         * doc/alloca.texi: Likewise.
6022         * doc/ctime.texi: Likewise.
6023         * doc/functions.texi: Likewise.
6024         * doc/gcd.texi: Likewise.
6025         * doc/gnulib-tool.texi: Likewise.
6026         * doc/inet_ntoa.texi: Likewise.
6027         * doc/visibility.texi: Likewise.
6028
6029         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6030         * doc/quote.texi: Add copyright notice.
6031
6032         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6033         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6034         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6035         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6036         is now obsolete, and give a pointer to the Sun list.
6037         Add copyright notice.
6038
6039 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6040
6041         * config/srclistvars.sh: Add copyright notice.
6042
6043 2006-08-14  Eric Blake  <ebb9@byu.net>
6044
6045         Import the following change from libc:
6046
6047         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6048
6049         Upstream bug 2997.
6050         * lib/misc/error.c: Add space between program name and message if file
6051         name is missing.
6052
6053 2006-08-12  Karl Berry  <karl@gnu.org>
6054
6055         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6056         remove, these originate in gnulib now.
6057
6058 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6059
6060         * doc/Makefile (standards.info standards.html standards.dvi):
6061         Also depend on make-stds.texi.
6062
6063 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6064
6065         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6066         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6067
6068         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6069         in wchar_t.  Problem reported by Eric Blake.
6070
6071         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6072         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6073         Also, help the compiler to keep LEN in a register.
6074
6075 2006-08-11  Eric Blake  <ebb9@byu.net>
6076
6077         * users.txt: Sort.  Add tar.
6078
6079 2006-08-11  Bruno Haible  <bruno@clisp.org>
6080
6081         * users.txt: New file.
6082
6083 2006-08-11  Bruno Haible  <bruno@clisp.org>
6084
6085         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6086         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6087
6088 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6089
6090         * modules/snprintf (Depends-on): Remove minmax.
6091         (Maintainer): Add self and Bruno.
6092
6093 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6094
6095         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6096         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6097         (EOVERFLOW): Define if the system does not.
6098         Do not include "minmax.h"; it wasn't used.
6099         (snprintf): Don't assume size_t promotes to an unsigned type.
6100         Fix bug when generated string was too long for the buffer: the
6101         buffer's contents are supposed to be the initial prefix of the
6102         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6103         exceeds INT_MAX; do the check ourselves.
6104
6105         Import the following changes from libc:
6106
6107         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6108
6109         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6110         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6111         set wc to the byte which couldn't be converted.
6112         (re_string_reconstruct): Don't clear valid_raw_len before calling
6113         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6114         tip_context using re_string_context_at.
6115
6116         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6117
6118         * lib/posix/regex.h: g++ still cannot handled [restrict].
6119
6120         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6121
6122         * lib/posix/regex.h: Remove special handling for VMS.
6123
6124 2006-08-10  Jim Meyering  <jim@meyering.net>
6125
6126         * modules/same-inode: New module.
6127         * modules/dev-ino: New module.
6128         * modules/cycle-check: Depend on these modules, rather than simply
6129         including their .h files.
6130         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6131         required via m4/cycle-check.m4.
6132         * modules/same: Depend on new same-inode module, rather than
6133         including same-inode.h.
6134         * modules/chdir-safer: New file.
6135
6136         * modules/chown (Depends-on): Add stat-macros.
6137
6138 2006-08-10  Jim Meyering  <jim@meyering.net>
6139
6140         * m4/cycle-check.m4: New file.
6141         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6142         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6143
6144 2006-08-10  Eric Blake  <ebb9@byu.net>
6145
6146         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6147         in from original proposal.
6148
6149 2006-08-10  Eric Blake  <ebb9@byu.net>
6150         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6151
6152         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6153         namespace.
6154
6155 2006-08-10  Bruno Haible  <bruno@clisp.org>
6156
6157         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6158         as well.
6159
6160 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6161
6162         Sync from coreutils.
6163
6164         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6165
6166         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6167         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6168
6169 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6170
6171         * modules/restrict: Remove; no longer needed now that we assume
6172         Autoconf 2.59 or later.
6173         * MODULES.html.sh: Remove 'restrict'.
6174         * modules/argp (Depends-on): Remove 'restrict'.
6175         * modules/base64 (Depends-on): Likewise.
6176         * modules/gc (Depends-on): Likewise.
6177         * modules/getaddrinfo (Depends-on): Likewise.
6178         * modules/glob (Depends-on): Likewise.
6179         * modules/inet_ntop (Depends-on): Likewise.
6180         * modules/inet_pton (Depends-on): Likewise.
6181         * modules/memxor (Depends-on): Likewise.
6182         * modules/regex (Depends-on): Likewise.
6183         * modules/strtok_r (Depends-on): Likewise.
6184         * modules/time_r (Depends-on): Likewise.
6185
6186 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6187
6188         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6189         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6190         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6191         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6192         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6193         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6194         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6195         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6196
6197         Merge from coreutils.
6198         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6199         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6200         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6201         * m4/time_r.m4 (gl_TIME_R): Likewise.
6202
6203 2006-08-09  Karl Berry  <karl@gnu.org>
6204
6205         * config/srclist.txt: no more gettext-tools, per Bruno.
6206
6207 2006-08-08  Eric Blake  <ebb9@byu.net>
6208
6209         * modules/verror: New module.
6210         * MODULES.html.sh: Document it.
6211
6212 2006-08-08  Eric Blake  <ebb9@byu.net>
6213
6214         * lib/verror.h, lib/verror.c: New files.
6215
6216 2006-08-08  Eric Blake  <ebb9@byu.net>
6217
6218         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6219         verror_at_line output complies with GNU Coding Standards even when
6220         file is NULL.
6221
6222 2006-08-07  Bruno Haible  <bruno@clisp.org>
6223
6224         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6225         versions of AIX.
6226         Reported by Ralf Wildenhues.
6227
6228 2006-08-07  Bruno Haible  <bruno@clisp.org>
6229
6230         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6231         in an AC_DEFUN. Needed so that the autoconf snippets can use
6232         AC_REQUIRE.
6233
6234 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6235
6236         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6237         Initialize pkgdata_DATA.
6238         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6239         overriding it.
6240
6241 2006-08-06  Eric Blake  <ebb9@byu.net>
6242
6243         * lib/error.h: Fold in some upstream changes from glibc.
6244         * lib/error.c: Likewise.
6245
6246 2006-08-04  Bruno Haible  <bruno@clisp.org>
6247
6248         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6249         Make the mostlyclean-local rule depend on mostlyclean-generic.
6250         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6251
6252 2006-07-31  Bruno Haible  <bruno@clisp.org>
6253
6254         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6255         <stdlib.h>, <string.h>.
6256
6257 2006-07-30  Bruno Haible  <bruno@clisp.org>
6258
6259         * modules/readlink (License): Change to LGPL.
6260
6261 2006-07-30  Bruno Haible  <bruno@clisp.org>
6262
6263         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6264         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6265         set PKGDATADIR to point to it.
6266
6267 2006-07-30  Bruno Haible  <bruno@clisp.org>
6268
6269         * modules/csharpexec (configure.ac): Comment out macro invocation.
6270         * modules/javaexec (configure.ac): Likewise.
6271         * modules/javacomp-script (configure.ac): Likewise.
6272
6273         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6274
6275 2006-07-30  Bruno Haible  <bruno@clisp.org>
6276
6277         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6278         linked-list.
6279
6280 2006-07-30  Bruno Haible  <bruno@clisp.org>
6281
6282         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6283
6284 2006-07-30  Bruno Haible  <bruno@clisp.org>
6285
6286         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6287         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6288         get removed.
6289
6290 2006-07-29  Bruno Haible  <bruno@clisp.org>
6291
6292         Make it possible for gnulib-tool to work with locally modified or
6293         augmented gnulib repositories.
6294         * gnulib-tool (func_usage): Document --local-dir option.
6295         (local_gnulib_dir): New variable.
6296         Handle --local-dir option.
6297         (func_lookup_file): New function.
6298         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6299         (func_get_description, func_get_filelist, func_get_description,
6300         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6301         func_get_automake_snippet, func_get_include_directive,
6302         func_get_license, func_get_maintainer): Use func_lookup_file.
6303         (func_import, func_create_testdir): Use func_lookup_file.
6304
6305 2006-07-29  Bruno Haible  <bruno@clisp.org>
6306
6307         * modules/setenv (Depends-on): Add unistd.
6308
6309 2006-07-29  Bruno Haible  <bruno@clisp.org>
6310
6311         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6312
6313 2006-07-29  Bruno Haible  <bruno@clisp.org>
6314
6315         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6316
6317 2006-07-29  Bruno Haible  <bruno@clisp.org>
6318
6319         * gnulib-tool (import, update): If there is no Makefile.am, look at
6320         aclocal.m4, instead of bailing out.
6321
6322 2006-07-29  Bruno Haible  <bruno@clisp.org>
6323
6324         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6325         Categorize the options by when they are useful.
6326
6327 2006-07-29  Bruno Haible  <bruno@clisp.org>
6328
6329         * gnulib-tool (func_usage): Document option --no-libtool.
6330         Handle option --no-libtool.
6331         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6332         for changed semantics of $libtool variable.
6333         (func_import): Likewise. If libtool is not used, show this through
6334         an option --no-libtool.
6335         (func_create_testdir): Update.
6336
6337 2006-07-29  Bruno Haible  <bruno@clisp.org>
6338
6339         * gnulib-tool (func_import): Extend error message about missing
6340         --doc-base.
6341
6342 2006-07-29  Bruno Haible  <bruno@clisp.org>
6343
6344         * gnulib-tool (func_import): Don't create the $docbase directory if
6345         there is no file to store there.
6346
6347 2006-07-29  Bruno Haible  <bruno@clisp.org>
6348
6349         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6350         relevant, look for configure.ac there, not in the current directory.
6351         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6352
6353 2006-07-29  Bruno Haible  <bruno@clisp.org>
6354
6355         * gnulib-tool (SORT): New variable.
6356         (func_usage): Undocument --assume-autoconf option.
6357         Remove --assume-autoconf option handling.
6358         (autoconf_minversion): Determine from the contents of configure.ac.
6359         (func_import): Remove autoconf_minversion handling.
6360         Suggested by Eric Blake.
6361
6362 2006-07-29  Bruno Haible  <bruno@clisp.org>
6363
6364         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6365
6366 2006-07-29  Bruno Haible  <bruno@clisp.org>
6367
6368         * config/srclist.txt (*setenv.[ch]): Remove rules.
6369
6370 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6371
6372         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6373
6374 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6375
6376         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6377         arpa/inet.h.
6378
6379 2006-07-28  Simon Josefsson  <jas@extundo.com>
6380
6381         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6382         * modules/inet_pton (Depends-on): Likewise.
6383
6384 2006-07-28  Simon Josefsson  <jas@extundo.com>
6385
6386         * m4/netinet_in_h.m4: New file.
6387
6388 2006-07-28  Simon Josefsson  <jas@extundo.com>
6389
6390         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6391         #include's.
6392
6393 2006-07-28  Simon Josefsson  <jas@extundo.com>
6394
6395         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6396         #include's.
6397
6398 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6399
6400         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6401         setgid on directories only if they set these bits.
6402         * lib/modechange.h: Remove obsolete comment about masks.
6403
6404 2006-07-28  Eric Blake  <ebb9@byu.net>
6405
6406         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6407         macro expansion.
6408
6409 2006-07-28  Bruno Haible  <bruno@clisp.org>
6410
6411         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6412
6413 2006-07-28  Bruno Haible  <bruno@clisp.org>
6414
6415         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6416
6417 2006-07-28  Bruno Haible  <bruno@clisp.org>
6418
6419         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6420         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6421         Define fallbacks.
6422         Avoids link error on FreeBSD 4.x.
6423         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6424
6425         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6426         encoding.
6427         * lib/mbswidth.c (iswcntrl): Likewise.
6428
6429 2006-07-27  Bruno Haible  <bruno@clisp.org>
6430
6431         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6432         test.
6433
6434 2006-07-27  Bruno Haible  <bruno@clisp.org>
6435
6436         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6437         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6438         defined.
6439
6440 2006-07-26  Eric Blake  <ebb9@byu.net>
6441
6442         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6443
6444 2006-07-26  Eric Blake  <ebb9@byu.net>
6445
6446         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6447         like mingw that lack mkstemp.
6448         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6449         avoid compilation warning on mingw.
6450
6451 2006-07-26  Bruno Haible  <bruno@clisp.org>
6452
6453         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6454         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6455         INT_FAST*_MIN, INTPTR_MIN.
6456
6457 2006-07-25  Bruno Haible  <bruno@clisp.org>
6458
6459         * modules/version-etc (Depends-on): Add stdarg.
6460
6461 2006-07-25  Bruno Haible  <bruno@clisp.org>
6462
6463         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6464         complex commands.
6465
6466 2006-07-25  Bruno Haible  <bruno@clisp.org>
6467
6468         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6469         defined in <stdarg.h> or config.h.
6470
6471 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6472
6473         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6474         (gl_STDIO_SAFER): Remove.
6475
6476 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6477
6478         * MODULES.html.sh (File stream based Input/Output):
6479         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6480         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6481         * modules/fopen-safer, modules/tmpfile-safer: New files.
6482         * modules/stdio-safer: Remove.
6483
6484 2006-07-24  Bruno Haible  <bruno@clisp.org>
6485
6486         * modules/tmpdir: New file.
6487         * MODULES.html.sh (File system functions): Add it.
6488
6489 2006-07-24  Bruno Haible  <bruno@clisp.org>
6490
6491         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6492         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6493
6494 2006-07-24  Bruno Haible  <bruno@clisp.org>
6495
6496         * modules/clean-temp: New file.
6497
6498 2006-07-24  Bruno Haible  <bruno@clisp.org>
6499
6500         * m4/tmpdir.m4: New file, from GNU gettext.
6501
6502 2006-07-24  Bruno Haible  <bruno@clisp.org>
6503
6504         * lib/tmpdir.h: New file, from GNU gettext.
6505         * lib/tmpdir.c: New file, from GNU gettext.
6506
6507 2006-07-24  Bruno Haible  <bruno@clisp.org>
6508
6509         * lib/clean-temp.h: New file, from GNU gettext.
6510         * lib/clean-temp.c: New file, from GNU gettext.
6511
6512 2006-07-23  Eric Blake  <ebb9@byu.net>
6513
6514         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6515         (Depends-on): Add binary-io.
6516
6517 2006-07-23  Eric Blake  <ebb9@byu.net>
6518
6519         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6520
6521 2006-07-23  Eric Blake  <ebb9@byu.net>
6522
6523         * lib/tmpfile-safer.c: New file.
6524         * lib/stdio-safer.h (fopen_safer): Add prototype.
6525         * lib/stdio--.h (tmpfile): Make safer.
6526
6527 2006-07-23  Bruno Haible  <bruno@clisp.org>
6528
6529         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6530         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6531         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6532         gl_linked_remove_at): Use it.
6533
6534 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6535         and Simon Josefsson <jas@extundo.com>
6536
6537         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6538
6539         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6540
6541 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6542
6543         * modules/close-stream: New file.
6544         * modules/closeout (Description): Make it clear that it exits
6545         with a diagnostic on error.
6546         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6547         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6548
6549 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6550
6551         * m4/close-stream.m4: New file.
6552
6553 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6554
6555         * lib/close-stream.c, lib/close-stream.h: New files.
6556
6557 2006-07-22  Bruno Haible  <bruno@clisp.org>
6558
6559         Merge from GNU gettext 0.15.
6560
6561         2006-05-01  Bruno Haible  <bruno@clisp.org>
6562
6563                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6564
6565         2006-07-22  Bruno Haible  <bruno@clisp.org>
6566
6567                 * modules/javaversion: New file.
6568                 * MODULES.html.sh (Java): Add javaversion.
6569
6570         2006-03-12  Bruno Haible  <bruno@clisp.org>
6571
6572                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6573
6574         2005-12-04  Bruno Haible  <bruno@clisp.org>
6575
6576                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6577                 (untested).
6578
6579         2006-06-21  Bruno Haible  <bruno@clisp.org>
6580
6581                 Avoid warnings from recent versions of mcs.
6582                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6583                 -o, -L, -r any more. Use options documented since mcs-1.0
6584                 instead. Similarly for -g.
6585
6586         2005-12-04  Bruno Haible  <bruno@clisp.org>
6587
6588                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6589                 .resources, not .resource.
6590
6591         2005-07-09  Bruno Haible  <bruno@clisp.org>
6592
6593                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6594                 add a .dll suffix.
6595                 Reported by Mark Junker <mjscod@gmx.de>.
6596
6597         2006-07-22  Bruno Haible  <bruno@clisp.org>
6598
6599                 * modules/gettext: Upgrade to gettext-0.15.
6600                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6601                 m4/visibility.m4.
6602                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6603
6604 2006-07-22  Bruno Haible  <bruno@clisp.org>
6605
6606         Merge from GNU gettext 0.15.
6607
6608         2006-03-25  Bruno Haible  <bruno@clisp.org>
6609
6610                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6611
6612         2006-07-21  Bruno Haible  <bruno@clisp.org>
6613
6614                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6615                 "1.1".
6616
6617         2006-05-09  Bruno Haible  <bruno@clisp.org>
6618
6619                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6620                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6621                 for the conftestver execution.
6622
6623         2006-05-01  Bruno Haible  <bruno@clisp.org>
6624
6625                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6626                 optional target-version argument. Verify that the compiler
6627                 groks source of the specified source-version, or add -source
6628                 option as necessary. Verify that the compiler produces
6629                 bytecode in the specified target-version, or add -target and
6630                 -source options as necessary. Make the result of the test
6631                 available as variable CONF_JAVAC. Also log error output in
6632                 config.log.
6633
6634         2006-03-11  Bruno Haible  <bruno@clisp.org>
6635
6636                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6637
6638         2006-05-09  Bruno Haible  <bruno@clisp.org>
6639
6640                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6641                 CLASSPATH_SEPARATOR to a semicolon.
6642
6643         2006-03-12  Bruno Haible  <bruno@clisp.org>
6644
6645                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6646                 available as variable CONF_JAVA, for subsequent autoconf
6647                 tests. Also log error output in config.log.
6648
6649         2006-07-19  Bruno Haible  <bruno@clisp.org>
6650
6651                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6652                 that getline works on glibc2 systems. Needed to avoid trouble
6653                 in relocatable.c.
6654                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6655
6656         2005-12-04  Bruno Haible  <bruno@clisp.org>
6657
6658                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6659                 launcher (untested).
6660
6661         2005-12-04  Bruno Haible  <bruno@clisp.org>
6662
6663                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6664
6665         2006-07-22  Bruno Haible  <bruno@clisp.org>
6666
6667                 * gettext.m4: Update from GNU gettext-0.15.
6668                 * nls.m4: Likewise.
6669                 * po.m4: Likewise.
6670                 * inttypes-pri.m4: Likewise.
6671                 * inttypes-h.m4: Renamed from inttypes.m4.
6672                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6673
6674 2006-07-22  Bruno Haible  <bruno@clisp.org>
6675
6676         Merge from GNU gettext 0.15.
6677
6678         2005-07-05  Bruno Haible  <bruno@clisp.org>
6679
6680                 * printf-args.c (printf_fetchargs): Work around broken
6681                 definition of wint_t on mingw.
6682
6683         2005-02-12  Bruno Haible  <bruno@clisp.org>
6684
6685                 * xallocsa.h: Add extern "C" for C++.
6686
6687         2006-05-17  Bruno Haible  <bruno@clisp.org>
6688
6689                 Cygwin portability.
6690                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6691
6692         2006-04-30  Bruno Haible  <bruno@clisp.org>
6693
6694                 * progreloc.c: Include <mach-o/dyld.h> if available.
6695                 (find_executable): Use _NSGetExecutablePath when possible.
6696
6697         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6698
6699                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6700                 function.
6701
6702         2005-12-29  Bruno Haible  <bruno@clisp.org>
6703
6704                 * progreloc.c (set_program_name_and_installdir): Fix
6705                 compilation error.
6706
6707         2005-12-04  Bruno Haible  <bruno@clisp.org>
6708
6709                 Cygwin portability.
6710                 * progreloc.c: Include <windows.h> also on Cygwin.
6711                 (find_executable): Add support for Cygwin.
6712                 (set_program_name_and_installdir): Handle also platforms with
6713                 nonempty EXEEXT.
6714
6715         2006-07-11  Bruno Haible  <bruno@clisp.org>
6716
6717                 * javacomp.c: Fix a comment.
6718                 Reported by Jim Meyering.
6719
6720         2006-04-30  Bruno Haible  <bruno@clisp.org>
6721
6722                 * javacomp.h (compile_java_class): Add source_version,
6723                 target_version arguments.
6724                 * javacomp.c: Rewritten to choose only a compiler that
6725                 respects the specified source_version and target_version.
6726
6727         2006-06-27  Bruno Haible  <bruno@clisp.org>
6728
6729                 Assume correct S_ISDIR macro.
6730                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6731
6732         2006-07-22  Bruno Haible  <bruno@clisp.org>
6733
6734                 * javaversion.h: New file, from GNU gettext.
6735                 * javaversion.c: New file, from GNU gettext.
6736                 * javaversion.java: New file, from GNU gettext.
6737                 * javaversion.class: New file, from GNU gettext.
6738
6739         2006-05-17  Bruno Haible  <bruno@clisp.org>
6740
6741                 Cygwin portability.
6742                 * javaexec.c (execute_java_class): Test for jview program
6743                 also on Cygwin.
6744
6745         2006-04-09  Bruno Haible  <bruno@clisp.org>
6746
6747                 * fatal-signal.c: Don't include string.h.
6748                 (at_fatal_signal): Use a copying loop instead of memcpy.
6749
6750         2005-12-04  Bruno Haible  <bruno@clisp.org>
6751
6752                 * csharpexec.c: Add support for 'clix' launcher (untested).
6753                 (execute_csharp_using_sscli): New function.
6754                 (execute_csharp_program): Call it.
6755
6756         2006-06-21  Bruno Haible  <bruno@clisp.org>
6757
6758                 Avoid warnings from recent versions of mcs.
6759                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6760                 -o, -L, -r any more. Use options documented since mcs-1.0
6761                 instead. Similarly for -g.
6762
6763         2005-07-09  Bruno Haible  <bruno@clisp.org>
6764
6765                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6766                 add a .dll suffix.
6767                 Reported by Mark Junker <mjscod@gmx.de>.
6768
6769         2006-06-17  Bruno Haible  <bruno@clisp.org>
6770
6771                 * config.charset: Update for NetBSD 3.0.
6772
6773         2006-05-17  Bruno Haible  <bruno@clisp.org>
6774
6775                 Cygwin portability.
6776                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6777
6778         2006-05-16  Bruno Haible  <bruno@clisp.org>
6779
6780                 * localcharset.c [CYGWIN]: Include <windows.h>.
6781                 (get_charset_aliases): For Cygwin, return the same CPxxx
6782                 aliases list as under WIN32.
6783                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6784                 the environment variables. Fall back to GetACP().
6785
6786         2006-04-05  Bruno Haible  <bruno@clisp.org>
6787
6788                 * config.charset: Update Juan Manuel Guerrero's address.
6789
6790         2005-02-12  Bruno Haible  <bruno@clisp.org>
6791
6792                 * allocsa.h: Add extern "C" for C++.
6793
6794         2005-02-10  Bruno Haible  <bruno@clisp.org>
6795
6796                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6797                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6798
6799         2006-07-22  Bruno Haible  <bruno@clisp.org>
6800
6801                 * gettext.h: Update to GNU gettext-0.15.
6802
6803 2006-07-22  Bruno Haible  <bruno@clisp.org>
6804
6805         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6806         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6807         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6808
6809 2006-07-21  Eric Blake  <ebb9@byu.net>
6810
6811         * modules/stdlib-safer: New file.
6812         * MODULES.html.sh (File stream based Input/Output): Add
6813         stdlib-safer.
6814
6815 2006-07-21  Eric Blake  <ebb9@byu.net>
6816
6817         * lib/stdlib-safer.h: New file from coreutils, required by
6818         stdlib--.h.
6819
6820 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6821
6822         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6823
6824 2006-07-20  Bruno Haible  <bruno@clisp.org>
6825
6826         * gnulib-tool: Recognize new option --assume-autoconf.
6827         (autoconf_minversion): New variable.
6828         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6829
6830 2006-07-20  Bruno Haible  <bruno@clisp.org>
6831
6832         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6833
6834 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6835
6836         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6837         Reindent and repaginate.
6838
6839 2006-07-19  Derek Price  <derek@ximbiot.com>
6840
6841         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6842         Correct grammar.
6843
6844 2006-07-17  Bruno Haible  <bruno@clisp.org>
6845
6846         * modules/list: New file.
6847         * modules/array-list: New file.
6848         * modules/carray-list, modules/carray-list-tests: New files.
6849         * modules/linked-list, modules/linked-list-tests: New files.
6850         * modules/avltree-list, modules/avltree-list-tests: New files.
6851         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6852         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6853         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6854         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6855         * modules/oset: New file.
6856         * modules/array-oset: New file.
6857         * modules/avltree-oset, modules/avltree-oset-tests: New files.
6858         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
6859         * tests/test-carray_list.c: New file.
6860         * tests/test-linked_list.c: New file.
6861         * tests/test-avltree_list.c: New file.
6862         * tests/test-rbtree_list.c: New file.
6863         * tests/test-linkedhash_list.c: New file.
6864         * tests/test-avltreehash_list.c: New file.
6865         * tests/test-rbtreehash_list.c: New file.
6866         * tests/test-avltree_oset.c: New file.
6867         * tests/test-rbtree_oset.c: New file.
6868         * MODULES.html.sh (Container data structures): New section.
6869
6870 2006-07-17  Bruno Haible  <bruno@clisp.org>
6871
6872         * m4/gl_list.m4: New file.
6873
6874 2006-07-17  Bruno Haible  <bruno@clisp.org>
6875
6876         * lib/gl_list.h: New file.
6877         * lib/gl_list.c: New file.
6878         * lib/gl_array_list.h: New file.
6879         * lib/gl_array_list.c: New file.
6880         * lib/gl_carray_list.h: New file.
6881         * lib/gl_carray_list.c: New file.
6882         * lib/gl_linked_list.h: New file.
6883         * lib/gl_linked_list.c: New file.
6884         * lib/gl_anylinked_list1.h: New file.
6885         * lib/gl_anylinked_list2.h: New file.
6886         * lib/gl_avltree_list.h: New file.
6887         * lib/gl_avltree_list.c: New file.
6888         * lib/gl_anyavltree_list1.h: New file.
6889         * lib/gl_anyavltree_list2.h: New file.
6890         * lib/gl_rbtree_list.h: New file.
6891         * lib/gl_rbtree_list.c: New file.
6892         * lib/gl_anyrbtree_list1.h: New file.
6893         * lib/gl_anyrbtree_list2.h: New file.
6894         * lib/gl_anytree_list1.h: New file.
6895         * lib/gl_anytree_list2.h: New file.
6896         * lib/gl_linkedhash_list.h: New file.
6897         * lib/gl_linkedhash_list.c: New file.
6898         * lib/gl_anyhash_list1.h: New file.
6899         * lib/gl_anyhash_list2.h: New file.
6900         * lib/gl_avltreehash_list.h: New file.
6901         * lib/gl_avltreehash_list.c: New file.
6902         * lib/gl_rbtreehash_list.h: New file.
6903         * lib/gl_rbtreehash_list.c: New file.
6904         * lib/gl_anytreehash_list1.h: New file.
6905         * lib/gl_anytreehash_list2.h: New file.
6906
6907         * lib/gl_oset.h: New file.
6908         * lib/gl_oset.c: New file.
6909         * lib/gl_array_oset.h: New file.
6910         * lib/gl_array_oset.c: New file.
6911         * lib/gl_avltree_oset.h: New file.
6912         * lib/gl_avltree_oset.c: New file.
6913         * lib/gl_rbtree_oset.h: New file.
6914         * lib/gl_rbtree_oset.c: New file.
6915         * lib/gl_anytree_oset.h: New file.
6916
6917 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6918
6919         * m4/mkancesdirs.m4: New file.
6920         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
6921         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
6922         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
6923         it.
6924
6925 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6926
6927         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
6928         * lib/mkancesdirs.h: New files.
6929         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
6930         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
6931         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
6932         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
6933         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
6934         callers changed.  Revamp internals significantly, by not
6935         attempting to create directories that are temporarily more
6936         permissive than the final results.  Do not attempt to use
6937         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
6938         This removes some race conditions, fixes some bugs, and simplifies
6939         things.  Use new dirchownmod function to do owner and mode changes.
6940         * lib/mkdir-p.h: Likewise.
6941         * lib/modechange.c (octal_to_mode): New function.
6942         (struct mode_change): New member mentioned.
6943         (make_node_op_equals): New arg mentioned.  All callers changed.
6944         (mode_compile): Keep track of which mode bits the user has explicitly
6945         mentioned.
6946         (mode_adjust): New arg DIR, so that we implement the X op correctly.
6947         New arg PMODE_BITS, to keep track of which mode bits the user
6948         mentioned; it treats S_ISUID and S_ISGID speciall.
6949         All callers changed.
6950         * lib/modechange.h: Likewise.
6951
6952 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
6953
6954         * MODULES.html.sh: Add mkancestors.
6955         * modules/mkancesdirs: New module.
6956         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
6957         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
6958         The chdir-safer and afs files are now orphans; I'll remove them
6959         unless someone speaks up.
6960         Add lib/dirchownmod.c, lib/dirchownmod.h.
6961         (Depends-on): Remove alloca, chown, save-cwd, dirname.
6962         Add lchown, mkancesdirs.
6963         (Maintainer): Add self.
6964
6965 2006-07-15  Karl Berry  <karl@gnu.org>
6966
6967         * gnulib-tool: help message wording/arrangement.
6968
6969 2006-07-14  Simon Josefsson  <jas@extundo.com>
6970
6971         * doc/gnulib.texi (Libtool and Windows): New section.
6972
6973 2006-07-12  Simon Josefsson  <jas@extundo.com>
6974
6975         * modules/gendocs (License): Fix license, approved by Karl.
6976
6977 2006-07-12  Eric Blake  <ebb9@byu.net>
6978
6979         * MODULES.html.sh: Add gendocs.
6980
6981 2006-07-11  Eric Blake  <ebb9@byu.net>
6982
6983         * modules/fdl: New module, to install doc/fdl.texi.
6984         * MODULES.html.sh: Add new section for documentation modules.
6985         * gnulib-tool: Avoid space-tab.
6986         (--doc-base): New option, to manage files from doc.
6987
6988 2006-07-11  Eric Blake  <ebb9@byu.net>
6989
6990         * m4/absolute-header.m4: Fix comments to match recent change.
6991
6992 2006-07-11  Eric Blake  <ebb9@byu.net>
6993
6994         * gnulib-tool: List --doc-base before --tests-base.
6995
6996 2006-07-11  Derek R. Price  <derek@ximbiot.com>
6997
6998         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
6999
7000 2006-07-11  Bruno Haible  <bruno@clisp.org>
7001
7002         * README: Mention where to put documentation.
7003
7004 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7005
7006         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7007
7008 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7009
7010         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7011         to stdint.m4.
7012
7013 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7014
7015         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7016         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7017         "no/such/file/stdint.h" when there is no such file, so that
7018         the resulting C code can be parsed by dodgy compilers.
7019         Problems reported by Bob Proulx.
7020
7021 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7022
7023         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7024         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7025         macros into the GNU _D_EXACT_NAMLEN.
7026         * lib/savedir.c:  Likewise.
7027         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7028
7029 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7030         and Paul Eggert  <eggert@cs.ucla.edu>
7031
7032         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7033         * m4/savedir.m4:
7034         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7035         macros into the GNU _D_EXACT_NAMLEN.
7036
7037 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7038
7039         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7040         around the absolute name, to work around a problem with the HP-UX
7041         11.23 native C compiler, reported by Bob Proulx.
7042
7043 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7044
7045         * doc/maintain.texi, make-stds.texi: Sync from
7046         <http://savannah.gnu.org/projects/gnustandards>.
7047
7048 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7049
7050         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7051
7052 2006-07-09  Jim Meyering  <jim@meyering.net>
7053
7054         * m4/glob.m4: Remove a doubled word in a comment.
7055
7056 2006-07-09  Jim Meyering  <jim@meyering.net>
7057
7058         * lib/argp-pv.c: Remove a doubled word in a comment.
7059         * lib/check-version.c (check_version): Likewise.
7060         * lib/javacomp.c (compile_java_class): Likewise.
7061
7062 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7063
7064         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7065         for the benefit of people using Autoconf 2.60.  If you want to
7066         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7067         (or m4/onceonly.m4, if pre-2.57) manually.
7068
7069 2006-07-08  Jim Meyering  <jim@meyering.net>
7070
7071         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7072         comment.
7073         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7074         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7075         comment.
7076
7077 2006-07-08  Jim Meyering  <jim@meyering.net>
7078
7079         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7080
7081 2006-07-07  Simon Josefsson  <jas@extundo.com>
7082
7083         * tests/test-crc.c: Change expected crc value, the test vector
7084         were probably computed using the old broken crc.c?
7085
7086 2006-07-06  Simon Josefsson  <jas@extundo.com>
7087
7088         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7089         now the canonical place for the M4 file).
7090
7091         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7092         from the sys_socket dependency now.
7093
7094         * modules/inet_pton (Files): Ditto.
7095
7096         * modules/inet_ntop (Files): Ditto.
7097
7098 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7099
7100         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7101         not gl_PREREQ_GETUSERSHELL.
7102
7103 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7104
7105         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7106         with only one argument, for Autoconf 2.60.
7107         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7108         expand to nothing, so add a shell command to avoid syntax error.
7109         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7110
7111 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7112
7113         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7114
7115 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7116
7117         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7118         no longer needed.  Check for isblank decl.
7119         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7120         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7121         of existence.
7122
7123 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7124
7125         * lib/getloadavg.c: Use __VMS, not VMS.
7126         * lib/getopt.c: Likewise.
7127         * lib/getpagesize.h: Likewise.
7128         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7129         and probably does not work.
7130
7131 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7132
7133         * lib/.cppi-disable: Add wcwidth.
7134         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7135         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7136         (ISGRAPH): Remove.  All uses changed to isgraph.
7137         (FOLD) [!defined _LIBC]: Remove special case.
7138         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7139         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7140         HAVE_ISBLANK.
7141         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7142         case.
7143
7144 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7145
7146         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7147         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7148         brackets.  Other minor changes to suppress some compiler
7149         warnings.
7150
7151 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7152         and Paul Eggert  <eggert@cs.ucla.edu>
7153
7154         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7155         of invoking obsolescent AC_HEADER_DIRENT macro.
7156         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7157         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7158         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7159         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7160         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7161         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7162         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7163         * m4/readdir.m4: Remove; no longer needed.
7164
7165 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7166         and Paul Eggert  <eggert@cs.ucla.edu>
7167
7168         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7169         Don't worry about this obsolete case any more.
7170         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7171         directories.
7172         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7173         worry about this obsolete case any more.
7174         * lib/fts.c: Likewise.
7175         * lib/getcwd.c: Likewise.
7176         * lib/glob.h: Likewise.
7177         * lib/savedir.c: Likewise.
7178
7179 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7180
7181         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7182         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7183         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7184         needed.
7185         All uses removed.
7186         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7187         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7188         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7189         needed.
7190         * m4/getdate.m4 (gl_GETDATE): Likewise.
7191         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7192         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7193         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7194         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7195         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7196         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7197         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7198         needed.
7199
7200 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7201
7202         * lib/memcasecmp.c: Include <limits.h>.
7203         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7204         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7205         Don't assume isdigit succeeds only on '0' through '9'.
7206
7207 2006-07-05  Eric Blake  <ebb9@byu.net>
7208
7209         * modules/getaddrinfo (Depends-on): Add snprintf.
7210
7211 2006-07-05  Eric Blake  <ebb9@byu.net>
7212
7213         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7214         to avoid 'header present but could not be compiled' on cygwin.
7215
7216 2006-07-05  Eric Blake  <ebb9@byu.net>
7217
7218         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7219         missing from netdb.h.
7220         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7221
7222 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7223
7224         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7225         no longer needed.
7226         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7227         * m4/getdate.m4 (gl_GETDATE): Likewise.
7228         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7229         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7230         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7231         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7232         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7233
7234 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7235
7236         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7237         All uses of is_space replaced by isspace.
7238         * lib/exit.h: Don't talk about STDC_HEADERS.
7239         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7240         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7241         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7242         replaced by isprint etc.
7243         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7244         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7245         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7246         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7247         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7248         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7249
7250 2006-07-05  Bruno Haible  <bruno@clisp.org>
7251
7252         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7253         the function exists, before testing against AIX.
7254         Reported by Martin Lambers <marlam@marlam.de>.
7255
7256 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7257
7258         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7259         From Mark D. Baushke.
7260
7261 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7262
7263         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7264         to the absolute name, not just one, to bypass Sun C 5.8's
7265         "warning: #include of /usr/include/... may be non-portable".
7266
7267 2006-07-04  Eric Blake  <ebb9@byu.net>
7268
7269         * modules/dirname-tests: New test module.
7270         * tests/test-dirname.c: New file, replacing dirname.c
7271         TEST_DIRNAME section that was recently deleted.
7272
7273 2006-07-04  Bruno Haible  <bruno@clisp.org>
7274
7275         Assume ANSI C header files and <ctype.h> functions.
7276         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7277         (mbsnwidth): Use isprint, iscntrl instead.
7278
7279 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7280
7281         Merge from coreutils.
7282         * MODULES.html.sh: Add xstrtold.
7283         * modules/xstrtold: New file.
7284         * modules/cycle-check (Files): Add lib/same-inode.h.
7285         * modules/dirname (Files): Add m4/double-slash-root.m4.
7286         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7287         * modules/mkdir-p (Files): Add lib/same-inode.h.
7288         * modules/same (Files): Add lib/same-inode.h.
7289
7290 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7291
7292         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7293         This is to keep the terminology clean; POSIX talks about
7294         "absolute pathnames", not "full pathnames", but the GNU
7295         Coding Standards say to use "path" for something else;
7296         so use "absolute" to keep both sides happy.
7297         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7298         Set gl_absolute_header, not gl_full_header_path.
7299         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7300         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7301         All uses changed.
7302
7303         Merge from coreutils.
7304
7305         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7306
7307         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7308         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7309         want to require the building of c-strtod.o.
7310         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7311         needs -lm directly.
7312         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7313
7314         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7315
7316         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7317         --as-needed option if available.  Problem reported by Albert Chin in
7318         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7319         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7320         cc merely issues a bunch of annoying warnings for --as-needed
7321         (this problem was reported by Bob Proulx).  Also, try linking with
7322         -lm to detect a bug in binutils 2.16 (this problem was reported
7323         by Ralf Wildenhues).
7324
7325         2006-06-18  Jim Meyering  <jim@meyering.net>
7326
7327         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7328         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7329         macro.
7330         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7331         also check for glibc-2.4's abort-inducing bug.
7332
7333         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7334         Low-probability clean-up should be to use rmdir to get rid of
7335         the just-created directory, not unlink.
7336
7337         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7338         configure fail, and request a bug report to inform us about it.
7339         Add a comment that, barring reports to the contrary, in 2007 we'll
7340         assume ftruncate is universally available.
7341
7342         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7343
7344         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7345
7346         2006-03-12  Jim Meyering  <jim@meyering.net>
7347
7348         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7349         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7350         * m4/same.m4 (gl_SAME): Likewise.
7351         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7352
7353         2006-03-11  Eric Blake  <ebb9@byu.net>
7354
7355         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7356         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7357         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7358         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7359
7360 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7361
7362         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7363         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7364         reported by Mark D. Baushke, one in
7365         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7366
7367         Merge from coreutils.
7368
7369         * lib/.cppi-disable: Add stdint_.h.
7370         * lib/.cvsignore: Add stdint.h.
7371
7372         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7373
7374         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7375         both double and long double versions.
7376         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7377         * lib/xstrtold.c: New file.
7378         * lib/xstrtod.h (xstrtold): New decl.
7379
7380         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7381
7382         * lib/filemode.c (setst): Remove.
7383         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7384         (arguably) clearer, and the generated code is a bit smaller on my
7385         Debian GNU/Linux stable x86 host.
7386
7387         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7388
7389         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7390         Assume that filemode.h includes sys/types.h and sys/stat.h.
7391         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7392         (ftypelet): Reorder to put common cases first, for efficiency.
7393         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7394         to do 'M'.
7395         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7396         of 10, for compatibility with FreeBSD.  All callers changed.
7397         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7398         types that can't be deduced solely from st_mode.  First arg is now a
7399         const pointer.
7400         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7401         (strmode): Renamed from mode_string.
7402         (filemodestring): New decl.
7403         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7404         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7405         needed.
7406         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7407
7408         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7409
7410         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7411         fsusage.h now does that.  Include fsusage.h first, to test interface.
7412         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7413         at most one method (the old code could have generated decls that
7414         didn't conform to C89, not that this was ever exercised).
7415         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7416
7417         2006-03-19  Jim Meyering  <jim@meyering.net>
7418
7419         Work even in a chroot where d_ino values for entries in "/"
7420         don't match the stat.st_ino values for the same names.
7421         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7422         number, iterate through all entries again, using lstat instead.
7423         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7424         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7425
7426         * lib/getcwd.c (__getcwd): Clarify a comment.
7427         Use memcpy in place of a call to strcpy.
7428
7429         2006-03-12  Jim Meyering  <jim@meyering.net>
7430
7431         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7432         matches that of the current directory (which we're about to chdir ".."
7433         out of), then save the dev-ino of the parent, instead.
7434
7435         * lib/same-inode.h (SAME_INODE): New file/macro.
7436         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7437         Include "same-inode.h", instead.
7438         * lib/same.c: Likewise.
7439         * lib/cycle-check.h: Include "same-inode.h".
7440         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7441         * lib/cycle-check.c (SAME_INODE): Remove definition.
7442         * lib/root-dev-ino.h: Include "same-inode.h".
7443
7444         2006-03-11  Eric Blake  <ebb9@byu.net>
7445
7446         * lib/same.c (same_name): s/base_name/last_component/
7447         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7448         * lib/filenamecat.c (file_name_concat): Likewise.
7449
7450         2006-03-11  Eric Blake  <ebb9@byu.net>,
7451                     Paul Eggert  <eggert@cs.ucla.edu>
7452
7453         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7454         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7455         drive prefix.
7456         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7457         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7458         (last_component): New method.
7459         * lib/dirname.c (dir_len): Determine when drive letters need a
7460         subsequent slash.  Preserve // when it is special.
7461         (dir_name): Don't append dot when drive letter is absolute.
7462         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7463         * lib/basename.c (base_name): New semantics - malloc the result.
7464         Preserve // when it is special.  Preserve relative files that look
7465         like drive letters.
7466         (base_len): Preserve // when it is special.
7467         (last_component): New method, similar to old base_name semantics.
7468         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7469         base_name.  Strip redundant slashes from ///.
7470
7471 2006-07-03  Jim Meyering  <jim@meyering.net>
7472
7473         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7474         macro is used before the first cycle_check call.
7475
7476 2006-07-03  Eric Blake  <ebb9@byu.net>
7477
7478         * modules/dirname (Depends-on): Add xstrndup.
7479
7480 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7481
7482         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7483         test cases, so that config.log is a bit easier to follow.
7484
7485 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7486
7487         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7488         both are 64 bits, since this seems to be the tradition, and this
7489         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7490         we ever run into a host that prefers long long to long in this
7491         case, we'll need another configure-time test.  Problem reported by
7492         Jim Meyering.
7493
7494 2006-07-02  Eric Blake  <ebb9@byu.net>
7495
7496         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7497
7498 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7499
7500         * modules/inttypes (Depends-on): No longer depends on stdint.
7501         * modules/stdint (Description): Say more about assumptions.
7502         Say that the fast types might differ.  Say macros are used.
7503         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7504         (Makefile.am): Revise list of substituted symbols to match
7505         new stdint.m4.
7506         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7507         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7508         * tests/test-stdint.c (verify_same_types)
7509         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7510         the code conforms to C99/C89.
7511         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7512         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7513
7514 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7515
7516         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7517         but fix a bug, by requiring at least 64 bits.
7518         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7519         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7520         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7521         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7522
7523         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7524         changes.  Make 2.59 a prerequisite.  Check and substitute for
7525         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7526         inttypes.h.  Do not use special include files; just use the
7527         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7528         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7529         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7530         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7531         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7532         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7533         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7534         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7535         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7536         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7537         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7538         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7539         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7540         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7541         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7542         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7543         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7544         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7545         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7546         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7547         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7548         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7549         not check for things that C99 does not require, e.g., int8_t.  If
7550         a test isn't needed unless <stdint.h> isn't working, and is
7551         unlikely to be needed for any other reason, then don't do it
7552         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7553         size_t, since we assume C89 freestanding at least.  Do not check
7554         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7555         the right thing even if the types are not defined.  Instead use:
7556         (gl_STDINT_TYPE_PROPERTIES): New macro.
7557         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7558         testing whether <sys/types.h> clashes, as Autoconf does this for
7559         us now.  All uses removed.
7560         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7561         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7562         (gl_CHECK_TYPE_SAME):
7563         Remove; no longer needed.
7564         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7565         exists, since we'll return 0 anyway in that case.
7566         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7567
7568 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7569
7570         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7571         possible collision with system files.
7572         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7573         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7574         WCHAR_MIN and WCHAR_MAX in this case.
7575         (<stddef.h>): Do not include; no longer needed.
7576         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7577         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7578         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7579         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7580         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7581         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7582         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7583         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7584         !defined(__c99))]: Include in this case too, since it's harmless
7585         now.
7586         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7587         dangerous to do so.
7588         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7589         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7590         (_STDINT_MIN, _STDINT_MAX): New macros.
7591         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7592         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7593         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7594         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7595         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7596         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7597         macros, not typedefs; this simplifies things quite a bit.
7598         Use long int for all types narrower than int64_t.
7599         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7600         Define in terms of long long int or int64_t or long int,
7601         not int64_t or int32_t.  This saves some compile-time testing.
7602         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7603         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7604         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7605         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7606         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7607         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7608         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7609         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7610         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7611         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7612         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7613         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7614         undef any previous version and define our own version, for
7615         simplicity and consistency with the new macros for types.
7616         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7617         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7618         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7619         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7620         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7621         @WINT_T_SUFFIX@ to keep things simple here.
7622         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7623         Simplify by assuming typical 8/16/32/64 host, since we're
7624         already doing that elsewhere anyway.
7625         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7626         and assume long long int is 64 bits if available.  This
7627         speeds up 'configure'.
7628
7629 2006-07-01  Eric Blake  <ebb9@byu.net>
7630
7631         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7632         Reported by Andreas Buening.
7633
7634 2006-07-01  Eric Blake  <ebb9@byu.net>
7635
7636         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7637
7638 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7639
7640         * lib/getaddrinfo.c: fixed typo
7641
7642 2006-06-29  Jim Meyering  <jim@meyering.net>
7643
7644         * modules/strftime (Maintainer): Add my name, since with the
7645         FPRINTFTIME changes strftime.c has forked from glibc.
7646
7647 2006-06-29  Eric Blake  <ebb9@byu.net>
7648
7649         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7650
7651 2006-06-29  Eric Blake  <ebb9@byu.net>
7652
7653         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7654
7655 2006-06-29  Eric Blake  <ebb9@byu.net>
7656
7657         * lib/stat_.h: New file.
7658
7659 2006-06-29  Eric Blake  <ebb9@byu.net>
7660
7661         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7662         unused static function.
7663
7664 2006-06-29  Eric Blake  <ebb9@byu.net>
7665
7666         * doc/functions.texi (Function Portability): Document missing lstat
7667         on mingw.
7668
7669 2006-06-29  Eric Blake  <ebb9@byu.net>
7670
7671         * MODULES.html.sh: Add sys_stat.
7672         * modules/sys_stat: New module.
7673         * modules/mkstemp (Depends-on): Add sys_stat.
7674
7675 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7676
7677         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7678
7679 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7680
7681         * m4/c-bs-a.m4: Removed.
7682
7683 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7684
7685         * lib/strftime.c: Assume strftime() exists.
7686
7687 2006-06-29  Derek Price  <derek@ximbiot.com>
7688
7689         * modules/c-bs-a: Removed - \a is C89.
7690         * MODULES.html.sh: Remove c-bs-a.
7691
7692 2006-06-29  Bruno Haible  <bruno@clisp.org>
7693
7694         * modules/wcwidth (License): Change to LGPL.
7695
7696 2006-06-28  Simon Josefsson  <jas@extundo.com>
7697
7698         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7699         on _WIN32.
7700
7701         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7702         getnameinfo.
7703
7704 2006-06-28  Simon Josefsson  <jas@extundo.com>
7705
7706         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7707
7708 2006-06-28  Simon Josefsson  <jas@extundo.com>
7709
7710         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7711         functions there.  It will succeed on Windows XP, but on Windows
7712         2000 and (presumably) earlier, it will fail, and use the internal
7713         re-implementation.
7714         (use_win32_p): New function.
7715         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7716         Support AI_NUMERICSERV to disable getservbyname.
7717         (getnameinfo): New function, only supports
7718         NI_NUMERICHOST|NI_NUMERICSERV for now.
7719
7720         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7721         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7722         getnameinfo.
7723
7724 2006-06-28  Eric Blake  <ebb9@byu.net>
7725
7726         * modules/wcwidth: New file.
7727         * modules/mbchar (Depends-on): Add wcwidth.
7728         * modules/mbswidth (Depends-on): Add wcwidth.
7729         * MODULES.html.sh: Add wcwidth.
7730
7731 2006-06-28  Eric Blake  <ebb9@byu.net>
7732
7733         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7734         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7735
7736 2006-06-28  Eric Blake  <ebb9@byu.net>
7737
7738         * lib/xvasprintf.h: Fix comments.
7739
7740 2006-06-28  Eric Blake  <ebb9@byu.net>
7741
7742         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7743         * lib/mbswidth.c (wcwidth): Move from here...
7744         * lib/wcwidth.h: ...to this new file.
7745
7746 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7747
7748         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7749
7750         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7751         it's obsolete.
7752         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7753
7754 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7755
7756         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7757         Autoconf 2.60 says this stuff was obsolete.
7758
7759 2006-06-28  Bruno Haible  <bruno@clisp.org>
7760
7761         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7762
7763 2006-06-28  Bruno Haible  <bruno@clisp.org>
7764
7765         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7766         gt_TYPE_WCHAR_T.
7767
7768 2006-06-28  Bruno Haible  <bruno@clisp.org>
7769
7770         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7771         declaration for wcwidth.
7772         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7773
7774 2006-06-28  Bruno Haible  <bruno@clisp.org>
7775
7776         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7777         (mkdir): Define using _mkdir.
7778
7779 2006-06-28  Bruno Haible  <bruno@clisp.org>
7780
7781         * lib/getaddrinfo.h: Fix POSIX URL.
7782         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7783         _WIN32.
7784         (use_win32_p): Make static.
7785         (getaddrinfo): Reject service name if it is empty or does not consist
7786         solely of decimal digits, or if its value is > 65535.
7787         (getnameinfo): Remove useless casts.
7788
7789 2006-06-27  Simon Josefsson  <jas@extundo.com>
7790
7791         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7792         Eggert and Martin Lambers.
7793
7794 2006-06-27  Simon Josefsson  <jas@extundo.com>
7795
7796         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7797         Eggert and Martin Lambers.
7798
7799 2006-06-27  Bruno Haible  <bruno@clisp.org>
7800
7801         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7802         result to 0, not to empty.
7803         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7804
7805 2006-06-27  Bruno Haible  <bruno@clisp.org>
7806
7807         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7808
7809 2006-06-26  Simon Josefsson  <jas@extundo.com>
7810
7811         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7812         present.
7813
7814 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7815
7816         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7817         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7818         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7819
7820 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7821
7822         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7823
7824 2006-06-26  Bruno Haible  <bruno@clisp.org>
7825
7826         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7827
7828 2006-06-26  Bruno Haible  <bruno@clisp.org>
7829
7830         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7831
7832 2006-06-26  Bruno Haible  <bruno@clisp.org>
7833
7834         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7835         SGI C compiler in pre-C99 mode.
7836         Suggested by Mark D. Baushke and Larry Jones.
7837
7838 2006-06-26  Bruno Haible  <bruno@clisp.org>
7839
7840         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7841         WCHAR_MAX.
7842         Reported by Mark D. Baushke and Larry Jones.
7843
7844 2006-06-26  Bruno Haible  <bruno@clisp.org>
7845
7846         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7847         in pre-C99 mode.
7848         Suggested by Mark D. Baushke and Larry Jones.
7849
7850 2006-06-23  Simon Josefsson  <jas@extundo.com>
7851             Bruno Haible  <bruno@clisp.org>
7852
7853         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7854         Emit mostlyclean-local rule.
7855         (func_emit_tests_Makefile_am): Likewise.
7856         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
7857
7858 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
7859
7860         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
7861
7862 2006-06-23  Bruno Haible  <bruno@clisp.org>
7863
7864         * tests/test-stdint.c: Update to match ISO C 99 Technical
7865         Corrigendum 1.
7866
7867 2006-06-23  Bruno Haible  <bruno@clisp.org>
7868
7869         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
7870
7871 2006-06-23  Bruno Haible  <bruno@clisp.org>
7872
7873         * lib/stdint_.h: Treat IRIX like OpenBSD.
7874
7875 2006-06-23  Bruno Haible  <bruno@clisp.org>
7876
7877         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
7878         ISO C 99 Technical Corrigendum 1.
7879
7880 2006-06-22  Simon Josefsson  <jas@extundo.com>
7881
7882         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
7883         MinGW.
7884
7885 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
7886
7887         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
7888         needed.  Some compiler complained about some of them.  Problem reported
7889         by Larry Jones in
7890         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
7891
7892 2006-06-21  Simon Josefsson  <jas@extundo.com>
7893
7894         * tests/test-getaddrinfo.c: New file.
7895
7896         * modules/getaddrinfo-tests: New file.
7897
7898         * MODULES.html.sh: Add inet_pton.
7899
7900         * modules/inet_pton: New file.
7901
7902 2006-06-21  Simon Josefsson  <jas@extundo.com>
7903
7904         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
7905         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
7906         of using the (limited) gnulib implementation on Windows XP.
7907
7908         * m4/inet_pton.m4: New file.
7909
7910 2006-06-21  Simon Josefsson  <jas@extundo.com>
7911
7912         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
7913         variable.
7914
7915         * lib/socket_.h: Don't define WINVER.
7916
7917         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
7918         slightly modified to work in gnulib.
7919
7920 2006-06-21  Simon Josefsson  <jas@extundo.com>
7921
7922         * doc/gnulib.texi (Windows sockets): Add.
7923
7924 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
7925
7926         * lib/read-file.c (fread_file): Start with buffer allocation of
7927         0 bytes rather than 1 byte; this simplifies the code.
7928         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
7929         code to free buffer and save/restore errno.
7930         (internal_read_file): Remove unused local.
7931
7932 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
7933
7934         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
7935         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
7936         Problem reported by Denis Excoffier in
7937         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
7938
7939 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
7940
7941         * modules/sys_socket, modules/socklen: Include sys/types since
7942         FreeBSD 4.x's sys/socket.h needs it.
7943
7944 2006-06-19  Simon Josefsson  <jas@extundo.com>
7945
7946         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
7947
7948 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7949
7950         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
7951
7952 2006-06-19  Bruno Haible  <bruno@clisp.org>
7953
7954         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
7955         and FULL_PATH_INTTYPES_H in angle brackets.
7956         Reported by Mark D. Baushke <mdb@gnu.org>.
7957
7958 2006-06-17  Eric Blake  <ebb9@byu.net>
7959
7960         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
7961         errno.
7962
7963 2006-06-17  Bruno Haible  <bruno@clisp.org>
7964
7965         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
7966         <sys/inttypes.h>.
7967
7968 2006-06-17  Bruno Haible  <bruno@clisp.org>
7969
7970         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
7971         whether errno is declared. Assume <errno.h> declares errno.
7972
7973 2006-06-17  Bruno Haible  <bruno@clisp.org>
7974
7975         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
7976
7977 2006-06-17  Bruno Haible  <bruno@clisp.org>
7978
7979         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
7980         problem on Solaris 2.5.1.
7981
7982 2006-06-16  Eric Blake  <ebb9@byu.net>
7983
7984         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
7985         * lib/unicodeio.c [!defined errno]: Likewise.
7986         * lib/strtol.c [!defined errno]: Likewise.
7987         * lib/strtod.c [!defined errno]: Likewise.
7988
7989 2006-06-15  Eric Blake  <ebb9@byu.net>
7990
7991         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
7992
7993 2006-06-15  Eric Blake  <ebb9@byu.net>
7994
7995         * config/srclist.txt (ssize_t.m4): Lose sync.
7996
7997 2006-06-15  Bruno Haible  <bruno@clisp.org>
7998
7999         * modules/stdint (Files): Include m4/full-header-path.m4,
8000         m4/size_max.m4, m4/wchar_t.m4.
8001         (Makefile.am): Many more substitutions.
8002         * modules/stdint-tests: New file.
8003         * tests/test-stdint.c: New file.
8004
8005 2006-06-15  Bruno Haible  <bruno@clisp.org>
8006
8007         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8008         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8009         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8010         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8011         gl_CHECK_TYPE_SAME): New macros.
8012
8013 2006-06-15  Bruno Haible  <bruno@clisp.org>
8014
8015         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8016
8017 2006-06-15  Bruno Haible  <bruno@clisp.org>
8018
8019         * lib/stdint_.h: Rewritten to be fully auto-configured.
8020         Fixes bug on HP-UX/IA64.
8021
8022 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8023
8024         * lib/getdate.y (__attribute__): Don't define if already defined.
8025         Problem reported by Larry Jones.
8026         * lib/utimens.c (__attribute__): Likewise.
8027
8028 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8031         reported by Andreas Schwab.
8032
8033 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8034             Bruno Haible  <bruno@clisp.org>
8035
8036         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8037         check for the declaration of strnlen and a run test that exposes the
8038         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8039         rpl_strndup.
8040
8041 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8042             Bruno Haible  <bruno@clisp.org>
8043
8044         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8045
8046 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8047
8048         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8049         compile test, for Tru64 4.0D.
8050
8051 2006-05-28  Karl Berry  <karl@gnu.org>
8052
8053         * config/srclist.txt (printf-args.c): lose sync.
8054
8055 2006-05-26  Martin Lambers  <marlam@marlam.de>
8056
8057         * lib/getpass.c: Updates the test for the native W32 API, and adds
8058         missing includes, thus fixing compilation warnings.
8059
8060 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8061
8062         * lib/exclude.c (exclude_fnmatch): New function.
8063         (excluded_file_name): Call exclude_fnmatch.
8064         * lib/exclude.h (excluded_file_name): New prototype
8065
8066 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8067
8068         * lib/tempname.c (small_open, large_open): New macros.
8069         (__open, __open64) [!_LIBC]: Remove.
8070         (__gen_tempname): Use small_open and large_open instead of __open
8071         and __open64.  This fixes a portability bug on HP-UX 11.11i
8072         reported by Simon Wing-Tang in
8073         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8074
8075 2006-05-24  Bruno Haible  <bruno@clisp.org>
8076
8077         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8078         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8079         Reported by Thorsten Maerz <torte@netztorte.de> via
8080         Aaron Stone <aaron@serendipity.cx>.
8081
8082 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8083
8084         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8085         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8086         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8087         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8088         not really conditional on the cache.
8089         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8090
8091 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8092
8093         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8094         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8095         (my_usleep): Don't mishandle maximum value.
8096
8097 2006-05-19  Jim Meyering  <jim@meyering.net>
8098
8099         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8100
8101 2006-05-17  Bruno Haible  <bruno@clisp.org>
8102
8103         Cygwin portability.
8104         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8105
8106 2006-05-17  Bruno Haible  <bruno@clisp.org>
8107
8108         * lib/stdint_.h: Fix recognition of Cygwin.
8109
8110 2006-05-15  Bruno Haible  <bruno@clisp.org>
8111
8112         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8113         on libtool patch by Ralf Wildenhues.
8114
8115 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8116
8117         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8118         test for C99 conformance; (bool) 0.5 is an integer constant
8119         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8120         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8121
8122 2006-05-11  Simon Josefsson  <jas@extundo.com>
8123
8124         * m4/xvasprintf.m4: Fix obvious typo.
8125
8126 2006-05-11  Jim Meyering  <jim@meyering.net>
8127
8128         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8129         James Lemley.
8130
8131 2006-05-10  Simon Josefsson  <jas@extundo.com>
8132
8133         * lib/md4.c: Typo fix, update copyright years.
8134         (K1, K2): Don't use L because it turn computations into 64-bit on
8135         64-bit platforms.
8136
8137 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8138
8139         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8140         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8141         unwanted sign propagation, e.g., on hosts with 64-bit int.
8142         There still are some problems with reeelly weird theoretical hosts
8143         (e.g., 33-bit int) but it's not worth worrying about now.
8144         * lib/sha1.c (rol): Likewise.
8145         (K1, K2, K3, K4): Remove unnecessary L suffix.
8146
8147 2006-05-10  Bruno Haible  <bruno@clisp.org>
8148
8149         * lib/des.c: Cast to avoid warnings.
8150
8151 2006-05-09  Bruno Haible  <bruno@clisp.org>
8152
8153         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8154         (Depends-on): Depend also on xsize, stdarg.
8155         (configure.ac): Add gl_XVASPRINTF.
8156
8157 2006-05-09  Bruno Haible  <bruno@clisp.org>
8158
8159         * m4/xvasprintf.m4: New file.
8160
8161 2006-05-09  Bruno Haible  <bruno@clisp.org>
8162
8163         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8164         (EOVERFLOW): Define fallback value.
8165         (xstrcat): New function.
8166         (xvasprintf): Recognize the special case of a string concatenation.
8167
8168 2006-05-08  Eric Blake  <ebb9@byu.net>
8169
8170         * gnulib-tool (func_version): Base copyright year on CVS date.
8171         (func_emit_copyright_notice): New function.
8172         (func_emit_lib_Makefile_am): Use it.
8173         (func_emit_tests_Makefile_am): Likewise.
8174         (func_import): Likewise.
8175
8176 2006-05-08  Bruno Haible  <bruno@clisp.org>
8177
8178         * modules/stdarg: New file.
8179         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8180
8181 2006-05-08  Bruno Haible  <bruno@clisp.org>
8182
8183         * m4/stdarg.m4: New file, from GNU gettext.
8184
8185 2006-05-08  Bruno Haible  <bruno@clisp.org>
8186
8187         * config/srclist.txt (build-aux/config.rpath): different from latest
8188         release.
8189
8190 2006-05-08  Bruno Haible  <bruno@clisp.org>
8191
8192         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8193
8194 2006-05-05  Jim Meyering  <jim@meyering.net>
8195
8196         * m4/warning.m4: New file, derived from bison's file by the same name.
8197
8198 2006-05-03  Bruno Haible  <bruno@clisp.org>
8199
8200         * lib/stdint_.h: Shorter URL.
8201         * lib/inttypes.h: Likewise.
8202
8203 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8204
8205         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8206
8207 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8208
8209         * lib/verify.h: Document the internals better.  Most of this change
8210         was written by Bruno Haible.
8211
8212 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8213
8214         * doc/verify.texi: New file, partly based on a proposal by
8215         Bruno Haible.
8216
8217 2006-05-02  Bruno Haible  <bruno@clisp.org>
8218
8219         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8220         test from here...
8221         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8222
8223 2006-04-29  Bruno Haible  <bruno@clisp.org>
8224
8225         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8226         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8227
8228 2006-04-29  Bruno Haible  <bruno@clisp.org>
8229
8230         * gnulib-tool: Make --update option actually work.
8231
8232 2006-04-29  Bruno Haible  <bruno@clisp.org>
8233
8234         * doc/gcd.texi: New file.
8235         * doc/gnulib.texi: Include it.
8236
8237 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8238
8239         * lib/getdate.y (get_date): When adding relative date, start with the
8240         initial time, not with the result of the first mktime call.
8241
8242 2006-04-25  Bruno Haible  <bruno@clisp.org>
8243
8244         * gnulib-tool (func_import): Output the include directives in three
8245         blocks, sorted separately.
8246         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8247
8248 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8249
8250         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8251         to define main with arguments, for C++.  Reported by Eric Blake.
8252         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8253         Prefer 'int main ()' to 'int main (void)', for C++.
8254         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8255         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8256         for 'main', for C99 and C++.
8257
8258 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8259
8260         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8261         Don't assume that exit status -1 is valid.
8262         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8263         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8264         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8265         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8266         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8267         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8268         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8269         functions can be used without declaring them, or that you can
8270         exit with status -1.
8271         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8272
8273 2006-04-24  Karl Berry  <karl@gnu.org>
8274
8275         * config/srclist.txt (longdouble.m4): sync lost.
8276
8277 2006-04-24  Eric Blake  <ebb9@byu.net>
8278
8279         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8280
8281 2006-04-24  Bruno Haible  <bruno@clisp.org>
8282
8283         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8284         poll() implementation in AIX.
8285         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8286
8287 2006-04-24  Bruno Haible  <bruno@clisp.org>
8288
8289         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8290         assigned exactly once.
8291
8292 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8293             Bruno Haible  <bruno@clisp.org>
8294
8295         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8296         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8297         for AM_CPPFLAGS.
8298
8299 2006-04-23  Bruno Haible  <bruno@clisp.org>
8300
8301         * modules/copy-file: Depend on unistd.
8302         * modules/execute: Likewise.
8303         * modules/fatal-signal: Likewise.
8304         * modules/findprog: Likewise.
8305         * modules/mkdtemp : Likewise.
8306         * modules/pipe: Likewise.
8307         * modules/wait-process: Likewise.
8308
8309 2006-04-23  Bruno Haible  <bruno@clisp.org>
8310
8311         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8312         condition was already detected.
8313         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8314
8315 2006-04-23  Bruno Haible  <bruno@clisp.org>
8316
8317         * lib/copy-file.c: Include <unistd.h> unconditionally.
8318         * lib/execute.c: Likewise.
8319         * lib/fatal-signal.c: Likewise.
8320         * lib/findprog.c: Likewise.
8321         * lib/mkdtemp.c: Likewise.
8322         * lib/pipe.h: Likewise.
8323         * lib/pipe.c: Likewise.
8324         * lib/wait-process.h: Likewise.
8325
8326 2006-04-23  Bruno Haible  <bruno@clisp.org>
8327
8328         * gnulib-tool (func_usage): Fix --import description. Document
8329         --update.
8330         (func_import): Create temporary file in a temporary directory, if
8331         --dry-run is specified. Silence errors from 'grep' when there are no
8332         m4 files in $m4dir.
8333         (func_create_testdir): Silence errors from 'grep' when there are no
8334         m4 files in $m4dir.
8335         Reported by Karl Berry <karl@freefriends.org>.
8336
8337 2006-04-20  Bruno Haible  <bruno@clisp.org>
8338
8339         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8340         one argument, so that the code will be portable to Autoconf 2.60.
8341         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8342         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8343         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8344
8345 2006-04-19  Derek Price  <derek@ximbiot.com>
8346             Eric Blake  <ebb9@byu.net>
8347
8348         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8349         rather than "/full/path.h".  Update comment to match.  Shorten &
8350         generalize m4_translit call via AS_TR_CPP.
8351
8352 2006-04-19  Derek Price  <derek@ximbiot.com>
8353             Eric Blake  <ebb9@byu.net>
8354
8355         * lib/inttypes.h: Correct grammar in comment.
8356
8357 2006-04-18  Derek Price  <derek@ximbiot.com>
8358             Paul Eggert  <eggert@cs.ucla.edu>
8359
8360         * modules/inttypes: New file.
8361         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8362
8363 2006-04-18  Derek Price  <derek@ximbiot.com>
8364             Paul Eggert  <eggert@cs.ucla.edu>
8365
8366         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8367         New files.
8368
8369 2006-04-18  Derek Price  <derek@ximbiot.com>
8370             Paul Eggert  <eggert@cs.ucla.edu>
8371
8372         * lib/inttypes.h: New file.
8373         * lib/strtoimax.c: Assume <inttypes.h>.
8374
8375 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8376
8377         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8378         isn't mounted.  Problem reported by Kir Kolyshkin.
8379
8380 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8381
8382         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8383         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8384         Derek R. Price.
8385         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8386         implementation.
8387
8388 2006-04-12  Eric Blake  <ebb9@byu.net>
8389
8390         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8391         is now done automatically by the corresponding Autoconf macro.
8392
8393 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8394
8395         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8396         time_r.h.
8397
8398 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8399
8400         Merge regex changes from libc, removing some of our
8401         POSIX-conformance changes that were rejected and redoing them in a
8402         less-intrusive way.
8403
8404         * lib/regcomp.c (re_compile_internal, init_dfa):
8405         Length arg is now size_t, not Idx.  All uses changed.
8406         (peek_token): Forward decl now says internal_function.
8407         (__re_error_msgid, __re_error_msgid_idx):
8408         Now static rather than extern with attribute_hidden.
8409         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8410         For some reason libc prefers K&R style defns for external functions.
8411         (regerror) [!defined _LIBC]: Likewise.
8412         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8413         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8414         (build_range_exp, build_collating_symbol):
8415         Use K&R-style defn.
8416         (re_compile_fastmap): Use '\0' to memset, not 0.
8417         (utf8_sb_map): Make the calculations more obvious.
8418         (init_dfa, parse_bracket_exp, build_charclass_op):
8419         Call calloc and cast result, as glibc does.
8420         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8421         (build_range_exp, build_collating_symbol):
8422         Now internal functions.
8423
8424         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8425
8426         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8427         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8428         Don't depend on VMS; depend on __VMS instead, for POSIX
8429         namespace cleanness.
8430         (regoff_t): Define to ssize_t, not long int.
8431
8432         Remove the REG_ macros named below.  Instead, make the old names
8433         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8434         __USE_GNU_REGEX.
8435         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8436         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8437         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8438         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8439         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8440         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8441         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8442         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8443         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8444         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8445         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8446         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8447         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8448         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8449         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8450         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8451         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8452         (REG_NREGS):
8453         Remove.  All uses replaced by the old RE_* names.
8454         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8455         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8456         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8457         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8458         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8459         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8460         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8461         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8462         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8463         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8464         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8465         Don't bother having these macros be independent of each others'
8466         values, since they no longer exist in the POSIX name space.
8467
8468         Rename the following member names back to their old names,
8469         unless !__USE_GNU_REGEX.  All uses changed back.
8470         (buffer): Renamed from re_buffer.
8471         (allocated): Renamed from re_allocated.
8472         (used): Renamed from re_used.
8473         (syntax): Renamed from re_syntax.
8474         (fastmap): Renamed from re_fastmap.
8475         (translate): Renamed from re_translate.
8476         (can_be_null): Renamed from re_can_be_null.
8477         (regs_allocated): Renamed from re_regs_allocated.
8478         (fastmap_accurate): Renamed from re_fastmap_accurate.
8479         (no_sub): Renamed from re_no_sub.
8480         (not_bol): Renamed from re_not_bol.
8481         (not_eol): Renamed from re_not_eol.
8482         (newline_anchor): Renamed from re_newline_anchor.
8483         (num_regs): Renamed from rm_num_regs.
8484         (start): Renamed from rm_start.
8485         (end): Renamed from rm_end.
8486
8487         (free_state): Move up a bit.
8488
8489         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8490         #define to be empty.
8491         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8492         when that is what is intended.
8493         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8494         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8495         (MAX): New macro.
8496         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8497         All uses changed back to re_malloc, etc.  It's now the caller's
8498         responsibility to check for overflow; all callers changed.
8499         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8500         (re_x2nrealloc): Remove.
8501         (free_state): Remove decl.
8502
8503         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8504         (re_set_registers, re_exec):
8505         Use K&R-style defn.
8506
8507         2006-01-31  Roland McGrath  <roland@redhat.com>
8508
8509         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8510         Reported by Mike Frysinger <vapier@gentoo.org>.
8511
8512         2006-01-15  Andreas Jaeger  <aj@suse.de>
8513
8514         [BZ #1950]
8515         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8516         build_wcs_upper_buffer change.
8517         (build_wcs_upper_buffer): Change return type.
8518
8519         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8520
8521         * lib/regex_internal.h: Include <stdint.h> if available.
8522
8523         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8524
8525         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8526
8527         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8528
8529         * lib/regcomp.c: Adjust for changed secondary hash function.
8530
8531         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8532
8533         * lib/regex.h: Pretty printing.
8534         Clean up namespace a bit.
8535
8536         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8537
8538         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8539         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8540
8541         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8542                     Ulrich Drepper  <drepper@redhat.com>
8543
8544         [BZ #1302]
8545         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8546         changed.
8547         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8548
8549         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8550
8551         [BZ #281]
8552         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8553         * lib/regcomp.c: Remove unnecessary uses of
8554         unsigned RE_TRANSLATE_TYPE.
8555         * lib/regex_internal.h: Likewise.
8556         * lib/regex_internal.c: Likewise.
8557         * lib/regexec.c: Likewise.
8558         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8559
8560         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8561
8562         * lib/regexec.c (find_recover_state): Remove unnecessary
8563         initialization.
8564         (transit_state_bkref): Make DFA a const pointer.
8565         (get_subexp): Likewise.
8566         (check_arrival): Likewise.
8567         (update_cur_sifted_state): Likewise.
8568         (re_search_internal): Likewise.
8569         (prune_impossible_nodes): Likewise.
8570         (acquire_init_state_context): Likewise.
8571         (proceed_next_node): Likewise.
8572         (set_regs): Likewise.
8573         (free_fail_stack_return): Likewise.
8574         (check_arrival_expand_ecl): Mark DFA parameter as const.
8575         (check_arrival_expand_ecl_sub): Likewise.
8576         (check_subexp_limits): Likewise.
8577         (sub_epsilon_src_nodes):  Likewise.
8578         (add_epsilon_src_nodes):  Likewise.
8579         (merge_state_array): Likewise.
8580         (update_regs): Likewise.
8581         (build_trtable): Likewise.
8582         (sift_states_backward): Mark MCTX parameter as const.
8583         (build_sifted_states): Likewise.
8584         (update_cur_sifted_state): Likewise.
8585         (sift_states_mkref): Likewise.
8586         (check_arrival_expand_ecl): Mark eclosure as const.
8587         (check_dst_limits_calc_pos_1): Likewise.
8588         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8589         pointer.
8590
8591         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8592
8593         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8594         (transit_state_sb): Likewise.
8595         (transit_state_mb): Likewise.
8596         (sift_states_iter_mb): Likewise.
8597         (check_arrival_add_next_nodes): Likewise.
8598         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8599         [_LIBC] (re_search_2_stub): Use mempcpy.
8600
8601         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8602         mbrtowc for very simple UTF-8 case.
8603
8604         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8605         a pointer-to-const.
8606         (re_acquire_state_context): Likewise.
8607         * lib/regex_internal.h: Adjust prototypes.
8608
8609         * lib/regex.c: Prevent using C++ compilers.
8610
8611         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8612         (re_acquire_state_context): Likewise.
8613
8614 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8615
8616         * modules/regex (Depends-on): Add ssize_t.
8617
8618 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8619
8620         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8621         translation table.
8622
8623 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8624
8625         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8626
8627 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8628             Bruno Haible  <bruno@clisp.org>
8629
8630         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8631         <sys/types.h> and <inttypes.h>.
8632
8633 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8634
8635         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8636         `__error_t_defined', so argp.h will not typedef the former.
8637
8638 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8639
8640         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8641         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8642         glibc names.  Even if glibc is changed to conform to POSIX, the
8643         traditional names will be available anyway, since regex depends on
8644         the extensions module.  Also, fix a longstanding typo in the
8645         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8646         reported by Emanuele Giaquinta.  Also, change sense of cached
8647         variable, so that the message makes sense.
8648
8649 2006-03-24  Simon Josefsson  <jas@extundo.com>
8650
8651         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8652         including some doc fixes.
8653         (base64_encode_alloc): Fix +1 bug on allocation failures.
8654
8655 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8656
8657         * lib/base64.c (base64_encode): Do not read past end of array with
8658         unsanitized input on systems with CHAR_BIT > 8.
8659
8660 2006-03-24  Eric Blake  <ebb9@byu.net>
8661
8662         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8663
8664 2006-03-22  Karl Berry  <karl@gnu.org>
8665
8666         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8667         * config/srclistvars.sh (COREUTILS): new var.
8668
8669 2006-03-17  Jim Meyering  <jim@meyering.net>
8670
8671         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8672         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8673
8674 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8675
8676         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8677         no longer needs it.  Instead, check that regoff_t is as least
8678         as wide as ptrdiff_t.
8679
8680         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8681         so that our regex.h stays compatible with the installed regex.
8682         This is helpful for installers who configure --without-included-regex.
8683         Problem reported by Emanuele Giaquinta.
8684
8685 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8686
8687         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8688         Typedef to long int, not to off_, as POSIX will likely change
8689         in that direction.
8690
8691 2006-03-15  Eric Blake  <ebb9@byu.net>
8692
8693         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8694
8695 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8696
8697         * lib/argp-help.c (validate_uparams): Fix typo
8698         * lib/argp-parse.c (argp_default_options): Consistently begin help
8699         messages with a lowercase letter.
8700
8701 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8702
8703         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8704         overrun buffers and shouldn't be used (much as gets shouldn't be
8705         used).
8706         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8707
8708 2006-03-08  Simon Josefsson  <jas@extundo.com>
8709
8710         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8711         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8712
8713 2006-03-08  Simon Josefsson  <jas@extundo.com>
8714
8715         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8716         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8717
8718 2006-03-08  Simon Josefsson  <jas@extundo.com>
8719
8720         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8721         signal that configure disabled the device.
8722
8723 2006-03-08  Simon Josefsson  <jas@extundo.com>
8724
8725         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8726         languages.
8727
8728 2006-03-07  Simon Josefsson  <jas@extundo.com>
8729
8730         * modules/getopt (Depends-on): Add unistd.
8731
8732         * modules/unistd: New file.
8733
8734 2006-03-07  Simon Josefsson  <jas@extundo.com>
8735
8736         * modules/gc-random: New file.
8737
8738 2006-03-07  Simon Josefsson  <jas@extundo.com>
8739
8740         * m4/unistd_h.m4: New file.
8741
8742 2006-03-07  Simon Josefsson  <jas@extundo.com>
8743
8744         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8745         test to be side-effect free by storing the result in the cache
8746         variable gl_cv_lib_readline, and moving the assignment of
8747         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8748         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8749
8750 2006-03-07  Simon Josefsson  <jas@extundo.com>
8751
8752         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8753         error on missing devices (the functions will return an error).
8754
8755         * m4/gc.m4: Move random stuff to gc-random.m4
8756
8757 2006-03-07  Simon Josefsson  <jas@extundo.com>
8758
8759         * lib/unistd_.h: New file.
8760
8761 2006-03-07  Simon Josefsson  <jas@extundo.com>
8762
8763         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8764
8765 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8766
8767         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8768         Problem reported by Juan Manuel Guerrero.
8769
8770 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8771
8772         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8773         the unistd module.
8774         * lib/getlogin_r.c: Likewise.
8775         * lib/getlogin_r.h: Likewise.
8776         * lib/glob.c: Likewise.
8777         * lib/pagealign_alloc.c: Likewise.
8778         * lib/unistd_.h: Remove; no longer needed.
8779
8780 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8781
8782         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8783         Add unistd.
8784         * modules/c-stack (Depends-on): Add unistd.
8785         * modules/getlogin_r: Likewise.
8786         * modules/glob: Likewise.
8787         * modules/pagealign_alloc: Likewise.
8788         * modules/unistd (Files): Remove lib/unistd_.h.
8789         (EXTRA_DIST): Remove.
8790         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8791         need unistd_.h.
8792         (MOSTLYCLEANFILES): Remove unistd.h-t.
8793
8794 2006-03-03  Simon Josefsson  <jas@extundo.com>
8795
8796         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8797
8798 2006-03-03  Simon Josefsson  <jas@extundo.com>
8799
8800         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8801         libidn and bison.
8802
8803 2006-03-03  Simon Josefsson  <jas@extundo.com>
8804
8805         * build-aux/maint.mk: Add indent target.
8806
8807 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8808
8809         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8810         our replacement poll.h in any case, to avoid a differing
8811         declaration from a system header.  Seen on AIX.
8812
8813 2006-03-01  Simon Josefsson  <jas@extundo.com>
8814
8815         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8816         <kasal@ucw.cz>.
8817
8818 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8819
8820         * modules/gettime (Depends-on): Add extensions module.
8821         * modules/nanosleep (Depends-on): Likewise.
8822         * modules/settime (Depends-on): Likewise.
8823
8824 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8825
8826         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8827         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8828         pedantically.
8829         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8830         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8831
8832         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8833         not "==".  Reported by Ralf Wildenhues.
8834
8835 2006-03-01  Karl Berry  <karl@gnu.org>
8836
8837         * doc/Copyright/request-*: new files, synced from gnuorg.
8838
8839 2006-03-01  Karl Berry  <karl@gnu.org>
8840
8841         * config/srclist.txt (Copyright/*): new entries.
8842
8843 2006-02-28  Simon Josefsson  <jas@extundo.com>
8844
8845         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8846
8847 2006-02-27  Simon Josefsson  <jas@extundo.com>
8848
8849         * lib/base64.h: Indent #define's.  From Jim Meyering
8850         <jim@meyering.net>.
8851
8852 2006-02-27  Jim Meyering  <jim@meyering.net>
8853
8854         Revert the change of 2006-02-24, so these files can continue
8855         to be sync'd from gettext.
8856         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
8857         of `config.h'.
8858
8859 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
8860
8861         * modules/intprops: New file.
8862         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
8863         Add intprops.
8864         * modules/getloadavg (Files): Remove lib/intprops.h.
8865         (Depends-on): Add intprops.
8866         * modules/human: Likewise.
8867         * modules/inttostr: Likewise.
8868         * modules/openat: Likewise.
8869         * modules/sig2str: Likewise.
8870         * modules/userspec: Likewise.
8871         * modules/utimecmp: Likewise.
8872         * modules/xnanosleep: Likewise.
8873         * modules/xstrtol: Likewise.
8874
8875 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
8876
8877         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
8878         * modules/lock-tests (TESTS): Use $(EXEEXT).
8879         * modules/tls-tests: Likewise.
8880         * modules/argp-tests: Likewise.
8881         (check_PROGRAMS): New var, replacing...
8882         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
8883
8884 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8885
8886         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
8887         `config.h'.
8888
8889 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
8890
8891         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
8892
8893 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8894
8895         Sync from coreutils.
8896         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
8897         gl_CHDIR_SAFER.
8898
8899 2006-02-22  Jim Meyering  <jim@meyering.net>
8900
8901         Sync from coreutils.
8902         * m4/chdir-safer.m4: New file.
8903
8904 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
8905
8906         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
8907         AT_FDCWD exceeds INT_MAX.
8908         * lib/openat.h (AT_FDCWD): Likewise.
8909
8910 2006-02-17  Eric Blake  <address@hidden>
8911
8912         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
8913
8914 2006-02-16  Simon Josefsson  <jas@extundo.com>
8915
8916         * modules/getaddrinfo (Depends-on): Add sys_socket.
8917
8918 2006-02-15  Simon Josefsson  <jas@extundo.com>
8919
8920         * build-aux/maint.mk: Add dsyntax-check rule.
8921
8922 2006-02-15  Eric Blake  <ebb9@byu.net>
8923
8924         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
8925         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
8926         'present but cannot compile' warnings on cygwin.
8927         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
8928         use ws2tcpip.h if sys/socket.h works.
8929         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
8930         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
8931
8932 2006-02-14  Simon Josefsson  <jas@extundo.com>
8933
8934         * modules/maintainer-makefile (Files): Rename.
8935
8936         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
8937         and (the local) Makefile.cfg to maint-cfg.mk.
8938
8939         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
8940         to the latter.
8941
8942         * modules/maintainer-makefile: New module.
8943
8944         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
8945         severaly stripped to make it possible to build it up from scratch
8946         with reliable tests.
8947
8948         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
8949         fixes to permit overriding the default actions when configure and
8950         makefile are not available.
8951
8952 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
8953
8954         Sync from coreutils.
8955         * modules/lstat (Depends-on): Don't depend on xalloc.
8956         (License): Change from GPL to LGPL, since this is now simply a
8957         replacement for a libc function.
8958
8959 2006-02-14  Jim Meyering  <jim@meyering.net>
8960
8961         Sync from coreutils.
8962
8963         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
8964         failure on deficient systems, and simplify gnulib lgpl dependencies.
8965         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
8966         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
8967
8968         * lib/xalloc-die.c: Remove unused definition of N_.
8969
8970 2006-02-14  Jim Meyering  <jim@meyering.net>
8971
8972         Sync from coreutils.
8973         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
8974         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
8975         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
8976         double-quote uses of that variable, to accommodate the rare case in
8977         which getmntent is available in none of the libraries checked.  This
8978         happens at least on FreeBSD 5.0.
8979
8980 2006-02-13  Simon Josefsson  <jas@extundo.com>
8981
8982         * gnulib-tool (Usage): Fix --import, from
8983         karl@freefriends.org (Karl Berry).
8984
8985 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8986
8987         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
8988
8989 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
8990
8991         * lib/argp-namefrob.h: Restore changes accidentally lost during the
8992         "autoupdate" on 2005-12-12.
8993
8994 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         * modules/closeout (Depends-on): Remove atexit.
8997
8998 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
8999
9000         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9001         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9002
9003 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9004
9005         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9006         __EXTENSIONS__ if this causes compilation to fail.  Problem
9007         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9008         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9009
9010 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9011
9012         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9013         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9014         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9015         All uses changed.
9016
9017 2006-01-26  Simon Josefsson  <jas@extundo.com>
9018
9019         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9020         prototype is visible on mingw32.
9021
9022         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9023         for mingw32.
9024
9025         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9026         mingw32).
9027
9028 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9029
9030         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9031         attempt to open for write; this always fails, at least on POSIX
9032         hosts.  This reinstates the 2006-01-09 change, which was
9033         inadvertently removed.
9034
9035 2006-01-26  Bruno Haible  <bruno@clisp.org>
9036
9037         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9038         Reported by Paul Eggert.
9039
9040 2006-01-26  Bruno Haible  <bruno@clisp.org>
9041             Paul Eggert  <eggert@cs.ucla.edu>
9042
9043         * lib/stdbool_.h (_Bool)
9044         [(! (defined __cplusplus || defined __BEOS__)
9045           && !defined __GNUC__
9046           && !(defined __HP_cc || defined __xlc__
9047                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9048                || defined __sgi))]:
9049         #define to signed char in these cases too; this simplifies
9050         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9051         etc., separately) and makes it more conservative.
9052
9053 2006-01-25  Simon Josefsson  <jas@extundo.com>
9054
9055         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9056         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9057         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9058
9059 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9060
9061         * lib/argp-namefrob.h: Bugfix. Remove stray #
9062
9063 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9064
9065         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9066         so that we test the test.
9067         Check for yet another HP-UX cc bug involving *bool |= bool.
9068
9069 2006-01-25  Karl Berry  <karl@gnu.org>
9070
9071         * config/srclist.txt (vasnprintf.c): sync lost.
9072
9073 2006-01-25  Jim Meyering  <jim@meyering.net>
9074
9075         Sync from the stable (b5) branch of coreutils:
9076
9077         * lib/fts.c (fts_children): Don't let close() clobber errno from
9078         failed fchdir().
9079
9080         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9081         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9082         a dangling symlink.  That can also happen at least for ELOOP.
9083         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9084         FYI, this bug predates the inclusion of fts.c in coreutils.
9085
9086         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9087         in their own block, so pre-c99 compilers don't object.
9088
9089         Avoid the double-free (first in fts_read, second in fts_close) that
9090         would occur when an `active' directory is made inaccessible (e.g.,
9091         via chmod a-x) during a traversal.
9092         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9093         before returning.  Reproduce this failure by
9094         mkdir -p a/b; cd a; chmod a-x . b
9095         Reported by Stavros Passas.
9096
9097 2006-01-25  Jim Meyering  <jim@meyering.net>
9098
9099         * lib/fileblocks.c: Remove more useless parentheses.
9100         * lib/readutmp.h: Likewise.
9101
9102 2006-01-25  Bruno Haible  <bruno@clisp.org>
9103
9104         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9105         warnings.
9106         Reported by Paul Eggert.
9107
9108 2006-01-25  Bruno Haible  <bruno@clisp.org>
9109
9110         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9111         rid of a trap command. For Solaris sh.
9112         Reported by Mark D. Baushke <mdb@gnu.org>.
9113
9114 2006-01-24  Simon Josefsson  <jas@extundo.com>
9115
9116         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9117         Bruno.
9118
9119 2006-01-24  Karl Berry  <karl@gnu.org>
9120
9121         * config/srclist.txt (argp-namefrob.h): sync lost.
9122
9123 2006-01-24  Jim Meyering  <jim@meyering.net>
9124
9125         * modules/openat (Files): Add lib/intprops.h.
9126         From Mark D. Baushke.
9127
9128 2006-01-24  Jim Meyering  <jim@meyering.net>
9129
9130         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9131         Reported by Mark D. Baushke.
9132
9133 2006-01-24  Jim Meyering  <jim@meyering.net>
9134
9135         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9136
9137 2006-01-24  Bruno Haible  <bruno@clisp.org>
9138
9139         * modules/strnlen (Maintainer): Change from glibc to all.
9140
9141 2006-01-24  Bruno Haible  <bruno@clisp.org>
9142
9143         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9144         Patch by Paul Eggert.
9145
9146 2006-01-24  Bruno Haible  <bruno@clisp.org>
9147
9148         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9149         already has it.
9150         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9151         2005-11-26.
9152
9153         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9154         'signed char' to avoid problems with the built-in _Bool type.
9155         Reported by Paul Eggert on 2005-11-26.
9156
9157 2006-01-24  Bruno Haible  <bruno@clisp.org>
9158
9159         * gnulib-tool (func_import): Avoid constructing complicated sed
9160         expressions inside backquote.
9161         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9162
9163 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9164
9165         These changes imported from libc.
9166         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9167         test and two separate function calls.
9168         * lib/strndup.c (__strndup): Add libc_hidden_def.
9169
9170 2006-01-23  Simon Josefsson  <jas@extundo.com>
9171
9172         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9173         Remove the test_*_SOURCES variable: automake infers it by default.
9174         * modules/tls-tests: Likewise.
9175
9176 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9177
9178         Work around porting bugs reported by Dieter in
9179         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9180         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9181         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9182         Include "getopt.h" first, to check interface.
9183         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9184         !HAVE_DECL_GETENV.
9185         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9186         (__strndup): Revert to K&R-style function dfns, the glibc style.
9187         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9188         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9189         Include strnlen.h first, to get prototype properly.
9190         (strnlen): Renamed from __strnlen.
9191         Remove weak alias.
9192
9193 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9194
9195         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9196
9197 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9198
9199         * config/srclist.txt: Adjust to reflect glibc reorganization.
9200         This affects only comments.
9201
9202 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9203
9204          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9205          Reported by Bruce Korb <bkorb@gnu.org>.
9206
9207 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9208
9209         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9210         to pacify gcc -Wswitch-default.
9211
9212 2006-01-22  Bruno Haible  <bruno@clisp.org>
9213
9214         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9215         temporary buffer for sprintf, take into account the precision also
9216         for 'd', 'i', 'u', 'o', 'x', 'X'.
9217
9218 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9219
9220         * modules/argp-tests: New module
9221         * tests/test-argp.c: New file
9222         * tests/test-argp-2.sh: New file
9223
9224 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9225
9226         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9227         (__argp_base_name): Removed
9228         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9229         typo.
9230         (__argp_base_name): Provide macro definition or extern declaration
9231         depending on the configuration
9232
9233 2006-01-20  Simon Josefsson  <jas@extundo.com>
9234
9235         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9236
9237 2006-01-20  Simon Josefsson  <jas@extundo.com>
9238
9239         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9240
9241 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9242
9243         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9244         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9245         Suggested by Bruno Haible.
9246
9247 2006-01-20  Karl Berry  <karl@gnu.org>
9248
9249         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9250         until changes propagate, I guess.
9251
9252 2006-01-19  Simon Josefsson  <jas@extundo.com>
9253
9254         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9255
9256 2006-01-19  Simon Josefsson  <jas@extundo.com>
9257
9258         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9259
9260 2006-01-19  Simon Josefsson  <jas@extundo.com>
9261
9262         * gnulib-tool: Set check_PROGRAMS.
9263
9264         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9265         modules/des-tests, modules/gc-arcfour-tests,
9266         modules/gc-arctwo-tests, modules/gc-des-tests,
9267         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9268         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9269         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9270         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9271         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9272         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9273         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9274         test_*_SOURCES.
9275
9276 2006-01-18  Simon Josefsson  <jas@extundo.com>
9277
9278         * modules/socklen (Depends-on): Depend on sys_socket.
9279
9280 2006-01-18  Simon Josefsson  <jas@extundo.com>
9281
9282         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9283         modules/des-tests, modules/gc-arcfour-tests,
9284         modules/gc-arctwo-tests, modules/gc-des-tests,
9285         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9286         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9287         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9288         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9289         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9290         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9291         $(EXEEXT) to automake TESTS variable, for mingw32.
9292
9293 2006-01-17  Simon Josefsson  <jas@extundo.com>
9294
9295         * modules/socklen (Include): Need sys/socket.h.
9296
9297 2006-01-17  Bruno Haible  <bruno@clisp.org>
9298
9299         * modules/ssize_t (Include): Add <sys/types.h>.
9300
9301 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9302
9303         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9304         it's not portable and it doesn't work with cross-compiles.
9305         Problem reported by Bruno Haible.  Fix missing-$ typo in
9306         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9307         -zignore from being used with Sun's C compiler.
9308
9309 2006-01-12  Simon Josefsson  <jas@extundo.com>
9310
9311         * lib/base64.c: Fix warning, reported by Bruno Haible
9312         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9313
9314 2006-01-12  Bruno Haible  <bruno@clisp.org>
9315
9316         * modules/ldd: New file.
9317         * build-aux/ldd.sh.in: New file.
9318         * MODULES.html.sh (Support for building libraries and executables): Add
9319         ldd.
9320
9321 2006-01-12  Bruno Haible  <bruno@clisp.org>
9322
9323         * m4/ldd.m4: New file.
9324
9325 2006-01-12  Bruno Haible  <bruno@clisp.org>
9326
9327         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9328         endless loop while replacing $auxdir with build-aux.
9329
9330 2006-01-11  Simon Josefsson  <jas@extundo.com>
9331
9332         * lib/stdint_.h (SIZE_MAX): Add missing (.
9333
9334 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9335
9336         Sync from coreutils.
9337         * lib/md5.c: Fix commentary typos.
9338         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9339         * lib/md5.h (__attribute__): Remove; unused.
9340         * lib/sha1.c: Fix commentary to match md5 better.
9341         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9342         so that we don't need to worry about alignment.  All uses changed.
9343         This merges the 2005-10-28 md5 change into sha1.
9344
9345 2006-01-11  Jim Meyering  <jim@meyering.net>
9346
9347         Sync from coreutils.
9348         * lib/md5.c (OP): Fix spacing.
9349
9350 2006-01-11  Bruno Haible  <bruno@clisp.org>
9351
9352         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9353         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9354         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9355
9356 2006-01-11  Bruno Haible  <bruno@clisp.org>
9357
9358         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9359         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9360         the "early" section as well.
9361
9362 2006-01-11  Bruno Haible  <bruno@clisp.org>
9363
9364         Avoid "ar: no archive members specified" error on MacOS X.
9365         * gnulib-tool (func_modules_add_dummy): New function.
9366         (func_import, func_create_testdir): Invoke it.
9367
9368 2006-01-11  Bruno Haible  <bruno@clisp.org>
9369
9370         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9371         with $auxdir in AC_CONFIG_FILES statements.
9372
9373 2006-01-11  Bruno Haible  <bruno@clisp.org>
9374
9375         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9376         Initialize also noinst_HEADERS to empty.
9377
9378 2006-01-11  Bruno Haible  <bruno@clisp.org>
9379
9380         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9381         variables.
9382         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9383         autoreconf.
9384
9385 2006-01-11  Bruno Haible  <bruno@clisp.org>
9386
9387         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9388         overridable by the user.
9389         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9390
9391 2006-01-10  Simon Josefsson  <jas@extundo.com>
9392
9393         * modules/sys_socket: New file.
9394
9395 2006-01-10  Simon Josefsson  <jas@extundo.com>
9396
9397         * m4/sys_socket_h.m4: New file.
9398
9399 2006-01-10  Simon Josefsson  <jas@extundo.com>
9400
9401         * lib/socket_.h: New file.
9402
9403 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9404
9405         * modules/readutmp (Maintainer): Add myself.
9406
9407 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9408
9409         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9410         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9411         People who are still concerned with buggy memcmp implementations
9412         can invoke gl_FUNC_MEMCMP themselves.
9413
9414 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9415
9416         * lib/regex_internal.h (BITSET_WORD_BITS):
9417         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9418         preprocessor mishandles large unsigned values as if they were signed.
9419         Problem reported by Claudio Fontana in
9420         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9421
9422 2006-01-10  Jim Meyering  <jim@meyering.net>
9423
9424         Avoid the double-free (first in fts_read, second in fts_close) that
9425         would occur when an `active' directory is made inaccessible (e.g.,
9426         via chmod a-x) during a traversal.
9427         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9428         before returning.  Reproduce this failure by
9429         mkdir -p a/b; cd a; chmod a-x . b
9430         Reported by Stavros Passas.
9431
9432         Sync from coreutils.
9433         * lib/sha1.c: Tweak grammar in a comment.
9434
9435 2006-01-10  Jim Meyering  <jim@meyering.net>
9436
9437         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9438         Patch by Joerg Sonnenberger.
9439
9440 2006-01-10  Bruno Haible  <bruno@clisp.org>
9441
9442         * modules/readutmp: Depend on module free.
9443         * modules/strtok_r: Depend on module restrict.
9444
9445 2006-01-10  Bruno Haible  <bruno@clisp.org>
9446
9447         * modules/gettext (configure.ac): Add an invocation of
9448         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9449
9450 2006-01-10  Bruno Haible  <bruno@clisp.org>
9451
9452         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9453         Reported by Werner Lemberg <wl@gnu.org>.
9454
9455 2006-01-10  Bruno Haible  <bruno@clisp.org>
9456
9457         * lib/localcharset.c: Update from GNU gettext.
9458
9459 2006-01-10  Bruno Haible  <bruno@clisp.org>
9460
9461         * lib/argp.h (__const): Remove macro. Use const instead.
9462         * lib/argp-fmtstream.h (__const): Likewise.
9463         * lib/glob_.h (__const): Remove macro.
9464         * lib/glob-libc.h: Use const instead of __const.
9465
9466 2006-01-10  Bruno Haible  <bruno@clisp.org>
9467
9468         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9469         variable.
9470         Needed to avoid an automake error regarding the 'gettext' module.
9471
9472 2006-01-09  Simon Josefsson  <jas@extundo.com>
9473
9474         * modules/inet_ntop (Depends-on): Add restrict.
9475
9476 2006-01-09  Simon Josefsson  <jas@extundo.com>
9477
9478         * modules/gc-rijndael-tests (License): Put under LGPL.
9479
9480         * modules/gc-des-tests (License): Likewise.
9481
9482         * modules/gc-arcfour-tests (License): Likewise.
9483
9484         * modules/gc-arctwo-tests (License): Likewise.
9485
9486         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9487
9488         * modules/gc-hmac-sha1-tests (Files): Likewise.
9489
9490         * modules/gc-hmac-md5-tests (License): Likewise.
9491
9492         * modules/gc-sha1-tests (License): Likewise.
9493
9494         * modules/gc-md5-tests (License): Likewise.
9495
9496         * modules/gc-md4-tests (License): Likewise.
9497
9498         * modules/gc-md2-tests (License): Likewise.
9499
9500         * modules/gc-tests (License): Likewise.
9501
9502         * modules/des-tests (License): Likewise.
9503
9504         * modules/md4-tests (License): Likewise.
9505
9506         * modules/md2-tests (License): Likewise.
9507
9508 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9509
9510         Sync from coreutils:
9511
9512         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9513         * modules/lib-ignore: New file.
9514         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9515         chdir-safer.m4, lchmod.m4.
9516         * modules/openat: Add mkdirat.c, openat-priv.h.
9517
9518 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9519
9520         Sync from coreutils.
9521         * m4/lib-ignore.m4: New file.
9522         * m4/lchmod.m4: New file.
9523
9524 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9525
9526         Sync from coreutils.
9527         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9528         for write access: POSIX says that must fail.
9529         * lib/fts.c (diropen): Likewise.
9530         * lib/save-cwd.c (save_cwd): Likewise.
9531         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9532         well, for minor improvements on hosts that lack O_DIRECTORY.
9533         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9534         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9535         Fall back on chown if open failed with EACCES.
9536
9537         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9538         Report an error at compile-time if only a 1-second nominal clock
9539         resolution is found.
9540
9541         * lib/lchmod.h: New file.
9542         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9543         (make_dir_parents): Use lchown rather than chown, and
9544         lchmod rather than chmod.
9545
9546         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9547         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9548         "proc" reported by n0dalus.
9549
9550         * lib/mountlist.c: Include <limits.h>.
9551         (dev_from_mount_options)
9552         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9553         New function.  It no longer assumes "dev=" has the System V meaning
9554         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9555         (read_file_system_list)
9556         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9557         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9558         dev= in that case.
9559
9560         * lib/posixtm.h (PDS_PRE_2000): New macro.
9561         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9562         allow_century.  All usages changed.  Reject dates outside the range
9563         1969-1999 if PDS_PRE_2000 is used.
9564
9565 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9566
9567         Sync from coreutils.
9568         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9569         (Time of day items): Mention the possibility of leap seconds.
9570         Problem reported by Dr. David Alan Gilbert.
9571
9572 2006-01-09  Jim Meyering  <jim@meyering.net>
9573
9574         Sync from coreutils.
9575
9576         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9577
9578         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9579
9580         * lib/modechange.c (mode_compile): Reject an invalid mode string
9581         that starts with an octal digit.  From Andreas Gruenbacher.
9582
9583         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9584         and dup to open_safer and dup_safer, respectively.
9585         (openat_permissive): Fix typo in comment.
9586
9587         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9588         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9589         (_): Remove; no longer needed.
9590         (openat): Renamed from rpl_openat; no need for rpl_openat
9591         since openat.h renames openat for us.
9592         Replace most of the body with a call to openat_permissive,
9593         to avoid duplicate code.
9594         Port to (probably hypothetical) environments were mode_t is
9595         wider than int.
9596         (openat_permissive): Require mode arg, so that we can check
9597         types better.  Put it just after flags.  Change cwd failure
9598         indicator from pointer-to-bool to pointer-to-errno-value.
9599         All callers changed.
9600         Invoke openat_save_fail and/or openat_restore_fail if
9601         cwd_errno is null, so that openat can call us.
9602         (openat_permissive, fdopendir, fstatat, unlinkat):
9603         Simplify errno handling to avoid some duplicate code,
9604         as it's OK to set errno on success.
9605         * lib/openat.h: Revamp code so that function macros depend on
9606         __OPENAT_PREFIX only, not also on AT_FDCWD.
9607         (openat_ro): Remove.  Caller changed to use openat_permissive.
9608         (openat_permissive): Now a macro, if not a function.
9609         (openat_restore_fail, openat_save_fail): Now always functions,
9610         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9611
9612         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9613         and openat.c.
9614         * lib/mkdirat.c: Include openat-priv.h.
9615         Remove definitions of macros defined therein.
9616         * lib/openat.c: Likewise.
9617
9618         * lib/mkdirat.c (mkdirat): New file and function.
9619         * lib/openat.h (mkdirat): Declare.
9620
9621         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9622
9623         * lib/openat.h (openat_permissive): Declare.
9624         (openat_ro): Define.
9625
9626         * lib/openat.c (EXPECTED_ERRNO): New macro.
9627         (openat_permissive): New function -- used in remove.c rewrite.
9628         (all functions): Set errno just before returning, only if there
9629         was an actual failure.
9630         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9631
9632         Emulate openat-family functions using Linux's procfs, if possible.
9633         Idea and some code based on Ulrich Drepper's glibc changes.
9634
9635         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9636         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9637         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9638         before falling back on save_cwd and restore_cwd.
9639         (fdopendir, fstatat, unlinkat): Likewise.
9640
9641         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9642         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9643
9644         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9645         as second argument to va_arg.  Otherwise, some versions of gcc
9646         warn that `if this code is reached, the program will abort'.
9647
9648 2006-01-09  Jim Meyering  <jim@meyering.net>
9649
9650         Sync from coreutils.
9651         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9652         Require openat-priv.h.
9653
9654 2006-01-09  Bruno Haible  <bruno@clisp.org>
9655
9656         * modules/strnlen (Include): Use strnlen.h.
9657
9658 2006-01-09  Bruno Haible  <bruno@clisp.org>
9659
9660         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9661
9662 2006-01-09  Bruno Haible  <bruno@clisp.org>
9663
9664         * lib/sysexit_.h (EX_OK): New macro.
9665         Suggested by Martin Lambers <marlam@marlam.de>.
9666
9667 2006-01-09  Bruno Haible  <bruno@clisp.org>
9668
9669         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9670         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9671
9672 2006-01-09  Bruno Haible  <bruno@clisp.org>
9673
9674         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9675         numbers.
9676
9677 2006-01-09  Bruno Haible  <bruno@clisp.org>
9678
9679         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9680         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9681         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9682         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9683
9684 2006-01-09  Bruno Haible  <bruno@clisp.org>
9685
9686         * build-aux/javacomp.sh.in: New file, moved from lib/.
9687         * modules/javacomp-script (Files): Update.
9688         (configure.ac): Add AC_CONFIG_FILES invocation.
9689         (EXTRA_DIST): Remove variable.
9690
9691         * build-aux/javaexec.sh.in: New file, moved from lib/.
9692         * modules/javaexec (Files): Update.
9693         (configure.ac): Add AC_CONFIG_FILES invocation.
9694         (EXTRA_DIST): Remove javaexec.sh.in.
9695
9696         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9697         * modules/csharpcomp-script (Files): Update.
9698         (configure.ac): Add AC_CONFIG_FILES invocation.
9699         (EXTRA_DIST): Remove variable.
9700
9701         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9702         * modules/csharpexec (Files): Update.
9703         (configure.ac): Add AC_CONFIG_FILES invocation.
9704         (EXTRA_DIST): Remove csharpexec.sh.in.
9705
9706 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9707
9708         Sync from coreutils.
9709
9710         Add POSIX ACL support
9711         * lib/acl.h (copy_acl, set_acl): Add declarations.
9712         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9713         systems other than Linux.
9714         (chmod_or_fchmod): New function: use fchmod when possible,
9715         and chmod otherwise.
9716         (file_has_acl): Add a POSIX ACL implementation, with a
9717         Linux-specific subcase.
9718         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9719         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9720         acls are unsupported.
9721         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9722         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9723         are unsupported.
9724
9725 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9726
9727         Sync from coreutils.
9728         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9729
9730 2006-01-07  Bruno Haible  <bruno@clisp.org>
9731
9732         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9733         gl_EARLY.
9734
9735 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9736
9737         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9738         Problem reported for Mingw by Mark Junker.
9739
9740 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9741
9742         * README: Gnulib normally doesn't generate a tarball.
9743
9744 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9745
9746         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9747         long int, not int, for nanosecond counts, so that people who are
9748         used to POSIX struct timespec won't be surprised.  Reported by Jim
9749         Meyering.
9750
9751 2005-12-28  Bruno Haible  <bruno@clisp.org>
9752
9753         * build-aux/config.rpath: Update from GNU gettext.
9754
9755 2005-12-16  Jim Meyering  <jim@meyering.net>
9756
9757         * modules/fprintftime: New module.
9758         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9759
9760 2005-12-16  Jim Meyering  <jim@meyering.net>
9761
9762         * m4/fprintftime.m4: New file.
9763
9764 2005-12-16  Jim Meyering  <jim@meyering.net>
9765
9766         * lib/fprintftime.c, lib/fprintftime.h: New files.
9767
9768 2005-12-15  Simon Josefsson  <jas@extundo.com>
9769
9770         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9771         new m4/socklen.m4.
9772
9773 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9774
9775         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9776         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9777
9778 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9779
9780         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9781         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9782         struct uparams is valid. Fall back to the default values if it is
9783         not.
9784
9785 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9786
9787         * modules/argp (Files): Add argp-pin.c
9788         (Depends-on): dirname
9789         (lib_SOURCES): Add argp-pin.c
9790
9791 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9792
9793         * m4/argp.m4:  Check if program_invocation_name and
9794         program_invocation_short_name are declared and define appropriate
9795         macros if they are not.
9796
9797 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9798
9799         * lib/argp-help.c (__argp_base_name): New function
9800         (__argp_short_program_name): Rewrite using __argp_base_name
9801         * lib/argp-namefrob.h: Define program_invocation_name and
9802         program_invocation_short_name if requested
9803         (__argp_base_name): Add prototype
9804         * lib/argp-parse.c (argp_def): Use gettext wrappers
9805         (argp_default_parser): Use __argp_base_name
9806         * lib/argp-pin.c: New file. Defines program_invocation_name and
9807         program_invocation_short_name on systems that lack them.
9808
9809 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9810
9811         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9812         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9813         porting problem reported by Georg Schwarz in
9814         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9815
9816 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9817
9818         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9819         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9820         porting problem reported by Georg Schwarz in
9821         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9822
9823 2005-12-05  Bruno Haible  <bruno@clisp.org>
9824
9825         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9826         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9827         Reported by Mark Junker <mjscod@gmx.de>.
9828
9829 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9830
9831         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9832         Use implementation from Albert Chin, with some
9833         comments/corrections by Stepan Kasal and myself.
9834
9835 2005-12-02  Bruno Haible  <bruno@clisp.org>
9836
9837         * gnulib-tool (func_import): Accept GPLed build tool modules when
9838         --lgpl is given.
9839         * modules/csharpcomp-script: New file.
9840         * modules/csharpcomp: Depend on it.
9841         * modules/javacomp-script: New file.
9842         * modules/javacomp: Depend on it.
9843         Suggested by Simon Josefsson.
9844
9845 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9846
9847         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9848         statement, to work around an HP-UX 10.20 compiler bug reported by
9849         Peter O'Gorman.
9850
9851 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9852
9853         * modules/savedir (Depends-on): Add openat.
9854
9855 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9856
9857         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
9858         (uintmax_t) [defined uintmax_t]: Do not declare.
9859         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
9860         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
9861         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
9862         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
9863         sake of portability to weird hosts that C allows (though we don't
9864         know of any practical examples).
9865
9866         * lib/savedir.h (fdsavedir): New decl.
9867         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
9868         contains most of the former guts of savedir.
9869         (savedir): Use savedirstream.
9870         Include "openat.h".
9871
9872 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
9873
9874         * modules/obstack (Files): Add m4/ulonglong.m4.
9875         Problem reported by Davide Angelocola.
9876
9877 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
9878
9879         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
9880         coreutils no longer futzes with rounding modes.
9881
9882 2005-11-14  Jim Meyering  <jim@meyering.net>
9883
9884         * lib/mkstemp-safer.c: Include <config.h>, required for possible
9885         replacement of mkstemp.
9886
9887 2005-11-10  Simon Josefsson  <jas@extundo.com>
9888
9889         * lib/readline.c: Remove EOL.
9890
9891 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9892
9893         * modules/gethrxtime (Depends-on): Add gettime.
9894
9895 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9896
9897         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
9898         or gettimeofday; no longer needed.
9899
9900 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
9901
9902         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
9903         time business.
9904         (gethrxtime) [! (HAVE_NANOUPTIME
9905         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
9906         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
9907         our own approximation.
9908
9909 2005-11-08  Eric Blake  <ebb9@byu.net>
9910
9911         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9912
9913 2005-11-08  Eric Blake  <ebb9@byu.net>
9914
9915         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
9916
9917 2005-11-04  Bruno Haible  <bruno@clisp.org>
9918
9919         * gnulib-tool: Implement --update mode.
9920
9921 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9922
9923         Fix porting problem reported by Theodoros V. Kalamatianos.
9924         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
9925         Don't assume that futimes failing means we must fail.
9926
9927 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
9928
9929         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
9930         variables to suggest the intended function of the PATH_MAX check.
9931
9932 2005-10-30  Kean Johnston  <jkj@sco.com>
9933
9934         Trivial changes to support SCO systems.
9935         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
9936         as PATH_MAX.
9937         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
9938         where __ptr is null when no I/O is pending.
9939
9940 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
9941
9942         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
9943         leave errno alone.  Problem reported by Dmitry V. Levin.
9944
9945 2005-10-28  Simon Josefsson  <jas@extundo.com>
9946
9947         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
9948         Test more.
9949
9950         * tests/test-gc-md2.c, tests/test-md2.c: New files.
9951
9952         * modules/md2, modules/md2-tests: New files.
9953
9954 2005-10-28  Simon Josefsson  <jas@extundo.com>
9955
9956         * m4/inet_ntop.m4: More tests.
9957
9958         * m4/gc-md2.m4, md2.m4: New file.
9959
9960 2005-10-28  Simon Josefsson  <jas@extundo.com>
9961
9962         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
9963         "restrict" keywords, as per POSIX.  Protect the function
9964         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
9965         Don't use K&R prototypes.  Check the sprintf return values.
9966         Re-define EAFNOSUPPORT if not present.  Indent.
9967
9968         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
9969         suggested by Bruno Haible <bruno@clisp.org>.
9970
9971         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
9972
9973         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
9974
9975         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
9976         libgcrypt).
9977
9978         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
9979
9980         * lib/md2.h, lib/md2.c: New files.
9981
9982 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
9983
9984         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
9985         errno alone.  Problem reported by Frederic Jolliton.
9986
9987 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
9988
9989         * modules/verify (License): Change from GPL to LGPL.  This is a
9990         tiny module and there are apparently near-equivalents that are
9991         under the BSD license.
9992
9993 2005-10-24  Simon Josefsson  <jas@extundo.com>
9994
9995         * modules/sha1: Relicense to LGPL.
9996
9997 2005-10-24  Simon Josefsson  <jas@extundo.com>
9998
9999         * lib/md4.h: Shrink buffer size, now that we changed the type.
10000
10001 2005-10-23  Simon Josefsson  <jas@extundo.com>
10002
10003         * gnulib-tool (func_import): Fix --tests-base.
10004
10005 2005-10-22  Simon Josefsson  <jas@extundo.com>
10006
10007         * modules/arcfour (Depends-on): Need stdint.
10008
10009 2005-10-22  Simon Josefsson  <jas@extundo.com>
10010
10011         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10012         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10013
10014 2005-10-22  Simon Josefsson  <jas@extundo.com>
10015
10016         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10017         suggested by Bruno Haible <bruno@clisp.org>.
10018
10019 2005-10-22  Simon Josefsson  <jas@extundo.com>
10020
10021         * lib/crc.h: Include stddef.h, for size_t.
10022
10023 2005-10-22  Simon Josefsson  <jas@extundo.com>
10024
10025         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10026         arcfour_context struct (simplify test vector testing in GNU
10027         Shishi).
10028
10029 2005-10-21  Simon Josefsson  <jas@extundo.com>
10030
10031         * modules/des, modules/des-tests: New files.
10032
10033         * modules/gc-des, modules/gc-des-tests: New files.
10034
10035         * tests/test-des.c, tests/test-gc-des.c: New file.
10036
10037 2005-10-21  Simon Josefsson  <jas@extundo.com>
10038
10039         * modules/arctwo, modules/arctwo-tests: New files.
10040
10041         * tests/test-arctwo.c: New file.
10042
10043         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10044
10045         * tests/test-gc-arctwo.c: New file.
10046
10047 2005-10-21  Simon Josefsson  <jas@extundo.com>
10048
10049         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10050         Bruno Haible <bruno@clisp.org>.
10051
10052         * m4/gc-des.m4: New file.
10053
10054 2005-10-21  Simon Josefsson  <jas@extundo.com>
10055
10056         * m4/arctwo.m4: New file.
10057
10058         * m4/gc-arctwo.m4: New file.
10059
10060 2005-10-21  Simon Josefsson  <jas@extundo.com>
10061
10062         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10063         block.
10064
10065 2005-10-21  Simon Josefsson  <jas@extundo.com>
10066
10067         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10068         <bruno@clisp.org>.
10069
10070         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10071
10072         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10073         Bruno Haible <bruno@clisp.org>.
10074
10075         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10076         <bruno@clisp.org>.
10077
10078 2005-10-21  Simon Josefsson  <jas@extundo.com>
10079
10080         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10081
10082 2005-10-21  Simon Josefsson  <jas@extundo.com>
10083
10084         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10085
10086 2005-10-21  Simon Josefsson  <jas@extundo.com>
10087
10088         * lib/des.h, lib/des.c: New files.
10089
10090         * lib/gc-gnulib.c: Support DES.c
10091
10092 2005-10-21  Simon Josefsson  <jas@extundo.com>
10093
10094         * lib/arctwo.h, lib/arctwo.c: New files.
10095
10096         * lib/gc-gnulib.c: Support ARCTWO.
10097
10098 2005-10-21  Simon Josefsson  <jas@extundo.com>
10099
10100         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10101         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10102
10103 2005-10-21  Simon Josefsson  <jas@extundo.com>
10104
10105         * gnulib-tool (func_import, func_create_testdir): Define automake
10106         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10107         Makefile.am snippet),
10108         suggested by Bruno Haible <bruno@clisp.org>.
10109
10110         * modules/gc (Makefile.am): Use it.
10111
10112 2005-10-21  Bruno Haible  <bruno@clisp.org>
10113
10114         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10115         patch.
10116
10117 2005-10-19  Simon Josefsson  <jas@extundo.com>
10118
10119         * tests/test-gc-rijndael.c: New file.
10120
10121         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10122
10123 2005-10-19  Simon Josefsson  <jas@extundo.com>
10124
10125         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10126         interface too.
10127
10128 2005-10-19  Simon Josefsson  <jas@extundo.com>
10129
10130         * tests/test-gc-arcfour.c: New file.
10131
10132         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10133
10134 2005-10-19  Simon Josefsson  <jas@extundo.com>
10135
10136         * modules/gc-md4, modules/gc-md4-tests: New file.
10137
10138         * tests/test-gc-md4.c: New file.
10139
10140 2005-10-19  Simon Josefsson  <jas@extundo.com>
10141
10142         * m4/gc-md4.m4: New file.
10143
10144 2005-10-19  Simon Josefsson  <jas@extundo.com>
10145
10146         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10147         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10148         <kasal@ucw.cz>.
10149
10150 2005-10-19  Simon Josefsson  <jas@extundo.com>
10151
10152         * m4/gc-arcfour.m4: New file.
10153
10154         * m4/gc-rijndael.m4: New file.
10155
10156 2005-10-19  Simon Josefsson  <jas@extundo.com>
10157
10158         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10159
10160 2005-10-19  Simon Josefsson  <jas@extundo.com>
10161
10162         * lib/gc-gnulib.c: Support ARCFOUR.
10163
10164 2005-10-19  Simon Josefsson  <jas@extundo.com>
10165
10166         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10167         support.
10168
10169         * lib/gc.h: Add ECB enum type.
10170
10171         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10172
10173 2005-10-18  Simon Josefsson  <jas@extundo.com>
10174
10175         * tests/test-md5.c: New file.
10176
10177         * modules/md5-tests: New file.
10178
10179 2005-10-18  Simon Josefsson  <jas@extundo.com>
10180
10181         * tests/test-md4.c: New file.
10182
10183         * modules/md4, modules/md4-tests: New files.
10184
10185 2005-10-18  Simon Josefsson  <jas@extundo.com>
10186
10187         * m4/md4.m4: New file.
10188
10189 2005-10-18  Simon Josefsson  <jas@extundo.com>
10190
10191         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10192
10193 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10194
10195         * gnulib-tool (func_create_testdir): Omit the second check whether
10196         BUILT_SOURCES in nonempty.
10197
10198 2005-10-17  Simon Josefsson  <jas@extundo.com>
10199
10200         * tests/test-rijndael.c: New file.
10201
10202 2005-10-17  Simon Josefsson  <jas@extundo.com>
10203
10204         * modules/sha1: Depend on stdint instead of md5.
10205
10206         * modules/md5: Depend on stdint, remove uint32_t.
10207
10208 2005-10-17  Simon Josefsson  <jas@extundo.com>
10209
10210         * modules/gc-sha1-tests: New file.
10211
10212         * tests/test-gc-sha1.c: New file.
10213
10214 2005-10-17  Simon Josefsson  <jas@extundo.com>
10215
10216         * m4/md5.m4: Remove call to uint32_t.m4.
10217
10218 2005-10-17  Simon Josefsson  <jas@extundo.com>
10219
10220         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10221
10222         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10223         md5.h.
10224
10225         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10226
10227         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10228
10229 2005-10-17  Simon Josefsson  <jas@extundo.com>
10230
10231         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10232
10233 2005-10-17  Simon Josefsson  <jas@extundo.com>
10234
10235         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10236
10237 2005-10-17  Simon Josefsson  <jas@extundo.com>
10238
10239         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10240
10241         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10242
10243 2005-10-17  Bruno Haible  <bruno@clisp.org>
10244
10245         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10246         that it can also be used in a test.
10247
10248 2005-10-16  Bruno Haible  <bruno@clisp.org>
10249
10250         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10251         TESTS_ENVIRONMENT, so that individual tests can augment it.
10252
10253         * gnulib-tool (func_create_testdir): Use an intermediate target for
10254         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10255         macros, like $(ALLOCA_H), which cannot be passed through the command
10256         line.
10257
10258 2005-10-15  Simon Josefsson  <jas@extundo.com>
10259
10260         * modules/rijndael-tests: New file.
10261
10262         * modules/rijndael: New file.
10263
10264 2005-10-15  Simon Josefsson  <jas@extundo.com>
10265
10266         * m4/rijndael.m4: New file.
10267
10268 2005-10-15  Simon Josefsson  <jas@extundo.com>
10269
10270         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10271
10272         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10273
10274 2005-10-14  Simon Josefsson  <jas@extundo.com>
10275
10276         * tests/test-arcfour.c: New file.
10277
10278         * modules/arcfour, modules/arcfour-tests: New files.
10279
10280 2005-10-14  Simon Josefsson  <jas@extundo.com>
10281
10282         * m4/arcfour.m4: New file.
10283
10284 2005-10-14  Simon Josefsson  <jas@extundo.com>
10285
10286         * lib/arcfour.h, lib/arcfour.c: New files.
10287
10288 2005-10-14  Roland McGrath  <roland@redhat.com>
10289
10290         Import from libc.  [BZ #1331]
10291         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10292         macro argument.
10293         Reported by Matej Vela <vela@debian.org>.
10294
10295 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10296
10297         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10298         include <wchar.h>; no longer needed.
10299
10300 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10301
10302         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10303
10304 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10305         and  Ulrich Drepper  <drepper@redhat.com>
10306
10307         Import from libc.
10308         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10309         instead of inline stream orientation test and two separate
10310         function calls.  Pay no attention to USE_IN_LIBIO.
10311
10312 2005-10-13  Simon Josefsson  <jas@extundo.com>
10313
10314         * modules/gc-hmac-md5-tests: New file.
10315
10316         * tests/test-gc-hmac-sha1.c: New file.
10317
10318         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10319
10320         * modules/gc-hmac-md5-tests: New file.
10321
10322         * tests/test-gc-md5.c: New file.
10323
10324         * modules/gc-md5-tests: New file.
10325
10326 2005-10-13  Simon Josefsson  <jas@extundo.com>
10327
10328         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10329         Move memory allocation outside of loop.
10330
10331 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10332
10333         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10334         intermediate directory is in a read-only file system.  Problem
10335         reported by Eric Blake.
10336
10337 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10338
10339         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10340
10341 2005-10-12  Simon Josefsson  <jas@extundo.com>
10342
10343         * tests/test-hmac-sha1.c: New file.
10344
10345         * modules/hmac-sha1-tests: New file.
10346
10347         * modules/hmac-sha1: New file.
10348
10349 2005-10-12  Simon Josefsson  <jas@extundo.com>
10350
10351         * modules/gc-sha1: New file.
10352
10353 2005-10-12  Simon Josefsson  <jas@extundo.com>
10354
10355         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10356
10357         * tests/test-gc-pbkdf2-sha1.c: New file.
10358
10359 2005-10-12  Simon Josefsson  <jas@extundo.com>
10360
10361         * modules/gc-md5, modules/gc-hmac-md5: New files.
10362
10363         * modules/gc (Files): Remove md5, memxor and hmac files.
10364
10365 2005-10-12  Simon Josefsson  <jas@extundo.com>
10366
10367         * m4/gc-pbkdf2-sha1.m4: New file.
10368
10369         * m4/gc-hmac-sha1.m4: New file.
10370
10371         * m4/gc-sha1: New file.
10372
10373         * m4/hmac-sha1.m4: New file.
10374
10375 2005-10-12  Simon Josefsson  <jas@extundo.com>
10376
10377         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10378
10379         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10380
10381 2005-10-12  Simon Josefsson  <jas@extundo.com>
10382
10383         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10384         suggested by Bruno Haible <bruno@clisp.org>.
10385
10386 2005-10-12  Simon Josefsson  <jas@extundo.com>
10387
10388         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10389
10390 2005-10-12  Simon Josefsson  <jas@extundo.com>
10391
10392         * lib/gc-pbkdf2-sha1.c: New file.
10393
10394         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10395
10396 2005-10-12  Simon Josefsson  <jas@extundo.com>
10397
10398         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10399
10400         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10401
10402 2005-10-12  Simon Josefsson  <jas@extundo.com>
10403
10404         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10405         GC_USE_HMAC_MD5, respectively.
10406
10407         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10408         (gc_md5): Fix typo.
10409
10410         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10411
10412         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10413
10414         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10415
10416 2005-10-12  Bruno Haible  <bruno@clisp.org>
10417
10418         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10419         Reported by Stepan Kasal <kasal@ucw.cz>.
10420
10421 2005-10-11  Simon Josefsson  <jas@extundo.com>
10422
10423         * tests/test-crc.c: New file.
10424
10425         * modules/crc, modules/crc-tests: New files.
10426
10427 2005-10-11  Simon Josefsson  <jas@extundo.com>
10428
10429         * m4/crc.m4: New file.
10430
10431 2005-10-11  Simon Josefsson  <jas@extundo.com>
10432
10433         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10434
10435         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10436
10437         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10438
10439 2005-10-11  Simon Josefsson  <jas@extundo.com>
10440
10441         * lib/crc.h, lib/crc.c: New files.
10442
10443         * lib/gc.h (gc_hash_buffer): Add doc.
10444
10445 2005-10-11  Bruno Haible  <bruno@clisp.org>
10446
10447         * modules/c-strcasestr: New file.
10448         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10449
10450 2005-10-11  Bruno Haible  <bruno@clisp.org>
10451
10452         * modules/c-strcase: New file.
10453         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10454
10455 2005-10-11  Bruno Haible  <bruno@clisp.org>
10456
10457         * lib/strcasecmp.c: Include limits.h.
10458         (strcasecmp): Avoid integer overflow on exotic platforms.
10459         * lib/strncasecmp.c: Include limits.h.
10460         (strncasecmp): Avoid integer overflow on exotic platforms.
10461         Reported by Paul Eggert.
10462
10463 2005-10-11  Bruno Haible  <bruno@clisp.org>
10464
10465         * lib/c-strcasestr.h: New file, from GNU gettext.
10466         * lib/c-strcasestr.c: New file, from GNU gettext.
10467
10468 2005-10-11  Bruno Haible  <bruno@clisp.org>
10469
10470         * lib/c-strcase.h: New file, from GNU gettext.
10471         * lib/c-strcasecmp.c: New file, from GNU gettext.
10472         * lib/c-strncasecmp.c: New file, from GNU gettext.
10473
10474 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10475
10476         * modules/mempcpy (License): GPL -> LGPL.
10477         * modules/strchrnul (License): Likewise.
10478         * modules/sysexits (License): Likewise.
10479
10480 2005-10-08  Simon Josefsson  <jas@extundo.com>
10481
10482         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10483
10484 2005-10-07  Simon Josefsson  <jas@extundo.com>
10485
10486         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10487
10488 2005-10-06  Simon Josefsson  <jas@extundo.com>
10489
10490         * tests/test-hmac-md5.c: New file.
10491
10492         * modules/hmac-md5-tests: New file.
10493
10494         * modules/hmac-md5: New file.
10495
10496 2005-10-06  Simon Josefsson  <jas@extundo.com>
10497
10498         * m4/hmac-md5.m4: New file.
10499
10500         * m4/memxor.m4: Require gl_C_RESTRICT.
10501
10502 2005-10-06  Simon Josefsson  <jas@extundo.com>
10503
10504         * lib/memxor.c (memxor): Avoid casts and warnings.
10505
10506 2005-10-06  Simon Josefsson  <jas@extundo.com>
10507
10508         * lib/hmac-md5.c: New file.
10509
10510         * lib/hmac.h: New file.
10511
10512 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10513
10514         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10515         promotes to int, not unsigned int, to catch the AIX 5.3
10516         compiler bug.
10517
10518 2005-10-05  Simon Josefsson  <jas@extundo.com>
10519
10520         * modules/memxor: New file.
10521
10522         * modules/iconv (Files): Move config.rpath to havelib, it is used
10523         there.
10524
10525         * modules/havelib (Files): Add config.rpath.
10526
10527 2005-10-05  Simon Josefsson  <jas@extundo.com>
10528
10529         * m4/memxor.m4: New file.
10530
10531 2005-10-05  Simon Josefsson  <jas@extundo.com>
10532
10533         * lib/memxor.c (memxor): Fix compiler error.
10534
10535         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10536         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10537
10538         * lib/memxor.h, lib/memxor.c: New files.
10539
10540         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10541         we assume all systems have it, suggested by Jim Meyering
10542         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10543         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10544         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10545         same reasons.
10546
10547 2005-10-05  Simon Josefsson  <jas@extundo.com>
10548
10549         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10550
10551 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10552
10553         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10554         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10555         needed, since the source code now assumes these .h files.
10556
10557 2005-10-05  Derek Price  <derek@ximbiot.com>
10558
10559         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10560
10561 2005-10-05  Bruno Haible  <bruno@clisp.org>
10562
10563         * modules/stdint (License): Change to LGPL.
10564
10565 2005-10-04  Simon Josefsson  <jas@extundo.com>
10566
10567         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10568         D. Baushke" <mdb@gnu.org>.
10569
10570 2005-10-04  Bruno Haible  <bruno@clisp.org>
10571
10572         * lib/verify.h (verify_true): Provide alternative definition for C++.
10573
10574 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10575
10576         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10577         (SSIZE_MAX): New macro, if not already defined.
10578         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10579         than 2 GiB.
10580
10581 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10582
10583         Sync from coreutils.
10584         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10585         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10586         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10587         ULLONG_MAX doesn't work with 2.7.2.1.
10588
10589 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10590
10591         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10592         From Ben Pfaff.
10593
10594         * modules/exclude (Depends-on): Depend on verify.
10595         * modules/strtoimax (Depends-on): Likewise.
10596         * modules/utimecmp (Depends-on): Likewise.
10597
10598 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10599
10600         * lib/exclude.c: Include verify.h.
10601         (verify): Remove.  All callers changed to use verify.h's version.
10602         * lib/strtoimax.c: Likewise.
10603         * lib/utimecmp.c: Likewis.e
10604
10605         Sync from coreutils.
10606         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10607         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10608         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10609         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10610         bother returning ENOSYS if settimeofday or stime fails; just let
10611         them return whatever errno they want to return.
10612         * lib/utimens.c: Include unistd.h, for dup2.
10613         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10614         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10615
10616 2005-10-02  Jim Meyering  <jim@meyering.net>
10617
10618         Sync from coreutils.
10619         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10620         from glibc-2.2.5 that fails for read-only files.
10621
10622 2005-10-02  Jim Meyering  <jim@meyering.net>
10623
10624         Sync from coreutils.
10625         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10626         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10627         `#if HAVE_CONFIG_H'.
10628         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10629         Remove AT_FDCWD test.
10630         Do not consume the fd unless successful.
10631         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10632         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10633         block, so that we don't even try to compile it if settimeofday is
10634         available.  This works around a compilation failure on OSF1 V5.1,
10635         due to stime requiring a `long int*' while tv_sec is `int'.
10636
10637 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10638
10639         Sync from coreutils.
10640         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10641         against `yes', rather than just testing for nonempty.
10642
10643 2005-10-01  Simon Josefsson  <jas@extundo.com>
10644
10645         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10646         and Darwin.
10647
10648         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10649         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10650         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10651         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10652         Check if struct addrinfo is declared.
10653
10654 2005-10-01  Simon Josefsson  <jas@extundo.com>
10655
10656         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10657         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10658         AI_* and EAI_* definitions.  Protect function declarations.
10659
10660 2005-10-01  Jim Meyering  <jim@meyering.net>
10661
10662         Sync from coreutils.
10663
10664         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10665         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10666         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10667         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10668         in the inet and nsl libraries.  Required on Solaris 5.7.
10669
10670 2005-10-01  Jim Meyering  <jim@meyering.net>
10671
10672         Sync from coreutils.
10673         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10674         in the inet and nsl libraries.  Required on Solaris 5.7.
10675
10676 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10677
10678         * lib/getdelim.c (getdelim): Remove unused variables.
10679
10680 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10681
10682         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10683         so that the code works even with ancient cpp.  Portability problem
10684         with GCC 2.7.2.1 reported by Thomas M.Ott.
10685
10686 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10687
10688         * modules/regex (Depends-on): Add strcase.
10689
10690         * modules/gethostname (Licence): Change from GPL to LGPL, since
10691         gethostname.c is a trivial implementation of a standard library
10692         function.
10693         * modules/poll (License): Change from GPL to LGPL, since it's
10694         derived from LGPL code.
10695
10696 2005-09-27  Jim Meyering  <jim@meyering.net>
10697
10698         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10699         HAVE_CONFIG_H.
10700
10701         * lib/intprops.h (signed_type_or_expr__): Define.
10702         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10703         for unsigned types.
10704
10705 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10706
10707         * lib/verify.h (verify_expr): Remove, replacing with:
10708         (verify_true): New macro that returns true instead of void.
10709         (verify_type__): Remove.
10710         (verify): Use verify_true rather than verify_type__.
10711
10712 2005-09-26  Bruno Haible  <bruno@clisp.org>
10713
10714         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10715         is necessary.
10716         (lib_SOURCES): Remove mbchar.c.
10717         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10718         (Files): Add m4/mbrtowc.m4.
10719         * modules/mbiter: Likewise.
10720         * modules/mbuiter: Likewise.
10721
10722 2005-09-26  Bruno Haible  <bruno@clisp.org>
10723
10724         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10725         compile mbchar.c if they are not both present.
10726         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10727         * m4/mbiter.m4 (gl_MBITER): Likewise.
10728         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10729         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10730         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10731
10732 2005-09-25  Jim Meyering  <jim@meyering.net>
10733
10734         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10735         also uses socklen_t.
10736
10737 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10738
10739         * lib/utimens.c (ENOSYS): Define if not already defined.
10740         (futimens): Support having a null PATH if the file descriptor
10741         is nonnegative.
10742
10743         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10744         Remove.
10745         (__attribute): Define to empty unless GCC 3.1 or later.
10746         This works around a core dump on OpenBSD 3.4, which has GCC
10747         2.95.3, which dumps core when given __attribute__(()).  It also
10748         simplifies other tests, since we really don't want to bother with
10749         worrying about which ancient version of GCC supported what.
10750         Original problem reported by Yoann Vandoorselaere, with part of
10751         the fix suggested by Derek Price.
10752
10753 2005-09-24  Jim Meyering  <jim@meyering.net>
10754
10755         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10756         so we can once again use a positive bitfield width of 1 -- now we
10757         don't have to explain why we were using a bitfield width of 2.
10758
10759 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10760
10761         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10762         and similarly for the other external symbols.  Problem reported
10763         by James Gallager.
10764
10765         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10766         bug reported by Jim Meyering.
10767
10768         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10769         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10770         not needed, since socklen is a prerequisite module.
10771
10772 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10773
10774         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10775         Problem reported by Eric Blake.
10776         (getaddrinfo): Initialize se so that it's not garbage.
10777         Redo internal storage allocation so that it doesn't make unportable
10778         assumptions about alignment.
10779         Fix a memory leak.
10780
10781         * lib/utimens.c (futimens): Use futimesat if available.
10782         Prefer it to futimes since it doesn't have the futimes bug.
10783
10784         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10785         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10786         Instead, declare a function that returns a pointer to an array,
10787         and use verify_type__ to declare the size of the array.
10788         Problem and germ of a solution reported by Bruno Haible.
10789         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10790         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10791
10792 2005-09-23  Jim Meyering  <jim@meyering.net>
10793
10794         Sync from coreutils.
10795         Correct build failure (socklen_t not defined) on at least
10796         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10797         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10798
10799 2005-09-23  Jim Meyering  <jim@meyering.net>
10800
10801         * modules/getaddrinfo (Depends-on): Add socklen.
10802
10803 2005-09-23  Bruno Haible  <bruno@clisp.org>
10804
10805         * tests/test-verify.c: New file.
10806
10807 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10808
10809         Sync from coreutils.
10810
10811         * modules/argmatch (Depends-on): Add verify.
10812         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10813         unistd-safer.
10814         * modules/save-cwd (Depends-on): Likewise.
10815
10816         * modules/openat (Files): Add lib/openat-die.c.
10817         (Depends-on): Remove error, exitfail.
10818         Add dirname.
10819
10820         * modules/verify: New file.
10821         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10822         with "verify" module.
10823
10824 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10825
10826         Sync from coreutils.
10827
10828         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10829         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10830         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10831         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10832         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10833         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10834         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10835         Don't bother checking for string.h, stdlib.h, unistd.h.
10836         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10837         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10838         module's job.
10839         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10840         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10841
10842         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10843         (gl_GETDATE): Use it.
10844
10845         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10846
10847 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10848
10849         Sync from coreutils.
10850
10851         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10852         stat-time.h.
10853         * lib/argmatch.h: Include verify.h
10854         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10855         (ARGMATCH_ASSERT): Remove; unused.
10856         * lib/canonicalize.c: Assume STDC_HEADERS.
10857         * lib/exclude.c: Include "strcase.h".
10858         * lib/regex_internal.h [!defined _LIBC]: Likewise.
10859         * lib/getusershell.c: Include stdio--.h rather than stdio.h
10860         and stdio-safer.h.
10861         (getusershell): Call fopen, not fopen_safer.
10862         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
10863         Do not include unistd-safer.h.
10864         (save_cwd): Don't call fd_safer; no longer needed
10865         now that we include fcntl--.h.
10866
10867         * lib/getdate.y (relative_time): New type.
10868         (RELATIVE_TIME_0): New constant.
10869         (parser_control): Use relative_time instead of doing it ourselves.
10870         (%union): Add new relative_time rel member.
10871         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
10872         Now typeless.
10873         (relunit, relunit_snumber): Now of type rel.
10874         (zone, rel, relunit, get_date): Adjust to above changes.
10875
10876         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
10877         Do not include unistd-safer.h.
10878         (getloadavg): Don't call fd_safer; no longer needed
10879         now that we include fcntl--.h.
10880
10881         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
10882         (make_dir_parents): Treat ENOSYS like EEXIST.
10883
10884         Improve quality of diagnostics on restore_cwd failure.
10885         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
10886         (make_dir_parents): Last arg is now int * (for errno), not bool *.
10887         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
10888         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
10889         each time through the loop.  Do not diagnose restore_cwd failure;
10890         that is the caller's job (and perhaps the caller does not care).
10891
10892         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
10893         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
10894         If the file already exists but is not a directory, don't bother
10895         to try to make its parents.
10896         Close potential file descriptor leak if we can't chdir("/") (!).
10897         Don't always return true if chdir($PWD) fails; return true only
10898         if the requested action was done successfully (except for the
10899         chdir($PWD)).
10900         Don't log final directory unless we actually made it.
10901         Refactor to avoid duplicate code to fix up permissions.
10902         Don't attempt to fix up parent permissions if chdir($PWD) fails.
10903
10904         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
10905         to make it a bit faster and (I hope) clearer.
10906         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
10907         Fix bug in formats like %2N.
10908
10909         * lib/verify.h: New file.
10910
10911 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10912
10913         Sync from coreutils.
10914         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
10915
10916 2005-09-22  Jim Meyering  <jim@meyering.net>
10917
10918         Sync from coreutils.
10919
10920         * m4/lstat.m4 (gl_FUNC_LSTAT):
10921         Use AC_LIBSOURCES to require lstat.c and lstat.h.
10922         Remove obsolete comment.
10923         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
10924         * m4/xstrtod.m4: Likewise.
10925
10926         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
10927
10928 2005-09-22  Jim Meyering  <jim@meyering.net>
10929
10930         Sync from coreutils.
10931
10932         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
10933
10934         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
10935         the .tm_year member, since otherwise gcc-4.0 would now warn about
10936         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
10937
10938         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
10939         order to avoid an unsuppressible warning from gcc on 64-bit systems.
10940
10941         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
10942         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
10943         when run in a time zone for which daylight savings time is in effect
10944         for the starting date.
10945
10946         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
10947         stop us from restricting permissions of just-created absolute-named
10948         directories.
10949         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
10950         to restore initial working directory.
10951         * lib/mkdir-p.c (make_dir_parents): New parameter:
10952         different_working_dir, to tell caller if/when we change the working
10953         directory and are unable to return to the initial one.
10954         * lib/mkdir-p.h (make_dir_parents): Update prototype.
10955         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
10956         `return false'.  This fixes a bug introduced on 2004-07-30.
10957
10958         * lib/openat.c (fdopendir): Be sure to close the supplied
10959         file descriptor before returning.  This makes our replacement
10960         implementation a little closer to Solaris's, where fdopendir
10961         ties the file descriptor to the returned DIR* pointer.
10962         * lib/openat.c (unlinkat): New function.
10963         * lib/openat.h (unlinkat): Add prototype.
10964         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
10965         (openat_restore_fail): Rename from openat_restore_die.
10966         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
10967
10968         Provide an alternative to exiting immediately upon save_cwd or
10969         restore_cwd failure.  Now, an application can arrange e.g.,
10970         to perform a longjump in that case.
10971         * lib/openat.c: Include dirname.h.
10972         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
10973         (rpl_openat, fdopendir, fstatat): Call openat_save_die
10974         and openat_restore_die rather than calling error directly.
10975         Don't include "error.h" or "exitfail.h"; they're no longer needed.
10976
10977         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
10978         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
10979         define.
10980
10981         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
10982         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
10983                             int utc, int nanoseconds);
10984         Background:
10985         date should not have to allocate a megabyte of virtual memory to
10986         handle a format argument like +%1048575T.  When implemented with
10987         strftime, it must allocate such a buffer, use strftime to fill it
10988         in, print it, then free it.
10989         With fprintftime, it simply prints everything and exits.
10990         With no need for memory allocation, that's one fewer way to fail.
10991         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
10992         optional field width, not before, so we accept %9:z, not %:9z.
10993         (my_strftime): Be sure to use L_('x') for literals.
10994
10995         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
10996         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
10997         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
10998         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
10999         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11000         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11001         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11002         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11003         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11004         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11005         * lib/xgethostname.c, lib/xreadlink.c:
11006         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11007
11008         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11009         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11010         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11011         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11012         and don't include <sys/file.h>).
11013
11014 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11015
11016         Sync from coreutils.
11017
11018         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11019         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11020         [!LDAV_DONE]: Avoid unused variable warning.
11021
11022 2005-09-21  Bruno Haible  <bruno@clisp.org>
11023
11024         * lib/unicodeio.h (unicode_to_mb): New declaration.
11025
11026 2005-09-20  Derek Price  <derek@ximbiot.com>
11027
11028         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11029         getaddrinfo.h.
11030
11031 2005-09-20  Bruno Haible  <bruno@clisp.org>
11032
11033         * gnulib-tool: Remove trailing slashes from the values specified for
11034         --source-base, --m4-base, --tests-base, --aux-dir.
11035         Suggested by Simon Josefsson <jas@extundo.com>.
11036
11037 2005-09-20  Bruno Haible  <bruno@clisp.org>
11038
11039         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11040         func_modules_to_filelist, func_import, func_create_testdir): Make all
11041         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11042         change when gnulib-tool is invoked in a different locale.
11043
11044 2005-09-19  Simon Josefsson  <jas@extundo.com>
11045
11046         * m4/socklen.m4: Fix typo.
11047
11048 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11049
11050         Use a consistent style for including <config.h>.
11051         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11052         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11053         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11054         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11055         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11056         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11057         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11058         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11059         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11060         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11061         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11062         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11063         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11064         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11065         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11066         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11067         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11068         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11069         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11070         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11071         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11072         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11073         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11074         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11075         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11076         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11077         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11078         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11079         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11080         lib/xstrtoumax.c, lib/yesno.c:
11081         Standardize inclusion of config.h.
11082         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11083         lib/inttostr.h:  Removed inclusion of config.h from header files.
11084         * lib/inttostr.c:  Adjusted in-tree users.
11085         * lib/timespec.h: Remove superfluous warning to include config.h.
11086         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11087         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11088         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11089         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11090         config.h with HAVE_CONFIG_H.
11091
11092 2005-09-19  Jim Meyering  <jim@meyering.net>
11093
11094         * modules/pathmax (License): Change to LGPL.
11095
11096 2005-09-19  Derek Price  <derek@ximbiot.com>
11097
11098         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11099
11100 2005-09-19  Bruno Haible  <bruno@clisp.org>
11101
11102         * gnulib-tool (import): Provide default for --tests-base.
11103
11104 2005-09-19  Bruno Haible  <bruno@clisp.org>
11105
11106         * doc/quote.texi: New file, extracted from gnulib.texi.
11107         * doc/ctime.texi: New file, extracted from gnulib.texi.
11108         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11109         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11110         * doc/gnulib.texi: Include them.
11111
11112 2005-09-18  Bruno Haible  <bruno@clisp.org>
11113
11114         Portability fix.
11115         * gnulib-tool (func_readlink): New function.
11116         (func_ln_if_changed): Use it.
11117
11118 2005-09-18  Bruno Haible  <bruno@clisp.org>
11119
11120         * gnulib-tool: Support --with-tests also with --import.
11121         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11122         (func_import): Use variables $testsbase and $inctests. Emit a
11123         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11124         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11125         SUBDIRS += $testsdir.
11126         (func_create_testdir): Update.
11127
11128 2005-09-18  Bruno Haible  <bruno@clisp.org>
11129
11130         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11131         instead of $dry_run.
11132         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11133         (func_ln_if_changed): Don't handle dry-run here.
11134         (func_import): In dry-run mode, detect more precisely which actions
11135         would be performed, and don't use "...ing" verbs.
11136
11137 2005-09-18  Bruno Haible  <bruno@clisp.org>
11138
11139         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11140         (func_import): Use join on two temporary files instead of three nested
11141         loops, in order to determine which files are new or old.
11142
11143 2005-09-18  Bruno Haible  <bruno@clisp.org>
11144
11145         * gnulib-tool (func_import): Comment out code that spits out the
11146         new files with --dry-run.
11147
11148 2005-09-18  Bruno Haible  <bruno@clisp.org>
11149
11150         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11151
11152 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11153
11154         * lib/stat-time.h: New file.
11155         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11156         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11157         in a different way.
11158         (timespec_cmp): New function.
11159         * lib/utimecmp.c: Include stat-time.h.
11160         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11161         members exist, not on the obsolescent ST_MTIM_NSEC.
11162         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11163
11164 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11165
11166         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11167
11168 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11169
11170         * MODULES.html.sh (File system functions): Add stat-time.
11171         * modules/stat-time: New file.
11172         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11173         is now done in a different way, by the stat-time module.
11174         * modules/utimecmp (Depends-on): Add stat-time.
11175
11176 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11177
11178         * m4/st_mtim.m4: Remove.  Superseded by...
11179         * m4/stat-time.m4: New file.
11180         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11181         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11182
11183 2005-09-15  Derek Price  <derek@ximbiot.com>
11184
11185         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11186
11187 2005-09-15  Derek Price  <derek@ximbiot.com>
11188
11189         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11190         * lib/regex_internal.c: Ditto, using this...
11191         (__GNUC_PREREQ): ...new macro.
11192         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11193         using...
11194         (__GNUC_PREREQ): ...this new macro.
11195
11196         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11197
11198 2005-09-15  Derek Price  <derek@ximbiot.com>
11199             Paul Eggert  <eggert@cs.ucla.edu>
11200
11201         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11202         changes, consolidating in...
11203         * lib/regex_internal.h: ...this file.
11204
11205 2005-09-13  Jim Meyering  <jim@meyering.net>
11206
11207         * lib/canon-host.c: Filter through gnu indent and reword comments
11208         slightly.
11209         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11210
11211 2005-09-13  Derek Price  <derek@ximbiot.com>
11212
11213         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11214         failure.
11215         Reported by Jim Meyering  <jim@meyering.net>.
11216
11217 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11218
11219         * lib/base64.c: Typo.
11220         (base64_encode): Put b64str in initialized data section.
11221
11222 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11223
11224         Merge glibc and coreutils changes into gnulib, plus a few
11225         extra fixes.
11226         * lib/md5.c: Use #error rather than a string.
11227         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11228         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11229         (__attribute__): Define to empty for non recent-GCC.
11230         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11231         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11232         Renamed from their non-__ counterparts, with new macros replacing
11233         them if not _LIBC.  Add __THROW attribute.
11234         (rol): Remove.
11235         (struct md5_ctx): Align buffer if using GCC.
11236         * lib/sha1.h (struct sha1_ctx): Likewise.
11237         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11238         The old name was backwards.
11239         (NOTSWAP): Remove; not used.
11240         (rol): New macro, moved here from md5.h.
11241         (sha1_process_block): Remove a FIXME that doesn't make sense.
11242
11243 2005-09-12  Derek Price  <derek@ximbiot.com>
11244
11245         Return usable errors from canon-host.
11246         * lib/canon-host.h: New file.
11247         * lib/canon-host.c (canon_host): Wrap...
11248         (canon_host_r): ...this new function, which now relies exclusively on
11249         getaddrinfo.
11250         (ch_strerror): New function.
11251         (last_cherror): New global.
11252         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11253         interface.
11254         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11255         void *.
11256         (freeaddrinfo): Free ai->ai_canonname when set.
11257
11258 2005-09-12  Derek Price  <derek@ximbiot.com>
11259
11260         Make canon-host require getaddrinfo.
11261         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11262         AC_LIBSOURCE canon-host.h.  Call...
11263         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11264         gl_GETADDRINFO.
11265         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11266
11267 2005-09-12  Derek Price  <derek@ximbiot.com>
11268
11269         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11270         LGPL.
11271         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11272
11273 2005-09-12  Derek Price  <derek@ximbiot.com>
11274
11275         * lib/gai_strerror.c: Include config.h when available.  Include
11276         getaddrinfo.h before other headers to test interface.
11277         Reported by Larry Jones <lawrence.jones@ugs.com>.
11278
11279 2005-09-12  Derek Price  <derek@ximbiot.com>
11280             Paul Eggert  <eggert@cs.ucla.edu>
11281
11282         * modules/glob (Files): Add glob-libc.h.
11283
11284 2005-09-12  Derek Price  <derek@ximbiot.com>
11285             Paul Eggert  <eggert@cs.ucla.edu>
11286
11287         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11288         glob_.h, glob-libc.h.
11289         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11290
11291 2005-09-12  Derek Price  <derek@ximbiot.com>
11292             Paul Eggert  <eggert@cs.ucla.edu>
11293
11294         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11295         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11296         protecting things that should be done only in gnulib contexts.
11297         * lib/glob_.h: New file, containing only the glob things needed for
11298         gnulib.
11299         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11300         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11301         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11302         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11303         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11304         and to respect the namespace rules better.
11305
11306 2005-09-08  Simon Josefsson  <jas@extundo.com>
11307
11308         * modules/socklen: New file.
11309
11310 2005-09-08  Simon Josefsson  <jas@extundo.com>
11311
11312         * m4/socklen.m4: New file.
11313
11314 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11315
11316         * modules/utimens (Files): Add m4/utimbuf.m4, since
11317         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11318         Reported by Sergey Poznyakoff.
11319
11320 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11321
11322         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11323         definitions, since that's the preferred style in glibc.
11324         Fix a minor spacing issue, and update copyright notice to match
11325         glibc's.
11326
11327 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11328
11329         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11330
11331 2005-09-06  Simon Josefsson  <jas@extundo.com>
11332
11333         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11334         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11335
11336 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11337
11338         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11339         warning.
11340
11341 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11342
11343         * config/srclist.txt: Add glibc bug 1302.
11344
11345 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11346
11347         Change bitset word type from unsigned int to unsigned long int,
11348         as this has better performance on typical 64-bit hosts.
11349         Port bitset code to hosts with unusual word sizes.
11350         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11351         (build_collating_symbol):
11352         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11353         argument is a bitset.  This is merely a style issue, but it makes
11354         it clearer that an entire array is expected.
11355         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11356         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11357         Port to the case where bitset_word is not the same as unsigned int.
11358         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11359         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11360         Likewise.
11361         * lib/regexec.c (check_dst_limits_calc_pos_1,
11362         check_subexp_matching_top):
11363         (build_trtable, group_nodes_into_DFAstates):
11364         Likewise.
11365         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11366         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11367         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11368         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11369         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11370         * lib/regcomp.c (optimize_subexps, lower_subexp):
11371         Work even if bitset_word has holes in its bitwise representation.
11372         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11373         * lib/regexec.c (check_dst_limits_calc_pos_1,
11374         check_subexp_matching_top):
11375         Likewise.
11376         * lib/regex_internal.c (re_string_reconstruct):
11377         Don't assume UCHAR_MAX == 255.
11378         * lib/regex_internal.h (bitset_set_all): Likewise.
11379         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11380         All uses changed.
11381         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11382         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11383         All uses changed.
11384         (BITSET_WORD_MAX): New macro.
11385         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11386         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11387         (bitset_empty, bitset_copy):
11388         Prefer sizeof (bitset) to multiplying it out ourselves.
11389         (bitset_not_merge): Remove; unused.
11390         (bitset_contain): Return bool, not unsigned int with one bit on.
11391         All callers changed.
11392         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11393         alignment than re_node_set; do this by defining a new internal
11394         type struct dests_alloc and using it to allocate memory.
11395
11396 2005-09-05  Bruno Haible  <bruno@clisp.org>
11397
11398         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11399         links.
11400
11401 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11402
11403         * modules/size_max (Makefile.am): Add size_max.h
11404
11405 2005-09-04  Derek Price  <derek@ximbiot.com>
11406
11407         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11408
11409 2005-09-03  Simon Josefsson  <jas@extundo.com>
11410
11411         * gnulib-tool: Fix typo.
11412
11413 2005-09-03  Simon Josefsson  <jas@extundo.com>
11414
11415         * config/srclist.txt: Add glibc bug 1293.
11416
11417 2005-09-03  Derek Price  <derek@ximbiot.com>
11418
11419         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11420         From Larry Jones <lawrence.jones@ugs.com>.
11421
11422 2005-09-02  Simon Josefsson  <jas@extundo.com>
11423
11424         * modules/socklen: New file.
11425
11426 2005-09-02  Simon Josefsson  <jas@extundo.com>
11427
11428         * modules/havelib: New module.
11429
11430         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11431         Use havelib.
11432
11433 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11434
11435         Check for arithmetic overflow when calculating sizes, to prevent
11436         some buffer-overflow issues.  These patches are conservative, in the
11437         sense that when I couldn't determine whether an overflow was possible,
11438         I inserted a run-time check.
11439         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11440         macros.
11441         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11442         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11443         (re_xnrealloc, re_x2nrealloc): New inline functions.
11444         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11445         parse_bracket_exp):
11446         (build_equiv_class, build_charclass): Check for arithmetic overflow
11447         in size expression calculations.
11448         * lib/regex_internal.c (re_string_realloc_buffers):
11449         (build_wcs_upper_buffer, re_node_set_add_intersect):
11450         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11451         (re_dfa_add_node, register_state): Likewise.
11452         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11453         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11454         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11455         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11456
11457 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11458
11459         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11460         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11461
11462 2005-09-02  Bruno Haible  <bruno@clisp.org>
11463
11464         Support for lib vs. lib64 distinction on biarch platforms.
11465         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11466         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11467         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11468
11469 2005-09-02  Bruno Haible  <bruno@clisp.org>
11470
11471         * gnulib-tool (import): In the other first-use case, provide defaults
11472         as well.
11473
11474 2005-09-02  Bruno Haible  <bruno@clisp.org>
11475
11476         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11477         patches not yet found in the latest gettext release.
11478
11479 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11482         to avoid a collision with bits/local_lim.h in glibc.
11483         All uses changed.  Problem reported by Dmitry V. Levin in
11484         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11485
11486         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11487         bugs in int versus size_t comparisons.
11488         (re_string_context_at): Fix bug where the code assumed that
11489         Idx is signed.
11490
11491         Use bool where appropriate.
11492         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11493         All callers changed.
11494         (calc_eclosure_iter): Likewise, for ROOT arg.
11495         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11496         (build_charclass_op): Likewise, for NON_MATCH arg.
11497         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11498         (re_string_construct_common): Likewise, for ICASE arg.
11499         * lib/regexec.c (re_search_2_stub, re_search_stub):
11500         Likewise, for RET_LEN arg.
11501         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11502         (set_regs): Likewise, for FL_BACKTRACK arg.
11503         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11504         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11505         (calc_eclosure_iter, parse_bracket_exp):
11506         Use bool for internal variables that are booleans.
11507         * lib/regexec.c (re_search_internal, check_matching,
11508         proceed_next_node):
11509         (set_regs, build_sifted_states, sift_states_bkref):
11510         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11511         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11512         (find_collation_sequence_value):
11513         Likewise.
11514         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11515         (re_node_set_compare):
11516         Return bool, not int. All callers changed.
11517         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11518         (build_trtable, check_node_accept): Likewise.
11519         * lib/regex_internal.h: Include stdbool.h.
11520
11521         Fix bugs uncovered when converting to bool.
11522         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11523         failure instead of charging ahead blindly.
11524         * lib/regex_internal.c (register_state): Likewise.
11525         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11526         for freeing internal storage.
11527         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11528         bitset pieces used as boolean, to avoid undefined behavior
11529         on hosts that do int overflow checking.
11530
11531 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11532
11533         * config/srclist.txt: Add glibc bugs 1285-1287.
11534
11535 2005-09-01  Jim Meyering  <jim@meyering.net>
11536
11537         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11538         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11539         Require gl_STAT_MACROS, too.
11540
11541 2005-09-01  Bruno Haible  <bruno@clisp.org>
11542
11543         * gnulib-tool (import): In the first-use case, provide defaults.
11544
11545 2005-09-01  Bruno Haible  <bruno@clisp.org>
11546
11547         * gnulib-tool (func_import): Remove the .tmp files.
11548
11549 2005-09-01  Bruno Haible  <bruno@clisp.org>
11550
11551         * gnulib-tool (func_import): Fix handling of symbolic links.
11552
11553 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11554
11555         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11556         old glibc regex code mishandles strings longer than 2**31 bytes.
11557         This patch fixes this when the regex code is used in gnulib
11558         (i.e., outside glibc).
11559
11560         This patch should not affect the use of the regex code inside
11561         glibc.  No doubt this problem also needs to be handled for glibc
11562         as well, but the result will be an incompatible change to the
11563         glibc ABI, and the old ABI will have to be supported too.  That
11564         can be the the subject for another patch.
11565
11566         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11567         governing whether the rest of this patch is active.  By default,
11568         the macro is disabled and the patch has no effect.
11569         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11570         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11571         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11572         (re_match_2, re_set_registers): Use the new types.
11573         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11574         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11575         New macros.
11576         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11577         (re_string_context_at, bin_tree_t, re_dfastate_t):
11578         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11579         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11580         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11581         (re_string_char_size_at, re_string_wchar_at):
11582         (re_string_elem_size_at):
11583         Use the new types and macros to port to 64-bit hosts.
11584         Use unsigned types for internal values, so that the code
11585         mostly works even for arrays larger than SSIZE_MAX.
11586         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11587         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11588         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11589         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11590         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11591         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11592         (calc_inveclosure, parse_dup_op, build_range_exp):
11593         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11594         (fetch_number, create_token_tree, mark_opt_subexp):
11595         Likewise.
11596         * lib/regex_internal.c (re_string_construct_common,
11597         create_ci_newstate):
11598         (create_cd_newstate, re_string_allocate, re_string_construct):
11599         (re_string_realloc_buffers, build_wcs_upper_buffer):
11600         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11601         (re_string_reconstruct, re_string_peek_byte_case):
11602         (re_string_fetch_byte_case, re_string_context_at):
11603         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11604         (re_node_set_init_copy, re_node_set_add_intersect):
11605         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11606         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11607         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11608         (re_acquire_state, re_acquire_state_context, register_state):
11609         Likewise.
11610         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11611         search_cur_bkref_entry):
11612         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11613         (re_search_internal, re_search_2_stub, re_search_stub)
11614         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11615         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11616         (update_cur_sifted_state, check_dst_limits):
11617         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11618         (check_subexp_limits, sift_states_bkref, merge_state_array):
11619         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11620         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11621         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11622         (expand_bkref_cache, check_node_accept_bytes):
11623         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11624         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11625         (acquire_init_state_context, check_halt_node_context):
11626         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11627         (sift_states_backward, clean_state_log_if_needed):
11628         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11629         (find_recover_state, transit_state_sb, transit_state_mb):
11630         (transit_state_bkref, build_trtable, match_ctx_clean):
11631         Likewise.
11632         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11633         to work around an assumption that REG_MISSING is negative.
11634
11635         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11636         (seek_collating_symbol_entry) [defined _LIBC]:
11637         (lookup_collation_sequence_value) [defined _LIBC]:
11638         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11639         Use prototypes rather than old-style function definitions.
11640         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11641         (transit_state_sb) [0]:
11642         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11643
11644         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11645         rm_eo.
11646
11647         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11648         (optimize_subexps, lower_subexp):
11649         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11650         since the signed shift might overflow.  Use 1u<<31 instead.
11651         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11652         Likewise.
11653         * lib/regexec.c (check_dst_limits_calc_pos_1,
11654         check_subexp_matching_top): Likewise.
11655
11656         * lib/regcomp.c (optimize_subexps, lower_subexp):
11657         Use CHAR_BIT rather than 8, for clarity.
11658         * lib/regexec.c (check_dst_limits_calc_pos_1):
11659         (check_subexp_matching_top): Likewise.
11660         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11661         have to worry about portability issues when shifting it left.
11662         Remove no-longer-needed test for table_size > 0.
11663         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11664         in a word, as the resulting behavior is undefined.
11665         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11666         in one case, a <= should have been an <, and in another case the
11667         whole test was missing.
11668         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11669         the standard name CHAR_BIT.
11670         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11671         this is not true on one's complement and signed-magnitude hosts.
11672
11673         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11674         next_last_offset.
11675         (struct re_dfa_t): Remove unused member states_alloc.
11676         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11677
11678 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11679
11680         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11681         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11682         and large-file glibc and in 32-bit large-file Solaris.
11683
11684 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11685
11686         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11687         lengths fit in regoff_t; this isn't true if regoff_t is the same
11688         width as size_t.
11689         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11690         (= START + RANGE) instead of RANGE.  This avoids overflow
11691         problems when regoff_t is the same width as size_t.
11692         All callers changed.
11693         (re_search_2_stub): Check for overflow when adding the
11694         sizes of the two strings.
11695         (re_search_stub): Check for overflow when adding START
11696         to RANGE; if it occurs, substitute the extreme value.
11697
11698 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11699
11700         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11701
11702 2005-08-31  Jim Meyering  <jim@meyering.net>
11703
11704         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11705         a pointer-to-const.
11706         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11707         (register_state): Likewise.
11708         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11709         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11710         (group_nodes_into_DFAstates): Likewise.
11711
11712 2005-08-31  Jim Meyering  <jim@meyering.net>
11713
11714         * check-module: Add a FIXME comment.
11715
11716 2005-08-31  Eric Blake  <ebb9@byu.net>
11717
11718         * modules/unistd-safer (Files): Add unistd--.h.
11719         * modules/stdio-safer (Files): Add stdio--.h.
11720
11721 2005-08-31  Derek Price  <derek@ximbiot.com>
11722
11723         * lib/getdelim.c (getdelim): Return EOF on EOF.
11724         Reported by Larry Jones <lawrence.jones@ugs.com>.
11725
11726 2005-08-31  Bruno Haible  <bruno@clisp.org>
11727
11728         Avoid unnecessary diffs in the generated lib/Makefile.am.
11729         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11730         the generated files.
11731         (func_import): Don't set cmd.
11732
11733 2005-08-31  Bruno Haible  <bruno@clisp.org>
11734
11735         * lib/strstr.c: Include <stddef.h>, for NULL.
11736         * lib/strcasestr.c: Likewise.
11737         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11738
11739 2005-08-31  Bruno Haible  <bruno@clisp.org>
11740
11741         * gnulib-tool: New option --macro-prefix.
11742         (func_import): Use macro_prefix.
11743         (import): Handle option --macro-prefix.
11744
11745 2005-08-31  Bruno Haible  <bruno@clisp.org>
11746
11747         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11748         Also use new variables cached_lgpl, cached_libtool.
11749
11750 2005-08-31  Bruno Haible  <bruno@clisp.org>
11751
11752         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11753         always instantiating them.
11754
11755 2005-08-31  Bruno Haible  <bruno@clisp.org>
11756
11757         * gnulib-tool (func_import): Read the previous cached settings
11758         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11759         earlier added by gnulib but are now dropped. Warn when a gnulib file
11760         overwrites a non-gnulib file.
11761
11762 2005-08-31  Bruno Haible  <bruno@clisp.org>
11763
11764         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11765         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11766         projects that don't keep autogenerated files in CVS. Put into
11767         actioncmd only the specified modules, not the transitive closure.
11768
11769 2005-08-31  Bruno Haible  <bruno@clisp.org>
11770
11771         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11772         Create directories that shall be filled.
11773         (import): Don't look for gl_* macros in configure.ac. Recurse across
11774         all directories containing a gnulib-cache.m4 files, if meaningful.
11775
11776 2005-08-31  Bruno Haible  <bruno@clisp.org>
11777
11778         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11779         (import): Set seen_libtool when we see gl_LIBTOOL.
11780
11781 2005-08-31  Bruno Haible  <bruno@clisp.org>
11782
11783         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11784         declaration macro definitions from generated gnulib.m4.
11785
11786 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11787
11788         * lib/iconvme.h: Add prototype for iconv_alloc.
11789
11790 2005-08-29  Simon Josefsson  <jas@extundo.com>
11791
11792         * lib/iconvme.c: Fix errno.
11793
11794 2005-08-29  Bruno Haible  <bruno@clisp.org>
11795
11796         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11797         that it works when the directory contains spaces.
11798
11799 2005-08-29  Bruno Haible  <bruno@clisp.org>
11800
11801         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11802
11803 2005-08-29  Bruno Haible  <bruno@clisp.org>
11804
11805         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11806         Emit more advice.
11807
11808 2005-08-29  Bruno Haible  <bruno@clisp.org>
11809         and Stepan Kasal  <kasal@ucw.cz>
11810
11811         * check-module: If more parameters are given, check each of them
11812         separately; add more exceptions, as noted by Jim Meyering.
11813         (check_module): New procedure.
11814         (%exempt_header): Now contains all exceptions.
11815
11816 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11817
11818         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11819
11820 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11821
11822         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11823
11824 2005-08-28  Bruno Haible  <bruno@clisp.org>
11825
11826         * m4/gnulib-tool.m4: New file.
11827
11828 2005-08-27  Jim Meyering  <jim@meyering.net>
11829
11830         * modules/unistd-safer (Files): Add pipe-safer.c.
11831         * modules/fcntl-safer (Files): Add creat-safer.c.
11832
11833 2005-08-27  Jim Meyering  <jim@meyering.net>
11834
11835         * m4/stdlib-safer.m4: New file.  From coreutils.
11836         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11837         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11838         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11839         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11840         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11841
11842 2005-08-27  Jim Meyering  <jim@meyering.net>
11843
11844         * lib/fopen-safer.c: Merge minor changes from coreutils.
11845         * lib/dup-safer.c: Likewise.
11846         * lib/fd-safer.c: Likewise.
11847
11848         Merge from coreutils.
11849         * lib/stdio--.h: New file.
11850         * lib/stdlib--.h: New file.
11851         * lib/mkstemp-safer.c: New file.
11852
11853         GNU tar needs these.
11854         * lib/pipe-safer.c: New file.
11855         * lib/creat-safer.c: New file.
11856         * lib/fcntl--.h (creat): Define to creat_safer.
11857         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
11858         * lib/unistd--.h (pipe): Define to pipe_safer.
11859         * lib/unistd-safer.h: Declare pipe_safer.
11860
11861 2005-08-26  Simon Josefsson  <jas@extundo.com>
11862
11863         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
11864         Haible <bruno@clisp.org>.
11865
11866 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
11867
11868         * lib/regex_internal.h: Remove all references to
11869         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
11870         or better.
11871         (bitset_not, bitset_merge, bitset_not_merge):
11872         (bitset_mask, re_string_allocate, re_string_construct):
11873         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
11874         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
11875         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
11876         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
11877         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11878         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11879         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
11880         (re_acquire_state_context):
11881         Remove unnecessary forward decls.
11882         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
11883         Put __attribute at function definition,
11884         now that the function decl has been removed.
11885         * lib/regex_internal.c (re_string_peek_byte_case):
11886         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
11887         Likewise.
11888
11889 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
11890
11891         * m4/regex.m4: Add AC_PREREQ(2.50).
11892         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
11893
11894 2005-08-25  Simon Josefsson  <jas@extundo.com>
11895
11896         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
11897         __fsetlocking.
11898
11899 2005-08-25  Simon Josefsson  <jas@extundo.com>
11900
11901         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
11902         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
11903         GLIBC specific code.
11904
11905 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11906
11907         Make regex safe for g++.  This fixes one real bug (an "err"
11908         that should have been "*err").  g++ problem reported by
11909         Sam Steingold.
11910         * lib/regex_internal.h (re_calloc): New macro, consistent with
11911         re_malloc etc.  All callers of calloc changed to use re_calloc.
11912         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
11913         not int.  All callers changed.
11914         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
11915         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
11916         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
11917         (find_recover_state): Change "err" to "*err"; this fixes what
11918         appears to be a real bug.
11919         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
11920         versus int.
11921
11922 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11923
11924         * modules/regex (Depends-on): Add malloc, since the code
11925         assumes that !malloc(0) means failure.
11926
11927 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11928
11929         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
11930
11931         alloca modernization/simplification for regex.
11932         * lib/regex.c: Remove portability cruft for alloca.  This no longer
11933         needs to be at the start of the file, and can be moved into
11934         regex_internal.h and simplified.
11935         * lib/regex_internal.h: Include <alloca.h>.
11936         (__libc_use_alloca) [!defined _LIBC]: New macro.
11937         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
11938         now works outside glibc.
11939
11940 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
11941
11942         * config/srclist.txt: Add glibc bugs 1241, 1245.
11943
11944 2005-08-25  Jim Meyering  <jim@meyering.net>
11945
11946         * lib/open-safer.c: Include <config.h>.
11947         Otherwise, we'd lose LARGEFILE support in any file using
11948         e.g. "fcntl--.h"
11949
11950 2005-08-25  Bruno Haible  <bruno@clisp.org>
11951
11952         * m4/minmax.m4: Require autoconf 2.52.
11953         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
11954         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
11955         alternatives of translit over the alphabet.
11956         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
11957
11958 2005-08-24  Simon Josefsson  <jas@extundo.com>
11959
11960         * tests/test-getpass.c: New file.
11961
11962 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11963
11964         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
11965         for GNU regex features.
11966
11967 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
11968
11969         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
11970         * lib/regex.h (regerror): Likewise.
11971
11972         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
11973         requires this.  (The code never needed it.)
11974
11975         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
11976         All uses of recently-renamed identifiers changed to use the new,
11977         POSIX-compliant names.  The code will build and run just fine
11978         without these changes, but it's better to eat our own dog food
11979         and use the standard-conforming names.
11980
11981         * lib/regex.h: Fix a multitude of POSIX name space violations.
11982         These changes have an effect only for programs that define
11983         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
11984         do not change anything for programs compiled in the normal way.
11985         Also, there is no effect on the ABI.
11986
11987         (_REGEX_SOURCE): New macro.
11988         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
11989         defined and _GNU_SOURCE is not; this fixes a name space violation.
11990
11991         Rename the following macros to obey POSIX requirements.
11992         The old names are still visible as macros if _REGEX_SOURCE is defined.
11993         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
11994         RE_BACKSLASH_ESCAPE_IN_LISTS.
11995         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
11996         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
11997         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
11998         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
11999         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12000         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12001         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12002         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12003         (REG_INTERVALS): renamed from RE_INTERVALS.
12004         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12005         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12006         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12007         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12008         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12009         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12010         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12011         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12012         RE_UNMATCHED_RIGHT_PAREN_ORD.
12013         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12014         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12015         (REG_DEBUG): renamed from RE_DEBUG.
12016         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12017         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12018         unusual, since we can't clash with the POSIX REG_ICASE.
12019         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12020         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12021         (REG_NO_SUB): renamed from RE_NO_SUB.
12022         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12023         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12024         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12025         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12026         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12027         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12028         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12029         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12030         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12031         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12032         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12033         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12034         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12035         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12036         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12037         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12038         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12039         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12040         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12041         (REG_FIXED): Renamed from REGS_FIXED.
12042         (REG_NREGS): Renamed from RE_NREGS.
12043
12044         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12045         of other REG_* macros, since POSIX says the user is allowed to
12046         #undef these macros selectively.
12047
12048         (reg_errcode_t): Update comment stating what other tables need
12049         to be consistent.
12050
12051         Rename the following enum values to obey POSIX requirements.
12052         The old names are still visible as macros.
12053         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12054         is not defined, since GNU is supposed to be a superset of POSIX as
12055         much as possible, and since we want reg_errcode_t to be a signed
12056         type for implementation consistency.
12057         (_REG_NOERROR): Renamed from REG_NOERROR.
12058         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12059         (_REG_BADPAT): Renamed from REG_BADPAT.
12060         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12061         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12062         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12063         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12064         (_REG_EBRACK): Renamed from REG_EBRACK.
12065         (_REG_EPAREN): Renamed from REG_EPAREN.
12066         (_REG_EBRACE): Renamed from REG_EBRACE.
12067         (_REG_BADBR): Renamed from REG_BADBR.
12068         (_REG_ERANGE): Renamed from REG_ERANGE.
12069         (_REG_ESPACE): Renamed from REG_ESPACE.
12070         (_REG_BADRPT): Renamed from REG_BADRPT.
12071         (_REG_EEND): Renamed from REG_EEND.
12072         (_REG_ESIZE): Renamed from REG_ESIZE.
12073         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12074         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12075         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12076         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12077         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12078
12079         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12080         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12081         changed.  But support the old name if the new one is not defined
12082         and if _REGEX_SOURCE.
12083
12084         Change the following member names in struct re_pattern_buffer.
12085         The old names are still supported if !_REGEX_SOURCE.
12086         The new names are always supported, regardless of _REGEX_SOURCE.
12087         (re_buffer): Renamed from buffer.
12088         (re_allocated): Renamed from allocated.
12089         (re_used): Renamed from used.
12090         (re_syntax): Renamed from syntax.
12091         (re_fastmap): Renamed from fastmap.
12092         (re_translate): Renamed from translate.
12093         (re_can_be_null): Renamed from can_be_null.
12094         (re_regs_allocated): Renamed from regs_allocated.
12095         (re_fastmap_accurate): Renamed from fastmap_accurate.
12096         (re_no_sub): Renamed from no_sub.
12097         (re_not_bol): Renamed from not_bol.
12098         (re_not_eol): Renamed from not_eol.
12099         (re_newline_anchor): Renamed from newline_anchor.
12100
12101         Change the following member names in struct re_registers.
12102         The old names are still supported if !_REGEX_SOURCE.
12103         The new names are always supported, regardless of _REGEX_SOURCE.
12104         (rm_num_regs): Renamed from num_regs.
12105         (rm_start): Renamed from start.
12106         (rm_end): Renamed from end.
12107
12108         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12109         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12110         Prepend __ to parameter names.
12111
12112         Undo yesterday's changes.
12113
12114 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12115
12116         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12117         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12118         lib/regex.c.
12119
12120 2005-08-24  Jim Meyering  <jim@meyering.net>
12121
12122         Sync from coreutils.
12123         * m4/fcntl-safer.m4: New file.
12124
12125         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12126         and object files for this module.
12127
12128 2005-08-24  Jim Meyering  <jim@meyering.net>
12129
12130         Sync from coreutils.
12131         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12132
12133 2005-08-24  Jim Meyering  <jim@meyering.net>
12134
12135         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12136         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12137
12138 2005-08-24  Jim Meyering  <jim@meyering.net>
12139
12140         * modules/fcntl-safer: New module.
12141         * modules/fts (Depends-on): Add fcntl-safer.
12142         * MODULES.html.sh (File descriptor based Input/Output):
12143         Add fcntl-safer.
12144
12145 2005-08-24  Bruno Haible  <bruno@clisp.org>
12146
12147         Support for unit test modules.
12148         * modules/README: Mention tests modules.
12149         * modules/TEMPLATE-TESTS: New file.
12150         * gnulib-tool: New options --extract-tests-module, --with-tests and
12151         --tests-base (unused for the moment).
12152         (testsbase, inctests): New variables.
12153         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12154         (func_verify_module): Exclude TEMPLATE-TESTS.
12155         (func_verify_nontests_module, func_verify_tests_module): New functions.
12156         (func_get_dependencies): Add implicit dependency for tests modules.
12157         (func_get_tests_module): New function.
12158         (func_modules_transitive_closure): When --with-tests was specified,
12159         include the unit tests as well, unless explicitly avoided.
12160         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12161         (func_emit_tests_Makefile_am): New function.
12162         (func_create_testdir): When --with-tests was specified, emit a
12163         tests/ directory.
12164         * MODULES.html.sh (Future developments): Update.
12165
12166 2005-08-24  Bruno Haible  <bruno@clisp.org>
12167
12168         * modules/tls-tests: New file.
12169         * tests/test-tls.c: New file, from GNU gettext.
12170
12171 2005-08-24  Bruno Haible  <bruno@clisp.org>
12172
12173         * modules/lock-tests: New file.
12174         * tests/test-lock.c: New file, from GNU gettext.
12175
12176 2005-08-24  Bruno Haible  <bruno@clisp.org>
12177
12178         * lib/lock.h: Add multiple inclusion guard.
12179         * lib/tls.h: Add multiple inclusion guard.
12180
12181 2005-08-24  Bruno Haible  <bruno@clisp.org>
12182
12183         * gnulib-tool: Add support for the --aux-dir option to
12184         --create-testdir, --create-megatestdir, --test, --megatest.
12185         (func_create_testdir, func_create_megatestdir): Optionally emit a
12186         AC_CONFIG_AUX_DIR directive.
12187         (create-testdir, create-megatestdir, test, megatest): Provide a
12188         default value for $auxdir.
12189
12190 2005-08-24  Bruno Haible  <bruno@clisp.org>
12191
12192         * gnulib-tool (import): Use compound statement instead of subshell
12193         where possible.
12194
12195 2005-08-24  Bruno Haible  <bruno@clisp.org>
12196
12197         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12198
12199 2005-08-24  Bruno Haible  <bruno@clisp.org>
12200
12201         * gnulib-tool (func_version): Update.
12202
12203 2005-08-24  Bruno Haible  <bruno@clisp.org>
12204
12205         * gnulib-tool (func_import, func_create_testdir,
12206         func_create_megatestdir): Quote all autoconf macro arguments.
12207
12208 2005-08-24  Bruno Haible  <bruno@clisp.org>
12209
12210         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12211         option --force, because --force causes the aclocal.m4 of each
12212         subdirectory to be newer than the corresponding config.h.in.
12213
12214 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12215
12216         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12217         All contents moved to gl_REGEX.
12218         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12219         assume that it does.
12220
12221 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12222
12223         * lib/regex.h (REG_NOSYS)
12224         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12225         Define, since POSIX requires it as of 2001.
12226         (_REG_ENOSYS)
12227         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12228         New private symbol, used to keep the enum signed in all cases.
12229         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12230         Youngman in
12231         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12232
12233         * lib/regex_internal.c (re_string_skip_chars, register_state):
12234         (calc_state_hash):
12235         Remove forward decls; no longer needed now that we use prototypes.
12236         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12237         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12238         (clean_state_log_if_needed): Likewise.
12239
12240 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12241
12242         * config/srclist.txt: Add glibc bugs 1231-1233.
12243
12244 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12245
12246         Fix problems reported by Sam Steingold in
12247         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12248         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12249         assumed that reg_errcode_t is a signed type, which is not
12250         necessarily true if _XOPEN_SOURCE is not defined.
12251         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12252         since some compilers warn about it otherwise.
12253
12254 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12255
12256         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12257         (init_word_char, create_initial_state, duplicate_node_closure):
12258         (fetch_token, peek_token_bracket, build_range_exp):
12259         (build_collating_symbol): Remove forward decls; no longer needed
12260         now that we use prototypes.
12261
12262         * lib/regcomp.c:
12263         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12264         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12265         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12266         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12267         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12268         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12269         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12270         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12271         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12272         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12273         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12274         (build_charclass, build_charclass_op, fetch_number, create_tree):
12275         (create_token_tree, mark_opt_subexp, duplicate_tree):
12276         Use prototypes rather than old-style definitions.
12277
12278         * lib/regex_internal.c:
12279         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12280         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12281         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12282         (re_string_reconstruct, re_string_peek_byte_case):
12283         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12284         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12285         (re_node_set_init_copy, re_node_set_add_intersect):
12286         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12287         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12288         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12289         (re_acquire_state, re_acquire_state_context, register_state):
12290         (create_ci_newstate, create_cd_newstate, free_state):
12291         Likewise.
12292         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12293         re_search_2):
12294         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12295         (re_search_internal, prune_impossible_nodes):
12296         (acquire_init_state_context, check_matching, static):
12297         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12298         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12299         (update_regs, sift_states_backward, build_sifted_states):
12300         (clean_state_log_if_needed, merge_state_array):
12301         (update_cur_sifted_state, add_epsilon_src_nodes):
12302         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12303         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12304         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12305         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12306         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12307         (check_arrival, check_arrival_add_next_nodes):
12308         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12309         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12310         (check_node_accept_bytes, check_node_accept, extend_buffers):
12311         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12312         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12313         (sift_ctx_init):
12314         Likewise.
12315
12316         * lib/regex_internal.h:
12317         (re_string_allocate, re_string_construct, re_string_reconstruct):
12318         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12319         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12320         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12321         (re_string_context_at, re_string_peek_byte_case):
12322         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12323         is defined, since we now use prototypes always.
12324
12325         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12326         C89 or better.  All uses removed.
12327
12328 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12329
12330         * config/srclist.txt: Add glibc bugs 1220-1227.
12331
12332 2005-08-20  Jim Meyering  <jim@meyering.net>
12333
12334         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12335         of unused local, dfa.
12336
12337 2005-08-20  Bruno Haible  <bruno@clisp.org>
12338
12339         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12340
12341 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12342
12343         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12344         (re_node_set_insert_last, re_dfa_add_node):
12345         Rename local variables to avoid GCC shadowing warnings.
12346
12347 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12348
12349         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12350         [defined lint]: Suppress bogus uninitialized-variable warnings.
12351
12352         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12353         and let the caller return REG_ESPACE if out of space.  This
12354         removes an uninitialied-variable warning with GCC 4.0.1, and also
12355         avoids taking the address of a local variable.  All callers
12356         changed.
12357
12358 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12359
12360         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12361         $LIBCSRC/posix/regexec.c.
12362         Add glibc bug 1217 for regcomp.c.
12363
12364 2005-08-19  Jim Meyering  <jim@meyering.net>
12365
12366         * lib/regexec.c (proceed_next_node): Redo local variables to
12367         avoid GCC shadowing warnings.
12368
12369 2005-08-18  Bruno Haible  <bruno@clisp.org>
12370
12371         * lib/strstr.c (strstr): Fix return value in multibyte case.
12372         * lib/strcasestr.c (strcasestr): Likewise.
12373
12374 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12375
12376         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12377
12378 2005-08-17  Jim Meyering  <jim@meyering.net>
12379
12380         Make the %s format (seconds since the epoch) work for a negative
12381         number and when used with a zero-padded field width, e.g. %015s.
12382
12383         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12384         label so that it precedes the code to set `digits'.  Otherwise,
12385         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12386         print `00-22'.  Now, it prints `-0022', as it should.
12387
12388 2005-08-17  Bruno Haible  <bruno@clisp.org>
12389
12390         * modules/strstr (Files): Add m4/mbrtowc.m4.
12391         (Depends-on): Add mbuiter.
12392
12393 2005-08-17  Bruno Haible  <bruno@clisp.org>
12394
12395         * modules/strcasestr: New file.
12396         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12397         strcasestr.
12398
12399 2005-08-17  Bruno Haible  <bruno@clisp.org>
12400
12401         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12402
12403 2005-08-17  Bruno Haible  <bruno@clisp.org>
12404
12405         * modules/mbuiter: New file.
12406         * MODULES.html.sh (Extended multibyte and wide character utilities):
12407         Add mbuiter.
12408
12409 2005-08-17  Bruno Haible  <bruno@clisp.org>
12410
12411         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12412         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12413
12414 2005-08-17  Bruno Haible  <bruno@clisp.org>
12415
12416         * m4/strcasestr.m4: New file.
12417
12418 2005-08-17  Bruno Haible  <bruno@clisp.org>
12419
12420         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12421         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12422
12423 2005-08-17  Bruno Haible  <bruno@clisp.org>
12424
12425         * lib/strcasestr.h: New file.
12426         * lib/strcasestr.c: New file.
12427
12428 2005-08-17  Bruno Haible  <bruno@clisp.org>
12429
12430         * lib/strcasecmp.c: Use mbuiter.h.
12431
12432 2005-08-17  Bruno Haible  <bruno@clisp.org>
12433
12434         * lib/mbuiter.h: New file.
12435
12436 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12437
12438         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12439         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12440         and gl_GETOPT are both invoked via different paths (as happens
12441         with GNU tar CVS because it uses both argp and getopt), the former
12442         wins.
12443
12444 2005-08-16  Bruno Haible  <bruno@clisp.org>
12445
12446         * modules/tls: New file.
12447         * MODULES.html.sh (Multithreading): Add tls.
12448
12449 2005-08-16  Bruno Haible  <bruno@clisp.org>
12450
12451         * modules/strnlen1: New file.
12452         * MODULES.html.sh (String handling): Add strnlen1.
12453
12454 2005-08-16  Bruno Haible  <bruno@clisp.org>
12455
12456         * modules/strcase (Files): Add m4/mbrtowc.m4.
12457         (Depends-on): Add strnlen1, mbchar.
12458
12459 2005-08-16  Bruno Haible  <bruno@clisp.org>
12460
12461         * modules/mbiter: New file.
12462         * MODULES.html.sh (Extended multibyte and wide character utilities):
12463         Add mbiter.
12464
12465 2005-08-16  Bruno Haible  <bruno@clisp.org>
12466
12467         * modules/mbfile: New file.
12468         * MODULES.html.sh (Extended multibyte and wide character utilities):
12469         Add mbfile.
12470
12471 2005-08-16  Bruno Haible  <bruno@clisp.org>
12472
12473         * modules/mbchar: New file.
12474         * MODULES.html.sh (Extended multibyte and wide character utilities):
12475         New section.
12476
12477 2005-08-16  Bruno Haible  <bruno@clisp.org>
12478
12479         * m4/tls.m4: New file, from GNU gettext.
12480
12481 2005-08-16  Bruno Haible  <bruno@clisp.org>
12482
12483         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12484         always.
12485         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12486
12487 2005-08-16  Bruno Haible  <bruno@clisp.org>
12488
12489         * m4/mbiter.m4: New file.
12490
12491 2005-08-16  Bruno Haible  <bruno@clisp.org>
12492
12493         * m4/mbfile.m4: New file.
12494
12495 2005-08-16  Bruno Haible  <bruno@clisp.org>
12496
12497         * m4/mbchar.m4: New file.
12498
12499 2005-08-16  Bruno Haible  <bruno@clisp.org>
12500
12501         * lib/tls.h: New file, from GNU gettext.
12502         * lib/tls.c: New file, from GNU gettext.
12503
12504 2005-08-16  Bruno Haible  <bruno@clisp.org>
12505
12506         * lib/strnlen1.h: New file.
12507         * lib/strnlen1.c: New file.
12508
12509 2005-08-16  Bruno Haible  <bruno@clisp.org>
12510
12511         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12512         (mbi_init): Update.
12513         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12514         NUL byte, not after it.
12515
12516 2005-08-16  Bruno Haible  <bruno@clisp.org>
12517
12518         * lib/strcase.h (strcasecmp): Add note in comments.
12519         * lib/strncasecmp.c: Use code from strcasecmp.c.
12520         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12521         (strcasecmp): Work correctly in multibyte locales.
12522
12523 2005-08-16  Bruno Haible  <bruno@clisp.org>
12524
12525         * lib/mbiter.h: New file.
12526
12527 2005-08-16  Bruno Haible  <bruno@clisp.org>
12528
12529         * lib/mbfile.h: New file.
12530
12531 2005-08-16  Bruno Haible  <bruno@clisp.org>
12532
12533         * lib/mbchar.h: New file.
12534         * lib/mbchar.c: New file.
12535
12536 2005-08-16  Bruno Haible  <bruno@clisp.org>
12537
12538         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12539         the valid ones. Makes the comparison operations transitive:
12540         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12541         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12542
12543 2005-08-15  Simon Josefsson  <jas@extundo.com>
12544
12545         * modules/ssize_t (License): Change to 'unlimited'.
12546
12547         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12548
12549 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12550
12551         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12552         Add comments for each pending glibc patch.
12553
12554 2005-08-15  Bruno Haible  <bruno@clisp.org>
12555
12556         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12557         __cplusplus is defined.
12558
12559 2005-08-14  Jim Meyering  <jim@meyering.net>
12560
12561         Sync from coreutils.
12562
12563         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12564         Use the hash-table-based cycle-detection code not just when
12565         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12566         Reported by James Youngman in
12567         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12568         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12569         FTS_TIGHT_CYCLE_CHECK.
12570         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12571         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12572         once again.
12573         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12574         * lib/fts.c (fd_safer): Remove decl.
12575         Include fcntl--.h rather than unistd-safer.h
12576         (fts_safe_changedir): Don't call fd_safer; no longer needed
12577         now that we include fcntl--.h.
12578
12579 2005-08-12  Simon Josefsson  <jas@extundo.com>
12580
12581         * modules/getndelim2: Use ssize_t module.
12582         * modules/getnline: Likewise.
12583         * modules/safe-read: Likewise.
12584         * modules/xreadlink: Likewise.
12585
12586         * modules/ssize_t: New file.
12587
12588 2005-08-12  Simon Josefsson  <jas@extundo.com>
12589
12590         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12591
12592 2005-08-12  Simon Josefsson  <jas@extundo.com>
12593
12594         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12595         ssize_t.
12596
12597 2005-08-12  Simon Josefsson  <jas@extundo.com>
12598
12599         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12600         readline, getdelim and check_version.
12601         (Support for systems lacking ISO C 99: Sizes of integer types):
12602         Add size_max.
12603
12604 2005-08-12  Bruno Haible  <bruno@clisp.org>
12605
12606         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12607
12608 2005-08-11  Simon Josefsson  <jas@extundo.com>
12609
12610         * modules/readline: New file.
12611
12612         * modules/strnlen (Files): Add strnlen.h.
12613
12614 2005-08-11  Simon Josefsson  <jas@extundo.com>
12615
12616         * m4/readline.m4: New file.
12617
12618 2005-08-11  Simon Josefsson  <jas@extundo.com>
12619
12620         * lib/readline.h, readline.c: New file.
12621
12622 2005-08-11  Simon Josefsson  <jas@extundo.com>
12623
12624         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12625         gl_AVOID.
12626
12627 2005-08-11  Bruno Haible  <bruno@clisp.org>
12628
12629         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12630
12631 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12632
12633         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12634
12635 2005-08-10  Simon Josefsson  <jas@extundo.com>
12636
12637         * tests/test-iconvme.c: New file.
12638
12639 2005-08-10  Simon Josefsson  <jas@extundo.com>
12640
12641         * m4/strnlen.m4: New file.
12642
12643         * m4/strndup.m4: Don't check for strnlen declaration, done in
12644         strnlen.m4.
12645
12646 2005-08-10  Simon Josefsson  <jas@extundo.com>
12647
12648         * lib/strndup.c: Use strnlen.h.
12649
12650         * lib/strnlen.h: New file.
12651
12652 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12653
12654         * README: Typos.
12655
12656 2005-08-02  Simon Josefsson  <jas@extundo.com>
12657
12658         * modules/readline: New file.
12659
12660 2005-08-02  Simon Josefsson  <jas@extundo.com>
12661
12662         * modules/getdelim: New file.
12663
12664         * modules/getline: Rewrite, don't use getndelim2.
12665
12666 2005-08-02  Simon Josefsson  <jas@extundo.com>
12667
12668         * m4/getline.m4: Separate out getdelim stuff into separate module.
12669
12670         * m4/getdelim.m4: New file.
12671
12672 2005-08-02  Simon Josefsson  <jas@extundo.com>
12673
12674         * lib/getline.h, getline.c: Rewrite.
12675
12676         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12677
12678 2005-07-31  Bruno Haible  <bruno@clisp.org>
12679
12680         * lib/lock.h (gl_lock_initializer): New macro.
12681         (gl_lock_define_initialized): Use it.
12682         (gl_rwlock_initializer): New macro.
12683         (gl_rwlock_define_initialized): Use it.
12684         (gl_recursive_lock_initializer): New macro.
12685         (gl_recursive_lock_define_initialized): Use it.
12686
12687 2005-07-30  Karl Berry  <karl@gnu.org>
12688
12689         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12690         Report from Ben Pfaff, regarding getopt.
12691
12692 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12693
12694         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12695         normal way.
12696         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12697         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12698         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12699         (gl_GETOPT): Use the new macros.  Most of the implementation
12700         is moved to the new macros.  This is for programs like Emacs
12701         that don't want all the functionality of gl_GETOPT.
12702
12703 2005-07-26  Bruno Haible  <bruno@clisp.org>
12704
12705         * m4/lock.m4: Update from GNU gettext.
12706
12707 2005-07-26  Bruno Haible  <bruno@clisp.org>
12708
12709         * lib/lock.h: Update from GNU gettext.
12710         * lib/lock.c: Update from GNU gettext.
12711
12712 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12713
12714         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12715         obsolescent AC_TRY_RUN.  Include the default includes files, for
12716         'exit'.
12717
12718 2005-07-24  Bruno Haible  <bruno@clisp.org>
12719
12720         * modules/visibility: New file.
12721         * MODULES.html.sh (Misc): Add visibility.
12722
12723 2005-07-24  Bruno Haible  <bruno@clisp.org>
12724
12725         * m4/visibility.m4: New file.
12726
12727 2005-07-24  Bruno Haible  <bruno@clisp.org>
12728
12729         * doc/visibility.texi: New file.
12730
12731 2005-07-22  Bruno Haible  <bruno@clisp.org>
12732
12733         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12734         $(ALLOCA_H), redundant through BUILT_SOURCES.
12735         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12736         redundant through BUILT_SOURCES.
12737         * modules/byteswap (Makefile.am): Remove explicit dependency on
12738         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12739         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12740         $(FNMATCH_H), redundant through BUILT_SOURCES.
12741         * modules/getopt (Makefile.am): Remove explicit dependency on
12742         $(GETOPT_H), redundant through BUILT_SOURCES.
12743         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12744         redundant through BUILT_SOURCES.
12745         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12746         redundant through BUILT_SOURCES.
12747         * modules/stdbool (Makefile.am): Remove explicit dependency on
12748         $(STDBOOL_H), redundant through BUILT_SOURCES.
12749         * modules/stdint (Makefile.am): Remove explicit dependency on
12750         $(STDINT_H), redundant through BUILT_SOURCES.
12751         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12752         Remove explicit dependency on $(SYSEXITS_H).
12753         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12754
12755 2005-07-18  Simon Josefsson  <jas@extundo.com>
12756
12757         * lib/check-version.c (check_version): Accept identical versions too.
12758
12759 2005-07-18  Bruno Haible  <bruno@clisp.org>
12760
12761         * modules/lock: New file.
12762         * MODULES.html.sh (Multithreading): New section.
12763
12764 2005-07-18  Bruno Haible  <bruno@clisp.org>
12765
12766         * m4/lock.m4: New file, from GNU gettext.
12767
12768 2005-07-18  Bruno Haible  <bruno@clisp.org>
12769
12770         * lib/lock.h: New file, from GNU gettext.
12771         * lib/lock.c: New file, from GNU gettext.
12772
12773 2005-07-18  Bruno Haible  <bruno@clisp.org>
12774
12775         * lib/lock.h (gl_once_t): New type.
12776         (gl_once_define, gl_once): New macros.
12777         * lib/lock.c (fresh_once): New variable.
12778         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12779         functions.
12780
12781 2005-07-16  Simon Josefsson  <jas@extundo.com>
12782
12783         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12784         workaround, suggested by Bruno.
12785
12786 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12787
12788         * modules/xalloc (Depends-on): Add xalloc-die.
12789         * modules/xvasprintf (Depends-on): Add xalloc-die.
12790
12791 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12792
12793         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12794         with a minor change.
12795
12796 2005-07-15  Bruno Haible  <bruno@clisp.org>
12797
12798         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12799         When using lib/poll.c, define poll as rpl_poll.
12800
12801 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12802
12803         * modules/argp (Depends-on): Remove unlocked-io.
12804
12805 2005-07-14  Derek Price  <derek@ximbiot.com>
12806
12807         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12808         for glob symlink bug.
12809
12810 2005-07-14  Bruno Haible  <bruno@clisp.org>
12811
12812         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12813         Instead, test for *_unlocked function declarations directly.
12814
12815 2005-07-11  Simon Josefsson  <jas@extundo.com>
12816
12817         * modules/size_max: New file.
12818
12819         * modules/xsize: Depend on size_max module for size_max.m4.
12820
12821 2005-07-11  Simon Josefsson  <jas@extundo.com>
12822
12823         * lib/size_max.h: New file.
12824
12825 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12826
12827         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12828         copyright symbol and the year.
12829         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12830         (version_etc_va): Use parameterized copyright notice.
12831         Reword to conform to the current GNU coding standards.
12832
12833 2005-07-11  Karl Berry  <karl@gnu.org>
12834
12835         * doc/gnulib.texi (Quoting): new node.
12836         (Initial import): more info, from Patrice.
12837
12838 2005-07-11  Bruno Haible  <bruno@clisp.org>
12839
12840         * gnulib-tool (func_usage): Document option --avoid.
12841         (Command line options): Handle --avoid.
12842         (func_acceptable): New function.
12843         (func_modules_transitive_closure): Use it.
12844
12845 2005-07-11  Bruno Haible  <bruno@clisp.org>
12846
12847         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12848         Reported by Jim Meyering.
12849
12850 2005-07-10  Bruno Haible  <bruno@clisp.org>
12851
12852         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12853         Needed when size_t is smaller than 'unsigned int'.
12854         Reported by Paul Eggert.
12855
12856 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12857
12858         * modules/argp (Depends-on): Add unlocked-io
12859
12860 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
12861
12862         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
12863         block of defines.
12864
12865 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
12866
12867         * config/srclist.txt: Comment out regcomp.c, since we have a porting
12868         fix now.
12869
12870 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
12871         and Paul Eggert  <eggert@cs.ucla.edu>
12872
12873         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
12874         in wint_t, not wchar_t.  Remove now-unnecessary cast.
12875
12876 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12877
12878         * modules/regex (Files): Add lib/regex_internal.c,
12879         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
12880         (Depends-on): Add extensions.
12881         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
12882
12883 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12884
12885         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
12886         pathconf.
12887         * m4/same.m4 (gl_SAME): Likewise.
12888         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
12889
12890         * m4/regex.m4: Adjust to new libc regex implementation.
12891         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
12892         all the .c and .h parts of (the new) regex.
12893         Quote the m4 stuff better.
12894         Check for RE_ICASE bug of old gnulib.
12895         Check for REG_STARTEND of recent libc.
12896         Rename local variables from jm_* to gl_*.
12897         Quote operand of "test -f".
12898         Say "recent enough" version of libc, not "version 2".
12899         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
12900         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
12901         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
12902         Remove check for btowc, isascii.
12903         Require AM_LANGINFO_CODESET.
12904
12905 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12906
12907         * lib/regex.c, regex.h: Sync from libc.
12908         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
12909         * lib/regexec.c:
12910         New files, synced from libc, except that regex_internal.h
12911         currently has a small porting fix.
12912
12913 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
12914
12915         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
12916         regex_internal.c, regexec.c.
12917         Add regex_internal.h too, but as a comment, since the libc version
12918         is currently broken in gnulib mode.
12919
12920 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
12921
12922         Support programs like Emacs that use gnulib but not gettext.
12923         * MODULES.html.sh (Internationalization functions): Add gettext-h.
12924         * modules/gettext-h: New file.
12925         * modules/gettext (Files): Remove lib/gettext.h.
12926         (Depends-on): Add gettext-h.
12927         (Makefile.am): Remove lib_SOURCES.
12928         * modules/argmatch, modules/c-stack, modules/closeout:
12929         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
12930         * modules/execute, modules/file-type, modules/getaddrinfo:
12931         * modules/getopt, modules/human, modules/javacomp:
12932         * modules/javaexec, modules/mkdir-p, modules/obstack:
12933         * modules/openat, modules/pagealign_alloc, modules/pipe:
12934         * modules/quotearg, modules/regex, modules/rpmatch:
12935         * modules/unicodeio, modules/userspec, modules/version-etc:
12936         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
12937         * modules/xsetenv:
12938         Depend on gettext-h, not gettext.
12939
12940 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
12941
12942         * gnulib-tool (func_import): Add support for 'public domain' license.
12943         * modules/alloca, modules/atexit, modules/memmove:
12944         Now public domain, not GPL.
12945         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
12946         * modules/realloc, modules/strerror, modules/strtod:
12947         Now LGPL, not GPL.
12948
12949 2005-07-05  Bruno Haible  <bruno@clisp.org>
12950
12951         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
12952         autoconf CVS. Needed for mingw.
12953
12954 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12955
12956         Remove the dependency of the strftime module on the tzset module.
12957         * modules/strftime (Depends-on): Remove dependency on tzset.
12958
12959 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12960
12961         Remove the dependency of the strftime module on the tzset module.
12962         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
12963         gl_FUNC_TZSET_CLOBBER.
12964
12965 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
12966
12967         Remove the dependency of the strftime module on the tzset module.
12968         * lib/strftime.c (my_strftime)
12969         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
12970         Copy the input structure, to work around some of the bug with
12971         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
12972         Solaris releases, you should also use the tzset module, but we won't
12973         require it as a dependency any more since we don't want LGPLed code
12974         to depend on GPLed code.
12975
12976 2005-07-02  Jim Meyering  <jim@meyering.net>
12977
12978         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
12979         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
12980         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
12981         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
12982
12983 2005-07-02  Jim Meyering  <jim@meyering.net>
12984
12985         * lib/backupfile.c (backup_args): Change a `0' to NULL.
12986
12987 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
12988
12989         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
12990         declares only 'struct timespec;' (!).
12991
12992 2005-07-01  Jim Meyering  <jim@meyering.net>
12993
12994         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
12995         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
12996         * lib/save-cwd.c, tempname.c:
12997         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
12998         and don't include <sys/file.h>).
12999
13000 2005-06-29  Jim Meyering  <jim@meyering.net>
13001
13002         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13003         type name.  Use the variable name instead.
13004         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13005         Likewise.
13006
13007 2005-06-28  Simon Josefsson  <jas@extundo.com>
13008
13009         * modules/check-version (Files): Add check-version.m4.
13010
13011 2005-06-28  Simon Josefsson  <jas@extundo.com>
13012
13013         * m4/check-version.m4: New file, suggested by Jim Meyering
13014         <jim@meyering.net>.
13015
13016 2005-06-28  Simon Josefsson  <jas@extundo.com>
13017
13018         * lib/check-version.h, lib/check-version.c: New files.
13019
13020 2005-06-28  Simon Josefsson  <jas@extundo.com>
13021
13022         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13023         collision with global variable.  Better indentation.  Don't
13024         increment buffer pointer beyond buffer end.  Based on comments
13025         from Paul Eggert <eggert@cs.ucla.edu>.
13026
13027         * lib/base64.h: Indent.
13028
13029 2005-06-28  Simon Josefsson  <jas@extundo.com>
13030
13031         * doc/gnulib.texi (Library version handling): New section.
13032
13033 2005-06-28  Jim Meyering  <jim@meyering.net>
13034
13035         * check-module (find_included_lib_files): Hard-code another
13036         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13037         but modules/fts-lgpl (correctly) does not list those files.
13038
13039         * modules/canonicalize (Files): Add lib/pathmax.h.
13040
13041 2005-06-25  Simon Josefsson  <jas@extundo.com>
13042
13043         * modules/check-version: New file.
13044
13045 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13046
13047         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13048         initializer of struct addrinfo, as an indication that we don't
13049         care how many members the structure has.
13050
13051 2005-06-24  Derek Price  <derek@ximbiot.com>
13052         and Bruno Haible  <bruno@clisp.org>
13053
13054         Remove stat module & update lstat.
13055         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13056         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13057         * m4/stat.m4: Remove this file.
13058
13059 2005-06-24  Derek Price  <derek@ximbiot.com>
13060         and Bruno Haible  <bruno@clisp.org>
13061
13062         Remove stat module & update lstat.
13063         * lib/stat.c: Remove this file...
13064         (slash_aware_lstat): ...moving this content and its support...
13065         * lib/lstat.c (rpl_lstat): ...into here.
13066         * lib/lstat.h: New file.
13067
13068 2005-06-24  Derek Price  <derek@ximbiot.com>
13069         and Bruno Haible  <bruno@clisp.org>
13070
13071         Remove stat module & update lstat.
13072         * config/srclist.txt (libc sources): Remove stat.
13073
13074 2005-06-24  Derek Price  <derek@ximbiot.com>
13075         and Bruno Haible  <bruno@clisp.org>
13076
13077         Remove stat module & update lstat.
13078         * MODULES.html.sh (stat): Remove.
13079         * MODULES.html: Regenerated.
13080         * modules/lstat (Description): Correct function name.
13081         (Files): Add "lstat.h".
13082         (Depends-on): Remove stat, add xalloc, stat-macros.
13083         * modules/stat: Remove this file.
13084         (Include): Add "lstat.h", remove <sys/stat.h>.
13085
13086 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13089         (ranged_convert): Don't save conversion in a temporary struct.
13090         This causes a warning with GCC 4.0.0, and anyway in the typical
13091         case it's not worth the extra 100 bytes or so of code.
13092         (ranged_convert, __mktime_internal): When calling a function via a
13093         pointer P, use P () rather than (*P) (), as we now assume C89 or
13094         better.
13095
13096 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13097
13098         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13099         "who -r" failed to give output.  Problem reported by Tim Waugh.
13100
13101         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13102         (xcalloc): Use it to avoid needless tests.
13103         Problem reported by Jim Meyering.
13104
13105 2005-06-20  Derek Price  <derek@ximbiot.com>
13106
13107         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13108         unnecessary for Autoconfs > 2.59c.
13109
13110 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13111
13112         * lib/argp.h (__option_is_short): Check upper limit of
13113         __key. Isprint() requires its argument to have the value
13114         of an unsigned char or EOF.
13115
13116 2005-06-16  Jim Meyering  <jim@meyering.net>
13117
13118         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13119         when either N or S is zero.
13120
13121 2005-06-16  Derek Price  <derek@ximbiot.com>
13122
13123         * m4/bison.m4: Declare YACC & YFLAGS precious.
13124
13125 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13126
13127         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13128         multibyte string or pattern, fall back on unibyte matching.
13129         Problem reported by James Youngman.
13130
13131 2005-06-08  Bruno Haible  <bruno@clisp.org>
13132
13133         * modules/csharpcomp: New file.
13134         * MODULES.html.sh (C#): Add csharpcomp.
13135
13136 2005-06-08  Bruno Haible  <bruno@clisp.org>
13137
13138         * m4/csharpcomp.m4: New file, from GNU gettext.
13139
13140 2005-06-08  Bruno Haible  <bruno@clisp.org>
13141
13142         * lib/csharpcomp.h: New file, from GNU gettext.
13143         * lib/csharpcomp.c: New file, from GNU gettext.
13144         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13145
13146 2005-06-08  Bruno Haible  <bruno@clisp.org>
13147
13148         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13149         warning on mingw.
13150
13151 2005-06-07  Derek Price  <derek@ximbiot.com>
13152
13153         Sync from CVS.
13154         * lib/glob_.h: Indent nested #ifdef.
13155
13156 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13157
13158         Sync from coreutils.
13159         Use "file name" when talking about file names, instead of "filename"
13160         or "path", as per the GNU coding standards.
13161         * lib/mkdir-p.c: Renamed from makepath.c.
13162         (make_dir_parents): Renamed from make_path.  All callers changed.
13163         * lib/mkdir-p.h: Likewise.  All includers changed.
13164         * lib/filenamecat.c: Renamed from path-concat.c.
13165         (file_name_concat): Renamed from path_concat.  All callers changed.
13166         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13167         * lib/filenamecat.h: Likewise.  All includers changed.
13168         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13169         in comments or local variable names.
13170         * lib/basename.c: Likewise.
13171         * lib/canonicalize.c, canonicalize.h: Likewise.
13172         * lib/dirname.c, dirname.h: Likewise.
13173         * lib/euidaccess.c: Likewise.
13174         * lib/exclude.c: Likewise
13175         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13176         * lib/fsusage.c, fsuage.h: Likewise.
13177         * lib/fts.c, fts_.h: Likewise.
13178         * lib/getcwd.c: Likewise.
13179         * lib/getloadavg.c: Likewise.
13180         * lib/mkstemp.c: Likewise.
13181         * lib/mountlist.c, mountlist.h: Likewise.
13182         * lib/openat.c, openat.h: Likewise.
13183         * lib/readlink-stub.c: Likewise.
13184         * lib/readutmp.c, readutmp.h: Likewise.
13185         * lib/rename.c: Likewise.
13186         * lib/rmdir.c: Likewise.
13187         * lib/same.c: Likewise.
13188         * lib/savedir.c: Likewise.
13189         * lib/stripslash.c: Likewise.
13190         * lib/tempname.c: Likewise.
13191         * lib/xreadlink.c: Likewise.
13192         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13193         All uses changed.
13194         * lib/exclude.h: Likewise.
13195
13196         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13197         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13198         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13199         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13200         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13201         files have been getting away with it for years (MORE/BSD 4.3
13202         is extinct now).
13203         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13204         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13205
13206         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13207         Define to 256, not 255, as per modern POSIX.
13208
13209 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13210
13211         Sync from coreutils.
13212         Use "file name" when talking about file names, instead of "filename"
13213         or "path", as per the GNU coding standards.
13214         * MODULES.html.sh: mkdir-p renamed from makepath.
13215         filenamecat renamed from path-concat.
13216         * modules/filenamecat: Renamed from modules/path-concat.
13217         (Files): filenamecat.h and filenamecat.c renamed from
13218         path-concat.h and path-concat.c.
13219         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13220         (Include): filenamecat.h, not path-concat.h.
13221         * modules/mkdir-p: Renamed from modules/makepath.
13222         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13223         makepath.c.
13224         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13225         (Include): mkdir-p.h, not makepath.h.
13226
13227 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13228
13229         Sync from coreutils.
13230         * m4/mkdir-p.m4: Renamed from makepath.m4.
13231         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13232         Rename files from makepath.c to mkdir-p.c, and from
13233         makepath.h to mkdir-p.h.
13234         * m4/filenamecat.m4: Renamed from path-concat.m4.
13235         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13236         Rename files from path-concat.c to filenamecat.c,
13237         and from path-concat.h to filenamecat.h.
13238         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13239         "file name" in local variables or comments.
13240         * m4/rename.m4: Likewise.
13241
13242 2005-06-01  Bruno Haible  <bruno@clisp.org>
13243
13244         * modules/csharpexec: New file.
13245         * MODULES.html.sh (C#): New section.
13246
13247 2005-06-01  Bruno Haible  <bruno@clisp.org>
13248
13249         * m4/csharp.m4: New file, from GNU gettext.
13250         * m4/csharpexec.m4: New file, from GNU gettext.
13251
13252 2005-06-01  Bruno Haible  <bruno@clisp.org>
13253
13254         * lib/csharpexec.h: New file, from GNU gettext.
13255         * lib/csharpexec.c: New file, from GNU gettext.
13256         * lib/csharpexec.sh.in: New file, from GNU gettext.
13257
13258 2005-05-31  Derek Price  <derek@ximbiot.com>
13259             Paul Eggert  <eggert@cs.ucla.edu>
13260
13261         Sync from cvs.
13262         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13263
13264 2005-05-31  Derek Price  <derek@ximbiot.com>
13265             Paul Eggert  <eggert@cs.ucla.edu>
13266
13267         Sync from cvs.
13268         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13269
13270 2005-05-29  Derek Price  <derek@ximbiot.com>
13271
13272         * config/srclist.txt (glob_.h, glob.c): Add these files.
13273
13274 2005-05-29  Derek Price  <derek@ximbiot.com>
13275
13276         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13277         * modules/glob: New file.
13278         * modules/getlogin_r: Add link to POSIX spec in description.
13279
13280 2005-05-29  Derek Price  <derek@ximbiot.com>
13281             Paul Eggert  <eggert@cs.ucla.edu>
13282
13283         * m4/glob.m4: New file.
13284
13285 2005-05-29  Derek Price  <derek@ximbiot.com>
13286             Paul Eggert  <eggert@cs.ucla.edu>
13287
13288         * lib/glob_.h, lib/glob.c: New files.
13289
13290 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13291
13292         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13293         * modules/fts-lgpl (Depends-on): Remove gettext.
13294
13295 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13296
13297         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13298         and don't require gt_INTTYPES_PRI.
13299
13300 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13301
13302         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13303
13304         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13305         the configuration hassle isn't worth it.
13306         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13307         (LONGEST_MODIFIER, PRIuMAX): Remove.
13308
13309 2005-05-27  Bruno Haible  <bruno@clisp.org>
13310
13311         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13312
13313 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13314
13315         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13316         _POSIX_PTHREAD_SEMANTICS for Solaris.
13317
13318 2005-05-25  Derek Price  <derek@ximbiot.com>
13319
13320         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13321
13322 2005-05-25  Derek Price  <derek@ximbiot.com>
13323             Paul Eggert  <eggert@cs.ucla.edu>
13324
13325         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13326         * lib/getlogin_r.c, getlogin_r.h: New files.
13327
13328 2005-05-25  Bruno Haible  <bruno@clisp.org>
13329             Derek Price  <derek@ximbiot.com>
13330
13331         * lib/getlogin_r.h: Simplify API documentation.
13332
13333 2005-05-23  Derek Price  <derek@ximbiot.com>
13334
13335         * modules/minmax (Files): Add m4/minmax.m4.
13336         (configure.ac): Add gl_MINMAX.
13337
13338 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13339
13340         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13341         so that unistd-safer.h (GPL'ed code) need not be included.
13342
13343 2005-05-22  Bruno Haible  <bruno@clisp.org>
13344
13345         * m4/minmax.m4: New file.
13346         Based on a patch by Derek Price <derek@ximbiot.com>.
13347
13348 2005-05-22  Bruno Haible  <bruno@clisp.org>
13349
13350         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13351         (INT64_MIN): Fix definition.
13352         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13353
13354         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13355         NEED_SIGNED_INT_TYPES.
13356
13357         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13358         HAVE_SYSTEM_INTTYPES.
13359
13360 2005-05-22  Bruno Haible  <bruno@clisp.org>
13361
13362         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13363         Also include <sys/param.h> if it defines MIN, MAX.
13364         Based on a patch by Derek Price <derek@ximbiot.com>.
13365
13366 2005-05-21  Jim Meyering  <jim@meyering.net>
13367
13368         * modules/fts (Files): Add m4/inttypes-pri.m4.
13369         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13370
13371 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13372
13373         New fts module.
13374         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13375         (setup_dir, free_dir): New functions.
13376         (enter_dir, leave_dir): Define trivial
13377         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13378         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13379         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13380         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13381         Move to fts-cycle.c.
13382         (fts_open): Use setup_dir.
13383         (fts_close): Use free_dir.
13384         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13385         This adds a label and some gotos, but the alternatives were messier.
13386         Check for memory allocation failure when entering a dir.
13387         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13388         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13389         (FTS): New member fts_cycle, that is a union that contains the
13390         old active_dir_ht and cycle_state.  All uses changed to mention
13391         fts_cycle.ht and fts_cycle.state.
13392         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13393         fts.c, with the following changes:
13394         (setup_dir, free_dir): New functions.
13395         (enter_dir): Now returns bool.  Return true if successful, false
13396         if memory exhausted.  All callers changed.
13397         Do not bother partly cleaning up on
13398         memory allocation failure; that is free_dir's job.
13399         However, free ad if hash_insert fails, to avoid memory leak.
13400         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13401         fts->fts_options to see which union member to use.
13402
13403 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13404
13405         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13406         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13407
13408 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13411
13412 2005-05-20  Jim Meyering  <jim@meyering.net>
13413
13414         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13415         Now a macro, to pacify GCC.
13416
13417 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13418
13419         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13420         of -1.
13421
13422 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13423
13424         * lib/chown.c (rpl_chown): Return -1 on failure.
13425
13426 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13427
13428         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13429         Don't check for stddef.h.
13430         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13431         don't use its results.
13432         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13433         since we include them unconditionally.  Don't require
13434         AM_STDBOOL_H, since stdbool is a prerequisite.
13435         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13436         since we assume C89 or better.
13437         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13438         as we don't use their results.
13439         Don't check for fchdir, memmove, memset, strrchr, as we use
13440         them unconditionally.
13441         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13442         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13443
13444 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13445
13446         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13447         Include <stddef.h> unconditionally, since we assume C89 now.
13448         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13449         * lib/fts.c: Include fts_.h first, to check interface.
13450         Do not include intprops.h; no longer needed.
13451         Include cycle-check.h and hash.h, since fts_.h no longer does.
13452         Remove unnecessary casts of closedir to void.
13453         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13454         decide whether to decrement nlinks.
13455         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13456         (FTS): Use struct hash_table * instead of Hash_table, so that
13457         we no longer need to include hash.h here.
13458
13459 2005-05-18  Jim Meyering  <jim@meyering.net>
13460
13461         * modules/dirfd (License): Change to LGPL.  Most of the code
13462         is already in the public domain.
13463
13464 2005-05-18  Jim Meyering  <jim@meyering.net>
13465
13466         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13467         Reported by Yoann Vandoorselaere.
13468
13469 2005-05-17  Jim Meyering  <jim@meyering.net>
13470
13471         * m4/fts.m4: New file, from coreutils.
13472
13473 2005-05-17  Jim Meyering  <jim@meyering.net>
13474
13475         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13476
13477 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13478
13479         Sync from coreutils.
13480         * m4/unlinkdir.m4: New file.
13481
13482 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13483
13484         Sync from coreutils.
13485         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13486         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13487         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13488         White space changes only.
13489         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13490         special.
13491         * lib/yesno.c: Include getline.h, not ctype.h.
13492         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13493         Use getline to remove arbitrary restriction on response length.
13494
13495 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13496
13497         * config/srclist-update: Spell out "Street" in FSF postal
13498         mail address; this is the style the FSF seems to prefer.
13499
13500         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13501         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13502         this updates FSF postal mail address.
13503
13504         Sync from coreutils.
13505         * modules/unlinkdir: New file.
13506         * modules/yesno (Depends-on): Add getline.
13507         * MODULES.html.sh (File system functions): Add unlinkdir.
13508
13509 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13510
13511         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13512         lib/strsep.h:
13513         Change the initial comment to refer to GPL, not LGPL.
13514         gnulib-tool will change it to LGPL as needed.
13515
13516         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13517         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13518         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13519         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13520         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13521         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13522         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13523         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13524         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13525         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13526         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13527         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13528         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13529         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13530         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13531         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13532         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13533         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13534         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13535         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13536         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13537         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13538         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13539         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13540         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13541         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13542         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13543         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13544         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13545         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13546         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13547         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13548         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13549         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13550         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13551         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13552         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13553         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13554         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13555         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13556         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13557         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13558         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13559         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13560         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13561         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13562         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13563         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13564         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13565         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13566         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13567         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13568         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13569         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13570         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13571         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13572         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13573         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13574         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13575         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13576         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13577         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13578         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13579         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13580         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13581         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13582         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13583         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13584         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13585         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13586         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13587         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13588         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13589         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13590         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13591         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13592         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13593         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13594         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13595         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13596         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13597         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13598         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13599         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13600         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13601         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13602         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13603         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13604         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13605         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13606         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13607         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13608         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13609         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13610         lib/yesno.c, lib/yesno.h:
13611         Update FSF postal mail address.
13612
13613 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13614
13615         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13616         tests/test-memmem.c, tests/test-stpncpy.c:
13617         Update FSF postal mail address.
13618
13619 2005-05-13  Bruno Haible  <bruno@clisp.org>
13620
13621         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13622         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13623         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13624         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13625         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13626         Add support for 64-bit integers in the MSVC compiler.
13627
13628 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13629
13630         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13631
13632 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13633
13634         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13635
13636 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13637
13638         * doc/getdate.texi (General date syntax): Don't say that date
13639         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13640         Problem reported by Nic Ferrier.
13641
13642 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13643
13644         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13645         specified in ai_socktype. Fix invalid ai_protocol
13646         check. ai_protocol is usually set to 0 or depending on
13647         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13648         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13649         ai_socktype / ai_protocol in the returned addrinfo structure.
13650
13651 2005-05-10  Simon Josefsson  <jas@extundo.com>
13652
13653         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13654         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13655
13656 2005-05-10  Karl Berry  <karl@gnu.org>
13657
13658         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13659         (from http://www.gnu.org/licenses).
13660         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13661         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13662         fdl.texi suffices.
13663
13664 2005-05-10  Karl Berry  <karl@gnu.org>
13665
13666         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13667         (COPYING.DOC): remove.
13668
13669         * config/srclist-update: new FSF address.
13670
13671 2005-05-10  Derek Price  <derek@ximbiot.com>
13672
13673         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13674         possible.
13675
13676 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13677             Bruno Haible  <bruno@clisp.org>
13678
13679         * modules/inet_ntop: New file.
13680         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13681         inet_ntop.
13682
13683 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13684             Bruno Haible  <bruno@clisp.org>
13685
13686         * m4/inet_ntop.m4: New file.
13687
13688 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13689             Bruno Haible  <bruno@clisp.org>
13690
13691         * lib/inet_ntop.h: New file.
13692         * lib/inet_ntop.c: New file, from glibc with modifications.
13693
13694 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13695
13696         * modules/time_r (License): Change to LGPL.
13697         * modules/extensions (License): Change to LGPL.  Actually,
13698         the license is more permissive than that, but currently gnulib-tool
13699         doesn't know how to handle more-permissive licenses.
13700
13701         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13702         Problem reported by Dave Love.
13703
13704 2005-05-08  Jim Meyering  <jim@meyering.net>
13705
13706         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13707         blank.
13708
13709 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13710
13711         * modules/argmatch (Depends-on): Add stdbool.
13712         * modules/backupfile (Depends-on): Likewise.
13713         * modules/chdir-long (Depends-on): Likewise.
13714         * modules/closeout (Depends-on): Likewise.
13715         * modules/cycle-check (Depends-on): Likewise.
13716         * modules/dirname (Depends-on): Likewise.
13717         * modules/fnmatch (Depends-on): Likewise.
13718         * modules/fsusage (Depends-on): Likewise.
13719         * modules/fwriteerror (Depends-on): Likewise.
13720         * modules/getcwd (Depends-on): Likewise.
13721         * modules/getloadavg (Depends-on): Likewise.
13722         * modules/hard-locale (Depends-on): Likewise.
13723         * modules/makepath (Depends-on): Likewise.
13724         * modules/mountlist (Depends-on): Likewise.
13725         * modules/nanosleep (Depends-on): Likewise.
13726         * modules/posixtm (Depends-on): Likewise.
13727         * modules/quotearg (Depends-on): Likewise.
13728         * modules/readtokens (Depends-on): Likewise.
13729         * modules/readtokens0 (Depends-on): Likewise.
13730         * modules/readutmp (Depends-on): Likewise.
13731         * modules/save-cwd (Depends-on): Likewise.
13732         * modules/strftime (Depends-on): Likewise.
13733         * modules/userspec (Depends-on): Likewise.
13734         * modules/utimecmp (Depends-on): Likewise.
13735         * modules/xgetcwd (Depends-on): Likewise.
13736         * modules/xnanosleep (Depends-on): Likewise.
13737         * modules/xstrtod (Depends-on): Likewise.
13738         * modules/yesno (Depends-on): Likewise.
13739
13740 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13741
13742         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13743         needless checks.
13744
13745 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13746
13747         Merge from coreutils.  Among other things,
13748         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13749         * lib/fd-safer.c: New file.
13750         * lib/fcntl-safer.h, open-safer.c: Remove.
13751         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13752         * lib/dup-safer.c: Include unistd-safer.h first.
13753         Don't include errno.h.
13754         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13755         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13756         * lib/file-type.c: Rely on file-type.h change.
13757         * lib/getloadavg.c: Include unistd-safer.h.
13758         (getloadavg): Use safer open.
13759         * lib/getusershell.c: Include "stdio-safer.h".
13760         (getusershell): Use safer fopen.
13761         * lib/long-options.c (long_options): Use NULL rather than 0.
13762         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13763         'free'.
13764         * lib/modechange.c: Likewise.
13765         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13766         (MODE_DONE): New constant.
13767         (struct mode_change): Remove 'next' member.
13768         (make_node_op_equals): New function; like the old one of the
13769         same name, except it allocates an array.
13770         (mode_compile, mode_create_from_ref): Use it.
13771         (mode_compile): Allocate result as an array, not a linked list.
13772         Parse octal string ourself, so that we catch mistakes like "+0".
13773         (mode_adjust): Arg is an array, not a linked list.
13774         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13775         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13776         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13777         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13778         Remove.  This is now stat-macros.h's job.
13779         (talloc): Remove.  All callers replaced by xalloc, so that
13780         our invokers don't have to worry about reporting memory failures.
13781         (make_node_op_equals): Remove.
13782         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13783         New constants.
13784         (struct mode_change): Moved here from modechange.h.
13785         (mode_append_entry): Remove.
13786         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13787         apps to have incorrect behavior.  Use simpler algorithm for head
13788         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13789         Detect more invalid usages rather than having somewhat-random behavior.
13790         Don't insert an "a=" action, as that leads to incorrect behavior.
13791         (mode_compile, mode_create_from_ref): Return NULL on error instead
13792         of an enum, since now there's only one way to have an error.  All
13793         callers changed.
13794         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13795         at the correct time.  Simplify calculation of "+u" and its ilk.
13796         Don't mishandle "+X".
13797         (mode_free): Remove "register" and localize decls.
13798         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13799         (struct mode_change): Move to modechange.c; callers don't
13800         need to see this stuff.
13801         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13802         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13803         (mode_change, mode_adjust): Reflect the new signatures noted above.
13804         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13805         that might redefine system include files.
13806         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13807         (my_usleep): Use NULL rather than (void *) 0.
13808         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13809         Use siginterrupt to specify that system calls should be interrupted.
13810         (rpl_nanosleep): Move initialization of suspended closer to call of
13811         my_usleep.
13812         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13813         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13814         (desirable_utmp_entry): New function.
13815         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13816         using x2nrealloc, to simplify logic.
13817         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13818         size calculation.  Do not assume utmp file is a regular file.
13819         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13820         (READ_UTMP_CHECK_PIDS): New constant.
13821         * lib/save-cwd.c: Include unistd-safer.h.
13822         (save_cwd): Use fd_safer.
13823         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13824         [!_LIBC] Include "stat-macros.h" instead.
13825         * lib/unistd-safer.h (fd_safer): New decl.
13826
13827 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13828
13829         * modules/getloadavg (Depends-on): Add unistd-safer.
13830         * modules/getusershell (Depends-on): Add stdio-safer.
13831         * modules/lstat (Depends-on): Remove xalloc.
13832         * modules/mkstemp (Depends-on): Add stat-macros.
13833         * modules/modechange (Depends-on): Remove xstrtol.
13834         Add stat-macros, xalloc.
13835         * modules/save-cwd (Depends-on): Add unistd-safer.
13836         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13837         * modules/unistd-safer (Files): Add lib/fd-safer.c
13838         (Makefile.am): Remove lib_SOURCES.
13839
13840         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13841         Remove fcntl-safer; unistd-safer supersedes it.
13842
13843 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13844
13845         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13846         AC_HEADER_STAT.
13847         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13848         (gl_PREREQ_CHOWN): Remove.
13849         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13850         it.  Don't require AC_HEADER_STAT.
13851         (gl_PREREQ_LSTAT): Remove.
13852         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13853         Don't require AC_HEADER_STAT.
13854         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13855         (gl_PREREQ_RMDIR): Remove.
13856         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
13857         mention stat-macros.h or AC_HEADER_STAT, since we'll make
13858         the stat-macros module a prerequisite.
13859         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
13860         * m4/filemode.m4 (gl_FILEMODE): Likewise.
13861         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
13862         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
13863         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
13864         variable names.
13865         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
13866         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
13867         variable prefixes.
13868         * m4/fcntl-safer.m4: Remove.
13869         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
13870         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
13871         Invoke gl_PREREQ_FD_SAFER.
13872         (gl_PREREQ_FD_SAFER): New macro.
13873         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
13874         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
13875         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
13876         Remove duplicate call to AC_LIBOBJ(readutmp).
13877         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
13878
13879         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
13880         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
13881
13882 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * MODULES.html.sh (Misc): Add byteswap.
13885
13886 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13887
13888         * modules/getcwd (Depends-on): Add extensions.
13889         * modules/openat (Depends-on): Likewise.
13890
13891 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13892
13893         * modules/byteswap: New file.
13894
13895 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13896
13897         * m4/byteswap.m4: New file.
13898
13899 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
13900
13901         * lib/byteswap_.h: New file.
13902
13903 2005-04-25  Karl Berry  <karl@gnu.org>
13904
13905         * m4/gettext.m4: Update from GNU gettext 0.14.4.
13906
13907 2005-04-25  Albert Chin  <china@thewrittenword.com>
13908
13909         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
13910         Toolkit C bug.
13911
13912 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
13913
13914         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
13915         (func_ln_if_changed) Remove forcibly for no error message
13916         in case file does not exist.
13917
13918 2005-04-19  Simon Josefsson  <jas@extundo.com>
13919
13920         * gnulib-tool (Options): Make --symlink mean --symbolic.
13921
13922 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
13923
13924         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
13925
13926 2005-04-16  Simon Josefsson  <jas@extundo.com>
13927
13928         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
13929
13930 2005-04-15  Simon Josefsson  <jas@extundo.com>
13931
13932         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
13933
13934 2005-04-15  Simon Josefsson  <jas@extundo.com>
13935
13936         * gnulib-tool: Rename --symlink to --symbolic.
13937
13938 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
13939
13940         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
13941         symbolic links to files instead of copying/moving.  Add --aux-dir,
13942         specifying directory relative --dir where auxiliary build tools
13943         are placed.
13944
13945 2005-04-14  Bruno Haible  <bruno@clisp.org>
13946
13947         * modules/allocsa (License): Change to LGPL.
13948         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
13949
13950 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
13951
13952         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
13953         that "UTC +1 second" continues to work.  Problem reported
13954         by Dmitry V. Levin.
13955         (relunit_snumber): New rule.
13956         (relunit): Use it.
13957
13958 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
13959
13960         * lib/getdate.y (universal_time_zone_table): New constant.
13961         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
13962         universal_time_zone_table.
13963         (lookup_zone): Prefer universal_time_zone_table to
13964         local_time_zone_table, so that "GMT" time stamps are allowed in
13965         London during the summer.  Problem reported by Ian Abbott.
13966
13967 2005-04-12  Jim Meyering  <jim@meyering.net>
13968
13969         * lib/human.c (humblock): Set *options even when returning due to
13970         xstrtoumax conversion failure.  Thanks to a used-uninitialized
13971         warning from gcc-4.
13972
13973 2005-04-09  Jim Meyering  <jim@meyering.net>
13974
13975         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
13976         -Wuninitialized: initialize tm0.tm_year.
13977
13978 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
13979
13980         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
13981         count, since there's no maximum.  All uses changed.
13982         Add member dsts_seen.
13983         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
13984         not being INT_MAX.
13985         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
13986         Use pc_rels_seen to decide whther a date is absolute.
13987
13988         * lib/getdate.y (number): Don't overwrite year.
13989         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
13990         check.
13991
13992 2005-04-02  Simon Josefsson  <jas@extundo.com>
13993
13994         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
13995         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
13996
13997 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
13998
13999         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14000         where no absolute path name can be longer than PATH_MAX.
14001
14002 2005-03-27  Jim Meyering  <jim@meyering.net>
14003
14004         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14005
14006 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14007
14008         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14009         "one's complement" -> "ones' complement" in comment, as per Knuth.
14010         "value of type" -> "type or expression" in comment.
14011         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14012
14013 2005-03-26  Jim Meyering  <jim@meyering.net>
14014
14015         Comment nits.
14016         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14017         Correct typos: s/or/of/.
14018
14019 2005-03-26  Jim Meyering  <jim@meyering.net>
14020
14021         * modules/check-include-files: Move to ../ and rename to...
14022         * check-module: ...this.
14023
14024 2005-03-25  Jim Meyering  <jim@meyering.net>
14025
14026         * modules/xvasprintf (Files): Add xalloc.h.
14027
14028 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14029
14030         * modules/gettext (Files): config/config.rpath ->
14031         build-aux/config.rpath
14032         * modules/iconv (Files): Likewise.
14033         Problem reported by Oskar Liljeblad.
14034
14035 2005-03-23  Jim Meyering  <jim@meyering.net>
14036
14037         * modules/check-include-files: New script to check for
14038         missing dependencies, multiple includes, etc.
14039
14040         * modules/c-strtold (Depends-on): Add xalloc.
14041         * modules/c-strtod (Depends-on): Add xalloc.
14042         * modules/hash (Depends-on): Add xalloc.
14043         (Files): Remove lib/xalloc.h.
14044
14045         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14046         * modules/userspec (Files): Add lib/inttostr.h.
14047
14048 2005-03-23  Jim Meyering  <jim@meyering.net>
14049
14050         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14051
14052 2005-03-22  Jim Meyering  <jim@meyering.net>
14053
14054         * modules/stat-macros: New module.
14055         * modules/canonicalize, modules/euidaccess, modules/file-type,
14056         * modules/filemode, modules/lchown, modules/makepath,
14057         * modules/rmdir, modules/stat: Depend on new stat-macros module
14058         rather than listing lib/stat-macros.h manually.
14059         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14060
14061 2005-03-22  Jim Meyering  <jim@meyering.net>
14062
14063         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14064
14065 2005-03-22  Bruno Haible  <bruno@clisp.org>
14066
14067         * config/srclist.txt: Replace target directory 'config' with
14068         'build-aux'.
14069         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14070         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14071         ../build-aux/.
14072
14073 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14074
14075         * modules/chdir-long (Depends-on): Add mempcpy.
14076
14077         * modules/acl, modules/backupfile, modules/c-strtod,
14078         modules/c-strtold, modules/canon-host, modules/canonicalize,
14079         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14080         modules/exclude, modules/exitfail, modules/file-type,
14081         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14082         modules/getdate, modules/getline, modules/getpagesize,
14083         modules/getpass, modules/getugroups, modules/group-member,
14084         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14085         modules/inttostr, modules/long-options, modules/makepath,
14086         modules/md5, modules/memcasecmp, modules/memcoll,
14087         modules/modechange, modules/mountlist, modules/path-concat,
14088         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14089         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14090         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14091         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14092         modules/strftime, modules/strndup, modules/strverscmp,
14093         modules/timespec, modules/unlocked-io, modules/userspec,
14094         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14095         modules/yesno:
14096         Remove lib_SOURCES line from Makefile.am section, as this is now
14097         done automatically by the corresponding Autoconf macro.
14098
14099 2005-03-21  Jim Meyering  <jim@meyering.net>
14100
14101         Changes imported from coreutils.
14102
14103         * lib/cycle-check.c: Don't include xalloc.h.
14104
14105         * lib/path-concat.c: Don't include assert.h.
14106         (path_concat): Remove assertion that would have triggered
14107         for ABASE starting with more than one slash.
14108         Reported by Andreas Schwab.
14109
14110         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14111         properly when ABASE is an absolute file name.
14112         Correct the description of this function.
14113         Include <assert.h>.
14114         Add an assertion and a test driver.
14115         This fixes a bug introduced on 2004-07-02.
14116         Andreas Schwab reported the resulting failure of cp --parents:
14117         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14118
14119 2005-03-21  Jim Meyering  <jim@meyering.net>
14120
14121         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14122         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14123
14124 2005-03-21  Jim Meyering  <jim@meyering.net>
14125         and  Paul Eggert  <eggert@cs.ucla.edu>
14126
14127         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14128         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14129         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14130         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14131         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14132         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14133         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14134         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14135         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14136         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14137         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14138         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14139         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14140         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14141         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14142         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14143         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14144         for these modules.
14145
14146 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14147
14148         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14149         (which shouldn't happen), generate nothing instead of returning 0
14150         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14151
14152 2005-03-16  Bruno Haible  <bruno@clisp.org>
14153
14154         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14155         HAVE_LONGLONG_64BIT.
14156
14157 2005-03-16  Bruno Haible  <bruno@clisp.org>
14158
14159         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14160         HAVE_LONGLONG_64BIT.
14161
14162 2005-03-16  Bruno Haible  <bruno@clisp.org>
14163
14164         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14165         HAVE_LONGLONG_64BIT.
14166
14167 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14168
14169         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14170         reliably distinguish strftime failure from empty output on POSIX
14171         hosts.
14172
14173 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14174
14175         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14176         (iconv_string): Don't guess a size-zero buffer, as that might cause
14177         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14178         result would be 'too large', where 'too large' is (heuristically)
14179         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14180         overflow concerns.  This will prevent some unwanted malloc failures
14181         when the inputs are very large.
14182
14183 2005-03-15  Karl Berry  <karl@gnu.org>
14184
14185         * config/srclist.txt (config.rpath): from gettext.
14186         * config/config.rpath: update.
14187
14188 2005-03-15  Bruno Haible  <bruno@clisp.org>
14189
14190         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14191         to 'negate'.
14192
14193         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14194         variable.
14195
14196         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14197         results.
14198
14199 2005-03-14  Simon Josefsson  <jas@extundo.com>
14200
14201         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14202         <fx@gnu.org>.
14203
14204 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14205
14206         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14207         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14208         intprops.h.
14209         * lib/strtol.c: Likewise.
14210
14211 2005-03-14  Jim Meyering  <jim@meyering.net>
14212
14213         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14214         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14215         to be nonzero so that we (and caller) can detect the difference
14216         between a valid zero-length expansion and an error return, even
14217         when the underlying strftime fails before writing anything into
14218         that location.
14219
14220 2005-03-14  Bruno Haible  <bruno@clisp.org>
14221
14222         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14223         Update from GNU gettext 0.14.3.
14224
14225 2005-03-10  Jim Meyering  <jim@meyering.net>
14226
14227         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14228
14229 2005-03-10  Jim Meyering  <jim@meyering.net>
14230
14231         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14232         so that this module works on systems without fchdir.
14233
14234 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14235
14236         Factor int-properties macros into a single file, except for
14237         glibc-related files.
14238         * lib/intprops.h: New file.
14239         * lib/getloadavg.c: Include it instead of limits.h.
14240         (INT_STRLEN_BOUND): Remove.
14241         * lib/human.c: Include intprops.h.
14242         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14243         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14244         302/1000.
14245         * lib/inttostr.h: Include intprops.h instead of limits.h.
14246         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14247         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14248         for consistency with intprops.h.
14249         (time_t_is_integer, twos_complement_arithmetic): Use them.
14250         * lib/sig2str.h: Include <signal.h>, intprops.h.
14251         (INT_STRLEN_BOUND): Remove.
14252         * lib/strftime.c (TYPE_SIGNED): Remove.
14253         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14254         * lib/strtol.c: Adjust comments to match intprops.h.
14255         * lib/userspec.c: Include intprops.h.
14256         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14257         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14258         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14259         instead of rolling our own expressions.
14260         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14261
14262         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14263         instead of int.
14264         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14265         the right thing even if adding 1900 would overflow.  Similarly
14266         for tm_mon + 1 and tm_yday + 1.
14267         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14268         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14269         (DO_SIGNED_NUMBER): New macro.
14270         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14271
14272 2005-03-07  Bruno Haible  <bruno@clisp.org>
14273
14274         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14275
14276 2005-03-07  Bruno Haible  <bruno@clisp.org>
14277
14278         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14279
14280 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14281
14282         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14283         (func_import): Only replace files via --import when they have actually
14284         changed.
14285
14286 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14287
14288         * m4/mmap-anon.m4: New file.
14289         * m4/pagealign_alloc.m4: New file.
14290
14291 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14292             Bruno Haible  <bruno@clisp.org>
14293
14294         * modules/pagealign_alloc: New file.
14295         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14296
14297 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14298             Bruno Haible  <bruno@clisp.org>
14299
14300         * lib/pagealign_alloc.h: New file.
14301         * lib/pagealign_alloc.c: New file.
14302
14303 2005-03-03  Bruno Haible  <bruno@clisp.org>
14304
14305         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14306         Use an all-permissive copyright notice, recommended by RMS.
14307
14308 2005-03-02  Bruno Haible  <bruno@clisp.org>
14309
14310         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14311         of AIX, the replacement has to be done only after <string.h> is
14312         included, therefore not in config.h. stpncpy.h does the replacement,
14313         and stpncpy.c uses it.
14314
14315 2005-03-02  Bruno Haible  <bruno@clisp.org>
14316
14317         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14318         stpncpy.c uses it.
14319
14320 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14321
14322         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14323         The workaround isn't strictly needed for POSIX conformance, and
14324         it's too much of a pain to configure and maintain.  We'll ask
14325         people to fix their kernels instead.
14326         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14327         (NANOSLEEP_BUG_WORKAROUND): Remove.
14328         (xnanosleep): Remove the workaround.
14329
14330 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14331
14332         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14333         Reported by Derek Price.
14334         (Include): Add "timespec.h".
14335
14336         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14337
14338 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14339
14340         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14341         to detect nanosleep bug.
14342
14343 2005-03-01  Bruno Haible  <bruno@clisp.org>
14344
14345         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14346
14347 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14348
14349         * modules/gethrxtime: New file.
14350         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14351         (Depends-on): Add gethrxtime.
14352         (configure.ac): Add gl_XNANOSLEEP.
14353         (Makefile.am): Remove lib_SOURCES line.
14354
14355 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14356
14357         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14358         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14359
14360 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14361
14362         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14363         * lib/timespec.h (gettime): Return void, since it always
14364         succeeds now.  All uses changed.
14365         * lib/gettime.c (gettime) Likewise.
14366         [HAVE_NANOTIME]: Prefer nanotime.
14367         Assume gettimeofday succeeds, as POSIX requires.
14368         Assime time () succeeds, since other code already does.
14369         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14370         (timespec_subtract): Remove.
14371         (NANOSLEEP_BUG_WORKAROUND): New constant.
14372         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14373         things considerably.  Use it only on GNU/Linux hosts, since the
14374         workaround shouldn't be needed elsewhere.
14375
14376 2005-02-24  Bruno Haible  <bruno@clisp.org>
14377
14378         * modules/gettext (Files): Add m4/glibc2.m4.
14379
14380 2005-02-24  Bruno Haible  <bruno@clisp.org>
14381
14382         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14383         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14384         * m4/progtest.m4:
14385         Update from GNU gettext 0.14.2.
14386         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14387
14388 2005-02-24  Bruno Haible  <bruno@clisp.org>
14389
14390         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14391         * lib/config.charset: Update from GNU gettext 0.14.2.
14392
14393 2005-02-24  Bruno Haible  <bruno@clisp.org>
14394
14395         * lib/gettext.h: Update from GNU gettext 0.14.2.
14396
14397 2005-02-23  Simon Josefsson  <jas@extundo.com>
14398
14399         * m4/iconvme.m4: New file.
14400
14401 2005-02-23  Jim Meyering  <jim@meyering.net>
14402
14403         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14404         change.
14405         Thanks to Bruno Haible for catching it.
14406
14407 2005-02-22  Simon Josefsson  <jas@extundo.com>
14408
14409         * modules/iconvme: New file.
14410
14411         * MODULES.html.sh: Add iconvme.
14412
14413 2005-02-22  Simon Josefsson  <jas@extundo.com>
14414
14415         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14416
14417 2005-02-22  Simon Josefsson  <jas@extundo.com>
14418
14419         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14420
14421 2005-02-22  Jim Meyering  <jim@meyering.net>
14422
14423         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14424         s/ifndef/ifdef/.
14425
14426 2005-02-20  Neil Conway  <neilc@samurai.com>
14427
14428         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14429         returned by OSX/Darwin if the specified buffer is not large
14430         enough for the hostname.
14431
14432 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14433
14434         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14435         pass it to _help, otherwise the latter coredumps trying to
14436         dereference state.root_argp.
14437
14438 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14439
14440         * modules/chdir-long (Depends-on): Add memrchr.
14441         * modules/memrchr (Files): Add lib/memrchr.h.
14442         (Include): "memrchr.h".
14443
14444 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14445
14446         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14447
14448 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14449
14450         * lib/memrchr.h: New file.
14451         * lib/chdir-long.c: Include it.
14452         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14453         Don't bother including stddef.h.
14454
14455 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14456
14457         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14458         inclusion.
14459         Include <sys/types.h>, for dev_t.
14460         (ME_DUMMY, ME_REMOTE): Move from here....
14461         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14462         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14463         Dmitry V. Levin.
14464         Include mountlist.h first, to test the interface.
14465
14466 2005-01-29  Bruno Haible  <bruno@clisp.org>
14467
14468         * lib/progname.c (program_name): Initialize.
14469         Needed when linking statically on MacOS X.
14470
14471 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14472
14473         Sync from coreutils.
14474         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14475         (Depends-on): Add c-strtod.
14476         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14477
14478 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14479
14480         Sync from coreutils.
14481         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14482
14483         Remove files that are specific to coreutils.
14484         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14485
14486 2005-01-28  Bruno Haible  <bruno@clisp.org>
14487
14488         * modules/javacomp: New file.
14489         * MODULES.html.sh (Java): Add javacomp.
14490
14491 2005-01-28  Bruno Haible  <bruno@clisp.org>
14492
14493         * m4/javacomp.m4: New file, from GNU gettext.
14494
14495 2005-01-28  Bruno Haible  <bruno@clisp.org>
14496
14497         * lib/javacomp.sh.in: New file, from GNU gettext.
14498         * lib/javacomp.h: New file, from GNU gettext.
14499         * lib/javacomp.c: New file, from GNU gettext.
14500
14501 2005-01-26  Simon Josefsson  <jas@extundo.com>
14502
14503         * lib/gai_strerror.c: Use GPL in header.
14504
14505 2005-01-26  Bruno Haible  <bruno@clisp.org>
14506
14507         * modules/javaexec: New file.
14508         * MODULES.html.sh (Java): Add javaexec.
14509
14510 2005-01-26  Bruno Haible  <bruno@clisp.org>
14511
14512         * m4/javaexec.m4: New file, from GNU gettext.
14513
14514 2005-01-26  Bruno Haible  <bruno@clisp.org>
14515
14516         * lib/javaexec.sh.in: New file, from GNU gettext.
14517         * lib/javaexec.h: New file, from GNU gettext.
14518         * lib/javaexec.c: New file, from GNU gettext.
14519
14520 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14521
14522         * modules/lchown (Depends-on): Remove lchown.h
14523
14524 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14525
14526         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14527         must be defined if the header file was not found, in order
14528         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14529
14530 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14531
14532         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14533         initializers for struct pentry_state.
14534         (__argp_error): Check return value of __asprintf
14535         (__argp_failure): Translate error message
14536
14537         * lib/argp-parse.c: Removed braces around the expansion of N_()
14538
14539 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14540
14541         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14542         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14543         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14544         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14545         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14546         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14547         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14548         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14549         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14550         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14551         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14552         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14553         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14554         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14555         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14556         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14557         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14558         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14559         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14560         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14561         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14562         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14563         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14564         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14565         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14566         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14567         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14568         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14569         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14570         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14571         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14572         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14573         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14574         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14575         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14576         Use an all-permissive copyright notice, recommended by RMS.
14577
14578 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14579
14580         * modules/chdir-long (Depends-on): Remove mempcpy.
14581
14582 2005-01-21  Jim Meyering  <jim@meyering.net>
14583
14584         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14585         same value as for Solaris 9.
14586
14587         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14588         component length.  This included changing the parameter to be
14589         of type `char *' rather than `char const *'.
14590         * lib/chdir-long.h (chdir_long): Update prototype.
14591
14592         * lib/openat.c (fdopendir, fstatat): New functions.
14593         * lib/openat.h: Include headers required for use of DIR and struct
14594         stat.
14595         [AT_SYMLINK_NOFOLLOW]: Define.
14596         (fdopendir, fstatat): Add prototypes.
14597
14598 2005-01-21  Bruno Haible  <bruno@clisp.org>
14599
14600         * modules/classpath: New file.
14601         * MODULES.html.sh (Java): Add classpath.
14602
14603 2005-01-21  Bruno Haible  <bruno@clisp.org>
14604
14605         * lib/classpath.h: New file, from GNU gettext.
14606         * lib/classpath.c: New file, from GNU gettext.
14607
14608 2005-01-20  Simon Josefsson  <jas@extundo.com>
14609
14610         * modules/version-etc-fsf: New file.
14611
14612 2005-01-20  Simon Josefsson  <jas@extundo.com>
14613
14614         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14615         * lib/version-etc.c: Remove version_etc_copyright.
14616         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14617         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14618
14619 2005-01-20  Simon Josefsson  <jas@extundo.com>
14620
14621         * lib/base64.h (isbase64): Add.
14622
14623         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14624         using a unsigned prototype, don't inline.
14625         (base64_decode): Use it.
14626
14627 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14628
14629         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14630         it.
14631
14632 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14633
14634         * lib/save-cwd.c (save_cwd): Remove code to support the case
14635         where fchdir is missing or flaky.
14636
14637 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14638
14639         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14640
14641 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14642
14643         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14644         AC_LIBSOURCES now does this.
14645         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14646         with new ullong_max module.
14647
14648 2005-01-19  Bruno Haible  <bruno@clisp.org>
14649
14650         * modules/sh-quote: New file.
14651         * MODULES.html.sh (Executing programs): Add sh-quote.
14652
14653 2005-01-19  Bruno Haible  <bruno@clisp.org>
14654
14655         * lib/sh-quote.h: New file, from GNU gettext.
14656         * lib/sh-quote.c: New file, from GNU gettext.
14657
14658 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14659
14660         Merge from coreutils.
14661         * m4/ullong_max.m4: New file.
14662         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14663         (gl_MACROS): Assume localeconv exists.
14664
14665 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14666
14667         Merge changes from coreutils, as described below in several
14668         changelogs dated today.
14669
14670         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14671         (O_DIRECTORY): Remove; not needed here, since "." must be
14672         a directory.  All uses removed.
14673         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14674         universal on Suns, and we also need to test for IRIX.
14675         Revamp code to use 'if' rather than '#if'.
14676         Avoid unnecessary comparison of cwd->desc to 0.
14677
14678         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14679         for known valid error numbers rather than observed invalid ones.
14680
14681 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14682
14683         * modules/ullong_max: New file.
14684
14685         * modules/chdir-long, modules/openat: New files.
14686         * modules/save-cwd (Depends-on): Depend on chdir-long.
14687         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14688
14689 2005-01-18  Jim Meyering  <jim@meyering.net>
14690
14691         Merge from coreutils.
14692         * m4/chdir-long.m4, m4/openat.m4: New files.
14693         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14694         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14695         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14696         is sane and DOES follow symlinks.  Besides, testing 20 different
14697         systems found no broken chown implementations.
14698         Prompted by a change in rsync's copy of this macro.
14699         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14700
14701         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14702
14703         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14704         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14705         NULL-means-set-to-current-time semantics.
14706         Remove temporary file immediately, rather than waiting
14707         for configure's at-exit trap code to do it.
14708
14709 2005-01-18  Jim Meyering  <jim@meyering.net>
14710
14711         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14712
14713         * lib/utimens.c (futimens): Account for the fact that futimes
14714         can also fail with errno == ENOSYS or errno == ENOENT.
14715         Patch from Dmitry V. Levin.
14716
14717         Change the name of the robust chdir function from chdir to chdir_long.
14718         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14719         (restore_cwd): Use chdir_long, not chdir.
14720         * lib/chdir-long.c: Renamed from chdir.c.
14721         * lib/chdir-long.h: Renamed from chdir.h.
14722         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14723         Hurd.
14724
14725 2005-01-18  Bruno Haible  <bruno@clisp.org>
14726
14727         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14728         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14729         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14730         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14731         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14732         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14733         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14734         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14735         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14736         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14737         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14738         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14739         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14740         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14741         Use an all-permissive copyright notice, recommended by RMS.
14742
14743 2005-01-18  Bob Proulx  <bob@proulx.com>
14744
14745         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14746         simplify offsetof() macro construct to avoid compile failure with
14747         native HP-UX 11.0 ANSI C compiler.
14748
14749 2005-01-17  Bruno Haible  <bruno@clisp.org>
14750
14751         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14752         redundant because stpncpy.m4 takes care of it.
14753
14754 2005-01-17  Bruno Haible  <bruno@clisp.org>
14755
14756         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14757
14758 2005-01-17  Bruno Haible  <bruno@clisp.org>
14759
14760         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14761         used.
14762
14763 2005-01-17  Bruno Haible  <bruno@clisp.org>
14764
14765         * lib/fwriteerror.h (fwriteerror): Change specification to include
14766         fclose.
14767         * lib/fwriteerror.c: Include <stdbool.h>.
14768         (fwriteerror): At the end, close the file stream. Record whether
14769         stdout was already closed.
14770
14771 2005-01-17  Bruno Haible  <bruno@clisp.org>
14772
14773         * lib/execute.c (environ): Declare if needed.
14774         * lib/pipe.c (environ): Likewise.
14775         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14776
14777 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14778
14779         * modules/argp: Depend on vsnprintf
14780
14781 2005-01-10  Jim Meyering  <jim@meyering.net>
14782
14783         * modules/closeout (Depends-on): Add atexit.
14784
14785 2005-01-06  Bruno Haible  <bruno@clisp.org>
14786
14787         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14788
14789 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14790
14791         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14792         definitions to be after all include files, to avoid collisions.
14793         Problem reported by Bob Proulx.
14794
14795 2005-01-04  Jim Meyering  <jim@meyering.net>
14796
14797         Changes imported from coreutils.
14798         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14799         as the mkstemp template, use a temporary directory and an
14800         8.3-friendly template to avoid trouble on systems like DJGPP.
14801         Reported by Juan M. Guerrero via Stepan Kasal.
14802         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14803         close. Remove the temporary directory right away, rather than waiting
14804         for configure's at-exit trap code to do it.
14805         Suggestion from Stepan Kasal.
14806
14807 2005-01-01  Simon Josefsson  <jas@extundo.com>
14808
14809         * gnulib-tool: Print #include directives when --import'ing.
14810
14811 2004-12-28  Simon Josefsson  <jas@extundo.com>
14812
14813         * tests/test-base64.c: Include required header files.  Remove
14814         unused variables.
14815
14816 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14817
14818         * modules/error (Depends-on): Remove gettext.
14819
14820 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14821
14822         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14823         not needed.  This removes a dependency on the gettext module.
14824         [defined _LIBC]: Do not include <libintl.h>; not needed.
14825
14826 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14827
14828         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14829         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14830
14831 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14832
14833         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14834         HAVE_DECL_STRTOLD.
14835
14836 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14837
14838         * modules/getdate (Depends-on): Remove alloca-opt.
14839
14840 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14841
14842         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14843
14844 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14845
14846         * lib/argp-parse.c: Include <stddef.h>.
14847         (alignof, alignto): New macros.
14848         (parser_init): Don't assume that void * is aligned sufficiently
14849         for struct option.
14850
14851         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14852         need to extend the stack.
14853         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14854         large.
14855
14856 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14857
14858         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
14859
14860 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14861
14862         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
14863         (2004-10-24) change.  Apparently this was a false alarm.
14864
14865         * modules/getdate: Depend on alloca-opt, not alloca.
14866
14867 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
14868
14869         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
14870         Remove now-obsolete comment about AIX.
14871         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
14872         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
14873         (YYMAXDEPTH): New macro.
14874
14875 2004-12-18  Simon Josefsson  <jas@extundo.com>
14876
14877         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
14878
14879 2004-12-18  Bruno Haible  <bruno@clisp.org>
14880
14881         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
14882
14883 2004-12-18  Bruno Haible  <bruno@clisp.org>
14884
14885         * lib/fatal-signal.c (fatal_signals): Make non-const.
14886         (init_fatal_signals): New function.
14887         (uninstall_handlers, install_handlers): Ignore signals that were set to
14888         SIG_IGN.
14889         (at_fatal_signal): Call init_fatal_signals.
14890         (init_fatal_signal_set): Likewise. Ignore signals that were set to
14891         SIG_IGN.
14892         Reported by Paul Eggert.
14893
14894 2004-12-18  Bruno Haible  <bruno@clisp.org>
14895
14896         * doc/alloca.texi: New file.
14897         * doc/alloca-opt.texi: New file.
14898
14899 2004-12-17  Jim Meyering  <jim@meyering.net>
14900
14901         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
14902         Otherwise, install-sh could exit with improper exit status when
14903         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
14904
14905 2004-12-16  Simon Josefsson  <jas@extundo.com>
14906
14907         * tests/test-base64.c: Add license.
14908
14909 2004-12-15  Stepan Kasal  <address@hidden>
14910
14911         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
14912
14913 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
14914
14915         * modules/getcwd (Files): Add m4/d-ino.m4.
14916         Suggested by Mark D. Baushke.
14917
14918 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14919
14920         * lib/getdate.y (textint): New member "negative".
14921         (time_zone_hhmm): New function.
14922         Expect 14 shift-reduce conflicts, not 13.
14923         (o_colon_minutes): New rule.
14924         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
14925         (yylex): Set the "negative" member of signed numbers.
14926
14927 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
14928
14929         * doc/getdate.texi (Time of day items, Time zone items):
14930         Describe new formats +00:00, UTC+00:00.
14931
14932 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
14933
14934         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
14935         spurious "-l"s.  Problem reported by Stepan Kasal.
14936
14937 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
14938
14939         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
14940         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
14941
14942 2004-12-04  Simon Josefsson  <jas@extundo.com>
14943
14944         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
14945         Vandoorselaere <yoann@prelude-ids.org>.
14946
14947 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14948
14949         Changes imported from coreutils.
14950         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
14951         exist.
14952         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
14953
14954 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14955
14956         Changes imported from coreutils.
14957         * lib/hard-locale.c: Assume <locale.h> exists.
14958         Include "strdup.h".
14959         (GLIBC_VERSION): New macro.
14960         (hard_locale): Assume setlocale exists.
14961         Rewrite to avoid #ifdef.
14962         Use strdup rather than malloc + strcpy.
14963         * lib/human.c: Assume <locale.h> exists.
14964         (human_readable): Assume localeconv exists.
14965
14966 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
14967
14968         * modules/hard-locale (Depends-on): Add strdup.
14969
14970 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
14971
14972         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
14973         convert T2, not T.  (Imported from libc.)
14974
14975 2004-11-30  Simon Josefsson  <jas@extundo.com>
14976
14977         * modules/restrict (License): Change to LGPL.
14978
14979 2004-11-30  Simon Josefsson  <jas@extundo.com>
14980
14981         * m4/restrict.m4: Add copyright and copying conditions.
14982
14983 2004-11-30  Simon Josefsson  <jas@extundo.com>
14984
14985         * m4/base64.m4: New file.
14986
14987 2004-11-30  Simon Josefsson  <jas@extundo.com>
14988
14989         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
14990         base64.
14991
14992         * tests/test-base64.c: New file.
14993
14994         * modules/base64: New file.
14995
14996 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
14997
14998         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
14999         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15000
15001         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15002
15003 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15006         (__getcwd.c): Don't restore errno; glibc doesn't.
15007         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15008         first, falling back to our code only if its results look suspicious.
15009         Ensure that the resulting buffer is only as large as necessary.
15010
15011         * lib/readutmp.c: Include readutmp.h first.
15012         Include <errno.h>, since readutmp.h no longer does that.
15013         * lib/readutmp.h: Don't include <errno.h>,
15014         <sys/param.h>, <time.h>; not needed to establish interface.
15015         (errno): Remove decl.
15016         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15017         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15018         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15019
15020 2004-11-28  Simon Josefsson  <jas@extundo.com>
15021
15022         * lib/base64.h, base64.c: New file.
15023
15024 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15025
15026         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15027
15028 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15029
15030         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15031         (Depends-on): Remove pathmax, same.  Add mempcpy.
15032         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15033         (Makefile.am): Append getcwd.h to lib_SOURCES.
15034         (Include): Add getcwd.h.
15035         (Maintainer): Change from Jim Meyering to "all, glibc",
15036         since getdate now uses intended-for-glibc code.
15037         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15038         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15039
15040 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15041
15042         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15043         HP's ANSI C compiler.
15044         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15045         Declaring int functions causes warnings on some modern systems and
15046         shouldn't be needed to compile on ancient ones.
15047         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15048         defined.
15049
15050         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15051         with the following changes.
15052         (__set_errno): Parenthesize properly.
15053         Include <stdbool.h>.
15054         (MIN, MAX, MATCHING_INO): New macros.
15055         (__getcwd): Define with prototype, not K&R form.
15056         Use heuristics to allocate default buffer on stack if possible.
15057         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15058         behavior, and to avoid the PATH_MAX limit when computing
15059         ../../../../...
15060         Use MATCHING_INO to compare inode number to file.
15061         Check for arithmetic overflow in size calculations.
15062         Fix bug in reallocation of dot array that caused getcwd to fail
15063         on directories nested deeper than 75.
15064         Be more careful about saving errno on error.
15065         Do not use realloc; use only free+malloc, as this is a bit
15066         more flexible and avoids a needless copy operation.
15067         Do not inspect st_dev and st_ino for symbolic links; POSIX
15068         doesn't specify the latter.
15069         Check for closedir errors.
15070         Avoid needless casts.
15071         Use "#ifdef weak_alias" around weak_alias, to be like other
15072         glibc code.
15073         The following changes to getcwd.c have effect only when used in
15074         gnulib; they have no effect inside glibc proper.
15075         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15076         as alloca isn't used.
15077         (alloca, __alloca): Likewise.
15078         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15079         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15080         unconditionally, as gnulib assumes C89 or better.
15081         Do not include <sys/param.h>.
15082         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15083         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15084         better.
15085         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15086         Include <dirent.h> in a way that is compatible with modern Autoconf.
15087         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15088         New macros, if not already defined.
15089         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15090         Use "_LIBC", not "defined _LIBC", for consistency.
15091         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15092         a mempcpy module.
15093         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15094         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15095         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15096         credit only to Jim Meyering and adjust the copyright dates.
15097         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15098         <stdlib.h>, <unistd.h>, "pathmax.h".
15099         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15100         (INITIAL_BUFFER_SIZE): Remove.
15101         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15102
15103 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15104
15105         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15106         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15107         Use the _ONCE methods, for efficiency.
15108         Check for fcntl.h.  In test program, include <errno.h>
15109         and <fcntl.h> if available.  Remove old K&R cruft from
15110         test program.  Check for common errors in GNU/Linux,
15111         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15112         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15113         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15114         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15115         name accordingly.
15116         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15117         accommodate new getcwd.c.
15118         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15119         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15120         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15121         that's all we need now.
15122
15123 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15124
15125         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15126         argp-parse.c depends on getopt internals, that means we should
15127         always use our getopt, to be on the safe side.
15128         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15129         order not to spoil the result of an eventual previous invocation
15130         of gl_GETOPT_SUBSTITUTE.
15131
15132 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15133
15134         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15135         redefinition warnings. To avoid them, include the defines
15136         in `#if !defined __need_getopt ... #endif'. The only place
15137         where __getopt_argv_const is used is in definitions
15138         of getopt_long and getopt_long_only below, which are as well
15139         protected by `#ifndef __need_getopt'.
15140         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15141         __need_getopt after including <stdio.h> and <unistd.h> These
15142         headers might have defined it.
15143
15144 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15145
15146         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15147
15148 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15149
15150         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15151         (futimens): New function, which uses futimes if available.
15152         (futimens, utimens): Support timespec==NULL, with same semantics
15153         as utime and utimens.
15154         * lib/utimens.h (futimens): New decl.
15155
15156 2004-11-23  Jim Meyering  <jim@meyering.net>
15157
15158         * lib/getopt_.h: Remove trailing blanks.
15159
15160 2004-11-23  Jim Meyering  <jim@meyering.net>
15161
15162         * lib/__fpending.c: Add comment.
15163
15164 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * modules/canonicalize (Depends-on): Add xreadlink.
15167         Problem reported by James Youngman.
15168
15169 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15170
15171         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15172         New macros.
15173         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15174         optopt): Use them instead of invoking ## directly; otherwise, the
15175         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15176
15177 2004-11-19  Bruno Haible  <bruno@clisp.org>
15178
15179         * lib/strtok_r.c: Move comments from here...
15180         * lib/strtok_r.h: ... to here.
15181
15182 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15183
15184         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15185         implementations that mishandle size_t overflow.
15186
15187 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15188
15189         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15190         might fail.  Problem reported by Yoann Vandoorselaere.
15191         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15192         implementations that mishandle size_t overflow.
15193
15194 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15195
15196         * modules/canon-host (Depends-on): Add strdup.
15197
15198 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15201
15202 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15203
15204         * lib/canon-host.c: Include "strdup.h".
15205         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15206         Use strdup instead of malloc/strcpy to duplicate strings.
15207
15208         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15209         (human_space_before_unit): New constant.
15210         * lib/human.c (human_readable): Support it.
15211
15212         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15213         (xgetcwd): Set errno correctly when failing.
15214         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15215         the failure is actually due to a PATH_MAX problem.
15216
15217         Further getopt changes to make it more likely that glibc will
15218         buy the changes back.
15219         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15220         (getopt): Use it, so to preserve glibc semantic
15221         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15222         when compiling for libc.
15223         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15224         (getopt_long, getopt_long_only): Use it.
15225
15226         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15227         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15228         (getopt): Argv is now char * const *, as per standard.
15229         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15230         not char *__getopt_argv_const *.
15231         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15232         _getopt_long_only_r): Likewise.
15233         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15234         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15235         _getopt_long_r, _getopt_long_only_r): Likewise.
15236         * lib/getopt_.h (__getopt_argv_const): Remove.
15237         (getopt): Argv is now char * const *, as per standard.
15238
15239         * lib/getdate.y (tORDINAL): New token.
15240         (day, relunit): Allow it for relative times.
15241         (relative_time_table): Use tORDINAL for ordinals.
15242
15243 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15244
15245         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15246         Document that "second" isn't allowed as an ordinal number.
15247
15248 2004-11-16  Jim Meyering  <jim@meyering.net>
15249
15250         * modules/closeout (Depends-on): Add fpending.
15251
15252 2004-11-15  Jim Meyering  <jim@meyering.net>
15253
15254         * lib/closeout.c: Include "__fpending.h" once again.
15255         Include <stdbool.h>.
15256         (close_stdout): Don't fail just because stdout was closed initially,
15257         since some programs don't write to stdout in the normal course of
15258         operation (other than --version and --help), and we don't want this
15259         function to make e.g. `touch file >&-' fail.
15260         But do fail if it was closed and someone has tried to write to it.
15261         E.g., `printf foo >&-' must fail.
15262
15263 2004-11-13  Jim Meyering  <jim@meyering.net>
15264
15265         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15266
15267 2004-11-12  Simon Josefsson  <jas@extundo.com>
15268
15269         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15270         small doc fix is still pending.
15271
15272 2004-11-11  Simon Josefsson  <jas@extundo.com>
15273
15274         * modules/strtok_r: New file.
15275
15276         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15277         strtok_r.
15278
15279 2004-11-11  Simon Josefsson  <jas@extundo.com>
15280
15281         * m4/strtok_r.m4: New file.
15282
15283         * m4/getopt.m4: Replace opterr.
15284
15285 2004-11-11  Simon Josefsson  <jas@extundo.com>
15286
15287         * lib/strtok_r.h, strtok_r.c: New file.
15288
15289 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15290
15291         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15292         of replacing opterr, getopt, etc.  This should handle the
15293         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15294
15295 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15296
15297         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15298         we can stop lying to compilers about the constness of argv when we
15299         are compiled outside glibc.
15300         (getopt, getopt_long, getopt_long_only): Use it.
15301         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15302         _getopt_internal, getopt): Likewise.
15303         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15304         _getopt_long_only_r): Likewise.
15305         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15306         _getopt_long_r, _getopt_long_only_r): Likewise.
15307
15308         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15309         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15310         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15311         the other external symbols.
15312         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15313         declaration, since the above renaming now works around collisions.
15314
15315 2004-11-11  Jim Meyering  <jim@meyering.net>
15316
15317         * lib/linebreak.c: Remove trailing blanks.
15318         * lib/alloca_.h: Likewise.
15319         * lib/acosl.c: Likewise.
15320         * lib/euidaccess.c: Likewise.
15321         * lib/allocsa.h: Likewise.
15322
15323 2004-11-10  Simon Josefsson  <jas@extundo.com>
15324
15325         * m4/getaddrinfo.m4: New file.
15326
15327 2004-11-10  Simon Josefsson  <jas@extundo.com>
15328
15329         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15330
15331 2004-11-10  Simon Josefsson  <jas@extundo.com>
15332
15333         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15334         getaddrinfo.
15335
15336         * modules/getaddrinfo: New file.
15337
15338 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15339
15340         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15341
15342 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15343
15344         * lib/mktime.c (SHR): New macro, which is a portable
15345         substitute for >> that should work even on Crays.
15346         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15347         Problem reported by Mark D. Baushke in
15348         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15349         * lib/getdate.y (SHR): Likewise.
15350         (tm_diff): Use it.
15351         * lib/strftime.c (SHR): Likewise.
15352         (tm_diff): Use it.
15353         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15354         quote_these_too, so that right shifts are well defined.  All uses
15355         changed.
15356
15357 2004-11-10  Jim Meyering  <jim@meyering.net>
15358
15359         Ensure that no close failure goes unreported.
15360         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15361         return early when it seems there's nothing to flush.
15362         Don't include __fpending.h.
15363
15364 2004-11-10  Jim Meyering  <jim@meyering.net>
15365
15366         * modules/closeout (Depends-on): Remove fpending.
15367
15368 2004-11-10  Jim Meyering  <jim@meyering.net>
15369
15370         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15371
15372 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15375         gl_FUNC_STRFTIME.
15376         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15377         and AC_REQUIRE when possible, to avoid duplicate checks.
15378         Check for <wchar.h>.
15379
15380 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15381
15382         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15383
15384 2004-11-09  Bruno Haible  <bruno@clisp.org>
15385
15386         * m4/sockpfaf.m4: New file.
15387
15388 2004-11-05  Bruno Haible  <bruno@clisp.org>
15389
15390         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15391         Reported by Mark D. Baushke <mdb@cvshome.org>.
15392
15393 2004-11-04  Bruno Haible  <bruno@clisp.org>
15394
15395         2004-09-11  Bruno Haible  <bruno@clisp.org>
15396                 * allocsa.valgrind: New file.
15397         2004-02-06  Bruno Haible  <bruno@clisp.org>
15398                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15399                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15400                 Reported by Christopher Seip <chris.seip@hp.com>.
15401
15402 2004-11-04  Bruno Haible  <bruno@clisp.org>
15403
15404         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15405         (Makefile.am): Distribute it.
15406
15407 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15408
15409         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15410         with errno == ERANGE if the buffer is too small.
15411         Problem reported by Mark D. Baushke.
15412
15413 2004-11-03  Albert Chin  <china@thewrittenword.com>
15414             Paul Eggert  <eggert@cs.ucla.edu>
15415
15416         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15417         equivalent, substitute $ac_type for equivalent type rather than
15418         blindly using uint32_t *always* which won't work if uint32_t is not
15419         available.  Define _UINT32_T to work around typedef of uint32_t if
15420         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15421         2.5.1.
15422
15423 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15424
15425         * m4/jm-macros.m4: Sync from coreutils.
15426         (gl_MACROS): Check for mbrlen, for pathchk.
15427         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15428
15429 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15430
15431         * lib/xreadlink.c (MAXSIZE): New macro.
15432         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15433         size does not exceed MAXSIZE.  Avoid cast.
15434         As suggested by Mark D. Baushke in
15435         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15436         if readlink fails with buffer size just under MAXSIZE, try again
15437         with MAXSIZE.
15438
15439 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15440
15441         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15442
15443 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15444         and  Paul Eggert  <eggert@cs.ucla.edu>
15445
15446         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15447         (get_date): Overparenthesize to avoid GCC warning.
15448
15449 2004-11-02  Bruno Haible  <bruno@clisp.org>
15450
15451         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15452         returns void.
15453
15454 2004-11-02  Bruno Haible  <bruno@clisp.org>
15455
15456         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15457         function returns void.
15458
15459 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15460
15461         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15462         fflush_unlocked, flockfile, funlockfile, funlockfile,
15463         fputs_unlocked, putc_unlocked.
15464
15465 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15466
15467         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15468         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15469         already declared.
15470
15471 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15472
15473         * modules/getdate (Files): Add doc/getdate.texi.
15474         (Depends-on): Add setenv, xalloc.
15475
15476 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15477
15478         * lib/getdate.y: Add support for TZ="foo" within a date string.
15479         Fix some bugs near time_t boundaries.  Reject dates with
15480         out-of-range components, e.g., "Sept 31".
15481         Include <stdlib.h>, "setenv.h", "xalloc.h".
15482         (ISDIGIT_LOCALE): Remove; unused.
15483         Note that the TZ and time functions used here are not reentrant.
15484         (mktime_ok, get_tz): New functions.
15485         (TZBUFSIZE): New constant.
15486         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15487         This requires that we sometimes generate our own TZ="XXX..." setting.
15488
15489 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15490
15491         * doc/getdate.texi: New file, from coreutils with modifications for
15492         the new TZ parsing.
15493
15494 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15495
15496         * lib/mktime.c (not_equal_tm): Remove redundant check.
15497
15498 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15499
15500         * modules/regex (lib_SOURCES): Add regex.c.
15501         Reported by James Youngman in
15502         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15503
15504 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15505
15506         * lib/getdate.y: Use Bison 1.875 features, and some minor
15507         code cleanups.  This change does not affect semantics.
15508         Don't include <stdlib.h>; no longer needed.
15509         Don't include unlocked-io.h; only the "#if TEST" code uses
15510         stdio, and performance isn't crucial there.
15511         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15512         Bison 1.875 features as described below.
15513         All uses of "PC." replaced by "pc->".
15514         (YYSTYPE): Add a forward declaration.
15515         (yylex, yyerror): Use full prototypes in forward decls.
15516         Use "%pure-parser" rather than obsolescent "%pure_parser".
15517         Use %parse-param and %lex-param instead of obsolescent
15518         YYPARSE_PARAM and YYLEX_PARAM.
15519         (meridian_table, month_and_day_table, time_units_table,
15520         relative_time_table, time_zone_table, military_table,
15521         lookup_zone, lookup_word, get_date):
15522         Use NULL instead of 0 where appropriate.
15523         (to_hour): Avoid abort (), to avoid a dependency on
15524         stdlib.h.
15525         (yyerror, yylex): Now accepts parser_control * arg.
15526         (main) [TEST]: Use '\0' rather than 0 for char.
15527
15528 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15529
15530         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15531
15532 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15533
15534         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15535         It's now the caller's responsibility to handle the case where
15536         !HAVE_GETPAGESIZE && !defined getpagesize.
15537
15538         * lib/mktime.c (leapyear): Arg is long int, not int.
15539
15540 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15541
15542         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15543
15544 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15545
15546         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15547         missing.  Problem reported by James Youngman.
15548
15549 2004-10-16  Simon Josefsson  <jas@extundo.com>
15550
15551         * gnulib-tool: Fix comments.  Fix parse problem.
15552         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15553
15554 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15555
15556         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15557         implementation of getopt_long.  Problem reported by Alexander Taler in:
15558         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15559
15560 2004-10-15  Bruno Haible  <bruno@clisp.org>
15561
15562         * gnulib-tool: Untabify. Initialize supplied_libname.
15563         (func_usage): More homogenous output.
15564         (func_modules_transitive_closure, func_modules_to_filelist,
15565         func_emit_lib_Makefile_am): New functions.
15566         (func_import): New function, extracted from big case statement. Use
15567         func_get_license, func_modules_transitive_closure,
15568         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15569         opt_lgpl. Don't use test -a, as it's not portable.
15570         (func_create_testdir): Use func_modules_transitive_closure,
15571         func_modules_to_filelist, func_emit_lib_Makefile_am.
15572
15573 2004-10-15  Bruno Haible  <bruno@clisp.org>
15574
15575         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15576
15577 2004-10-15  Bruno Haible  <bruno@clisp.org>
15578
15579         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15580         the portions belonging to each module.
15581         Suggested by Derek Robert Price <derek@ximbiot.com>.
15582
15583 2004-10-12  Simon Josefsson  <jas@extundo.com>
15584
15585         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15586         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15587         to real functions.
15588
15589 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15590
15591         * modules/vsnprintf: New file.
15592
15593 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15594
15595         * m4/vsnprintf.m4: New file.
15596
15597 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15598
15599         * lib/vsnprintf.h: New file.
15600         * lib/vsnprintf.c: New file.
15601
15602 2004-10-11  Bruno Haible  <bruno@clisp.org>
15603
15604         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15605         vsnprintf.
15606
15607 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15608
15609         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15610
15611 2004-10-07  Bruno Haible  <bruno@clisp.org>
15612
15613         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15614         fits into the provided buffer.
15615
15616 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15617
15618         * lib/diacrit.c, diacrit.h: Add GPL notice.
15619
15620         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15621         notice.
15622         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15623         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15624         This avoids a potential constant-folding bug.
15625
15626 2004-10-05  Bruno Haible  <bruno@clisp.org>
15627
15628         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15629         for the declaration of strsep.
15630
15631 2004-10-05  Bruno Haible  <bruno@clisp.org>
15632
15633         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15634
15635 2004-10-04  Simon Josefsson  <jas@extundo.com>
15636
15637         * modules/memmem: New file.
15638         * tests/test-memmem.c: New file.
15639         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15640
15641 2004-10-04  Simon Josefsson  <jas@extundo.com>
15642
15643         * m4/memmem.m4: New file.
15644
15645 2004-10-04  Simon Josefsson  <jas@extundo.com>
15646
15647         * lib/memmem.h: New file.
15648         * lib/memmem.c: New file, taken from glibc.
15649
15650 2004-10-04  Simon Josefsson  <jas@extundo.com>
15651
15652         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15653         '#ifdef USE_UNLOCKED_IO'.
15654
15655 2004-10-04  Simon Josefsson  <jas@extundo.com>
15656
15657         * config/srclist.txt: Add memmem from glibc.
15658
15659 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15662
15663         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15664         modules/exclude, modules/getdate, modules/getline,
15665         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15666         modules/getusershell, modules/linebuffer, modules/md5,
15667         modules/mountlist, modules/posixtm, modules/readtokens,
15668         modules/readutmp, modules/regex, modules/sha1,
15669         modules/version-etc, modules/yesno:
15670         Remove dependency on unlocked-io.
15671
15672 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15673
15674         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15675
15676         * m4/unlocked-io.m4: Add copyright notice.
15677         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15678
15679 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15680
15681         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15682         * lib/xmalloc.c (xmemdup): Likewise.
15683         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15684         XFREE): Remove these long-obsolescent macros.
15685         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15686         * lib/xstrdup.c: Remove.
15687
15688         * lib/regex.c (re_comp): Cast gettext return value to char *,
15689         Problem reported by Martin Neitzel via Mark D. Baushke.
15690
15691 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15692
15693         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15694         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15695         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15696         regex.c, sha1.c, version-etc.c, yesno.c:
15697         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15698         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15699         the includer's responsibility.
15700
15701         Sync from coreutils.
15702
15703         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15704         points to the start of a string, as the C Standard says the
15705         resulting behavior is undefined.
15706
15707         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15708         simple -> simple_backups, numbered_existing ->
15709         numbered_existing_backups, numbered -> numbered_backups
15710         to avoid shadowing problems.  All uses changed.
15711         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15712         * lib/backupfile.c (check_extension, numbered_backup):
15713         Rename locals to avoid shadowing 'basename'.
15714         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15715         once.
15716
15717         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15718         * lib/.cvsignore: Add getopt.h.
15719
15720 2004-10-04  Bruno Haible  <bruno@clisp.org>
15721
15722         * modules/README: New file.
15723         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15724         not a module.
15725
15726 2004-10-02  Jim Meyering  <jim@meyering.net>
15727
15728         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15729
15730 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15731
15732         * modules/strsep: New file.
15733
15734 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15735
15736         * m4/strsep.m4: New file.
15737
15738 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15739
15740         * lib/strsep.h: New file.
15741         * lib/strsep.c: New file.
15742
15743 2004-10-01  Simon Josefsson  <jas@extundo.com>
15744
15745         * lib/snprintf.c (snprintf): Handle size==0.
15746
15747 2004-10-01  Simon Josefsson  <jas@extundo.com>
15748             Bruno Haible  <bruno@clisp.org>
15749
15750         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15751         (snprintf): Declare 'args'.
15752
15753 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15754
15755         * lib/snprintf.c: Remove comments as to why each header is needed.
15756
15757 2004-10-01  Bruno Haible  <bruno@clisp.org>
15758
15759         * MODULES.html.sh: Add strsep.
15760
15761 2004-09-30  Simon Josefsson  <jas@extundo.com>
15762
15763         * modules/snprintf: New file.
15764
15765 2004-09-30  Simon Josefsson  <jas@extundo.com>
15766
15767         * m4/snprintf.m4: New file.
15768
15769 2004-09-30  Simon Josefsson  <jas@extundo.com>
15770
15771         * lib/snprintf.h, lib/snprintf.c: New files.
15772
15773 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15774
15775         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15776         (hol_entry_help): Never translate an empty string.
15777         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15778         * lib/argp.h (OPTION_NO_TRANS): New option.
15779
15780 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15781
15782         * modules/argp (Maintainer): Replace Simon Josefsson
15783         by Sergey Poznyakoff.
15784
15785 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15786
15787         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15788         changes merged back into glibc.
15789
15790 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15791
15792         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15793
15794 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15795
15796         * lib/xvasprintf.c: Include xalloc.h.
15797         (xvasprintf): Use xalloc_die, not xmalloc_die.
15798
15799 2004-09-29  Bruno Haible  <bruno@clisp.org>
15800
15801         * modules/alloca-opt: New file, derived from modules/alloca.
15802         * modules/allocsa: Depend on alloca-opt instead of alloca.
15803         * modules/setenv: Likewise.
15804         * modules/vasnprintf: Likewise.
15805         * MODULES.html.sh: Add alloca-opt.
15806
15807 2004-09-28  Simon Josefsson  <jas@extundo.com>
15808
15809         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15810         LGPL, and to replace license template from GPL to LGPL.
15811
15812 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15813
15814         * modules/dummy: Change license to LGPL.
15815
15816 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15817
15818         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15819
15820 2004-09-24  Simon Josefsson  <jas@extundo.com>
15821
15822         * modules/minmax (License): Change from GPL to LGPL.
15823
15824 2004-09-23  Simon Josefsson  <jas@extundo.com>
15825
15826         * gnulib-tool (--import): Typo.
15827
15828 2004-09-23  Simon Josefsson  <jas@extundo.com>
15829
15830         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15831
15832 2004-09-22  Bruno Haible  <bruno@clisp.org>
15833
15834         * modules/*: Add 'License' field.
15835         * gnulib-tool: Accept --extract-license option.
15836         (func_get_license): New function.
15837
15838 2004-09-21  Bruno Haible  <bruno@clisp.org>
15839
15840         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15841         Reported by Simon Josefsson.
15842
15843 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15844
15845         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15846         gl_AC_TYPE_LONG_LONG.
15847
15848 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15849
15850         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15851
15852 2004-09-18  Simon Josefsson  <jas@extundo.com>
15853         and  Paul Eggert  <eggert@cs.ucla.edu>
15854
15855         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15856         calls with autoreconf.  Define GL_LIB.
15857
15858 2004-09-14  Karl Berry  <karl@gnu.org>
15859
15860         * config/srclist.txt: unsync setenv.c, sigh.
15861
15862 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15863
15864         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
15865         Problem reported by Bruno Haible in:
15866         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
15867
15868 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
15869
15870         * config/srclist.txt: Comment out argp-pvh.c.
15871
15872 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
15873
15874         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
15875         in case some system header has #define'd it.  Problem reported by
15876         Soeren D. Schulze in
15877         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
15878
15879 2004-09-09  Karl Berry  <karl@gnu.org>
15880
15881         * regex.[ch]: delete from the root.  These were supposed to be
15882                 synced with emacs cvs, but this has not happened for about
15883                 a year, and anyway nothing else uses emacs regex.[ch].
15884                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
15885                 lib/regex[.ch] is untouched.
15886
15887 2004-09-09  Bruno Haible  <bruno@clisp.org>
15888
15889         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
15890
15891 2004-09-09  Bruno Haible  <bruno@clisp.org>
15892
15893         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
15894         modifications.
15895         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
15896
15897 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15898
15899         * modules/xvasprintf: New file.
15900         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
15901
15902 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
15903
15904         * lib/xvasprintf.h: New file.
15905         * lib/xvasprintf.c: New file.
15906         * lib/xasprintf.c: New file.
15907
15908 2004-09-08  Bruno Haible  <bruno@clisp.org>
15909
15910         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
15911
15912 2004-09-08  Bruno Haible  <bruno@clisp.org>
15913
15914         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
15915         length is > INT_MAX.
15916         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
15917         more.
15918
15919 2004-09-08  Bruno Haible  <bruno@clisp.org>
15920
15921         * lib/stdint_.h: New file, taken from GNU clisp.
15922
15923 2004-09-08  Bruno Haible  <bruno@clisp.org>
15924             Oskar Liljeblad  <oskar@osk.mine.nu>
15925
15926         * modules/stdint: New file.
15927         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
15928
15929 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15930
15931         Import from coreutils.
15932         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
15933         strings on unbounded length.  alloca's performance benefits aren't
15934         that important here.
15935         (V_STRDUP): Remove.
15936         (parse_with_separator): New function, with most of the internals
15937         of the old parse_user_spec.  Allow user to omit both user and group,
15938         for compatibility with FreeBSD.
15939         Clone only the user name, not the entire spec.
15940         Do not set *uid, *gid unless entirely successful.
15941         Avoid memory leak in some failing cases.
15942         Fix regression for USER.GROUP reported by Dmitry V. Levin in
15943         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
15944         (parse_user_spec): Rewrite to use parse_with_separator.
15945
15946 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15947
15948         * modules/userspec: Don't depend on alloca.
15949
15950 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
15951
15952         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
15953
15954 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
15955
15956         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
15957         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
15958         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
15959
15960 2004-08-16  Simon Josefsson  <jas@extundo.com>
15961
15962         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
15963         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
15964         Add --dry-run for --import.
15965         Let user provided command line parameters override configure.ac
15966         settings.
15967
15968 2004-08-12  Simon Josefsson  <jas@extundo.com>
15969
15970         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
15971         as discussed with Paul Eggert in threads rooted at
15972         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
15973         and
15974         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
15975         Before, the test was empty, and relied on ELIDE_CODE in source
15976         code.)
15977         (gl_PREREQ_GETOPT): New macro.
15978         (gl_GETOPT): Use them.
15979
15980 2004-08-12  Simon Josefsson  <jas@extundo.com>
15981
15982         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
15983         * lib/getopt_.h: Renamed from getopt.h.
15984
15985 2004-08-12  Simon Josefsson  <jas@extundo.com>
15986
15987         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
15988         Change default library name from libfoo to libgnu.
15989         Now, if you have a configure.ac that says:
15990                 gl_SOURCE_BASE(gl)
15991                 gl_M4_BASE(gl/m4)
15992                 gl_MODULES(error getopt etcetera)
15993                 gl_INIT
15994         you can import all you need by running:
15995                 ../gnulib/gnulib-tool --import
15996
15997         * modules/getopt (Files): Rename getopt.h to getopt_.h.
15998         (Makefile.am): Rewrite, use logic from argz.
15999         (Include): Use <getopt.h> instead of "getopt.h".
16000
16001 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16002
16003         * modules/argp (Files): Add m4/unlocked-io.m4.
16004         (Depends-on): Add extensions.
16005
16006 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16007
16008         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16009         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16010         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16011         Check for program_invocation_name, program_invocation_short_name,
16012         flockfile, funlockfile, features.h, _getopt_long_only_r.
16013
16014 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16015
16016         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16017         its complicated substitute.
16018         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16019         and program_invocation_name.
16020         (__argp_basename) [!_LIBC]: Remove; the only use was
16021         replaced by its body.
16022         (__argp_short_program_name): Change condition from
16023         !defined __argp_short_program_name to
16024         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16025         to match argp-namefrob.h.
16026         (__argp_failure): Don't assume strerror_r returns char *.
16027         * lib/argp-parse.c (N_): Define unconditionally.
16028         (argp_default_options): Fill out initializers with 0 to avoid
16029         gcc warnings.
16030
16031 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16032
16033         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16034         getopt1.c.
16035
16036 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16037
16038         Merge from coreutils.
16039
16040         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16041
16042         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16043         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16044
16045 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16046
16047         Merge from coreutils.
16048
16049         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16050         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16051         for Reliant Unix 5.43.
16052
16053         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16054         (union fooround): Use uintmax_t, not long int.
16055         The rest is a merge from libc:
16056         [defined _LIBC]: Include <shlib-compat.h>.
16057         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16058
16059         * lib/settime.c (settime): Recode to avoid warning with
16060         Sun Forte C 6U2.
16061
16062         * lib/strverscmp.c: Convert to UTF-8.
16063
16064 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16065
16066         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16067         m4/uintmax_t.m4.
16068
16069 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16070
16071         * modules/xalloc-die: New file.
16072         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16073
16074         * modules/md5 (Files): Add m4/uint32_t.m4.
16075         * modules/sha1: Renamed from modules/sha.
16076         (Files):
16077         Rename lib/sha.h to lib/sha1.h.
16078         Rename lib/sha.c to lib/sha1.c.
16079         Rename m4/sha.m4 to m4/sha1.m4.
16080         (lib_SOURCES): Likewise.
16081         (configure.ac): Rename gl_SHA to gl_SHA1.
16082         (Include): sha.h -> sha1.h.
16083
16084 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16087         * m4/sha1.m4: Renamed from sha.m4.
16088         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16089
16090 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16091
16092         * lib/obstack.h (obstack_empty_p):
16093         Don't assume that chunk->contents is suitably aligned.
16094         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16095         Likewise. Problem reported by Benno in
16096         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16097
16098         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16099         readable.  This could be improved further but it'd take some work.
16100
16101 2004-08-08  Simon Josefsson  <jas@extundo.com>
16102
16103         * modules/xgethostname (Depends-on): Remove exit and error (not
16104         used).
16105
16106         * modules/getpass-gnu: Add getpass.h.
16107         (Depends-on): Add stdbool.
16108         * modules/getpass: Add getpass.h.
16109
16110 2004-08-08  Simon Josefsson  <jas@extundo.com>
16111
16112         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16113         Check getpass declaration.
16114
16115 2004-08-08  Simon Josefsson  <jas@extundo.com>
16116
16117         * lib/xgethostname.c: Don't include error.h (not used).
16118
16119         * lib/getpass.h: Add.
16120         * lib/getpass.c: Include getpass.h first.
16121
16122 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16123
16124         * lib/xalloc-die.c: New file.
16125         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16126         All uses removed.
16127         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16128         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16129         xalloc-die.c.
16130         (_, N_, xalloc_die): Move to xalloc-die.c.
16131         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16132         so that we needn't mess with xalloc_msg_memory_exhausted.
16133
16134         * lib/sha1.h: Renamed from sha.h.
16135         (SHA1_H): Renamed from _SHA_H.
16136         (sha1_ctx): Renamed from sha_ctx.
16137         (sha1_init_ctx): Renamed from sha_init_ctx.
16138         (sha1_process_block): Renamed from sha_process_block.
16139         (sha1_process_bytes): Renamed from sha_process_bytes.
16140         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16141         (sha1_read_ctx): Renamed from sha_read_ctx.
16142         (sha1_stream): Renamed from sha_stream.
16143         (sha1_buffer): Renamed from sha_buffer.
16144         * lib/sha1.c: Likewise; renamed from sha.c.
16145         Do not include <sys/types.h>.
16146         Include <stddef.h> rather than <stdlib.h>.
16147
16148 2004-08-08  Bruno Haible  <bruno@clisp.org>
16149
16150         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16151         FILESYSTEM_PREFIX_LEN.
16152         * lib/progreloc.c: Likewise.
16153         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16154
16155 2004-08-06  Simon Josefsson  <jas@extundo.com>
16156
16157         * modules/progname (Depends-on): Don't depend on stdbool.
16158
16159 2004-08-06  Simon Josefsson  <jas@extundo.com>
16160
16161         * modules/getsubopt: New file.
16162         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16163         getsubopt.
16164
16165 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16166
16167         More merge from coreutils.
16168
16169         * m4/utimens.m4, m4/utimecmp.m4: New files.
16170         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16171         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16172         prereq.m4, sha.m4: Import changes from coreutils.
16173
16174 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16175
16176         More merge from coreutils.
16177         * modules/raise, modules/readtokens0, modules/utimens:
16178         * modules/utimecmp, module/xnanosleep: New files.
16179         * modules/strftime: Add lib/strftime.h.
16180         Change include from <time.h> to "strftime.h".
16181         * modules/yesno: Add lib/yesno.h.
16182         * modules/backupfile: Remove lib/addext.c.
16183         * modules/euidaccess: Add stat-macros.h.
16184         * modules/canonicalize, modules/euidaccess,
16185         modules/filemode, modules/lchown, modules/makepath,
16186         modules/rmdir, modules/stat: Likewise.
16187
16188 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16189
16190         Merge from tar.
16191         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16192         SIZE_MAX is a valid preprocessor constant.
16193         (__argp_basename): Change from "#ifndef _LIBC"
16194         to "#ifndef __argp_short_program_name", so that
16195         we don't compile these functions for tar.
16196
16197         More merges from coreutils.
16198         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16199         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16200         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16201         * lib/addext.c: Remove; no longer needed.
16202         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16203         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16204         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16205         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16206         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16207         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16208         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16209         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16210         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16211         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16212         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16213         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16214         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16215         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16216         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16217         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16218         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16219         Import changes from coreutils.
16220
16221 2004-08-05  Simon Josefsson  <jas@extundo.com>
16222
16223         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16224
16225 2004-08-05  Simon Josefsson  <jas@extundo.com>
16226
16227         * m4/getsubopt.m4: New file.
16228
16229 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16230
16231         Merge from coreutils.
16232
16233         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16234         * m4/getcwd-path-max.m4: New files.
16235
16236         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16237         FILESYSTEM_PREFIX_LEN ->
16238         FILE_SYSTEM_PREFIX_LEN.
16239         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16240         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16241         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16242         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16243
16244         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16245         prerequisite modules now handle the DOS stuff.
16246         Don't check for unistd.h.
16247
16248 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16249
16250         Merge from coreutils.
16251
16252         * lib/.gdb-history: Remove; this doesn't belong here.
16253
16254         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16255         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16256         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16257         * lib/getcwd.c: New files.
16258
16259         * lib/dirname.h: Include <stdbool.h>.
16260         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16261         for consistency with POSIX terminology.  All uses changed.
16262         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16263         (strip_trailing_slashes): Use bool for booleans.
16264         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16265
16266         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16267         sometimes returns a positive errno value even when it succeeds.
16268         (print_errno_message) [!LIBC]: Fall back on strerror if
16269         __strerror_r fails.
16270
16271         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16272         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16273         (longest_relative_suffix): New function.
16274         (path_concat): Use it.  Assume first argument is not NULL.
16275         Port to DOS.  Omit redundant separators.
16276         Report an error instead of returning NULL.
16277         Use mempcpy instead of memcpy.
16278         (xpath_concat): Remove: not declared or used.
16279
16280         * lib/same.h: Include <stdbool.h>
16281         (same_name): Return bool, not int.
16282         * lib/same.c (same_name): Likewise.
16283         (errno): Don't declare; we assume C89 or better now.
16284
16285         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16286         if not already defined.
16287
16288         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16289         * lib/dup-safer.c (errno): Likewise.
16290
16291 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16292
16293         Merge from coreutils.
16294         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16295         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16296         * modules/path-concat: Don't depend on strdup.
16297
16298 2004-08-03  Simon Josefsson  <jas@extundo.com>
16299
16300         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16301         * lib/progname.h: Don't include stdbool.h.
16302
16303 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16304
16305         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16306         * MODULES.html.sh (func_all_modules): Remove fatal.
16307
16308 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16309
16310         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16311
16312 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16313
16314         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16315         working.
16316
16317 2004-08-02  Simon Josefsson  <jas@extundo.com>
16318
16319         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16320         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16321         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16322
16323 2004-08-01  Simon Josefsson  <jas@extundo.com>
16324
16325         * lib/xgetdomainname.c: Include stdlib.h, for free().
16326
16327 2004-07-19  Bruno Haible  <bruno@clisp.org>
16328
16329         * MODULES.html.sh (func_all_modules): Add dummy.
16330
16331 2004-07-16  Simon Josefsson  <jas@extundo.com>
16332
16333         * modules/dummy: New file.
16334
16335 2004-07-16  Simon Josefsson  <jas@extundo.com>
16336
16337         * lib/dummy.c: New file.
16338
16339 2004-07-16  Bruno Haible  <bruno@clisp.org>
16340
16341         * lib/backupfile.h: Add extern "C" for C++.
16342         * lib/closeout.h: Likewise.
16343         * lib/copy-file.h: Likewise.
16344         * lib/findprog.h: Likewise.
16345         * lib/full-write.h: Likewise.
16346         * lib/pathname.h: Likewise.
16347         * lib/progname.h: Likewise.
16348         * lib/stpcpy.h: Likewise.
16349         * lib/stpncpy.h: Likewise.
16350         * lib/strcase.h: Likewise.
16351         * lib/strstr.h: Likewise.
16352         * lib/xalloc.h: Likewise.
16353
16354         * lib/mbswidth.h: Add extern "C" for C++.
16355         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16356
16357 2004-07-13  Robert Millan  <robertmh@gnu.org>
16358
16359         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16360
16361 2004-07-09  Simon Josefsson  <jas@extundo.com>
16362
16363         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16364         failed without this.)
16365
16366 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16367
16368         * modules/chown (Files): Add lib/fchown-stub.c, since
16369         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16370
16371 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16372
16373         * lib/fchown-stub.c: New file.
16374
16375 2004-06-24  Jim Meyering  <jim@meyering.net>
16376
16377         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16378
16379 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16380
16381         * modules/argz: Omit "#include".
16382
16383         * MODULES.html.sh (func_all_modules): Add calloc, to match
16384         2004-06-01 addition of calloc module.
16385
16386 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16387
16388         * m4/argz.m4: New file, which is autoupdated from libtool.
16389
16390 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16391
16392         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16393         libtool.
16394
16395 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16396
16397         * config/srclist-update: Don't insist on "USA." before the
16398         close-comment, as libtool omits the period and puts the */ on a
16399         separate line.
16400         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16401         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16402
16403 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16404
16405         * modules/argz: New file.
16406         * MODULES.html.sh (func_all_modules): Add argz.
16407
16408 2004-06-12  Jim Meyering  <jim@meyering.net>
16409         and  Paul Eggert  <eggert@cs.ucla.edu>
16410
16411         * modules/hash (Files): Add lib/xalloc.h.
16412         * modules/pipe (Depends-on): Add wait-process.
16413         * modules/stat (Depends-on): Add xalloc.
16414         * modules/userspec (Files): Add lib/userspec.h.
16415         * modules/xstrto
16416
16417         Upgrade from gettext-0.13.
16418         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16419         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16420         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16421
16422 2004-06-10  Jim Meyering  <jim@meyering.net>
16423
16424         * lib/calloc.c: New file.
16425
16426 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16427
16428         * lib/getdate.y (yylex): Allow space between sign and number.
16429         Problem reported by Dan Jacobson.
16430
16431 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16432
16433         Merge from coreutils CVS.
16434
16435         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16436         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16437         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16438         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16439         xstrtol.m4: Fix copyright date and/or serial number.
16440
16441         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16442         See if we need an fchown replacement.
16443         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16444         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16445         and use the replacement function if we detect either defect.
16446
16447         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16448         gl_UTIMECMP.
16449
16450 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16451         and  Jim Meyering  <jim@meyering.net>
16452
16453         Merge from coreutils CVS.
16454
16455         * lib/stat-macros.h: New file, with contents from file-type.h
16456         and coreutils' system.h.
16457         * lib/file-type.c: Include "stat-macros.h".
16458         * lib/file-type.h (file_type): Move all macro definitions to new file,
16459         stat-macros.h.
16460
16461         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16462         Wrap old code with this conditional.
16463         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16464         function that does not dereference symlinks.
16465         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16466
16467         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16468         dependency problems.
16469         (xreadlink): Accept new arg SIZE, for efficiency.
16470         All decls and uses changed.
16471         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16472
16473         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16474         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16475
16476         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16477         sysexits.h.
16478
16479 2004-06-01  Jim Meyering  <jim@meyering.net>
16480
16481         * m4/calloc.m4: New file.
16482
16483 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16484
16485         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16486         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16487         Also, fix a typo in a diagnostic.
16488
16489 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16490
16491         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16492         or AC_FUNC_REALLOC.
16493
16494 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16495
16496         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16497         macros to be defined.
16498         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16499         the allocator returns NULL because the requested size is zero.
16500
16501 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16502
16503         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16504         var.  Add comment explaining why libc still defines it.  This
16505         merges the following patch from glibc:
16506         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16507
16508 2004-05-20  Andreas Schwab  <schwab@suse.de>
16509
16510         * m4/free.m4: Replace free if it not known to work, not the other
16511         way round.
16512
16513 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16514
16515         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16516         present in glibc since revision 1.1 of this file.
16517         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16518         obstack_alignment_mask, obstack_alloc, obstack_base,
16519         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16520         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16521         obstack_grow0, obstack_init, obstack_int_grow,
16522         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16523         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16524         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16525         nonexistent functions.
16526
16527 2004-05-18  Karl Berry  <karl@gnu.org>
16528
16529         * config/srclist.txt: break link for vasnprintf.c.
16530
16531 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16532
16533         Port obstack to the AS/400, where pointers are 16 bytes wide and
16534         you cannot cast an integer to a valid pointer.  This patch is
16535         currently waiting to be integrated into glibc; see
16536         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16537
16538         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16539         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16540         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16541         (struct obstack): temp member is now a union of a pointer and
16542         an integer, instead of an integer.  All integer uses changed.
16543         This does not affect the physical layout of struct obstack,
16544         except on hosts (like the AS/400) where the size or alignment of
16545         void * is greater than that of ptrdiff_t.
16546         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16547         __STDC__)]: Store temporary in pointer member of union, not
16548         integer member.
16549         * lib/obstack.c: Include <stddef.h>, for offsetof.
16550         (struct fooalign): Remove; it doesn't need a name.
16551         (union fooround): Change double to long double, and add void *.
16552         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16553         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16554         not a macro.  Hence the values are always int; so remove all
16555         casts-to-int in uses.
16556
16557 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16558
16559         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16560         we can get this patch merged into glibc.
16561
16562 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16563             Paul Eggert  <eggert@cs.ucla.edu>
16564
16565         * m4/argp: Depend on alloca.
16566
16567 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16568             Paul Eggert  <eggert@cs.ucla.edu>
16569
16570         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16571         freecoding.
16572
16573 2004-05-17  Bruno Haible  <bruno@clisp.org>
16574
16575         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16576         precision that consists of a '.' followed by an empty digit string.
16577         Patch by Tor Lillqvist <tml@iki.fi>.
16578
16579 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16580
16581         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16582         for backward compatibility with older code.  We need our own
16583         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16584         it under some other name, and our alloca.h will define it.
16585
16586 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16587             Derek Price  <derek@ximbiot.com>
16588
16589         * lib/alloca.c: Include <alloca.h>, to get our interface.
16590         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16591         include <alloca.h> first.  Use C89 prototype for alloca; this
16592         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16593         Use #elif for simplicity, since we can assume C89 now.
16594         Don't try to source the system alloca.h since it will not be found
16595         and to prevent recursively including its replacement.
16596         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16597         * lib/regex.c: Likewise.
16598
16599 2004-05-16  Derek Price  <derek@ximbiot.com>
16600             Paul Eggert  <eggert@cs.ucla.edu>
16601
16602         getline cleanup.  This changes the getndelim2 API: both order of
16603         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16604         no delimiter).
16605
16606         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16607         interface does that.
16608         (getline): Always use getdelim, so that we don't have two
16609         copies of this code.
16610         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16611         if available.
16612         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16613         (GETNDELIM2_MAXIMUM): New macro.
16614         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16615         instead of the old practice of delim2==0.  All callers changed.
16616         Return -1 on overflow, instead of returning junk.
16617         Do not set *linesize unless allocation succeeds.
16618         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16619         that we include sys/types.h.
16620         * lib/getnline.h: Likewise.
16621         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16622         (getndelim2): Reorder arguments.
16623         * lib/getnline.c (getnline, getndelim):
16624         Don't discard the NMAX argument.
16625         (getnline): Invoke getndelim, to avoid code duplication.
16626         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16627         of (size_t) -1 by callers of the getnline family.
16628
16629 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16630
16631         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16632         Check for gettimeofday.
16633         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16634         Check for settimeofday, stime.
16635
16636 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16637
16638         * lib/nanosleep.c (suspended): Change its type from int to
16639         sig_atomic_t volatile.
16640         (first_call): Make it private to rpl_nanosleep, and have it
16641         be zero initially as that's a bit faster.
16642         (my_usleep): Round up fractional times instead of truncating them,
16643         as this is the usual meaning for 'sleep'.
16644
16645         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16646         doesn't work.
16647         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16648         (ENOSYS): Define if not defined.
16649         (settime): Fall back on stime if it exists and settimeofday fails.
16650         But don't bother with fallbacks if a method fails with errno == EPERM.
16651
16652 2004-05-11  Jim Meyering  <jim@meyering.net>
16653
16654         Prior to this change, the save_cwd caller required read access to the
16655         current directory on most systems (ones with the fchdir function).
16656
16657         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16658         fails, try write-only, and finally, resort to using xgetcwd.
16659
16660 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16661
16662         * lib/obstack.c, obstack.h: Import changes from libc.
16663
16664 2004-04-28  Bruno Haible  <bruno@clisp.org>
16665
16666         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16667         also implicitly appends .exe to executables.
16668         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16669         accepts Windows pathnames.
16670         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16671         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16672         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16673         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16674         Reported by Derek Robert Price <derek@ximbiot.com>.
16675
16676 2004-04-21  Karl Berry  <karl@gnu.org>
16677
16678         * config/srclist.txt (localcharset.c): break sync.
16679
16680 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16681
16682         * m4/host-os.m4: Add a copyright notice.
16683
16684 2004-04-20  Jim Meyering  <jim@meyering.net>
16685
16686         Change UTILS_ to gl_ in AC_DEFINE'd names.
16687         Change utils_- and jm_-prefixed variables, too.
16688         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16689         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16690         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16691
16692         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16693         Don't emit trailing blanks.
16694         Also rename jm_-prefixed variables to have gl_ prefix.
16695
16696         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16697         Also rename jm_-prefixed variables to have gl_ prefix.
16698
16699         * m4/jm-macros.m4: Reflect the renamings.
16700         * m4/prereq.m4: Likewise.
16701
16702 2004-04-20  Jim Meyering  <jim@meyering.net>
16703
16704         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16705         memory.
16706
16707 2004-04-20  Jim Meyering  <jim@meyering.net>
16708             Bruno Haible  <bruno@clisp.org>
16709
16710         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16711         memory when realloc fails.
16712
16713 2004-04-19  Jim Meyering  <jim@meyering.net>
16714
16715         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16716         now that readutmp.c may call `free (0)'.
16717
16718 2004-04-19  Bruno Haible  <bruno@clisp.org>
16719
16720         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16721         * m4/inttypes_h.m4: Likewise.
16722         * m4/stdint_h.m4: Likewise.
16723         * m4/intmax_t.m4: Likewise.
16724         * m4/uintmax_t.m4: Likewise.
16725
16726 2004-04-18  Jim Meyering  <jim@meyering.net>
16727
16728         * m4/prereq.m4: Don't forbid jm_ prefix.
16729
16730         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16731         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16732         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16733         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16734         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16735         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16736         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16737         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16738         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16739         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16740         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16741         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16742         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16743         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16744         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16745         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16746         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16747         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16748         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16749
16750 2004-04-18  Jim Meyering  <jim@meyering.net>
16751
16752         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16753         failure, don't leak memory and do call END_UTMP_ENT.
16754
16755 2004-04-16  Jim Meyering  <jim@meyering.net>
16756
16757         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16758         coreutils' stat program.
16759         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16760
16761 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16762
16763         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16764         C89.
16765         (CHAR_BIT): Remove, since we assume C89.
16766         Include <stdint.h> if available, as per current Autoconf CVS advice.
16767
16768 2004-03-31  Jim Meyering  <jim@meyering.net>
16769
16770         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16771         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16772         * m4/xalloc.m4: Likewise.
16773
16774 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16775
16776         Merge from coreutils.
16777
16778         * m4/inttostr.m4: New file.
16779         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16780         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16781         Require gl_CLOCK_TIME.
16782         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16783
16784 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16785
16786         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16787         not bool, to be more consistent with Unix conventions.
16788         Suggested by Bruno Haible.
16789
16790         Merge from coreutils.
16791
16792         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16793         * lib/umaxtostr.c: New files.
16794
16795         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16796         the usual <time.h> dance.
16797         (get_date): Change signature to support fractional time stamps.
16798         All callers changed.
16799         * lib/getdate.y: Include "getdate.h" first, as we can now
16800         assume C89 and don't need to worry about 'const'.
16801         Similarly, include "unlocked-io.h" near start, not in middle.
16802         Include <limits.h>.
16803         (textint.value): Use long int rather than int.
16804         (textint.digits): Use size_t rather than int.
16805         (BILLION, LOG10_BILLION): New constants.
16806         (parser_control): New member rel_ns.  Members day_ordinal,
16807         time_zone, month, day, hour, minutes, rel_year, rel_month,
16808         rel_day, rel_hour, rel_minutes, rel_seconds
16809         are now long int, not int.  Member seconds is now struct timespec,
16810         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16811         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16812         not int.
16813         (%union.intval): Now long int, not int.
16814         New member timespec.
16815         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16816         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16817         (spec): Now is a timespec or an item list.
16818         (timespec, items): New nonterminals.
16819         (time, rel, relunit, number, get_date):
16820         Add support for fractional seconds.
16821         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16822         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16823         (to_hour): First arg is now long int, not int.
16824         (to_year): Returns long int, not int.
16825         Don't treat year -70 like 70.
16826         (tm_diff): Returns long int, not int.
16827         (lookup_word): Use bool instead of int when appropriate.
16828         (yylex): Use size_t for count, not int.
16829         Detect overflow when parsing large integer constants.
16830         Add support for fractions.
16831         (get_date): Make pointers 'const' if possible.
16832         Use more-portable code to detect integer overflow.
16833         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16834         Don't use ctime; it's not reliable if the year has >4 digits.
16835
16836         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16837         This is for compatibility with BSD.
16838
16839         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16840         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16841         From coreutils' system.h.
16842
16843         * lib/userspec.c: Don't include "posixver.h".
16844         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16845         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16846         compatible extension.  Simplify code by removing a boolean int
16847         that was always nonzero if a string was nonnull.
16848
16849 2004-03-30  Jim Meyering  <jim@meyering.net>
16850
16851         Merge from coreutils.
16852
16853         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16854         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16855         on some systems one must include <grp.h> before it.
16856         Reported by Christian Krackowizer.
16857
16858 2004-03-30  Jim Meyering  <jim@meyering.net>
16859
16860         Merge from coreutils.
16861
16862         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
16863
16864         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
16865         an empty input stream.
16866
16867         * lib/readtokens.c: Include <stdbool.h>.
16868         (readtoken): Use `size_t' rather than int/long.
16869         All callers adjusted.
16870         Use `bool' rather than `int' where appropriate.
16871         Use memset rather than an explicit loop.
16872         Use x2nrealloc rather than xrealloc.
16873         Allow the use of `\0' as a delimiter.
16874         (readtokens): Likewise.
16875         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
16876
16877 2004-03-30  Jim Meyering  <jim@meyering.net>
16878
16879         * m4/realloc.m4: Remove file, since now it does no more than
16880         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
16881         the `configure.ac' section of module/realloc.
16882         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
16883
16884 2004-03-30  Bruno Haible  <bruno@clisp.org>
16885
16886         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
16887         nonnull.
16888
16889 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16890
16891         Merge changes to getloadavg.c from coreutils and Emacs.
16892
16893         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
16894         Define to an expression, not to the empty string.
16895         Include cloexec.h and xalloc.h.
16896         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
16897         Use set_cloexec_flag rather than rolling our own.
16898         * lib/cloexec.c, lib/cloexec.h: New files.
16899
16900 2004-03-29  Paul Eggert  <eggert@twinsun.com>
16901
16902         * m4/cloexec.m4: New file.
16903
16904 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16905
16906         * lib/getopt.h: Sync with libc CVS.
16907
16908 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16909             Bruno Haible  <bruno@clisp.org>
16910
16911         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
16912         mbswidth.
16913
16914 2004-03-18  Paul Eggert  <eggert@twinsun.com>
16915             Bruno Haible  <bruno@clisp.org>
16916
16917         * lib/mbswidth.h: Include <wchar.h> only if
16918         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
16919         <wchar.h>.
16920         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
16921
16922 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16923
16924         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
16925         Sync with libc CVS.
16926         * lib/getopt_int.h: New file, also synced from libc.
16927
16928 2004-03-09  Paul Eggert  <eggert@twinsun.com>
16929
16930         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
16931         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
16932         Bring back getopt.c, getopt.h, getopt1.c.
16933
16934 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16935
16936         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
16937         All uses changed.  Check for sa_sigaction member; this fixes
16938         a bug first reported by Jason Andrade in
16939         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16940
16941 2004-03-07  Paul Eggert  <eggert@twinsun.com>
16942
16943         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
16944         '#if' expressions.  Unlike the code it replaces, it does not
16945         depend on (defined _SC_PAGESIZE).  However, it does depend on
16946         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
16947         first reported by Jason Andrade in
16948         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
16949
16950 2004-02-25  Simon Josefsson  <jas@extundo.com>
16951
16952         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
16953
16954 2004-02-25  Simon Josefsson  <jas@extundo.com>
16955
16956         * lib/strdup.h: New file.
16957         * lib/strdup.c: Include it.
16958         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
16959         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
16960
16961 2004-02-23  Karl Berry  <karl@gnu.org>
16962
16963         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
16964         (from fencepost.gnu.org:/gd/gnuorg).
16965
16966 2004-02-23  Karl Berry  <karl@gnu.org>
16967
16968         * config/srclistvars.sh (GNUORG) [karl]: redefine.
16969         * config/srclist.txt: add maintain/standards documents.
16970
16971 2004-02-18  Bruno Haible  <bruno@clisp.org>
16972
16973         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
16974         Reported by Derek Robert Price <derek@ximbiot.com>.
16975
16976 2004-02-16  Karl Berry  <karl@gnu.org>
16977
16978         * config/mkinstalldirs, install-sh: update from automake.
16979
16980 2004-02-06  Karl Berry  <karl@gnu.org>
16981
16982         * m4/po.m4: update from gettext 0.14.1.
16983
16984 2004-02-06  Karl Berry  <karl@gnu.org>
16985
16986         * lib/config.charset: update from gettext 0.14.1.
16987
16988 2004-02-05  Paul Eggert  <eggert@twinsun.com>
16989
16990         Add comments and code, prompted by suggestions from Bruno Haible
16991         for sh-quote.
16992         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
16993         describing the enum quoting_style values.
16994         * lib/quotearg.c (quotearg_alloc): New function.
16995         (quotearg_buffer_restyled): Treat lone { and } as special.
16996         Treat = as special.  Work around bug with older shells
16997         that "see" a '\' that is really the 2nd byte of a multibyte char.
16998         Quote empty string with shell_quoting_style.
16999
17000 2004-02-03  Bruno Haible  <bruno@clisp.org>
17001
17002         * m4/pipe.m4: New file, from GNU gettext.
17003
17004 2004-02-03  Bruno Haible  <bruno@clisp.org>
17005
17006         * lib/pipe.h: New file, from GNU gettext.
17007         * lib/pipe.c: New file, from GNU gettext.
17008
17009 2004-01-27  Bruno Haible  <bruno@clisp.org>
17010
17011         * m4/execute.m4: New file, from GNU gettext.
17012
17013 2004-01-27  Bruno Haible  <bruno@clisp.org>
17014
17015         * lib/execute.h: New file, from GNU gettext.
17016         * lib/execute.c: New file, from GNU gettext.
17017         * lib/w32spawn.h: New file, from GNU gettext.
17018
17019 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17020
17021         Merge from diffutils.
17022
17023         * lib/file-type.c (file_type): Add typed memory objects.
17024         * lib/file-type.h (S_TYPEISTMO): New macro.
17025
17026         * lib/c-stack.h (c_stack_action): Remove argv argument.
17027         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17028         (die): Don't calculate message unless segv_action returns.
17029         (get_stack_location, min_address_from_argv, max_address_from_argv,
17030         volatile stack_base, volatile_stack_size): Remove.
17031         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17032         that every segmentation violation is a stack overflow.  (Ouch!)
17033         See Debian bug 136249 (still outstanding) for more info about why
17034         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17035
17036 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17037
17038         Exit-status fix from coreutils.
17039
17040         Use exit_failure consistently in place of EXIT_FAILURE,
17041         so that program exit statuses are consistent on failure.
17042
17043         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17044         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17045         * lib/argmatch.h: Comment fix to match the above.
17046         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17047         Now a macro referring to exit_failure, instead of a separate
17048         variable.  Include "exitfail.h" to get it.
17049         * lib/xstrtol.h: Include "exitfail.h".
17050         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17051
17052         * lib/long-options.c (parse_long_options): Use prototype
17053         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17054         for clarity.
17055
17056 2004-01-21  Jim Meyering  <jim@meyering.net>
17057
17058         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17059         so as not to conflict with a different-sized __mktime_internal
17060         function in GNU libc.
17061         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17062         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17063
17064 2004-01-20  Karl Berry  <karl@gnu.org>
17065
17066         * config/config.guess: update from config.
17067
17068         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17069
17070 2004-01-20  Bruno Haible  <bruno@clisp.org>
17071
17072         Safer stack allocation.
17073         * lib/setenv.c: Include allocsa.h.
17074         (alloca): Remove fallback definition.
17075         (freea): Remove macro.
17076         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17077         instead of freea.
17078
17079 2004-01-20  Bruno Haible  <bruno@clisp.org>
17080
17081         * m4/eealloc.m4: New file, from GNU gettext.
17082
17083 2004-01-20  Bruno Haible  <bruno@clisp.org>
17084
17085         * m4/allocsa.m4: New file, from GNU gettext.
17086
17087 2004-01-20  Bruno Haible  <bruno@clisp.org>
17088
17089         * lib/xallocsa.h: New file, from GNU gettext.
17090         * lib/xallocsa.c: New file, from GNU gettext.
17091
17092 2004-01-20  Bruno Haible  <bruno@clisp.org>
17093
17094         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17095
17096 2004-01-20  Bruno Haible  <bruno@clisp.org>
17097
17098         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17099         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17100         specially.
17101
17102 2004-01-20  Bruno Haible  <bruno@clisp.org>
17103
17104         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17105         patch.
17106
17107 2004-01-20  Bruno Haible  <bruno@clisp.org>
17108
17109         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17110
17111 2004-01-20  Bruno Haible  <bruno@clisp.org>
17112
17113         * lib/eealloc.h: New file.
17114
17115 2004-01-20  Bruno Haible  <bruno@clisp.org>
17116
17117         * lib/binary-io.h: Avoid warnings on Cygwin.
17118
17119 2004-01-20  Bruno Haible  <bruno@clisp.org>
17120
17121         * lib/allocsa.h: New file, from GNU gettext.
17122         * lib/allocsa.c: New file, from GNU gettext.
17123
17124 2004-01-18  Karl Berry  <karl@gnu.org>
17125
17126         * doc/gpl.texi, doc/lgpl.texi: new files.
17127
17128 2004-01-18  Karl Berry  <karl@gnu.org>
17129
17130         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17131         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17132
17133 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17134
17135         Merge from coreutils.
17136
17137         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17138         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17139         (gl_DEFAULT_POSIX2_VERSION): Move
17140         the documentation from 'configure' into 'config.hin',
17141         so that 'configure --help' isn't burdened by it and
17142         we don't have to worry about its formatting there.
17143         Reword the documentation so that it's more succinct
17144         and can be run together into a single paragraph.
17145         * m4/same.m4 (gl_SAME): Check for pathconf.
17146
17147 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17148
17149         Merge from coreutils.
17150
17151         * lib/posixver.c: Include posixver.h.
17152
17153         * lib/same.c: Include <stdbool.h>, <limits.h>.
17154         (_POSIX_NAME_MAX): Define if not defined.
17155         (MIN): New macro.
17156         (same_name): If file names are silently truncated, report
17157         that the file names are the same if they are the same after
17158         the silent truncation.
17159
17160         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17161         conversion function.
17162         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17163         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17164         longer needed.
17165
17166 2004-01-15  Jim Meyering  <jim@meyering.net>
17167
17168         Merge from coreutils.
17169
17170         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17171         if no library is required.
17172         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17173         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17174         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17175         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17176         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17177         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17178         value, $ac_cv_search_crypt, if it's "none required".
17179         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17180         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17181         not gl_FUNC_GETLOADAVG.
17182         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17183         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17184
17185 2004-01-15  Jim Meyering  <jim@meyering.net>
17186
17187         Merge from coreutils.
17188
17189         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17190         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17191         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17192
17193         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17194         optional configure-time default.
17195
17196         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17197
17198         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17199
17200 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17201
17202         Merge from coreutils.
17203
17204         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17205         value, $ac_cv_search_nanosleep, if it's "none required".
17206
17207 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17208
17209         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17210         with like-named macro in fnmatch.c.
17211         (EXT): Use an internal constant instead.
17212
17213         Merge fnmatch patches from glibc.
17214         * lib/fnmatch.c (mbsinit): Remove define.
17215         Add libc_hidden_ver (__fnmatch, fnmatch).
17216         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17217         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17218
17219 2004-01-14  Karl Berry  <karl@gnu.org>
17220
17221         * config/install-sh: update from automake.
17222
17223 2004-01-13  Karl Berry  <karl@gnu.org>
17224
17225         * config/install-sh: update from automake.
17226
17227 2004-01-09  Karl Berry  <karl@gnu.org>
17228
17229         * config/install-sh: update from automake.
17230
17231 2004-01-05  Karl Berry  <karl@gnu.org>
17232
17233         * config/config.{sub,guess}: update from config.
17234
17235 2003-12-31  Karl Berry  <karl@gnu.org>
17236
17237         * config/depcomp: update from automake.
17238
17239 2003-12-14  Karl Berry  <karl@gnu.org>
17240
17241         * lib/config.charset: update from gettext-runtime.
17242
17243 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17244
17245         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17246         Bug reported by Alfred M. Szmidt.
17247
17248 2003-12-03  Bruno Haible  <bruno@clisp.org>
17249
17250         * m4/gettext.m4: Upgrade from gettext-0.13.
17251         * m4/po.m4: Upgrade from gettext-0.13.
17252         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17253         * m4/intmax.m4: New file, from gettext-0.13.
17254         * m4/printf-posix.m4: New file, from gettext-0.13.
17255
17256 2003-11-29  Karl Berry  <karl@gnu.org>
17257
17258         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17259
17260 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17261             Bruno Haible  <bruno@clisp.org>
17262
17263         * lib/printf-parse.h: Don't include sys/types.h.
17264         (ARG_NONE): New macro.
17265         (char_directive): Change type of *arg_index fields to size_t.
17266         * lib/printf-parse.c: Don't include sys/types.h.
17267         (SSIZE_MAX): Remove macro.
17268         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17269         Remove unnecessary overflow check.
17270         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17271         fields.
17272
17273 2003-11-25  Bruno Haible  <bruno@clisp.org>
17274
17275         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17276
17277 2003-11-25  Bruno Haible  <bruno@clisp.org>
17278
17279         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17280         gt_TYPE_SSIZE_T.
17281
17282 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17283
17284         * modules/alloca: Remove dependency on xalloc.
17285
17286 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17287
17288         * lib/alloca.c: Remove dependency on xalloc module.
17289         (xalloc_die): Remove.
17290         (memory_full) [!defined emacs]: New macro.
17291         [!defined emacs]: Don't include xalloc.h.
17292         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17293         address arithmetic overflows.  Change datatypes a bit to avoid
17294         unnecessary casts.
17295
17296 2003-11-22  Jim Meyering  <jim@meyering.net>
17297
17298         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17299         s/size/size_t/.
17300
17301 2003-11-21  Karl Berry  <karl@gnu.org>
17302
17303         * config/config.{sub,guess}: update from config.
17304
17305 2003-11-18  Karl Berry  <karl@gnu.org>
17306
17307         * config/config.{sub,guess}: update from config.
17308
17309         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17310
17311 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17312
17313         * README: Mention that S+T cannot overflow if S is the size of
17314         an existing object and T is sufficiently small.
17315
17316 2003-11-17  Jim Meyering  <jim@meyering.net>
17317
17318         On systems without utime and without a utimes function capable of
17319         dealing with a NULL struct utimbuf* argument, this utime replacement
17320         could -- in unusual circumstances -- leak a file descriptor.
17321         * lib/utime.c: Include <unistd.h> and <errno.h>.
17322         (utime_null): Be sure to close `fd' and to preserve errno.
17323         Reported by Geoff Collyer via Arnold Robbins.
17324
17325 2003-11-17  Bruno Haible  <bruno@clisp.org>
17326
17327         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17328         (Depends-on): Add xsize.
17329
17330 2003-11-17  Bruno Haible  <bruno@clisp.org>
17331
17332         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17333
17334 2003-11-17  Bruno Haible  <bruno@clisp.org>
17335
17336         * lib/vasnprintf.c (alloca): Remove fallback definition.
17337         (freea): Remove definition.
17338         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17339         Reported by Paul Eggert.
17340
17341 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17342             Bruno Haible  <bruno@clisp.org>
17343
17344         Protect against address arithmetic overflow.
17345         * lib/printf-args.h: Include stddef.h.
17346         (arguments): Change type of field 'count' to size_t.
17347         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17348         'unsigned int' where appropriate.
17349         * lib/printf-parse.h: Include sys/types.h.
17350         (char_directive): Change type of *arg_index fields to ssize_t.
17351         (char_directives): Change type of fields 'count', max_*_length to
17352         size_t.
17353         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17354         (SSIZE_MAX): Define fallback value.
17355         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17356         instead of 'int' where appropriate. Check a_allocated, d_allocated
17357         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17358         * lib/vasnprintf.c: Include xsize.h.
17359         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17360         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17361         overflow. Avoid wraparound when converting a width or precision from
17362         decimal to binary.
17363
17364 2003-11-16  Bruno Haible  <bruno@clisp.org>
17365
17366         Update from GNU gettext.
17367         * lib/printf-parse.c: Generalize to it can be compiled for wide
17368         strings.
17369         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17370         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17371         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17372         SNPRINTF): New macros.
17373         Don't include <alloca.h> if the file is used inside libintl.
17374         (local_wcslen): New function, for Solaris 2.5.1.
17375         (VASNPRINTF): Use it instead of wcslen.
17376
17377 2003-11-16  Bruno Haible  <bruno@clisp.org>
17378
17379         * lib/xsize.h (xmax): New function.
17380         (xsum, xsum3, xsum4): Declare as "pure" functions.
17381
17382 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17383
17384         * modules/xalloc (Files): Undo latest change, since xalloc.h
17385         no longer needs SIZE_MAX or PTRDIFF_MAX.
17386
17387 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17388
17389         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17390         gl_PTRDIFF_MAX.
17391
17392 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17393
17394         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17395         "return", to pacify some unknown compiler.  Problem reported
17396         by Joerg Schilling.
17397
17398 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17399
17400         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17401         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17402         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17403         heuristic is just as accurate as far as we know, and it removes a
17404         dependency on size_max.m4 and ptrdiff_max.m4.
17405
17406 2003-11-11  Bruno Haible  <bruno@clisp.org>
17407
17408         * modules/xsize (Files): Add m4/size_max.m4.
17409         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17410
17411 2003-11-11  Bruno Haible  <bruno@clisp.org>
17412
17413         * m4/size_max.m4: New file.
17414         * m4/ptrdiff_max.m4: New file.
17415         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17416         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17417         (gl_XALLOC): Invoke it.
17418
17419 2003-11-11  Bruno Haible  <bruno@clisp.org>
17420
17421         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17422         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17423         defined.
17424
17425 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17426
17427         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17428         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17429         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17430         From Bruno Haible.
17431         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17432         not (size_t) -1, since it's defined here.
17433
17434 2003-11-09  Karl Berry  <karl@gnu.org>
17435
17436         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17437
17438 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17439
17440         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17441         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17442         Reject sizes of exactly SIZE_MAX bytes.
17443         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17444         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17445
17446 2003-11-05  Bruno Haible  <bruno@clisp.org>
17447
17448         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17449         SIZE_MAX defined in <limits.h> on Solaris.
17450
17451 2003-11-04  Jim Meyering  <jim@meyering.net>
17452
17453         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17454         variable names, rather than @VAR@.
17455         * modules/poll: Likewise.
17456
17457 2003-11-04  Bruno Haible  <bruno@clisp.org>
17458
17459         * modules/xsize: New file.
17460         * modules/linebreak: Depend on xsize.
17461         * MODULES.html.sh (func_all_modules): Add xsize.
17462
17463 2003-11-04  Bruno Haible  <bruno@clisp.org>
17464
17465         * m4/xsize.m4: New file.
17466
17467 2003-11-04  Bruno Haible  <bruno@clisp.org>
17468
17469         * lib/xsize.h: New file.
17470         * lib/linebreak.c: Include xsize.h.
17471         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17472         argument for overflow.
17473         Suggested by Paul Eggert.
17474
17475 2003-11-03  Karl Berry  <karl@gnu.org>
17476
17477         * config/config.{guess,sub}: update from config.
17478
17479 2003-11-03  Jim Meyering  <jim@meyering.net>
17480
17481         * modules/userspec (lib_SOURCES): Add userspec.h.
17482         (Include): Add "userspec.h".
17483         Improve description.
17484
17485 2003-11-03  Jim Meyering  <jim@meyering.net>
17486
17487         * lib/userspec.c: Include "userspec.h".
17488         * lib/userspec.h: New file.
17489
17490 2003-11-03  Bruno Haible  <bruno@clisp.org>
17491
17492         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17493
17494 2003-11-03  Bruno Haible  <bruno@clisp.org>
17495
17496         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17497         available, to avoid (extremely rare) race condition.
17498         Suggested by Paul Eggert.
17499
17500 2003-11-02  Karl Berry  <karl@gnu.org>
17501
17502         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17503
17504 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17505
17506         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17507         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17508         (read_filesystem_list): Set and use me_type_malloced.
17509         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17510         whatever the type happens to be), for brevity and consistency.
17511         Check for size calculation overflow on Alphas running OSF/1.
17512
17513 2003-10-31  Jim Meyering  <jim@meyering.net>
17514
17515         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17516
17517         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17518
17519 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17520             Bruno Haible  <bruno@clisp.org>
17521
17522         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17523         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17524
17525 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17526
17527         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17528         netbsd*-gnu*.  Suggested by Robert Millan.
17529
17530 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17531
17532         * modules/group-member: Depend on stdbool.
17533
17534 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17535
17536         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17537
17538 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17539
17540         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17541         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17542         after the 'gnu' in these cases.  This fixes some bugs in the
17543         previous change, and is based on suggestions by Robert Millan.
17544
17545 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17546
17547         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17548         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17549         no longer needed.
17550         * lib/quotearg.c (quotearg_n_options): Use it.
17551         * lib/group-member.c: Include <stdbool.h>.
17552         (free_group_info): Arg is now const *; don't free arg.
17553         (get_group_info): Now returns bool and accepts struct group_info *,
17554         rather than returning a malloc'ed struct group_info *.
17555         All uses changed.  Check for overflow in internal size calculation.
17556
17557         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17558         rather than xmalloc/xrealloc.
17559         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17560         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17561         conformance bug: the old code used a pointer after freeing the
17562         storage that it addressed.
17563         * lib/hash.c (hash_initialize): Simplify the code by using
17564         xalloc_oversized rather than doing it by hand.
17565         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17566         the buffer preserved.  Use free and xmalloc instead.
17567         * lib/quotearg.c (quotearg_n_options): Likewise.
17568         Use a simpler test for size overflow.  Don't use xalloc_oversized
17569         because unsigned int might be wider than size_t (!); this suggests
17570         that we should switch from unsigned int to size_t for slot numbers.
17571
17572 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17573
17574         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17575         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17576         NetBSD kernels.  Requested by Richard Stallman.
17577
17578 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17579
17580         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17581         to allocate the returned structure.  Do not allocate a subarray,
17582         as x2nrealloc will do that.
17583         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17584         instead of xnrealloc.
17585         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17586
17587 2003-10-27  Bruno Haible  <bruno@clisp.org>
17588
17589         * lib/stdbool_.h: Better support for BeOS.
17590
17591 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17592
17593         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17594         now uses inline.
17595
17596 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17597
17598         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17599         callers that want to do their own size-overflow checking.  Include
17600         <stdbool.h>, since xalloc_oversized returns bool.
17601         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17602         to use xalloc_oversized.
17603
17604         Add two functions x2realloc, x2nrealloc, for programs that grow
17605         arrays dynamically by doubling their sizes.
17606         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17607         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17608         New functions.
17609
17610         Port to C99 semantics for 'inline' of external functions.
17611         Bug reported by Bruno Haible.
17612         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17613         with the old contents of xnmalloc.
17614         (xnmalloc, xmalloc): Use it.
17615         (xnrealloc_inline): New static inline function,
17616         with the old contents of xnrealloc.
17617         (xnrealloc, xrealloc): Use it.
17618
17619         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17620         that.
17621
17622 2003-10-26  Karl Berry  <karl@gnu.org>
17623
17624         * config/srclist.txt (COPYING.DOC): no longer available from
17625         /gd/gnuorg; don't know where the ultimate source is.
17626
17627 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17628
17629         Fix several address-calculation bugs in the hash modules,
17630         plus some minor code cleanup.
17631
17632         * lib/hash.h: Include <stdbool.h>, for bool.
17633         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17634         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17635         hash_get_n_entries, hash_get_max_bucket_length,
17636         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17637         hash_rehash): Use size_t rather than unsigned.
17638         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17639         hash_get_n_buckets_used, hash_get_n_entries,
17640         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17641         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17642         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17643         Likewise.
17644         (SIZE_MAX): Define if not defined.
17645         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17646         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17647         hash_print):
17648         Use const * when possible.
17649         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17650         (check_tuning): Fix bug: if tuning parameters were very close to
17651         0 or 1, rounding errors could have caused subscript violations.
17652         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17653         (hash_initialize): Add 'fail:' label
17654         to free table and return NULL, and use it to simplify code.
17655         Use calloc rather than clearing the storage ourself.
17656         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17657         buffer size calculations.
17658         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17659         Include <stddef.h>, for size_t.
17660         * lib/hash-pjw.c (hash_pjw): Likewise.
17661         Switch to method described by Bruno Haible.
17662         Include <limits.h>, for CHAR_BIT.
17663         (SIZE_BITS): New macro.
17664
17665 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17666
17667         * m4/getline.m4 (AM_FUNC_GETLINE):
17668         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17669         hosts.  Problem reported by Derek Robert Price in
17670         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17671         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17672         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17673
17674 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17675
17676         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17677         ceiling the allocation at NMAX bytes rather than silently
17678         discarding input bytes before NMAX is reached.  This makes
17679         a difference only if NMAX exceeds SIZE_MAX / 2.
17680
17681         * lib/obstack.c: Merge from glibc.
17682         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17683         Add libc_hidden_def (_obstack_newchunk).
17684         (_obstack_free) [! defined _LIBC]: Remove.
17685         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17686         a clone of the function body.
17687         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17688         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17689
17690         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17691         glibc.
17692         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17693         arg to memcpy.
17694
17695         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17696         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17697         Don't use lvalue casts, as GCC plans to remove support for them
17698         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17699         was also present in the non-GCC version, indicating that this
17700         code had always been buggy and had never been widely used.
17701         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17702         Use the fast variant of each macro, rather than copying the
17703         definiens of the fast variant; that way, we'll be more likely to
17704         catch future bugs in the fast variants.
17705
17706 2003-10-20  Bruno Haible  <bruno@clisp.org>
17707
17708         * modules/wait-process: New file.
17709         * MODULES.html.sh (func_all_modules): Add wait-process.
17710
17711 2003-10-20  Bruno Haible  <bruno@clisp.org>
17712
17713         * m4/wait-process.m4: New file.
17714
17715 2003-10-20  Bruno Haible  <bruno@clisp.org>
17716
17717         * lib/wait-process.h: New file, from GNU gettext.
17718         * lib/wait-process.c: New file, from GNU gettext.
17719
17720 2003-10-19  Jim Meyering  <jim@meyering.net>
17721
17722         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17723         HPUX 10.20.
17724
17725 2003-10-18  Karl Berry  <karl@gnu.org>
17726
17727         * config/config.guess: update from config.
17728
17729 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17730
17731         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17732         (getgroups): First arg is int, not size_t.
17733         Don't let 'free' mangle errno.
17734
17735 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17736
17737         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17738
17739 2003-10-16  Karl Berry  <karl@gnu.org>
17740
17741         * config/config.{guess,sub}: update from config.
17742
17743 2003-10-16  Jim Meyering  <jim@meyering.net>
17744
17745         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17746         memcpy.
17747
17748 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17749
17750         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17751         (SIZE_MAX): Remove.
17752         (new_exclude, add_exclude_file): Initial size no longer needs to
17753         be a power of 2.
17754         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17755         our own address arithmetic overflow checking.
17756
17757         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17758         (fnmatch): Do not alloca more than 2000 wide characters;
17759         instead, use malloc for large buffers.
17760         Check for address arithmetic overflow, and return -1
17761         with errno set to ENOMEM in that case.
17762         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17763         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17764         instead, return -1.  Check for address arithmetic overflow.
17765
17766 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17767
17768         Handle invalid suffixes and overflow independently, so that
17769         callers can treat them independently as needed.  Fix some bugs in
17770         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17771         suffix for a human-readable blocksize.  The major caller-visible
17772         change is the addition of a new
17773         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17774         that both overflow and suffix chars were found.
17775
17776         * lib/human.c (humblock): Don't check separately for invalid suffix
17777         char; that is xstrtoumax's job (now that its bug is fixed).
17778         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17779         INTMAX_MAX]: New macros.
17780         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17781         TYPE_MAXIMUM): New macros.
17782         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17783         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17784         if overflow occurs, as it's what __strtol does and it's more useful
17785         in practice.
17786         (__xstrtol): If __strtol reports some error other than ERANGE,
17787         reflect it to the caller as LONGINT_INVALID.  If it reports
17788         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17789         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17790         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17791         value.
17792         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17793         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17794         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17795         [defined UINTMAX_MAX]: New macros.
17796
17797 2003-10-14  Bruno Haible  <bruno@clisp.org>
17798
17799         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17800
17801 2003-10-14  Bruno Haible  <bruno@clisp.org>
17802
17803         * m4/sig_atomic_t: New file, from GNU gettext.
17804         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17805
17806 2003-10-14  Bruno Haible  <bruno@clisp.org>
17807
17808         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17809         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17810         Also use volatile where needed.
17811
17812 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17813
17814         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17815         Change maintainer from Bruno Haible to 'all'.
17816
17817 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17818
17819         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17820
17821 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17822
17823         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17824         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17825         and define in terms of the other primitives.
17826         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17827         (SIZE_MAX): Define if not already defined.
17828         (array_size_overflow): New function.
17829         (xalloc_die): Abort instead of exiting if 'error' returns.
17830         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17831         (xmalloc, xrealloc): Use them.
17832         (xcalloc): Check for address arithmetic overflow.
17833         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17834         a bit faster than strcpy.
17835
17836 2003-10-10  Simon Josefsson  <jas@extundo.com>
17837
17838         * modules/argp (Depends-on): Add restrict and strcase.
17839
17840 2003-10-10  Simon Josefsson  <jas@extundo.com>
17841
17842         * m4/argp.m4: Add AC_C_INLINE.
17843
17844 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17845
17846         Merge getpass from libc, plus a few fixes.
17847
17848         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17849         Include <stdbool.h>.
17850         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17851         __fsetlocking to empty.
17852         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17853         do include <bits/libc-lock.h>.
17854         Do not include <fcntl.h>; not needed.
17855         [_LIBC]: Include <wchar.h>.
17856         (NOTCANCEL_MODE): New macro.
17857         (flockfile, funlockfile) [_LIBC]: New macros.
17858         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
17859         [!_LIBC]: New macros.
17860         (call_fclose): New function.
17861         (getpass): Use it.  Save tty stream separately; this simplifies the
17862         code and makes it more reliable if stdin happens to equal stdout.
17863         Invoke __fsetlocking on tty.
17864         Handle thread cancellation if needed.
17865         Namespace cleanup (use __tcgetattr, __getline).
17866         Use bool for Booleans.
17867         [USE_IN_LIBIO]: Handle wide streams.
17868         [!_LIBC]: Unconditionally do the fseek, since we don't know what
17869         stream might go where.
17870
17871         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
17872         doesn't have to include <stdio.h> before us.
17873         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
17874         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
17875         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
17876         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
17877         if not declared, so that we can use getpass.c code from libc without
17878         rewriting it.
17879         (flockfile, ftrylockfile, funlockfile): New macros.
17880
17881 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17882
17883         * modules/getpass: Depend on stdbool.
17884
17885 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17886
17887         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
17888
17889 2003-10-07  Karl Berry  <karl@gnu.org>
17890
17891         * config/config.{guess,sub}: update from config.
17892
17893 2003-10-06  Jim Meyering  <jim@meyering.net>
17894             Bruno Haible  <bruno@clisp.org>
17895
17896         This lets translators provide better translations for the
17897         "Written by ..." part of --version output.
17898         * lib/version-etc.h: Include stdarg.h.
17899         (version_etc_copyright): Declare as readonly.
17900         (version_etc): Make this function variadic with a NULL-terminated list
17901         of author name strings.
17902         (version_etc_va): New declaration.
17903         * lib/version-etc.c: Include stdarg.h, stdlib.h.
17904         (version_etc_copyright): Declare as readonly.
17905         (version_etc_va): New function. Provide a different translatable string
17906         for each possible number of authors < 10. Abbreviate when there are 10
17907         authors or more.
17908         (version_etc): Make this function variadic. Call version_etc_va.
17909         Suggestion from Gary V. Vaughan.
17910
17911         * lib/long-options.h (parse_long_options): Change prototype: the
17912         authors string is moved to the end and becomes variadic.
17913         * lib/long-options.c: Include stdarg.h.
17914         (parse_long_options): Make this function variadic, too.
17915         Call version_etc_va, not version_etc.
17916
17917 2003-10-06  Bruno Haible  <bruno@clisp.org>
17918
17919         * modules/version-etc-2: Remove file.
17920         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
17921
17922 2003-10-06  Bruno Haible  <bruno@clisp.org>
17923
17924         * modules/fatal-signal: New file.
17925         * MODULES.html.sh (func_all_modules): Add fatal-signal.
17926
17927 2003-10-06  Bruno Haible  <bruno@clisp.org>
17928
17929         * m4/fatal-signal.m4: New file.
17930         * m4/signalblocking.m4: New file, from GNU gettext.
17931
17932 2003-10-06  Bruno Haible  <bruno@clisp.org>
17933
17934         * lib/version-etc-2.h: Remove file.
17935         * lib/version-etc-2.c: Remove file.
17936
17937 2003-10-06  Bruno Haible  <bruno@clisp.org>
17938
17939         * lib/fatal-signal.h: New file, from GNU gettext.
17940         * lib/fatal-signal.c: New file, from GNU gettext.
17941
17942 2003-10-05  Paul Eggert  <eggert@twinsun.com>
17943
17944         * README: Rework advice for preventing empty .o files.
17945         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
17946         not <sys/types.h>.
17947
17948 2003-10-04  Karl Berry  <karl@gnu.org>
17949
17950         * lib/argp*: update from libc.
17951
17952 2003-10-04  Karl Berry  <karl@gnu.org>
17953
17954         * config/config.{guess,sub}: update from config.
17955
17956 2003-10-02  Bruno Haible  <bruno@clisp.org>
17957
17958         * modules/lchown (Include): Add lchown.h.
17959         * modules/time_r (Include): Use "..." syntax.
17960         * modules/xgetdomainname (Include): Add xgetdomainname.h.
17961
17962 2003-10-01  Simon Josefsson  <jas@extundo.com>
17963
17964         * MODULES.html.sh (func_all_modules): Move gethostname from section
17965         'based on' to section 'lacking' POSIX:2001.
17966
17967 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
17968
17969         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
17970         to output mode on the same stream.
17971
17972 2003-09-29  Paul Eggert  <eggert@twinsun.com>
17973
17974         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
17975         Fix arg typo in previous patch.
17976
17977 2003-09-28  Jim Meyering  <jim@meyering.net>
17978
17979         * lib/error.c: Correct cpp indentation.
17980
17981 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17982
17983         * modules/free: New file.
17984
17985 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17986
17987         * m4/free.m4: New file.
17988
17989 2003-09-27  Paul Eggert  <eggert@twinsun.com>
17990
17991         * lib/minmax.h (MIN, MAX)
17992         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
17993         Omit the special code that used __typeof__, since we worry that
17994         it could be more trouble than it's worth.  See:
17995         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
17996         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
17997
17998         * lib/free.c: New file.
17999
18000 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18001
18002         Trivial fixes to Makefile.am parts of module listings.
18003         * modules/strstr: Append strstr.h to lib_SOURCES.
18004         * modules/strcase: Likewise, for strcase.h.
18005
18006 2003-09-27  Karl Berry  <karl@gnu.org>
18007
18008         * config/mkinstalldirs: update from automake.
18009
18010 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18011
18012         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18013         (error_tail): Do not loop, reallocating temporary buffer, since
18014         the output cannot contain more wide characters than the input
18015         contains bytes, the size must be big enough already.  This avoids
18016         one potential size overflow calculation.  Check for size overflow
18017         when calculating temporary buffer size.  Free temporary buffer
18018         when done, if it was allocated with malloc; this plugs a memory
18019         leak.  Remove casts from void * to pointers, that are no longer
18020         needed now that we're assuming C89 or better.
18021
18022         Merge error changes from glibc.
18023
18024         * lib/error.c, error.h: Update copyright notice header to match glibc.
18025         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18026         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18027         Disable cancellation while printing error.
18028         * lib/error.h: Prepend __ to parameter names.
18029
18030 2003-09-26  Jim Meyering  <jim@meyering.net>
18031
18032         * lib/error.c (error_tail): Move some declarations
18033         into inner scope where the local variables are used.
18034
18035 2003-09-26  Bruno Haible  <bruno@clisp.org>
18036
18037         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18038         stpncpy().
18039         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18040
18041 2003-09-26  Bruno Haible  <bruno@clisp.org>
18042
18043         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18044         (stpncpy): Define as alias for gnu_stpncpy.
18045         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18046
18047 2003-09-25  Simon Josefsson  <jas@extundo.com>
18048
18049         * lib/xgetdomainname.h: New file.
18050         * lib/xgetdomainname.c: New file.
18051
18052 2003-09-25  Simon Josefsson  <jas@extundo.com>
18053             Bruno Haible  <bruno@clisp.org>
18054
18055         * modules/getdomainname: New file.
18056         * modules/xgetdomainname: New file.
18057         * MODULES.html.sh (func_all_modules): Add getdomainname,
18058         xgetdomainname.
18059
18060 2003-09-25  Simon Josefsson  <jas@extundo.com>
18061             Bruno Haible  <bruno@clisp.org>
18062
18063         * m4/getdomainname.m4: New file.
18064
18065 2003-09-25  Simon Josefsson  <jas@extundo.com>
18066             Bruno Haible  <bruno@clisp.org>
18067
18068         * lib/getdomainname.h: New file.
18069         * lib/getdomainname.c: New file.
18070
18071 2003-09-25  Karl Berry  <karl@gnu.org>
18072
18073         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18074
18075 2003-09-25  Karl Berry  <karl@gnu.org>
18076
18077         * config/install-sh: update from automake.
18078
18079 2003-09-25  Bruno Haible  <bruno@clisp.org>
18080
18081         * modules/version-etc-2: New file, from modules/version-etc with
18082         modifications.
18083         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18084
18085 2003-09-25  Bruno Haible  <bruno@clisp.org>
18086
18087         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18088         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18089
18090 2003-09-24  Simon Josefsson  <jas@extundo.com>
18091
18092         * modules/xgethostname: Add xgethostname.h.
18093
18094 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18095
18096         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18097         the buffer associated with the argument.  Bug reported by
18098         Simon Josefsson.
18099
18100 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18101
18102         * README: Document assumptions that 'int' is at least 32 bits
18103         wide, that integer arithmetic is 2's complement without overflow,
18104         that there are no holes in integer values, that adding sizes of
18105         two nonoverlapping objects can't overflow, and that all-bits-zero
18106         yields scalar zero.  Fix spelling and capitalization typos.
18107
18108 2003-09-19  Karl Berry  <karl@gnu.org>
18109
18110         * lib/argp.h: update from libc.
18111
18112 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18113
18114         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18115         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18116         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18117
18118 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18119
18120         * gnulib-tool: Use "test -h", not "test -L", for portability
18121         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18122         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18123         (sed_extract_prog): Issue s commands one-by-one, rather than
18124         using \| in one s command.
18125
18126 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18127
18128         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18129         input error, instead of returning NULL the next time we are called
18130         (and therefore losing track of errno).
18131
18132 2003-09-16  Bruno Haible  <bruno@clisp.org>
18133
18134         * gnulib-tool (func_create_testdir): Warn about duplicated
18135         dependencies.
18136
18137 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18138
18139         * modules/argmatch, modules/fatal, modules/obstack,
18140         modules/xalloc, modules/xgethostname: Sort dependencies by
18141         importance, not alphabetically.
18142
18143 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18144
18145         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18146         fails, so that the caller gets the proper errno.
18147
18148         * lib/readutmp.c (read_utmp): Likewise.
18149         Check for fstat error.  Close stream and free storage
18150         when failing.
18151
18152 2003-09-14  Karl Berry  <karl@gnu.org>
18153
18154         * config/srclist.txt (strdup.c): disable for c89 changes.
18155
18156 2003-09-14  Jim Meyering  <jim@meyering.net>
18157
18158         * lib/getloadavg.c: Correct cpp indentation.
18159         * lib/strdup.c: Likewise.
18160         * lib/vasnprintf.c: Likewise.
18161
18162 2003-09-14  Bruno Haible  <bruno@clisp.org>
18163
18164         * modules/fwriteerror: New file.
18165         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18166
18167 2003-09-14  Bruno Haible  <bruno@clisp.org>
18168
18169         * lib/fwriteerror.h: New file.
18170         * lib/fwriteerror.c: New file.
18171
18172 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18173
18174         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18175         modules/xgethostname, modules/xalloc: Depend on exit.
18176
18177 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18178
18179         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18180
18181         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18182         and AC_MINIX, too, so that their extensions are available.
18183
18184         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18185         This macro has been superseded by gl_BACKUPFILE.
18186
18187         More patches to assume C89 or better.
18188
18189         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18190
18191         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18192         unconditionally.
18193         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18194         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18195         Include <string.h>, <stdlib.h> unconditionally.
18196         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18197         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18198         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18199         headers or for string.h.
18200         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18201         or strtoul.
18202
18203         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18204         headers.
18205         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18206         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18207         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18208         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18209         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18210         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18211         memcpy, memset.
18212         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18213         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18214         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18215         strtol.
18216         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18217         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18218         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18219         strtoul.
18220
18221 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18222
18223         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18224         * lib/obstack.c [!defined _LIBC]: Likewise.
18225         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18226         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18227         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18228
18229         More changes to assume C89 or better.
18230
18231         * lib/error.c (error_tail): Assume vprintf.
18232
18233         * lib/argmatch.c (getenv): Remove decl.
18234         * lib/progreloc.c (get_full_program_name): Define via prototype.
18235         * lib/setenv.c (clearenv): Likewise.
18236         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18237         needed.
18238         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18239         (malloc, memcpy): Remove decls.
18240         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18241         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18242         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18243         (memcpy): Remove macro.
18244         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18245         (__P): Remove.  All uses removed.
18246         (PTR): Remove.  All uses changed to void *.
18247         (CHAR_BIT, NULL): Remove.
18248         (spaces, zeros, memset_space, memset_zero)
18249         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18250         Remove.
18251         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18252         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18253         Define with prototype.
18254         Remove now-unnecessary prototype decl.
18255         (extra_args_spec): Assume ANSI C.  All uses changed.
18256         (extra_args_spec_iso): Remove.
18257         (my_strftime, emacs_strftimeu): Define via prototype.
18258         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18259         unconditionally.
18260         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18261         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18262         (strtoul, strtol): Remove decls.
18263         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18264         LONG_MAX): Remove.
18265         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18266         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18267         (LOCALE_PARAM_PROTO): New macro.
18268         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18269         (INTERNAL (strtol), strtol): Define with a prototype.
18270         (PARAMS): Remove.  All uses removed.
18271         * lib/tempname.c: Include <string.h> unconditionally.
18272         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18273         * lib/xgethostname.c (main): Define with a prototype.
18274         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18275         Include <stdlib.h> unconditionally.
18276         (calloc, malloc, realloc, free): Remove decls.
18277         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18278         Include <stdlib.h> unconditionally.  Sort include file names.
18279         (strtod): Remove.
18280         (xstrtod): Define with a prototype.
18281         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18282         (strtol, strtoul): Remove decls.
18283
18284 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18285
18286         More patches to assume C89 or better.
18287         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18288         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18289         string.h, memchr, STDC_HEADERS.
18290
18291 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18292
18293         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18294         Include <stdlib.h>, <string.h> unconditionally.
18295         Remove now-unnecessary cast to char *.
18296         * lib/strnlen.c: Include <string.h> unconditionally.
18297         * lib/yesno.c (yesno): Define with a prototype.
18298
18299 2003-09-11  Bruno Haible  <bruno@clisp.org>
18300
18301         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18302
18303 2003-09-10  Jim Meyering  <jim@meyering.net>
18304
18305         * lib/error.c: Correct indentation of cpp directives.
18306
18307 2003-09-10  Bruno Haible  <bruno@clisp.org>
18308
18309         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18310         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18311         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18312         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18313         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18314         <stdlib.h> and <string.h> checks.
18315         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18316         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18317
18318 2003-09-10  Bruno Haible  <bruno@clisp.org>
18319
18320         * lib/strcspn.c: Include <string.h> unconditionally.
18321         * lib/strpbrk.c: Include <string.h> unconditionally.
18322         * lib/strstr.c: Include <string.h> unconditionally.
18323         * lib/unicodeio.c: Include <string.h> unconditionally.
18324         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18325         * lib/unsetenv.c: Likewise.
18326         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18327         * lib/yesno.c: Include <stdlib.h> unconditionally.
18328         (rpmatch): Add prototype.
18329
18330 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18331
18332         More patches to assume C89 or better.
18333         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18334         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18335         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18336         or for string.h.
18337         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18338         stdlib.h.
18339         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18340         C headers.
18341         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18342         string.h.
18343         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18344         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18345         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18346         or for string.h.
18347         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18348         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18349         C headers.
18350         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18351         memcpy.
18352         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18353         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18354         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18355         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18356         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18357         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18358         string.h, free.
18359         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18360         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18361         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18362         C headers, or for string.h.
18363         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18364         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18365         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18366         headers, memory.h, stdlib.h, string.h, strings.h.
18367         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18368         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18369         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18370         strchr.
18371         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18372         headers, memory.h, string.h.
18373         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18374         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18375         free.
18376         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18377         headers.
18378         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18379         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18380         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18381         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18382         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18383
18384 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18385
18386         More K&R removal.
18387
18388         * lib/acosl.c (main): Use a prototype.
18389         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18390         tanl.c: Likewise.
18391
18392         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18393
18394         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18395         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18396         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18397         with a prototype.
18398         * lib/getopt.c (const): Remove macro.
18399         Include <string.h> unconditionally.
18400         (my_index): Remove; all uses changed to strchr.
18401         (strlen): Remove decl.
18402         (exchange): Remove forward decl; no longer needed.
18403         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18404         Define with prototype.
18405         * lib/getopt1.c (const): Remove macro.
18406         (getopt_long, getopt_long_only, main): Define with prototype.
18407
18408         * lib/getugroups.c: Include <string.h> unconditionally.
18409
18410         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18411         (getusershell, setusershell, endusershell, readname, main):
18412         Define with prototypes.
18413
18414         * lib/group-member.c: Include group-member.h first.
18415         Include <stdlib.h> unconditionally.
18416
18417         * lib/hard-locale.c: Include hard-locale.h first.
18418         Include <stdlib.h>, <string.h> unconditionally.
18419
18420         * lib/hash.c (free, malloc): Remove decls.
18421         Include <stdlib.h> unconditionally.
18422
18423         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18424         (getenv): Do not declare.
18425
18426         * lib/idcache.c: Include <string.h> unconditionally.
18427
18428         * lib/long-options.c: Include long-options.h first, to test interface.
18429         Include <stdlib.h> unconditionally.
18430
18431         * lib/makepath.c: Include makepath.h first, to test interface.
18432         Include <stdlib.h> and <string.h> unconditionally.
18433
18434         * lib/linebuffer.c: Include <stdlib.h>.
18435         (free): Remove decl.
18436
18437         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18438         stddef.h. rpl_malloc returns void *, not char *.
18439         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18440         prototype.
18441
18442         * lib/md5.h: Include <limits.h> unconditionally.
18443         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18444         (__P): Remove; all uses removed.
18445         * lib/md5.c: Include "md5.h" first.
18446         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18447         md5_buffer, md5_process_bytes, md5_process_block):
18448         Define with prototypes.
18449         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18450         * lib/sha.c: Include "sha.h" first.
18451         Include <stdlib.h>, <string.h> unconditionally.
18452
18453         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18454         * lib/memcmp.c (__ptr_t): Likewise.
18455         * lib/memrchr.c (__ptr_t): Likewise.
18456         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18457         Include <string.h> unconditionally.
18458         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18459         * lib/memchr.c: Include <stdlib.h> unconditionally.
18460         * lib/memchr.c (LONG_MAX): Remove.
18461         * lib/memrchr.c (LONG_MAX): Likewise.
18462         * lib/memchr.c (__memchr): Define via a prototype.
18463         * lib/memrchr.c (__memrchr): Likewise.
18464         * lib/memcmp.c (__P): Remove, and remove all uses.
18465         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18466         Remove forward decls; no longer needed.
18467         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18468         Use types required by C89 in prototype.
18469
18470         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18471         * lib/savedir.c: Likewise.
18472         * lib/mkdir.c (free): Remove decl.
18473         * lib/rmdir.c (rmdir): Define with a prototype.
18474         * lib/savedir.c: Include savedir.h first, to test interface.
18475
18476         * lib/mktime.c (STDC_HEADERS): Remove.
18477         Include <stdlib.h>, <string.h> unconditionally.
18478
18479         * lib/modechange.c: Include <stdlib.h> unconditionally.
18480         (malloc): Remove decl.
18481
18482         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18483         (free): Remove decl.
18484
18485         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18486         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18487         (This type really should be intptr_t, but that's a C99ism.)
18488         (_obstack_memcpy): Remove: all uses changed to memcpy.
18489         Include <string.h> unconditionally.
18490         (struct obstack): Assume __STDC__ for types of members
18491         chunkfun, freefun, extra_arg.
18492         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18493         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18494         obstack_begin, obstack_specify_allocation,
18495         obstack_specify_allocation_with_arg, obstack_chunkfun,
18496         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18497         Remove unprototyped decls and the macros that use them.
18498         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18499         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18500         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18501         (defined __STDC__ && __STDC__)]:
18502         Remove nonprototyped code.
18503         Include <stdlib.h> unconditionally.
18504         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18505         _obstack_allocated_p, _obstack_free, obstack_free,
18506         _obstack_memory_used, print_and_abort):
18507         Define using prototypes.
18508         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18509         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18510         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18511         obstack_next_free, obstack_object_size, obstack_room) [0]:
18512         Remove unused, unprototyped code.
18513
18514         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18515
18516         * lib/physmem.c (physmem_total, physmem_available, main): Define
18517         with prototypes.
18518
18519         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18520         (main): Define with a prototype.
18521
18522         * lib/posixver.c (getenv): Remove decl.
18523
18524         * lib/putenv.c (malloc): Returns void *, not char *.
18525         Include <string.h> unconditionally.
18526         (strchr, memcpy, NULL): Do not define.
18527
18528         * lib/readtokens.c: Include readtokens.h first, to test interface.
18529         Include <stdlib.h>, <string.h> unconditionally.
18530         (init_tokenbuffer): Define with a prototype.
18531
18532         * lib/regex.c (PARAMS): Remove.  All uses removed.
18533         All uses of _RE_ARGS removed, too.
18534         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18535         unconditionally.
18536         (bzero): Assume memset exists.
18537         (memcmp, memcpy, NULL): Remove.
18538         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18539         char, or assignments to local vars of type signed char.
18540         (init_syntax_once, PREFIX(extract_number_and_incr),
18541         PREFIX(print_partial_compiled_pattern),
18542         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18543         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18544         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18545         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18546         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18547         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18548         wcs_compile_range, byte_compile_range, truncate_wchar,
18549         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18550         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18551         count_mbs_length, wcs_re_match_2_internal,
18552         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18553         PREFIX(alt_match_null_string_p),
18554         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18555         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18556         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18557         now-unnecessary declaration, if any.
18558         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18559         regcomp, regexec):
18560         Remove now-unnecessary casts among pointer types.
18561         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18562
18563         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18564         (free): Remove decl.
18565
18566         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18567
18568         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18569         (free): Remove decl.
18570
18571         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18572         * lib/xgetcwd.c: Likewise.
18573
18574         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18575         (free): Remove decl.
18576
18577         * lib/strchrnul.c (strchrnul): Define with a prototype.
18578         Fix bug: c_in was not converted to char before searching.
18579
18580         The following changes are not K&R related:
18581
18582         * lib/group-member.h: Include <sys/types.h>, so that this file is
18583         self-contained.
18584         * lib/makepath.h: Likewise.
18585
18586         * lib/getusershell.c (readname, default_index, line_size, readname):
18587         Use size_t, not int, for sizes.
18588         (readname): If the size overflows, report an error instead of
18589         looping forever.
18590
18591 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18592
18593         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18594         libc.
18595
18596 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18597
18598         * README: New section: portability guidelines.
18599
18600 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18601
18602         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18603         C89 spec.
18604
18605 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18606
18607         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18608
18609 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18610
18611         Assume C89 or better; remove K&R cruft.
18612         A few of these changes were first proposed by Derek Robert Price
18613         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18614
18615         * lib/addext.c: Include <string.h> unconditionally.
18616         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18617         Don't declare getenv or malloc.
18618
18619         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18620         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18621         (NULL): Remove.
18622         (find_stack_direction, alloca): Use prototypes.
18623
18624         * lib/atexit.c (atexit): Define using a prototype.
18625
18626         * lib/basename.c, dirname.c, stripslash.c:
18627         Include <string.h> unconditionally.
18628
18629         * lib/bcopy.c: Include <stddef.h>.
18630         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18631
18632         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18633
18634         * lib/error.h (error, error_at_line, error_print_progname)
18635         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18636         * lib/error.c: Include error.h first, to check interface.
18637         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18638         (VA_START): Remove; all uses changeed to va_start.
18639         (exit, strerror): Remove decls.
18640         (error_print_progname): Prototype uncondionally.
18641         Don't include <errno.h>; no longer needed.
18642         (private_strerror): Remove.
18643         (error_tail): Always define.
18644         (error, error_at_line): Assume C89 or better; always use prototypes.
18645         * lib/fatal.c: Include "fatal.h" first, to test interface.
18646         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18647         (VA_START): Remove; all uses changed to va_start.
18648         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18649         this case.
18650         (exit): Remove decl.
18651         (fatal): Prototype unconditionally.  Assume va_start works.
18652         Abort at end, to pacify gcc.
18653
18654         * lib/euidaccess.c (main): Define with a prototype.
18655
18656         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18657
18658         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18659
18660         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18661         prototypes.
18662         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18663         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18664         (getenv): Remove decl.
18665         (fnmatch): Define using a prototype.
18666         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18667         (FCT): Define using a prototype.
18668
18669         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18670
18671         * lib/gethostname.c: Include <stddef.h>.
18672         (gethostname): Define with prototype.  Length is size_t, not int.
18673
18674 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18675
18676         Assume C89 or better; remove K&R cruft.
18677         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18678         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18679         string.h, getenv, malloc.
18680         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18681         headers.
18682         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18683         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18684         do not check for strerror.
18685         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18686         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18687         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18688         do not check for doprnt or vprintf.
18689         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18690         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18691
18692 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18693
18694         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18695         getversion.c should have been removed then, but was accidentally
18696         preserved.
18697
18698         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18699         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18700
18701 2003-09-08  Karl Berry  <karl@gnu.org>
18702
18703         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18704                 config, forget about prep.
18705
18706         * config/depcomp, missing: update from automake.
18707
18708 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18709
18710         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18711         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18712
18713 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18714
18715         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18716         copy_tm_result.  Bug reported by Simon Josefsson in
18717         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18718
18719 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18720
18721         * m4/time_r.m4: New file.
18722         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18723         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18724         is. Check for timegm declaration.
18725         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18726         Do not check for gmtime_r.
18727         Replace mktime if __mktime_internal does not exist and if mktime
18728         hasn't been replaced already.
18729
18730 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18731
18732         * lib/time_r.c, lib/time_r.h: New files.
18733
18734         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18735         __localtime_r.
18736         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18737         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18738
18739         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18740         __gmtime_r.
18741         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18742         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18743         Include <time_r.h>.
18744
18745         * lib/timegm.c: Switch to glibc implementation, with the following
18746         changes:
18747         [defined HAVE_CONFIG_H]: Include <config.h>.
18748         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18749         (__mktime_internal) [!defined _LIBC]: New decl.
18750         (__gmtime_r) [!defined _LIBC]: New macro and function.
18751         (timegm): Use a prototype, since gnulib assumes C89.
18752         Do not bother declaring tmp to be const, as it's not really usefu.
18753         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18754         (timegm): Declare only if HAVE_DECL_TIMEGM.
18755
18756 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18757
18758         * MODULES.html.sh (func_all_modules): Add time_r.
18759         * modules/time_r: New file.
18760         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18761         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18762
18763 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18764
18765         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18766         Bug reported by Lute Kamstra in
18767         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18768
18769         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18770         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18771         course with correspondingly smaller numbers for tomorrow and
18772         yesterday.  From Tadayoshi Funaba.  Originally installed into
18773         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18774         coreutils merge?).
18775
18776 2003-08-31  Simon Josefsson  <jas@extundo.com>
18777
18778         * modules/timegm: New file.
18779         * MODULES.html.sh (func_all_modules): Add timegm.
18780
18781 2003-08-31  Simon Josefsson  <jas@extundo.com>
18782
18783         * m4/timegm.m4: New file.
18784
18785 2003-08-31  Simon Josefsson  <jas@extundo.com>
18786
18787         * lib/timegm.h: New file.
18788         * lib/timegm.c: New file.  Based on
18789         wget-1.8.2/src/http.c:mktime_from_utc.
18790
18791 2003-08-31  Karl Berry  <karl@gnu.org>
18792
18793         * lib/argp.h: update from libc.
18794
18795 2003-08-28  Bruno Haible  <bruno@clisp.org>
18796
18797         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18798         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18799         followed by '#define fnmatch fnmatch_posix' gives an error.
18800
18801 2003-08-28  Bruno Haible  <bruno@clisp.org>
18802
18803         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18804         warning on QNX, which defines O_BINARY to 000000.
18805
18806 2003-08-27  Jim Meyering  <jim@meyering.net>
18807
18808         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18809         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18810         would fail after 32.  Reported by Danny Levinson.  Details here:
18811         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18812
18813 2003-08-24  Bruno Haible  <bruno@clisp.org>
18814
18815         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18816         MSVC7 <stdio.h> is included later.
18817
18818 2003-08-22  Simon Josefsson  <jas@extundo.com>
18819
18820         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18821
18822 2003-08-20  Karl Berry  <karl@gnu.org>
18823
18824         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18825
18826 2003-08-20  Bruno Haible  <bruno@clisp.org>
18827
18828         * modules/progname: New file.
18829         * MODULES.html.sh (func_all_modules): Add progname.
18830
18831 2003-08-20  Bruno Haible  <bruno@clisp.org>
18832
18833         * lib/progname.h: New file, from GNU gettext.
18834         * lib/progname.c: New file, from GNU gettext.
18835         * lib/progreloc.c: New file, from GNU gettext.
18836
18837 2003-08-19  Jim Meyering  <jim@meyering.net>
18838
18839         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18840         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18841
18842 2003-08-19  Bruno Haible  <bruno@clisp.org>
18843
18844         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18845         more.
18846
18847 2003-08-19  Bruno Haible  <bruno@clisp.org>
18848
18849         * lib/xstrdup.c: Assume <string.h> exists.
18850
18851 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18852
18853         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18854         in makefile rules.
18855
18856 2003-08-18  Jim Meyering  <jim@meyering.net>
18857
18858         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
18859         * m4/lib-ld.m4: Likewise.
18860
18861 2003-08-18  Jim Meyering  <jim@meyering.net>
18862
18863         * lib/setenv.h: Indent nested cpp directive.
18864         * lib/vasnprintf.c: Remove trailing blanks.
18865
18866 2003-08-17  Simon Josefsson  <jas@extundo.com>
18867
18868         * modules/xstrndup: New file.
18869         * MODULES.html.sh (func_all_modules): Add xstrndup.
18870
18871 2003-08-17  Simon Josefsson  <jas@extundo.com>
18872
18873         * modules/argp: Fix autoconf macro name. Add more dependencies.
18874
18875 2003-08-17  Simon Josefsson  <jas@extundo.com>
18876
18877         * m4/xstrndup.m4: New file.
18878
18879 2003-08-17  Simon Josefsson  <jas@extundo.com>
18880
18881         * m4/argp.m4: New file.
18882
18883 2003-08-17  Simon Josefsson  <jas@extundo.com>
18884             Bruno Haible  <bruno@clisp.org>
18885
18886         * lib/xstrndup.h: New file.
18887         * lib/xstrndup.c: New file.
18888
18889 2003-08-17  Bruno Haible  <bruno@clisp.org>
18890
18891         * modules/strndup (Files, Include): Add lib/strndup.h.
18892
18893 2003-08-17  Bruno Haible  <bruno@clisp.org>
18894
18895         * modules/euidaccess (Files): Add lib/euidaccess.h.
18896
18897 2003-08-17  Bruno Haible  <bruno@clisp.org>
18898
18899         * lib/strndup.h: New file.
18900
18901 2003-08-17  Bruno Haible  <bruno@clisp.org>
18902
18903         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
18904         like AC_GNU_SOURCE.
18905         * modules/extensions (configure.ac): Comment out the invocation of
18906         gl_USE_SYSTEM_EXTENSIONS.
18907
18908 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18909
18910         Merges from coreutils, etc.
18911         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
18912         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
18913         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
18914         fixing a typo.
18915         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
18916         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
18917
18918 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18919
18920         Document merge from coreutils.
18921         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
18922         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
18923         * modules/utime: Add m4/utimes-null.m4.
18924
18925 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18926
18927         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
18928         space, undoing this 2003-08-12 change:
18929         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18930
18931 2003-08-16  Paul Eggert  <eggert@twinsun.com>
18932
18933         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
18934         strtoul.c from libc, undoing this 2003-08-12 change:
18935         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
18936
18937 2003-08-16  Jim Meyering  <jim@meyering.net>
18938
18939         Merges from coreutils.
18940         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
18941         prefix.  Adjust cache variables similarly.  Create 500 rather than
18942         just 300 files, to exercise bug on Darwin6.5, too.
18943         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
18944         $missing_dir.
18945         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
18946         AM_SYS_POSIX_TERMIOS.
18947         Reported by mkc@mathdogs.com.
18948         Also change use of $am_cv_sys_posix_termios
18949         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
18950         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
18951         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
18952         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
18953         in /proc/mounts until it finds one with matching device number.  This
18954         is unnecessary when the FILE argument *is* a mount point.  No stat call
18955         is necessary in that case.  So, disable the statvfs-testing code on
18956         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
18957         as RedHat bug# 84846.
18958         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18959         to 1MB, so as not to render systems with no stack size limit (e.g.,
18960         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18961         Include <unistd.h>.  On some systems,
18962         it is required for the definition of _SC_PAGESIZE.
18963
18964 2003-08-16  Jim Meyering  <jim@meyering.net>
18965
18966         Merge from coreutils.
18967         * lib/xstrtoimax.c: #else #if -> #elif.
18968         * lib/xstrtoumax.c: Likewise.
18969
18970 2003-08-16  Jim Meyering  <jim@meyering.net>
18971
18972         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
18973         * m4/utimes.m4: Removed.
18974         * m4/utimes-null.m4: Renamed from utimes.m4.
18975
18976         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
18977         to 1MB, so as not to render systems with no stack size limit (e.g.,
18978         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
18979         Include <unistd.h>.  On some systems,
18980         it is required for the definition of _SC_PAGESIZE.
18981
18982 2003-08-16  Jim Meyering  <jim@meyering.net>
18983         and Paul Eggert  <eggert@cs.ucla.edu>
18984
18985         Merges from coreutils, etc.
18986
18987         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
18988         using the latest version from cvs.  This avoids problems with #line
18989         directives using a vendor (Sun) compiler.
18990         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
18991         Don't set GETGROUPS_LIB here; now it's
18992         done via getgroups.m4's wrapper function.
18993         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
18994         rather than just in sh-util/configure.in, so that the
18995         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
18996         same.
18997         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
18998         AC_FUNC_GETLOADAVG where to find getloadavg.c.
18999         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19000         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19001         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19002         Remove code that is now done by the newly-required macros.
19003         Append $(EXEEXT) to DF_PROG.
19004         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19005         Do not invoke or require the following here,
19006         since prereq.m4 or some gnulib .m4 now does this for us:
19007         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19008         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19009         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19010         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19011         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19012         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19013         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19014         AC_FUNC_OBSTACK.
19015         Do not replace the following functions, as this is now the job
19016         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19017         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19018         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19019         atexit getpass, strdup, getpagesize.
19020         Replace 'raise'.
19021         Do not check for the following functions, as this is now the job
19022         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19023         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19024         setregid.
19025         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19026         Check for sys/sysctl.h.
19027         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19028         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19029         of checking for ssize_t ourselves.
19030
19031         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19032         Require every macro that gnulib/modules/* suggests for us.
19033         (jm_PREREQ_ADDEXT): New macro.
19034         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19035         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19036
19037         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19038         (gl_PHYSMEM): Use it.
19039         Also check for `table' function.
19040         Check for new headers and functions.
19041         Add check for sys/sysmp.h.
19042         With suggestions from Kaveh Ghazi.
19043         Ignore headers that are present but cannot be compiled.  This
19044         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19045         C 5.4.
19046
19047 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19048
19049         Document merge from coreutils.
19050         * modules/userspec: Depend on posixver.
19051         * modules/strftime: Depend on tzset.
19052
19053 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19054
19055         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19056         rather than tab, after '#' in shell-script copyright notices.
19057         Suggested by Bruno Haible.
19058
19059 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19060
19061         * config/srclist-update: Use three spaces, rather than tab, after '#'
19062         in shell-script copyright notices.  Suggested by Bruno Haible.
19063         Remove unnecessary parenthesization in regular expression.
19064
19065 2003-08-15  Jim Meyering  <jim@meyering.net>
19066
19067         Merge from coreutils.
19068         * lib/xgethostname.c: Include <stdlib.h>.
19069         (xghostname): Don't exit for anything other than memory-related
19070         failure; just return NULL.
19071         * lib/userspec.c: Include "posixver.h".
19072         (parse_user_spec): Accept `.' as a separator only
19073         in pre-POSIX-200112 mode.
19074         * lib/strtoimax.c: Use #elif rather than #else #if.
19075         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19076         Remove function, now that we can rely on a working tzset function.
19077         [!_LIBC]: Ensure that the required autoconf test has been run.
19078         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19079         Use underlying_strftime for %r.
19080         * lib/sha.c: Merge in some clean-up and optimization changes from
19081         glibc.
19082         * lib/sha.c (sha_stream) [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/realloc.c: Update copyright date.
19087
19088 2003-08-15  Jim Meyering  <jim@meyering.net>
19089         and Paul Eggert  <eggert@twinsun.com>
19090
19091         Merge from coreutils.
19092         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19093         member but strut utmpx does not.  Needed for AIX 4.3.3.
19094         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19095
19096 2003-08-15  Jim Meyering  <jim@meyering.net>
19097         and Paul Eggert  <eggert@cs.ucla.edu>
19098
19099         Merges from coreutils, etc.
19100         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19101         Require gl_FUNC_TZSET_CLOBBER.
19102         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19103         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19104         members.
19105
19106 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19107
19108         Help the merge from coreutils.
19109         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19110         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19111         * m4/tzset.m4: Use it too.
19112
19113 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19114
19115         * modules/tzset: New file.
19116
19117 2003-08-14  Jim Meyering  <jim@meyering.net>
19118
19119         Merges from coreutils.
19120         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19121         variable names, rather than @FNMATCH_H@.
19122         * modules/alloca: Likewise for $(ALLOCA_H).
19123
19124         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19125         the three copies of the literal target, `fnmatch.h'.
19126         * modules/alloca (alloca.h): Likewise.
19127
19128 2003-08-14  Jim Meyering  <jim@meyering.net>
19129
19130         Merge from coreutils.
19131         * m4/tzset.m4: New file.
19132         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19133         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19134         otherwise, AIX 5.1 systems would end up using the latter.
19135         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19136         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19137         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19138         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19139
19140 2003-08-14  Jim Meyering  <jim@meyering.net>
19141
19142         Merge from coreutils.
19143         * lib/obstack.h: Whitespace changes.
19144         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19145         and xcalloc return values.
19146         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19147         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19148         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19149         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19150         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19151         error from mntctl.
19152         Use mntctl's return value to drive the entry-processing loop, since
19153         we can't rely on the value of the vmt_length member in the last
19154         entry.  On some systems doing so could result in exhausting
19155         virtual memory.  Based in part on a patch from Mike Jetzer.
19156
19157 2003-08-14  Jim Meyering  <jim@meyering.net>
19158         and Paul Eggert  <eggert@twinsun.com>
19159
19160         Merges from coreutils, plus other fixes.
19161         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19162         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19163         for credits and details.  Thanks to Kaveh Ghazi for helping
19164         to keep these files in sync.
19165         (ARRAY_SIZE): Define it.
19166         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19167         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19168         (memcasecmp): Don't assume size_t fits in unsigned int.
19169         Remove casts and duplicate code.
19170         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19171         (memcpy): Remove definition.
19172         Merge in some clean-up and optimization changes from glibc.
19173         [BLOCKSIZE]: Move definition to top of file.
19174         Ensure that it is a multiple of 64.
19175         Rearrange loop exit tests so as to avoid performing an
19176         additional fread after encountering an error or EOF.
19177         * lib/md5.h (md5_uintptr): Define.
19178         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19179         return to the initial working directory.  Preserve errno
19180         for caller.
19181         * lib/idcache.c: Include "xalloc.h".
19182         (xmalloc, xrealloc): Remove decls.
19183         (getuser): Remove casts no longer required in C89.
19184         * lib/human.c: Include stdio.h, for sprintf.
19185         * lib/group-member.c: Include "xalloc.h".
19186         (xmalloc, xrealloc): Remove decls.
19187         (get_group_info): Remove casts no longer required in C89.
19188         * lib/getusershell.c (readname): Remove casts no longer required in
19189         C89.
19190         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19191         * lib/getline.c: Whitespace fix, from coreutils.
19192
19193 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19194
19195         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19196         Check for isascii.
19197
19198         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19199         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19200         Undo previous (whitespace-only) change.
19201
19202 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19203
19204         * lib/exclude.c: Include <ctype.h>
19205         (IN_CTYPE_DOMAIN): New macro.
19206         (is_space): New fn.
19207         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19208         and empty lines.
19209
19210         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19211         Undo previous (whitespace-only) change.
19212
19213 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19214
19215         * config/srclist-update: Change update back to the old behavior,
19216         leaving whitespace alone.  Use one 'sed' command rather than a
19217         pipeline.
19218         (fixlicense): Now a variable, not a function.
19219         (remove_trailing_blanks): Remove.
19220         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19221         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19222         Undo previous (whitespace-only) change.
19223
19224 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19225
19226         Merge from coreutils.
19227         * modules/euidaccess: Add lib_SOURCES, include for new
19228         file euidaccess.h
19229
19230 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19231
19232         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19233         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19234         Normalize leading white space and remove trailing white space.
19235
19236         Merge from coreutils
19237         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19238
19239         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19240         0.12.1.  These files are now being upgraded automatically by
19241         ../config/srclist-update.
19242
19243 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19244
19245         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19246         Normalize leading white space and remove trailing white space.
19247         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19248         notice, as per ../config/srclist-update.
19249
19250         Merge from coreutils.
19251         * lib/euidaccess.h: New file.
19252         * lib/euidaccess.c: Include it.
19253         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19254         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19255         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19256
19257 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19258
19259         * config/srclist-update: Add copyright notice.
19260         (remove_id_lines, remove_trailing_blanks): New constants.
19261         (fixfile): Use them to normalize spacing a bit in copied files.
19262         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19263         Normalize leading white space and remove trailing white space.
19264
19265         * config/texinfo.tex: Sync with texinfo.
19266
19267         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19268         strtoul.c from libc, to merge coreutils whitespace changes.
19269
19270         * config/srclist.txt: Get the following m4 files from gettext:
19271         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19272         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19273         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19274         wint_t.m4.
19275
19276 2003-08-12  Karl Berry  <karl@gnu.org>
19277
19278         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19279         been made.
19280
19281 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19282
19283         * modules/gnu-source, m4/gnu-source.m4:
19284         Remove; we're assuming Autoconf 2.54 or later now.
19285         Suggested by Bruno Haible.
19286         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19287
19288 2003-08-11  Bruno Haible  <bruno@clisp.org>
19289
19290         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19291
19292 2003-08-11  Bruno Haible  <bruno@clisp.org>
19293
19294         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19295         (vasnprintf): Use it instead of wcslen.
19296
19297 2003-08-11  Bruno Haible  <bruno@clisp.org>
19298
19299         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19300         value to ensure that _Bool promotes to int. Use #define for _Bool when
19301         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19302
19303 2003-08-10  Karl Berry  <karl@gnu.org>
19304
19305         * lib/regex.h: update from libc (whitespace fix).
19306
19307 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19308
19309         Merge some files from coreutils.  These changes were
19310         originally made by Jim Meyering.
19311         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19312         many older Unixes require this.
19313         * lib/alloca.c (alloca): Remove cast to argument of free;
19314         no longer needed in C89.
19315         * lib/alloca_.h, regex.h: Fix white space to match
19316         what GNU indent does.
19317
19318 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19319
19320         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19321         apparently Emacs's Unicode mode got confused before my 2003-08-05
19322         checkin.
19323
19324 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19325
19326         * m4/extensions.m4: New file.
19327         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19328         Require gl_USE_SYSTEM_EXTENSIONS.
19329         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19330         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19331
19332 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19333
19334         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19335         * modules/extensions, modules/gnu-source: New files.
19336         * modules/timespec, modules/unlocked-io: Depend on extensions.
19337
19338 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19339
19340         * modules/restrict: New file.
19341         * MODULES.html.sh (func_all_modules): Add restrict.
19342         * modules/regex: Depend on restrict.
19343
19344 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19345
19346         * m4/restrict.m4: New file.
19347         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19348
19349 2003-08-07  Bruno Haible  <bruno@clisp.org>
19350
19351         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19352         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19353
19354 2003-08-07  Bruno Haible  <bruno@clisp.org>
19355
19356         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19357         makes the module 'getndelim2' compatible with the module 'getline'.
19358
19359 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19360
19361         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19362         byte with "\201" to avoid glitches when editing that source file
19363         with multi-gnome-terminal.
19364
19365 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19366
19367         * lib/bumpalloc.h: Remove.
19368
19369 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19370
19371         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19372         * modules/bumpalloc: Remove.
19373
19374 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19375
19376         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19377         GNU coding style.
19378
19379         Merge from coreutils.
19380         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19381         1. From glibc.
19382         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19383         from Karl Berry, implemented by Jim Meyering.
19384         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19385         from Dmitry V. Levin.
19386         Remove anachronistic cast of xrealloc.
19387         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19388         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19389         type. Otherwise, it wouldn't compile with at least /bin/cc on
19390         ymp-cray-unicos9.0.2.X.
19391         Combine two mostly-identical uses of alloca into one.
19392         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19393
19394 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19395
19396         [From Emacs.]
19397
19398         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19399         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19400         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19401         obsolete NLIST_NAME_UNION.
19402         [__GNU__]: Undef BSD and FSCALE.
19403         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19404
19405 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19406
19407         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19408         an enum type, so that it's guaranteed to promote to int.  See:
19409         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19410
19411 2003-08-03  Karl Berry  <karl@gnu.org>
19412
19413         * config/depcomp: update from automake.
19414
19415 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19416
19417         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19418         (strerror): Don't assume that a printable int fits in 14 bytes.
19419
19420 2003-07-31  Bruno Haible  <bruno@clisp.org>
19421
19422         * modules/getpass-gnu: New file.
19423         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19424
19425 2003-07-31  Bruno Haible  <bruno@clisp.org>
19426
19427         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19428
19429 2003-07-24  Karl Berry  <karl@gnu.org>
19430
19431         * config/missing: update from automake.
19432
19433 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19434             Bruno Haible  <bruno@clisp.org>
19435
19436         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19437         * lib/getline.c (getline, getdelim): Likewise.
19438         Remove _GNU_SOURCE define; now it's defined in config.h through
19439         m4/getline.m4.
19440
19441 2003-07-23  Karl Berry  <karl@gnu.org>
19442
19443         * config/config.sub: update from prep.
19444
19445 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19446
19447         * modules/xalloc (Depends-on): Add exitfail.
19448         * modules/xmemcoll: Likewise.
19449
19450 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19451
19452         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19453         over-parenthesization in macros.
19454
19455         Sync with coreutils.
19456
19457         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19458         required by C99.
19459
19460         Use `exit_failure' for xalloc and xmemcoll instead of their own
19461         private exit-failure variables.
19462         * lib/xalloc.h (xalloc_exit_failure): Remove.
19463         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19464         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19465         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19466         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19467         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19468
19469 2003-07-20  Jim Meyering  <jim@meyering.net>
19470
19471         * modules/closeout (Depends-on): Add exitfail.
19472         Suggestion from Bruno Haible.
19473
19474 2003-07-19  Karl Berry  <karl@gnu.org>
19475
19476         * config/config.sub: update from prep.
19477
19478 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19479
19480         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19481         Remove.
19482         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19483         to test that it can stand by itself.  Include "exitfail.h".
19484         Clients should set exit_failure instead.
19485         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19486
19487 2003-07-18  Bruno Haible  <bruno@clisp.org>
19488
19489         * modules/getndelim2: New file.
19490         * modules/getline: Share files with module getndelim2.
19491         * modules/getnline: Depend on getndelim2 instead of sharing files with
19492         it. Add getnline.c to lib_SOURCES.
19493         * MODULES.html.sh (func_all_modules): Add getndelim2.
19494
19495 2003-07-18  Bruno Haible  <bruno@clisp.org>
19496
19497         * m4/getndelim2.m4: New file.
19498         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19499         invoke gl_PREREQ_GETNDELIM2.
19500         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19501         gl_PREREQ_GETNDELIM2.
19502         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19503         gl_GETNDELIM2.
19504
19505 2003-07-18  Bruno Haible  <bruno@clisp.org>
19506
19507         * lib/getndelim2.h: New file.
19508         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19509         getndelim2.h.
19510         (getndelim2): Make non-static. Change return type to ssize_t.
19511         * lib/getline.h: Change argument names.
19512         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19513         * lib/getnline.c: Include getndelim2.h.
19514
19515 2003-07-18  Andreas Schwab  <schwab@suse.de>
19516
19517         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19518
19519 2003-07-17  Karl Berry  <karl@gnu.org>
19520
19521         * config/config.sub: update from prep.
19522
19523 2003-07-17  Bruno Haible  <bruno@clisp.org>
19524
19525         * modules/getnline: New file.
19526         * modules/getline: Add lib/getndelim2.c to source file list.
19527         * MODULES.html.sh (func_all_modules): Add getnline.
19528
19529 2003-07-17  Bruno Haible  <bruno@clisp.org>
19530
19531         * m4/getnline.m4: New file.
19532
19533 2003-07-17  Bruno Haible  <bruno@clisp.org>
19534
19535         * m4/Makefile.am.in: Remove file.
19536         * m4/Makefile.am: Remove file.
19537         * m4/Makefile.in: Remove file.
19538
19539 2003-07-17  Bruno Haible  <bruno@clisp.org>
19540
19541         * lib/getnline.h: New file.
19542         * lib/getnline.c: New file.
19543         * lib/getndelim2.c: New file, extracted from getline.c.
19544         (getndelim2): Renamed from getdelim2, with added nmax argument.
19545         * lib/getline.c: Include getndelim2.c.
19546         (getdelim2): Moved out to getndelim2.c.
19547         (getline, getdelim): Update.
19548
19549 2003-07-17  Bruno Haible  <bruno@clisp.org>
19550
19551         * lib/Makefile.am: Remove file.
19552         * lib/Makefile.in: Remove file.
19553
19554 2003-07-17  Bruno Haible  <bruno@clisp.org>
19555
19556         * configure.in: Remove file.
19557         * Makefile.in: Remove file.
19558
19559 2003-07-17  Bruno Haible  <bruno@clisp.org>
19560
19561         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19562
19563 2003-07-16  Karl Berry  <karl@gnu.org>
19564
19565         * config/srclist-update: was running fixlicense twice, which caused
19566                 texinfo.tex to be nullified for some reason.  Simplify,
19567                 $gplsrc is no longer needed as far as I can see?
19568
19569 2003-07-16  Jim Meyering  <jim@meyering.net>
19570
19571         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19572
19573 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19574
19575         * config/srclist.txt: Get the following files from gettext-runtime/intl
19576         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19577         ref-del.sin.  From Bruno Haible.
19578         * config/srclist-update (fixfile): Change grep pattern again, since the
19579         previous fix didn't work (there was another trailing $).  Use
19580         '[$]' to escape the $s.
19581
19582 2003-07-15  Karl Berry  <karl@gnu.org>
19583
19584         * lib/vasnprintf.c: update from gettext.
19585
19586 2003-07-15  Karl Berry  <karl@gnu.org>
19587
19588         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19589         gets expanded when surrounded by '$'.
19590
19591 2003-07-15  Jim Meyering  <jim@meyering.net>
19592
19593         * modules/save-cwd: Don't depend on error.  From Derek Price.
19594
19595 2003-07-15  Jim Meyering  <jim@meyering.net>
19596
19597         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19598
19599 2003-07-14  Simon Josefsson  <jas@extundo.com>
19600
19601         * modules/mempcpy: New file.
19602         * MODULES.html.sh (func_all_modules): Add mempcpy.
19603
19604 2003-07-14  Simon Josefsson  <jas@extundo.com>
19605
19606         * m4/mempcpy.m4: New file.
19607
19608 2003-07-14  Simon Josefsson  <jas@extundo.com>
19609
19610         * lib/mempcpy.h: New file.
19611         * lib/mempcpy.c: New file.
19612
19613 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19614
19615         * modules/getdate, modules/posixtm: Depend on mktime.
19616
19617 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19618
19619         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19620         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19621         unicodeio.c, unicodeio.h, unlocked-io.h:
19622         Switch from LGPL to GPL.
19623
19624 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19625
19626         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19627         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19628         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19629         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19630         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19631         updated automatically by ../config/srclist-update.  This changes
19632         their license from LPGL to GPL.
19633
19634 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19635
19636         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19637         assumed to refer to the root of the most recent stable gettext version.
19638         * config/srclistvars.sh: Add defaults for eggert.
19639         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19640         Match "This program" as well as "The program".  This is needed
19641         for gettext.
19642
19643 2003-07-14  Jim Meyering  <jim@meyering.net>
19644
19645         Don't emit diagnostics.  Let callers do that.
19646         * lib/save-cwd.c: Don't include "error.h".
19647         (save_cwd): Don't call error.  Ensure that errno is valid
19648         when returning nonzero.
19649
19650         * lib/save-cwd.h (restore_cwd): Update prototype.
19651         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19652         Simplify.  Don't call error upon failure.  Let callers do that.
19653         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19654         when auditing is enabled.  But don't bother updating the #if.
19655
19656 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19657
19658         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19659         it breaks C++ compilation.
19660         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19661
19662 2003-07-10  Simon Josefsson  <jas@extundo.com>
19663
19664         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19665
19666 2003-07-10  Jim Meyering  <jim@meyering.net>
19667
19668         * m4/clock_time.m4: Remove trailing blank.
19669         * m4/intmax_t.m4: Likewise.
19670
19671 2003-07-10  Jim Meyering  <jim@meyering.net>
19672
19673         * lib/vasnprintf.c: Remove trailing blanks.
19674         Make cpp indentation consistent.
19675
19676 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19677
19678         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19679         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19680         Switch from LGPL to GPL.
19681
19682 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19683
19684         * config/srclist.txt: Sort sublists.  Add
19685         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19686         that differ from gnulib for one reason or another; we'd like this list
19687         to be smaller but for now let's document what we have.
19688
19689 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19690
19691         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19692         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19693         and sweeter "eval x=$x".
19694         * config/srclist.txt: Get lib/argp* from glibc.
19695
19696 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19697
19698         * lib/mktime.c: Fix some boundary cases and remove need for floating
19699         point.
19700
19701         Issue a compile-time diagnostic if time_t is floating point, or if
19702         two's complement arithmetic is not in effect, or if arithmetic
19703         right shift does not propagate the sign.  These assumptions were
19704         all in the original code but they weren't checked.
19705
19706         (TIME_T_MIDPOINT, verify): New macros.
19707         (__isleap): Remove; it has integer overflow problems.
19708         (leapyear): New function, without those problems.
19709         (ydhms_tm_diff): Remove; splitting into two parts.
19710         (ydhms_diff): New function, containing the arithmetic part of
19711         the old ydhms_tm_diff function.  Issue a compile-time
19712         diagnostic if we are not using C99 integer division.
19713         Avoid casts when possible.
19714         (guess_time_tm): New function, containing the checking part of
19715         the old ydhms_tm_diff function.  Return the new value, rather than
19716         the difference between it and the old.  Accept a new argument T
19717         so that *T specifies the old value.  Check for overflow in the result.
19718
19719         (__mktime_internal): Use a time_t offset, not a long int offset.
19720         This undoes the 2003-06-04 change, which is no longer needed now
19721         that we have better overflow checking.
19722         (localtime_offset): Likewise.
19723
19724         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19725         and long are 64-bit but int is only 32-bit.
19726         (ydhms_diff): Use long int to store year1 and yday1.
19727         Issue a compile-time diagnostic if long int is not wide enough.
19728
19729         (__mktime_internal): Use long int to store adjusted year and yday.
19730         Use plain C rather than preprocessor commands, if that doesn't
19731         affect efficiency.
19732         Check for overflow (and try to repair) after each probe
19733         rather than checking only at the very end.  This avoids some bugs
19734         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19735         does not equal GMT offset at maximum time).
19736         Use integer to check for overflow rather than floating point; this
19737         is more portable to non-IEEE hosts, and is a tad faster.
19738         When we detect that we are oscillating between two values,
19739         don't check whether tm_isdst has the requested value, since
19740         we already know the answer.  When tm_isdst has the wrong value,
19741         use a different heuristic to find the right one, based on the
19742         extreme values actually observed in practice in tz2003a,
19743         rather than the (overly optimistic) "previous 3 calendar quarters".
19744
19745         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19746         "T const" to accommodate glibc style.
19747         (check_result): Use less-confusing report format.  "long" -> "long int.
19748         (main): Likewise.
19749         Don't loop if the iteration overflows time_t.
19750         Allow a negative step in the iteration.
19751
19752 2003-07-06  Karl Berry  <karl@gnu.org>
19753
19754         * config/depcomp: update from automake.
19755         * config/config.sub: update from prep.
19756
19757 2003-07-03  Karl Berry  <karl@gnu.org>
19758
19759         * config/config.guess: update from prep.
19760
19761 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19762
19763         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19764         xreadlink.c now includes it unconditionally.
19765
19766 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19767
19768         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19769         having it depend on HAVE_SYS_TYPES_H.
19770
19771 2003-07-01  Bruno Haible  <bruno@clisp.org>
19772
19773         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19774         <sys/types.h> should be sufficient.
19775         Reported by Paul Eggert.
19776
19777 2003-06-26  Karl Berry  <karl@gnu.org>
19778
19779         * config/depcomp: update from automake.
19780
19781 2003-06-26  Bruno Haible  <bruno@clisp.org>
19782
19783         * modules/human: Depend on module stdbool.
19784
19785 2003-06-25  Bruno Haible  <bruno@clisp.org>
19786
19787         * modules/readlink: New file.
19788         * modules/xreadlink: Depend on it.
19789         * MODULES.html.sh (func_all_modules): Add readlink.
19790
19791 2003-06-25  Bruno Haible  <bruno@clisp.org>
19792
19793         * m4/readlink.m4: New file.
19794
19795 2003-06-25  Bruno Haible  <bruno@clisp.org>
19796
19797         * lib/readlink.c: New file.
19798
19799 2003-06-22  Karl Berry  <karl@gnu.org>
19800
19801         * config/srclist.txt: update mkinstalldirs from automake.
19802         * config/mkinstalldirs: update.
19803
19804 2003-06-22  Bruno Haible  <bruno@clisp.org>
19805
19806         Portability to mingw32.
19807         * m4/ssize_t.m4: New file, from GNU gettext.
19808         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19809         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19810
19811 2003-06-22  Bruno Haible  <bruno@clisp.org>
19812
19813         * modules/safe-read: Add m4/ssize_t.m4.
19814         * modules/xreadlink: Add m4/ssize_t.m4.
19815
19816 2003-06-20  Bruno Haible  <bruno@clisp.org>
19817
19818         Assume C89, so PARAMS isn't needed.
19819         * lib/unicodeio.h (PARAMS): Remove.
19820         * lib/unicodeio.c: Don't use PARAMS.
19821
19822 2003-06-18  Karl Berry  <karl@gnu.org>
19823
19824         * config/config.{guess,sub}: update from prep.
19825
19826 2003-06-18  Jim Meyering  <jim@meyering.net>
19827
19828         Merge changes from coreutils.
19829         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19830         Remove explicit declarations of xmalloc and realloc.
19831         Include xalloc.h.
19832         (read_utmp): Remove anachronistic cast of xmalloc.
19833
19834 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19835
19836         Assume C89, so PARAMS isn't needed.
19837         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19838         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19839         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19840         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19841         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19842         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19843         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19844         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19845         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19846         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19847         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19848         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19849         no longer needed. Anyway, config.h should always be included before any
19850         other file.
19851
19852 2003-06-11  Simon Josefsson  <jas@extundo.com>
19853
19854         * modules/sysexits: New file.
19855         * MODULES.html.sh (func_all_modules): Add sysexits.
19856
19857 2003-06-11  Simon Josefsson  <jas@extundo.com>
19858
19859         * lib/sysexit_.h: New file.
19860
19861 2003-06-11  Derek Price  <derek@ximbiot.com>
19862
19863         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
19864         necessary.
19865
19866 2003-06-11  Bruno Haible  <bruno@clisp.org>
19867
19868         * m4/sysexits.m4: New file.
19869
19870 2003-06-10  Simon Josefsson  <jas@extundo.com>
19871
19872         * lib/argp.h: New file, from glibc.
19873         * lib/argp-ba.c: New file, from glibc.
19874         * lib/argp-eexst.c: New file, from glibc.
19875         * lib/argp-fmtstream.c: New file, from glibc.
19876         * lib/argp-fmtstream.h: New file, from glibc.
19877         * lib/argp-fs-xinl.c: New file, from glibc.
19878         * lib/argp-help.c: New file, from glibc.
19879         * lib/argp-namefrob.h: New file, from glibc.
19880         * lib/argp-parse.c: New file, from glibc.
19881         * lib/argp-pv.c: New file, from glibc.
19882         * lib/argp-pvh.c: New file, from glibc.
19883         * lib/argp-xinl.c: New file, from glibc.
19884
19885 2003-06-10  Simon Josefsson  <jas@extundo.com>
19886
19887         * modules/strchrnul: New file.
19888
19889 2003-06-10  Simon Josefsson  <jas@extundo.com>
19890
19891         * modules/argp: New file.
19892
19893 2003-06-10  Simon Josefsson  <jas@extundo.com>
19894
19895         * m4/strchrnul.m4: New file.
19896
19897 2003-06-10  Simon Josefsson  <jas@extundo.com>
19898
19899         * lib/strchrnul.h: New file.
19900         * lib/strchrnul.c: New file.
19901
19902 2003-06-10  Bruno Haible  <bruno@clisp.org>
19903
19904         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
19905
19906 2003-06-07  Karl Berry  <karl@gnu.org>
19907
19908         * config/config.{guess,sub}: update from prep.
19909
19910 2003-06-07  Jim Meyering  <jim@meyering.net>
19911
19912         * modules/strtod: Use $(...) notation, not @...@ for
19913         AC_REPLACE'd variables.
19914         * modules/localcharset: Likewise.
19915
19916 2003-06-07  Jim Meyering  <jim@meyering.net>
19917
19918         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
19919         in place of my name in the copyright comment.
19920         Remove definition and uses of __P.
19921
19922         From coreutils.
19923         * lib/stat.c: Don't declare xmalloc explicitly.
19924         Instead, include "xalloc.h".
19925         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
19926         xrealloc, and xcalloc return values.
19927         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
19928         Improve comment.
19929         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
19930
19931 2003-06-07  Bruno Haible  <bruno@clisp.org>
19932
19933         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
19934         avoid AC_CONFIG_LINKS.
19935         * modules/fnmatch (Makefile.am): Use explicit creation rule for
19936         fnmatch.h, to avoid AC_CONFIG_LINKS.
19937         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
19938
19939 2003-06-07  Bruno Haible  <bruno@clisp.org>
19940
19941         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
19942         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
19943         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19944         directory.
19945         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
19946         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
19947         directory.
19948
19949 2003-06-06  Jim Meyering  <jim@meyering.net>
19950
19951         Merge from coreutils.
19952         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
19953         Consolidate declarations and initializations of *_base* locals.
19954
19955         Merge from coreutils.
19956         This avoids a core dump on systems without GNU putenv,
19957         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
19958         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
19959         (unsetenv): New static function, from GNU libc.
19960         (rpl_putenv): Use it.
19961
19962         * lib/modechange.c: Remove trailing blanks.
19963
19964         Merge from coreutils.
19965         * lib/fsusage.c: Remove declaration of statfs.
19966         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
19967
19968         * lib/posixtm.c: Include <stdbool.h> unconditionally.
19969
19970 2003-06-06  Jim Meyering  <jim@meyering.net>
19971
19972         * lib/stdbool_.h: Renamed from stdbool.h.in.
19973
19974 2003-06-06  Jim Meyering  <jim@meyering.net>
19975             Bruno Haible  <bruno@clisp.org>
19976
19977         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
19978         Adjust Makefile.am snippet not to redirect directly to target.
19979         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
19980
19981 2003-06-05  Paul Eggert  <eggert@twinsun.com>
19982
19983         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
19984         mismatch, look in future quarters as well as past.  This fixes a
19985         bug when processing fall-backwards gaps immediately after a long
19986         period of daylight-saving time.
19987
19988         * lib/mktime.c: Assume freestanding C89 or better.
19989         (HAVE_LIMITS_H): Remove.  Assume it's 1.
19990         (__P): Remove; not used.
19991         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
19992         (mktime, not_equal_tm, print_tm, check_result,
19993         main): Use prototypes.  Use const * where appropriate.
19994         (main): Fix typo in testing code that uncovered by above changes.
19995         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
19996
19997 2003-06-04  Paul Eggert  <eggert@twinsun.com>
19998
19999         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20000         locale.h, localeconv.  This merges changes from coreutils.
20001
20002         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20003         It can be removed after the next Autoconf is released.
20004         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20005         needed.
20006
20007 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20008
20009         * lib/mktime.c: Fix Debian bug 177940
20010         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20011         (localtime_offset): Now long int, not time_t, because we want it
20012         to be guaranteed to be signed.  All uses changed.
20013         (__mktime_internal): If overflow would occur when adding offset,
20014         don't add it.
20015
20016         Merge 'human' changes from coreutils.  Rewrite to support
20017         locale-specific notations like thousands separators.
20018         * lib/human.c: Simplify authorship notice.
20019         Include human.h immediately after config.h.
20020         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20021         <limits.h>: Do not include, since human.h does.
20022         (SIZE_MAX, UINTMAX_MAX): New macros.
20023         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20024         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20025         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20026         (power_letter): Renamed from suffixes.
20027         (generate_suffix_backwards): Remove.
20028         (adjust_value): Now takes int style (because of human.h changes)
20029         and long double value (for greater precision on some platforms).
20030         (group_number): New function.
20031         (human_readable): Use it.  Use integer options, not enum.
20032         Put the options before the sizes in the arg list.
20033         Support all the new options.
20034         The old human_readable function has been removed;
20035         use inttostr.h instead.
20036         (human_readable, default_block_size, humblock):
20037         Use uintmax_t, not int, for block sizes.
20038         (human_readable_inexact, block_size_types): Remove.
20039         (block_size_opts): New constant.
20040         (human_options): Renamed from human_block_size, with new signature
20041         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20042         * lib/human.h: Add copyright and authorship notice.
20043         Include <limits.h> and <stdbool.h> unconditionally.
20044         (PARAMS): Remove.  All uses removed.
20045         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20046         (enum human_inexact_style): Remove tag; now a nameless enum.
20047         (human_floor, human_ceiling, human_round_to_even): Now have
20048         values 2, 0, 1 rather than -1, 1, 0.
20049         (human_group_digits, human_suppress_point_zero, human_autoscale,
20050         human_base_1024, human_SI, human_B): New constants.
20051         (human_readable_inexact, human_block_size): Remove.
20052         (human_readable): Size args are now uintmax_t, not int.
20053         (human_options): New decl.
20054
20055         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20056         unnecessary now that we assume C89 or better.  This change
20057         imported from coreutils.
20058
20059         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20060         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20061         in the 2003-05-30 sync from glibc.
20062
20063         .h files should stand alone, but we shouldn't include <sys/types.h>
20064         if we can get away with just <stddef.h>.
20065
20066         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20067         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20068         rather than <sys/types.h>, as we merely need size_t.
20069         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20070         to get size_t.
20071         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20072         Include <stdio.h>, to get FILE.
20073         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20074         memcasecmp.h has included <stddef.h> and all we need is size_t.
20075         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20076         our interface, instead of including <sys/types.h>
20077
20078 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20079
20080         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20081         now, as glibc mktime is buggy on non-glibc systems.
20082
20083 2003-06-03  Karl Berry  <karl@gnu.org>
20084
20085         * config/config.sub: update from prep.
20086
20087 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20088
20089         [from coreutils]
20090         Fix some minor time-related bugs with POSIX time arguments.
20091         Some valid time stamps were being rejected (notably -1, and
20092         time stamps before 1900 on 64-bit hosts).  And some invalid
20093         time stamps were being accepted, e.g. September 31.
20094
20095         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20096         that we can return (time_t) -1 successfully.
20097         * lib/posixtm.c: Likewise.
20098         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20099         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20100         (t): Remove static var.
20101         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20102         of static var.  All uses changed.
20103         (year): Do not reject years before 1900; they can occur with
20104         64-bit time_t.
20105         (posix_time_parse): Do not check for out-of-range components;
20106         that is now the caller's responsibility, since our checks were
20107         only approximations.
20108         (posixtime): Use mktime to check for out-of-range components,
20109         since it knows them exactly.
20110         If mktime returns (time_t) -1, check whether an error actually occurred
20111         by invoking localtime on -1.
20112         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20113         posixtime failures better.
20114         Improve the test data (in comments only).
20115
20116 2003-06-02  Karl Berry  <karl@gnu.org>
20117
20118         * config/mkinstalldirs (version): new variable.
20119         (--version): new option.
20120         (usage): improve message.
20121
20122 2003-05-30  Karl Berry  <karl@gnu.org>
20123
20124         * lib/mktime.c: update from libc.
20125
20126 2003-05-30  Bruno Haible  <bruno@clisp.org>
20127
20128         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20129         * config/config.rpath: Upgrade to gettext-0.12.1.
20130
20131 2003-05-30  Bruno Haible  <bruno@clisp.org>
20132
20133         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20134         * m4/nls.m4: New file, from gettext-0.12.1.
20135         * m4/po.m4: New file, from gettext-0.12.1.
20136         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20137
20138 2003-05-30  Bruno Haible  <bruno@clisp.org>
20139
20140         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20141         * lib/localcharset.h: Likewise.
20142         * lib/localcharset.c: Likewise.
20143
20144 2003-05-29  Karl Berry  <karl@gnu.org>
20145
20146         * config/config.rpath: update from gettext.
20147
20148 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20149
20150         Assume the headers required for C89 freestanding compilers.
20151         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20152         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20153         * m4/human.m4 (gl_HUMAN): Likewise.
20154         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20155         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20156         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20157         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20158         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20159         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20160
20161 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20162
20163         Assume the headers required for C89 freestanding compilers.
20164         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20165         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20166         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20167         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20168         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20169         define, since <limits.h> is guaranteed to do that.
20170         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20171         * lib/exclude.c: Include <stdbool.h> unconditionally.
20172         * lib/tempname.c: Include <stddef.h> unconditionally.
20173         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20174         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20175         <stddef.h> does that.
20176         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20177         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20178         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20179         needed.
20180         * lib/xstrtol.c: Likewise.
20181         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20182         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20183
20184         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20185         warnings on some platforms.
20186
20187         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20188         arbitrarily.
20189
20190 2003-05-26  Jim Meyering  <jim@meyering.net>
20191
20192         Merge in a change from coreutils:
20193         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20194         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20195         that condition, rather than `-1' which is slightly misleading.
20196         Change the name of the cache variable to have the gl_ prefix.
20197         Prompted by a patch from Richard Dawe for DJGPP.
20198
20199 2003-05-24  Karl Berry  <karl@gnu.org>
20200
20201         * config/config.guess: update from prep.
20202
20203 2003-05-22  Karl Berry  <karl@gnu.org>
20204
20205         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20206
20207 2003-05-20  Karl Berry  <karl@gnu.org>
20208
20209         * config/config.guess: update from prep.
20210
20211 2003-05-18  Karl Berry  <karl@gnu.org>
20212
20213         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20214         might actually be set by the user.
20215
20216         * config/depcomp, install-sh, mdate-sh: update from automake.
20217
20218 2003-05-17  Bruno Haible  <bruno@clisp.org>
20219
20220         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20221         invalid expansion for AC_EGREP_CPP.
20222         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20223         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20224         Suggested by Akim Demaille <akim@epita.fr> in
20225         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20226
20227 2003-05-12  Jim Meyering  <jim@meyering.net>
20228
20229         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20230         the space-padded-by-default conversion specifiers, %e, %k, %l.
20231
20232 2003-05-12  Bruno Haible  <bruno@clisp.org>
20233
20234         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20235         the string is longer than 4 KB.
20236
20237 2003-05-11  Karl Berry  <karl@gnu.org>
20238
20239         * config/config.{guess,sub}: update from prep.
20240
20241 2003-05-09  Bruno Haible  <bruno@clisp.org>
20242
20243         * modules/error: Add m4/strerror_r.m4 to file list.
20244
20245 2003-05-03  Bruno Haible  <bruno@clisp.org>
20246
20247         Upgrade to Unicode-4.0.
20248         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20249         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20250         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20251         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20252         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20253         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20254         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20255         Change width of U+E0100..U+E01EF from 1 to 0.
20256
20257 2003-04-25  Jim Meyering  <jim@meyering.net>
20258
20259         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20260         of type size_t, not int.
20261
20262 2003-04-25  Bruno Haible  <bruno@clisp.org>
20263
20264         * lib/copy-file.c: Include <stddef.h>, for size_t.
20265
20266 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20267
20268         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20269         code which expansion is under static control.  Patch imported from
20270         Akim Demaille's patch to Bison; see
20271         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20272
20273 2003-04-14  Bruno Haible  <bruno@clisp.org>
20274
20275         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20276
20277 2003-04-11  Jim Meyering  <jim@meyering.net>
20278
20279         Merge changes from Coreutils.
20280
20281         2003-03-22  Jim Meyering  <jim@meyering.net>
20282
20283         * lib/strftime.c (widen): Cast alloca return value to proper type.
20284
20285         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20286
20287         From GNU libc.
20288         * lib/strftime.c (my_strftime): Handle very large width
20289         specifications for numeric values correctly.  Improve checks for
20290         overflow.
20291
20292         2003-01-19  Jim Meyering  <jim@meyering.net>
20293
20294         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20295         definitions.
20296         (nl_get_alt_digit) [! defined my_strftime]: Define.
20297         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20298         _nl_get_alt_digit and _nl_get_walt_digit.
20299
20300         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20301         libc. These changes have no effect outside of _LIBC.
20302
20303 2003-04-10  Bruno Haible  <bruno@clisp.org>
20304
20305         * modules/findprog: New file.
20306         * MODULES.html.sh (func_all_modules): Add it.
20307
20308 2003-04-10  Bruno Haible  <bruno@clisp.org>
20309
20310         * m4/findprog.m4: New file.
20311         * m4/eaccess.m4: New file.
20312
20313 2003-04-10  Bruno Haible  <bruno@clisp.org>
20314
20315         * lib/findprog.h: New file, from GNU gettext.
20316         * lib/findprog.c: New file, from GNU gettext.
20317
20318 2003-04-05  Jim Meyering  <jim@meyering.net>
20319
20320         Merge changes from Coreutils.
20321
20322         * lib/exclude.h (PARAMS): Remove definition and uses.
20323         * lib/exclude.c: Remove uses of `PARAMS'.
20324
20325         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20326         Add test-cases for DOS filenames. Declare program_name.
20327         (main): Set up program_name.  Patch by Rich Dawe.
20328
20329         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20330         error from mntctl.
20331         Use mntctl's return value to drive the entry-processing loop, since
20332         we can't rely on the value of the vmt_length member in the last
20333         entry.  On some systems doing so could result in exhausting
20334         virtual memory.  Based in part on a patch from Mike Jetzer.
20335
20336 2003-04-04  Bruno Haible  <bruno@clisp.org>
20337
20338         * modules/linebreak: New file.
20339         * MODULES.html.sh (func_all_modules): Add it.
20340
20341 2003-04-04  Bruno Haible  <bruno@clisp.org>
20342
20343         * m4/linebreak.m4: New file.
20344
20345 2003-04-04  Bruno Haible  <bruno@clisp.org>
20346
20347         * lib/linebreak.h: New file, from GNU gettext.
20348         * lib/linebreak.c: New file, from GNU gettext with slight
20349         modifications.
20350         * lib/lbrkprop.h: New file, from GNU gettext.
20351
20352 2003-04-03  Bruno Haible  <bruno@clisp.org>
20353
20354         * modules/utf8-ucs4: New file.
20355         * modules/utf16-ucs4: New file.
20356         * modules/ucs4-utf8: New file.
20357         * modules/ucs4-utf16: New file.
20358         * MODULES.html.sh (func_all_modules): Add them.
20359
20360 2003-04-03  Bruno Haible  <bruno@clisp.org>
20361
20362         * m4/utf-ucs4.m4: New file.
20363         * m4/ucs4-utf.m4: New file.
20364
20365 2003-04-03  Bruno Haible  <bruno@clisp.org>
20366
20367         * lib/utf8-ucs4.h: New file, from GNU gettext.
20368         * lib/utf16-ucs4.h: New file, from GNU gettext.
20369         * lib/ucs4-utf8.h: New file, from GNU gettext.
20370         * lib/ucs4-utf16.h: New file, from GNU gettext.
20371
20372 2003-04-02  Bruno Haible  <bruno@clisp.org>
20373
20374         * modules/binary-io: New file.
20375         * MODULES.html.sh (func_all_modules): Add it.
20376
20377 2003-04-02  Bruno Haible  <bruno@clisp.org>
20378
20379         * lib/binary-io.h: New file, from GNU gettext.
20380
20381 2003-04-01  Bruno Haible  <bruno@clisp.org>
20382
20383         * modules/pathname: New file.
20384         * MODULES.html.sh (func_all_modules): Add it.
20385
20386 2003-04-01  Bruno Haible  <bruno@clisp.org>
20387
20388         * lib/pathname.h: New file, from GNU gettext.
20389         * lib/concatpath.c: New file, from GNU gettext.
20390
20391 2003-03-30  Bruno Haible  <bruno@clisp.org>
20392
20393         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20394
20395 2003-03-30  Bruno Haible  <bruno@clisp.org>
20396
20397         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20398         function chown() doesn't exist.
20399
20400 2003-03-28  Bruno Haible  <bruno@clisp.org>
20401
20402         * modules/copy-file: New file.
20403         * MODULES.html.sh (func_all_modules): Add it.
20404
20405 2003-03-28  Bruno Haible  <bruno@clisp.org>
20406
20407         * m4/copy-file.m4: New file.
20408
20409 2003-03-28  Bruno Haible  <bruno@clisp.org>
20410
20411         * lib/copy-file.h: New file, from GNU gettext.
20412         * lib/copy-file.c: New file, from GNU gettext.
20413
20414 2003-03-18  Jim Meyering  <jim@meyering.net>
20415
20416         * lib/quote.c (quote_n): Fix typo in comment.
20417
20418 2003-03-18  Bruno Haible  <bruno@clisp.org>
20419
20420         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20421         checking.
20422         * m4/onceonly_2_57.m4: Likewise.
20423
20424 2003-03-17  Bruno Haible  <bruno@clisp.org>
20425
20426         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20427         (m4_quote): Remove macro.
20428         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20429
20430 2003-03-14  Jim Meyering  <jim@meyering.net>
20431
20432         Merge changes from Coreutils.
20433         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20434         to be const, in order to avoid warnings.
20435         (obstack_room): Likewise.
20436         (obstack_empty_p): Likewise.
20437
20438 2003-03-14  Bruno Haible  <bruno@clisp.org>
20439
20440         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20441         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20442
20443 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20444
20445         Merge changes from Bison.
20446         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20447         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20448         when compiling Bison 1.875's `bitset bset = obstack_alloc
20449         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20450         * lib/hash.c: Include <stdbool.h> unconditionally.
20451
20452 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20453
20454         * m4/onceonly.m4 (m4_quote): New macro.
20455         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20456         Quote AC_FOREACH variable-expansions properly.
20457
20458 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20459
20460         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20461
20462 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20463
20464         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20465         Reported by Bruce Becker; see:
20466         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20467
20468 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20469             Bruno Haible  <bruno@clisp.org>
20470
20471         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20472         Reported by John Hughes, see
20473         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20474
20475 2003-02-20  Bruno Haible  <bruno@clisp.org>
20476
20477         * MODULES.html.sh (func_all_modules): Add poll.
20478
20479 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20480
20481         * modules/poll: New file.
20482
20483 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20484
20485         * lib/poll_.h: New file.
20486         * lib/poll.c: New file.
20487
20488 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20489
20490         * m4/poll.m4: New file.
20491
20492 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20493
20494         * modules/mathl: New file.
20495
20496 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20497
20498         * lib/mathl.h: New file.
20499         * lib/acosl.c: New file.
20500         * lib/asinl.c: New file.
20501         * lib/atanl.c: New file.
20502         * lib/ceill.c: New file.
20503         * lib/cosl.c: New file.
20504         * lib/expl.c: New file.
20505         * lib/floorl.c: New file.
20506         * lib/frexpl.c: New file.
20507         * lib/ldexpl.c: New file.
20508         * lib/logl.c: New file.
20509         * lib/sincosl.c: New file.
20510         * lib/sinl.c: New file.
20511         * lib/sqrtl.c: New file.
20512         * lib/tanl.c: New file.
20513         * lib/trigl.c: New file.
20514         * lib/trigl.h: New file.
20515
20516 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20517
20518         * m4/mathl.m4: New file.
20519
20520 2003-02-18  Bruno Haible  <bruno@clisp.org>
20521
20522         * MODULES.html.sh (func_all_modules): Add mathl.
20523
20524 2003-02-17  Bruno Haible  <bruno@clisp.org>
20525
20526         * modules/mkdtemp: New module.
20527         * MODULES.html.sh (func_all_modules): Add it.
20528
20529 2003-02-17  Bruno Haible  <bruno@clisp.org>
20530
20531         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20532
20533 2003-02-17  Bruno Haible  <bruno@clisp.org>
20534
20535         * lib/mkdtemp.h: New file, from GNU gettext.
20536         * lib/mkdtemp.c: New file, from GNU gettext.
20537
20538 2003-02-02  Jim Meyering  <jim@meyering.net>
20539
20540         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20541         e.g. glibc-2.2.93.
20542
20543 2003-01-31  Bruno Haible  <bruno@clisp.org>
20544
20545         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20546         'rpl_rename'.
20547         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20548         'rpl_strnlen'.
20549         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20550         'rpl_strtod'.
20551         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20552         'rpl_utime'.
20553
20554 2003-01-31  Bruno Haible  <bruno@clisp.org>
20555
20556         * lib/rename.c: #undef rename before defining rpl_rename.
20557         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20558
20559 2003-01-30  Bruno Haible  <bruno@clisp.org>
20560
20561         * modules/vasnprintf, modules/vasprintf: New modules.
20562         * MODULES.html.sh (func_all_modules): Add them.
20563
20564 2003-01-30  Bruno Haible  <bruno@clisp.org>
20565
20566         * m4/signed.m4: New file, from GNU gettext.
20567         * m4/longdouble.m4: New file, from GNU gettext.
20568         * m4/wchar_t.m4: New file, from GNU gettext.
20569         * m4/wint_t.m4: New file, from GNU gettext.
20570         * m4/vasnprintf.m4: New file.
20571         * m4/vasprintf.m4: New file.
20572
20573 2003-01-30  Bruno Haible  <bruno@clisp.org>
20574
20575         * lib/printf-args.h: New file, from GNU gettext.
20576         * lib/printf-args.c: New file, from GNU gettext.
20577         * lib/printf-parse.h: New file, from GNU gettext.
20578         * lib/printf-parse.c: New file, from GNU gettext.
20579         * lib/vasnprintf.h: New file, from GNU gettext.
20580         * lib/vasnprintf.c: New file, from GNU gettext.
20581         * lib/asnprintf.c: New file, from GNU gettext.
20582         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20583         * lib/vasprintf.c: New file, from GNU gettext.
20584         * lib/asprintf.c: New file, from GNU gettext.
20585
20586 2003-01-29  Bruno Haible  <bruno@clisp.org>
20587
20588         * modules/stpncpy: New module.
20589         * MODULES.html.sh (func_all_modules): Add it.
20590
20591 2003-01-29  Bruno Haible  <bruno@clisp.org>
20592
20593         * m4/stpncpy.m4: New file.
20594
20595 2003-01-29  Bruno Haible  <bruno@clisp.org>
20596
20597         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20598         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20599
20600 2003-01-28  Bruno Haible  <bruno@clisp.org>
20601
20602         * modules/c-ctype: New module.
20603         * MODULES.html.sh (func_all_modules): Add it.
20604
20605 2003-01-28  Bruno Haible  <bruno@clisp.org>
20606
20607         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20608         Paul Eggert.
20609         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20610         Paul Eggert.
20611
20612 2003-01-27  Bruno Haible  <bruno@clisp.org>
20613
20614         * modules/xsetenv: New module.
20615         * MODULES.html.sh (func_all_modules): Add it.
20616
20617 2003-01-27  Bruno Haible  <bruno@clisp.org>
20618
20619         * lib/xsetenv.h: New file, from GNU gettext.
20620         * lib/xsetenv.c: New file, from GNU gettext.
20621
20622 2003-01-23  Jim Meyering  <jim@meyering.net>
20623
20624         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20625         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20626
20627 2003-01-23  Bruno Haible  <bruno@clisp.org>
20628
20629         * modules/minmax: New module.
20630         * MODULES.html.sh (func_all_modules): Add it.
20631
20632 2003-01-23  Bruno Haible  <bruno@clisp.org>
20633
20634         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20635         Eggert.
20636
20637 2003-01-22  Bruno Haible  <bruno@clisp.org>
20638
20639         * modules/exit: New module.
20640         * MODULES.html.sh (func_all_modules): Add it.
20641
20642 2003-01-22  Bruno Haible  <bruno@clisp.org>
20643
20644         * lib/exit.h: New file, from GNU gettext.
20645
20646 2003-01-19  Bruno Haible  <bruno@clisp.org>
20647
20648         * gnulib-tool: Recognize option --extract-maintainer.
20649         (func_get_maintainer): New function.
20650         * modules/*: Add Maintainer entry.
20651
20652 2003-01-16  Jim Meyering  <jim@meyering.net>
20653
20654         * m4/regex.m4: The `regex' struct is both input and output.
20655         Initialize it before each use.  Patch by Tim Waugh.
20656
20657 2003-01-16  Bruno Haible  <bruno@clisp.org>
20658
20659         * MODULES.html.sh: Add a table of contents. Add the module name as
20660         leftmost column. Add hyperlinks.
20661
20662 2003-01-15  Bruno Haible  <bruno@clisp.org>
20663
20664         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20665
20666 2003-01-15  Bruno Haible  <bruno@clisp.org>
20667
20668         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20669         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20670         suffix.
20671
20672 2003-01-15  Bruno Haible  <bruno@clisp.org>
20673
20674         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20675
20676 2003-01-15  Bruno Haible  <bruno@clisp.org>
20677
20678         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20679         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20680
20681 2003-01-14  Jim Meyering  <jim@meyering.net>
20682
20683         * lib/same.c (same_name): Tweak a comment.
20684
20685 2003-01-14  Bruno Haible  <bruno@clisp.org>
20686
20687         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20688         when a string comparison is sufficient.
20689
20690 2003-01-14  Bruno Haible  <bruno@clisp.org>
20691
20692         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20693         'unsigned int'.
20694
20695 2003-01-14  Bruno Haible  <bruno@clisp.org>
20696
20697         * lib/hash-pjw.c: Add comment about low quality of this function.
20698
20699 2003-01-13  Bruno Haible  <bruno@clisp.org>
20700
20701         * modules/stpcpy: Distribute lib/stpcpy.h.
20702         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20703
20704 2003-01-13  Bruno Haible  <bruno@clisp.org>
20705
20706         * modules/*: Add a description.
20707         * modules/strpbrk: Fix Makefile.am snippet.
20708         * modules/strtoimax: Fix dependencies.
20709         * modules/strtoumax: Likewise.
20710
20711 2003-01-13  Bruno Haible  <bruno@clisp.org>
20712
20713         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20714         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20715         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20716
20717 2003-01-13  Bruno Haible  <bruno@clisp.org>
20718
20719         * gnulib-tool (func_create_testdir): Store config/* files in the main
20720         directory.
20721         * config.rpath: Move to ...
20722         * config/config.rpath: ... here.
20723         * modules/gettext: Contains config/config.rpath, not config.rpath.
20724         * modules/iconv: Likewise.
20725
20726 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20727
20728         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20729         to avoid collisions with libcurses and libreadline.
20730
20731         * m4/getstr.m4: Remove.
20732         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20733
20734 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20735
20736         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20737         to avoid collisions with libcurses and libreadline.
20738
20739         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20740         * lib/getstr.h, getstr.c: Remove.
20741         * lib/getline.c: Include "getline.h", to check interface.
20742         Move body of old getstr.c here: this defines MIN_CHUNK and
20743         declares getdelim2, which is renamed from getstr.
20744         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20745
20746         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20747         All uses changed.
20748         * lib/linebuffer.h: Likewise.
20749         (readline): Remove backward-compatibility macro.
20750
20751 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20752
20753         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20754         to avoid collisions with libcurses and libreadline.
20755         * getstr: Remove.
20756         * MODULES.html.sh: Remove getstr.
20757         * modules/getline: Depend on unlocked-io, not getstr.
20758
20759 2003-01-12  Jim Meyering  <jim@meyering.net>
20760
20761         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20762
20763 2003-01-10  Bruno Haible  <bruno@clisp.org>
20764
20765         * modules/alloca: Change Makefile.am requirements. Simplify Include
20766         requirements. Add lib/alloca_.h to file list.
20767
20768 2003-01-10  Bruno Haible  <bruno@clisp.org>
20769
20770         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20771
20772 2003-01-10  Bruno Haible  <bruno@clisp.org>
20773
20774         * lib/alloca_.h: New file.
20775         * lib/getdate.y: Unconditionally include alloca.h.
20776         * lib/makepath.c: Likewise.
20777         * lib/setenv.c: Likewise.
20778         * lib/userspec.c: Likewise.
20779
20780 2003-01-09  Karl Berry  <karl@gnu.org>
20781
20782         * MODULES.html.sh: include `dirname $0` in PATH, to find
20783         gnulib-tool.
20784
20785 2003-01-09  Bruno Haible  <bruno@clisp.org>
20786
20787         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20788         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20789
20790 2003-01-09  Bruno Haible  <bruno@clisp.org>
20791
20792         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20793
20794 2003-01-09  Bruno Haible  <bruno@clisp.org>
20795
20796         * lib/stdbool.h.in: New file.
20797
20798 2003-01-09  Bruno Haible  <bruno@clisp.org>
20799
20800         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20801         * MODULES.html.sh: Likewise.
20802
20803 2003-01-08  Jim Meyering  <jim@meyering.net>
20804
20805         * lib/full-write.c: Undefine and define-away `const' after inclusion
20806         of errno.h, not before.  Suggestion from Bruno Haible.
20807
20808 2003-01-08  Bruno Haible  <bruno@clisp.org>
20809
20810         * modules/full-read: Depend on full-write.
20811
20812 2003-01-08  Bruno Haible  <bruno@clisp.org>
20813
20814         * lib/safe-read.c: Include specification header first, to ensure its
20815         selfcontainedness.
20816         * lib/full-write.c: Likewise.
20817
20818 2003-01-07  Jim Meyering  <jim@meyering.net>
20819
20820         * lib/full-write.c: Rework so that it may serve to define full_read,
20821         too.
20822         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20823
20824 2003-01-07  Bruno Haible  <bruno@clisp.org>
20825
20826         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20827         <inttypes.h>.
20828         * lib/xstrtol.h: Likewise.
20829         * lib/xstrtoimax.c: Likewise.
20830         * lib/xstrtoumax.c: Likewise.
20831         * lib/human.h: Likewise.
20832
20833         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20834         on systems that have <inttypes.h> but not <stdint.h>.
20835
20836 2003-01-07  Bruno Haible  <bruno@clisp.org>
20837
20838         * MODULES.html.sh: Add copyright notice.
20839         (missed_files): Omit CVS directory entries.
20840         (func_module): Make it work with sed-3.02.
20841         * MODULES.txt: Remove file.
20842
20843 2003-01-06  Jim Meyering  <jim@meyering.net>
20844
20845         * lib/version-etc.c: Update year in translatable copyright string.
20846
20847 2003-01-03  Karl Berry  <karl@gnu.org>
20848
20849         * config/config.{guess,sub}: update from prep.
20850
20851 2003-01-02  Karl Berry  <karl@gnu.org>
20852
20853         * doc/COPYING.DOC: belatedly updated to 1.2.
20854
20855 2003-01-01  Karl Berry  <karl@gnu.org>
20856
20857         * gnulib-tool (func_verify_module): report module name $module in
20858         error message, not $1.
20859         * gnulib-tool (create-testdir): don't complain if destdir couldn't
20860         be created, only if it doesn't exist.
20861         * gnulib-tool (last_checkin_date): don't expand the $Date here.
20862
20863 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20864
20865         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
20866
20867 2002-12-31  Paul Eggert  <eggert@twinsun.com>
20868
20869         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
20870         memcmp if strcoll doesn't work.
20871
20872 2002-12-31  Bruno Haible  <bruno@clisp.org>
20873
20874         * lib/utime.c (utime_null): No need to call ftruncate if the file was
20875         nonempty.
20876
20877 2002-12-31  Bruno Haible  <bruno@clisp.org>
20878
20879         * lib/memcoll.c (STRCOLL): New macro.
20880         (memcoll): Use it.
20881
20882 2002-12-31  Bruno Haible  <bruno@clisp.org>
20883
20884         * lib/localcharset.h: New file.
20885         * lib/localcharset.c: Include it.
20886         * lib/unicodeio.c: Likewise.
20887
20888 2002-12-31  Bruno Haible  <bruno@clisp.org>
20889
20890         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
20891         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
20892
20893 2002-12-31  Bruno Haible  <bruno@clisp.org>
20894
20895         * lib/getline.h: Include <stddef.h>, for size_t.
20896
20897         * lib/unicodeio.h: Include <stddef.h>, for size_t.
20898         * lib/unicodeio.c: Don't include <stddef.h>.
20899
20900 2002-12-31  Bruno Haible  <bruno@clisp.org>
20901
20902         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
20903         HAVE_TM_ZONE.
20904
20905 2002-12-24  Karl Berry  <karl@gnu.org>
20906
20907         * config/config.guess: update from prep.
20908
20909 2002-12-24  Bruno Haible  <bruno@clisp.org>
20910
20911         General infrasructure.
20912         * m4/README: Rewritten.
20913         * m4/onceonly.m4: New file.
20914         * m4/onceonly_2_57.m4: New file.
20915
20916         Module atexit.
20917         * m4/atexit.m4: New file.
20918
20919         Module strtod.
20920         * m4/strtod.m4: New file.
20921
20922         Module strtol.
20923         * m4/strtol.m4: New file.
20924
20925         Module strtoul.
20926         * m4/strtoul.m4: New file.
20927
20928         Module memchr.
20929         * m4/memchr.m4: New file.
20930
20931         Module memcmp.
20932         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
20933         (jm_FUNC_MEMCMP): Invoke it.
20934
20935         Module memcpy.
20936         * m4/memcpy.m4: New file.
20937
20938         Module memmove.
20939         * m4/memmove.m4: New file.
20940
20941         Module memset.
20942         * m4/memset.m4: New file.
20943
20944         Module strcspn.
20945         * m4/strcspn.m4: New file.
20946
20947         Module strpbrk.
20948         * m4/strpbrk.m4: New file.
20949
20950         Module strstr.
20951         * m4/strstr.m4: New file.
20952
20953         Module strerror.
20954         * m4/strerror.m4: New file.
20955
20956         Module mktime.
20957         * m4/mktime.m4: Renamed from jm-mktime.m4.
20958         (gl_PREREQ_MKTIME): New macro.
20959         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
20960
20961         Module malloc.
20962         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
20963         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
20964         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
20965
20966         Module realloc.
20967         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
20968         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
20969         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
20970
20971         Module strftime.
20972         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
20973         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
20974         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
20975         gl_TM_GMTOFF.
20976         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
20977
20978         Module xalloc.
20979         * m4/xalloc.m4: New file.
20980
20981         Module alloca.
20982         * m4/alloca.m4: New file.
20983
20984         Module putenv.
20985         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
20986         (jm_FUNC_PUTENV): Invoke it.
20987
20988         Module setenv.
20989         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
20990         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
20991         when invoked twice.
20992         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
20993         gt_FUNC_SETENV.
20994
20995         Module memrchr.
20996         * m4/memrchr.m4: New file.
20997
20998         Module stpcpy.
20999         * m4/stpcpy.m4: New file.
21000
21001         Module strcase.
21002         * m4/strcase.m4: New file.
21003
21004         Module strdup.
21005         * m4/strdup.m4: New file.
21006
21007         Module strnlen.
21008         * m4/strnlen.m4: New file.
21009
21010         Module strndup.
21011         * m4/strndup.m4: New file.
21012
21013         Module xstrtod.
21014         * m4/xstrtod.m4: New file.
21015
21016         Module xstrtol.
21017         * m4/xstrtol.m4: New file.
21018
21019         Module getdate.
21020         * m4/getdate.m4: New file.
21021
21022         Module unlocked-io.
21023         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21024         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21025         * m4/jm-glibc-io.m4n: Remove file.
21026
21027         Module long-options.
21028         * m4/long-options.m4: New file.
21029
21030         Module md5.
21031         * m4/md5.m4: New file.
21032
21033         Module sha.
21034         * m4/sha.m4: New file.
21035
21036         Module getstr.
21037         * m4/getstr.m4: New file.
21038
21039         Module getline.
21040         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21041         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21042         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21043         simply getline. Infoke gl_PREREQ_GETLINE.
21044
21045         Module obstack.
21046         * m4/obstack.m4: New file.
21047
21048         Module hash.
21049         * m4/hash.m4: New file.
21050
21051         Module readtokens.
21052         * m4/readtokens.m4: New file.
21053
21054         Module strverscmp.
21055         * m4/strverscmp.m4: New file.
21056
21057         Module stdbool.
21058         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21059         OSF/1.
21060
21061         Module strtoll.
21062         * m4/strtoll.m4: New file.
21063
21064         Module strtoull.
21065         * m4/strtoull.m4: New file.
21066
21067         Module strtoimax.
21068         * m4/strtoimax.m4: New file.
21069
21070         Module strtoumax.
21071         * m4/strtoumax.m4: New file.
21072
21073         Module xstrtoimax.
21074         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21075         jm_AC_PREREQ_XSTRTOIMAX.
21076         Moved the strtol prerequisites to strtol.m4.
21077         Moved the strtoll prerequisites to strtoll.m4.
21078         Moved the strtoimax prerequisites to strtoimax.m4.
21079
21080         Module xstrtoumax.
21081         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21082         jm_AC_PREREQ_XSTRTOUMAX.
21083         Moved the strtoul prerequisites to strtoul.m4.
21084         Moved the strtoull prerequisites to strtoull.m4.
21085         Moved the strtoumax prerequisites to strtoumax.m4.
21086
21087         Module chown.
21088         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21089         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21090
21091         Module dup2.
21092         * m4/dup2.m4: New file.
21093
21094         Module ftruncate.
21095         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21096         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21097
21098         Module getgroups.
21099         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21100         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21101
21102         Module gettimeofday.
21103         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21104         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21105         gl_PREREQ_GETTIMEOFDAY.
21106
21107         Module mkdir.
21108         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21109         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21110
21111         Module mkstemp.
21112         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21113         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21114         jm_AC_TYPE_UINTMAX_T.
21115         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21116
21117         Module stat.
21118         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21119         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21120
21121         Module lstat.
21122         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21123         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21124
21125         Module timespec.
21126         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21127         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21128         * m4/st_mtim.m4: Indentation.
21129
21130         Module nanosleep.
21131         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21132         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21133         gl_PREREQ_NANOSLEEP.
21134
21135         Module regex.
21136         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21137         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21138         (gl_REGEX): New macro.
21139
21140         Module rename.
21141         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21142         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21143
21144         Module rmdir.
21145         * m4/rmdir.m4: New file.
21146
21147         Module utime.
21148         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21149         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21150         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21151
21152         Module dirname.
21153         * m4/dirname.m4: New file.
21154
21155         Module getopt.
21156         * m4/getopt.m4: New file.
21157
21158         Module unistd-safer.
21159         * m4/unistd-safer.m4: New file.
21160
21161         Module fnmatch.
21162         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21163         declaration.
21164         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21165         (gl_FUNC_FNMATCH_POSIX): New macro.
21166         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21167         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21168         simply fnmatch.
21169
21170         Module exclude.
21171         * m4/exclude.m4: New file.
21172
21173         Module human.
21174         * m4/human.m4: New file.
21175
21176         Module acl.
21177         * m4/acl.m4: Nop.
21178
21179         Module backupfile.
21180         * m4/backupfile.m4: New file.
21181         * m4/d-ino.m4: Indentation.
21182
21183         Module fsusage.
21184         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21185         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21186         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21187
21188         Module dirfd.
21189         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21190         requirements.
21191
21192         Module euidaccess.
21193         * m4/euidaccess.m4: New file.
21194
21195         Module file-type.
21196         * m4/file-type.m4: New file.
21197
21198         Module fileblocks.
21199         * m4/fileblocks.m4: New file.
21200
21201         Module filemode.
21202         * m4/filemode.m4: New file.
21203
21204         Module isdir.
21205         * m4/isdir.m4: New file.
21206
21207         Module lchown.
21208         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21209         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21210
21211         Module makepath.
21212         * m4/makepath.m4: New file.
21213
21214         Module modechange.
21215         * m4/modechange.m4: New file.
21216
21217         Module mountlist.
21218         * m4/mountlist.m4: New file.
21219         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21220         Indentation.
21221
21222         Module path-concat.
21223         * m4/path-concat.m4: New file.
21224
21225         Module pathmax.
21226         * m4/pathmax.m4: New file.
21227
21228         Module same.
21229         * m4/same.m4: New file.
21230
21231         Module save-cwd.
21232         * m4/save-cwd.m4: New file.
21233
21234         Module savedir.
21235         * m4/savedir.m4: New file.
21236
21237         Module xgetcwd.
21238         * m4/xgetcwd.m4: New file.
21239         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21240
21241         Module xreadlink.
21242         * m4/xreadlink.m4: New file.
21243
21244         Module safe-read.
21245         * m4/safe-read.m4: New file.
21246
21247         Module safe-write.
21248         * m4/safe-write.m4: New file.
21249
21250         Module closeout.
21251         * m4/closeout.m4: New file.
21252
21253         Module stdio-safer.
21254         * m4/stdio-safer.m4: New file.
21255
21256         Module getpass.
21257         * m4/getpass.m4: New file.
21258
21259         Module getugroups.
21260         * m4/getugroups.m4: New file.
21261
21262         Module group-member.
21263         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21264         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21265
21266         Module idcache.
21267         * m4/idcache.m4: New file.
21268
21269         Module userspec.
21270         * m4/userspec.m4: New file.
21271
21272         Module gettime.
21273         * m4/clock_time.m4: New file.
21274         * m4/gettime.m4: New file.
21275
21276         Module settime.
21277         * m4/settime.m4: New file.
21278
21279         Module posixtm.
21280         * m4/posixtm.m4: New file.
21281
21282         Module gethostname.
21283         * m4/gethostname.m4: New file.
21284
21285         Module canon-host.
21286         * m4/canon-host.m4: New file.
21287
21288         Module gettext.
21289         * m4/codeset.m4: New file, from gettext-0.11.5.
21290         * m4/gettext.m4: New file, from gettext-0.11.5.
21291         * m4/glibc21.m4: New file, from gettext-0.11.5.
21292         * m4/iconv.m4: New file, from gettext-0.11.5.
21293         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21294         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21295         * m4/inttypes.m4: New file, from gettext-0.11.5.
21296         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21297         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21298         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21299         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21300         * m4/lib-link.m4: New file, from gettext-0.11.5.
21301         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21302         * m4/progtest.m4: New file, from gettext-0.11.5.
21303         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21304         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21305         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21306
21307         Module localcharset.
21308         * m4/localcharset.m4: New file.
21309
21310         Module hard-locale.
21311         * m4/hard-locale.m4: New file.
21312
21313         Module mbswidth.
21314         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21315         onceonly macros.
21316         * m4/mbrtowc.m4: Add comment.
21317
21318         Module memcasecmp.
21319         * m4/memcasecmp.m4: New file.
21320
21321         Module memcoll.
21322         * m4/memcoll.m4: New file.
21323
21324         Module unicodeio.
21325         * m4/unicodeio.m4: New file.
21326
21327         Module rpmatch.
21328         * m4/rpmatch.m4: New file.
21329
21330         Module yesno.
21331         * m4/yesno.m4: New file.
21332
21333         Module exitfail.
21334         * m4/exitfail.m4: New file.
21335
21336         Module c-stack.
21337         * m4/c-stack.m4 (gl_C_STACK): New macro.
21338         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21339
21340         Module error.
21341         * m4/error.m4 (gl_ERROR): New macro.
21342         (jm_PREREQ_ERROR): Use onceonly macros.
21343
21344         Module fatal.
21345         * m4/fatal.m4: New file.
21346
21347         Module getloadavg.
21348         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21349         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21350
21351         Module getpagesize.
21352         * m4/getpagesize.m4: New file.
21353
21354         Module getusershell.
21355         * m4/getusershell.m4: New file.
21356
21357         Module physmem.
21358         * m4/physmem.m4: New file.
21359
21360         Module posixver.
21361         * m4/posixver.m4: New file.
21362
21363         Module quotearg.
21364         * m4/quotearg.m4: New file.
21365
21366         Module quote.
21367         * m4/quote.m4: New file.
21368
21369         Module readutmp.
21370         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21371
21372         Module sig2str.
21373         * m4/sig2str.m4: New file.
21374
21375         Other.
21376         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21377         ulonglong.m4.
21378         * m4/intmax_t.m4: New file.
21379         * m4/d-type.m4: Indentation.
21380         * m4/jm-macros.m4: Update.
21381         * m4/prereq.m4 (jm_PREREQ): Update.
21382         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21383         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21384         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21385         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21386         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21387         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21388         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21389         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21390         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21391         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21392         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21393         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21394         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21395         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21396         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21397         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21398         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21399         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21400         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21401
21402 2002-12-24  Bruno Haible  <bruno@clisp.org>
21403
21404         * MODULES.txt: Update according to m4/ changes.
21405
21406         Module gettext.
21407         * config.rpath: New file, from gettext-0.11.5.
21408
21409         * modules/*: New module descriptions.
21410         * gnulib-tool: New file.
21411         * MODULES.html.sh: New file.
21412
21413 2002-12-21  Karl Berry  <karl@gnu.org>
21414
21415         * doc/fdl.texi: update to version 1.2.
21416
21417 2002-12-19  Karl Berry  <karl@gnu.org>
21418
21419         * config/config.guess: update from prep.
21420
21421 2002-12-18  Bruno Haible  <bruno@clisp.org>
21422
21423         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21424         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21425
21426 2002-12-17  Bruno Haible  <bruno@clisp.org>
21427
21428         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21429         stdlib.h, string.h.
21430
21431 2002-12-17  Bruno Haible  <bruno@clisp.org>
21432
21433         * lib/canon-host.c (strdup): Remove unused declaration.
21434
21435         * lib/fsusage.c: Include full_read.h.
21436         (get_fs_usage): Use full_read instead of safe_read.
21437
21438         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21439
21440 2002-12-12  Karl Berry  <karl@gnu.org>
21441
21442         * config/config.guess: update from prep.
21443
21444 2002-12-11  Bruno Haible  <bruno@clisp.org>
21445
21446         * m4/setenv.m4: New file, from gettext-0.11.5.
21447
21448 2002-12-11  Bruno Haible  <bruno@clisp.org>
21449
21450         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21451         not unsetenv().
21452         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21453         modifications:
21454
21455         2002-12-11  Bruno Haible  <bruno@clisp.org>
21456
21457                 * setenv.c (alloca): Fall back to malloc.
21458                 (freea): New macro.
21459                 (setenv): Use freea() to free memory allocated with alloca().
21460
21461         2002-11-13  Bruno Haible  <bruno@clisp.org>
21462
21463                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21464                 function declarations.
21465                 * unsetenv.c (unsetenv): Likewise.
21466
21467         2002-03-04  Bruno Haible  <bruno@clisp.org>
21468
21469                 Portability to AIX 4.3.3.
21470                 * unsetenv.c: New file, extracted from setenv.c.
21471                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21472
21473         2001-12-20  Bruno Haible  <bruno@clisp.org>
21474
21475                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21476                 use malloc instead. For SunOS 4.
21477
21478         2001-12-11  Bruno Haible  <bruno@clisp.org>
21479
21480                 * setenv.c: Declare alloca.
21481                 (compar_fn_t): New typedef.
21482                 (KNOWN_VALUE, STORE_VALUE): Use it.
21483
21484         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21485         setenv.h.
21486
21487 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21488
21489         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21490         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21491         Choose values that are less likely to collide with system fnmatch
21492         options.
21493         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21494         defined (e.g., a pure POSIX system).
21495         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21496         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21497
21498 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21499
21500         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21501         a pain in practice to deal with generated m4 files.  This change
21502         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21503
21504         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21505         and jm-glibc-io.m4, as they are no longer a special case.
21506         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21507         kludge and the auto-generation stuff.  Check only whether the
21508         functions are declared, not whether they exist, since older hosts
21509         that don't declare the functions can't use the optimization anyway.
21510
21511 2002-12-06  Jim Meyering  <jim@meyering.net>
21512
21513         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21514
21515         Merge in changes from libc's misc/error.c, in preparation
21516         for the merge of gnulib's changes back into libc.
21517
21518         * lib/error.c (_): Define only if not already defined.
21519         Move definition to follow all #include directives.
21520         Include unlocked-io.h only if !_LIBC.
21521         [_LIBC]: Include <libio/libioP.h>.
21522         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21523         (fflush): Tweak definition to use INTUSE.
21524         (putc): Define.
21525
21526 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21527
21528         * lib/alloca.c [defined emacs]: Include "lisp.h".
21529         (xalloc_die) [defined emacs]: New macro.
21530         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21531         [! defined emacs]: Include <xalloc.h>.
21532         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21533         (pointer): Typedef to POINTER_TYPE *.
21534         (malloc): Remove decl; we now always use xmalloc.
21535         (alloca): Use old-style definition, since Emacs needs this.
21536         Check for arithmetic overflow when computing combined size.
21537
21538 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21539
21540         Do not generate unlocked-io.h automatically, since it's easier to
21541         maintain it by hand.
21542
21543         * lib/unlocked-io.h: New file, from GNU diffutils,
21544         but with proper copyright notice and attribution.
21545         * lib/gen-uio: Remove.
21546         * lib/Makefile.am: Add copyright notice.
21547         (libfetish_a_SOURCES): Add unlocked-io.h.
21548         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21549         (DISTCLEANFILES, io_functions): Remove macros.
21550         (EXTRA_DIST): Remove gen_uio.
21551         (unlocked-io.h): Remove rule.
21552
21553 2002-12-04  Jim Meyering  <jim@meyering.net>
21554
21555         Reflect the fact that stat.c and lstat.c are no longer generated.
21556         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21557         (DISTCLEANFILES): Likewise.
21558         (EXTRA_DIST): Likewise.
21559         (all_local): Don't depend on stat.c or lstat.c.
21560         (stat.c, lstat.c): Remove rules.
21561         (EXTRA_DIST): Remove xstat.in.
21562
21563         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21564         * lib/stat.c: New file.  Contents mostly from xstat.in.
21565         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21566         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21567
21568         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21569         too.
21570         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21571
21572 2002-12-03  Jim Meyering  <jim@meyering.net>
21573
21574         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21575         but not semantics, to minimize the differences between these two files.
21576         (safe_read): Change comment to mention SAFE_READ_ERROR.
21577
21578         * lib/safe-read.c (IS_EINTR): Define.
21579         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21580
21581 2002-12-02  Jim Meyering  <jim@meyering.net>
21582
21583         * lib/safe-read.c (EINTR): Define.
21584         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21585         (INT_MAX): Provide fallback.
21586         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21587
21588         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21589
21590 2002-12-02  Bruno Haible  <bruno@clisp.org>
21591
21592         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21593         Define, taken from safe-read.c.
21594         (INT_MAX): Provide fallback.
21595         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21596         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21597
21598         * lib/safe-read.c (EINTR): Remove definition.
21599         (safe_read): Don't use EINTR if it is absent.
21600
21601 2002-12-01  Jim Meyering  <jim@meyering.net>
21602
21603         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21604         zero.
21605         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21606
21607 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21608
21609         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21610         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21611         with `if (! (value < limit)) abort ();', for readability.
21612
21613 2002-11-26  Karl Berry  <karl@gnu.org>
21614
21615         * lib/strdup.c: copy from libc again, with jim's ok.
21616         * lib/.cppi-disable: re-add strdup.c
21617
21618 2002-11-25  Karl Berry  <karl@gnu.org>
21619
21620         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21621         instead of "strtol.c".
21622
21623 2002-11-25  Karl Berry  <karl@gnu.org>
21624
21625         * config/install-sh: update from automake for variable quoting, $0 in
21626         error msgs, etc.
21627
21628         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21629         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21630         entry.
21631
21632 2002-11-25  Jim Meyering  <jim@meyering.net>
21633
21634         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21635
21636 2002-11-24  Karl Berry  <karl@gnu.org>
21637
21638         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21639         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21640
21641 2002-11-24  Jim Meyering  <jim@meyering.net>
21642
21643         Update from coreutils:
21644
21645         * lib/mktime.c: Merge in changes from libc.
21646
21647         Avoid a link-time failure on some Linux systems.
21648         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21649         (otherwise).
21650         (__mon_yday): Declare with the STATIC attribute.
21651         (__mktime_internal): Likewise.
21652         Based on a report from Greg Schafer.
21653
21654 2002-11-23  Jim Meyering  <jim@meyering.net>
21655
21656         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21657         Use `unsigned', not `int', as type of index.
21658
21659         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21660
21661         * lib/fsusage.c: Remove unneeded parentheses around operands of
21662         `defined'.
21663
21664 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21665
21666         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21667         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21668         so that we can be included first.
21669         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21670         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21671         No need to include stddef.h or sys/types.h any more.
21672         Surround local include files with "", not "<>".
21673         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21674         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21675         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21676         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21677         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21678         (ISPRINT): Remove; no longer needed now that we assume C89.
21679
21680         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21681         Preserve errno.
21682
21683         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21684         quotearg_char): Use SIZE_MAX rather than
21685         (size_t) -1 when we are talking about "infinity".
21686
21687         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21688
21689 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21690
21691         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21692         hint that one should use `if (! x) abort ();' rather than `assert
21693         (x);', and anyway it's one less thing to worry about configuring.
21694         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21695         hash_rehash, hash_insert): Use abort rather than assert.
21696
21697 2002-11-22  Bruno Haible  <bruno@clisp.org>
21698
21699         * lib/safe-read.h: Assume C89. Add comments.
21700         (safe_read): Change return type to size_t.
21701         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21702         byte counts > SSIZE_MAX correctly.
21703         * lib/safe-write.h: New file.
21704         * lib/safe-write.c: New file.
21705         * lib/full-read.h: New file.
21706         * lib/full-read.c: New file.
21707         * lib/full-write.h: Assume C89. Add comments.
21708         * lib/full-write.c: Include safe-write.h.
21709         (full_write): Rewritten to use safe_write.
21710         Suggested by Jim Meyering and Paul Eggert.
21711
21712 2002-11-21  Jim Meyering  <jim@meyering.net>
21713
21714         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21715
21716         Merge in changes from the coreutils.
21717
21718         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21719         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21720         <stdint.h>.
21721         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21722         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21723         int.  Work more efficiently if X is the same width as uintmax_t.
21724         Do not compare X to -1, to avoid bogus compiler warning.
21725         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21726         Don't assume that f_frsize and f_bsize are the same type.
21727
21728         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21729         warning on FreeBSD.
21730
21731         * lib/makepath.c (make_path): Restore umask *before* creating the final
21732         component.
21733         (make_path): Minor reformatting.
21734
21735         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21736         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21737         HAVE_MALLOC/HAVE_REALLOC.
21738
21739         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21740         dummy ones.  At least on GNU/Linux systems, `auto' means something
21741         else.
21742         From Michael Stone.
21743
21744 2002-11-21  Bruno Haible  <bruno@clisp.org>
21745
21746         Remove case insensitive option matching.
21747         * lib/argmatch.h (argcasematch): Remove declaration.
21748         (ARGCASEMATCH): Remove macro.
21749         (__xargmatch_internal): Remove case_sensitive argument.
21750         (XARGMATCH): Update.
21751         (XARGCASEMATCH): Remove macro.
21752         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21753         case_sensitive argument.
21754         (argcasematch): Remove function.
21755         (__xargmatch_internal): Remove case_sensitive argument.
21756         (main): Use XARGMATCH instead of XARGCASEMATCH.
21757
21758         * lib/xmalloc.c: Change compile-time error message. Add comment about
21759         required autoconf version.
21760
21761 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21762
21763         Merge argmatch cleanups from Bison.  Assume C89.
21764
21765         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21766         Include stdlib.h, for EXIT_FAILURE.
21767         Always include <string.h>, since we assume C89.
21768         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21769         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21770         Include <stddef.h> instead, since it's all we need for size_t.
21771         (PARAMS): Remove.  All uses removed.
21772         (ARRAY_CARDINALITY): Do not bother to #undef.
21773         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21774         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21775         Remove unnecessary parentheses.
21776         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21777         Insert necessary parentheses.
21778         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21779         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21780
21781 2002-11-19  Bruno Haible  <bruno@clisp.org>
21782
21783         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21784         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21785
21786         * lib/mbswidth.h (PARAMS): Remove macro.
21787         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21788         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21789
21790         * lib/gcd.h (PARAMS): Remove macro.
21791         (gcd): Use ANSI C function declarations.
21792         * lib/gcd.c (gcd): Likewise.
21793
21794 2002-11-15  Bruno Haible  <bruno@clisp.org>
21795
21796         * lib/strcspn.c: Include <stddef.h>.
21797         (strcspn): Use ANSI C function declaration. Change return type to
21798         size_t. Use NULL.
21799         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21800         (strpbrk): Use NULL.
21801         * lib/strpbrk.h (PARAMS): Remove macro.
21802         (strpbrk): Use ANSI C function declaration.
21803         * lib/strstr.c: Don't include <sys/types.h>.
21804         * lib/strstr.h (PARAMS): Remove macro.
21805         (strstr): Use ANSI C function declarations.
21806
21807 2002-11-14  Karl Berry  <karl@gnu.org>
21808
21809         * config/mkinstalldirs: `do' on separate line, instead of
21810         `for var; do'.
21811
21812 2002-11-06  Bruno Haible  <bruno@clisp.org>
21813
21814         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21815         * lib/gcd.c (gcd): Likewise.
21816
21817 2002-11-05  Bruno Haible  <bruno@clisp.org>
21818
21819         * lib/gcd.h: New file, from gettext-0.11.5.
21820         * lib/gcd.c: New file, from gettext-0.11.5.
21821
21822 2002-11-05  Bruno Haible  <bruno@clisp.org>
21823
21824         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21825         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21826         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21827         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21828
21829         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21830         <libintl.h>.
21831         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21832         <libintl.h>.
21833
21834         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21835         * lib/human.c: Include gettext.h instead of <libintl.h>.
21836         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21837         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21838         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21839         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21840         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21841         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21842         (textdomain): Remove definition.
21843         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21844
21845         * lib/long-options.c: Remove include of <libintl.h> and definition of
21846         _.
21847         * lib/same.c: Remove include of <libintl.h> and definition of _.
21848
21849 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21850
21851         * lib/config.charset: A few additions for Solaris.
21852
21853 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21854
21855         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21856         * lib/localcharset.c (locale_charset): Declare as extern "C".
21857
21858 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21859
21860         * lib/config.charset: msdos in uk_UA uses CP1125.
21861
21862 2002-11-04  Bruno Haible  <bruno@clisp.org>
21863
21864         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
21865         * lib/strcase.h: New file, from GNU gettext-0.11.5.
21866         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
21867         * lib/strstr.h: New file, from GNU gettext-0.11.5.
21868         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
21869
21870 2002-11-04  Bruno Haible  <bruno@clisp.org>
21871
21872         * lib/localcharset.c (locale_charset): Don't return an empty string.
21873
21874 2002-11-04  Bruno Haible  <bruno@clisp.org>
21875
21876         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
21877         aliases.
21878
21879 2002-11-04  Bruno Haible  <bruno@clisp.org>
21880
21881         * lib/config.charset: Update for newest glibc. Add canonical names
21882         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
21883
21884 2002-11-04  Bruno Haible  <bruno@clisp.org>
21885
21886         * lib/config.charset: Add support for NetBSD.
21887
21888 2002-11-04  Bruno Haible  <bruno@clisp.org>
21889
21890         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
21891
21892 2002-11-01  Bruno Haible  <bruno@clisp.org>
21893
21894         * configure.in: Add AC_CONFIG_AUX_DIR call.
21895         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
21896         test/Makefile.
21897         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
21898
21899 2002-09-28  Karl Berry  <karl@gnu.org>
21900
21901         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
21902         installed automake until the next release, since changes have been
21903         made.
21904
21905 2002-09-25  Karl Berry  <karl@gnu.org>
21906
21907         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
21908         * lib/getopt*: copy from libc/posix.
21909         * lib/gettext.h: copy from gettext.
21910         * lib/.cppi-disable: add strdup.c, gettext.h.
21911
21912 2002-09-25  Karl Berry  <karl@gnu.org>
21913
21914         * config/srclist.txt: enable gettext.h check.
21915         * config/config.{guess,sub}: update from prep.
21916         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
21917                 from automake 1.6.3.
21918         See srclist*.
21919
21920 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
21921
21922         * regex.c (PATFETCH): Remove the translating fetch.
21923         (PATFETCH_RAW): Rename to PATFETCH.
21924         (set_image_of_range): New fun.
21925         (SET_RANGE_TABLE_WORK_AREA): Use it.
21926         (regex_compile): Don't translate the pattern chars so eagerly.
21927         Only do it when inserting an `exactn' bytecode or when handling
21928         a char-range.
21929         (mutually_exclusive_p): Avoid empty statement.
21930
21931 2002-07-06  Jim Meyering  <meyering@lucent.com>
21932
21933         * m4/README: Don't mention Makefile.am.in.
21934         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
21935
21936 2002-07-01  Jim Meyering  <meyering@lucent.com>
21937
21938         * lib/c-stack.c: Include sys/time.h.
21939         From Volker Borchert.
21940
21941 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21942
21943         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
21944
21945 2002-06-26  Paul Eggert  <eggert@twinsun.com>
21946
21947         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
21948         New macro.  Use it uniformly instead of
21949         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
21950         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
21951         reported by Vin Shelton.
21952
21953 2002-06-22  Paul Eggert  <eggert@twinsun.com>
21954
21955         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
21956         Do not assume SA_SIGINFO behavior.
21957         Bug reported by Jim Meyering on NetBSD 1.5.2.
21958
21959 2002-06-22  Jim Meyering  <meyering@lucent.com>
21960
21961         * m4/c-stack.m4: New file, from diffutils-2.8.2.
21962         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
21963
21964         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
21965         now that configure.ac uses AC_GNU_SOURCE.
21966         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
21967         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
21968
21969         Update to latest tools.  Suggestions from Paul Eggert.
21970         * m4/stdbool.m4: New file, from diffutils-2.8.2.
21971         * m4/gnu-source.m4: Update from diffutils-2.8.2.
21972         * m4/fnmatch.m4: Likewise.
21973         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
21974         to AC_HEADER_STDBOOL
21975
21976 2002-06-22  Jim Meyering  <meyering@lucent.com>
21977
21978         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
21979         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
21980
21981 2002-06-22  Jim Meyering  <meyering@lucent.com>
21982
21983         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
21984
21985         * lib/exitfail.c, exitfail.h: Likewise.
21986         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
21987
21988         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
21989         of fnmatch.h.
21990         (EXTRA_DIST): Add fnmatch_loop.c.
21991         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
21992
21993         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
21994         * lib/fnmatch.c: Update from diffutils-2.8.2.
21995         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
21996         * lib/fnmatch.h: Remove file.
21997
21998 2002-06-21  Jim Meyering  <meyering@lucent.com>
21999
22000         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22001         * m4/mbrtowc.m4: Likewise.
22002
22003         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22004         * m4/mbswidth.m4: Reflect name change:
22005         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22006         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22007
22008         * m4/lib-link.m4: Update from gettext-0.11.2.
22009         * m4/gettext.m4: Likewise.
22010
22011         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22012         From Alfred M. Szmidt.
22013
22014 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22015
22016         * lib/file-type.h: Report an error if neither S_ISREG nor
22017         S_IFREG is defined, instead of using a test specific to glibc
22018         2.2.  This should be safe, since POSIX requires S_ISREG and
22019         Unix Version 7 had S_IFREG.  We don't need to check for
22020         <sys/types.h> since we don't use any symbols that it defines.
22021
22022 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22023
22024         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22025         $@-t, so that each temporary file name is unique and valid in the first
22026         8 characters, for operation under DOS.
22027
22028 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22029
22030         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22031
22032 2002-06-15  Jim Meyering  <meyering@lucent.com>
22033
22034         Work even with DJGPP 2.03, which lacks support for symlinks.
22035         From Richard Dawe.
22036         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22037         is defined.
22038         * lib/lchown.c (S_ISLNK): Likewise.
22039
22040 2002-06-15  Jim Meyering  <meyering@lucent.com>
22041
22042         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22043         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22044         have been included before this file.
22045
22046 2002-06-14  Jim Meyering  <meyering@lucent.com>
22047
22048         * lib/file-type.h: Use the version from diffutils-2.8.2.
22049         * lib/file-type.c: Likewise.
22050
22051 2002-06-07  Jim Meyering  <meyering@lucent.com>
22052
22053         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22054         They're needed at least for NetBSD 1.5.2.
22055         ($statxfs_includes): Include those same headers.
22056         ($statxfs_includes): Include sys/vfs.h if available.
22057         ($statxfs_includes): Likewise for sys/statvfs.h.
22058         Check for the following members in both structs statfs and statvfs:
22059         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22060
22061 2002-06-01  Jim Meyering  <meyering@lucent.com>
22062
22063         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22064         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22065
22066 2002-05-28  Jim Meyering  <meyering@lucent.com>
22067
22068         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22069         Reported by Volker Borchert.
22070
22071 2002-05-27  Jim Meyering  <meyering@lucent.com>
22072
22073         Fix a problem seen only on nonconforming systems whereby ls.c's
22074         use of localtime, and then of gettimeofday would cause trouble:
22075         the localtime call used to initialize rpl_gettimeofday's save
22076         mechanism would clobber ls's current local time information so
22077         that in any long listing the first file would always be listed
22078         with date 1970-01-01.  Analysis by Volker Borchert.
22079
22080         * lib/gettimeofday.c (localtime): Undefine.
22081         (rpl_localtime): New function.
22082
22083 2002-05-27  Jim Meyering  <meyering@lucent.com>
22084
22085         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22086         localtime.
22087
22088         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22089         use the replacement function; it wouldn't resolve at link time.
22090         Reported by Volker Borchert.
22091
22092 2002-05-22  Jim Meyering  <meyering@lucent.com>
22093
22094         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22095         file-type.h.
22096         * lib/file-type.h: New file.
22097         * lib/file-type.c (file_type): New file/function.  Extracted from
22098         diffutils.
22099
22100 2002-04-30  Jim Meyering  <meyering@lucent.com>
22101
22102         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22103
22104 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22105
22106         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22107
22108 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22109
22110         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22111         Do not check for alloca.h (no longer used) or stdbool.h (was never
22112         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22113
22114 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22115
22116         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22117
22118 2002-04-29  Jim Meyering  <meyering@lucent.com>
22119
22120         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22121         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22122         Use AC_FUNC_STRNLEN here instead.
22123
22124         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22125         With autoconf-2.53a, it's part of AC_PROG_CC.
22126
22127 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22128
22129         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22130         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22131
22132 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22133
22134         * lib/sig2str.h, lib/sig2str.c: New files.
22135         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22136
22137 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22138
22139         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22140         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22141         of 127, since 64 is the largest conceivable number for ancient
22142         nonstandard hosts.
22143         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22144
22145 2002-04-28  Jim Meyering  <meyering@lucent.com>
22146
22147         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22148
22149 2002-04-24  Jim Meyering  <meyering@lucent.com>
22150
22151         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22152         (jm_PREREQ): Use it.
22153
22154         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22155         mach/mach.h fcntl.h.
22156         Check for this function: setlocale.
22157
22158 2002-04-24  Jim Meyering  <meyering@lucent.com>
22159
22160         * lib/gettext.h: New file, from Gettext.
22161         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22162         (libfetish_a_SOURCES): Add gettext.h.
22163
22164 2002-04-16  Jim Meyering  <meyering@lucent.com>
22165
22166         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22167         ut_pid, ut_id, ut_exit.
22168
22169 2002-04-16  Jim Meyering  <meyering@lucent.com>
22170
22171         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22172         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22173         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22174
22175 2002-04-12  Jim Meyering  <meyering@lucent.com>
22176
22177         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22178         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22179         existence of the getmntinfo function.  Needed for Darwin 5.3.
22180
22181         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22182         This is necessary at least on Darwin 5.3.
22183
22184         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22185         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22186         strnlen.o in the library, and that makes some versions of ranlib
22187         object.
22188
22189 2002-04-12  Jim Meyering  <meyering@lucent.com>
22190
22191         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22192
22193 2002-04-09  Jim Meyering  <meyering@lucent.com>
22194
22195         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22196         to be more precise.  Rather than saying we're checking whether the
22197         function `works', say what we're testing.
22198         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22199         Reported by Bruno Haible.
22200
22201 2002-03-10  Jim Meyering  <meyering@lucent.com>
22202
22203         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22204         Suggestion from Santiago Vila.
22205
22206 2002-03-08  Jim Meyering  <meyering@lucent.com>
22207
22208         * lib/rename.c: Mention that this wrapper is needed also on
22209         mips-dec-ultrix4.4 systems.
22210
22211 2002-03-02  Jim Meyering  <meyering@lucent.com>
22212
22213         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22214         not HAVE_CLOCK_SETTIME.
22215
22216 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22217
22218         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22219         Check for clock_settime.
22220
22221 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22222
22223         * lib/nanosleep.h: Rename to....
22224         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22225
22226         * lib/gettime.c: New file.
22227         * lib/settime.c: New file.
22228         * lib/stime.c: Remove.
22229
22230         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22231         timespec.h.  Remove nanosleep.h.
22232
22233 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22234
22235         * m4/acl.m4: New file.
22236         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22237         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22238
22239 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22240
22241         * lib/acl.c, lib/acl.h: New files.
22242         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22243
22244 2002-02-24  Jim Meyering  <meyering@lucent.com>
22245
22246         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22247         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22248         cause trouble.  Reported by Nelson Beebe.
22249
22250 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22251
22252         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22253         compilers that don't know that xalloc_die never returns.
22254
22255 2002-02-20  Jim Meyering  <meyering@lucent.com>
22256
22257         * lib/getdate.c: Regenerate using bison-1.33.
22258
22259 2002-02-17  Jim Meyering  <meyering@lucent.com>
22260
22261         * config/config.guess (main): Don't use `head -1'; it's no longer
22262         portable. Use `sed 1q' instead.
22263
22264 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22265
22266         * m4/codeset.m4: Upgrade to gettext-0.11.
22267         * m4/gettext.m4: Upgrade to gettext-0.11.
22268         * m4/glibc21.m4: Upgrade to gettext-0.11.
22269         * m4/iconv.m4: Upgrade to gettext-0.11.
22270         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22271         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22272         * m4/lib-ld.m4: New file, from gettext-0.11.
22273         * m4/lib-link.m4: New file, from gettext-0.11.
22274         * m4/lib-prefix.m4: New file, from gettext-0.11.
22275         * m4/progtest.m4: Upgrade to gettext-0.11.
22276
22277 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22278
22279         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22280         (jm_PREREQ): Use it.
22281
22282 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22283
22284         * lib/posixver.c, lib/posixver.h: New files.
22285         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22286
22287 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22288             Bruno Haible  <bruno@clisp.org>
22289
22290         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22291         (fwrite_success_callback): New declaration.
22292         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22293         print_unicode_char. Call failure callback instead of error.
22294         (fwrite_success_callback): New function.
22295         (exit_failure_callback): New function.
22296         (fallback_failure_callback): New function.
22297         (print_unicode_char): Call unicode_to_mb.
22298
22299 2002-01-26  Jim Meyering  <meyering@lucent.com>
22300
22301         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22302         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22303
22304 2002-01-26  Jim Meyering  <meyering@lucent.com>
22305
22306         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22307
22308 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22309
22310         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22311
22312 2002-01-22  Jim Meyering  <meyering@lucent.com>
22313
22314         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22315         Otherwise, some versions of automake would omit the rule that makes
22316         Makefile from Makefile.in.
22317
22318 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22319
22320         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22321         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22322         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22323         (memcoll): Set errno to zero if there is no error.
22324
22325         * lib/quotearg.c (quotearg_buffer_restyled):
22326         Fix bug with quoting buffers containing NUL when backslashing escapes.
22327         This bug was exposed by the other changes in this patch.
22328         (quotearg_n_options): New arg ARGSIZE.
22329         All callers changed.
22330         (quoting_options_from_style): New function.
22331         (quotearg_n_style): Use it.
22332         (quotearg_n_style_mem): New function.
22333
22334         * lib/quotearg.h (quotearg_n_style_mem): New function.
22335
22336 2002-01-19  Jim Meyering  <meyering@lucent.com>
22337
22338         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22339         Remove useless quotes: DF_PROG="df".
22340         * m4/strnlen.m4: New file.
22341
22342 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22343
22344         * lib/backupfile.c (ISDIGIT): Comment fix.
22345         * lib/getdate.y (ISDIGIT): Likewise.
22346         * lib/posixtm.c (ISDIGIT, year): Likewise.
22347         * lib/strverscmp.c (ISDIGIT): Likewise.
22348         * lib/userspec.c (ISDIGIT): Likewise.
22349
22350 2002-01-16  Jim Meyering  <meyering@lucent.com>
22351
22352         * lib/getdate.y: Add three semicolons, each just before a closing
22353         brace. Bison (as of version 1.31) no longer papers over that mistake.
22354
22355 2002-01-05  Jim Meyering  <meyering@lucent.com>
22356
22357         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22358
22359 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22360
22361         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22362         not silently exit merely because the output buffer happens to
22363         have nothing pending.
22364
22365 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22366
22367         See the big note in ../ChangeLog.
22368         * lib/human.c (suffixes): Prefer K to k for 1024.
22369         (generate_suffix_backwards): New function.
22370         (human_readable_inexact): Use it.
22371         * lib/xstrtol.c (__xstrtol): If there is no number but there
22372         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22373         Accept 'K' as well as 'k'.
22374
22375 2001-12-15  Jim Meyering  <meyering@lucent.com>
22376
22377         * lib/regex.h (__restrict_arr): Update from libc.
22378
22379         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22380         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22381         (STREQ): Define.
22382
22383 2001-12-14  Jim Meyering  <meyering@lucent.com>
22384
22385         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22386         Suggestion from Bruno Haible.
22387
22388 2001-12-10  Jim Meyering  <meyering@lucent.com>
22389
22390         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22391         xrealloc, Instead, include "xalloc.h".
22392         (initbuffer): Don't cast xmalloc return value to char*.
22393         (readline): Reword comment.
22394         Don't cast xrealloc return value to char*
22395         Return NULL, not 0.
22396
22397 2001-12-09  Jim Meyering  <meyering@lucent.com>
22398
22399         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22400         about `signed and unsigned type in conditional expression'.
22401         * lib/posixtm.c (posix_time_parse): Likewise.
22402
22403         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22404
22405         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22406         to avoid a pedantic warning.
22407
22408         * lib/getstr.c: Don't include assert.h.
22409         (getstr): Remove warning-evoking assertions.
22410         Return -1 if offset parameter is out of bounds.
22411         Change the type of a local from int to size_t.
22412
22413         * lib/strftime.c (my_strftime_localtime_r): Include this function
22414         definition in the `#if ! HAVE_TM_GMTOFF' block.
22415
22416         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22417         Include xalloc.h instead.
22418
22419 2001-12-02  Jim Meyering  <meyering@lucent.com>
22420
22421         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22422         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22423         included.
22424
22425         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22426         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22427
22428 2001-11-30  Akim Demaille  <akim@epita.fr>
22429
22430         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22431         before being defined.
22432
22433 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22434
22435         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22436         First arg is int, not unsigned.
22437         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22438         (SIZE_MAX, UINT_MAX): New macros.
22439         (quotearg_n_options): Abort if N is negative.
22440         Avoid overflow check on hosts where size_t is 64 bits and int
22441         is 32 bits, as overflow is impossible there.
22442         Fix off-by-one typo that caused unnecessary reallocation.
22443
22444 2001-11-27  Jim Meyering  <meyering@lucent.com>
22445
22446         * lib/tempname.c: Merge with version from libc.
22447         * lib/regex.c: Likewise.
22448
22449         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22450         systems for which STDC_HEADERS is 0, it was not included, resulting in
22451         a warning about an integer-to-pointer conversion problem with getenv.
22452         Reported by Volker Borchert.
22453
22454 2001-11-26  Jim Meyering  <meyering@lucent.com>
22455
22456         * lib/gtod.h: Remove file.
22457         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22458         * lib/gettimeofday.c: Don't include gtod.h.
22459         (GTOD_init): Remove function.
22460         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22461         Suggestion from Volker Borchert.
22462
22463 2001-11-23  Jim Meyering  <meyering@lucent.com>
22464
22465         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22466         it.
22467         * lib/hash.c (struct hash_table): Define it here instead.
22468
22469 2001-11-22  Jim Meyering  <meyering@lucent.com>
22470
22471         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22472
22473 2001-11-20  Jim Meyering  <meyering@lucent.com>
22474
22475         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22476         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22477
22478 2001-11-19  Jim Meyering  <meyering@lucent.com>
22479
22480         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22481         directory.  Use "conftestXXXXXX" as the template.
22482         Suggestion from Paul Eggert.
22483
22484         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22485         immediately, so the test doesn't mistakenly hit the max-open-files
22486         limit.
22487
22488 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22489
22490         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22491         (TEMPORARIES): New macro.
22492         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22493         removes an artificial limitation (e.g. HP-UX 10.20, where
22494         TMP_MAX is 17576).
22495
22496 2001-11-18  Jim Meyering  <meyering@lucent.com>
22497
22498         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22499
22500 2001-11-18  Jim Meyering  <meyering@lucent.com>
22501
22502         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22503         on SunOS 4.
22504
22505         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22506         files will be created before anything else.
22507
22508 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22509
22510         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22511         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22512
22513 2001-11-17  Jim Meyering  <meyering@lucent.com>
22514
22515         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22516         Prompted by a report from Bob Proulx.
22517
22518         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22519         Instead, require UTILS_FUNC_MKSTEMP.
22520
22521 2001-11-17  Jim Meyering  <meyering@lucent.com>
22522
22523         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22524         Now, that's done as part of AC_FUNC_STRTOD.
22525
22526 2001-11-17  Jim Meyering  <meyering@lucent.com>
22527
22528         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22529         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22530         rather than group writable.  Patch by Juan F. Codagnone.
22531
22532         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22533         xrealloc, Instead, include "xalloc.h".
22534
22535         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22536         Remove explicit declarations of xmalloc, xrealloc,
22537         and xstrdup.  Instead, include "xalloc.h".
22538
22539         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22540         unlocked-io.h.
22541         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22542         Likewise.
22543         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22544
22545         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22546         Reported by Padraig Brady.
22547
22548         * lib/mkstemp.c: #undef mkstemp.
22549         Include config.h.
22550         (rpl_mkstemp): Rename from mkstemp.
22551         Protoize.
22552
22553 2001-11-16  Jim Meyering  <meyering@lucent.com>
22554
22555         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22556         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22557         determine the amount of total physical memory, use pstat_getstatic.
22558         HPUX-11 doesn't define _SC_PHYS_PAGES.
22559         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22560         If sysconf couldn't be used to determine the amount of available
22561         physical memory, use both pstat_getstatic and pstat_getdynamic.
22562         Based on a patch from Bob Proulx.
22563
22564 2001-11-10  Jim Meyering  <meyering@lucent.com>
22565
22566         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22567         (jm_PREREQ): Use it.
22568
22569 2001-11-09  Jim Meyering  <meyering@lucent.com>
22570
22571         * m4/jm-macros.m4: Require autoconf-2.52f.
22572         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22573         Use these AC_-prefixed names, not the AM_-prefixed ones.
22574
22575         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22576
22577 2001-11-05  Jim Meyering  <meyering@lucent.com>
22578
22579         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22580
22581 2001-11-04  Jim Meyering  <meyering@lucent.com>
22582
22583         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22584         $DEFS.
22585
22586 2001-11-03  Jim Meyering  <meyering@lucent.com>
22587
22588         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22589         of AC_DEFUN.
22590
22591         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22592         know the name of the variable in the macro definition.
22593
22594 2001-11-03  Jim Meyering  <meyering@lucent.com>
22595
22596         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22597         in argmatch_to_argument call.
22598
22599         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22600         argument.
22601
22602         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22603         e.g., a fault due to an attempt to free a NULL pointer.
22604
22605 2001-11-01  Jim Meyering  <meyering@lucent.com>
22606
22607         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22608         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22609
22610 2001-11-01  Jim Meyering  <meyering@lucent.com>
22611
22612         * lib/dirfd.c, lib/dirfd.h: New files.
22613         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22614
22615         * lib/hash.c (hash_print) [TESTING]: Clean up.
22616
22617 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22618
22619         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22620         to avoid a warning if -Wall.
22621
22622 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22623
22624         * README: New file
22625         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22626         (per RMS's instructions, this is now the canonical source)
22627         * lgpl/, gpl/: New directories.
22628
22629 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22630
22631         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22632
22633 2001-10-21  Jim Meyering  <meyering@lucent.com>
22634
22635         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22636         this code would end up calling gettext even in packages built
22637         with --disable-nls.
22638         * lib/getopt.c (_): Likewise.
22639         * lib/regex.c (_): Likewise.
22640
22641 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22642
22643         * m4/error.m4 (jm_PREREQ_ERROR):
22644         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22645         AC_FUNC_STRERROR_R does that.
22646         Check for strerror declaration.
22647
22648         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22649         are supposed to have them these days.
22650         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22651         Merge changes from latest Autoconf CVS.
22652         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22653         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22654         POSIX decided to standardize on the int flavor of strerror_r.
22655
22656 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22657
22658         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22659         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22660         Use strerror_r that is only a macro, even if it is not a function.
22661         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22662         (private_strerror): Use prototypes, not old-style function definition.
22663         (print_errno_message): New function.
22664         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22665         char*-flavored one.
22666         (error_tail, error, error_at_line): Use it.
22667
22668 2001-10-11  Jim Meyering  <meyering@lucent.com>
22669
22670         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22671         and quote_n (1, ... to avoid clobbering a buffer.
22672
22673 2001-10-05  Jim Meyering  <meyering@lucent.com>
22674
22675         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22676         hash-pjw.h.
22677         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22678         * lib/hash-pjw.h: New file.
22679
22680 2001-09-30  Jim Meyering  <meyering@lucent.com>
22681
22682         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22683         `struct fsstat' has the `f_fstypename' member.
22684         Use that to define FS_TYPE, which is now used to make
22685         the getfsstat link test tighter.
22686
22687 2001-09-30  Jim Meyering  <meyering@lucent.com>
22688
22689         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22690         Include <sys/ucred.h>, for Apple Darwin.
22691         Include sys/mount.h and sys/fs_types.h only if available.
22692         (FS_TYPE): Define.
22693         (read_filesystem_list): Use FS_TYPE.
22694
22695 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22696
22697         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22698         a boolean context.
22699
22700 2001-09-29  Jim Meyering  <meyering@lucent.com>
22701
22702         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22703         [one-argument getmntent function]): Include stdio.h before mntent.h.
22704         SunOS 4.1.x needs it for the declaration of `FILE'.
22705         Patch by Volker Borchert.
22706
22707         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22708         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22709         sys/fs_types.h, and make the link-test for getfsstat guard #include
22710         directives with appropriate #if HAVE_*_H tests so that we can
22711         detect getfsstat on Apple Darwin1.3.7 systems.
22712         Reported by Nelson Beebe.
22713         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22714
22715 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22716
22717         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22718         #defines strtoimax.  Also treat the other strto* functions
22719         like strtoimax.
22720
22721         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22722         Check for strtoul and strtoumax,
22723         as those declarations are made even in the signed case.
22724         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22725         Likewise, for strtol and strtoimax.
22726
22727 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22728
22729         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22730         #defines strtoimax.  Also treat the other strto* functions
22731         like strtoimax.
22732
22733         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22734         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22735         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22736
22737 2001-09-26  Jim Meyering  <meyering@lucent.com>
22738
22739         Most macros in unlocked-io.h had the wrong number of arguments.
22740         * lib/gen-uio: New script.
22741         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22742         * lib/unlocked-io.hin: Remove file.
22743         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22744         rather than trying to embed it here.
22745         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22746         Reported by Padraig Brady.
22747
22748 2001-09-25  Volker Borchert  <bt@teknon.de>
22749
22750         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22751         `result'.
22752
22753 2001-09-24  Jim Meyering  <meyering@lucent.com>
22754
22755         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22756
22757 2001-09-23  Jim Meyering  <meyering@lucent.com>
22758
22759         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22760         instead of the mere test for existence of mntent.h.  The latter
22761         would get a false-positive on AIX 3.4 systems.
22762         In the outer getmntent if-block, don't die if neither of the getmntent
22763         tests succeeds.  Instead, just fall through and continue with the
22764         remaining tests.
22765
22766 2001-09-23  Jim Meyering  <meyering@lucent.com>
22767
22768         * lib/mountlist.c: Remove useless parentheses in #if directives.
22769         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22770         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22771
22772 2001-09-22  Jim Meyering  <meyering@lucent.com>
22773
22774         * m4/gettext.m4: New file.  From gettext.
22775         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22776         * m4/progtest.m4: Likewise
22777         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22778         * m4/glibc21.m4: Likewise.
22779
22780         * m4/libintl.m4: Remove.  No longer used.
22781
22782 2001-09-22  Jim Meyering  <meyering@lucent.com>
22783
22784         * lib/localcharset.c: Update from latest gettext.
22785         * lib/config.charset: Likewise.
22786
22787 2001-09-20  Jim Meyering  <meyering@lucent.com>
22788
22789         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22790         strtoimax.
22791         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22792         strtoumax.
22793
22794 2001-09-20  Jim Meyering  <meyering@lucent.com>
22795
22796         * lib/xstrtol.c (strtoimax): Guard declaration with
22797         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22798         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22799         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22800         (strtoumax): Likewise, for completeness (it wasn't necessary).
22801
22802 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22803
22804         * lib/strtoimax.c (HAVE_LONG_LONG):
22805         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22806         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22807         to work around bug in IBM C compiler.
22808
22809 2001-09-17  Jim Meyering  <meyering@lucent.com>
22810
22811         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22812         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22813         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22814         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22815         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22816         whenever the right hand side need not be expanded by the shell.
22817
22818 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22819
22820         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22821         library.  It's not correct, as some older glibcs are buggy.
22822         fnmatch wasn't fixed until glibc 2.2.
22823
22824         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22825         special shell magic here.
22826
22827 2001-09-16  Jim Meyering  <meyering@lucent.com>
22828
22829         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22830         * m4/jm-macros.m4: Require it.
22831
22832 2001-09-16  Jim Meyering  <meyering@lucent.com>
22833
22834         * lib/mkdir.c: New file.
22835
22836 2001-09-15  Jim Meyering  <meyering@lucent.com>
22837
22838         * m4/jm-macros.m4: Check for help2man.
22839
22840 2001-09-11  Jim Meyering  <meyering@lucent.com>
22841
22842         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22843         The body, by Paul Eggert, was moved here from configure.in.
22844         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22845
22846 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22847
22848         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22849         (jm_PREREQ): Use it.
22850
22851 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22852
22853         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22854         Use ssize_t, not int, to store result of readlink.
22855         Check for ssize_t overflow as well as size_t overflow,
22856         as POSIX says the result of readlink is implementation-defined
22857         when ssize_t overflows.
22858         Remove unnecessary cast to char*.
22859         Use free+malloc instead of realloc, as the storage doesn't need
22860         to be preserved and it's clearer and can be more efficient that way.
22861         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
22862         * lib/xreadlink.h (xreadlink): Update prototype.
22863
22864 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22865
22866         * lib/xgetcwd.c: Revert some of the previous change; intead,
22867         fix the HAVE_GETCWD_NULL code to behave more like the
22868         !HAVE_GETCWD_NULL code used to.
22869
22870         Include "xalloc.h".
22871         (xgetcwd): Do not return NULL when memory is exhausted; instead,
22872         invoke xalloc_die.
22873
22874 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22875
22876         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
22877         sys/param.h, as pathmax.h includes them.
22878
22879 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22880
22881         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
22882         (jm_PREREQ_XGETCWD): New macro.
22883
22884         * m4/getcwd.m4: New file.
22885
22886 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22887
22888         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
22889         like the HAVE_GETCWD_NULL code.
22890         Include pathmax.h if not HAVE_GETCWD.
22891         Do not include xalloc.h.
22892         (INITIAL_BUFFER_SIZE): New symbol.
22893         Do not use xmalloc / xrealloc, since the caller is responsible for
22894         handling errors.  Preserve errno around `free' during failure.
22895         Do not overrun buffer when using getwd.
22896
22897 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22898
22899         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
22900         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
22901         getcwd (NULL, 0).
22902
22903 2001-09-03  Paul Eggert  <eggert@twinsun.com>
22904
22905         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
22906         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
22907         spotted by Jim Meyering.
22908
22909 2001-09-03  Jim Meyering  <meyering@lucent.com>
22910
22911         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
22912         failure.
22913
22914 2001-09-02  Jim Meyering  <meyering@lucent.com>
22915
22916         * lib/error.c: Update from GNU libc.
22917
22918 2001-09-01  Jim Meyering  <meyering@lucent.com>
22919
22920         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
22921         Used by df.
22922
22923 2001-09-01  Jim Meyering  <meyering@lucent.com>
22924
22925         * lib/xreadlink.c: New file.
22926         * lib/xreadlink.h: New file.
22927         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
22928         xreadlink.h.
22929
22930         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
22931         doesn't conflict with sparc Solaris 7's definition in
22932         /usr/include/sys/int_types.h.
22933
22934         * lib/exclude.c: Use `""', not `<>' to #include non-system header
22935         files.
22936         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
22937         and strncasecmp as r-values.  Unixware didn't have declarations.
22938
22939 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22940
22941         * lib/xstrtol.h: Add copyright notice.
22942         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
22943         LONGINT_INVALID_SUFFIX_CHAR.
22944
22945 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22946
22947         * lib/xstrtol.c (strtoimax): New decl.
22948
22949 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22950
22951         * lib/xgetcwd.c: Don't include pathmax.h.
22952         Include stdlib.h and unistd.h if available.
22953         Include xalloc.h.
22954         (xmalloc, xstrdup, free): Remove decls.
22955         (xgetcwd): Don't assume sizes fit in unsigned.
22956         Check for overflow when computing sizes.
22957         Simplify reallocation code.
22958
22959 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22960
22961         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
22962         a directory's st_size can have an arbitrary value, so the old
22963         usage could waste an arbitrary amount of memory.  All uses
22964         changed.
22965         * lib/savedir.h: Update prototype.
22966
22967 2001-08-31  Paul Eggert  <eggert@twinsun.com>
22968
22969         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
22970
22971         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
22972         old strtoimax.c.
22973
22974         Also, make the following further changes to make this file's
22975         configuration more similar to that of strtol.c:
22976         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
22977         (strtoumax, uintmax_t, strtoull, strtol): Remove.
22978         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
22979         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
22980         changed to signed values.
22981
22982         And make the following changes as well:
22983         Fix copyright notice, as 1999 was missing.
22984         (verify): New macro.
22985         (strtoimax): Check sizes at compile-time, not run-time.
22986         Prefer strtol to strtoll if both work.
22987         (main): Remove; it was not that useful and was a pain to maintain.
22988
22989         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
22990
22991 2001-08-31  Jim Meyering  <meyering@lucent.com>
22992
22993         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
22994         Use an initial, malloc'd, buffer of length 128 rather than
22995         a statically allocated one of length 1024.
22996
22997 2001-08-30  Paul Eggert  <eggert@twinsun.com>
22998
22999         Simplify code, partly by assuming autoconf 2.52 semantics.
23000
23001         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23002
23003         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23004         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23005         All uses removed.
23006         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23007         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23008         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23009         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23010         jm_AC_HEADER_INTTYPES_H.
23011         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23012
23013         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23014
23015         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23016         Quote first arg of AC_DEFUN.
23017         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23018         since they are needed to parse the include file even if we need
23019         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23020         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23021         but with opposite signedness.
23022
23023 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23024
23025         Merge 'exclude' changes from tar 1.13.22.
23026         This fixes one or two unlikely storage allocation overflow bugs,
23027         but doesn't change user-visible behavior otherwise.
23028
23029 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23030
23031         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23032         (jm_PREREQ_EXCLUDE): New macro.
23033
23034 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23035
23036         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23037         tm to be declared.
23038
23039 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23040
23041         * lib/hash.c: Remove '2001' from copyright notice.
23042
23043 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23044
23045         * lib/full-write.h: New file.
23046         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23047         * lib/full-write.c: Correct credits, as cccp.c no longer
23048         exists and anyway it was so heavily changed from the old cccp
23049         code as to be unrecognizable.  Include full-write.h.
23050         (full_write) Return size_t, with short writes meaning failure.
23051         All callers changed.  This fixes a bug with large buffers
23052         on 64-bit hosts.
23053         * lib/utime.c: Include full-write.h.
23054
23055 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23056
23057         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23058         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23059         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23060         Include if available.
23061         (<xalloc.h>): Include
23062         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23063         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23064         collide with FNM macros.
23065         (struct patopts): New struct.
23066         (struct exclude): Use it, as exclude patterns now come with options.
23067         (new_exclude): Support above changes.
23068         (new_exclude, add_exclude_file):
23069         Initial size must now be a power of two to simplify overflow checking.
23070         (free_exclude, fnmatch_no_wildcards): New function.
23071         (excluded_filename): No longer requires options arg, as the options
23072         are determined by add_exclude.  Now returns bool, not int.
23073         (excluded_filename, add_exclude):
23074         Add support for the fancy new exclusion options.
23075         (add_exclude, add_exclude_file): Now takes int options arg.
23076         Check for arithmetic overflow when computing sizes.
23077         (add_exclude_file): xrealloc might modify errno, so don't
23078         realloc until after errno might be used.
23079
23080         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23081         New macros.
23082         (free_exclude): New decl.
23083         (add_exclude, add_exclude_file): Now takes int options arg.
23084         (excluded_filename): No longer requires options arg, as the options
23085         are determined by add_exclude.  Now returns bool, not int.
23086
23087 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23088
23089         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23090
23091 2001-08-27  Jim Meyering  <meyering@lucent.com>
23092
23093         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23094
23095         * lib/version-etc.c (N_): Remove definition.
23096         Revert most of last change.
23097         Instead, simply don't mark the `Copyright...' string for translation.
23098         Based on advice from Paul Eggert.
23099
23100         * lib/strtoxmax.c: Tweak comment.
23101
23102 2001-08-26  Jim Meyering  <meyering@lucent.com>
23103
23104         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23105
23106         * m4/xstrtoimax.m4: New file.
23107         * m4/xstrtoumax.m4: Add comments explaining why we
23108         AC_REPLACE_FUNCS(strtol).
23109
23110 2001-08-26  Jim Meyering  <meyering@lucent.com>
23111
23112         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23113         of copyright with `%s' so translators don't get an untranslated
23114         message in 2002.
23115         (COPYRIGHT_YEAR): Define.
23116         (version_etc): Use fprintf rather than fputs.
23117         Suggestion from Ulrich Drepper.
23118
23119         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23120
23121         * lib/strtoll.c: New file, from GNU libc.
23122         * lib/xstrtoimax.c: New file.
23123
23124         * lib/xstrtol.h: Add xstrtoimax.
23125         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23126         * lib/strtoimax.c: New file.  Likewise, but first define
23127         STRTOUXMAX_SIGNED.
23128
23129         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23130         ...
23131         * lib/strtoxmax.c: ... then renamed to this.
23132
23133 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23134
23135         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23136         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23137         (jm_AC_TYPE_INTMAX_T): New macro.
23138         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23139
23140         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23141
23142         * m4/longlong.m4: Renamed from ulonglong.m4.
23143         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23144         * m4/uintmax_t.m4: Removed.
23145
23146 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23147
23148         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23149         Port to Solaris 8, where 'sed' requires a space after the 'r'
23150         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23151         Redirect output to $tmp just once.
23152
23153 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23154
23155         * lib/addext.c (<errno.h>): Include.
23156         (errno): Declare if not defined.
23157         (addext): Work correctly when pathconf returns -1 and leaves
23158         errno alone because there is no limit.  Also, work even if
23159         pathconf returns a value greater than SIZE_MAX.
23160
23161 2001-08-12  Jim Meyering  <meyering@lucent.com>
23162
23163         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23164         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23165         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23166         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23167         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23168         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23169         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23170         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23171         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23172         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23173         utime.m4, utimes.m4, xstrtoumax.m4:
23174         Quote the first argument in each use of AC_DEFUN.
23175
23176 2001-08-12  Jim Meyering  <meyering@lucent.com>
23177
23178         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23179         Simply `return getcwd (NULL, 0);'.
23180         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23181         Use 1300 as initial value for length, not PATH_MAX.
23182
23183         * lib/pathmax.h: Clean up cpp syntax.
23184
23185 2001-08-12  Jim Meyering  <meyering@lucent.com>
23186
23187         * lib/gettimeofday.c: New file.
23188         * lib/gtod.h: New file.
23189         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23190
23191 2001-08-05  Jim Meyering  <meyering@lucent.com>
23192
23193         * m4/jm-macros.m4: Require autoconf-2.52.
23194
23195 2001-08-04  Jim Meyering  <meyering@lucent.com>
23196
23197         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23198         stmt, to get in sync with glibc.
23199
23200 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23201
23202         The following changes are from gettext 0.10.39 as maintained by
23203         Bruno Haible.
23204
23205         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23206         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23207         with inverted sense.  All uses changed.
23208
23209         * lib/mbswidth.c: Don't include <limits.h>.
23210         Include <stdlib.h> and <string.h> unconditionally.
23211         (iswcntrl, mbsinit, ISCNTRL): New macros.
23212         (mbsnwidth): Use K&R style function declarations.
23213         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23214         can optimize it when MB_CUR_MAX == 1.
23215         The width of control characters is zero, not 1.
23216
23217 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23218
23219         The following changes are from gettext 0.10.39 as maintained by
23220         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23221
23222         * m4/codeset.m4: Upgrade to serial AM1.
23223         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23224         all uses changed.  Quote first arg of AC_DEFUN.
23225         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23226
23227         * m4/iconv.m4: Upgrade to serial AM2.
23228         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23229         Add --with-libconv-prefix.
23230         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23231         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23232         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23233         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23234         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23235
23236         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23237         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23238         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23239         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23240         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23241         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23242         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23243         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23244         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23245
23246         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23247         string.h any more.
23248
23249         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23250         not the default value.
23251
23252         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23253         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23254         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23255         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23256         Also check for iswcntrl, used for wcwidth fallback.
23257         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23258         to Autoconf 2.13.
23259
23260 2001-08-03  Jim Meyering  <meyering@lucent.com>
23261
23262         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23263         as it was in the original.  Reported by Paul Eggert.
23264
23265 2001-07-16  Jim Meyering  <meyering@lucent.com>
23266
23267         * m4/gettimeofday.m4: New file.
23268         Prompted by a report from Bernhard Baehr.
23269
23270 2001-07-15  Jim Meyering  <meyering@lucent.com>
23271
23272         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23273         stuff. Now it's in ../Makefile.cfg.
23274
23275 2001-07-15  Jim Meyering  <meyering@lucent.com>
23276
23277         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23278         (BUILT_SOURCES): Add unlocked-io.h.
23279         (io_functions): Define.
23280         (unlocked-io.h): New rule.
23281         (DISTCLEANFILES): Add unlocked-io.h.
23282         (all-local): Depend on unlocked-io.h, to ensure it is created.
23283
23284         * lib/unlocked-io.hin: New file
23285
23286         * lib/regex.c: Update from glibc.
23287
23288 2001-07-05  Jim Meyering  <meyering@lucent.com>
23289
23290         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23291         recommendation.
23292         (libfetish_a_SOURCES): Put all .h files here instead.
23293         Remove a thus-exposed (better checks in automake) duplicate and
23294         two unnecessary .h files.
23295
23296 2001-07-04  Jim Meyering  <meyering@lucent.com>
23297
23298         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23299         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23300         distcheck failure.
23301
23302 2001-07-02  Jim Meyering  <meyering@lucent.com>
23303
23304         The following changes were prompted by suggestions from Bruno Haible.
23305
23306         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23307         is now generated.
23308         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23309         definition of EXTRA_DIST.
23310         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23311         ensure that the generated file is created/updated whenever the list
23312         of $(unlocked_functions) is changed.
23313         (jm-glibc-io.m4): New rule.
23314         (unlocked-io.h): New rule -- currently unused.
23315
23316 2001-06-24  Jim Meyering  <meyering@lucent.com>
23317
23318         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23319         unmatched right bracket, rather than kludging it with an extra,
23320         falsely-matching quote in a comment.  Patch by Akim Demaille.
23321
23322 2001-06-11  Jim Meyering  <meyering@lucent.com>
23323
23324         * lib/regex.c: Update from GNU libc.
23325
23326 2001-05-27  Jim Meyering  <meyering@lucent.com>
23327
23328         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23329         Check for ut_type in struct utmp.
23330
23331 2001-05-27  Jim Meyering  <meyering@lucent.com>
23332
23333         * lib/readutmp.h (UT_TYPE): Define.
23334
23335 2001-05-24  Jim Meyering  <meyering@lucent.com>
23336
23337         * lib/argmatch.c: Include "quote.h".
23338         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23339         quote function.  Reported by Göran Uddeborg.
23340
23341 2001-05-22  Jim Meyering  <meyering@lucent.com>
23342
23343         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23344         now that we use the package-supplied version unconditionally.
23345         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23346
23347 2001-05-21  Jim Meyering  <meyering@lucent.com>
23348
23349         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23350         shell syntax errors.
23351
23352 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23353
23354         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23355
23356 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23357
23358         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23359         Don't bother to check library strftime, since
23360         we'll be using our own my_strftime function anyway.
23361         Define my_strftime instead of strftime.
23362
23363 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23364
23365         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23366         which is not yet declared.
23367
23368 2001-05-15  Jim Meyering  <meyering@lucent.com>
23369
23370         * m4/regex.m4: Use proper quoting so brackets appear in the test
23371         program.
23372         Reported by, and with help from, Bruno Haible.
23373
23374 2001-05-13  Jim Meyering  <meyering@lucent.com>
23375
23376         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23377         undefined.
23378
23379 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23380
23381         dirname code cleanup.  base_name now behaves more compatibly
23382         with POSIX basename when given file names that have trailing
23383         slashes, and similarly for dir_name.  Add new primitives
23384         base_len and dir_len.  Put the directory-name-related decls
23385         into dirname.h.
23386
23387         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23388         * lib/backupfile.c (base_name): Likewise.
23389         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23390         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23391         * lib/makepath.c (strip_trailing_slashes): Likewise.
23392         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23393         ISSLASH): Likewise.
23394         * lib/rename.c (strip_trailing_slashes): Likewise.
23395         * lib/same.c (base_name): Likewise.
23396         * lib/stripslash.c (ISSLASH): Likewise.
23397
23398         * lib/addext.c: Include <dirname.h> after size_t is defined.
23399         * lib/backupfile.c: Likewise.
23400
23401         * lib/addext.c (addext): Use base_len to trim redundant
23402         trailing slashes instead of doing it ourselves.
23403         But do not trim the last slash if it is not redundant.
23404
23405         * lib/backupfile.c (find_backup_file_name,
23406         max_backup_version): Use base_len instead of rolling it ourselves.
23407         Handle the case of "" and (on DOS) "C:" correctly.
23408
23409         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23410         needed. Include <string.h>, <dirname.h>.
23411         (base_name): Allow file names ending in slashes, other than names
23412         that are all slashes.  In this case, return the basename followed
23413         by the slashes.  This is more general, and can be used in places
23414         where the original base_name purposely had an assertion failure.
23415         (base_len): New function.
23416
23417         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23418         Do not include <assert.h>; no longer needed.
23419         Include xalloc.h.
23420         (memrchr): Remove decl.
23421         (dir_name_r): Remove.
23422         (dir_len): Renamed from dirlen.  All callers changed.
23423         Rewrite in terms of base_name, for simplicity and consistency.
23424         (dir_name): Never return NULL.  All callers changed.
23425         Do not include <stdlib.h> in test program; no longer needed.
23426         return 0; is fine for test program.
23427
23428         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23429         New macros.
23430         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23431
23432         * lib/path-concat.c (path_concat): Use base_len to compute
23433         base length, not strlen; this means we cannot rely on memcpy
23434         to null-terminate.
23435
23436         * lib/same.c (STREQ): Remove.
23437         (same_name): Handle the case where the basename ends in trailing '/'.
23438
23439         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23440         a slash was stripped.  Do not strip the last slash after a
23441         file system prefix.
23442
23443 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23444
23445         * lib/Makefile.am (libfetish_a_SOURCES):
23446         Add strftime.c, since we now compile it on all hosts.
23447
23448         * lib/strftime.c (my_strftime):
23449         Define to nstrftime if emacs, but only if my_strftime is not defined.
23450         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23451         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23452         Add one more extra argument: a nanoseconds value.
23453         All uses changed.
23454         (ns): New macro.
23455         (my_strftime function): Add %N format.
23456         (emacs_strftimeu): Renamed from emacs_strftime,
23457         with extra ut argument.
23458
23459 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23460
23461         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23462
23463 2001-04-21  Jim Meyering  <meyering@lucent.com>
23464
23465         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23466         doesn't interfere.
23467
23468 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23469
23470         * m4/ftruncate.m4: Check for chsize.
23471         Link with ftruncate.o unconditionally if ftruncate is missing.
23472         This was required when cross-compiling to i586-mingw32msvc.
23473
23474 2001-04-08  Jim Meyering  <meyering@lucent.com>
23475
23476         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23477         recomputed; that's necessary when the offset spans a DST transition.
23478         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23479
23480 2001-04-02  Jim Meyering  <meyering@lucent.com>
23481
23482         * lib/regex.h, regex.c: Update from GNU libc.
23483
23484 2001-03-24  Jim Meyering  <meyering@lucent.com>
23485
23486         * m4/jm-macros.m4: Require autoconf-2.49d.
23487
23488 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23489
23490         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23491
23492 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23493
23494         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23495
23496 2001-03-17  Jim Meyering  <meyering@lucent.com>
23497
23498         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23499         now that the version in autoconf is equivalent.
23500         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23501
23502         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23503         Suggestion from Akim Demaille.
23504
23505         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23506         (jm_PREREQ_TEMPNAME): New function.
23507
23508 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23509
23510         * lib/tempname.c (uint64_t): Define to uintmax_t if
23511         not defined, and if UINT64_MAX is not defined.
23512         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23513         Reported by John David Anglin.
23514
23515 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23516
23517         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23518         resolve alias if codeset is empty.
23519         * lib/config.charset (BeOS): Use wildcard syntax.
23520
23521 2001-03-13  Jim Meyering  <meyering@lucent.com>
23522
23523         * lib/path-concat.c (path_concat)
23524         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23525         concatenating e.g., `C:' and `foo'.
23526         From Bruno Haible.
23527
23528 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23529
23530         * lib/localcharset.c (locale_charset): Don't use
23531         setlocale(LC_CTYPE,NULL). Don't return NULL.
23532         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23533
23534 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23535
23536         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23537         support for DOS/DJGPP.
23538
23539 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23540
23541         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23542         lacks mkstemp.  Compile our own tempname.c if we compile our own
23543         mkstemp.c, as mkstemp relies on tempname.
23544
23545 2001-03-01  Jim Meyering  <meyering@lucent.com>
23546
23547         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23548         AH_VERBATIM really does output its argument verbatim.
23549
23550 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23551
23552         * lib/Makefile.am (libfetish_a_SOURCES):
23553         Add dup-safer.c, fopen-safer.c.
23554         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23555
23556         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23557         * lib/unistd-safer.h: New files.
23558
23559 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23560
23561         The mkstemp replacement is taken from glibc 2.2.2, with some
23562         portability fixes for use outside glibc, as follows:
23563
23564         * lib/tempname.c (struct_stat64): New macro.
23565         (direxists, __gen_tempname): Use it.
23566         This avoids a portability problem with Solaris 8.
23567
23568         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23569         (<stddef.h>, <stdint.h>, <string.h>):
23570         Include only if STDC_HEADERS || _LIBC.
23571         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23572         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23573         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23574         (__set_errno): Define this macro if <errno.h> doesn't.
23575         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23576         Define these macros if <stdio.h> doesn't.
23577         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23578         Define these macros if <sys/stat.h>
23579         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23580         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23581         __xstat64): Define if not _LIBC.
23582         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23583         (__gen_tempname): Invoke gettimeofday only if
23584         HAVE_GETTIMEOFDAY || _LIBC;
23585         otherwise, fall back on plain "time".
23586         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23587
23588         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23589
23590         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23591
23592 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23593
23594         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23595
23596 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23597
23598         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23599         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23600         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23601         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23602
23603 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23604
23605         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23606         Remove workaround macros for hosts that have mbrtowc but not
23607         mbstate_t, as we now insist on proper declarations for both
23608         before using mbrtowc.
23609
23610 2001-02-17  Jim Meyering  <meyering@lucent.com>
23611
23612         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23613         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23614         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23615         UnixWare 7.1.1.
23616
23617         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23618         rather than AC_CACHE_VAL.
23619
23620 2001-02-17  Jim Meyering  <meyering@lucent.com>
23621
23622         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23623         around included file name.
23624
23625         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23626
23627         * lib/strftime.c: Update from GNU libc (the only changes were to
23628         comments).
23629
23630 2001-02-17  Jim Meyering  <meyering@lucent.com>
23631
23632         * lib/regex.c: Update from libc.
23633
23634 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23635
23636         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23637         clash.
23638
23639 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23640
23641         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23642         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23643         Reported by Mark Hounschell via Paul Eggert.
23644
23645 2001-02-07  Jim Meyering  <meyering@lucent.com>
23646
23647         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23648
23649 2001-02-05  Jim Meyering  <meyering@lucent.com>
23650
23651         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23652         it includes the patch required for `large file' support with at least
23653         HP-UX's 10.20 /bin/cc.
23654
23655 2001-02-03  Jim Meyering  <meyering@lucent.com>
23656
23657         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23658         AS_IF, now that it works once again (mysteriously).
23659         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23660
23661 2001-01-30  Jim Meyering  <meyering@lucent.com>
23662
23663         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23664         * m4/chown.m4: Rename conftestchown to conftest.chown.
23665         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23666         s/conftestdir2/conftest.d2/.
23667         * m4/utimes.m4: s/conftestdata/conftest.data/
23668         Inspired by Pavel Roskin's change in autoconf.
23669
23670 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23671
23672         * lib/config.charset: Update for FreeBSD 4.2.
23673
23674 2001-01-27  Jim Meyering  <meyering@lucent.com>
23675
23676         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23677         a use of AS_IF.
23678         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23679
23680 2001-01-26  Jim Meyering  <meyering@lucent.com>
23681
23682         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23683         quotearg.c includes it.
23684
23685 2001-01-26  Jim Meyering  <meyering@lucent.com>
23686
23687         * lib/quotearg.c: Include stddef.h.
23688         * lib/quote.c: Include stddef.h.
23689         Reported by Axel Kittenberger.
23690
23691         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23692         line in double quotes so that it evokes a better diagnostic.
23693         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23694         Reported by Axel Kittenberger.
23695
23696 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23697
23698         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23699         as if it was a `charset'.
23700
23701 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23702
23703         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23704         has const.
23705
23706 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23707
23708         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23709         to avoid a warning.  Add back 'const' to inptr.
23710
23711 2001-01-20  Jim Meyering  <meyering@lucent.com>
23712
23713         Be sure that headers are checked before used in code compiled
23714         for the type checks.
23715         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23716         In place of that, invoke jm_CHECK_ALL_TYPES.
23717         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23718         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23719         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23720         The check for ssize_t was mistakenly run before the test for unistd.h.
23721
23722         The configure-time check for stdbool.h was missing.
23723         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23724         (jm_PREREQ_HASH): New function.
23725
23726 2001-01-17  Jim Meyering  <meyering@lucent.com>
23727
23728         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23729         for autoconf-2.49c.
23730         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23731
23732 2001-01-16  Jim Meyering  <meyering@lucent.com>
23733
23734         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23735         From Bruno Haible.
23736
23737 2001-01-14  Jim Meyering  <meyering@lucent.com>
23738
23739         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23740         foo and bar.  Create conftestdir/ in the script, not in the C code.
23741         Remove directories in the script, not in the C code.
23742         Remove conftestdir{,2} before trying to create the directory.
23743         Make the entire configure script fail if the mkdir fails.
23744
23745 2001-01-14  Jim Meyering  <meyering@lucent.com>
23746
23747         * lib/rename.c: New file.  From Volker Borchert.
23748         Include stdlib.h, string.h or strings.h, and xalloc.h.
23749         Use strip_trailing_slashes rather than open-coding it.
23750
23751 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23752
23753         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23754
23755 2001-01-03  Jim Meyering  <meyering@lucent.com>
23756
23757         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23758         of local `inptr' to avoid warning with some system declarations of
23759         iconv.
23760
23761 2001-01-02  Volker Borchert  <bt@teknon.de>
23762
23763         * m4/rename.m4: New file.
23764         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23765
23766 2001-01-01  Jim Meyering  <meyering@lucent.com>
23767
23768         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23769         even on systems with utmpx.h.  It's necessary for the declaration of
23770         utmp's ut_user member.  Reported by Andreas Jaeger.
23771
23772         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23773         available. They are required for the declarations of getgrgid and
23774         getpwuid resp.
23775         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23776         Reported by Andreas Jaeger.
23777
23778 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23779
23780         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23781         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23782         so `make install' also works in VPATH builds.
23783
23784 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23785
23786         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23787         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23788         can be used in subdirectories.
23789
23790 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23791
23792         * lib/modechange.c: Do not assume that mode_t uses the
23793         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23794         the other-execute bit of FOO even if S_IXOTH != 1.
23795
23796         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23797         WOTH, XOTH, ALLM): New macros.
23798         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23799          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23800         Use them.
23801         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23802         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23803         (mode_compile):
23804         No need to use uintmax_t; unsigned long is long enough.
23805         Don't bother to get suffix since we don't use it.
23806
23807 2000-12-26  Jim Meyering  <meyering@lucent.com>
23808
23809         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23810         better with autoheader.
23811
23812 2000-12-24  Jim Meyering  <meyering@lucent.com>
23813
23814         * lib/hash.c (is_prime): Return explicit boolean values.
23815         (hash_get_first): Return NULL to appease Irix5.6's 89.
23816         Reported by Nelson Beebe.
23817
23818 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23819
23820         * lib/localcharset.c (locale_charset): Add support for Win32.
23821
23822 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23823
23824         * lib/physmem.h, lib/physmem.c: New files.
23825
23826         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23827         (noinst_HEADERS): Add physmem.h.
23828
23829         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23830         't' for compatibility with Solaris 8 sort.
23831
23832 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23833
23834         * lib/config.charset: Add support for BeOS.
23835
23836 2000-12-17  Jim Meyering  <meyering@lucent.com>
23837
23838         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23839         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23840
23841 2000-12-16  Jim Meyering  <meyering@lucent.com>
23842
23843         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23844         N and M) would have treated it like `chown N:N FILE'.
23845
23846         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23847
23848 2000-12-16  Jim Meyering  <meyering@lucent.com>
23849
23850         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23851         SHELLS_FILE to a file name that's useful on djgpp systems.
23852         Include stdlib.h.
23853         (ADDITIONAL_DEFAULT_SHELLS): Define.
23854         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23855         Based mostly on a patch from Prashant TR.
23856
23857 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
23858
23859         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
23860         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
23861         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
23862
23863 2000-12-08  Andreas Schwab  <schwab@suse.de>
23864
23865         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
23866         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
23867
23868 2000-12-07  Jim Meyering  <meyering@lucent.com>
23869
23870         * lib/stripslash.c (ISSLASH): Define.
23871         (strip_trailing_slashes): Use ISSLASH rather than comparing against
23872         `/'.
23873         From Prashant TR.
23874
23875         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
23876         (dir_name_r): Declare this function as static.
23877         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
23878         manifest itself on a name containing a mix of slashes and
23879         backslashes.
23880         Make this function work with names starting with a DOS-style
23881         drive letter and colon prefix.
23882         (dir_name): Append `.' if necessary.
23883         Based mostly on patches from Prashant TR and Eli Zaretskii.
23884
23885         * lib/dirname.h (dir_name_r): Remove prototype.
23886
23887 2000-12-06  Paul Eggert  <eggert@twinsun.com>
23888
23889         * m4/off_t-format.m4: Remove this file.
23890         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
23891
23892 2000-12-06  Jim Meyering  <meyering@lucent.com>
23893
23894         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
23895         replacement strtoull, we may well need the replacement strtoul, too.
23896         Check for declarations of strtoul and strtoull.
23897         Check for strtol.  Mainly as a cue to cause automake to include
23898         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
23899         Check for limits.h -- strtol.c needs it.
23900
23901 2000-12-05  Jim Meyering  <meyering@lucent.com>
23902
23903         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
23904
23905 2000-12-04  Jim Meyering  <meyering@lucent.com>
23906
23907         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
23908         Also include memory.h, stdlib.h, unistd.h if appropriate.
23909         Reported by Andreas Jaeger (conflicting declaration of malloc).
23910
23911 2000-12-02  Jim Meyering  <meyering@lucent.com>
23912
23913         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
23914         * m4/jm-macros.m4 (jm_MACROS): require it.
23915
23916 2000-12-02  Jim Meyering  <meyering@lucent.com>
23917
23918         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
23919
23920 2000-12-01  Paul Eggert  <eggert@twinsun.com>
23921
23922         * lib/memrchr.c: Include <config.h> before any system include file.
23923
23924 2000-11-30  Jim Meyering  <meyering@lucent.com>
23925
23926         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
23927
23928 2000-11-30  Jim Meyering  <meyering@lucent.com>
23929
23930         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
23931
23932 2000-11-29  Paul Eggert  <eggert@twinsun.com>
23933
23934         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
23935
23936 2000-11-26  Jim Meyering  <meyering@lucent.com>
23937
23938         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
23939
23940 2000-11-22  Paul Eggert  <eggert@twinsun.com>
23941
23942         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
23943         size of (size_t) -1; it's not portable.
23944
23945 2000-11-17  Jim Meyering  <meyering@lucent.com>
23946
23947         * lib/strstr.c: Update from GNU libc.
23948
23949 2000-11-17  Akim Demaille  <akim@epita.fr>
23950
23951         * lib/obstack.h: Formatting changes.
23952         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
23953         prevent type checking.
23954         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
23955         cast the value to (void *): assigning a `foo *' to a `void *'
23956         variable is valid.
23957         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
23958
23959 2000-11-16  Jim Meyering  <meyering@lucent.com>
23960
23961         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
23962
23963 2000-11-11  Jim Meyering  <meyering@lucent.com>
23964
23965         * lib/error.c: Add a couple #includes, merging from GNU libc version.
23966
23967 2000-11-10  Jim Meyering  <meyering@lucent.com>
23968
23969         * lib/obstack.h: Update from GNU libc.
23970         * lib/obstack.c: Likewise.
23971
23972 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
23973
23974         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
23975
23976 2000-11-06  Paul Eggert  <eggert@twinsun.com>
23977
23978         * lib/getusershell.c (setusershell): Use rewind rather than
23979         fseek/fseeko, to avoid configuration hassles with fseeko.
23980         Don't bother opening SHELLS_FILE if shellstream is NULL;
23981         it's not necessary.
23982
23983 2000-11-05  Jim Meyering  <meyering@lucent.com>
23984
23985         * lib/makepath.h (make_dir): Declare.
23986         * lib/makepath.c (make_dir): Remove `static' attribute.
23987         Tweak a comment.
23988
23989 2000-11-04  Jim Meyering  <meyering@lucent.com>
23990
23991         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
23992
23993 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
23994
23995         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
23996         last one in a bucket, advance to the next bucket.
23997
23998 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
23999
24000         * lib/fnmatch.c: Do not comment out all the code if we are using
24001         the GNU C library, because in some cases we are replacing buggy
24002         code in the GNU C library itself.
24003
24004 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24005
24006         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24007         (regex_compile): Catch bogus \(\1\).
24008
24009 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24010
24011         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24012         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24013         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24014
24015 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24016
24017         * lib/error.h, getline.h, modechange.h:
24018         Remove "2000" from Copyright line, as the file hasn't been
24019         changed this year other than in the copyright notice.
24020
24021         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24022         was changed this year.
24023
24024 2000-10-29  Jim Meyering  <meyering@lucent.com>
24025
24026         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24027         renaming.
24028         * m4/ls-mntd-fs.m4: Likewise
24029
24030 2000-10-29  Jim Meyering  <meyering@lucent.com>
24031
24032         * lib/xstat.in: Fix grammar in comment.
24033
24034 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24035
24036         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24037         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24038         doesn't define __restrict_arr.
24039
24040 2000-10-28  Jim Meyering  <meyering@lucent.com>
24041
24042         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24043         (jm_PREREQ_MEMCHR): New function.
24044
24045 2000-10-28  Jim Meyering  <meyering@lucent.com>
24046
24047         * lib/memchr.c: Update from libc.
24048         Adjust for portability:
24049         [HAVE_STDLIB_H]: Include stdlib.h.
24050         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24051         Undef __memchr, too.
24052         [!weak_alias]: Define __memchr to memchr.
24053
24054         * lib/regex.c: Update from libc.
24055         * lib/regex.h: Likewise.
24056         * lib/getopt1.c: Likewise.
24057         * lib/memcmp.c: Likewise.
24058
24059         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24060         Avoid using fseek, when possible -- it's broken by design.
24061         Patch by Ulrich Drepper.
24062
24063 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24064
24065         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24066         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24067         Giving in to popular pressure to shut up the compiler with casts.
24068
24069 2000-10-26  Jim Meyering  <meyering@lucent.com>
24070
24071         * lib/strftime.c: Update from libc.
24072
24073 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24074
24075         * regex.c: More `unsigned char' -> `re_char' changes.
24076         Also change several `int' into `re_wchar_t'.
24077         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24078         (PUSH_FAILURE_POINTER): Don't cast any more.
24079         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24080         We want GCC to complain, since this piece of code makes
24081         re_match non-reentrant, which *should* be fixed.
24082         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24083         (EXTEND_BUFFER): Use RETALLOC.
24084         (SET_LIST_BIT): Don't cast.
24085         (re_wchar_t): New type.
24086         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24087         that those two functions will always properly return.
24088         (IMMEDIATE_QUIT_CHECK): Cast to void.
24089         (analyse_first): Use recursion rather than an explicit stack.
24090         (re_compile_fastmap): Can't fail anymore.
24091         (re_search_2): Don't check re_compile_fastmap for failure.
24092         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24093         Now also sets the new value (passed in a new argument).
24094         (re_match_2_internal): Use it.
24095         Also, use a new var `reg' of type size_t when looping through regs
24096         rather than reuse the inappropriate `mcnt'.
24097
24098 2000-10-25  Jim Meyering  <meyering@lucent.com>
24099
24100         * lib/obstack.c: Update from libc.
24101
24102 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24103
24104         * regex.c (regex_compile): Change the way of handling a range from
24105         a char less than 256 to a char not less than 256.
24106
24107 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24108
24109         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24110         NT-Emacs only.
24111         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24112         so that re_search functions only quit when callers expect them to.
24113
24114 2000-10-23  Jim Meyering  <meyering@lucent.com>
24115
24116         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24117         wrong.  That set_locale call must not have any side effects.
24118         From Paul Eggert.
24119
24120 2000-10-22  Jim Meyering  <meyering@lucent.com>
24121
24122         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24123         [CYCLIC]: Remove now-unused definition.
24124
24125         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24126         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24127         Suggestion from Ulrich Drepper.
24128
24129 2000-10-21  Jim Meyering  <meyering@lucent.com>
24130
24131         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24132         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24133         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24134
24135 2000-10-21  Jim Meyering  <meyering@lucent.com>
24136
24137         * lib/dirname.c (memrchr): Declare if necessary.
24138         (dir_name): Remove the restriction that there be no
24139         trailing slashes.  Now, this code skips past them, effectively
24140         ignoring them.
24141         [TEST_DIRNAME] (main): New unit tests.
24142
24143         * lib/memrchr.c: New file from GNU libc.
24144         Undef __memrchr, too.
24145         [!weak_alias]: Define __memrchr to memrchr.
24146         Guard weak_alias use with `#ifdef weak_alias'.
24147
24148 2000-10-21  Jim Meyering  <meyering@lucent.com>
24149
24150         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24151         (dir_name): Use dir_name_r.
24152         * lib/dirname.h (dir_name_r): Declare it.
24153
24154 2000-10-17  Jim Meyering  <meyering@lucent.com>
24155
24156         * lib/quote.h (PARAMS): Define and use.
24157         Reported by Akim Demaille.
24158
24159         * lib/getopt.c: Update from libc.
24160
24161 2000-10-16  Jim Meyering  <meyering@lucent.com>
24162
24163         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24164         setlocale.
24165         From Jan Fedak.
24166
24167 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24168
24169         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24170
24171 2000-09-25  Jim Meyering  <meyering@lucent.com>
24172
24173         * lib/md5.h (rol): Define (from GnuPG).
24174
24175         * lib/sha.c: Give credit (GnuPG) where due.
24176         (M): Use rol rather than open-coding it.
24177         Add a FIXME comment.
24178
24179 2000-09-21  Jim Meyering  <meyering@lucent.com>
24180
24181         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24182         Reported by Michael Stone.
24183
24184 2000-09-20  Jim Meyering  <meyering@lucent.com>
24185
24186         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24187         (noinst_HEADERS): Add sha.h.
24188         Based on code from Scott G. Miller and from GnuPG.
24189
24190 2000-09-18  Jim Meyering  <meyering@lucent.com>
24191
24192         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24193         LIBS. Otherwise, everyone ends up linking with -lelf for some
24194         configurations.
24195         Reported by Mike Stone.
24196
24197 2000-09-15  Jim Meyering  <meyering@lucent.com>
24198
24199         * lib/regex.c: Update from libc.
24200
24201 2000-09-10  Jim Meyering  <meyering@lucent.com>
24202
24203         * lib/getopt.c (_getopt_internal): Update from glibc.
24204
24205 2000-09-09  Jim Meyering  <meyering@lucent.com>
24206
24207         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24208         think it should be used as a general replacement for isascii.
24209         * lib/fnmatch.c: Likewise.
24210         * lib/mbswidth.c: Likewise
24211         * lib/regex.c: Likewise.
24212
24213         Don't use atoi.
24214         * lib/userspec.c: Include sys/param.h and limits.h.
24215         Include xstrtol.h.
24216         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24217         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24218         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24219         UID, GID.  Check range.
24220
24221 2000-09-06  Jim Meyering  <meyering@lucent.com>
24222
24223         * lib/getopt.c (_getopt_internal): Update from glibc.
24224
24225 2000-08-30  Jim Meyering  <meyering@lucent.com>
24226
24227         * lib/strftime.c: Merge in changes from GNU libc.
24228
24229 2000-08-26  Jim Meyering  <meyering@lucent.com>
24230
24231         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24232         * m4/fpending.m4: New file.
24233
24234 2000-08-26  Jim Meyering  <meyering@lucent.com>
24235
24236         * lib/closeout.c: Include "__fpending.h".
24237         (close_stdout_status): Return right away if there's nothing to flush.
24238
24239         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24240         * lib/__fpending.c: New file.
24241         * lib/__fpending.h: New file.
24242
24243 2000-08-20  Jim Meyering  <meyering@lucent.com>
24244
24245         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24246         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24247         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24248
24249 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24250
24251         Improve fileutils installation on systems where running
24252         programs (like install) can't be unlinked.
24253         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24254         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24255
24256 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24257
24258         Standardize on "memory exhausted" instead of "Memory exhausted"
24259         or "virtual memory exhausted".
24260         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24261         "virtual memory exhausted".
24262         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24263         our own message.
24264         * lib/userspec.c (parse_user_spec): Likewise.
24265         * lib/bumpalloc.h: comment fix
24266         * lib/same.c, userspec.c: Include xalloc.h.
24267
24268         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24269         not char *const and pointing to a constant array.
24270         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24271         (xrealloc): Comment fix.
24272
24273         * lib/userspec.c (parse_user_spec):
24274         Don't translate a message until just before returning,
24275         to avoid unnecessary translation.
24276
24277 2000-08-07  Jim Meyering  <meyering@lucent.com>
24278
24279         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24280         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24281         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24282         getgroups.c, gethostname.c, getopt.h, group-member.c,
24283         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24284         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24285         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24286         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24287         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24288         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24289         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24290         yesno.c: Back out Copyright date changes for each file with no change
24291         this year.  This eases coordination with other programs using the same
24292         source code modules.  From Paul Eggert.
24293
24294 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24295
24296         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24297         not char, for compatibility with glibc 2.1.3 strftime.c.
24298
24299 2000-08-03  Greg McGary  <greg@mcgary.org>
24300
24301         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24302         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24303         (EXTEND_BUFFER): Use them.
24304
24305 2000-08-01  Jim Meyering  <meyering@lucent.com>
24306
24307         * lib/dirname.c (ISSLASH): Define.
24308         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24309         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24310         both `\' and `/' may be use as path separators.
24311         Based on a patch from Prashant TR.
24312
24313 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24314
24315         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24316         slot vector a constant, since it might get modified.
24317
24318 2000-07-31  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/xmalloc.c: Use `virtual memory exhausted', not
24321         `Memory exhausted'.
24322         * lib/obstack.c (print_and_abort): Likewise.
24323
24324 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24325
24326         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24327         buffer, so that the caller can always quote one small
24328         component of a "memory exhausted" message in slot 0.
24329         From a suggestion by Jim Meyering.
24330
24331 2000-07-30  Jim Meyering  <meyering@lucent.com>
24332
24333         * lib/makepath.c (make_path): Quote the other instance, too.
24334
24335         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24336         (STATIC_BUF_SIZE): Define.
24337         (quotearg_n_options): Use only statically allocated storage when
24338         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24339         than STATIC_BUF_SIZE.
24340
24341 2000-07-29  Jim Meyering  <meyering@lucent.com>
24342
24343         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24344         * lib/dirname.c (dir_name): Likewise.
24345
24346         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24347         `/'.
24348
24349         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24350         (dir_name): Assert that there are no trailing slashes.
24351
24352 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24353
24354         * lib/mbswidth.h (mbswidth): Add a flags argument.
24355         (mbswidth): New declaration.
24356         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24357         * lib/mbswidth.c (mbswidth): Add a flags argument.
24358         (mbsnwidth): New function.
24359
24360 2000-07-24  Jim Meyering  <meyering@lucent.com>
24361
24362         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24363
24364 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24365
24366         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24367
24368 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24369
24370         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24371         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24372         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24373         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24374         invoke multibyte primitives.
24375
24376 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24377
24378         * lib/quotearg.c:
24379         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24380         so that mbstate_t is always defined.
24381
24382         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24383         be 1 in at least one GCC installation, and this configuration
24384         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24385         performance on hosts that have mbrtowc but have only unibyte
24386         locales, but I assume these hosts are rare.
24387
24388 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24389
24390         * lib/mbswidth.c (_XOPEN_SOURCE):
24391         Don't define; this causes problems on Solaris 7.
24392         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24393
24394 2000-07-23  Jim Meyering  <meyering@lucent.com>
24395
24396         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24397         too: getgrgid, getpwuid, getuid.
24398
24399 2000-07-23  Jim Meyering  <meyering@lucent.com>
24400
24401         * lib/basename.c (base_name): Add an assertion.
24402
24403 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24404
24405         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24406         shadow its mbsinit function.
24407
24408 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24409
24410         * lib/mbswidth.h: New file.
24411         * lib/mbswidth.c: New file.
24412         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24413         (noinst_HEADERS): Add mbswidth.h.
24414
24415 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24416
24417         * lib/config.charset: Add support for FreeBSD. Improve support for
24418         HP-UX and IRIX 6.
24419
24420 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24421
24422         * m4/mbswidth.m4: New file.
24423         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24424
24425 2000-07-15  Jim Meyering  <meyering@lucent.com>
24426
24427         * lib/makepath.c: Include quote.h.
24428         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24429         corresponding argument in a `quote (...)' call.
24430         Give better diagnostics.
24431
24432         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24433         (noinst_HEADERS): Add quote.h.
24434
24435         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24436         from tar's src/misc.c.
24437         * lib/quote.h: New file.  Prototypes for same.
24438
24439 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24440
24441         From a suggestion by Bruno Haible.
24442         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24443         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24444         to decide whether to define the BeOS workaround macro;
24445         this adjusts to the change to AC_MBSTATE_T.
24446
24447 2000-07-14  Jim Meyering  <meyering@lucent.com>
24448
24449         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24450         jm_AC_TYPE_UINTMAX_T.
24451
24452 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24453
24454         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24455
24456         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24457         quotearg_buffer_restyled): Add support for
24458         clocale_quoting_style.  Undo previous change to
24459         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24460         and "{RIGHT QUOTATION MARK}" msgids.
24461
24462 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24463
24464         From a suggestion by Bruno Haible.
24465         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24466         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24467         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24468         and mbstate_t, to a single-part test that simply defines mbstate_t.
24469         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24470         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24471
24472 2000-07-10  Jim Meyering  <meyering@lucent.com>
24473
24474         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24475
24476         * m4/gnu-source.m4: Output to confdefs.h directly.
24477         Suggestion from Akim Demaille.
24478
24479 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24480
24481         The old behavior of quoting `like this' doesn't look good with
24482         newer, ISO-style fonts.  See:
24483         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24484
24485         Instead, quote "like this" by default.  Let the translator
24486         tailor the locale-specific quoting behavior by providing
24487         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24488
24489         * lib/quotearg.c (N_): New macro.
24490         (gettext_default): New function.
24491         (quotearg_buffer_restyled): Use
24492         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24493         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24494
24495 2000-07-09  Jim Meyering  <meyering@lucent.com>
24496
24497         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24498         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24499
24500         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24501         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24502
24503 2000-07-09  Jim Meyering  <meyering@lucent.com>
24504
24505         * lib/Most files: Update copyright dates to include 2000.
24506
24507 2000-07-08  Jim Meyering  <meyering@lucent.com>
24508
24509         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24510         if not defined.
24511         (xgethostname): Remove now-unnecessary #ifdef.
24512         Move declaration of `err' into loop where it's used.
24513
24514 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24515         and Bruno Haible  <haible@clisp.cons.org>
24516
24517         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24518         only if the test for an object-type mbstate_t fails.  This
24519         prevents us from mistakenly reporting that mbstate_t is a
24520         system object type after we "#define mbstate_t int" to work
24521         around its lack.
24522
24523 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24524         and Bruno Haible  <haible@clisp.cons.org>
24525
24526         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24527
24528 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24529
24530         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24531         to strerror_r.
24532         Include <ctype.h> for use of isalpha.
24533
24534 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24535
24536         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24537         by allocating a larger buffer. Test the gethostname return value for
24538         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24539         returns an error and ENAMETOOLONG isn't defined.
24540
24541 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24542
24543         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24544         dimension.
24545
24546 2000-07-04  Jim Meyering  <meyering@lucent.com>
24547
24548         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24549         of the deprecated AC_CHECKING.
24550
24551 2000-07-04  Jim Meyering  <meyering@lucent.com>
24552
24553         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24554         Reported by Bruno Haible.
24555
24556 2000-07-04  Jim Meyering  <meyering@lucent.com>
24557
24558         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24559         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24560         lacks mbrtowc.
24561
24562 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24563
24564         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24565         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24566
24567 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24568         and Bruno Haible  <haible@clisp.cons.org>
24569
24570         * lib/quotearg.c (mbrtowc):
24571         Assign to *pwc, and return 1 only if result is nonzero.
24572         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24573
24574 2000-07-03  Jim Meyering  <meyering@lucent.com>
24575
24576         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24577
24578 2000-07-03  Jim Meyering  <meyering@lucent.com>
24579
24580         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24581         This is necessary to get a definition of e.g., UTMP_FILE on
24582         HP-UX 10.20.
24583         From Bob Proulx.
24584
24585 2000-07-02  Jim Meyering  <meyering@lucent.com>
24586
24587         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24588
24589         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24590         AC_LIBOBJ(function_name).
24591         * m4/chown.m4: Likewise.
24592         * m4/fnmatch.m4: Likewise.
24593         * m4/ftruncate.m4: Likewise.
24594         * m4/getgroups.m4: Likewise.
24595         * m4/getline.m4: Likewise.
24596         * m4/group-member.m4: Likewise.
24597         * m4/jm-macros.m4: Likewise.
24598         * m4/lstat.m4: Likewise.
24599         * m4/malloc.m4: Likewise.
24600         * m4/memcmp.m4: Likewise.
24601         * m4/nanosleep.m4: Likewise.
24602         * m4/putenv.m4: Likewise.
24603         * m4/realloc.m4: Likewise.
24604         * m4/regex.m4: Likewise.
24605         * m4/stat.m4: Likewise.
24606         * m4/strftime.m4: Likewise.
24607
24608 2000-07-02  Jim Meyering  <meyering@lucent.com>
24609
24610         * lib/quotearg.c (mbstate_t): Don't define here.
24611
24612 2000-07-02  Jim Meyering  <meyering@lucent.com>
24613
24614         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24615
24616 2000-07-01  Jim Meyering  <meyering@lucent.com>
24617
24618         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24619
24620 2000-07-01  Jim Meyering  <meyering@lucent.com>
24621
24622         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24623         problem.
24624
24625 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24626
24627         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24628         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24629
24630 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24631
24632         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24633         per change in ../m4/ls-mntd-fs.m4.
24634         (read_filesystem_list): Ignore symbolic links.
24635
24636 2000-06-29  Jim Meyering  <meyering@lucent.com>
24637
24638         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24639         for declaration of strcmp.
24640
24641         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24642
24643         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24644         Avoid warning by casting result to `char *' to remove `const'.
24645
24646 2000-06-28  Jim Meyering  <meyering@lucent.com>
24647
24648         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24649         included by quotearg.c, for which we perform this test.  From
24650         Bruno Haible.
24651
24652 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24653
24654         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24655         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24656         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24657
24658 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24659
24660         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24661
24662 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24663
24664         savedir now sets errno on failure and invokes xmalloc to get memory.
24665         Fix a couple of other minor bugs while we're at it.
24666
24667         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24668         (NAMLEN): Remove macro.
24669         (malloc, realloc): Remove decls.
24670         (stpcpy): Likewise.
24671         ("xalloc.h"): Include.
24672         (NAME_SIZE_DEFAULT): New macro.
24673         (savedir): Use xmalloc / xrealloc to allocate memory.
24674         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24675         Skip "" directory entries.
24676         Use strlen to calculate directory entry length, since the old method
24677         is rarely used these days and isn't worth supporting.
24678         Don't use a pointer after freeing it.
24679         Check for integer overflow when calculating allocation size.
24680         Use memcpy to copy entries, instead of stpcpy.
24681         Set errno properly when returning NULL.
24682         Check for readdir error.
24683
24684 2000-06-26  Jim Meyering  <meyering@lucent.com>
24685
24686         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24687
24688 2000-06-25  Jim Meyering  <meyering@lucent.com>
24689
24690         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24691         Linux header bug when _XOPEN_SOURCE is defined to 500.
24692
24693 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24694
24695         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24696         deficiency.
24697
24698 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24699
24700         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24701         Include xalloc.h.
24702         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24703
24704 2000-06-24  Jim Meyering  <meyering@lucent.com>
24705
24706         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24707         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24708         for which strerror does return char*, but which lacks a conveniently
24709         accessible declaration of the function.  If the compile-test says
24710         strerror_r doesn't work, then resort to a `run'-test that works on
24711         BeOS and segfaults on DEC Unix.
24712
24713 2000-06-24  Jim Meyering  <meyering@lucent.com>
24714
24715         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24716
24717 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24718
24719         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24720         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24721
24722 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24723
24724         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24725         (mbrtowc, mbstate_t): Define substitutes if
24726         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24727         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24728         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24729
24730 2000-06-23  Jim Meyering  <meyering@lucent.com>
24731
24732         * m4/afs.m4: Add missing AC_MSG_RESULT.
24733         Reported by Bruno Haible.
24734
24735         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24736         Suggestion from Bruno Haible.
24737
24738 2000-06-23  Jim Meyering  <meyering@lucent.com>
24739
24740         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24741
24742 2000-06-21  Jim Meyering  <meyering@lucent.com>
24743
24744         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24745
24746 2000-06-21  Jim Meyering  <meyering@lucent.com>
24747
24748         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24749         (noinst_HEADERS): Add getstr.h.
24750
24751         * lib/getline.c (getstr): Move into a separate file.
24752         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24753         the following changes: new parameter, delim2; both delim[12]
24754         parameters have type `int', not `char'.  The latter would lose
24755         with 8-bit delimiters.
24756         * lib/getstr.h: New file.
24757
24758 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24759
24760         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24761         than 1024, return a memory chunk of least possible size, instead
24762         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24763         Use free/xmalloc instead of xrealloc to avoid copying for very long
24764         paths.
24765
24766 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24767
24768         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24769         the empty string.
24770
24771 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24772
24773         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24774         address, not strdup.  Include <stdlib.h> and don't declare free().
24775
24776 2000-06-19  Jim Meyering  <meyering@lucent.com>
24777
24778         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24779
24780 2000-06-18  Jim Meyering  <meyering@lucent.com>
24781
24782         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24783
24784         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24785         `checking whether...' message to be consistent with that of the
24786         lstat test.
24787
24788 2000-06-18  Jim Meyering  <meyering@lucent.com>
24789
24790         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24791         Besides, these days every porting target provides a mkdir function.
24792
24793         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24794         needed. (this snippet comes from src/system.h).
24795
24796 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24797
24798         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24799
24800 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24801
24802         * lib/human.c (adjust_value): New function.
24803         (human_readable_inexact): Apply rounding style even when
24804         printing approximate values.
24805
24806 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24807
24808         * lib/human.c (human_readable_inexact): Allow an input block
24809         size that is not a multiple of the output block size, and vice versa.
24810         Reported by Piergiorgio Sartor.
24811
24812 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24813
24814         * lib/getdate.y (get_date): Apply relative times after time
24815         zone indicator, not before.  Reported by Todd A. Jacobs.
24816
24817 2000-06-13  Jim Meyering  <meyering@lucent.com>
24818
24819         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24820
24821         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24822
24823 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24824
24825         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24826
24827 2000-06-12  Jim Meyering  <meyering@lucent.com>
24828
24829         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24830         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24831         optional argument.
24832         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24833         the optional argument, `lib'.
24834
24835 2000-06-08  Jim Meyering  <meyering@lucent.com>
24836
24837         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24838
24839 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24840
24841         Rewrite largefile configuration so that we don't need to run
24842         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24843         AC_CANONICAL_HOST in configure.in -- jmm]
24844
24845         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24846         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24847         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24848         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24849         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24850         All uses changed.
24851         Instead of inspecting the output of getconf, try to compile the
24852         test program without and with the macro definition.
24853         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24854         for getconf.  Instead, check for the needed flags by compiling
24855         test programs.
24856
24857 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24858
24859         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
24860
24861 2000-06-04  Jim Meyering  <meyering@lucent.com>
24862
24863         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
24864         SunOS 4.1.4 for which gid_t is an unsigned type.
24865
24866 2000-06-03  Jim Meyering  <meyering@lucent.com>
24867
24868         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
24869         now that autoconf requires that.
24870
24871         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
24872         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
24873         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
24874
24875 2000-06-03  Jim Meyering  <meyering@lucent.com>
24876
24877         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
24878
24879 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24880
24881         * m4/glibc21.m4: New file.
24882         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
24883
24884 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
24885
24886         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
24887         newer, don't install charset.alias.
24888         * lib/config.charset: Change the Linux/glibc rules so they become empty
24889         on glibc-2.1 or newer.
24890
24891 2000-06-02  Jim Meyering  <meyering@lucent.com>
24892
24893         * lib/mountlist.c: Back out last change.  Instead, do this...
24894         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
24895         me_dummy member using the same `ignore'-testing code.
24896         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
24897         fs_type strings.
24898         From Mark D. Roth.
24899
24900 2000-05-29  Jim Meyering  <meyering@lucent.com>
24901
24902         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
24903         mounts with the `ignore' attribute.  Based on a patch from
24904         Mark D. Roth.
24905
24906 2000-05-28  Jim Meyering  <meyering@lucent.com>
24907
24908         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
24909         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24910         * m4/stat.m4: Likewise.
24911         * m4/lstat.m4: Likewise.
24912         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
24913
24914         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
24915         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
24916
24917 2000-05-26  Jim Meyering  <meyering@lucent.com>
24918
24919         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
24920
24921 2000-05-24  Jim Meyering  <meyering@lucent.com>
24922
24923         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
24924         autoconf requires that.
24925         * m4/lib-check.m4: Likewise.
24926         * m4/jm-macros.m4: Likewise.
24927         * m4/strftime.m4: Likewise.
24928
24929         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
24930         AC_CHECK_DECLS, now that autoconf requires that.
24931
24932 2000-05-22  Jim Meyering  <meyering@lucent.com>
24933
24934         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
24935         * m4/lstat.m4: Likewise.
24936
24937 2000-05-22  Jim Meyering  <meyering@lucent.com>
24938
24939         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
24940
24941 2000-05-20  Jim Meyering  <meyering@lucent.com>
24942
24943         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
24944         (jm_PREREQ): Use it.
24945
24946 2000-05-18  Jim Meyering  <meyering@lucent.com>
24947
24948         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
24949         back, too, since it may have been modified by allocate_entry.
24950         (hash_delete): Rewrite to use neither the assignment operator
24951         nor the comma operator in an if-expression.
24952
24953 2000-05-15  Paul Eggert  <eggert@twinsun.com>
24954
24955         * lib/closeout.c:
24956         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
24957         Remove; no longer needed.
24958         "quotearg.h": Add include.
24959         (file_name): Do not bother to explicitly initialize to NULL; it's less
24960         efficient on some hosts.
24961         (close_stdout_status): Remove test as to whether stdout was already
24962         closed; it breaks for the case "echo x | sort >&-".
24963         Quote file name colons.
24964         Do not assume that _("write error") lacks format strings.
24965
24966 2000-05-15  Jim Meyering  <meyering@lucent.com>
24967
24968         * lib/version-etc.c (version_etc_copyright): Update the copyright
24969         string used in all --version output.
24970
24971 2000-05-14  Jim Meyering  <meyering@lucent.com>
24972
24973         * lib/closeout.c (close_stdout_set_file_name): New function.
24974         (close_stdout_status): Use new file-scoped global.
24975         Return right away if fstat says the stdout file descriptor is invalid.
24976         * lib/closeout.h (close_stdout_set_file_name): Declare.
24977
24978 2000-05-10  Jim Meyering  <meyering@lucent.com>
24979
24980         * lib/closeout.c [default_exit_status]: New file-scoped variable.
24981         (close_stdout_set_status): New function.
24982         * lib/closeout.h (close_stdout_set_status): Declare.
24983
24984 2000-05-09  Jim Meyering  <meyering@lucent.com>
24985
24986         * m4/gettext.m4: Rename this...
24987         * m4/libintl.m4: ...to this.
24988
24989 2000-05-08  Jim Meyering  <meyering@lucent.com>
24990
24991         * lib/long-options.c: Don't include closeout.h.
24992         (parse_long_options): Don't call close_stdout for --version.
24993
24994 2000-05-06  Paul Eggert  <eggert@twinsun.com>
24995
24996         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
24997         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
24998         2.1.3 bug.  This avoids a clash when files like regex.c define
24999         _GNU_SOURCE.
25000
25001 2000-05-06  Jim Meyering  <meyering@lucent.com>
25002
25003         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25004         (AC_REPLACE_FUNCS): Add strnlen.
25005
25006         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25007         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25008
25009         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25010         AC_SEARCH_LIBS call for nanosleep.
25011         (LIB_NANOSLEEP): Set and AC_SUBST.
25012
25013 2000-05-06  Jim Meyering  <meyering@lucent.com>
25014
25015         * lib/strnlen.c: Undefine __strnlen and strnlen.
25016         [!weak_alias]: Define __strnlen to strnlen.
25017
25018         * lib/atexit.c: New file, from libiberty.
25019
25020 2000-05-06  Jim Meyering  <meyering@lucent.com>
25021
25022         * lib/closeout.c (close_stdout_status): Also check for errors on the
25023         stderr stream.
25024
25025 2000-05-05  Jim Meyering  <meyering@lucent.com>
25026
25027         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25028         AC_SEARCH_LIBS call for clock_gettime.
25029         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25030
25031         * m4/search-libs.m4: Update from autoconf.
25032
25033         su doesn't work on Solaris 2.6.
25034         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25035         <shadow.h>.  Reported by Dragos Harabor.
25036
25037 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25038
25039         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25040         memcpy instead of xmalloc, xrealloc, path_concat.
25041         (locale_charset): Treat empty environment variables as absent.
25042         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25043
25044 2000-05-04  Jim Meyering  <meyering@lucent.com>
25045
25046         * lib/getopt.c: Update from glibc.
25047         * lib/obstack.c: Likewise.
25048         * lib/obstack.h: Likewise.
25049         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25050         file
25051
25052         * lib/regex.h: Likewise.
25053         * lib/strndup.c: Likewise.
25054         * lib/strnlen.c: New file, from glibc.
25055
25056 2000-05-03  Jim Meyering  <meyering@lucent.com>
25057
25058         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25059
25060 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25061
25062         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25063         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25064         compile-time test, rather than inspecting host and OS, to
25065         decide whether to define _LARGEFILE_SOURCE.
25066
25067 2000-05-01  Jim Meyering  <meyering@lucent.com>
25068
25069         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25070
25071         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25072         Based on a patch from Bruno Haible.
25073
25074 2000-05-01  Jim Meyering  <meyering@lucent.com>
25075
25076         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25077
25078 2000-04-29  Jim Meyering  <meyering@lucent.com>
25079
25080         * lib/path-concat.c: Declare strdup only if it's not defined.
25081         * lib/canon-host.c: Likewise.
25082
25083 2000-04-28  Jim Meyering  <meyering@lucent.com>
25084
25085         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25086         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25087         is included first, then limits.h is included by locale.h by libintl.h.
25088         From John David Anglin.
25089
25090 2000-04-25  Jim Meyering  <meyering@lucent.com>
25091
25092         * lib/makepath.c (S_IRWXUGO): Define.
25093         (make_path): Always perform explicit chmod if MODE specifies any
25094         of the `special' permission bits.  Prompted by a bug report against
25095         install from Mate Wierdl and Joost van Baal.
25096
25097 2000-04-18  Jim Meyering  <meyering@lucent.com>
25098
25099         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25100         (jm_PREREQ): Use it.
25101
25102 2000-04-18  Jim Meyering  <meyering@lucent.com>
25103
25104         * lib/README: New file.
25105
25106         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25107         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25108
25109 2000-04-17  Jim Meyering  <meyering@lucent.com>
25110
25111         Get it right :-)
25112         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25113         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25114         Suggestion from Akim Demaille.
25115
25116 2000-04-17  Jim Meyering  <meyering@lucent.com>
25117
25118         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25119         the definition of it to rpl_strftime also defined-away the system's
25120         declaration.
25121
25122 2000-04-15  Jim Meyering  <meyering@lucent.com>
25123
25124         Use `C' to denote so-called `contiguous' files, the same way
25125         that tar does.
25126         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25127         (ftypelet): Use S_ISCTG.
25128         From Michael Deutschmann.
25129
25130 2000-04-14  Jim Meyering  <meyering@lucent.com>
25131
25132         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25133         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25134         clobbered.
25135
25136 2000-04-14  Jim Meyering  <meyering@lucent.com>
25137
25138         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25139
25140 2000-04-13  Jim Meyering  <meyering@lucent.com>
25141
25142         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25143         AH_VERBATIM to insert required #ifndef into config.h.in.
25144         Suggestion from Akim Demaille.
25145
25146 2000-04-12  Jim Meyering  <meyering@lucent.com>
25147
25148         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25149         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25150         Christian Krackowizer.
25151
25152         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25153         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25154         (AC_SYS_LARGEFILE): Require.
25155         (AM_C_PROTOTYPES): Require.
25156
25157 2000-04-08  Jim Meyering  <meyering@lucent.com>
25158
25159         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25160         names don't conflict.  Reported by Eli Zaretskii.
25161
25162 2000-04-07  Jim Meyering  <meyering@lucent.com>
25163
25164         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25165         sys/types.h, to work around system header problems on AIX 3.2.5.
25166         From Bruno Haible.
25167
25168 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25169
25170         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25171         bug.  Deal with the different error behavior of Irix iconv.
25172
25173 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25174
25175         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25176         IRIX if the installer said otherwise.
25177
25178 2000-04-05  Jim Meyering  <meyering@lucent.com>
25179
25180         Portability tweaks required for ultrix4.3.
25181         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25182         (jm_CHECK_DECLS): Add getutent to the list of functions.
25183         (_jm_DECL_HEADERS): Add utmpx.h.
25184         From John David Anglin.
25185
25186         * m4/strftime.m4: Back out the 2000-04-02 change.
25187         Instead of that change, simply undefine putenv in the test program.
25188
25189 2000-04-05  Jim Meyering  <meyering@lucent.com>
25190
25191         Portability tweaks required for ultrix4.3.
25192         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25193         getutent.
25194         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25195         * lib/canon-host.c: Declare strdup.
25196         * lib/path-concat.c: Likewise.
25197         From John David Anglin.
25198
25199 2000-04-04  Jim Meyering  <meyering@lucent.com>
25200
25201         Be more DOS 8.3-friendly.
25202         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25203         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25204         * lib/Makefile.am: Reflect renaming.
25205         Reported by Eli Zaretskii.
25206
25207         Use a temporary file name that won't clash with `charset.alias'
25208         in the DOS 8.3 name space.
25209         * lib/Makefile.am (charset_tmp): Define.
25210         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25211         (uninstall-local): Likewise.
25212         Reported by Eli Zaretskii.
25213
25214 2000-04-03  Jim Meyering  <meyering@lucent.com>
25215
25216         * m4/gettext.m4: Fix typo in comment.
25217
25218         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25219         textutils/configure.in).  Suggestion from Paul Eggert.
25220         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25221
25222 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25223
25224         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25225         variable in the shell rather than using putenv, which isn't
25226         portable.  This avoids the configure-time inter-test dependency
25227         on the potentially-renamed putenv function.
25228
25229 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25230
25231         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25232         before checking struct stat.st_blksize, so that
25233         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25234
25235 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25236
25237         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25238         since strftime.c uses HAVE_STRFTIME to decide whether to use
25239         the underlying strftime.
25240
25241 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25242
25243         * lib/time/strftime.c (my_strftime): Make sure we call the system
25244         strftime, not ourselves, when invoking the underlying strftime.
25245
25246 2000-03-24  Jim Meyering  <meyering@lucent.com>
25247
25248         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25249         (charset_alias): Define.
25250         (install-exec-local): Factor out common code.
25251         (uninstall-local): Split lines longer than 80.
25252         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25253         (SUFFIXES): Define.
25254         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25255         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25256
25257 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25258
25259         * lib/config.charset: Output a line containing "Packages using this
25260         file".
25261         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25262         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25263         ref-del.sed): New rules.
25264
25265 2000-03-17  Jim Meyering  <meyering@lucent.com>
25266
25267         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25268         Otherwise, include <strings.h>
25269
25270 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25271
25272         * lib/unicodeio.c (utf8_wctomb): New function.
25273         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25274         format instead of in UCS-4 with platform dependent endianness.
25275
25276 2000-03-10  Jim Meyering  <meyering@lucent.com>
25277
25278         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25279         From Marco Franzen.
25280
25281 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25282
25283         * lib/savedir.c (savedir): Work even if directory size is
25284         negative; this can happen with some screwy NFS configurations.
25285
25286 2000-03-06  Jim Meyering  <meyering@lucent.com>
25287
25288         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25289         if it's NULL (because we ran out of memory).  From Bruno Haible.
25290
25291 2000-03-05  Jim Meyering  <meyering@lucent.com>
25292
25293         * lib/localcharset.c ("path-concat.h"): Include.
25294         (get_charset_aliases): Use path_concat instead of ANSI string
25295         concatenation.
25296
25297         * lib/unicodeio.h (PARAMS): Define.
25298         Use it to guard prototype.
25299
25300 2000-03-04  Jim Meyering  <meyering@lucent.com>
25301
25302         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25303         for lib/localcharset.c.
25304
25305 2000-03-04  Jim Meyering  <meyering@lucent.com>
25306
25307         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25308         installing into it.
25309         (uninstall-local): Uncomment this rule so `make distcheck' works
25310         once again.
25311
25312         * lib/unicodeio.c (<errno.h>): Include it.
25313         (errno): Declare if not defined.
25314
25315         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25316
25317         * lib/config.charset: New version, incorporating remarks from a linux
25318         i18n mailing list.  From Bruno Haible.
25319
25320 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25321
25322         * m4/codeset.m4: New file.
25323         * m4/iconv.m4: New file.
25324         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25325
25326 2000-03-03  Jim Meyering  <meyering@lucent.com>
25327
25328         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25329
25330 2000-03-02  Jim Meyering  <meyering@lucent.com>
25331
25332         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25333         the messages come out on separate lines.
25334
25335         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25336         rather than jm_CHECK_DECLARATIONS.
25337         * m4/decl.m4: Remove now-unused file.
25338
25339         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25340         geteuid.
25341
25342 2000-03-02  Jim Meyering  <meyering@lucent.com>
25343
25344         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25345
25346 2000-03-01  Jim Meyering  <meyering@lucent.com>
25347
25348         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25349         * lib/unicodeio.c: Likewise.
25350
25351 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25352
25353         * lib/config.charset: New file.
25354         * lib/localcharset.c: New file.
25355         * lib/unicodeio.h, lib/unicodeio.c: New files.
25356         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25357         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25358         (noinst_HEADERS): Add unicodeio.h.
25359         (all-local, install-exec-local, charset.alias): New targets.
25360
25361 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25362
25363         * lib/quotearg.c (ALERT_CHAR): New macro.
25364         (quotearg_buffer_restyled): Use it.
25365
25366 2000-02-27  Jim Meyering  <meyering@lucent.com>
25367
25368         * m4/check-decl.m4: Add getenv to the list.
25369
25370 2000-02-27  Jim Meyering  <meyering@lucent.com>
25371
25372         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25373         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25374
25375         * lib/backupfile.c: Guard inclusion of stdlib.h with
25376         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25377         Declare malloc if needed.
25378
25379         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25380         `#ifndef HAVE_DECL..'
25381         now that autoconf always defines the HAVE_DECL_ symbols.
25382         * lib/human.c: Likewise.
25383         * lib/same.c: Likewise.
25384         * lib/strtoumax.c: Likewise.
25385
25386         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25387         declaration check was not run.
25388         * lib/hash.c: Likewise.
25389         * lib/human.c: Likewise.
25390         * lib/same.c: Likewise.
25391         * lib/strtoumax.c: Likewise.
25392
25393         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25394         `.', then first look up the entire `.'-containing string as a login
25395         name.
25396
25397 2000-02-23  Jim Meyering  <meyering@lucent.com>
25398
25399         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25400         in place of my hack.
25401
25402 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25403
25404         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25405         (textint): New typedef.
25406         (parser_control): Member year changed from int to textint.
25407         All uses changed.
25408         (YYSTYPE): Removed; replaced by %union with int and textint members.
25409         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25410         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25411         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25412         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25413         (date, number, to_year): Use width of number in digits, not its value,
25414         to determine whether it's a 2-digit year, or a 2-digit time.
25415         (yylex): Store number of digits of numeric tokens.
25416         Reported by John Kendall.
25417
25418         (parser_control): Changed from struct parser_control to typedef (for
25419         consistency).  All uses changed.
25420
25421         (tID): Removed; not used.
25422         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25423
25424 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25425
25426         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25427         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25428
25429 2000-02-12  Jim Meyering  <meyering@lucent.com>
25430
25431         * lib/userspec.c (ISDIGIT): Define it.
25432         (isdigit): Remove definition.
25433         (is_number): Use ISDIGIT, not isdigit.
25434         <libintl.h>: Include.
25435         (_ and N_): Define.
25436         (parse_user_spec): Mark translatable strings.
25437
25438 2000-02-10  Jim Meyering  <meyering@lucent.com>
25439
25440         With these changes, nanosleep.[ch] are finally enough like the other
25441         lib/* replacement files to compile on a few more losing systems.
25442
25443         * lib/nanosleep.h: Don't include config.h.
25444         Remove prototype from declaration of nanosleep.
25445         (PARAMS): Remove now-unneeded definition.
25446         * lib/nanosleep.c: #undef nanosleep.
25447         (rpl_nanosleep): Rename from nanosleep.
25448
25449 2000-02-10  Jim Meyering  <meyering@lucent.com>
25450
25451         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25452         gnu_nanosleep to rpl_nanosleep.
25453
25454 2000-02-09  Jim Meyering  <meyering@lucent.com>
25455
25456         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25457         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25458
25459 2000-02-08  Akim Demaille  <akim@epita.fr>
25460
25461         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25462         `[' and `]' and remove uses of `changequote'.
25463         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25464         (AC_SYS_LARGEFILE): Likewise.
25465         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25466         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25467         of changequote.
25468         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25469         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25470         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25471         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25472
25473 2000-02-05  Jim Meyering  <meyering@lucent.com>
25474
25475         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25476         Remove explicit use of AC_HEADER_TIME.  It is required by
25477         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25478         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25479         in autoconf whereby the expansion of the latter ended up preceding
25480         the expansion of its prerequisite, AC_HEADER_TIME.
25481         Reported by Volker Borchert.
25482
25483 2000-02-03  Jim Meyering  <meyering@lucent.com>
25484
25485         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25486
25487 2000-02-03  Jim Meyering  <meyering@lucent.com>
25488
25489         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25490         rather than with `#if HAVE_UTMPNAME'.
25491
25492 2000-02-02  Jim Meyering  <meyering@lucent.com>
25493
25494         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25495         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25496         Reported by Eli Zaretskii.
25497
25498 2000-02-01  Jim Meyering  <meyering@lucent.com>
25499
25500         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25501
25502 2000-01-31  Jim Meyering  <meyering@lucent.com>
25503
25504         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25505         functions.  Add the time.h and sys/time.h headers along with the
25506         AC_REQUIRE'ment of AC_HEADER_TIME.
25507
25508 2000-01-31  Jim Meyering  <meyering@lucent.com>
25509
25510         * lib/nanosleep.h (nanosleep): Guard declaration with
25511         `#if ! HAVE_DECL_NANOSLEEP'.
25512         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25513         the declaration in that vendor's sys/timers.h.
25514         Reported by Christian Krackowizer.
25515
25516         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25517         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25518         (ISPRINT): Likewise.
25519         Reported by Tom Tromey.
25520
25521 2000-01-30  Jim Meyering  <meyering@lucent.com>
25522
25523         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25524
25525         * m4/prereq.m4 (utmp_includes): Define.
25526         Check for ut_user and ut_name members in both struct utmpx
25527         and struct utmp.
25528
25529 2000-01-30  Jim Meyering  <meyering@lucent.com>
25530
25531         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25532         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25533         header files where only utmpx.ut_user is declared.
25534
25535         * lib/readutmp.h (UT_USER): Define.
25536
25537 2000-01-29  Jim Meyering  <meyering@lucent.com>
25538
25539         * m4/lib-check.m4: New file containing library-related checks from
25540         fileutils and sh-utils (textutils had none).
25541
25542 2000-01-28  Jim Meyering  <meyering@lucent.com>
25543
25544         * m4/perl.m4: Change format of warning message to look more like that
25545         from the missing script.  Suggestion from François Pinard.
25546
25547 2000-01-25  Jim Meyering  <meyering@lucent.com>
25548
25549         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25550         well as time.h in the compile check.
25551         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25552         Fix typo in cross-compiling case: s/yes/no/.
25553
25554 2000-01-23  Jim Meyering  <meyering@lucent.com>
25555
25556         * m4/jm-macros.m4: Move df-related tests here from
25557         fileutils/configure.in
25558
25559         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25560         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25561
25562         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25563         s/space/ac_fsusage_space/.
25564         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25565
25566         * m4/ftruncate.m4: New file (derived from part of
25567         fileutils/configure.in).
25568         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25569         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25570
25571         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25572         AC_SUBST these here, rather than just in sh-util/configure.in, so
25573         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25574         all the same.
25575         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25576         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25577         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25578         (AC_SUBST(POW_LIBM)): Likewise.
25579         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25580
25581 2000-01-23  Jim Meyering  <meyering@lucent.com>
25582
25583         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25584         obstack.c.
25585
25586 2000-01-22  Jim Meyering  <meyering@lucent.com>
25587
25588         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25589
25590         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25591
25592         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25593         configure.in
25594         (AC_CHECK_HEADERS): Likewise for sh-utils.
25595         (AC_CHECK_HEADERS): Likewise for textutils.
25596         Merge the three lists of headers.
25597
25598         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25599         from fileutils' configure.in.
25600
25601         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25602         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25603         check-decl.m4.
25604
25605         * m4/check-decl.m4: Use #if rather than #ifdef.
25606         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25607         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25608         (_jm_DECL_HEADERS): Define new function.
25609         (jm_CHECK_DECLARATIONS): Require it.
25610
25611 2000-01-22  Jim Meyering  <meyering@lucent.com>
25612
25613         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25614         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25615         Required for some AIX systems.  Reported by Christian Krackowizer.
25616         [TESTING] (main): New function.
25617
25618         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25619         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25620         letters.
25621
25622         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25623         iswprint.
25624
25625         * lib/strverscmp.c (ISDIGIT): Define.
25626         (strverscmp): Use ISDIGIT, not isdigit.
25627
25628 2000-01-19  Jim Meyering  <meyering@lucent.com>
25629
25630         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25631         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25632         defines `struct timespec' in <sys/time.h>
25633
25634         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25635         Thanks to Akim for explaining.
25636
25637 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25638
25639         * lib/nanosleep.c (nanosleep):
25640         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25641         POSIX.1 doesn't require SA_INTERRUPT and some systems
25642         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25643         it's been part of POSIX.1 since day 1 (in 1988).
25644
25645 2000-01-17  Jim Meyering  <meyering@lucent.com>
25646
25647         * lib/interlock: Remove unused file.  Reported by François Pinard.
25648
25649 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25650
25651         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25652         alert, backslash, formfeed, and vertical tab unnecessarily in
25653         shell quoting style.
25654
25655 2000-01-16  Jim Meyering  <meyering@lucent.com>
25656
25657         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25658         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25659         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25660         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25661
25662 2000-01-16  Jim Meyering  <meyering@lucent.com>
25663
25664         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25665         because the latter didn't work.
25666
25667 2000-01-15  Jim Meyering  <meyering@lucent.com>
25668
25669         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25670         (AC_REPLACE_FUNCS): Add memcpy and memset.
25671         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25672         Add strpbrk.
25673         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25674
25675 2000-01-12  Jim Meyering  <meyering@lucent.com>
25676
25677         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25678         (jm_PREREQ): Use it.
25679         (jm_PREREQ_READUTMP): New macro.
25680         (jm_PREREQ): Use it.
25681
25682 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25683
25684         Quote multibyte characters correctly.
25685         * m4/c-bs-a.m4: New file.
25686         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25687         (jm_PREREQ): Use it.
25688
25689 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25690
25691         * m4/uintmax_t.m4: Port to autoconf 2.13.
25692
25693 2000-01-08  Jim Meyering  <meyering@ascend.com>
25694
25695         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25696         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25697
25698 2000-01-04  Jim Meyering  <meyering@ascend.com>
25699
25700         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25701         jm_STRUCT_DIRENT_D_TYPE.
25702         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25703         jm_STRUCT_DIRENT_D_INO.
25704         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25705         jm_STRUCT_UTIMBUF.
25706         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25707         renamings.
25708         * m4/utime.m4: Likewise.
25709
25710         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25711         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25712
25713 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25714
25715         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25716         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25717
25718 2000-01-02  Jim Meyering  <meyering@ascend.com>
25719
25720         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25721         remember if this is necessary.
25722
25723 1999-12-26  Jim Meyering  <meyering@ascend.com>
25724
25725         * m4/jm-macros.m4: Use it here.
25726         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25727
25728 1999-12-23  Jim Meyering  <meyering@ascend.com>
25729
25730         * m4/jm-macros.m4: Check for clock_gettime (moved from
25731         fileutils/configure.in)
25732         Check for gettimeofday.
25733
25734 1999-12-20  Jim Meyering  <meyering@ascend.com>
25735
25736         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25737         autoconf-2.14a-1999-12-20.
25738
25739 1999-12-19  Jim Meyering  <meyering@ascend.com>
25740
25741         * m4/lstat-slash.m4: New file.
25742         * m4/jm-macros.m4: Use the new macro:
25743         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25744
25745 1999-12-07  Jim Meyering  <meyering@ascend.com>
25746
25747         * m4/perl.m4: Require that File::Compare be available, too.
25748         Too many systems seem to lack it.
25749
25750         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25751         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25752
25753 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25754
25755         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25756         problem with the QNX 4.25 shell, which doesn't propagate exit
25757         status of failed commands inside shell assignments.
25758
25759 1999-11-17  Jim Meyering  <meyering@ascend.com>
25760
25761         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25762
25763 1999-11-07  Jim Meyering  <meyering@ascend.com>
25764
25765         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25766
25767 1999-11-06  Jim Meyering  <meyering@ascend.com>
25768
25769         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25770         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25771
25772 1999-11-05  Jim Meyering  <meyering@ascend.com>
25773
25774         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25775         configure.in of textutils, fileutils, and sh-utils into this one
25776         (shared between those packages) file.
25777         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25778         AC_STRUCT_ST_BLKSIZE.
25779
25780 1999-11-03  Jim Meyering  <meyering@ascend.com>
25781
25782         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25783         of AC_CHECK_TYPE checks includes unistd.h.
25784         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25785         Suggestion from Akim Demaille.
25786
25787 1999-10-30  Jim Meyering  <meyering@ascend.com>
25788
25789         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25790         m4-quoted string.
25791         * m4/ls-mntd-fs.m4: Likewise.
25792         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25793         * m4/jm-winsz1.m4: Likewise.
25794
25795         * m4/const.m4: Remove file, since the fix made it into the experimental
25796         version of autoconf.
25797         * m4/mktime.m4: Likewise.
25798
25799         * m4/check-type.m4: Remove file, now that the latest version of
25800         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25801
25802         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25803         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25804         AC_CHECK_TYPE.
25805
25806 1999-10-04  Jim Meyering  <meyering@ascend.com>
25807
25808         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25809
25810 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25811
25812         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25813         2.95.1 bug with HP-UX 10.20.
25814
25815 1999-09-17  Jim Meyering  <meyering@ascend.com>
25816
25817         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25818         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25819         due to missing strdup (against sh-utils-2.0).
25820
25821 1999-08-29  Jim Meyering  <meyering@ascend.com>
25822
25823         * m4/jm-macros.m4: Require jm_BISON.
25824         * m4/bison.m4: New file.
25825
25826 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25827
25828         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25829         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25830
25831 1999-08-05  Jim Meyering  <meyering@ascend.com>
25832
25833         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25834         to avoid conflicts with `conftest' on 8+3 filesystems.
25835         Suggestion from Eli Zaretskii.
25836
25837 1999-08-04  Jim Meyering  <meyering@ascend.com>
25838
25839         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25840         fileutils and sh-utils (textutils's getline test was inadequate).
25841         (AM_FUNC_GETLINE): Run this test.
25842         (AC_CHECK_FUNCS): Check for getdelim.
25843         Reported by Bob Proulx.
25844
25845 1999-08-02  Jim Meyering  <meyering@ascend.com>
25846
25847         * m4/jm-macros.m4: Add a comment.
25848
25849 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25850
25851         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25852         <inttypes.h> defines strtoumax as a macro (and not as a
25853         function).
25854
25855 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25856
25857         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
25858         that we can shift, multiply and divide unsigned long long
25859         values; Ultrix cc can't do it.
25860
25861 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25862
25863         * m4/mktime.m4: New file, which is a preview of what should appear
25864         in the next public autoconf release.
25865
25866 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25867
25868         * m4/lfs.m4: Remove this file.
25869         * m4/largefile.m4: New file.  It contains the old contents of
25870         lfs.m4, except that all names with prefix AC_LFS have been
25871         changed to use the prefix AC_SYS_LARGEFILE instead, to be
25872         compatible with future autoconf versions.  Also, some minor m4
25873         quoting problems have been fixed.
25874
25875 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25876
25877         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
25878         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
25879         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
25880         and simplify the shell code.
25881
25882 1999-08-01  Jim Meyering  <meyering@ascend.com>
25883
25884         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
25885         m4.
25886
25887 1999-07-20  Jim Meyering  <meyering@ascend.com>
25888
25889         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
25890
25891 1999-07-15  Jim Meyering  <meyering@ascend.com>
25892
25893         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
25894
25895 1999-05-22  Jim Meyering  <meyering@ascend.com>
25896
25897         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
25898
25899 1999-05-20  Jim Meyering  <meyering@ascend.com>
25900
25901         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
25902         Add a colon after each `then' in case $4 is empty.
25903
25904 1999-05-16  Jim Meyering  <meyering@ascend.com>
25905
25906         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
25907
25908 1999-05-10  Jim Meyering  <meyering@ascend.com>
25909
25910         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
25911
25912         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
25913         AC_FUNC_MKTIME.
25914
25915 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
25916
25917         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
25918
25919 1999-05-04  Paul Eggert  <eggert@twinsun.com>
25920
25921         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
25922         not CPPFLAGS, so that linking works correctly in IRIX.
25923
25924 1999-04-30  Paul Eggert  <eggert@twinsun.com>
25925
25926         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
25927
25928 1999-04-20  Paul Eggert  <eggert@twinsun.com>
25929
25930         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
25931         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
25932         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
25933         jm_AC_TYPE_UNSIGNED_LONG_LONG.
25934         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
25935
25936         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
25937
25938 1999-04-20  Jim Meyering  <meyering@ascend.com>
25939
25940         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
25941         AC_REPLACE xstroull if necessary.  From Paul Eggert.
25942         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
25943
25944 1999-04-18  Jim Meyering  <meyering@ascend.com>
25945
25946         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
25947         * m4/jm-macros.m4: Use it.
25948
25949 1999-04-06  Jim Meyering  <meyering@ascend.com>
25950
25951         * m4/strftime.m4: Remove test for %f.
25952
25953 1999-03-29  Jim Meyering  <meyering@ascend.com>
25954
25955         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
25956         superset of the AC_TYPE_* checks in the textutils, fileutils,
25957         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
25958         AC_TYPE_PID_T.
25959
25960 1999-03-28  Jim Meyering  <meyering@ascend.com>
25961
25962         * m4/jm-macros.m4: Define GNU_PACKAGE here.
25963         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
25964         replaced e.g., in the *.sh files of the sh-utils.
25965
25966 1999-03-20  Jim Meyering  <meyering@ascend.com>
25967
25968         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
25969         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
25970         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
25971
25972 1999-03-19  Jim Meyering  <meyering@ascend.com>
25973
25974         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
25975
25976 1999-03-12  Jim Meyering  <meyering@ascend.com>
25977
25978         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
25979
25980 1999-03-07  Jim Meyering  <meyering@ascend.com>
25981
25982         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
25983         declared.
25984
25985 1999-02-17  Jim Meyering  <meyering@ascend.com>
25986
25987         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
25988         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
25989
25990 1999-02-07  Jim Meyering  <meyering@ascend.com>
25991
25992         * m4/group-member.m4: New file -- extracted from sh-utils'
25993         configure.in.
25994
25995         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
25996         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
25997
25998 1999-02-06  Jim Meyering  <meyering@ascend.com>
25999
26000         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26001         * m4/fnmatch.m4: Likewise.
26002         * m4/getgroups.m4: Likewise.
26003         * m4/lstat.m4: Likewise.
26004         * m4/malloc.m4: Likewise.
26005         * m4/putenv.m4: Likewise.
26006         * m4/realloc.m4: Likewise.
26007         * m4/regex.m4: Likewise.
26008         * m4/stat.m4: Likewise.
26009         * m4/strftime.m4: Likewise.
26010         Suggestion from Alain Magloire.
26011
26012         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26013         * m4/fnmatch.m4: Likewise.
26014         * m4/getgroups.m4: Likewise.
26015         * m4/getline.m4: Likewise.
26016         * m4/lstat.m4: Likewise.
26017         * m4/malloc.m4: Likewise.
26018         * m4/memcmp.m4: Likewise.
26019         * m4/putenv.m4: Likewise.
26020         * m4/realloc.m4: Likewise.
26021         * m4/regex.m4: Likewise.
26022         * m4/stat.m4: Likewise.
26023         * m4/strftime.m4: Likewise.
26024         Suggestion from Alain Magloire.
26025
26026         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26027         an argument.
26028
26029         * m4/regex.m4: Add a run-time Test for proper operation of
26030         re_compile_pattern.
26031
26032 1999-01-31  Jim Meyering  <meyering@ascend.com>
26033
26034         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26035
26036 1999-01-30  Jim Meyering  <meyering@ascend.com>
26037
26038         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26039
26040         * m4/jm-mktime.m4: Make this a wrapper around the official
26041         AM_FUNC_MKTIME rather than my private copy, now that the official one
26042         is up to date.
26043         * m4/mktime.m4: Remove file.
26044
26045         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26046         * m4/uptime.m4: Likewise.
26047         * m4/uintmax_t.m4: Likewise.
26048
26049 1999-01-28  Jim Meyering  <meyering@ascend.com>
26050
26051         * m4/jm-macros.m4: Use jm_AFS.
26052         * m4/afs.m4: New file (from fileutils' configure.in).
26053
26054         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26055         * m4/chown.m4: Likewise.
26056         * m4/d-ino.m4: Likewise.
26057         * m4/d-type.m4: Likewise.
26058         * m4/fnmatch.m4: Likewise.
26059         * m4/getgroups.m4: Likewise.
26060         * m4/gettext.m4: Likewise.
26061         * m4/jm-mktime.m4: Likewise.
26062         * m4/jm-winsz2.m4: Likewise.
26063         * m4/lcmessage.m4: Likewise.
26064         * m4/ls-mntd-fs.m4: Likewise.
26065         * m4/malloc.m4: Likewise.
26066         * m4/memcmp.m4: Likewise.
26067         * m4/putenv.m4: Likewise.
26068         * m4/realloc.m4: Likewise.
26069         * m4/st_mtim.m4: Likewise.
26070         * m4/strftime.m4: Likewise.
26071
26072 1999-01-16  Jim Meyering  <meyering@ascend.com>
26073
26074         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26075         (ARGMATCH_DIE_DECL): Define.
26076
26077 1999-01-12  Jim Meyering  <meyering@ascend.com>
26078
26079         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26080         Reported by Lars Hecking.
26081
26082 1999-01-10  Jim Meyering  <meyering@ascend.com>
26083
26084         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26085         gross kludge.
26086         * m4/inttypes_h.m4: Likewise.
26087         * m4/lstat.m4: Likewise.
26088         * m4/malloc.m4: Likewise.
26089         * m4/readdir.m4: Likewise.
26090         * m4/realloc.m4: Likewise.
26091         * m4/st_dm_mode.m4: Likewise.
26092         * m4/stat.m4: Likewise.
26093         * m4/utimbuf.m4: Likewise.
26094         * m4/utimes.m4: Likewise.
26095
26096         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26097         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26098         comments in config.h.in are meaningful.
26099
26100         * m4/jm-macros.m4: Require autoconf-2.13 here.
26101
26102         * m4/regex.m4: By default, don't use the included regex.c on systems
26103         with glibc 2.  Suggestion from Uli Drepper.
26104
26105 1999-01-02  Jim Meyering  <meyering@ascend.com>
26106
26107         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26108
26109 1998-12-18  Jim Meyering  <meyering@ascend.com>
26110
26111         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26112         Based on a suggestion from Lars Hecking.
26113
26114 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26115
26116         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26117
26118 1998-11-16  Jim Meyering  <meyering@ascend.com>
26119
26120         * m4/lfs.m4: Double-quote the `uname...` expression.
26121
26122 1998-11-14  Jim Meyering  <meyering@ascend.com>
26123
26124         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26125         * m4/stat.m4: Likewise.
26126
26127 1998-11-03  Jim Meyering  <meyering@ascend.com>
26128
26129         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26130         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26131
26132 1998-10-18  Jim Meyering  <meyering@ascend.com>
26133
26134         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26135
26136 1998-10-17  Jim Meyering  <meyering@ascend.com>
26137
26138         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26139         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26140         calls for those previously hard-coded headers.  Instead, take a new
26141         parameter.
26142         (jm_CHECK_DECLARATIONS): Reflect interface change.
26143         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26144         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26145
26146         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26147
26148 1998-10-14  Jim Meyering  <meyering@ascend.com>
26149
26150         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26151         instead of "TZ=America/Vancouver".  From Paul Eggert.
26152
26153 1998-10-11  Jim Meyering  <meyering@ascend.com>
26154
26155         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26156         This adds a test for a recently added compatibility fix for mktime.c.
26157         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26158
26159 1998-09-27  Jim Meyering  <meyering@ascend.com>
26160
26161         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26162
26163         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26164         ../configure.in, including a change from Gordon Matzigkeit to allow
26165         cross-compiling for the Hurd.
26166
26167         * m4/glibc.m4: New file/macro to test for the GNU C Library
26168         versions 1 and 2.  From Gordon Matzigkeit.
26169         Indent.
26170
26171 1998-09-21  Jim Meyering  <meyering@ascend.com>
26172
26173         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26174
26175 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26176
26177         Port nanosecond-resolution times to UnixWare 2.1.2 and
26178         pedantic Solaris 2.6.
26179
26180         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26181         AC_STRUCT_ST_MTIM.
26182         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26183         Generate name of ns member, instead of just 1 or undef.
26184         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26185
26186 1998-08-15  Jim Meyering  <meyering@ascend.com>
26187
26188         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26189         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26190         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26191         instead of jm_TYPE_SSIZE_T.
26192
26193 1998-08-12  Jim Meyering  <meyering@ascend.com>
26194
26195         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26196
26197 1998-08-02  Jim Meyering  <meyering@ascend.com>
26198
26199         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26200         in acconfig.h manually.
26201
26202 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26203
26204         * m4/st_mtim.m4: New file.
26205
26206 1998-07-28  Jim Meyering  <meyering@ascend.com>
26207
26208         * m4/utimes.m4: Undef stat.
26209
26210 1998-07-25  Jim Meyering  <meyering@ascend.com>
26211
26212         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26213         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26214
26215 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26216
26217         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26218         uid and gid actually remain unchanged.
26219
26220 1998-07-07  Jim Meyering  <meyering@ascend.com>
26221
26222         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26223
26224 1998-07-04  Jim Meyering  <meyering@ascend.com>
26225
26226         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26227         to prove that this macro can be used in packages without regex.c.
26228
26229 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26230
26231         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26232         is to be used.
26233
26234 1998-07-03  Jim Meyering  <meyering@ascend.com>
26235
26236         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26237
26238         * m4/gettext.m4: New file -- from gettext-0.10.35.
26239         * m4/lcmessage.m4: Likewise.
26240         * m4/progtest.m4: Likewise.
26241
26242         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26243         * m4/jm-macros.m4: Require the new macro.
26244
26245 1998-06-29  Jim Meyering  <meyering@ascend.com>
26246
26247         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26248         for the definition of NGROUPS (used in a system header included
26249         by sys/mount.h).
26250
26251 1998-06-28  Jim Meyering  <meyering@ascend.com>
26252
26253         * m4/ls-mntd-fs.m4: New file.
26254         * m4/fstypename.m4: New file.
26255
26256         * m4/jm-macros.m4: Require the new macro.
26257         * m4/jm-glibc-io.m4: New file.
26258
26259 1998-05-19  Jim Meyering  <meyering@ascend.com>
26260
26261         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26262         * m4/lchown.m4: New file.
26263
26264         * m4/Makefile.am.in: New file.
26265         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26266
26267 1998-05-14  Jim Meyering  <meyering@ascend.com>
26268
26269         * m4/Makefile.am (EXTRA_DIST): Add them.
26270         * m4/jm-macros.m4: New file.
26271         * m4/utimbuf.m4: New file.
26272
26273 1998-05-12  Jim Meyering  <meyering@ascend.com>
26274
26275         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26276
26277 1998-05-11  Jim Meyering  <meyering@ascend.com>
26278
26279         * m4/isc-posix.m4: New file.
26280
26281 1998-05-10  Jim Meyering  <meyering@ascend.com>
26282
26283         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26284
26285 1998-05-09  Jim Meyering  <meyering@ascend.com>
26286
26287         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26288         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26289         with automake.
26290
26291         * m4/ssize_t.m4: New file.
26292         * m4/mktime.m4: Remove file -- the new automake has this now.
26293
26294 1998-04-26  Jim Meyering  <meyering@ascend.com>
26295
26296         * m4/assert.m4: New file.
26297         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26298
26299 1998-04-05  Jim Meyering  <meyering@ascend.com>
26300
26301         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26302         (jm_PREREQ): Use it here.
26303
26304 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26305
26306         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26307         in acconfig.h.
26308
26309 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26310
26311         * m4/prereq.m4: New file.
26312         * m4/error.m4: New file.
26313         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26314
26315 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26316
26317         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26318         cache-check for the same variable -- that defeated the purpose of
26319         the test; the test program was never run.  This was a problem only
26320         on systems with losing getline functions -- HP-UX 10.20 is one.
26321         Reported by Bjorn Helgaas.
26322
26323 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26324
26325         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26326
26327 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26328
26329         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26330
26331         * m4/const.m4: New file.  Use an initializer in this declaration
26332         typedef int charset[2]; const charset x;
26333         Reported by Bob Glickstein.
26334
26335 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26336
26337         * m4/chown.m4: Fix reversed types on -1 args to chown.
26338         From Kaveh Ghazi.
26339
26340 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26341
26342         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26343         Add lseek and memchr.
26344
26345         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26346         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26347         have a 20-character limit on names.
26348
26349 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26350
26351         * m4/inttypes_h.m4: New file.
26352         * m4/uintmax_t.m4: New file.
26353         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26354
26355 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26356   Free Software Foundation, Inc.
26357 Copying and distribution of this file, with or without modification,
26358 are permitted provided the copyright notice and this notice are preserved.