New module 'mbspbrk'.
[gnulib.git] / ChangeLog
1 2007-02-04  Bruno Haible  <bruno@clisp.org>
2
3         New module mbspbrk.
4         * modules/mbspbrk: New file.
5         * lib/mbspbrk.c: New file.
6         * lib/string_.h (strpbrk): Add a conditional link warning.
7         (mbspbrk): New declaration.
8         * m4/mbspbrk.m4: New file.
9         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
10         GNULIB_MBSPBRK.
11         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
12         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
13
14 2007-02-04  Bruno Haible  <bruno@clisp.org>
15
16         New module mbscspn.
17         * modules/mbscspn: New file.
18         * lib/mbscspn.c: New file.
19         * lib/string_.h (strcspn): Add a conditional link warning.
20         (mbscspn): New declaration.
21         * m4/mbscspn.m4: New file.
22         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
23         GNULIB_MBSCSPN.
24         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
25         * MODULES.html.sh (Internationalization functions): Add mbscspn.
26
27 2007-02-04  Bruno Haible  <bruno@clisp.org>
28
29         New module mbscasestr, reduced goal of strcasestr.
30         * modules/mbscasestr: New file.
31         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
32         (mbscasestr): Renamed from strcasestr.
33         * lib/strcasestr.c: Don't include mbuiter.h.
34         (strcasestr): Remove support for multibyte locales.
35         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
36         Change the conditional link warning.
37         (mbscasestr): New declaration.
38         * m4/mbscasestr.m4: New file.
39         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
40         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
41         REPLACE_STRCASESTR.
42         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
43         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
44         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
45         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
46         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
47         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
48         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
49         (Depends-on): Remove mbuiter.
50         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
51
52 2007-02-04  Bruno Haible  <bruno@clisp.org>
53
54         Simplify handling of strncasecmp.
55         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
56         the conditional link warning.
57         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
58         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
59         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
60         * modules/strcase (configure.ac): Don't invoke
61         gl_STRING_MODULE_INDICATOR.
62         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
63
64 2007-02-04  Bruno Haible  <bruno@clisp.org>
65
66         New module mbscasecmp, reduced goal of strcasecmp.
67         * modules/mbscasecmp: New file.
68         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
69         (mbscasecmp): Renamed from strcasecmp.
70         * lib/strcasecmp.c: Don't include mbuiter.h.
71         (strcasecmp): Remove support for multibyte locales.
72         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
73         Change the conditional link warning.
74         (mbscasecmp): New declaration.
75         * m4/mbscasecmp.m4: New file.
76         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
77         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
78         REPLACE_STRCASECMP.
79         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
80         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
81         GNULIB_MBSCASECMP.
82         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
83         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
84         * modules/strcase (Files): Remove m4/mbrtowc.m4.
85         (Depends-on): Remove mbuiter.
86         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
87
88 2007-02-04  Bruno Haible  <bruno@clisp.org>
89
90         New module mbsstr. Remove module strstr.
91         * modules/mbsstr: New file.
92         * modules/strstr: Remove file.
93         * lib/mbsstr.c: Renamed from lib/strstr.c.
94         (mbsstr): Renamed from strstr.
95         * lib/string_.h (strstr): Remove declaration. Change the conditional
96         link warning.
97         (mbsstr): New declaration.
98         * m4/mbsstr.m4: New file.
99         * m4/strstr.m4: Remove file.
100         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
101         REPLACE_STRSTR.
102         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
103         Don't initialize GNULIB_STRSTR.
104         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
105         substitute GNULIB_STRSTR and REPLACE_STRSTR.
106         * MODULES.html.sh (Internationalization functions): Add mbsstr.
107         (Support for systems lacking ANSI C 89): Remove strstr.
108
109 2007-02-04  Bruno Haible  <bruno@clisp.org>
110
111         New module mbsrchr.
112         * modules/mbsrchr: New file.
113         * lib/mbsrchr.c: New file.
114         * lib/string_.h (strrchr): Add a conditional link warning.
115         (mbsrchr): New declaration.
116         * m4/mbsrchr.m4: New file.
117         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
118         GNULIB_MBSRCHR.
119         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
120         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
121
122 2007-02-04  Bruno Haible  <bruno@clisp.org>
123
124         New module mbschr.
125         * modules/mbschr: New file.
126         * lib/mbschr.c: New file.
127         * lib/string_.h (strchr): Add a conditional link warning.
128         (mbschr): New declaration.
129         * m4/mbschr.m4: New file.
130         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
131         GNULIB_MBSCHR.
132         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
133         * MODULES.html.sh (Internationalization functions): Add mbschr.
134
135 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
136
137         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
138
139         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
140
141 2007-02-04  Bruno Haible  <bruno@clisp.org>
142
143         New module description section 'configure.ac-early'.
144         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
145         (func_get_autoconf_early_snippet): New function.
146         (func_import, func_create_testdir): Use it. Remove special cases for
147         modules 'extensions' and 'lock'.
148         * modules/extensions (configure.ac-early): Require
149         gl_USE_SYSTEM_EXTENSIONS.
150         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
151
152 2007-02-04  Bruno Haible  <bruno@clisp.org>
153
154         Make use of gcj-4.3's -fsource and -ftarget option.
155         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
156         and if so try the options -fsource and -ftarget.
157         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
158         source_version, ftarget_option, target_version arguments.
159         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
160         (is_envjavac_oldgcj_14_14_usable): Renamed from
161         is_envjavac_gcj_14_14_usable.
162         (is_envjavac_oldgcj_14_13_usable): Renamed from
163         is_envjavac_gcj_14_13_usable.
164         (is_gcj_present): Update.
165         (is_gcj_43, is_gcj43_usable): New functions.
166         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
167         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
168         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
169         try the options -fsource and -ftarget.
170
171 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
172
173         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
174         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
175         larger value.
176
177 2007-02-03  Jim Meyering  <jim@meyering.net>
178
179         Give tools a better chance to allocate space for very large buffers.
180         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
181
182         Make pwd and readlink work also when run with an unreadable parent dir
183         on systems with openat support.
184         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
185         provided getcwd function, even when we have openat support.
186         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
187
188 2007-02-02  Bruno Haible  <bruno@clisp.org>
189
190         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
191         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
192         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
193         portability problems if one of these functions is only used on specific
194         platforms.
195         Reported by Paul Eggert.
196
197 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
198
199         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
200         is causing more trouble than it's curing.
201         * lib/regex_internal.h (__mempcpy): Remove.
202         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
203         (and make the code a tad smaller to boot).
204         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
205
206 2007-02-02  Jim Meyering  <jim@meyering.net>
207
208         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
209         section, not in the Makefile.am: one.
210
211 2007-02-02  Eric Blake  <ebb9@byu.net>
212
213         * lib/strchrnul.c: Always include config.h first.
214
215         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
216         gnulib strstr is not necessary here.
217
218 2007-02-02  Simon Josefsson  <simon@josefsson.org>
219
220         * m4/socklen.m4: Fix typo.
221
222 2007-02-02  Eric Blake  <ebb9@byu.net>
223
224         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
225         * modules/netinet_in (Makefile.am): Likewise.
226
227 2007-02-01  Bruno Haible  <bruno@clisp.org>
228
229         * lib/string_.h (GL_LINK_WARNING): New macro.
230         (strcasecmp, strstr, strcasestr): If provided by the system,
231         conditionally define as a macro that leads to a warning instead of to
232         an error.
233         (strncasecmp): Conditionally define as a macro that leads to a warning.
234
235 2007-02-01  Jim Meyering  <jim@meyering.net>
236
237         Give tools a better chance to allocate space for very large buffers.
238         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
239
240 2007-02-01  Karl Berry  <karl@gnu.org>
241
242         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
243
244 2007-02-01  Bruno Haible  <bruno@clisp.org>
245
246         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
247         renamings.
248
249 2007-02-01  Eric Blake  <ebb9@byu.net>
250
251         * modules/regex (Depends-on): Revert dependence on mempcpy.
252         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
253         module's definition of mempcpy.
254         Reported by Paul Eggert.
255
256 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
257
258         * lib/string_.h: If the gnulib module XYZ is not present, undefine
259         the symbol XYZ before redefining it.  This fixes a problem with
260         programs that don't use XYZ, when compiled on systems that define
261         XYZ to something else.
262
263 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
264
265         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
266         occurs when "mkdir -m foo" creates a setgid directory that is (1)
267         writeable to group or other and (2) is intended to have a special
268         mode bit that is set or cleared.  In such a case, the directory
269         should be neither group- nor other-writeable until the special
270         mode bits are right.
271
272 2007-01-31  Eric Blake  <ebb9@byu.net>
273
274         * modules/mountlist (Depends-on): Add strstr.
275
276         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
277         bug.
278         * modules/string (Makefile.am): Remove redundant replacement.
279         * modules/regex (Depends-on): Add mempcpy.
280
281 2007-01-31  Bruno Haible  <bruno@clisp.org>
282
283         New module description field 'Link'.
284         * gnulib-tool (func_usage): Document --extract-link-directive.
285         (sed_extract_prog): Recognize 'Link' directive.
286         (func_get_link_directive): New function.
287         (func_import): Show summary of link directives.
288         Handle --extract-link-directive option.
289         * modules/acl (Link): New section.
290         * modules/clock-time (Link): New section.
291         * modules/euidaccess (Link): New section.
292         * modules/gettext (Link): New section.
293         * modules/iconv (Link): New section.
294         * modules/lock (Link): New section.
295         * modules/nanosleep (Link): New section.
296         * modules/readline (Link): New section.
297
298 2007-01-27  Bruno Haible  <bruno@clisp.org>
299
300         Enforce the use of gnulib modules for unportable <string.h> functions.
301         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
302         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
303         (gl_HEADER_STRING_H_BODY): Require it.
304         * lib/string_.h: If the gnulib module XYZ is not present, redefine
305         the symbol XYZ to one that gives a link error.
306         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
307         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
308         * modules/mempcpy (configure.ac): Likewise.
309         * modules/memrchr (configure.ac): Likewise.
310         * modules/stpcpy (configure.ac): Likewise.
311         * modules/stpncpy (configure.ac): Likewise.
312         * modules/strcase (configure.ac): Likewise.
313         * modules/strcasestr (configure.ac): Likewise.
314         * modules/strchrnul (configure.ac): Likewise.
315         * modules/strdup (configure.ac): Likewise.
316         * modules/strndup (configure.ac): Likewise.
317         * modules/strnlen (configure.ac): Likewise.
318         * modules/strpbrk (configure.ac): Likewise.
319         * modules/strsep (configure.ac): Likewise.
320         * modules/strstr (configure.ac): Likewise.
321         * modules/strtok_r (configure.ac): Likewise.
322
323 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
324
325         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
326
327 2007-01-30  Jim Meyering  <jim@meyering.net>
328
329         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
330
331 2007-01-29  Bruno Haible  <bruno@clisp.org>
332
333         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
334         * lib/execute.c: Likewise.
335         * lib/pipe.c: Likewise.
336         * lib/printf-args.h: Likewise.
337         * lib/printf-args.c: Likewise.
338         * lib/printf-parse.c: Likewise.
339         * lib/vasnprintf.c: Likewise.
340
341 2007-01-29  Eric Blake  <ebb9@byu.net>
342
343         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
344         declaration.
345
346 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
347
348         * lib/strptime.h (strptime): Use 'restrict' for args where
349         POSIX requires this.
350         * lib/strptime.c (strptime): Likewise.
351         Change license notice from LGPL to GPL, since gnulib-tool will
352         change this as needed.
353         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
354         defined.
355         Include "strptime.h" first, to check interface.
356         Do not #undef _LIBC and _NL_CURRENT.
357         Do not include <stdlib.h>; no longer needed.
358         Include "time_r.h" and declare ptime_locale_status
359         only if _LIBC is not defined.
360         (__P): Remove unused macro.
361         (match_string): Bring back glibc version, but use it only if _LIBC
362         is defined.
363         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
364         Remove unnecessary assertion and abort() call.
365         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
366         * m4/strptime.m4: Fix serial number comment.
367         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
368         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
369         (Depends-on): Add time_r.
370
371 2007-01-29  Bruno Haible  <bruno@clisp.org>
372
373         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
374         strptime.
375         * modules/strptime (Depends-on): Add stdbool.
376         * lib/strptime.h: Include <time.h> always. Add comments.
377
378 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
379
380         * modules/strptime: New file.
381         * lib/strptime.h: New file.
382         * lib/strptime.c: New file.
383         * m4/strptime.m4: New file.
384
385 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
386
387         * MODULES.html.sh: New module mpsort.
388         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
389
390         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
391         a circularity problem with HP-UX ia64 reported by Bob Proulx in
392         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
393         All uses changed.
394         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
395         All uses changed.
396         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
397         to _Restrict_.
398         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
399         the parameter matches the prototype.
400
401 2007-01-28  Jim Meyering  <jim@meyering.net>
402
403         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
404         sys/time.h here, reverting that part of the previous patch:
405         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
406
407 2007-01-28  Bruno Haible  <bruno@clisp.org>
408
409         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
410         value of $(SYS_TIME_H).
411         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
412         remove it conditionally, too. [added by Jim Meyering]
413         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
414         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
415         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
416         GETTIMEOFDAY_REPLACEMENT to 1.
417
418 2007-01-28  Bruno Haible  <bruno@clisp.org>
419
420         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
421         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
422         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
423         Set UNISTD_H instead of UNISTD_H2.
424         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
425
426 2007-01-28  Bruno Haible  <bruno@clisp.org>
427
428         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
429         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
430
431 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
432
433         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
434         (func_create_testdir): Ensure C locale for `grep' and `tr'
435         character ranges.
436         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
437         ACLOCAL_AMFLAGS parsing state machine.
438
439 2007-01-27  Bruno Haible  <bruno@clisp.org>
440
441         * modules/unistr/base: Update.
442
443 2007-01-27  Bruno Haible  <bruno@clisp.org>
444
445         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
446         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
447         * modules/unistr/u32-mbtouc-unsafe: Renamed from
448         modules/unistr/u32-mbtouc.
449         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
450         * lib/unistr.h: Update.
451         * lib/linebreak.c: Update.
452         * modules/unistr/u32-mbtouc: Renamed from
453         modules/unistr/u32-mbtouc-safe.
454         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
455         * lib/unistr.h: Update.
456         * lib/unistr/u32-to-u8.c: Update.
457         * lib/unistr/u32-to-u16.c: Update.
458
459 2007-01-27  Bruno Haible  <bruno@clisp.org>
460
461         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
462         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
463         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
464         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
465         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
466         * modules/unistr/u16-mbtouc-unsafe: Renamed from
467         modules/unistr/u16-mbtouc.
468         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
469         * lib/unistr.h: Update.
470         * lib/linebreak.c: Update.
471         * modules/linebreak: Update.
472         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
473         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
474         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
475         * modules/unistr/u16-mbtouc: Renamed from
476         modules/unistr/u16-mbtouc-safe.
477         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
478         * lib/unistr.h: Update.
479         * lib/unistr/u16-to-u8.c: Update.
480         * modules/unistr/u16-to-u8: Update.
481         * lib/unistr/u16-to-u32.c: Update.
482         * modules/unistr/u16-to-u32: Update.
483
484 2007-01-27  Bruno Haible  <bruno@clisp.org>
485
486         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
487         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
488         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
489         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
490         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
491         * modules/unistr/u8-mbtouc-unsafe: Renamed from
492         modules/unistr/u8-mbtouc.
493         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
494         * lib/unistr.h: Update.
495         * lib/striconveh.c: Update.
496         * modules/striconveh: Update.
497         * lib/linebreak.c: Update.
498         * modules/linebreak: Update.
499         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
500         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
501         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
502         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
503         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
504         * lib/unistr.h: Update.
505         * lib/striconveh.c: Update.
506         * modules/striconveh: Update.
507         * lib/unistr/u8-to-u16.c: Update.
508         * modules/unistr/u8-to-u16: Update.
509         * lib/unistr/u8-to-u32.c: Update.
510         * modules/unistr/u8-to-u32: Update.
511
512 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
513
514         Sync from Libtool.
515         * lib/argz.c: Do not include strings.h nor memory.h, include
516         string.h unconditionally.  Patch by Simon Josefsson.
517
518 2007-01-27  Bruno Haible  <bruno@clisp.org>
519
520         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
521         from gl_HEADER_STRING_H_BODY.
522         (gl_HEADER_STRING_H_BODY): Require it.
523         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
524         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
525         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
526         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
527         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
528         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
529         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
530         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
531         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
532         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
533         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
534         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
535         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
536         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
537         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
538
539 2007-01-27  Bruno Haible  <bruno@clisp.org>
540
541         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
542         check_PROGRAMS into noinst_PROGRAMS.
543         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
544         check_PROGRAMS in this case.
545         (func_import): Set for_test to false.
546         (func_create_testdir): Set for_test to true.
547
548 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
549             Bruno Haible  <bruno@clisp.org>
550
551         * modules/strcasestr (Files): Remove lib/strcasestr.h.
552         (Depends-on): Add string.
553         (Includes): Use <string.h> instead of strcasestr.h.
554         * modules/string (Makefile.am): Also substitute the value of
555         REPLACE_STRCASESTR.
556         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
557         assume strcasestr is declared in <string.h> not <strings.h>. Also
558         set REPLACE_STRCASESTR.
559         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
560         REPLACE_STRCASESTR.
561         * lib/strcasestr.h: Remove file.
562         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
563         * lib/string_.h (strcasestr): New declaration.
564
565 2007-01-27  Bruno Haible  <bruno@clisp.org>
566
567         * lib/string_.h: Use 'extern'.
568
569 2007-01-27  Jim Meyering  <jim@meyering.net>
570
571         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
572         of set-but-not-used local, "q".
573
574         * lib/mempcpy.c: Include <config.h> before <string.h>.
575         This fixes a compilation error on HP-UX, due to the system's
576         "restrict"-using mempcpy prototype.
577
578 2007-01-26  Bruno Haible  <bruno@clisp.org>
579
580         Small optimization.
581         * lib/javacomp.c: Include c-strstr.h.
582          (is_envjavac_gcj): Use c_strstr instead of strstr.
583         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
584
585 2007-01-26  Bruno Haible  <bruno@clisp.org>
586
587         * MODULES.html.sh (Unicode string functions): Add the new modules.
588
589         * modules/uniconv/u32-strconv-to-locale: New file.
590         * lib/uniconv/u32-strconv-to-locale.c: New file.
591
592         * modules/uniconv/u16-strconv-to-locale: New file.
593         * lib/uniconv/u16-strconv-to-locale.c: New file.
594
595         * modules/uniconv/u8-strconv-to-locale: New file.
596         * lib/uniconv/u8-strconv-to-locale.c: New file.
597
598         * modules/uniconv/u32-strconv-from-locale: New file.
599         * lib/uniconv/u32-strconv-from-locale.c: New file.
600
601         * modules/uniconv/u16-strconv-from-locale: New file.
602         * lib/uniconv/u16-strconv-from-locale.c: New file.
603
604         * modules/uniconv/u8-strconv-from-locale: New file.
605         * lib/uniconv/u8-strconv-from-locale.c: New file.
606
607         * modules/uniconv/u32-strconv-to-enc: New file.
608         * lib/uniconv/u32-strconv-to-enc.c: New file.
609         * modules/uniconv/u32-strconv-to-enc-tests: New file.
610         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
611
612         * modules/uniconv/u16-strconv-to-enc: New file.
613         * lib/uniconv/u16-strconv-to-enc.c: New file.
614         * lib/uniconv/u-strconv-to-enc.h: New file.
615         * modules/uniconv/u16-strconv-to-enc-tests: New file.
616         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
617
618         * modules/uniconv/u8-strconv-to-enc: New file.
619         * lib/uniconv/u8-strconv-to-enc.c: New file.
620         * modules/uniconv/u8-strconv-to-enc-tests: New file.
621         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
622
623         * modules/uniconv/u32-strconv-from-enc: New file.
624         * lib/uniconv/u32-strconv-from-enc.c: New file.
625         * modules/uniconv/u32-strconv-from-enc-tests: New file.
626         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
627
628         * modules/uniconv/u16-strconv-from-enc: New file.
629         * lib/uniconv/u16-strconv-from-enc.c: New file.
630         * modules/uniconv/u16-strconv-from-enc-tests: New file.
631         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
632
633         * modules/uniconv/u8-strconv-from-enc: New file.
634         * lib/uniconv/u8-strconv-from-enc.c: New file.
635         * lib/uniconv/u-strconv-from-enc.h: New file.
636         * modules/uniconv/u8-strconv-from-enc-tests: New file.
637         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
638
639         * modules/uniconv/u32-conv-from-enc: New file.
640         * lib/uniconv/u32-conv-from-enc.c: New file.
641         * modules/uniconv/u32-conv-from-enc-tests: New file.
642         * tests/uniconv/test-u32-conv-from-enc.c: New file.
643
644         * modules/uniconv/u16-conv-from-enc: New file.
645         * lib/uniconv/u16-conv-from-enc.c: New file.
646         * lib/uniconv/u-conv-from-enc.h: New file.
647         * modules/uniconv/u16-conv-from-enc-tests: New file.
648         * tests/uniconv/test-u16-conv-from-enc.c: New file.
649
650         * modules/uniconv/u8-conv-from-enc: New file.
651         * lib/uniconv/u8-conv-from-enc.c: New file.
652         * modules/uniconv/u8-conv-from-enc-tests: New file.
653         * tests/uniconv/test-u8-conv-from-enc.c: New file.
654
655         * modules/uniconv/base: New file.
656         * lib/uniconv.h: New file.
657
658 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
659
660         * doc/gnulib-tool.texi (Initial import): Update to match current
661         behavior with strdup module.
662         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
663         * lib/memmem.h: Remove; all uses removed.  This is now done
664         by <string.h>.
665         * lib/mempcpy.h: Likewise.
666         * lib/memrchr.h: Likewise.
667         * lib/stpcpy.h: Likewise.
668         * lib/stpncpy.h: Likewise.
669         * lib/strcase.h: Likewise.
670         * lib/strchrnul.h: Likewise.
671         * lib/strdup.h: Likewise.
672         * lib/strndup.h: Likewise.
673         * lib/strnlen.h: Likewise.
674         * lib/strpbrk.h: Likewise.
675         * lib/strsep.h: Likewise.
676         * lib/strstr.h: Likewise.
677         * lib/strtok_r.h: Likewise.
678         * lib/string_.h: New file.
679         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
680         Rely on <string.h> instead.
681         * lib/canon-host.c: Likewise.
682         * lib/chdir-long.c: Likewise.
683         * lib/concatpath.c: Likewise.
684         * lib/exclude.c: Likewise.
685         * lib/fchdir.c: Likewise.
686         * lib/getaddrinfo.c: Likewise.
687         * lib/getcwd.c: Likewise.
688         * lib/getsubopt.c: Likewise.
689         * lib/glob.c: Likewise.
690         * lib/hard-locale.c: Likewise.
691         * lib/iconvme.c: Likewise.
692         * lib/javacomp.c: Likewise.
693         * lib/mempcpy.c: Likewise.
694         * lib/memrchr.c: Likewise.
695         * lib/regex_internal.h: Likewise.
696         * lib/stpncpy.c: Likewise.
697         * lib/strcasecmp.c: Likewise.
698         * lib/strchrnul.c: Likewise.
699         * lib/strdup.c: Likewise.
700         * lib/striconv.c: Likewise.
701         * lib/striconveh.c: Likewise.
702         * lib/striconveha.c: Likewise.
703         * lib/strncasecmp.c: Likewise.
704         * lib/strndup.c: Likewise.
705         * lib/strnlen.c: Likewise.
706         * lib/strsep.c: Likewise.
707         * lib/strstr.c: Likewise.
708         * lib/strtok_r.c: Likewise.
709         * lib/userspec.c: Likewise.
710         * lib/w32spawn.h: Likewise.
711         * lib/xstrndup.c: Likewise.
712         * lib/mountlist.c (strstr): Remove decl.
713         * m4/string_h.m4: New file.
714         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
715         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
716         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
717         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
718         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
719         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
720         Set REPLACE_STRCASECMP if necessary.
721         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
722         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
723         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
724         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
725         HAVE_DECL_STRDUP if necessary.
726         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
727         since gl_FUNC_STRNDUP does that now.
728         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
729         Check for decl here...
730         (gl_PREREQ_STRNLEN): ... not here.
731         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
732         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
733         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
734         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
735         necessary.
736         * modules/string: New file.
737         * modules/memmem (Files): Remove special-purpose include file.
738         (Depends-on): Add string.
739         (Include): Include <string.h>, not the removed file.
740         * modules/mempcpy: Likewise.
741         * modules/memrchr: Likewise.
742         * modules/stpcpy: Likewise.
743         * modules/stpncpy: Likewise.
744         * modules/strcase: Likewise.
745         * modules/strchrnul: Likewise.
746         * modules/strdup: Likewise.
747         * modules/strndup: Likewise.
748         * modules/strnlen: Likewise.
749         * modules/strpbrk: Likewise.
750         * modules/strsep: Likewise.
751         * modules/strstr: Likewise.
752         * modules/strtok_r: Likewise.
753         * tests/test-dirname.c: Don't include "strdup.h", since
754         <string.h> now suffices.
755         * tests/test-memmem.c: Don't include "memmem.h", since
756         <string.h> now suffices.
757
758 2007-01-25  Bruno Haible  <bruno@clisp.org>
759
760         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
761         *resultp is 0.
762
763         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
764         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
765         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
766         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
767
768         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
769         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
770         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
771         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
772         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
773         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
774
775 2007-01-24  Bruno Haible  <bruno@clisp.org>
776
777         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
778         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
779         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
780         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
781         gl_FUNC_FTS_CORE.
782         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
783         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
784         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
785         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
786         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
787         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
788         gl_FUNC_FCHOWNAT.
789         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
790         gl_FUNC_STRFTIME.
791         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
792         Reported by Ralf Wildenhues.
793
794 2007-01-24  Bruno Haible  <bruno@clisp.org>
795
796         Drop AC_REQUIRE calls that are redundant with the module dependencies.
797         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
798         gl_GETADDRINFO.
799         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
800         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
801         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
802
803 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
804
805         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
806         Don't use 'exit'; just return from 'main'.
807         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
808
809         * lib/fnmatch_.h: Readjust white space and comments to match
810         glibc, to avoid spurious diffs.
811
812 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
813
814         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
815         2004-12-01 change by Jakub Jelinek, since this code won't compile
816         if !LIBC.  Problem reported by Bob Proulx.
817
818 2007-01-23  Bruno Haible  <bruno@clisp.org>
819
820         * lib/striconveh.c: Include c-strcaseeq.h.
821         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
822         * modules/striconveh (Depends-on): Add c-strcaseeq.
823
824 2007-01-23  Bruno Haible  <bruno@clisp.org>
825
826         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
827
828         * modules/c-strcaseeq: New file.
829         * lib/c-strcaseeq.h: New file.
830
831         * modules/streq: New file.
832         * lib/streq.h: New file.
833
834 2007-01-23  Bruno Haible  <bruno@clisp.org>
835
836         * modules/striconveha-tests: New file.
837         * tests/test-striconveha.c: New file.
838
839         * lib/striconveha.h: Include <stdbool.h>.
840         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
841         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
842         (mem_iconveha_notranslit): Renamed from mem_iconveha.
843         (mem_iconveha): New function.
844         (str_iconveha_notranslit): Renamed from str_iconveha.
845         (str_iconveha): New function.
846         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
847         c-strcase.
848
849 2007-01-23  Bruno Haible  <bruno@clisp.org>
850
851         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
852         encodings without forgiving before trying any encoding with handler.
853         (str_iconveha): Try all encodings without forgiving before trying any
854         encoding with handler.
855
856 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
857
858         Import the following changes from libc.
859
860         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
861
862         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
863
864         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
865
866         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
867         normal_bracket label.
868
869         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
870
871         [BZ #361]
872         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
873         to normal_bracket after fetching the next character.
874
875 2007-01-22  Bruno Haible  <bruno@clisp.org>
876
877         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
878         argument.
879         * lib/striconveh.c (iconv_carefully_1): New function.
880         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
881         argument.
882         (str_cd_iconveh): Update.
883         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
884         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
885         * tests/test-striconveh.c (MAGIC): New macro.
886         (new_offsets): New function.
887         (main): Test call with and without offsets.
888
889 2007-01-22  Bruno Haible  <bruno@clisp.org>
890
891         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
892         * modules/sys_select (Makefile.am): Likewise.
893         * modules/sys_socket (Makefile.am): Likewise.
894         * modules/sys_time (Makefile.am): Likewise.
895
896 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
897
898         * modules/gettimeofday (License): Change from GPL to LGPL, since
899         gettimeofday is a library function.
900
901 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
902
903         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
904
905 2007-01-21  Bruno Haible  <bruno@clisp.org>
906
907         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
908
909 2007-01-21  Bruno Haible  <bruno@clisp.org>
910
911         * modules/striconveha: New file.
912         * lib/striconveha.h: New file.
913         * lib/striconveha.c: New file.
914         * MODULES.html.sh (Internationalization functions): Add striconveha.
915         * lib/striconv.c (str_iconv): Optimize the case of an empty input
916         string.
917         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
918
919 2007-01-21  Bruno Haible  <bruno@clisp.org>
920
921         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
922         * lib/striconveh.c (str_iconveh): Likewise.
923
924 2007-01-21  Bruno Haible  <bruno@clisp.org>
925
926         * lib/striconveh.h (mem_iconveh): New declaration.
927         * lib/striconveh.c (mem_iconveh): New function.
928         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
929
930 2007-01-21  Bruno Haible  <bruno@clisp.org>
931
932         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
933
934         * lib/striconveh.h (mem_cd_iconveh): Change specification.
935         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
936         original result buffer.
937         (str_cd_iconveh): Update.
938         * tests/test-striconveh.c (main): Update.
939
940         * lib/striconv.h (mem_cd_iconv): Change specification.
941         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
942         result buffer.
943         (str_cd_iconv): Update.
944         * tests/test-striconv.c (main): Update.
945
946 2007-01-21  Bruno Haible  <bruno@clisp.org>
947
948         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
949
950 2007-01-20  Jim Meyering  <jim@meyering.net>
951
952         * lib/userspec.c (parse_with_separator): If a user or group string
953         starts with "+", skip the corresponding name-to-ID look-up, since
954         such a look-up must fail: user and group names may not include "+".
955
956 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
957
958         * lib/poll.c: Include sys/time.h and time.h unconditionally,
959         since we now assume the sys_time module.
960         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
961         check for sys/time.h; no longer needed.
962         * modules/poll (Depends-on): Depend on sys_time.
963
964 2007-01-18  Bruno Haible  <bruno@clisp.org>
965
966         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
967         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
968
969         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
970         gettimeofday.
971
972         * tests/test-gettimeofday.c: Include <time.h>.
973         (dummy): Remove variable.
974
975         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
976         gl_HEADER_SYS_TIME_H.
977         (gl_HEADER_SYS_TIME_H): New macro.
978
979         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
980         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
981         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
982         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
983         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
984         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
985         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
986         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
987         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
988         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
989         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
990
991         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
992         last change; it caused a compilation error when cross-compiling to
993         Cygwin.
994
995 2007-01-18  Jim Meyering  <jim@meyering.net>
996
997         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
998         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
999         than the race-prone "test -d sys || mkdir sys".
1000         (configure.ac): Use AC_PROG_MKDIR_P.
1001         * modules/sys_select: Likewise.
1002         * modules/sys_socket: Likewise.
1003         * modules/sys_time: Likewise.
1004
1005 2007-01-18  Eric Blake  <ebb9@byu.net>
1006
1007         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1008         replace gettimeofday.
1009         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1010         name, to avoid infinite recursion.
1011
1012 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1013
1014         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1015         module sys_time.
1016         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1017         assume timespec.h defines struct timeval.
1018         * lib/settime.c: Likewise.
1019         * lib/utimens.c: Likewise.
1020         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1021         since we now assume the gettimeofday module.
1022         * lib/tempname.c (__gen_tempname): Likewise.
1023         * lib/gettimeofday.h: Remove.
1024         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1025         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1026         Include <time.h>, for 'time()'.
1027         (localtime_buffer_addr): Also use this workaround if
1028         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1029         to simplify the uses.  All uses changed.
1030         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1031         that #undef is inside {}, and 'const' follows type name consistently.
1032         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1033         (gettimeofday): Do not use the maximum possible value for
1034         tv->tv_usec, since that might break usages other than ls.c.
1035         Instead, we'll leave ls.c alone.  This undoes today's patch
1036         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1037         we've never observed the problem but might as well keep the
1038         canary.
1039         * lib/nanosleep.c: Include timespec.h first, for interface check.
1040         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1041         now assume the sys_time module.
1042         * lib/tempname.c: Likewise.
1043         * lib/timespec.h: Likewise.
1044         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1045         needed.
1046         * lib/strftime.c: Likewise.
1047         * lib/timespec.h: Likewise.
1048         * lib/posixtm.c: Include posixtm.h first, for interface check.
1049         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1050         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1051         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1052         * lib/sys_time_.h: New file.
1053         * lib/timespec.h (struct timespec): Use long int, not long.
1054         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1055         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1056         Remove obsolescent call to AC_HEADER_TIME.
1057         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1058         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1059         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1060         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1061         Likewise.
1062         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1063         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1064         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1065         into the sys_time module.  Check for gettimeofday just once.
1066         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1067         for gettimeofday signature to just check the signature.  Merely
1068         compile it, since linking doesn't test signature.  Improve test for
1069         whether gettimeofday.o is actually needed.
1070         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1071         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1072         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1073         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1074         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1075         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1076         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1077         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1078         than worrying about sys/time.h.
1079         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1080         Don't bother worrying about TIME_WITH_SYS_TIME.
1081         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1082         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1083         * m4/sys_time_h.m4: New file.
1084         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1085         Don't include sys/time.h.  Return from main rather than exiting.
1086         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1087         all uses changed.
1088         * modules/gethrxtime (Depends-on): Add sys_time.
1089         * modules/gettime (Depends-on): Likewise.
1090         * modules/gettimeofday (Depends-on): Likewise.
1091         * modules/nanosleep (Depends-on): Likewise.
1092         * modules/settime (Depends-on): Likewise.
1093         * modules/tempname (Depends-on): Likewise.
1094         * modules/utimens (Depends-on): Likewise.
1095         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1096         (Include:) Change back to <sys/time.h>.
1097         (Maintainer:) Add self.
1098         * modules/sys_time: New file.
1099         * modules/tempname (Depends-on): Add gettimeofday.
1100         * tests/test-gettimeofday.c: Include <sys/time.h>
1101         rather than gettimeofday.h.
1102
1103 2007-01-17  Bruno Haible  <bruno@clisp.org>
1104
1105         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1106         the license default to GPL.
1107         (func_create_testdir): Don't complain if a module is LGPL and its
1108         tests module depends on GPLed modules.
1109
1110 2007-01-17  Bruno Haible  <bruno@clisp.org>
1111
1112         * lib/gettimeofday.c (gettimeofday): Add code for the case
1113         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1114         maximum possible value for tv->tv_usec, rather than the minimum one.
1115
1116 2005-10-08  Martin Lambers  <marlam@marlam.de>
1117 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1118 2007-01-16  Bruno Haible  <bruno@clisp.org>
1119
1120         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1121         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1122         gl_FUNC_GETTIMEOFDAY.
1123         (Include): Add gettimeofday.h.
1124         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1125         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1126         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1127         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1128         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1129         * lib/gettimeofday.h: New file.
1130         * lib/gettimeofday.c: Include <sys/timeb.h>.
1131         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1132         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1133         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1134         fall back on time().
1135
1136         * tests/test-gettimeofday.c: New file.
1137         * modules/gettimeofday-tests: New file.
1138
1139 2007-01-16  Eric Blake  <ebb9@byu.net>
1140
1141         * modules/fnmatch (Depends-on): Depend on wchar.
1142         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1143         * m4/fnmatch.m4: Likewise.
1144         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1145         * m4/mbchar.m4: Likewise.
1146         * modules/mbswidth (Depends-on): Depend on wchar.
1147         * lib/mbswidth.c: Assume <wchar.h>.
1148         * m4/mbswidth.m4: Likewise.
1149         * modules/quotearg (Depends-on): Depend on wchar.
1150         * lib/quotearg.c: Assume <wchar.h>.
1151         * m4/quotearg.m4: Likewise.
1152         * modules/regex (Depends-on): Depend on wchar.
1153         * lib/regex_internal.h: Assume <wchar.h>.
1154         * m4/regex.m4: Likewise.
1155         * modules/stdint (Depends-on): Depend on wchar.
1156         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1157         * m4/stdint.m4: Likewise.
1158         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1159         * modules/strftime (Depends-on): Depend on wchar.
1160         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1161         * modules/strtol (Depends-on): Depend on wchar.
1162         * lib/strtol.c: Assume <wchar.h>.
1163         * modules/wcwidth (Depends-on): Depend on wchar.
1164         * lib/wcwidth.h: Assume <wchar.h>.
1165         * m4/wcwidth.m4: Likewise.
1166
1167 2007-01-16  Bruno Haible  <bruno@clisp.org>
1168
1169         * modules/csharpexec-script: New, created from...
1170         * modules/csharpexec: ... this.
1171
1172 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1173
1174         * modules/javaexec-script: New, created from...
1175         * modules/javaexec: ... this.
1176
1177 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1178
1179         * modules/poll (Dependencies): Add sys_select.
1180
1181 2007-01-15  Jim Meyering  <jim@meyering.net>
1182
1183         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1184         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1185         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1186         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1187
1188 2007-01-15  Bruno Haible  <bruno@clisp.org>
1189
1190         * modules/striconveh: New file.
1191         * lib/striconveh.h: New file.
1192         * lib/striconveh.c: New file.
1193         * MODULES.html.sh (Internationalization functions): Add striconveh.
1194
1195         * modules/striconveh-tests: New file.
1196         * tests/test-striconveh.c: New file.
1197
1198 2007-01-15  Bruno Haible  <bruno@clisp.org>
1199
1200         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1201         not from GNU libiconv or GNU libc.
1202
1203 2007-01-15  Bruno Haible  <bruno@clisp.org>
1204
1205         * doc/gnulib-intro.texi (Copyright): Explain the different license
1206         terms for module descriptions, autoconf macros, tests, documentation.
1207
1208 2007-01-14  Bruno Haible  <bruno@clisp.org>
1209
1210         * modules/striconv-tests: New file.
1211         * tests/test-striconv.c: New file.
1212
1213 2007-01-14  Bruno Haible  <bruno@clisp.org>
1214
1215         * modules/iconv-tests: New file.
1216         * tests/test-iconv.c: New file.
1217
1218 2007-01-14  Bruno Haible  <bruno@clisp.org>
1219
1220         * gnulib-tool (func_get_license): For test modules, use the license of
1221         the main module.
1222
1223 2007-01-14  Bruno Haible  <bruno@clisp.org>
1224
1225         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1226         if iconv is found to exist.
1227
1228 2007-01-14  Bruno Haible  <bruno@clisp.org>
1229
1230         * modules/c-ctype-tests: New file.
1231         * tests/test-c-ctype.c: New file.
1232
1233 2007-01-14  Bruno Haible  <bruno@clisp.org>
1234
1235         * modules/binary-io-tests: New file.
1236         * tests/test-binary-io.sh: New file.
1237         * tests/test-binary-io.c: New file.
1238
1239 2007-01-14  Bruno Haible  <bruno@clisp.org>
1240
1241         * modules/array-oset-tests: New file.
1242         * tests/test-array_oset.c: New file.
1243
1244 2007-01-14  Bruno Haible  <bruno@clisp.org>
1245
1246         * modules/array-list-tests: New file.
1247         * tests/test-array_list.c: New file.
1248
1249 2007-01-14  Bruno Haible  <bruno@clisp.org>
1250
1251         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1252         and make.
1253         Reported by Simon Josefsson in
1254         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1255
1256 2007-01-14  Bruno Haible  <bruno@clisp.org>
1257
1258         * modules/allocsa-tests: New file.
1259         * tests/test-allocsa.c: New file.
1260
1261 2007-01-14  Bruno Haible  <bruno@clisp.org>
1262
1263         * modules/fchdir (Depends-on): Add absolute-header.
1264         * modules/unistd (Depends-on): Likewise.
1265
1266 2006-12-30  Bruno Haible  <bruno@clisp.org>
1267
1268         * modules/fchdir: New file.
1269         * modules/unistd (Files): Add lib/unistd_.h.
1270         (Makefile.am): Generate unistd.h from unistd_.h.
1271         * lib/fchdir.c: New file.
1272         * lib/dirent_.h: New file.
1273         * lib/unistd_.h: New file.
1274         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1275         * m4/fchdir.m4: New file.
1276         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1277         (gl_HEADER_UNISTD): Invoke it.
1278         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1279         function.
1280         * lib/backupfile.c (opendir, closedir): Undefine.
1281         * lib/chown.c (open, close): Undefine.
1282         * lib/clean-temp.c (open, close): Undefine.
1283         * lib/copy-file.c (open, close): Undefine.
1284         * lib/execute.c (open, close): Undefine.
1285         * lib/fsusage.c (open, close): Undefine.
1286         * lib/gc-gnulib.c (open, close): Undefine.
1287         * lib/getcwd.c (opendir, closedir): Undefine.
1288         * lib/glob.c (opendir, closedir): Undefine.
1289         * lib/javacomp.c (open, close): Undefine.
1290         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1291         * lib/openat-proc.c (open, close): Undefine.
1292         * lib/pagealign_alloc.c (open, close): Undefine.
1293         * lib/pipe.c (open, close): Undefine.
1294         * lib/progreloc.c (open, close): Undefine.
1295         * lib/savedir.c (opendir, closedir): Undefine.
1296         * lib/utime.c (open, close): Undefine.
1297         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1298
1299 2007-01-10  Bruno Haible  <bruno@clisp.org>
1300
1301         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1302
1303 2007-01-12  Eric Blake  <ebb9@byu.net>
1304
1305         Provide a robust <wchar.h>.  Further simplifications are now
1306         possible in other modules, but not included here.
1307         * modules/wchar: New module.
1308         * m4/wchar.m4: New file.
1309         * lib/wchar_.h: Likewise.
1310         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1311         of the new module.
1312         * MODULES.html.sh (Extended multibyte and wide character utilities):
1313         New section.
1314
1315 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1316
1317         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1318         to a reasonable default for memory allocation.
1319         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1320         file system that reports garbage st_size values for symlinks.
1321         Problem reported by Liyang Hu.
1322
1323 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1324
1325         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1326         Emacs .#* auto-save files).
1327
1328 2007-01-11  Bruno Haible  <bruno@clisp.org>
1329
1330         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1331         directory.
1332
1333 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1334
1335         Use @...@ consistently in lib/wctype_.h.
1336         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1337         on it being set to 1 or 0.
1338         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1339         go back to AC_SUBSTing it.
1340         * modules/wctype (Makefile.am): Undo previous change.
1341
1342 2007-01-10  Eric Blake  <ebb9@byu.net>
1343
1344         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1345         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1346         * modules/wctype (Makefile.am): Likewise.
1347         Reported by Chris McGuire.
1348
1349 2007-01-10  Jim Meyering  <jim@meyering.net>
1350
1351         fts.c: a small readability/maintainability improvement
1352         * lib/fts.c (fts_read): Make this code slightly more readable and
1353         maintainable by hoisting the "sp->fts_cur = p" assignments to
1354         immediately follow the statements that set P.  Derived from
1355         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1356
1357 2007-01-10  Eric Blake  <ebb9@byu.net>
1358
1359         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1360         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1361         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1362         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1363         Reported by Chris McGuire.
1364
1365 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1366
1367         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1368         in sed script.
1369
1370 2007-01-09  Bruno Haible  <bruno@clisp.org>
1371
1372         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1373         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1374         variables.
1375         (func_module): Use them.
1376
1377 2007-01-09  Bruno Haible  <bruno@clisp.org>
1378
1379         * modules/unistr/base: New file.
1380         * lib/unistr.h: New file.
1381
1382         * modules/unistr/u8-to-u16: New file.
1383         * lib/unistr/u8-to-u16.c: New file.
1384
1385         * modules/unistr/u8-to-u32: New file.
1386         * lib/unistr/u8-to-u32.c: New file.
1387
1388         * modules/unistr/u16-to-u8: New file.
1389         * lib/unistr/u16-to-u8.c: New file.
1390
1391         * modules/unistr/u16-to-u32: New file.
1392         * lib/unistr/u16-to-u32.c: New file.
1393
1394         * modules/unistr/u32-to-u8: New file.
1395         * lib/unistr/u32-to-u8.c: New file.
1396
1397         * modules/unistr/u32-to-u16: New file.
1398         * lib/unistr/u32-to-u16.c: New file.
1399
1400         * modules/unistr/u8-check: New file.
1401         * modules/unistr/u16-check: New file.
1402         * modules/unistr/u32-check: New file.
1403         * lib/unistr/u8-check.c: New file.
1404         * lib/unistr/u16-check.c: New file.
1405         * lib/unistr/u32-check.c: New file.
1406
1407         * modules/unistr/u8-chr: New file.
1408         * modules/unistr/u16-chr: New file.
1409         * modules/unistr/u32-chr: New file.
1410         * lib/unistr/u8-chr.c: New file.
1411         * lib/unistr/u16-chr.c: New file.
1412         * lib/unistr/u32-chr.c: New file.
1413
1414         * modules/unistr/u8-cmp: New file.
1415         * modules/unistr/u16-cmp: New file.
1416         * modules/unistr/u32-cmp: New file.
1417         * lib/unistr/u8-cmp.c: New file.
1418         * lib/unistr/u16-cmp.c: New file.
1419         * lib/unistr/u32-cmp.c: New file.
1420
1421         * modules/unistr/u8-cpy: New file.
1422         * modules/unistr/u16-cpy: New file.
1423         * modules/unistr/u32-cpy: New file.
1424         * lib/unistr/u8-cpy.c: New file.
1425         * lib/unistr/u16-cpy.c: New file.
1426         * lib/unistr/u32-cpy.c: New file.
1427         * lib/unistr/u-cpy.h: New file.
1428
1429         * modules/unistr/u8-cpy-alloc: New file.
1430         * modules/unistr/u16-cpy-alloc: New file.
1431         * modules/unistr/u32-cpy-alloc: New file.
1432         * lib/unistr/u8-cpy-alloc.c: New file.
1433         * lib/unistr/u16-cpy-alloc.c: New file.
1434         * lib/unistr/u32-cpy-alloc.c: New file.
1435         * lib/unistr/u-cpy-alloc.h: New file.
1436
1437         * modules/unistr/u8-endswith: New file.
1438         * modules/unistr/u16-endswith: New file.
1439         * modules/unistr/u32-endswith: New file.
1440         * lib/unistr/u8-endswith.c: New file.
1441         * lib/unistr/u16-endswith.c: New file.
1442         * lib/unistr/u32-endswith.c: New file.
1443         * lib/unistr/u-endswith.h: New file.
1444
1445         * modules/unistr/u8-mblen: New file.
1446         * modules/unistr/u16-mblen: New file.
1447         * modules/unistr/u32-mblen: New file.
1448         * lib/unistr/u8-mblen.c: New file.
1449         * lib/unistr/u16-mblen.c: New file.
1450         * lib/unistr/u32-mblen.c: New file.
1451
1452         * modules/unistr/u8-mbtouc: New file.
1453         * modules/unistr/u16-mbtouc: New file.
1454         * modules/unistr/u32-mbtouc: New file.
1455         * lib/unistr/u8-mbtouc.c: New file.
1456         * lib/unistr/u16-mbtouc.c: New file.
1457         * lib/unistr/u32-mbtouc.c: New file.
1458
1459         * modules/unistr/u8-mbtouc-safe: New file.
1460         * modules/unistr/u16-mbtouc-safe: New file.
1461         * modules/unistr/u32-mbtouc-safe: New file.
1462         * lib/unistr/u8-mbtouc-safe.c: New file.
1463         * lib/unistr/u16-mbtouc-safe.c: New file.
1464         * lib/unistr/u32-mbtouc-safe.c: New file.
1465
1466         * modules/unistr/u8-move: New file.
1467         * modules/unistr/u16-move: New file.
1468         * modules/unistr/u32-move: New file.
1469         * lib/unistr/u8-move.c: New file.
1470         * lib/unistr/u16-move.c: New file.
1471         * lib/unistr/u32-move.c: New file.
1472         * lib/unistr/u-move.h: New file.
1473
1474         * modules/unistr/u8-next: New file.
1475         * modules/unistr/u16-next: New file.
1476         * modules/unistr/u32-next: New file.
1477         * lib/unistr/u8-next.c: New file.
1478         * lib/unistr/u16-next.c: New file.
1479         * lib/unistr/u32-next.c: New file.
1480
1481         * modules/unistr/u8-prev: New file.
1482         * modules/unistr/u16-prev: New file.
1483         * modules/unistr/u32-prev: New file.
1484         * lib/unistr/u8-prev.c: New file.
1485         * lib/unistr/u16-prev.c: New file.
1486         * lib/unistr/u32-prev.c: New file.
1487
1488         * modules/unistr/u8-set: New file.
1489         * modules/unistr/u16-set: New file.
1490         * modules/unistr/u32-set: New file.
1491         * lib/unistr/u8-set.c: New file.
1492         * lib/unistr/u16-set.c: New file.
1493         * lib/unistr/u32-set.c: New file.
1494         * lib/unistr/u-set.h: New file.
1495
1496         * modules/unistr/u8-startswith: New file.
1497         * modules/unistr/u16-startswith: New file.
1498         * modules/unistr/u32-startswith: New file.
1499         * lib/unistr/u8-startswith.c: New file.
1500         * lib/unistr/u16-startswith.c: New file.
1501         * lib/unistr/u32-startswith.c: New file.
1502         * lib/unistr/u-startswith.h: New file.
1503
1504         * modules/unistr/u8-stpcpy: New file.
1505         * modules/unistr/u16-stpcpy: New file.
1506         * modules/unistr/u32-stpcpy: New file.
1507         * lib/unistr/u8-stpcpy.c: New file.
1508         * lib/unistr/u16-stpcpy.c: New file.
1509         * lib/unistr/u32-stpcpy.c: New file.
1510         * lib/unistr/u-stpcpy.h: New file.
1511
1512         * modules/unistr/u8-stpncpy: New file.
1513         * modules/unistr/u16-stpncpy: New file.
1514         * modules/unistr/u32-stpncpy: New file.
1515         * lib/unistr/u8-stpncpy.c: New file.
1516         * lib/unistr/u16-stpncpy.c: New file.
1517         * lib/unistr/u32-stpncpy.c: New file.
1518         * lib/unistr/u-stpncpy.h: New file.
1519
1520         * modules/unistr/u8-strcat: New file.
1521         * modules/unistr/u16-strcat: New file.
1522         * modules/unistr/u32-strcat: New file.
1523         * lib/unistr/u8-strcat.c: New file.
1524         * lib/unistr/u16-strcat.c: New file.
1525         * lib/unistr/u32-strcat.c: New file.
1526         * lib/unistr/u-strcat.h: New file.
1527
1528         * modules/unistr/u8-strchr: New file.
1529         * modules/unistr/u16-strchr: New file.
1530         * modules/unistr/u32-strchr: New file.
1531         * lib/unistr/u8-strchr.c: New file.
1532         * lib/unistr/u16-strchr.c: New file.
1533         * lib/unistr/u32-strchr.c: New file.
1534
1535         * modules/unistr/u8-strcmp: New file.
1536         * modules/unistr/u16-strcmp: New file.
1537         * modules/unistr/u32-strcmp: New file.
1538         * lib/unistr/u8-strcmp.c: New file.
1539         * lib/unistr/u16-strcmp.c: New file.
1540         * lib/unistr/u32-strcmp.c: New file.
1541
1542         * modules/unistr/u8-strcpy: New file.
1543         * modules/unistr/u16-strcpy: New file.
1544         * modules/unistr/u32-strcpy: New file.
1545         * lib/unistr/u8-strcpy.c: New file.
1546         * lib/unistr/u16-strcpy.c: New file.
1547         * lib/unistr/u32-strcpy.c: New file.
1548         * lib/unistr/u-strcpy.h: New file.
1549
1550         * modules/unistr/u8-strcspn: New file.
1551         * modules/unistr/u16-strcspn: New file.
1552         * modules/unistr/u32-strcspn: New file.
1553         * lib/unistr/u8-strcspn.c: New file.
1554         * lib/unistr/u16-strcspn.c: New file.
1555         * lib/unistr/u32-strcspn.c: New file.
1556         * lib/unistr/u-strcspn.h: New file.
1557
1558         * modules/unistr/u8-strdup: New file.
1559         * modules/unistr/u16-strdup: New file.
1560         * modules/unistr/u32-strdup: New file.
1561         * lib/unistr/u8-strdup.c: New file.
1562         * lib/unistr/u16-strdup.c: New file.
1563         * lib/unistr/u32-strdup.c: New file.
1564         * lib/unistr/u-strdup.h: New file.
1565
1566         * modules/unistr/u8-strlen: New file.
1567         * modules/unistr/u16-strlen: New file.
1568         * modules/unistr/u32-strlen: New file.
1569         * lib/unistr/u8-strlen.c: New file.
1570         * lib/unistr/u16-strlen.c: New file.
1571         * lib/unistr/u32-strlen.c: New file.
1572         * lib/unistr/u-strlen.h: New file.
1573
1574         * modules/unistr/u8-strmblen: New file.
1575         * modules/unistr/u16-strmblen: New file.
1576         * modules/unistr/u32-strmblen: New file.
1577         * lib/unistr/u8-strmblen.c: New file.
1578         * lib/unistr/u16-strmblen.c: New file.
1579         * lib/unistr/u32-strmblen.c: New file.
1580
1581         * modules/unistr/u8-strmbtouc: New file.
1582         * modules/unistr/u16-strmbtouc: New file.
1583         * modules/unistr/u32-strmbtouc: New file.
1584         * lib/unistr/u8-strmbtouc.c: New file.
1585         * lib/unistr/u16-strmbtouc.c: New file.
1586         * lib/unistr/u32-strmbtouc.c: New file.
1587
1588         * modules/unistr/u8-strncat: New file.
1589         * modules/unistr/u16-strncat: New file.
1590         * modules/unistr/u32-strncat: New file.
1591         * lib/unistr/u8-strncat.c: New file.
1592         * lib/unistr/u16-strncat.c: New file.
1593         * lib/unistr/u32-strncat.c: New file.
1594         * lib/unistr/u-strncat.h: New file.
1595
1596         * modules/unistr/u8-strncmp: New file.
1597         * modules/unistr/u16-strncmp: New file.
1598         * modules/unistr/u32-strncmp: New file.
1599         * lib/unistr/u8-strncmp.c: New file.
1600         * lib/unistr/u16-strncmp.c: New file.
1601         * lib/unistr/u32-strncmp.c: New file.
1602
1603         * modules/unistr/u8-strncpy: New file.
1604         * modules/unistr/u16-strncpy: New file.
1605         * modules/unistr/u32-strncpy: New file.
1606         * lib/unistr/u8-strncpy.c: New file.
1607         * lib/unistr/u16-strncpy.c: New file.
1608         * lib/unistr/u32-strncpy.c: New file.
1609         * lib/unistr/u-strncpy.h: New file.
1610
1611         * modules/unistr/u8-strnlen: New file.
1612         * modules/unistr/u16-strnlen: New file.
1613         * modules/unistr/u32-strnlen: New file.
1614         * lib/unistr/u8-strnlen.c: New file.
1615         * lib/unistr/u16-strnlen.c: New file.
1616         * lib/unistr/u32-strnlen.c: New file.
1617         * lib/unistr/u-strnlen.h: New file.
1618
1619         * modules/unistr/u8-strpbrk: New file.
1620         * modules/unistr/u16-strpbrk: New file.
1621         * modules/unistr/u32-strpbrk: New file.
1622         * lib/unistr/u8-strpbrk.c: New file.
1623         * lib/unistr/u16-strpbrk.c: New file.
1624         * lib/unistr/u32-strpbrk.c: New file.
1625         * lib/unistr/u-strpbrk.h: New file.
1626
1627         * modules/unistr/u8-strrchr: New file.
1628         * modules/unistr/u16-strrchr: New file.
1629         * modules/unistr/u32-strrchr: New file.
1630         * lib/unistr/u8-strrchr.c: New file.
1631         * lib/unistr/u16-strrchr.c: New file.
1632         * lib/unistr/u32-strrchr.c: New file.
1633
1634         * modules/unistr/u8-strspn: New file.
1635         * modules/unistr/u16-strspn: New file.
1636         * modules/unistr/u32-strspn: New file.
1637         * lib/unistr/u8-strspn.c: New file.
1638         * lib/unistr/u16-strspn.c: New file.
1639         * lib/unistr/u32-strspn.c: New file.
1640         * lib/unistr/u-strspn.h: New file.
1641
1642         * modules/unistr/u8-strstr: New file.
1643         * modules/unistr/u16-strstr: New file.
1644         * modules/unistr/u32-strstr: New file.
1645         * lib/unistr/u8-strstr.c: New file.
1646         * lib/unistr/u16-strstr.c: New file.
1647         * lib/unistr/u32-strstr.c: New file.
1648         * lib/unistr/u-strstr.h: New file.
1649
1650         * modules/unistr/u8-strtok: New file.
1651         * modules/unistr/u16-strtok: New file.
1652         * modules/unistr/u32-strtok: New file.
1653         * lib/unistr/u8-strtok.c: New file.
1654         * lib/unistr/u16-strtok.c: New file.
1655         * lib/unistr/u32-strtok.c: New file.
1656         * lib/unistr/u-strtok.h: New file.
1657
1658         * modules/unistr/u8-uctomb: New file.
1659         * modules/unistr/u16-uctomb: New file.
1660         * modules/unistr/u32-uctomb: New file.
1661         * lib/unistr/u8-uctomb.c: New file.
1662         * lib/unistr/u16-uctomb.c: New file.
1663         * lib/unistr/u32-uctomb.c: New file.
1664
1665         * MODULES.html.sh (Unicode string functions): Add the new modules.
1666
1667 2007-01-08  Bruno Haible  <bruno@clisp.org>
1668
1669         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1670         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1671         subdirectories.
1672
1673 2007-01-08  Karl Berry  <karl@gnu.org>
1674
1675         * doc/error.texi: mention that main() fns must set program_name
1676         when progname is used.
1677
1678 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1679
1680         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1681         WCTYPE_H is empty, for the benefit of builds from non-distclean
1682         directories.  Problem reported by Eric Blake in
1683         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1684
1685 2007-01-08  Bruno Haible  <bruno@clisp.org>
1686
1687         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1688         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1689         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1690         PROVIDE_CANONICALIZE_FILENAME_MODE.
1691         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1692
1693 2007-01-08  Bruno Haible  <bruno@clisp.org>
1694
1695         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1696         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1697         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1698         * lib/fts.c: Likewise.
1699         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1700
1701 2006-12-25  Bruno Haible  <bruno@clisp.org>
1702
1703         * modules/utf8-ucs4-safe: New file.
1704         * lib/utf8-ucs4-safe.h: New file.
1705         * lib/unistr/utf8-ucs4-safe.c: New file.
1706
1707         * modules/utf16-ucs4-safe: New file.
1708         * lib/utf16-ucs4-safe.h: New file.
1709         * lib/unistr/utf16-ucs4-safe.c: New file.
1710
1711         * MODULES.html.sh (Unicode string functions): Add the new modules.
1712
1713 2007-01-08  Bruno Haible  <bruno@clisp.org>
1714
1715         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1716         (Depends-on): Add unitypes.
1717         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1718         (u8_mbtouc_aux): Move out to separate file.
1719         (u8_mbtouc): Use ucs4_t, uint8_t types.
1720         * lib/unistr/utf8-ucs4.c: New file.
1721
1722         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1723         (Depends-on): Add unitypes.
1724         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1725         (u16_mbtouc_aux): Move out to separate file.
1726         (u16_mbtouc): Use ucs4_t, uint16_t types.
1727         * lib/unistr/utf16-ucs4.c: New file.
1728
1729         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1730         (Depends-on): Add unitypes.
1731         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1732         (u8_uctomb_aux): Move out to separate file.
1733         (u8_uctomb): Use ucs4_t, uint8_t types.
1734         * lib/unistr/ucs4-utf8.c: New file.
1735
1736         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1737         (Depends-on): Add unitypes.
1738         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1739         (u16_uctomb_aux): Move out to separate file.
1740         (u16_uctomb): Use ucs4_t, uint16_t types.
1741         * lib/unistr/ucs4-utf16.c: New file.
1742
1743 2006-12-25  Bruno Haible  <bruno@clisp.org>
1744
1745         * modules/unitypes: New file.
1746         * lib/unitypes.h: New file.
1747         * MODULES.html.sh (func_all_modules): New section "Unicode string
1748         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1749         this section. Add unitypes.
1750
1751 2007-01-08  Bruno Haible  <bruno@clisp.org>
1752
1753         Avoid variable names that conflict with those from libtool.
1754         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1755         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1756         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1757         library_names_spec to acl_library_names_spec, hardcode_* to
1758         acl_hardcode_*.
1759         Reported by Ralf Wildenhues.
1760
1761 2007-01-08  Bruno Haible  <bruno@clisp.org>
1762
1763         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1764         definition.
1765         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1766         definition.
1767         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1768         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1769         definition.
1770         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1771         definition.
1772         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1773         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1774         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1775         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1776         definition.
1777         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1778         definition.
1779         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1780         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1781         GC_USE_<algorithm>.
1782         * lib/gc-libgcrypt.c: Likewise.
1783         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1784         * modules/gc-arctwo (configure.ac): Likewise.
1785         * modules/gc-des (configure.ac): Likewise.
1786         * modules/gc-hmac-md5 (configure.ac): Likewise.
1787         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1788         * modules/gc-md2 (configure.ac): Likewise.
1789         * modules/gc-md4 (configure.ac): Likewise.
1790         * modules/gc-md5 (configure.ac): Likewise.
1791         * modules/gc-random (configure.ac): Likewise.
1792         * modules/gc-rijndael (configure.ac): Likewise.
1793         * modules/gc-sha1 (configure.ac): Likewise.
1794
1795 2007-01-08  Bruno Haible  <bruno@clisp.org>
1796
1797         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1798         macro definition.
1799         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1800         definition.
1801         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1802         definition.
1803         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1804         * modules/fcntl-safer (configure.ac): Likewise.
1805         * modules/fopen-safer (configure.ac): Likewise.
1806         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1807         GNULIB_FWRITEERROR macro definition.
1808
1809 2007-01-08  Bruno Haible  <bruno@clisp.org>
1810
1811         * m4/gnulib-common.m4: New file.
1812         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1813         (func_get_filelist): Add m4/gnulib-common.m4.
1814
1815 2007-01-08  Bruno Haible  <bruno@clisp.org>
1816
1817         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1818         command.
1819
1820 2007-01-08  Jim Meyering  <jim@meyering.net>
1821
1822         Use a more robust test for a "can't happen" condition.
1823         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1824         narrowed the st_size value.  Presuming the "can't happen" condition
1825         is true, that narrowing could conceivably convert an invalid st_size
1826         value into a valid one.  Instead, use a change based on Matthew
1827         Woehlke's original patch.
1828
1829         Slight readability improvement: use an assert-like macro
1830         in place of literal "abort ()" uses.
1831         * lib/fts.c (fts_assert): Define.
1832         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1833         Use this macro instead of a bare 'abort'.
1834
1835 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1836
1837         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1838         simply work around them.
1839         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1840         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1841         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1842         Don't bother to define as macros, since the standard doesn't require it.
1843         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1844         longer worry about IRIX 5.3.
1845         (HAVE_WCTYPE_CTMP_BUG): Remove.
1846
1847 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1848
1849         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1850         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1851         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1852         Problems reported by Georg Schwarz for IRIX 5.3.
1853
1854         * gnulib-tool (autoconf_minversion): Take the maximum version number
1855         found, not the minimum.  Problem reported by James Youngman.
1856
1857 2007-01-03  Karl Berry  <karl@gnu.org>
1858
1859         * doc/error.texi: new file, explaining interaction with progname.
1860         * doc/gnulib.texi: include it.  Update copyright.
1861
1862 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1863
1864         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1865         AC_CANONICAL_HOST, to improve autobuild outputs.
1866
1867 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1868             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1869
1870         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1871         sockets, server sockets, and other file descriptors.  Count errors
1872         to compute the return value.  Reorder the code a bit to be easier
1873         to follow.  Don't set event bits that were not requested (except
1874         POLLERR and POLLHUP).
1875
1876 2007-01-01  Bruno Haible  <bruno@clisp.org>
1877
1878         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1879
1880 2007-01-03  Jim Meyering  <jim@meyering.net>
1881
1882         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1883
1884 2007-01-02  Bruno Haible  <bruno@clisp.org>
1885
1886         * modules/settime (Include): Require timespec.h.
1887         * modules/nanosleep (Include): Likewise.
1888
1889 2007-01-01  Bruno Haible  <bruno@clisp.org>
1890
1891         * gnulib-tool (func_emit_copyright_notice): Bump year.
1892         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1893
1894 2007-01-01  Bruno Haible  <bruno@clisp.org>
1895
1896         Improve support for OpenBSD.
1897         * build-aux/config.rpath (libname_spec): Export.
1898         (library_names_spec): New variable. Export.
1899         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1900         library_names_spec from the config.rpath output. Locate shared library
1901         through the name pattern in library_names_spec.
1902
1903 2007-01-01  Eric Blake  <ebb9@byu.net>
1904
1905         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1906
1907 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1908
1909         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1910         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1911         assume the C locale, and avoid an "eval" that could cause trouble.
1912         Problem with SORT reported by Bob Proulx.
1913
1914         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1915         Define.  Trivial patch from Henning Nielsen Lund, originally
1916         sent to bug-grep@gnu.org today.
1917
1918 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1919
1920         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1921         struct stat.  Problem reported by Henning Nielsen Lund.
1922         * lib/acl.c: Include acl.h first, to check interface.  Don't
1923         bother to include sys/types.h and sys/stat.h again.
1924
1925 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1926
1927         Import the following change from libc; problem reported by
1928         Sven Verdoolaege.
1929
1930         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1931
1932         [BZ #1373]
1933         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1934
1935 2006-12-28  Jim Meyering  <jim@meyering.net>
1936
1937         * build-aux/announce-gen: Do not assume that the package
1938         builds any of tar.gz, tar.bz2, and .xdelta files.
1939         Suggestion from Simon Josefsson.
1940
1941 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1942
1943         * modules/announce-gen: New file.
1944
1945 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1946
1947         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1948         handles its gotchas now.
1949         * lib/mbswidth.c: Likewise.
1950         * lib/wcwidth.h: Likewise.
1951         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1952         and iswcntrl; the wctype module does this stuff now.
1953         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1954         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1955         * modules/mbchar (Depends-on): Add wctype.
1956         * modules/mbswidth (Depends-on): Likewise.
1957         * modules/wcwidth (Depends-on): Likewise.
1958
1959 2006-12-27  Eric Blake  <ebb9@byu.net>
1960
1961         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1962         module uses more than what <wctype.h> is required to provide.
1963
1964 2006-12-26  Eric Blake  <ebb9@byu.net>
1965
1966         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1967
1968 2006-12-26  Eric Blake  <ebb9@byu.net>
1969
1970         * modules/absolute-header: New module.
1971         * modules/fcntl (Depends-on): Depend on it.
1972         * modules/inttypes (Depends-on): Likewise.
1973         * modules/stdint (Depends-on): Likewise.
1974         * modules/sys_stat (Depends-on): Likewise.
1975         * modules/wctype (Depends-on): Likewise.
1976         * MODULES.html.sh (Support for building libraries and
1977         executables): Document it.
1978
1979 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
1980
1981         * gnulib-tool (SED): Remove, undoing previous change.
1982         The problem was that it broke coreutils on Solaris, because
1983         "sed --posix" leaked into a makefile.
1984         (sed): New alias, if 'alias' and GNU sed.
1985
1986 2006-12-24  Jim Meyering  <jim@meyering.net>
1987
1988         Work around an fchownat bug in glibc-2.4:
1989         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
1990         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
1991         in spite of the -P option.
1992         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
1993         New macros.
1994         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
1995         * modules/openat (Files): Add lib/fchownat.c.
1996         * lib/openat.c (fchownat): Don't define here.  Move to...
1997         * lib/fchownat.c: ...this new file.
1998
1999 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2000
2001         Fix bug reported by Bruno Haible in
2002         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2003         where quotearg.c didn't compile on Mac OS X 10.2 because it
2004         lacks <wchar.h> and wint_t.
2005         * lib/wctype_.h (__wctype_wint_t): New type.
2006         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2007         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2008         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2009         Arg is now of type __wctype_wint_t, not wint_t.
2010         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2011         substitute HAVE_WINT_T.
2012         * modules/wctype (Files): Add m4/wint_t.m4.
2013         (wctype.h): Substitute HAVE_WINT_T.
2014
2015 2006-12-23  Bruno Haible  <bruno@clisp.org>
2016
2017         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2018
2019 2006-12-23  Bruno Haible  <bruno@clisp.org>
2020
2021         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2022         S_ISLNK.
2023         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2024         mingw.
2025
2026 2006-12-22  Bruno Haible  <bruno@clisp.org>
2027
2028         * lib/copy-file.c: Include acl.h.
2029         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2030         Close the file descriptors only after being done with copy_acl.
2031         * modules/copy-file (Depends-on): Add acl.
2032
2033 2006-12-22  Bruno Haible  <bruno@clisp.org>
2034
2035         * gnulib-tool (SED): New variable.
2036         Use $SED instead of sed everywhere.
2037
2038 2006-12-22  Bruno Haible  <bruno@clisp.org>
2039
2040         * modules/no-c++: New file.
2041         * m4/no-c++.m4: New file.
2042         * MODULES.html.sh (Support for building libraries and executables):
2043         Add no-c++.
2044
2045 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2046
2047         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2048         Include <limits.h>, and use its INT_MAX to rewrite the
2049         j loop so that it does not overflow 'int'.  Problem reported by
2050         Ralf Wildenhues in
2051         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2052         Play it safe by shifting left by 1 rather than multiplying by 2,
2053         as GCC is less likely to optimize this away when the value
2054         is signed (when it assumes overflow leads to undefined behavior).
2055         Also, don't assume time_t uses two's complement.
2056
2057 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2058
2059         * MODULES.html.sh: New module wctype.
2060         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2061         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2062         <wctype.h>, since the new wctype module should fix this.
2063         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2064         the wctype module should arrange for it.
2065         * lib/regex_internal.h: Likewise.
2066         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2067         since the wctype module should handle this now.
2068         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2069         * modules/fnmatch (Depends-on): Add wctype.
2070         * modules/quotearg (Depends-on): Likewise.
2071         * modules/regex (Depends-on): Likewise.
2072
2073 2006-12-19  Bruno Haible  <bruno@clisp.org>
2074
2075         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2076         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2077
2078 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2079
2080         * modules/savewd (Depends-on): Fix dependency on fcntl.
2081
2082 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2083
2084         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2085         conforms to C99, rather than relying on the user's environment
2086         setting of STDINT_H.
2087
2088 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2089         and Eric Blake  <ebb9@byu.net>
2090
2091         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2092         This is more consistent with the other defines here.
2093         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2094         Port to z/OS.  Problem reported by Paul Gilmartin.
2095         Change local vars to use gl_ prefix rather than ac_.
2096         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2097         with other defines.
2098         * modules/double-slash-root: New module.
2099         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2100         (Depends-on): Add double-slash-root.
2101         * MODULES.html.sh (File system functions): Mention new module.
2102
2103 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2104
2105         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2106         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2107         This is for the benefit of gzip, which doesn't do i18n.
2108
2109 2006-12-12  Jim Meyering  <jim@meyering.net>
2110
2111         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2112         Reported by Andreas Schwab <schwab@suse.de>.
2113
2114 2006-12-12  Bruno Haible  <bruno@clisp.org>
2115
2116         Merge these changes.
2117         2006-09-05  Bruno Haible  <bruno@clisp.org>
2118         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2119         iconv_alloc succeeded.
2120         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2121         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2122         test for " && dest " at the end - dest is always != NULL there. Call
2123         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2124         with 2xNULL arguments, also to flush the state storage. Handle the
2125         IRIX iconv behaviour. Realloc the final result, to throw away unused
2126         memory.
2127
2128 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2129
2130         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2131         and fchmodat unconditionally, since glibc 2.4 has them.
2132         Problem reported by Arkadiusz Miskiewicz.
2133
2134 2006-12-10  Bruno Haible  <bruno@clisp.org>
2135
2136         * gnulib-tool (func_import): Show the include files only for those
2137         modules that are copied and specified.
2138         Reported by Karl Berry.
2139
2140 2006-12-08  Jim Meyering  <jim@meyering.net>
2141
2142         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2143         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2144
2145         * build-aux/announce-gen: Add two new options, both optional:
2146         --bootstrap-tools=TOOL_LIST
2147               a comma-separated list of tools, e.g.,
2148               autoconf,automake,bison,gnulib
2149         --gnulib-snapshot-date=DATE
2150               if gnulib is in the bootstrap tool list,
2151               then report this as the snapshot date.
2152               If not specified, use the current date/time.
2153               If you specify a date here, be sure it's UTC.
2154
2155 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2156
2157         * tests/test-argp-2.sh: Fix test to match actual output.
2158         (func_compare): Fix sed script to be portable.
2159
2160 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2161
2162         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2163         workaround for this case.  It is not autoconfigured now; offhand
2164         it's hard to see how to autoconfigure it.
2165
2166 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2167
2168         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2169         a directory that is about to be chowned.  Such a directory's
2170         initial file permissions should permit the owner only and this
2171         should not be changed until after the chown, since the group and
2172         other bits would be incorrect if they granted permission before
2173         the chown.
2174
2175         Fix porting problem for iswctype reported by Georg Schwarz in:
2176         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2177         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2178         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2179         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2180         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2181
2182 2006-12-03  Jim Meyering  <jim@meyering.net>
2183
2184         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2185         p->fts_statp may not yet be defined.
2186         (fts_read): Instead, set it in the caller, once p->fts_statp is
2187         sure to be defined, and corresponds to a top-level directory.
2188         This bug made du -x fail.  Here's the coreutils test case:
2189         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2190         Reported by Mike Frysinger.
2191
2192 2006-12-01  Jim Meyering  <jim@meyering.net>
2193
2194         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2195         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2196         Reported by Simon Josefsson.
2197
2198 2006-11-30  Jim Meyering  <jim@meyering.net>
2199
2200         * m4/warning.m4: Use the all-permissive copyright notice
2201         recommended by RMS (rather than LGPL).
2202         * m4/vararrays.m4: Likewise.
2203         * m4/flexmember.m4: Likewise.
2204
2205 2006-11-29  Bruno Haible  <bruno@clisp.org>
2206
2207         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2208         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2209         using +=.
2210         Reported by Simon Josefsson <simon@josefsson.org>.
2211
2212 2006-11-28  James Youngman <jay@gnu.org>
2213
2214         * README: Advise users that they might find the bug-gnulib@gnu.org
2215         and autotools-announce@gnu.org mailing lists useful.
2216
2217 2006-11-28  Bruno Haible  <bruno@clisp.org>
2218
2219         * m4/ptrdiff_max.m4: Remove file.
2220
2221 2006-11-21  Bruno Haible  <bruno@clisp.org>
2222
2223         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2224         _AC_COMPUTE_INT.
2225         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2226         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2227         _AC_COMPUTE_INT.
2228         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2229         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2230         _AC_COMPUTE_INT.
2231         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2232
2233 2006-11-28  Jim Meyering  <jim@meyering.net>
2234
2235         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2236         warning from "gcc -Wshadow" about shadowing the builtin.
2237
2238 2006-11-27  Bruno Haible  <bruno@clisp.org>
2239
2240         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2241         _AC_COMPUTE_INT.
2242         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2243
2244 2006-11-27  Bruno Haible  <bruno@clisp.org>
2245             Paul Eggert  <eggert@cs.ucla.edu>
2246
2247         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2248
2249 2006-11-26  Bruno Haible  <bruno@clisp.org>
2250
2251         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2252         noinst_LTLIBRARIES.
2253
2254 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2255             Bruno Haible  <bruno@clisp.org>
2256
2257         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2258         if compiling with "gcc -ansi".
2259
2260 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2261
2262         Fix some incompatibilities with gcc -ansi -pedantic.
2263         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2264         if compiling pedantically with GCC, unless it's C99 or later.
2265         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2266         it mishandles gcc -ansi -pedantic as well.
2267         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2268         if gcc -pedantic.
2269         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2270         initializers for struct if -pedantic, unless it's C99 or later.
2271
2272 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2273
2274         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2275         Don't close an fd more than once. Identical atimes indicate
2276         success, not failure.
2277
2278 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2279
2280         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2281
2282 2006-11-23  Jim Meyering  <jim@meyering.net>
2283
2284         * build-aux/announce-gen: New file.  From coreutils.
2285
2286 2006-11-22  Jim Meyering  <jim@meyering.net>
2287
2288         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2289         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2290         (fts_read): Use a temporary to narrow the overused st_size member
2291         before using it in a switch statement.  Reported by Matthew Woehlke.
2292
2293         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2294         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2295
2296 2006-11-20  Bruno Haible  <bruno@clisp.org>
2297
2298         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2299         changequote instead of pairs of brackets.
2300         Reported by Andreas Schwab <schwab@suse.de>.
2301
2302 2006-11-21  Jim Meyering  <jim@meyering.net>
2303
2304         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2305         so as to remain compatible with older compilers.
2306         Patch from Michael Deutschmann.
2307
2308 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2309
2310         * MODULES.html.sh (File system functions): Add openat.
2311
2312         * lib/openat.h (rpl_fstatat): New macro, if
2313         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2314         (fstatat): Define to rpl_fstatat under the same conditions,
2315         unless COMPILING_FSTATAT.
2316         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2317         seems to have the bug.
2318         * lib/fstatat.c: New file.
2319         * modules/openat (Files): Add it.
2320
2321 2006-11-20  Bruno Haible  <bruno@clisp.org>
2322
2323         * Makefile: New file.
2324
2325 2006-11-20  Jim Meyering  <jim@meyering.net>
2326
2327         The beginnings of syntax-related checks for gnulib.
2328         * lib/Makefile: New file.
2329         * lib/t-idcache: New script.  Ensure that the two halves of
2330         idcache.c stay in sync.
2331
2332         * lib/idcache.c: Adjust comments in user- and group- portions to
2333         be more accurate, and to be consistent with one another.
2334
2335 2006-11-20  Jim Meyering  <jim@meyering.net>
2336
2337         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2338         continue using the flexible array member (thus, this module performs
2339         half as many malloc calls), with the addition that...
2340         (getgroup, getuser): Consistently record a non-match via an empty
2341         "name" string, and map an empty string match to a NULL return value.
2342         * modules/idcache (Depends-on): Re-add flexmember.
2343
2344         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2345         (getuidbyname, getgroup, getgidbyname): Likewise.
2346
2347         Use cleaner syntax: NULL rather than 0.
2348         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2349
2350 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2351
2352         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2353         It mishandled the case where the group was missing.
2354         Problem reported by Greg Schafer.
2355         * modules/idcache: Likewise.
2356
2357 2006-11-18  Jim Meyering  <jim@meyering.net>
2358
2359         * check-module (%exempt_header): Add exception for some
2360         conditionally-included headers.
2361
2362         * modules/i-ring (Depends-on): Add verify.
2363         (License): Change to LGPL.
2364
2365 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2366
2367         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2368         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2369         and inttostr.h.  Use snprintf rather than uinttostr, so that
2370         LGPLed code doesn't depend on GPLed.
2371
2372 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2373
2374         * modules/inline (License): Change from GPL to LGPL.
2375
2376 2006-11-17  Jim Meyering  <jim@meyering.net>
2377
2378         * modules/d-type (License): Switch to LGPL.
2379
2380 2006-11-15  Bruno Haible  <bruno@clisp.org>
2381
2382         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2383
2384 2006-11-15  Eric Blake  <ebb9@byu.net>
2385
2386         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2387         the module dependency.
2388
2389 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2390             Bruno Haible  <bruno@clisp.org>
2391
2392         * gnulib-tool (func_create_testdir): Add license consistency check.
2393
2394 2006-11-15  Eric Blake  <ebb9@byu.net>
2395
2396         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2397         random "(cached)" in configure output.
2398
2399 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2400
2401         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2402         test for conforming inttypes.h is both announced and cached.
2403
2404         * MODULES.html.sh (seen_modules, seen_files): New variables.
2405         (func_module): Rewrite to use a few less gnulib-tool and sed
2406         invocations.  Avoid a couple of quadratic algorithms for ...
2407         (missed_modules, missed_files): ... these, with ...
2408         (func_append, func_tmpdir): ... these new functions, from
2409         gnulib-tool.  Analogously, install traps for cleanup.
2410
2411         * tests/test-gc.c (main): Remove unused variables.
2412         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2413
2414 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2415
2416         * modules/inttostr (License): Change to LGPL.
2417
2418 2006-11-14  Eric Blake  <ebb9@byu.net>
2419
2420         * modules/tempname (License): Change to LGPL.
2421
2422 2006-11-14  Eric Blake  <ebb9@byu.net>
2423
2424         * doc/functions.texi (Function Portability): *printf functions on
2425         Cygwin now understand all POSIX size specifiers.
2426
2427 2006-11-14  Bruno Haible  <bruno@clisp.org>
2428
2429         * modules/c-ctype (License): Change to LGPL.
2430
2431 2006-11-12  Bruno Haible  <bruno@clisp.org>
2432
2433         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2434         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2435         for GNOME libraries, for which the include files are installed in
2436         subdirectories of $prefix/include.
2437
2438 2006-11-12  Bruno Haible  <bruno@clisp.org>
2439
2440         * m4/lib-link.m4: Require at least autoconf-2.54.
2441         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2442         name to underscores for the --with option.
2443
2444 2006-11-13  Bruno Haible  <bruno@clisp.org>
2445
2446         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2447         the tests directory.
2448         Reported by Ralf Wildenhues.
2449
2450 2006-11-13  Bruno Haible  <bruno@clisp.org>
2451
2452         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2453         (func_emit_initmacro_end): Undo the override here.
2454         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2455         Works around the famous automake error in coreutils.
2456
2457 2006-11-13  Eric Blake  <ebb9@byu.net>
2458
2459         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2460         element, not its node.
2461
2462 2006-11-12  Bruno Haible  <bruno@clisp.org>
2463
2464         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2465         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2466
2467 2006-11-12  Bruno Haible  <bruno@clisp.org>
2468
2469         * gnulib-tool: New option --local-symlink.
2470         (func_usage): Document it.
2471         (lsymbolic): New variable.
2472         (func_import, func_create_testdir): If --symlink was not specified,
2473         test whether --local-symlink was specified and the file comes from
2474         the local_gnulib_dir.
2475
2476 2006-11-12  Bruno Haible  <bruno@clisp.org>
2477
2478         * gnulib-tool (func_ln): New function.
2479         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2480
2481 2006-11-12  Bruno Haible  <bruno@clisp.org>
2482
2483         Finish support for source files in subdirectories.
2484         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2485         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2486         AUTOMAKE_OPTIONS.
2487         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2488
2489 2006-11-12  Bruno Haible  <bruno@clisp.org>
2490
2491         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2492         EXTRA_lib_SOURCES augmentation.
2493         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2494
2495 2006-11-12  Jim Meyering  <jim@meyering.net>
2496
2497         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2498         file descriptors.  This also averts a failure on systems with
2499         native openat support when a traversed directory lacks "x" access.
2500         * lib/fts_.h: Include "i-ring.h"
2501         (struct FTS) [fts_fd_ring]: New member.
2502         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2503         (FCHDIR): Add parentheses.
2504         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2505         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2506         When descending, rather than simply closing the previous
2507         fts_cwd_fd value, push that file descriptor onto the ring.
2508         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2509         (fts_open): Initialize the new fd_ring member.
2510         (fts_close): Clear the ring.
2511         (fts_safe_changedir): When possible, use our new fd_ring to skip
2512         the diropen and fstat and dev/ino comparison that would normally
2513         accompany a virtual `chdir ("..")'.
2514
2515         * modules/fts (Depends-on): Add i-ring.
2516         * modules/i-ring: New module.
2517         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2518         * m4/i-ring.m4: New file.
2519
2520 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2521
2522         * gnulib-tool (func_create_testdir): Fix replacement of
2523         `build-aux' in configure.ac.  Run autotools in gltests
2524         subdirectory.
2525         (func_create_testdir, func_create_megatestdir, test): There is
2526         no need for '--force' in most autotool invocations in a new
2527         tree.  Actually fail the whole test if any of the tools, or the
2528         configure or make stages fail.
2529
2530         Sync from Automake.
2531         * build-aux/gnupload: Revert last change.  Add pointer to upload
2532         instructions of the GNU Maintenance Instructions.
2533         Suggestion by Karl Berry.
2534
2535 2006-11-10  Jim Meyering  <jim@meyering.net>
2536
2537         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2538
2539 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2540
2541         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2542         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2543         (bind_textdomain_codeset) [! ENABLE_NLS]:
2544         Evaluate all the arguments.  That way, callers get compatible behavior
2545         if the arguments have side effects.  Also, it avoids some GCC
2546         diagnostics in some cases; Joel E. Denny reported problems when Bison
2547         was configured with --enable-gcc-warnigs.
2548
2549 2006-11-10  Jim Meyering  <jim@meyering.net>
2550
2551         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2552         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2553         account.
2554
2555 2006-11-10  Jim Meyering  <jim@meyering.net>
2556
2557         * modules/inline: New file/module.
2558         * modules/xalloc (Files): Remove m4/inline.m4.
2559         (Depends-on): Add inline, instead.
2560         * modules/oset: Likewise.
2561         * modules/list: Likewise.
2562
2563 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2564
2565         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2566         Problem reported by Matthew Woehlke.
2567
2568 2006-11-09  Bruno Haible  <bruno@clisp.org>
2569
2570         * lib/tempname.c (gen_tempname): Remove variant that invokes
2571         __gen_tempname.
2572         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2573         __gen_tempname.
2574
2575 2006-11-08  Bruno Haible  <bruno@clisp.org>
2576
2577         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2578         to 'yes' instead of 'cross-compiling'.
2579
2580 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2581
2582         * lib/quotearg.h (quotearg_free): New decl.
2583         * lib/quotearg.c (quotearg_free): New function.
2584         (slot0, nslots, slotvec0, slotvec):
2585         Now file-scope so that quotearg_free can get at them.
2586
2587 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2588
2589         Sync from Automake.
2590         * build-aux/gnupload: Add missing 'gnu' to example URL.
2591         Report by Karl Berry.
2592
2593 2006-11-08  Bruno Haible  <bruno@clisp.org>
2594
2595         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2596         Suggested by Paul Eggert.
2597
2598 2006-11-08  Jim Meyering  <jim@meyering.net>
2599
2600         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2601         It's already included if !_LIBC.
2602         (fts_safe_changedir): Add a comment.
2603
2604 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2605
2606         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2607         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2608         Matthew Woehlke.
2609
2610         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2611         definitions up, to avoid colliding with change below.
2612         (static_inline) [HAVE_INLINE]: New macro.
2613         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2614         Provide extern decls when !HAVE_INLINE.  Do not define unless
2615         static_inline is defined, either by us or by xmalloc.c.  Use
2616         static_inline rather than static inline.
2617         (XCALLOC): Optimize sizeof(T) = 1 case.
2618         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2619
2620 2006-11-07  Bruno Haible  <bruno@clisp.org>
2621
2622         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2623         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2624         AC_C_INLINE.
2625         * modules/xalloc (Files): Add m4/inline.m4.
2626
2627 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2628
2629         * README: Fix typo.
2630         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2631         (Miscellanous Notes): ...from this.
2632
2633 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2634
2635         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2636         Mention that offsetof should be used instead of sizeof.
2637         From Bruno Haible.
2638
2639 2006-11-07  Bruno Haible  <bruno@clisp.org>
2640
2641         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2642
2643 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2644
2645         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2646         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2647         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2648         (gl_tree_add_before, gl_tree_add_after):
2649         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2650         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2651         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2652         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2653         (gl_linked_add_after, gl_linked_add_at): Likewise.
2654         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2655         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2656         (gl_tree_add_before, gl_tree_add_after): Likewise.
2657         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2658         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2659         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2660
2661 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2662
2663         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2664
2665 2006-11-06  Bruno Haible  <bruno@clisp.org>
2666
2667         * m4/inline.m4: New file.
2668         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2669         * modules/list (Files): Add m4/inline.m4.
2670         * modules/oset (Files): Likewise.
2671
2672 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2673
2674         * lib/idcache.c: Include <stddef.h>, for offsetof.
2675         (struct userid.name): Change from char * to a flexible array member.
2676         All uses changed.
2677         * modules/idcache (Depends-on): Add flexmember.
2678
2679         * MODULES.html.sh (Core language properties): New module flexmember.
2680         * modules/flexmember, m4/flexmember.m4: New files.
2681
2682         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2683         inline functions that are identical with the old xnmalloc_inline,
2684         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2685         that we can avoid some unnecessary integer multiplications and
2686         divisions in the common case where the element size is known at
2687         compile time.
2688         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2689         needed.
2690         (xnboundedmalloc): Remove.
2691         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2692         arguments, for consistency with rest of this header.
2693         (xcharalloc): Rewrite using XNMALLOC.
2694         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2695         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2696         versions have been moved to lib/xalloc.h and renamed to be the
2697         non-*_inline versions.
2698         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2699         and xnrealloc functions, since those functions are now inline and
2700         now call us.
2701         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2702         renaming described above.
2703         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2704         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2705         captures the dependency in AC_C_INLINE.
2706
2707         New module canonicalize-lgpl, proposed by Charles Wilson in
2708         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2709         with a few small changes afterwards.
2710         * MODULES.html.sh (File system functions): New module
2711         canonicalize-lgpl.
2712         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2713         and canonicalize_file_name.
2714         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2715         * modules/canonicalize-lgpl: New files.
2716
2717 2006-11-05  Bruno Haible  <bruno@clisp.org>
2718
2719         * gnulib-tool (func_import, func_create_testdir): Create directories
2720         also for files in subdirectories of lib/.
2721
2722 2006-11-05  Bruno Haible  <bruno@clisp.org>
2723
2724         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2725         ANSI C compliant.
2726
2727 2006-11-03  Bruno Haible  <bruno@clisp.org>
2728
2729         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2730         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2731         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2732         (xnboundedmalloc): New inline function.
2733         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2734         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2735         xmalloc.
2736         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2737         xmalloc.
2738         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2739         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2740         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2741         xmalloc.
2742         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2743         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2744         xmalloc.
2745         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2746         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2747         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2748         xmalloc.
2749         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2750         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2751         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2752         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2753         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2754         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2755         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2756
2757 2006-11-03  Bruno Haible  <bruno@clisp.org>
2758
2759         * lib/c-ctype.h [C++]: Define functions without name mangling.
2760         * lib/fwriteerror.h [C++]: Likewise.
2761         * lib/gcd.h [C++]: Likewise.
2762         * lib/linebreak.h [C++]: Likewise.
2763
2764 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2765
2766         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2767         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2768         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2769         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2770         Check for functions and headers just once.
2771         Check for declaration of canonicalize_file_name.
2772         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2773
2774 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2775
2776         * gnulib-tool (func_import): Fix typo in actioncmd.
2777
2778 2006-11-02  Bruno Haible  <bruno@clisp.org>
2779
2780         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2781         newline sequence in the Makefile.am snippet as a space, like "make"
2782         does.
2783         Reported by Roger Persson <perrog@gmail.com>.
2784
2785 2006-11-01  Bruno Haible  <bruno@clisp.org>
2786
2787         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2788         already declared in <string.h>.
2789         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2790
2791 2006-11-01  Bruno Haible  <bruno@clisp.org>
2792
2793         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2794         * lib/strcase.h: Include <string.h>.
2795         (strcasecmp): Define to rpl_strcasecmp here.
2796
2797 2006-11-01  Bruno Haible  <bruno@clisp.org>
2798
2799         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2800
2801 2006-11-01  Eric Blake  <ebb9@byu.net>
2802
2803         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2804
2805         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2806
2807 2006-10-29  Bruno Haible  <bruno@clisp.org>
2808
2809         Make it compile in C++ mode.
2810         * lib/full-write.c (full_rw): Add a cast.
2811
2812 2006-11-01  Bruno Haible  <bruno@clisp.org>
2813
2814         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2815         be POSIX compliant.
2816         Reported by Roger Persson <perrog@gmail.com>.
2817
2818 2006-11-01  Eric Blake  <ebb9@byu.net>
2819
2820         * lib/getopt_.h: Fix comments.
2821
2822 2006-10-31  Eric Blake  <ebb9@byu.net>
2823
2824         * modules/tmpdir (Depends-on): Add sys_stat.
2825         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2826         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2827         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2828         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2829         tempname.
2830
2831 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2832
2833         Avoid some C++ diagnostics reported by Bruno Haible.
2834         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2835         xmalloc.
2836         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2837         (struct slotvec): Move to top level.
2838         (quotearg_n_options): Rewrite to avoid xmalloc.
2839         * lib/xalloc.h (xcharalloc): New function.
2840         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2841         [defined __cplusplus]: Add function template that provides result
2842         type propagation.  This part of the change is from Bruno Haible.
2843
2844 2006-10-29  Bruno Haible  <bruno@clisp.org>
2845
2846         Make it compile in C++ mode.
2847         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2848         * lib/strnlen1.c (strnlen1): Cast memchr result.
2849         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2850         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2851         (create_temp_dir): Rename local variable 'template'.
2852         (compile_csharp_using_sscli): Add cast.
2853         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2854         * lib/findprog.c (find_in_path): Likewise.
2855         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2856         * lib/wait-process.c (register_slave_subprocess): Likewise.
2857
2858 2006-10-22  Bruno Haible  <bruno@clisp.org>
2859
2860         * modules/tsearch: New file.
2861         * lib/tsearch.h: New file.
2862         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2863         * m4/tsearch.m4: New file.
2864         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2865
2866 2006-10-29  Eric Blake  <ebb9@byu.net>
2867
2868         * lib/arcfour.c: Assume config.h.
2869         * lib/arctwo.c: Likewise.
2870         * lib/base64.c: Likewise.
2871         * lib/check-version.c: Likewise.
2872         * lib/crc.c: Likewise.
2873         * lib/des.c: Likewise.
2874         * lib/gc-gnulib.c: Likewise.
2875         * lib/gc-libgcrypt.c: Likewise.
2876         * lib/gc-pbkdf2-sha1.c: Likewise.
2877         * lib/getaddrinfo.c: Likewise.
2878         * lib/getdelim.c: Likewise.
2879         * lib/getline.c: Likewise.
2880         * lib/hmac-md5.c: Likewise.
2881         * lib/hmac-sha1.c: Likewise.
2882         * lib/iconvme.c: Likewise.
2883         * lib/md2.c: Likewise.
2884         * lib/md4.c: Likewise.
2885         * lib/memxor.c: Likewise.
2886         * lib/read-file.c: Likewise.
2887         * lib/readline.c: Likewise.
2888         * lib/rijndael-alg-fst.c: Likewise.
2889         * lib/rijndael-api-fst.c: Likewise.
2890         * lib/xgetdomainname.c: Likewise.
2891
2892 2006-10-28  Eric Blake  <ebb9@byu.net>
2893
2894         * lib/xstrndup.c: Assume config.h.
2895
2896 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2897
2898         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2899         stat-macros.h is now for our own macros, whereas stat_h is for
2900         macros in the <sys/stat.h> name space.
2901         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2902         (STAT_MACROS_H): Remove.
2903         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2904         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2905         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2906         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2907         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2908         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2909         Move these macros to ...
2910         * lib/stat_.h: here.  Don't include stat-macros.h.
2911         * lib/canonicalize.c: Don't include stat-macros.h.
2912         * lib/chown.c: Likewise.
2913         * lib/euidaccess.c: Likewise.
2914         * lib/file-type.c: Likewise.
2915         * lib/filemode.c: Likewise.
2916         * lib/glob.c: Likewise.
2917         * lib/isapipe.c: Likewise.
2918         * lib/lchown.c: Likewise.
2919         * lib/lstat.c: Likewise.
2920         * lib/mkdir-p.c: Likewise.
2921         * lib/rmdir.c: Likewise.
2922         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2923         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2924         unless mkdir isn't declared, to speed up 'configure'.
2925         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2926         would define all the S_* symbols.
2927         * modules/canonicalize (Depends-on):
2928         Depend on sys_stat, not stat-macros.
2929         * modules/chown: Likewise.
2930         * modules/euidaccess: Likewise.
2931         * modules/filemode: Likewise.
2932         * modules/file-type: Likewise.
2933         * modules/glob: Likewise.
2934         * modules/isapipe: Likewise.
2935         * modules/lchown: Likewise.
2936         * modules/lstat: Likewise.
2937         * modules/mkancesdirs: Likewise.
2938         * modules/rmdir: Likewise.
2939         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2940         * modules/modechange: Likewise.
2941         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2942         (configure.ac): Remove gl_STAT_MACROS.
2943         * modules/sys_stat (Depends-on): Remove stat-macros.
2944
2945 2006-10-27  Bruno Haible  <bruno@clisp.org>
2946
2947         * m4/signed.m4: Remove file.
2948         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2949         invocation.
2950         * modules/vasnprintf (Files): Remove m4/signed.m4.
2951
2952 2006-10-27  Bruno Haible  <bruno@clisp.org>
2953
2954         Update to GNU gettext 0.16.
2955         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2956         m4/inttypes-h.m4, m4/signed.m4.
2957         * m4/gettext.m4: Update to GNU gettext 0.16.
2958         * m4/intl.m4: New file, from GNU gettext.
2959         * m4/intldir.m4: New file, from GNU gettext.
2960         * config/srclist.txt: Update
2961
2962 2006-10-27  Eric Blake  <ebb9@byu.net>
2963
2964         * MODULES.html.sh: Document tempname.
2965         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2966         dependencies.
2967         (Files): Move lib/tempname.c...
2968         * modules/tempname: ...to this new module.
2969         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2970         (gl_PREREQ_TEMPNAME): Move...
2971         * m4/tempname.m4: ...to this new file.
2972         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
2973         * modules/sys_stat (Depends-on): Add stat-macros.
2974         * lib/stat_.h (includes): Pick up stat macros.
2975         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
2976         if stat macros are broken.
2977         * lib/tempname.c (includes): No need to include "stat-macros.h".
2978         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
2979         (direxists, __path_search) [!_LIBC]: Don't compile these in
2980         gnulib; the tmpdir module covers that.
2981         * lib/tempname.h: New file.
2982
2983 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
2984
2985         * COPYING: Explain how gnulib-tool converts licence headers.
2986         Almost all wording by Eric Blake.
2987
2988 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
2989
2990         * lib/mbchar.h (is_basic_table): Make read-only.
2991         * lib/mbchar.c (is_basic_table): Likewise.
2992         Reported by John Darrington.
2993
2994 2006-10-25  Bruno Haible  <bruno@clisp.org>
2995
2996         * lib/progname.h (set_program_name): Undefine before defining.
2997
2998 2006-10-25  Bruno Haible  <bruno@clisp.org>
2999
3000         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3001         false for non-gcc C++ compilers.
3002         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3003
3004 2006-10-24  Bruno Haible  <bruno@clisp.org>
3005
3006         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3007         iconv implementations like Irix iconv.
3008
3009 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3010
3011         * modules/vararrays: New file.
3012         * m4/vararrays.m4: New file, taken from diffutils.
3013         * MODULES.html.sh: New module vararrays.
3014
3015 2006-10-24  Karl Berry  <karl@gnu.org>
3016
3017         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3018         Don't call GNU Unix.
3019
3020 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3021
3022         * users.txt: Add Libtool.
3023
3024         Sync from Libtool:
3025
3026         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3027
3028         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3029         to gnulib's policy of including config.h unconditionally.
3030
3031 2006-10-24  Bruno Haible  <bruno@clisp.org>
3032
3033         * modules/wcwidth (Files): Add m4/wint_t.m4.
3034         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3035         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3036
3037 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3038
3039         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3040         to pacify GCC with some -W flags enabled.  Problem reported by
3041         Bruno Haible.
3042
3043 2006-10-24  Jim Meyering  <jim@meyering.net>
3044
3045         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3046         Reported by Karl Berry.
3047
3048 2006-10-23  Bruno Haible  <bruno@clisp.org>
3049
3050         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3051
3052 2006-10-24  Bruno Haible  <bruno@clisp.org>
3053
3054         * lib/gl_list.h: Use C comment style, not C++ comment style.
3055
3056 2006-10-23  Eric Blake  <ebb9@byu.net>
3057
3058         * lib/getaddrinfo.c (includes): Add missing include.
3059
3060 2006-10-23  Bruno Haible  <bruno@clisp.org>
3061             Paul Eggert  <eggert@cs.ucla.edu>
3062
3063         Ability to rename obstack_free.
3064         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3065         obstack_free.
3066         (obstack_free): Invoke the __obstack_free macro.
3067         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3068
3069 2006-10-23  Bruno Haible  <bruno@clisp.org>
3070             Paul Eggert  <eggert@cs.ucla.edu>
3071
3072         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3073         __argc, __argv from the declaration. (They are defined as macros on
3074         mingw.)
3075
3076 2006-10-22  Bruno Haible  <bruno@clisp.org>
3077
3078         * doc/gnulib-intro.texi: New file.
3079         * doc/gnulib.texi: Include it.
3080
3081 2006-10-21  Bruno Haible  <bruno@clisp.org>
3082
3083         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3084         "Introduction", "Miscellanous Notes", "Particular Modules".
3085
3086 2006-10-21  Bruno Haible  <bruno@clisp.org>
3087
3088         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3089         Change mostlyclean-local rule to avoid sh syntax error from bash
3090         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3091
3092 2006-10-23  Jim Meyering  <jim@meyering.net>
3093
3094         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3095         in place of snprintf.
3096
3097         * modules/inttostr (Files): Add lib/uinttostr.c.
3098         * lib/uinttostr.c (inttostr): New file/function.
3099         * lib/inttostr.h (uinttostr): Declare.
3100         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3101         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3102         Add uinttostr.
3103         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3104
3105 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3106
3107         * lib/canonicalize.c (ELOOP): Define if not already defined.
3108         Problem reported by Bruno Haible in
3109         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3110
3111 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3112
3113         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3114         Problem reported by Perry Smith and Ville Laurikari.
3115
3116         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3117         uses.
3118
3119 2006-10-19  Bruno Haible  <bruno@clisp.org>
3120
3121         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3122         for mingw.
3123
3124 2006-10-19  Bruno Haible  <bruno@clisp.org>
3125
3126         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3127         Needed for mingw.
3128
3129 2006-10-19  Bruno Haible  <bruno@clisp.org>
3130
3131         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3132
3133 2006-10-19  Bruno Haible  <bruno@clisp.org>
3134
3135         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3136         it.
3137
3138 2006-10-19  Bruno Haible  <bruno@clisp.org>
3139
3140         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3141         invocation.
3142
3143 2006-10-19  Bruno Haible  <bruno@clisp.org>
3144
3145         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3146         mountlist by default.
3147
3148 2006-10-16  Bruno Haible  <bruno@clisp.org>
3149
3150         * lib/c-strstr.c: Include c-strstr.h.
3151
3152 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3153
3154         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3155         in a slash.
3156
3157 2006-10-18  Bruno Haible  <bruno@clisp.org>
3158
3159         * lib/lock.h [C++]: Wrap definitions in extern "C".
3160
3161 2006-10-18  Bruno Haible  <bruno@clisp.org>
3162
3163         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3164         gl_LIBOBJS list.
3165
3166 2006-10-18  Bruno Haible  <bruno@clisp.org>
3167
3168         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3169
3170 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3171
3172         * lib/xstrtol.h: Include gettext.h.
3173         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3174         Problem reported by Eric Blake.
3175         * modules/xstrtol (Depends-on): Add gettext-h.
3176
3177 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3178
3179         * lib/strftime.c (advance): New macro.
3180         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3181         incomplete type, so you can't add 0 to it.  Problem and patch
3182         reported by Eelco Dolstra for dietlibc.
3183
3184 2006-10-18  Jim Meyering  <jim@meyering.net>
3185
3186         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3187         type for a local, and rename it: s/up/user_proc/.
3188
3189 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3190
3191         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3192         READ_UTMP_USER_PROCESS.
3193         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3194
3195 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3196
3197         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3198         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3199
3200 2006-10-17  Eric Blake  <ebb9@byu.net>
3201
3202         * lib/sigprocmask.c (sigprocmask): Fix typo.
3203
3204         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3205
3206         * modules/clean-temp (Makefile.am): Don't add to make output...
3207         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3208         config.h.
3209
3210 2006-10-17  Bruno Haible  <bruno@clisp.org>
3211
3212         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3213         differently if DEFAULT_TEXT_DOMAIN is set.
3214
3215 2006-10-16  Bruno Haible  <bruno@clisp.org>
3216
3217         * lib/clean-temp.c: Include fwriteerror.h.
3218
3219 2006-10-16  Bruno Haible  <bruno@clisp.org>
3220
3221         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3222
3223 2006-10-16  Bruno Haible  <bruno@clisp.org>
3224
3225         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3226         * lib/sigprocmask.h: Include <sys/types.h>.
3227         (sigset_t): Use the system's definition if present.
3228
3229 2006-10-17  Eric Blake  <ebb9@byu.net>
3230
3231         * lib/xvasprintf.c (includes): Assume config.h.
3232         * lib/xasprintf.c (includes): Likewise.
3233
3234 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3235
3236         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3237         at least as wide as intmax_t.
3238
3239 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3240
3241         (Imported from Automake.)
3242         * build-aux/gnupload: Update to version 1.1 of directive file.
3243
3244 2006-10-16  Eric Blake  <ebb9@byu.net>
3245
3246         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3247         match Automake 1.10a.
3248
3249 2006-10-14  Bruno Haible  <bruno@clisp.org>
3250
3251         * modules/sigprocmask: New file.
3252         * lib/sigprocmask.h: New file.
3253         * lib/sigprocmask.c: New file.
3254         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3255         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3256         request sigprocmask.o.
3257         (gl_PREREQ_SIGPROCMASK): New macro.
3258         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3259         (Depends-on): Add sigprocmask.
3260         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3261         gt_SIGNALBLOCKING. Test for 'raise' only once.
3262         * lib/fatal-signal.c: Include sigprocmask.h.
3263         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3264         unblock_fatal_signals): Define always.
3265         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3266         sigprocmask.
3267
3268 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3269
3270         Sync from Automake.
3271         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3272         which incorrectly sets the mode of an existing destination
3273         directory.  In some cases the unpatched install-sh could do the
3274         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3275         system.  We hope this is rare in practice, but it's clearly worth
3276         fixing.  Problem reported by Alex Unleashed in
3277         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3278         Also, don't bother to check for -m bugs unless we're using -m;
3279         suggested by Stepan Kasal.
3280
3281 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3282
3283         Sync from Automake.
3284         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3285         `-c' flag, so they appear at the same position as in %FASTDEP%
3286         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3287         which ignores unknown options only after the first non-option.
3288         Bug report against M4 by Nelson H. F. Beebe.
3289
3290 2006-10-13  Jim Meyering  <jim@meyering.net>
3291
3292         Fix a bug in yesterday's change.
3293         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3294         p->fts_statp->st_dev would be used uninitialized.
3295         Ensures that we always call fts_stat on the very first entry.
3296         Miklos Szeredi reported that find -xdev stopped working.
3297
3298 2006-10-12  Bruno Haible  <bruno@clisp.org>
3299
3300         * gnulib-tool (func_get_automake_snippet): Append an automatically
3301         computed EXTRA_DIST augmentation.
3302         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3303         * modules/alloca-opt (Makefile.am): Likewise.
3304         * modules/allocsa (Makefile.am): Likewise.
3305         * modules/arcfour (Makefile.am): Likewise.
3306         * modules/arctwo (Makefile.am): Likewise.
3307         * modules/argmatch (Makefile.am): Likewise.
3308         * modules/argz (Makefile.am): Likewise.
3309         * modules/atexit (Makefile.am): Likewise.
3310         * modules/backupfile (Makefile.am): Likewise.
3311         * modules/byteswap (Makefile.am): Likewise.
3312         * modules/c-strtod (Makefile.am): Likewise.
3313         * modules/c-strtold (Makefile.am): Likewise.
3314         * modules/calloc (Makefile.am): Likewise.
3315         * modules/canon-host (Makefile.am): Likewise.
3316         * modules/canonicalize (Makefile.am): Likewise.
3317         * modules/chdir-long (Makefile.am): Likewise.
3318         * modules/chdir-safer (Makefile.am): Likewise.
3319         * modules/check-version (Makefile.am): Likewise.
3320         * modules/chown (Makefile.am): Likewise.
3321         * modules/cloexec (Makefile.am): Likewise.
3322         * modules/close-stream (Makefile.am): Likewise.
3323         * modules/closeout (Makefile.am): Likewise.
3324         * modules/crc (Makefile.am): Likewise.
3325         * modules/csharpexec (Makefile.am): Likewise.
3326         * modules/cycle-check (Makefile.am): Likewise.
3327         * modules/des (Makefile.am): Likewise.
3328         * modules/dev-ino (Makefile.am): Likewise.
3329         * modules/dirfd (Makefile.am): Likewise.
3330         * modules/dirname (Makefile.am): Likewise.
3331         * modules/dup2 (Makefile.am): Likewise.
3332         * modules/eealloc (Makefile.am): Likewise.
3333         * modules/error (Makefile.am): Likewise.
3334         * modules/euidaccess (Makefile.am): Likewise.
3335         * modules/exclude (Makefile.am): Likewise.
3336         * modules/exitfail (Makefile.am): Likewise.
3337         * modules/fcntl-safer (Makefile.am): Likewise.
3338         * modules/fcntl (Makefile.am): Likewise.
3339         * modules/file-type (Makefile.am): Likewise.
3340         * modules/fileblocks (Makefile.am): Likewise.
3341         * modules/filemode (Makefile.am): Likewise.
3342         * modules/filenamecat (Makefile.am): Likewise.
3343         * modules/fnmatch (Makefile.am): Likewise.
3344         * modules/fopen-safer (Makefile.am): Likewise.
3345         * modules/fpending (Makefile.am): Likewise.
3346         * modules/fprintftime (Makefile.am): Likewise.
3347         * modules/free (Makefile.am): Likewise.
3348         * modules/fsusage (Makefile.am): Likewise.
3349         * modules/ftruncate (Makefile.am): Likewise.
3350         * modules/fts (Makefile.am): Likewise.
3351         * modules/gc-arcfour (Makefile.am): Likewise.
3352         * modules/gc-des (Makefile.am): Likewise.
3353         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3354         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3355         * modules/gc-md4 (Makefile.am): Likewise.
3356         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3357         * modules/gc-sha1 (Makefile.am): Likewise.
3358         * modules/gc (Makefile.am): Likewise.
3359         * modules/getaddrinfo (Makefile.am): Likewise.
3360         * modules/getcwd (Makefile.am): Likewise.
3361         * modules/getdelim (Makefile.am): Likewise.
3362         * modules/getdomainname (Makefile.am): Likewise.
3363         * modules/getgroups (Makefile.am): Likewise.
3364         * modules/gethostname (Makefile.am): Likewise.
3365         * modules/gethrxtime (Makefile.am): Likewise.
3366         * modules/getline (Makefile.am): Likewise.
3367         * modules/getloadavg (Makefile.am): Likewise.
3368         * modules/getlogin_r (Makefile.am): Likewise.
3369         * modules/getndelim2 (Makefile.am): Likewise.
3370         * modules/getopt (Makefile.am): Likewise.
3371         * modules/getpagesize (Makefile.am): Likewise.
3372         * modules/getpass-gnu (Makefile.am): Likewise.
3373         * modules/getpass (Makefile.am): Likewise.
3374         * modules/getsubopt (Makefile.am): Likewise.
3375         * modules/gettime (Makefile.am): Likewise.
3376         * modules/gettimeofday (Makefile.am): Likewise.
3377         * modules/getugroups (Makefile.am): Likewise.
3378         * modules/getusershell (Makefile.am): Likewise.
3379         * modules/glob (Makefile.am): Likewise.
3380         * modules/group-member (Makefile.am): Likewise.
3381         * modules/hard-locale (Makefile.am): Likewise.
3382         * modules/hash (Makefile.am): Likewise.
3383         * modules/hmac-md5 (Makefile.am): Likewise.
3384         * modules/hmac-sha1 (Makefile.am): Likewise.
3385         * modules/human (Makefile.am): Likewise.
3386         * modules/idcache (Makefile.am): Likewise.
3387         * modules/imaxabs (Makefile.am): Likewise.
3388         * modules/imaxdiv (Makefile.am): Likewise.
3389         * modules/inet_ntop (Makefile.am): Likewise.
3390         * modules/inet_pton (Makefile.am): Likewise.
3391         * modules/intprops (Makefile.am): Likewise.
3392         * modules/inttostr (Makefile.am): Likewise.
3393         * modules/inttypes (Makefile.am): Likewise.
3394         * modules/isapipe (Makefile.am): Likewise.
3395         * modules/javaversion (Makefile.am): Likewise.
3396         * modules/lchmod (Makefile.am): Likewise.
3397         * modules/lchown (Makefile.am): Likewise.
3398         * modules/localcharset (Makefile.am): Likewise.
3399         * modules/long-options (Makefile.am): Likewise.
3400         * modules/lstat (Makefile.am): Likewise.
3401         * modules/malloc (Makefile.am): Likewise.
3402         * modules/mathl (Makefile.am): Likewise.
3403         * modules/mbchar (Makefile.am): Likewise.
3404         * modules/md2 (Makefile.am): Likewise.
3405         * modules/md4 (Makefile.am): Likewise.
3406         * modules/md5 (Makefile.am): Likewise.
3407         * modules/memcasecmp (Makefile.am): Likewise.
3408         * modules/memchr (Makefile.am): Likewise.
3409         * modules/memcmp (Makefile.am): Likewise.
3410         * modules/memcoll (Makefile.am): Likewise.
3411         * modules/memcpy (Makefile.am): Likewise.
3412         * modules/memmem (Makefile.am): Likewise.
3413         * modules/memmove (Makefile.am): Likewise.
3414         * modules/mempcpy (Makefile.am): Likewise.
3415         * modules/memrchr (Makefile.am): Likewise.
3416         * modules/memset (Makefile.am): Likewise.
3417         * modules/memxor (Makefile.am): Likewise.
3418         * modules/mkancesdirs (Makefile.am): Likewise.
3419         * modules/mkdir-p (Makefile.am): Likewise.
3420         * modules/mkdir (Makefile.am): Likewise.
3421         * modules/mkdtemp (Makefile.am): Likewise.
3422         * modules/mkstemp (Makefile.am): Likewise.
3423         * modules/mktime (Makefile.am): Likewise.
3424         * modules/modechange (Makefile.am): Likewise.
3425         * modules/mountlist (Makefile.am): Likewise.
3426         * modules/nanosleep (Makefile.am): Likewise.
3427         * modules/obstack (Makefile.am): Likewise.
3428         * modules/openat (Makefile.am): Likewise.
3429         * modules/pagealign_alloc (Makefile.am): Likewise.
3430         * modules/pathmax (Makefile.am): Likewise.
3431         * modules/physmem (Makefile.am): Likewise.
3432         * modules/poll (Makefile.am): Likewise.
3433         * modules/posixtm (Makefile.am): Likewise.
3434         * modules/posixver (Makefile.am): Likewise.
3435         * modules/putenv (Makefile.am): Likewise.
3436         * modules/quote (Makefile.am): Likewise.
3437         * modules/quotearg (Makefile.am): Likewise.
3438         * modules/raise (Makefile.am): Likewise.
3439         * modules/read-file (Makefile.am): Likewise.
3440         * modules/readline (Makefile.am): Likewise.
3441         * modules/readlink (Makefile.am): Likewise.
3442         * modules/readtokens (Makefile.am): Likewise.
3443         * modules/readutmp (Makefile.am): Likewise.
3444         * modules/realloc (Makefile.am): Likewise.
3445         * modules/regex (Makefile.am): Likewise.
3446         * modules/rename-dest-slash (Makefile.am): Likewise.
3447         * modules/rename (Makefile.am): Likewise.
3448         * modules/rijndael (Makefile.am): Likewise.
3449         * modules/rmdir (Makefile.am): Likewise.
3450         * modules/rpmatch (Makefile.am): Likewise.
3451         * modules/safe-read (Makefile.am): Likewise.
3452         * modules/safe-write (Makefile.am): Likewise.
3453         * modules/same-inode (Makefile.am): Likewise.
3454         * modules/same (Makefile.am): Likewise.
3455         * modules/save-cwd (Makefile.am): Likewise.
3456         * modules/savedir (Makefile.am): Likewise.
3457         * modules/setenv (Makefile.am): Likewise.
3458         * modules/settime (Makefile.am): Likewise.
3459         * modules/sha1 (Makefile.am): Likewise.
3460         * modules/sig2str (Makefile.am): Likewise.
3461         * modules/snprintf (Makefile.am): Likewise.
3462         * modules/stat-macros (Makefile.am): Likewise.
3463         * modules/stat-time (Makefile.am): Likewise.
3464         * modules/stdbool (Makefile.am): Likewise.
3465         * modules/stdint (Makefile.am): Likewise.
3466         * modules/stdlib-safer (Makefile.am): Likewise.
3467         * modules/stpcpy (Makefile.am): Likewise.
3468         * modules/stpncpy (Makefile.am): Likewise.
3469         * modules/strcase (Makefile.am): Likewise.
3470         * modules/strcasestr (Makefile.am): Likewise.
3471         * modules/strchrnul (Makefile.am): Likewise.
3472         * modules/strcspn (Makefile.am): Likewise.
3473         * modules/strdup (Makefile.am): Likewise.
3474         * modules/strerror (Makefile.am): Likewise.
3475         * modules/strftime (Makefile.am): Likewise.
3476         * modules/strndup (Makefile.am): Likewise.
3477         * modules/strnlen (Makefile.am): Likewise.
3478         * modules/strpbrk (Makefile.am): Likewise.
3479         * modules/strsep (Makefile.am): Likewise.
3480         * modules/strstr (Makefile.am): Likewise.
3481         * modules/strtod (Makefile.am): Likewise.
3482         * modules/strtoimax (Makefile.am): Likewise.
3483         * modules/strtok_r (Makefile.am): Likewise.
3484         * modules/strtol (Makefile.am): Likewise.
3485         * modules/strtoll (Makefile.am): Likewise.
3486         * modules/strtoul (Makefile.am): Likewise.
3487         * modules/strtoull (Makefile.am): Likewise.
3488         * modules/strtoumax (Makefile.am): Likewise.
3489         * modules/strverscmp (Makefile.am): Likewise.
3490         * modules/sys_socket (Makefile.am): Likewise.
3491         * modules/sys_stat (Makefile.am): Likewise.
3492         * modules/sysexits (Makefile.am): Likewise.
3493         * modules/time_r (Makefile.am): Likewise.
3494         * modules/timegm (Makefile.am): Likewise.
3495         * modules/timespec (Makefile.am): Likewise.
3496         * modules/tmpfile-safer (Makefile.am): Likewise.
3497         * modules/trim (Makefile.am): Likewise.
3498         * modules/unistd-safer (Makefile.am): Likewise.
3499         * modules/unlinkdir (Makefile.am): Likewise.
3500         * modules/unlocked-io (Makefile.am): Likewise.
3501         * modules/userspec (Makefile.am): Likewise.
3502         * modules/utime (Makefile.am): Likewise.
3503         * modules/utimecmp (Makefile.am): Likewise.
3504         * modules/utimens (Makefile.am): Likewise.
3505         * modules/vasnprintf (Makefile.am): Likewise.
3506         * modules/vasprintf (Makefile.am): Likewise.
3507         * modules/vsnprintf (Makefile.am): Likewise.
3508         * modules/xalloc (Makefile.am): Likewise.
3509         * modules/xgetcwd (Makefile.am): Likewise.
3510         * modules/xnanosleep (Makefile.am): Likewise.
3511         * modules/xreadlink (Makefile.am): Likewise.
3512         * modules/xstrtod (Makefile.am): Likewise.
3513         * modules/xstrtol (Makefile.am): Likewise.
3514         * modules/xstrtold (Makefile.am): Likewise.
3515         * modules/yesno (Makefile.am): Likewise.
3516         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3517
3518 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3519
3520         * modules/error (Makefile.am): Distribute files through
3521         EXTRA_DIST, not lib_SOURCES.
3522
3523 2006-10-12  Eric Blake  <ebb9@byu.net>
3524
3525         * modules/error (Makefile.am): Distribute files in /lib.
3526         * modules/obstack (Makefile.am): Likewise.
3527
3528 2006-10-12  Bruno Haible  <bruno@clisp.org>
3529
3530         * modules/acl (Makefile.am): Distribute all files in lib/ through
3531         EXTRA_DIST.
3532         * modules/arcfour (Makefile.am): Likewise.
3533         * modules/arctwo (Makefile.am): Likewise.
3534         * modules/argmatch (Makefile.am): Likewise.
3535         * modules/argz (Makefile.am): Likewise.
3536         * modules/atexit (Makefile.am): Likewise.
3537         * modules/backupfile (Makefile.am): Likewise.
3538         * modules/c-strtod (Makefile.am): Likewise.
3539         * modules/c-strtold (Makefile.am): Likewise.
3540         * modules/calloc (Makefile.am): Likewise.
3541         * modules/canon-host (Makefile.am): Likewise.
3542         * modules/canonicalize (Makefile.am): Likewise.
3543         * modules/chdir-long (Makefile.am): Likewise.
3544         * modules/chdir-safer (Makefile.am): Likewise.
3545         * modules/check-version (Makefile.am): Likewise.
3546         * modules/chown (Makefile.am): Likewise.
3547         * modules/cloexec (Makefile.am): Likewise.
3548         * modules/close-stream (Makefile.am): Likewise.
3549         * modules/closeout (Makefile.am): Likewise.
3550         * modules/crc (Makefile.am): Likewise.
3551         * modules/cycle-check (Makefile.am): Likewise.
3552         * modules/des (Makefile.am): Likewise.
3553         * modules/dirfd (Makefile.am): Likewise.
3554         * modules/dirname (Makefile.am): Likewise.
3555         * modules/dup2 (Makefile.am): Likewise.
3556         * modules/euidaccess (Makefile.am): Likewise.
3557         * modules/exclude (Makefile.am): Likewise.
3558         * modules/exitfail (Makefile.am): Likewise.
3559         * modules/fcntl-safer (Makefile.am): Likewise.
3560         * modules/file-type (Makefile.am): Likewise.
3561         * modules/fileblocks (Makefile.am): Likewise.
3562         * modules/filemode (Makefile.am): Likewise.
3563         * modules/filenamecat (Makefile.am): Likewise.
3564         * modules/fnmatch (Makefile.am): Likewise.
3565         * modules/fopen-safer (Makefile.am): Likewise.
3566         * modules/fpending (Makefile.am): Likewise.
3567         * modules/fprintftime (Makefile.am): Likewise.
3568         * modules/free (Makefile.am): Likewise.
3569         * modules/fsusage (Makefile.am): Likewise.
3570         * modules/ftruncate (Makefile.am): Likewise.
3571         * modules/fts (Makefile.am): Likewise.
3572         * modules/gc (Makefile.am): Likewise.
3573         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3574         * modules/getaddrinfo (Makefile.am): Likewise.
3575         * modules/getcwd (Makefile.am): Likewise.
3576         * modules/getdelim (Makefile.am): Likewise.
3577         * modules/getdomainname (Makefile.am): Likewise.
3578         * modules/getgroups (Makefile.am): Likewise.
3579         * modules/gethostname (Makefile.am): Likewise.
3580         * modules/gethrxtime (Makefile.am): Likewise.
3581         * modules/getline (Makefile.am): Likewise.
3582         * modules/getloadavg (Makefile.am): Likewise.
3583         * modules/getlogin_r (Makefile.am): Likewise.
3584         * modules/getopt (Makefile.am): Likewise.
3585         * modules/getpass (Makefile.am): Likewise.
3586         * modules/getpass-gnu (Makefile.am): Likewise.
3587         * modules/getsubopt (Makefile.am): Likewise.
3588         * modules/gettime (Makefile.am): Likewise.
3589         * modules/gettimeofday (Makefile.am): Likewise.
3590         * modules/getugroups (Makefile.am): Likewise.
3591         * modules/getusershell (Makefile.am): Likewise.
3592         * modules/glob (Makefile.am): Likewise.
3593         * modules/group-member (Makefile.am): Likewise.
3594         * modules/hard-locale (Makefile.am): Likewise.
3595         * modules/hash (Makefile.am): Likewise.
3596         * modules/hmac-md5 (Makefile.am): Likewise.
3597         * modules/hmac-sha1 (Makefile.am): Likewise.
3598         * modules/human (Makefile.am): Likewise.
3599         * modules/idcache (Makefile.am): Likewise.
3600         * modules/imaxabs (Makefile.am): Likewise.
3601         * modules/imaxdiv (Makefile.am): Likewise.
3602         * modules/inet_ntop (Makefile.am): Likewise.
3603         * modules/inet_pton (Makefile.am): Likewise.
3604         * modules/inttostr (Makefile.am): Likewise.
3605         * modules/isapipe (Makefile.am): Likewise.
3606         * modules/lchown (Makefile.am): Likewise.
3607         * modules/long-options (Makefile.am): Likewise.
3608         * modules/lstat (Makefile.am): Likewise.
3609         * modules/malloc (Makefile.am): Likewise.
3610         * modules/mathl (Makefile.am): Likewise.
3611         * modules/mbchar (Makefile.am): Likewise.
3612         * modules/md2 (Makefile.am): Likewise.
3613         * modules/md4 (Makefile.am): Likewise.
3614         * modules/md5 (Makefile.am): Likewise.
3615         * modules/memcasecmp (Makefile.am): Likewise.
3616         * modules/memchr (Makefile.am): Likewise.
3617         * modules/memcmp (Makefile.am): Likewise.
3618         * modules/memcoll (Makefile.am): Likewise.
3619         * modules/memcpy (Makefile.am): Likewise.
3620         * modules/memmem (Makefile.am): Likewise.
3621         * modules/memmove (Makefile.am): Likewise.
3622         * modules/mempcpy (Makefile.am): Likewise.
3623         * modules/memrchr (Makefile.am): Likewise.
3624         * modules/memset (Makefile.am): Likewise.
3625         * modules/memxor (Makefile.am): Likewise.
3626         * modules/mkancesdirs (Makefile.am): Likewise.
3627         * modules/mkdir (Makefile.am): Likewise.
3628         * modules/mkdir-p (Makefile.am): Likewise.
3629         * modules/mkdtemp (Makefile.am): Likewise.
3630         * modules/mkstemp (Makefile.am): Likewise.
3631         * modules/mktime (Makefile.am): Likewise.
3632         * modules/modechange (Makefile.am): Likewise.
3633         * modules/mountlist (Makefile.am): Likewise.
3634         * modules/nanosleep (Makefile.am): Likewise.
3635         * modules/openat (Makefile.am): Likewise.
3636         * modules/pagealign_alloc (Makefile.am): Likewise.
3637         * modules/physmem (Makefile.am): Likewise.
3638         * modules/poll (Makefile.am): Likewise.
3639         * modules/posixtm (Makefile.am): Likewise.
3640         * modules/posixver (Makefile.am): Likewise.
3641         * modules/putenv (Makefile.am): Likewise.
3642         * modules/quote (Makefile.am): Likewise.
3643         * modules/quotearg (Makefile.am): Likewise.
3644         * modules/raise (Makefile.am): Likewise.
3645         * modules/read-file (Makefile.am): Likewise.
3646         * modules/readline (Makefile.am): Likewise.
3647         * modules/readlink (Makefile.am): Likewise.
3648         * modules/readtokens (Makefile.am): Likewise.
3649         * modules/readutmp (Makefile.am): Likewise.
3650         * modules/realloc (Makefile.am): Likewise.
3651         * modules/regex (Makefile.am): Likewise.
3652         * modules/rename (Makefile.am): Likewise.
3653         * modules/rename-dest-slash (Makefile.am): Likewise.
3654         * modules/rijndael (Makefile.am): Likewise.
3655         * modules/rmdir (Makefile.am): Likewise.
3656         * modules/rpmatch (Makefile.am): Likewise.
3657         * modules/safe-read (Makefile.am): Likewise.
3658         * modules/safe-write (Makefile.am): Likewise.
3659         * modules/same (Makefile.am): Likewise.
3660         * modules/save-cwd (Makefile.am): Likewise.
3661         * modules/savedir (Makefile.am): Likewise.
3662         * modules/setenv (Makefile.am): Likewise.
3663         * modules/settime (Makefile.am): Likewise.
3664         * modules/sha1 (Makefile.am): Likewise.
3665         * modules/sig2str (Makefile.am): Likewise.
3666         * modules/snprintf (Makefile.am): Likewise.
3667         * modules/stdlib-safer (Makefile.am): Likewise.
3668         * modules/stpcpy (Makefile.am): Likewise.
3669         * modules/stpncpy (Makefile.am): Likewise.
3670         * modules/strcase (Makefile.am): Likewise.
3671         * modules/strcasestr (Makefile.am): Likewise.
3672         * modules/strchrnul (Makefile.am): Likewise.
3673         * modules/strcspn (Makefile.am): Likewise.
3674         * modules/strdup (Makefile.am): Likewise.
3675         * modules/strerror (Makefile.am): Likewise.
3676         * modules/strftime (Makefile.am): Likewise.
3677         * modules/strndup (Makefile.am): Likewise.
3678         * modules/strnlen (Makefile.am): Likewise.
3679         * modules/strpbrk (Makefile.am): Likewise.
3680         * modules/strsep (Makefile.am): Likewise.
3681         * modules/strstr (Makefile.am): Likewise.
3682         * modules/strtod (Makefile.am): Likewise.
3683         * modules/strtoimax (Makefile.am): Likewise.
3684         * modules/strtok_r (Makefile.am): Likewise.
3685         * modules/strtol (Makefile.am): Likewise.
3686         * modules/strtoll (Makefile.am): Likewise.
3687         * modules/strtoul (Makefile.am): Likewise.
3688         * modules/strtoull (Makefile.am): Likewise.
3689         * modules/strtoumax (Makefile.am): Likewise.
3690         * modules/strverscmp (Makefile.am): Likewise.
3691         * modules/time_r (Makefile.am): Likewise.
3692         * modules/timegm (Makefile.am): Likewise.
3693         * modules/tmpfile-safer (Makefile.am): Likewise.
3694         * modules/unistd-safer (Makefile.am): Likewise.
3695         * modules/unlinkdir (Makefile.am): Likewise.
3696         * modules/userspec (Makefile.am): Likewise.
3697         * modules/utime (Makefile.am): Likewise.
3698         * modules/utimecmp (Makefile.am): Likewise.
3699         * modules/utimens (Makefile.am): Likewise.
3700         * modules/vasnprintf (Makefile.am): Likewise.
3701         * modules/vasprintf (Makefile.am): Likewise.
3702         * modules/vsnprintf (Makefile.am): Likewise.
3703         * modules/xalloc (Makefile.am): Likewise.
3704         * modules/xgetcwd (Makefile.am): Likewise.
3705         * modules/xnanosleep (Makefile.am): Likewise.
3706         * modules/xreadlink (Makefile.am): Likewise.
3707         * modules/xstrtod (Makefile.am): Likewise.
3708         * modules/xstrtol (Makefile.am): Likewise.
3709         * modules/xstrtold (Makefile.am): Likewise.
3710         * modules/yesno (Makefile.am): Likewise.
3711
3712 2006-10-12  Jim Meyering  <jim@meyering.net>
3713
3714         * m4/getloadavg.m4: Revert the change below.
3715
3716         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3717         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3718         fail with a symlink, which is what coreutils' ./bootstrap now
3719         creates by default.
3720
3721 2006-10-12  Bruno Haible  <bruno@clisp.org>
3722
3723         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3724         mingw.
3725         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3726         MSVC and mingw explicitly.
3727
3728 2006-10-11  Simon Josefsson  <jas@extundo.com>
3729             Bruno Haible  <bruno@clisp.org>
3730
3731         Add support for multiple gnulib-tool invocations in the scope of a
3732         single configure.ac file.
3733         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3734         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3735         with the same contents as the _LIBADD variable.
3736         (func_emit_initmacro_start, func_emit_initmacro_end,
3737         func_emit_initmacro_done): New functions.
3738         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3739         gl_LIBOBJS and gl_LTLIBOBJS.
3740
3741 2006-10-11  Bruno Haible  <bruno@clisp.org>
3742
3743         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3744         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3745         autoreconf. Instead, invoke autopoint explicitly but move back the
3746         *.m4 files from gnulib.
3747
3748 2006-10-11  Bruno Haible  <bruno@clisp.org>
3749
3750         * gnulib-tool (func_usage): Make module names after --create-testdir
3751         optional.
3752         (func_create_testdir): If no module was specified, use nearly all
3753         modules.
3754
3755 2006-10-12  Jim Meyering  <jim@meyering.net>
3756
3757         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3758         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3759         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3760         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3761         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3762         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3763         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3764         (fts_set_stat_required): New function.
3765         (fts_open): Defer the calls to fts_stat, if possible or requested.
3766         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3767         into fts_stat itself.
3768         (fts_read): Perform any required (deferred) fts_stat call.
3769         (fts_build): Likewise, for the directory we're about to open and read.
3770         In the readdir loop, carefully decide whether each entry will require
3771         an eventual call to fts_stat, using dirent.d_type info if available.
3772         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3773         a command line argument into this function.  Update all callers.
3774         Map a return value of FTS_DOT to FTS_D for a command line argument.
3775         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3776         Thanks to Miklos Szeredi for his tenacity and for the initial
3777         bug report about "find" failing on a FUSE-based file system.
3778
3779         * lib/fts.c (fts_open): Use consistent indentation.
3780
3781 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3782
3783         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3784         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3785         reported by Jim Meyering.  All uses of cache variables renamed
3786         to match Autoconf's.
3787         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3788         the other one.
3789
3790         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3791         Fix misspelling in diagnostic.
3792
3793 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3794
3795         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3796         defined.  Problem reported by Matthew Woehlke.
3797
3798         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3799         Add support for Tandem NonStop R series.
3800         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3801         Use new macro.
3802
3803         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3804         (has_trailing_slash): Omit size arg; all callers changed.
3805         Omit 'inline', since it doesn't help performance and we'd
3806         need to configure it.
3807         Don't count //, ///, etc. as having a trailing slash.
3808         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3809         (rpl_rename_dest_slash): On failure, use rename's errno rather
3810         than (in some cases) an incorrect or junk errno.
3811         Simplify code by removing need to compute length; this does
3812         cause it to make two passes instead of one over the file name,
3813         but it's worth it.
3814
3815         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3816         change, since Autoconf's version may no longer be appropriate now
3817         that we are using CVS Autoconf's version.  Add support for Tandem.
3818
3819 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3820             Bruno Haible  <bruno@clisp.org>
3821
3822         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3823         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3824         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3825         gl_AC_TYPE_LONG_LONG.
3826
3827         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3828         instead of HAVE_LONG_LONG.
3829         * lib/printf-args.c (printf_fetchargs): Likewise.
3830         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3831         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3832         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3833         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3834         gl_AC_TYPE_LONG_LONG.
3835
3836 2006-10-11  Bruno Haible  <bruno@clisp.org>
3837
3838         * m4/longlong.m4: Add comments.
3839         * m4/ulonglong.m4: Likewise.
3840
3841 2006-10-10  Bruno Haible  <bruno@clisp.org>
3842
3843         Make it possible to #define stpcpy, strdup to aliases.
3844         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3845         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3846
3847 2006-10-10  Bruno Haible  <bruno@clisp.org>
3848
3849         Make it possible to #define gcd to an alias.
3850         * lib/gcd.c: Include config.h.
3851
3852 2006-10-10  Bruno Haible  <bruno@clisp.org>
3853
3854         Make it possible to #define c_isascii to an alias.
3855         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3856         defined. Undefine the macros before defining them, to avoid gcc
3857         warnings.
3858         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3859         define NO_C_CTYPE_MACROS early.
3860
3861 2006-10-10  Bruno Haible  <bruno@clisp.org>
3862
3863         Make it possible to #define set_program_name to an alias.
3864         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3865         ENABLE_RELOCATABLE early.
3866
3867 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3868
3869         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3870         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3871         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3872         More generally, don't assume that 64-bit signed int is available
3873         if unsigned int is, and vice versa.
3874         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3875         unsigned symbols, not on their signed counterparts.
3876         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3877         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3878         (UINT64_C, UINTMAX_C):
3879         Likewise.
3880         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3881         unsigned counterparts.
3882         (Have_long_long, Unsigned): New macros.
3883         (Int): Renamed from INT.
3884         (strtoimax): Use the new macros.
3885         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3886         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3887         * modules/inttypes (inttypes.h): Substitute
3888         HAVE_UNSIGNED_LONG_LONG_INT.
3889         * modules/stdint (stdint.h): Likewise.
3890         (Files): Add m4/ulonglong.m4.
3891
3892 2006-10-10  Bruno Haible  <bruno@clisp.org>
3893
3894         Fix a gcc -Wshadow warning.
3895         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3896         to 'bucket'.
3897         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3898         gl_linked_indexof_from_to): Likewise.
3899         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3900         Likewise.
3901         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3902         Likewise.
3903         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3904         Reported by Eric Blake.
3905
3906 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3907
3908         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3909         for NetBSD.  Problem reported by Bruno Haible.
3910
3911 2006-10-09  Jim Meyering  <jim@meyering.net>
3912
3913         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3914         Patch from Bruno Haible.
3915
3916 2006-10-09  Jim Meyering  <jim@meyering.net>
3917
3918         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3919         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3920         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3921
3922 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3923
3924         Don't include <config.h> twice; this doesn't work in some cases,
3925         e.g., when config.h has "#define intmax_t long long int" and
3926         we include <config.h>, <inttypes.h>, <config.h> in that order.
3927         Problem reported by Matthew Woehlke in:
3928         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3929         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3930         * lib/fts-cycle.c: Don't include config.h.
3931         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3932         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3933         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3934         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3935         inttypes.h.
3936         * lib/xstrtoumax.c: Likewise.
3937         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3938         __strtol and the like, so that this module is more like its siblings.
3939         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3940         Remove; no longer needed now that we assume gnulib inttypes.h.
3941
3942 2006-10-08  Bruno Haible  <bruno@clisp.org>
3943
3944         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3945         option.
3946
3947 2006-10-07  Jim Meyering  <jim@meyering.net>
3948
3949         * modules/inttypes (inttypes.h): Revert what seems to have been
3950         an inadvertent part of today's change: use "|", not "/" in the
3951         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3952
3953 2006-10-07  Bruno Haible  <bruno@clisp.org>
3954
3955         * modules/sublist: New file.
3956
3957 2006-10-07  Bruno Haible  <bruno@clisp.org>
3958
3959         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3960         * modules/argz (argz.h): Likewise.
3961         * modules/arpa_inet (arpa/inet.h): Likewise.
3962         * modules/byteswap (byteswap.h): Likewise.
3963         * modules/configmake (configmake.h): Likewise.
3964         * modules/fcntl (fcntl.h): Likewise.
3965         * modules/fnmatch (fnmatch.h): Likewise.
3966         * modules/getopt (getopt.h): Likewise.
3967         * modules/glob (glob.h): Likewise.
3968         * modules/inttypes (inttypes.h): Likewise.
3969         * modules/netinet_in (netinet/in.h): Likewise.
3970         * modules/poll (poll.h): Likewise.
3971         * modules/stdbool (stdbool.h): Likewise.
3972         * modules/stdint (stdint.h): Likewise.
3973         * modules/sys_select (sys/select.h): Likewise.
3974         * modules/sys_socket (sys/socket.h): Likewise.
3975         * modules/sys_stat (sys/stat.h): Likewise.
3976         * modules/sysexits (sysexits.h): Likewise.
3977         * modules/unistd (unistd.h): Likewise.
3978         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3979         Add a "DO NOT EDIT" comment to the generated file.
3980         (func_import): Likewise for gnulib-comp.m4.
3981
3982 2006-10-07  Bruno Haible  <bruno@clisp.org>
3983
3984         * lib/gl_sublist.h: New file.
3985         * lib/gl_sublist.c: New file.
3986
3987 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
3988
3989         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
3990         name (relative to the original working directory) and the file
3991         name component (relative to the temporary working directory).  All
3992         callers changed.
3993         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
3994         * lib/mkdir-p.c (make_dir_parents): Likewise.
3995         * lib/mkdir-p.h (make_dir_parents): Likewise.
3996
3997 2006-10-06  Eric Blake  <ebb9@byu.net>
3998
3999         Define several macros for use by the clean-temp module.
4000         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4001         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4002         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4003
4004         * lib/clean-temp.h (close_stream_temp): New declaration.
4005         * lib/clean-temp.c (includes): Pull in headers according to what
4006         other modules are in use.
4007         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4008
4009 2006-10-06  Bruno Haible  <bruno@clisp.org>
4010
4011         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4012         instead of fopen, fwriteerror.
4013
4014 2006-10-06  Bruno Haible  <bruno@clisp.org>
4015
4016         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4017         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4018         int.
4019         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4020         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4021         Return an error indicator.
4022         Suggested by Eric Blake.
4023
4024 2006-10-06  Bruno Haible  <bruno@clisp.org>
4025
4026         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4027         Reported by Eric Blake.
4028
4029 2006-10-06  Bruno Haible  <bruno@clisp.org>
4030
4031         * modules/closeout (Description): Mention stderr too.
4032
4033 2006-10-06  Bruno Haible  <bruno@clisp.org>
4034         and Paul Eggert  <eggert@cs.ucla.edu>
4035
4036         * lib/closeout.c (close_stdout): Also close stderr.
4037         * lib/closeout.h: Update comment.
4038
4039 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4040
4041         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4042         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4043         * lib/dirchownmod.c: Include lchown.h.
4044         * lib/lchown.c: Don't include files that lchown.h now includes.
4045         Don't declare chown, since lchown.h now does that.
4046         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4047         (lchown): Define to rpl_chown if lchown is declared but
4048         does not exist.  Declare using a prototype if lchown is not
4049         declared.  Add a copyright notice.
4050         * lib/mkstemp.h: Include <unistd.h>.
4051         * lib/openat.c: Include lchown.h.
4052
4053         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4054         we now test for that separately.
4055         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4056         rather than O_NOFOLLOW, when testing whether it's possible to
4057         avoid a race condition reliably.
4058         * lib/savewd.c (savewd_chdir): Likewise.
4059
4060         Remove macros that are no longer needed now that stdint.h is
4061         reliable.
4062         * lib/fsusage.c (UINTMAX_MAX): Remove.
4063         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4064         * lib/utimecmp.c (SIZE_MAX): Remove.
4065
4066         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4067
4068         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4069         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4070         O_NOATIME works.
4071
4072 2006-10-05  Bruno Haible  <bruno@clisp.org>
4073
4074         * lib/gl_list.h (gl_sortedlist_search_from_to,
4075         gl_sortedlist_indexof_from_to): New declarations.
4076         (gl_list_implementation): New fields sortedlist_search_from_to,
4077         sortedlist_indexof_from_to.
4078         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4079         inline functions.
4080         * lib/gl_list.c (gl_sortedlist_search_from_to,
4081         gl_sortedlist_indexof_from_to): New functions.
4082         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4083         function.
4084         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4085         (gl_array_sortedlist_search_from_to): New function.
4086         (gl_array_list_implementation): Update.
4087         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4088         function.
4089         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4090         (gl_carray_sortedlist_search_from_to): New function.
4091         (gl_carray_list_implementation): Update.
4092         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4093         gl_linked_sortedlist_indexof_from_to): New functions.
4094         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4095         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4096         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4097         gl_tree_sortedlist_indexof_from_to): New functions.
4098         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4099         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4100         Update.
4101         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4102         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4103         Update.
4104
4105 2006-10-05  Bruno Haible  <bruno@clisp.org>
4106
4107         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4108         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4109         (struct gl_list_implementation): Add fields search_from_to,
4110         indexof_from_to. Remove fields search, indexof.
4111         (gl_list_search): Use the search_from_to method.
4112         (gl_list_search_from, gl_list_search_from_to): New functions.
4113         (gl_list_indexof): Use the indexof_from_to method.
4114         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4115         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4116         (gl_list_search_from, gl_list_search_from_to): New functions.
4117         (gl_list_indexof): Use the indexof_from_to method.
4118         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4119         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4120         gl_array_indexof. Add start_index, end_index arguments.
4121         (gl_array_search_from_to): Renamed from gl_array_search. Add
4122         start_index, end_index arguments.
4123         (gl_array_remove, gl_array_list_implementation): Update.
4124         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4125         gl_carray_indexof. Add start_index, end_index arguments.
4126         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4127         start_index, end_index arguments.
4128         (gl_carray_remove, gl_carray_list_implementation): Update.
4129         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4130         gl_linked_search. Add start_index, end_index arguments.
4131         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4132         start_index, end_index arguments.
4133         (gl_linked_remove): Update.
4134         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4135         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4136         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4137         field to 'size_t'.
4138         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4139         gl_tree_search. Add start_index, end_index arguments.
4140         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4141         start_index, end_index arguments.
4142         (gl_tree_remove): Update.
4143         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4144         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4145         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4146         function.
4147         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4148         gl_tree_search. Add start_index, end_index arguments.
4149         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4150         start_index, end_index arguments.
4151         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4152         Update.
4153         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4154
4155 2006-10-05  Bruno Haible  <bruno@clisp.org>
4156
4157         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4158
4159         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4160         fwriteerror_temp): New declarations.
4161         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4162         (descriptors): New variable.
4163         (cleanup): First, close the descriptors.
4164         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4165         fclose_temp, fwriteerror_temp): New functions.
4166
4167 2006-10-04  Jim Meyering  <jim@meyering.net>
4168
4169         * lib/fts.c (fts_open): Tiny comment change.
4170
4171 2006-10-04  Bruno Haible  <bruno@clisp.org>
4172
4173         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4174         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4175         gl_LOCK_BODY.
4176         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4177         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4178         gl_LOCK_EARLY_BODY.
4179         (gl_LOCK): Require gl_LOCK_BODY.
4180
4181 2006-10-04  Bruno Haible  <bruno@clisp.org>
4182
4183         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4184         (gl_oset_search_atleast): New declaration.
4185         (struct gl_oset_implementation): Add field 'search_atleast'.
4186         (gl_oset_search_atleast): New inline function.
4187         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4188         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4189         (gl_array_oset_implementation): Update.
4190         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4191         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4192         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4193
4194 2006-10-04  Bruno Haible  <bruno@clisp.org>
4195
4196         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4197
4198 2006-10-03  Bruno Haible  <bruno@clisp.org>
4199
4200         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4201         from gl_avltreehash_list_implementation.
4202
4203 2006-10-03  Bruno Haible  <bruno@clisp.org>
4204
4205         * lib/gl_oset.c (gl_oset_add): Fix return type.
4206
4207 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4208
4209         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4210
4211 2006-10-02  Eric Blake  <ebb9@byu.net>
4212
4213         * modules/strnlen (Depends-on): Add extensions.
4214
4215 2006-10-02  Eric Blake  <ebb9@byu.net>
4216
4217         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4218         definition in 2.60+.
4219
4220 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4221
4222         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4223         checks.
4224
4225 2006-10-02  Bruno Haible  <bruno@clisp.org>
4226
4227         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4228         to the AUTOMAKE_OPTIONS.
4229         Reported by Jim Meyering.
4230
4231 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4232
4233         Work around bug in Solaris 10 /proc file system:
4234         /proc/self/fd/NNN/.. isn't the parent directory of
4235         the directory whose file descriptor is NNN.  This needs to
4236         be worked around at run time, not compile time, since a
4237         program might be built on Solaris 8, where things work, and
4238         run on Solaris 10.
4239         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4240         to use the following interface instead:
4241         (OPENAT_BUFFER_SIZE): New macro.
4242         (openat_proc_name): New function.
4243         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4244         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4245         Likewise.
4246         * lib/openat-proc.c: New file.
4247         * modules/openat (Files): Add lib/openat-proc.c.
4248         (Depends-on): Add same-inode, stdbool.
4249         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4250
4251 2006-09-29  Bruno Haible  <bruno@clisp.org>
4252
4253         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4254         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4255         argument. Set stdout_closed before testing for ferror, not after.
4256         (fwriteerror, fwriteerror_no_ebadf): New functions.
4257
4258 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4259
4260         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4261
4262 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4263
4264         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4265         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4266
4267 2006-09-28  Jim Meyering  <jim@meyering.net>
4268
4269         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4270         Include <unistd.h>.
4271
4272 2006-09-28  Bruno Haible  <bruno@clisp.org>
4273
4274         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4275         * modules/linkedhash-list (Depends-on): Likewise.
4276         * modules/rbtreehash-list (Depends-on): Likewise.
4277
4278 2006-09-28  Bruno Haible  <bruno@clisp.org>
4279
4280         * lib/strndup.h: Simplify the redefinition of strndup.
4281         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4282         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4283
4284 2006-09-28  Bruno Haible  <bruno@clisp.org>
4285
4286         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4287         * lib/gl_linkedhash_list.c: Likewise.
4288         * lib/gl_rbtreehash_list.c: Likewise.
4289
4290 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4291
4292         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4293         getaddrinfo.
4294
4295         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4296         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4297         it causes <stdio_ext.h> to cause a compile-time error.
4298         Problem reported by Nelson H. F. Beebe.
4299         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4300         of HAVE_DECL___PENDING.
4301
4302         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4303         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4304         declaration.
4305
4306 2006-09-27  Jim Meyering  <jim@meyering.net>
4307
4308         This file could end up with a definition for a function
4309         named __strndup, rather than rpl_strndup on a system with
4310         incomplete weak_alias support.
4311         * lib/strndup.c (strndup): Rename from __strndup.
4312         Remove #defines that used to map __strndup to strndup.
4313         Don't use K&R prototypes.
4314         Remove LIBC-related code, since this file is not sync'd with glibc.
4315         * lib/strndup.h: Revamp, accordingly.
4316         * m4/strndup.m4: Modernize.
4317
4318 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4319
4320         * modules/savewd (Depends-on): Add 'raise'.
4321         * lib/savewd.c: Include <signal.h>, for 'raise'.
4322
4323 2006-09-26  Jim Meyering  <jim@meyering.net>
4324
4325         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4326         when we detect Darwin 8.7.0's acl_get_file bug.
4327         Rearrange to perform the new (below) run-test while $LIBS
4328         contains any acl-related library.  Set USE_ACL at the end.
4329         (gl_ACL_GET_FILE): New function.
4330
4331 2006-09-26  Eric Blake  <ebb9@byu.net>
4332
4333         * lib/verror.c: Include <config.h> unconditionally.
4334
4335 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4336
4337         * modules/clock-time (Maintainer): Add self.
4338         * modules/getlogin_r (Depends-on): Add extensions.
4339
4340 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4341
4342         * modules/clock-time: New module.
4343         * modules/nanosleep (Depends-on): Add clock-time.
4344         * modules/gethrxtime (Depends-on): Likewise.
4345         * modules/gettime (Depends-on): Likewise.
4346         * modules/settime (Depends-on): Likewise.
4347
4348         * modules/fts-lgpl: Depend on openat.
4349         * modules/mkancesdirs: Depend on savewd.
4350         * modules/mkdir-p: Likewise.
4351
4352 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4353
4354         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4355
4356         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4357         `gl_have_arbitrary_file_name_length_limit' to
4358         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4359         actually works between configure runs.
4360
4361 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4362             Bruno Haible  <bruno@clisp.org>
4363
4364         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4365
4366 2006-09-25  Jim Meyering  <jim@meyering.net>
4367
4368         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4369         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4370
4371 2006-09-25  Eric Blake  <ebb9@byu.net>
4372
4373         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4374         exec's in 2006-09-18 patch when shuffling fds.
4375
4376 2006-09-25  Bruno Haible  <bruno@clisp.org>
4377
4378         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4379         Reported by Jim Meyering.
4380
4381 2006-09-24  Jim Meyering  <jim@meyering.net>
4382
4383         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4384         compare a pointer against a literal "0".  That caused failures with
4385         at least HP-UX's hpcc.
4386
4387 2006-09-22  Simon Josefsson  <jas@extundo.com>
4388
4389         * modules/gc-sha1:
4390         * modules/gc-md4:
4391         * modules/gc-hmac-sha1:
4392         * modules/gc-hmac-md5:
4393         * modules/gc-des:
4394         * modules/gc-arcfour: Distribute more files.
4395
4396 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4397
4398         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4399         (gl_linked_iterator_from_to): Initialize struct completely.
4400         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4401         (gl_tree_iterator_from_to): Likewise
4402         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4403         * lib/gl_array_list.c [lint] (gl_array_iterator)
4404         (gl_array_iterator_from_to): Likewise.
4405         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4406         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4407         (gl_carray_iterator_from_to): Likewise.
4408
4409         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4410         * lib/md4.c (md4_process_block): Remove unused variable.
4411         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4412         parentheses for clarity.
4413
4414 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4415
4416         * modules/bison-i18n (Depends-on): Add gettext.
4417
4418 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4419
4420         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4421         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4422         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4423         also add missing comma that caused broken test.
4424         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4425         stdlib.h, for `abort'.
4426         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4427         variables.
4428         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4429         include unistd.h if present, for `rmdir'.
4430         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4431         variables.
4432         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4433         in the process include standard headers for prototypes.
4434         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4435         gets declared on GNU/Linux.
4436         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4437         unistd.h, for `rmdir'.
4438         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4439
4440         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4441         always true.
4442         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4443
4444         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4445
4446 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4447
4448         * gnulib-tool (func_version): Create output all at once.  This
4449         may help avoid triggering unnecessary SIGPIPEs, and at any
4450         rate it doesn't hurt.
4451
4452 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4453             Bruno Haible  <bruno@clisp.org>
4454
4455         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4456         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4457         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4458
4459         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4460         (gl_FUNC_VASPRINTF): Invoke it.
4461
4462 2006-09-22  Bruno Haible  <bruno@clisp.org>
4463
4464         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4465         getloadavg.c as first argument.
4466
4467 2006-09-22  Bruno Haible  <bruno@clisp.org>
4468
4469         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4470         at the beginning of the gl_INIT macro.
4471         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4472         gl_GETLOADAVG.
4473
4474 2006-09-22  Bruno Haible  <bruno@clisp.org>
4475
4476         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4477         module.
4478         Suggested by Ralf Wildenhues.
4479
4480 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4481
4482         Import this patch from libc:
4483
4484         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4485
4486         * lib/regex_internal.c (re_string_reconstruct): Handle
4487         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4488         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4489         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4490         re_string_context_at.
4491
4492         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4493         now requires it.
4494         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4495         gl_REGEX now does it for us.
4496         (gl_REGEX): Add test taken from
4497         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4498
4499         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4500         Check that large offsets work.  Modernize Autoconf usages.
4501         Prefer "yes" to mean a good thing rather than a bad.
4502         Don't put "#define mkstemp" in config.h, as this might interfere
4503         with standard system headers that "#define mkstemp mkstemp64".
4504
4505         * modules/mkstemp (Depends-on): Add extensions, so that
4506         mkstemp is visible on some platforms.
4507         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4508         (Include): Change to "mkstemp.h" from <stdlib.h>.
4509         (Files): Add mkstemp.h.
4510
4511         * lib/mkstemp.h: New file, since some standard headers
4512         #define mkstemp.
4513         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4514         Include "mkstemp.h".
4515         Make the _LIBC code resemble glibc original more,
4516         e.g., use K&R style.
4517         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4518         (mkstemp): Remove, since mkstemp.h does this for us.
4519         * lib/stdlib--.h: Include mkstemp.h.
4520
4521         Import this patch from libc:
4522
4523         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4524
4525         * lib/tempname.c (__gen_tempname): Change attempts_min
4526         into a macro.  Use preprocessor to decide how to initialize
4527         attempts [Coverity CID 67].
4528
4529 2006-09-20  Bruno Haible  <bruno@clisp.org>
4530
4531         * lib/mkdtemp.c: Import from libc.
4532         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4533                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4534                 attempts_min into a macro.  Use preprocessor to decide how to
4535                 initialize attempts [Coverity CID 67].
4536         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4537                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4538                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4539
4540 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4541
4542         * gnulib-tool (func_exit): New function, to allow to pass the
4543         exit status portably through the trap.  Use everywhere.
4544         (--help, --version): Signal a write error.
4545         (trap): catch SIGPIPE, for write errors.
4546         Exit at the end of the trap, with the correct exit status.
4547
4548 2006-09-19  Karl Berry  <karl@gnu.org>
4549
4550         * doc/gnulib.texi: note about the license texinfo files.
4551
4552 2006-09-19  Eric Blake  <ebb9@byu.net>
4553
4554         * gnulib-tool: Avoid space-tab.
4555
4556 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4557
4558         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4559         that prevented coreutils 6.1 from building.  Problem reported
4560         by Petter Reinholdtsen.
4561
4562 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4563
4564         * gnulib-tool (avoidlist): Fix typo that broke options like
4565         --avoid=lock that are used by coreutils bootstrap.
4566
4567 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4568
4569         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4570         more systematically.
4571
4572 2006-09-18  Jim Meyering  <jim@meyering.net>
4573
4574         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4575
4576 2006-09-18  Bruno Haible  <bruno@clisp.org>
4577
4578         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4579
4580 2006-09-18  Bruno Haible  <bruno@clisp.org>
4581
4582         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4583         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4584         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4585         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4586         * m4/gettext.m4: Require autoconf >= 2.52.
4587         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4588         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4589         of gl_cv_header_inttypes_h.
4590
4591 2006-09-18  Bruno Haible  <bruno@clisp.org>
4592
4593         * lib/javaversion.c: Include configmake.h.
4594
4595 2006-09-18  Bruno Haible  <bruno@clisp.org>
4596
4597         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4598         avoid that the while loops be executed in a subshell.
4599
4600 2006-09-18  Bruno Haible  <bruno@clisp.org>
4601
4602         * MODULES.html.sh (func_module): Break long lines.
4603         Suggested by Bruce Korb <bkorb@gnu.org>.
4604
4605 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4606
4607         Speed up by a factor of 1.12.
4608         * gnulib-tool (nl): New variable.
4609         (func_import): Rewrite include directive extraction to only read each
4610         directive once.
4611
4612 2006-09-17  Bruno Haible  <bruno@clisp.org>
4613
4614         * modules/javaversion (Makefile.am): Remove DEFS setting.
4615         (Depends-on): Add configmake, for PKGDATADIR definition.
4616
4617 2006-09-17  Bruno Haible  <bruno@clisp.org>
4618
4619         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4620
4621 2006-09-17  Bruno Haible  <bruno@clisp.org>
4622
4623         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4624         (func_modules_transitive_closure, func_modules_add_dummy,
4625         func_modules_to_filelist, func_import, func_create_testdir,
4626         func_create_megatestdir, ...): Use it wherever possible.
4627         Suggested by Ralf Wildenhues.
4628
4629 2006-09-16  Karl Berry  <karl@gnu.org>
4630
4631         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4632         to avoid sectioning errors.
4633         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4634         [ifinfo]: blank line after @center-ed titles.
4635         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4636         Spell FSF address consistently with others.
4637         (These changes approved by rms.)
4638
4639 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4640
4641         Speed up by a factor of 1.61.
4642         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4643         already checked module names again.
4644
4645 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4646
4647         Speed up by a factor of 1.13.
4648         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4649         for new_files, and the input to func_add_or_update.
4650
4651 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4652
4653         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4654         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4655
4656 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4657
4658         * modules/mkancesdirs (Depends-on): Add fcntl.
4659         * modules/savewd: New file.
4660         * MODULES.html.sh (File system functions): Add savewd.
4661
4662         * modules/configmake (Makefile.am): Add support for the
4663         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4664
4665 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4666
4667         * m4/savewd.m4: New file.
4668
4669 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4670
4671         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4672         (dirchownmod): New arg FD.  All callers changed.
4673         Use FD rather than opening the directory ourself, as opening is
4674         now the caller's responsibility.
4675         * lib/dirchownmod.h: Likewise.
4676         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4677         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4678         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4679         (test_dir): Remove.
4680         (mkancesdirs): Return length of prefix of FILE that has already
4681         been made, or -2 if there is a child doing the work.  Redo
4682         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4683         ".", and treat ".." specially since it might stray back into
4684         already-created areas.  Use a subprocess if necessary.  New arg
4685         WD; all users changed.  MAKE_DIR function should now return 1
4686         if it creates a directory that is not readable.  Return -2 if
4687         a child process is spun off.
4688         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4689         Adjust signature to match code.
4690         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4691         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4692         all users changed.
4693         * lib/savewd.c, lib/savewd.h: New files.
4694
4695 2006-09-15  Jim Meyering  <jim@meyering.net>
4696
4697         * modules/rename-dest-slash: New module.
4698         * MODULES.html.sh (posix_compat): Add it here.
4699
4700         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4701
4702 2006-09-15  Jim Meyering  <jim@meyering.net>
4703
4704         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4705         file.
4706
4707         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4708
4709 2006-09-15  Jim Meyering  <jim@meyering.net>
4710
4711         * lib/rename-dest-slash.c (has_trailing_slash): Use
4712         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4713         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4714         test before testing whether SRC is a directory.
4715         Suggestions from Bruno Haible.
4716
4717         Avoid a warning about an unused variable.
4718         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4719         into the #ifdef block where it's used.
4720
4721         * lib/rename-dest-slash.c: New file.
4722
4723 2006-09-14  Bruno Haible  <bruno@clisp.org>
4724
4725         * lib/allocsa.c: Include <config.h> unconditionally.
4726         * lib/asnprintf.c: Likewise.
4727         * lib/asprintf.c: Likewise.
4728         * lib/c-strcasecmp.c: Likewise.
4729         * lib/c-strcasestr.c: Likewise.
4730         * lib/c-strncasecmp.c: Likewise.
4731         * lib/c-strstr.c: Likewise.
4732         * lib/classpath.c: Likewise.
4733         * lib/clean-temp.c: Likewise.
4734         * lib/concatpath.c: Likewise.
4735         * lib/copy-file.c: Likewise.
4736         * lib/csharpcomp.c: Likewise.
4737         * lib/csharpexec.c: Likewise.
4738         * lib/execute.c: Likewise.
4739         * lib/fatal-signal.c: Likewise.
4740         * lib/findprog.c: Likewise.
4741         * lib/fwriteerror.c: Likewise.
4742         * lib/gl_array_list.c: Likewise.
4743         * lib/gl_array_oset.c: Likewise.
4744         * lib/gl_avltree_list.c: Likewise.
4745         * lib/gl_avltree_oset.c: Likewise.
4746         * lib/gl_avltreehash_list.c: Likewise.
4747         * lib/gl_carray_list.c: Likewise.
4748         * lib/gl_linked_list.c: Likewise.
4749         * lib/gl_linkedhash_list.c: Likewise.
4750         * lib/gl_list.c: Likewise.
4751         * lib/gl_oset.c: Likewise.
4752         * lib/gl_rbtree_list.c: Likewise.
4753         * lib/gl_rbtree_oset.c: Likewise.
4754         * lib/gl_rbtreehash_list.c: Likewise.
4755         * lib/imaxabs.c: Likewise.
4756         * lib/imaxdiv.c: Likewise.
4757         * lib/javacomp.c: Likewise.
4758         * lib/javaexec.c: Likewise.
4759         * lib/javaversion.c: Likewise.
4760         * lib/linebreak.c: Likewise.
4761         * lib/localcharset.c: Likewise.
4762         * lib/lock.c: Likewise.
4763         * lib/mbchar.c: Likewise.
4764         * lib/mbswidth.c: Likewise.
4765         * lib/mkdtemp.c: Likewise.
4766         * lib/pipe.c: Likewise.
4767         * lib/printf-args.c: Likewise.
4768         * lib/printf-parse.c: Likewise.
4769         * lib/progname.c: Likewise.
4770         * lib/progreloc.c: Likewise.
4771         * lib/readlink.c: Likewise.
4772         * lib/sh-quote.c: Likewise.
4773         * lib/stpcpy.c: Likewise.
4774         * lib/stpncpy.c: Likewise.
4775         * lib/strcasecmp.c: Likewise.
4776         * lib/strcasestr.c: Likewise.
4777         * lib/strcspn.c: Likewise.
4778         * lib/striconv.c: Likewise.
4779         * lib/strncasecmp.c: Likewise.
4780         * lib/strnlen1.c: Likewise.
4781         * lib/strstr.c: Likewise.
4782         * lib/strtok_r.c: Likewise.
4783         * lib/tls.c: Likewise.
4784         * lib/tmpdir.c: Likewise.
4785         * lib/unicodeio.c: Likewise.
4786         * lib/unsetenv.c: Likewise.
4787         * lib/vasnprintf.c: Likewise.
4788         * lib/vasprintf.c: Likewise.
4789         * lib/wait-process.c: Likewise.
4790         * lib/xallocsa.c: Likewise.
4791         * lib/xsetenv.c: Likewise.
4792         * lib/xstriconv.c: Likewise.
4793
4794 2006-09-13  Simon Josefsson  <jas@extundo.com>
4795
4796         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4797         that internally, suggested by Ralf Wildenhues
4798         <Ralf.Wildenhues@gmx.de>.
4799
4800 2006-09-13  Simon Josefsson  <jas@extundo.com>
4801
4802         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4803         @LIBOBJS@.
4804         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4805
4806 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4807
4808         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4809         longer worry about uses that don't define HAVE_CONFIG_H.
4810         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4811         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4812         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4813         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4814         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4815         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4816         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4817         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4818         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4819         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4820         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4821         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4822         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4823         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4824         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4825         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4826         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4827         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4828         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4829         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4830         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4831         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4832         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4833         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4834         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4835         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4836         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4837         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4838         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4839         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4840         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4841         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4842         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4843         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4844         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4845         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4846         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4847         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4848         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4849         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4850         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4851         Likewise.
4852
4853 2006-09-13  Eric Blake  <ebb9@byu.net>
4854
4855         * lib/getopt.c: Fix typo in last commit.
4856
4857 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4858
4859         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4860         dgettext.
4861
4862 2006-09-12  Jim Meyering  <jim@meyering.net>
4863
4864         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4865         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4866         Reported by Nelson H. F. Beebe.
4867
4868 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4869
4870         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4871         program_invocation_name and program_invocation_short_name are
4872         initialized.
4873         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4874         and program_invocation_short_name to argp.h, so they are visible
4875         to user programs.
4876         * lib/argp.h: Likewise
4877
4878 2006-09-10  Bruno Haible  <bruno@clisp.org>
4879
4880         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4881         m4/inttypes_h.m4, m4/uintmax_t.m4.
4882
4883 2006-09-10  Bruno Haible  <bruno@clisp.org>
4884
4885         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4886         gl_AC_TYPE_UINTMAX_T.
4887
4888 2006-09-10  Bruno Haible  <bruno@clisp.org>
4889
4890         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4891
4892 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4893
4894         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4895         convention.  Text proposed by Bruno Haible.
4896         (struct argp_option): Document the use of N_() wrappers.
4897
4898         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4899         '\v', and translate the two parts separately, instead of feeding
4900         the whole string to gettext.  This allows to exclude
4901         '\v' from the strings visible to the translator by writing doc
4902         strings as N_("..") "\v" N_("..").
4903
4904 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4905
4906         * config/srclist.txt: Undo latest change; the bug was fixed.
4907
4908 2006-09-09  Bruno Haible  <bruno@clisp.org>
4909
4910         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4911         assignments if building a library without libtool.
4912         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4913         in func_emit_lib_Makefile_am.
4914         (func_import): When building a static library libfoo.a, arrange to
4915         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4916         (func_create_testdir): Likewise.
4917         * modules/gc (configure.ac, Makefile.am): If building statically,
4918         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4919         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4920         * modules/striconv (configure.ac, Makefile.am): Likewise.
4921         Based on a suggestion by Ralf Wildenhues.
4922
4923 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4924
4925         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4926         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4927         Also:
4928
4929         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4930         Add year_2050_test to catch glibc bug 2821
4931         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4932
4933         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4934         Prefer #ifdef to #if.
4935
4936         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4937         Return from 'main' instead of calling 'exit'.
4938
4939 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4940
4941         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4942         returned the maximum time_t value rather than (time_t) -1.
4943         Problem originally reported by William Bardwell
4944         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4945
4946         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4947         Moved to here ...
4948         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4949         ... from here.
4950
4951 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4952
4953         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4954         2821 is fixed.
4955
4956 2006-09-08  Jim Meyering  <jim@meyering.net>
4957
4958         Don't make generated files read-only.  That would bother too many
4959         people.  However, do retain the ability to work when targets are
4960         read-only: remove the destination and temporary files before writing
4961         them (when generated via sed or echo), or by using the -f option for
4962         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4963         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4964         * modules/byteswap, modules/configmake, modules/fcntl:
4965         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4966         * modules/localcharset, modules/netinet_in, modules/poll:
4967         * modules/stdbool, modules/stdint, modules/sys_select:
4968         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4969
4970 2006-09-08  Jim Meyering  <jim@meyering.net>
4971
4972         Avoid new build failure on FreeBSD 6.0.
4973         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
4974         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
4975         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
4976
4977 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4978
4979         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
4980
4981 2006-09-07  Jim Meyering  <jim@meyering.net>
4982
4983         Fix global typo in last change: use chmod u-w, not chmod u-x.
4984         Spotted by Paul Eggert and Bruce Korb.
4985         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4986         * modules/byteswap, modules/configmake, modules/fcntl:
4987         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4988         * modules/localcharset, modules/netinet_in, modules/poll:
4989         * modules/stdbool, modules/stdint, modules/sys_select:
4990         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4991
4992 2006-09-06  Jim Meyering  <jim@meyering.net>
4993
4994         Make generated files be read-only.
4995         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
4996         Ensure that each generated file is now read-only.
4997         * modules/argz: Likewise.
4998         * modules/arpa_inet: Likewise.
4999         * modules/byteswap: Likewise.
5000         * modules/configmake: Likewise.
5001         * modules/fcntl: Likewise.
5002         * modules/fnmatch: Likewise.
5003         * modules/getopt: Likewise.
5004         * modules/glob: Likewise.
5005         * modules/inttypes: Likewise.
5006         * modules/netinet_in: Likewise.
5007         * modules/poll: Likewise.
5008         * modules/stdbool: Likewise.
5009         * modules/stdint: Likewise.
5010         * modules/sys_select: Likewise.
5011         * modules/sys_socket: Likewise.
5012         * modules/sys_stat: Likewise.
5013         * modules/sysexits: Likewise.
5014         * modules/localcharset: Same as above, but continue using temporary
5015         file named "t-$@" (why different?) rather than the "$@-t" used
5016         everywhere else.
5017
5018         * modules/sysexits (Makefile.am): Replace literal occurrences
5019         of "sysexit.h" more readable, and more consistent, "$@".
5020
5021 2006-09-06  Bruno Haible  <bruno@clisp.org>
5022
5023         * modules/striconv: New file.
5024         * modules/xstriconv: New file.
5025         * MODULES.html.sh (Internationalization functions): Add striconv,
5026         xstriconv.
5027
5028 2006-09-06  Bruno Haible  <bruno@clisp.org>
5029
5030         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5031         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5032         not using libtool correctly.
5033
5034 2006-09-06  Bruno Haible  <bruno@clisp.org>
5035
5036         * lib/striconv.h: New file.
5037         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5038         iconvstring.c.
5039         * lib/xstriconv.h: New file.
5040         * lib/xstriconv.c: New file.
5041
5042 2006-09-06  Bruno Haible  <bruno@clisp.org>
5043
5044         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5045         lib_..._LDFLAGS.
5046
5047 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5048
5049         * lib/argz_.h: Sync from Libtool.
5050
5051         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5052                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5053
5054         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5055
5056 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5057
5058         * modules/trim: New file.
5059
5060 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5061
5062         * lib/trim.h: New file.
5063         * lib/trim.c: New file.
5064
5065 2006-09-05  Bruno Haible  <bruno@clisp.org>
5066
5067         * MODULES.html.sh (String handling): Add trim.
5068
5069 2006-09-04  Karl Berry  <karl@gnu.org>
5070
5071         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5072         until next release.
5073
5074 2006-09-03  Bruno Haible  <bruno@clisp.org>
5075
5076         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5077         correctly.
5078
5079 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5080
5081         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5082         not gl_GETLOADAVG.  Omit unneeded semicolons.
5083         Problems reported by Ralf Wildenhues in
5084         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5085         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5086         at the end, which is the usual gnulib style.
5087
5088         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5089         of doing all the work ourselves.
5090         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5091         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5092
5093 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5094
5095         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5096         Problem reported by Ralf Wildenhues in
5097         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5098
5099         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5100         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5101
5102 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5103
5104         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5105         yesterday's patch by changing test -n to test -z.
5106
5107 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5108
5109         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5110         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5111         the former is now obsolescent.
5112
5113         * modules/chdir-long (Depends-on): Add fcntl.
5114
5115 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5116
5117         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5118         obsolescent, and programs should use gnulib instead.
5119         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5120         but with prefixes changed.
5121
5122 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5123
5124         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5125         or stdbool.h, because they might not exist while configuring.
5126
5127         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5128         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5129         does that for us.
5130         (O_DIRECTORY): Remove.
5131
5132 2006-08-31  Eric Blake  <ebb9@byu.net>
5133
5134         * gnulib-tool: Don't let emacs change spaces to TAB.
5135
5136 2006-08-31  Bruno Haible  <bruno@clisp.org>
5137
5138         * gnulib-tool: When calling func_import more than once, do it in a
5139         subshell.
5140         Reported by Eric Blake <ebb9@byu.net>.
5141
5142 2006-08-31  Bruno Haible  <bruno@clisp.org>
5143
5144         * gnulib-tool (nl): Remove variable.
5145         (sed_transform_lib_file): Use more robust test for config-h module.
5146         (func_import): Fix typo in 2006-08-25 patch.
5147
5148 2006-08-31  Bruno Haible  <bruno@clisp.org>
5149
5150         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5151         specified, augment Makefile.am variables instead of assigning them.
5152
5153 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5154
5155         Work around a bug in both the Linux and SunOS 64-bit kernels:
5156         nanosleep mishandles sleeps for longer than 2**31 seconds.
5157         Problem reported by Frank v Waveren in
5158         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5159         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5160         Check for nanosleep bug.
5161         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5162
5163 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5164
5165         Work around a bug in both the Linux and SunOS 64-bit kernels:
5166         nanosleep mishandles sleeps for longer than 2**31 seconds.
5167         Problem reported by Frank v Waveren in
5168         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5169         * lib/nanosleep.c (BILLION): New constant.
5170         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5171         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5172         implementation.
5173
5174 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5175
5176         * modules/nanosleep (Depends-on): Add gettime.
5177
5178 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5179         and Simon Josefsson  <jas@extundo.com>
5180         and Oskar Liljeblad  <oskar@osk.mine.nu>
5181
5182         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5183         * gnulib-tool (func_import): New license type 'unmodifiable license
5184         text'.
5185         * modules/fdl: Use it.  Longer description.
5186         * module/gpl, module/lgpl: New files.
5187
5188 2006-08-30  Jim Meyering  <jim@meyering.net>
5189
5190         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5191         shadowing the parameter.
5192
5193 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5194
5195         Sync from Libtool:
5196
5197         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5198
5199         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5200         sharing with gnulib.  Report by Eric Blake.
5201
5202 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5203
5204         * modules/isapipe: New file.
5205         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5206
5207 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5208
5209         * modules/configmake (Makefile.am): Add a comment, and omit
5210         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5211         by Bruno Haible.
5212
5213 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5214
5215         * m4/isapipe.m4: New file.
5216
5217 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5218
5219         * lib/isapipe.c, lib/isapipe.h: New files.
5220
5221 2006-08-29  Jim Meyering  <jim@meyering.net>
5222
5223         * modules/configmake (Makefile.am): Make configmake.h depend on
5224         Makefile.  Otherwise, a stale configmake.h could hang around.
5225
5226 2006-08-29  Eric Blake  <ebb9@byu.net>
5227
5228         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5229         resolution of upstream bug 3044.
5230
5231 2006-08-29  Bruno Haible  <bruno@clisp.org>
5232
5233         * modules/localcharset (Depends-on): Add configmake.
5234         (Makefile.am): Remove setting of LIBDIR through DEFS.
5235
5236 2006-08-29  Bruno Haible  <bruno@clisp.org>
5237
5238         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5239         defined.
5240
5241 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5242
5243         * modules/fcntl: New file.
5244         * modules/chdir-safer (Depends-on): Add fcntl.
5245         * modules/fts: Likewise.
5246         * modules/mkdir-p: Likewise.
5247
5248         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5249         This undoes the most recent change, since we're now addressing the
5250         problem in a different way.
5251
5252         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5253         into output, since the output might be called Makefile.am even
5254         if $makefile_name is something different.
5255         (func_import): Use $makefile_am rather than
5256         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5257         empty.
5258
5259         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5260
5261 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5262
5263         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5264         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5265         recent change to stdint.m4, since we're now addressing the problem in a
5266         different way.
5267
5268 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5269
5270         * m4/fcntl_h.m4: New file.
5271
5272 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5273
5274         * lib/fcntl_.h: New file.
5275         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5276         the fcntl module.
5277         * lib/dirchownmod.c: Likewise.
5278         * lib/fts.c: Likewise.
5279
5280         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5281         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5282         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5283         just before including <inttypes.h>, to avoid circular inclusion.
5284
5285 2006-08-28  Jim Meyering  <jim@meyering.net>
5286
5287         * doc/visibility.texi: Actually read and correct the grammar of the
5288         sentence affected by yesterday's change.
5289
5290 2006-08-28  Eric Blake  <ebb9@byu.net>
5291
5292         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5293         needs wrapper.
5294
5295 2006-08-28  Eric Blake  <ebb9@byu.net>
5296
5297         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5298
5299 2006-08-28  Eric Blake  <ebb9@byu.net>
5300
5301         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5302
5303 2006-08-28  Bruno Haible  <bruno@clisp.org>
5304
5305         * modules/c-strstr: New file, from GNU gettext.
5306         * MODULES.html.sh (String handling): Add c-strstr.
5307
5308 2006-08-28  Bruno Haible  <bruno@clisp.org>
5309
5310         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5311         macros.
5312         Reported by Eric Blake.
5313
5314 2006-08-28  Bruno Haible  <bruno@clisp.org>
5315
5316         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5317         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5318         * lib/vasprintf.c: Include errno.h, limits.h.
5319         (EOVERFLOW): New fallback definition.
5320         (vasprintf): Test here whether the string length is > INT_MAX.
5321         * lib/vsnprintf.c: Include errno.h, limits.h.
5322         (EOVERFLOW): New fallback definition.
5323         (vsnprintf): Fix bug when generated string was too long for the buffer.
5324         Test here whether the string length is > INT_MAX.
5325
5326 2006-08-28  Bruno Haible  <bruno@clisp.org>
5327
5328         * lib/inttypes_.h (SCNX*): Remove definitions.
5329         Reported by Eric Blake.
5330
5331 2006-08-28  Bruno Haible  <bruno@clisp.org>
5332
5333         * lib/c-strstr.h: New file, from GNU gettext.
5334         * lib/c-strstr.c: New file, from GNU gettext.
5335
5336 2006-08-28  Bruno Haible  <bruno@clisp.org>
5337
5338         * gnulib-tool: Reorder some statements.
5339
5340 2006-08-28  Bruno Haible  <bruno@clisp.org>
5341
5342         * gnulib-tool: New option --makefile-name.
5343         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5344         $makefile_name.
5345         (func_import): Write $makefile_name to the cache file, and read it from
5346         there unless explicitly specified. Use $makefile_name as file name
5347         instead of Makefile.am. Adjust the recommendations accordingly.
5348
5349 2006-08-28  Bruno Haible  <bruno@clisp.org>
5350
5351         * gnulib-tool (func_verify_module): Check against misapplying patch.
5352
5353 2006-08-28  Bruno Haible  <bruno@clisp.org>
5354
5355         * gnulib-tool (func_relativize, func_relconcat): New functions.
5356         Give an error if --local-dir is given with --update.
5357         Remove trailing slashes from $local_gnulib_dir.
5358         (func_import): Store the relativized $local_gnulib_dir in
5359         gnulib-cache.m4, and read it from there if not specified explicitly.
5360
5361 2006-08-28  Bruno Haible  <bruno@clisp.org>
5362
5363         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5364         is the current directory. Respect also $local_gnulib_dir.
5365
5366 2006-08-28  Bruno Haible  <bruno@clisp.org>
5367             Simon Josefsson  <jas@extundo.com>
5368
5369         BeOS portability.
5370         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5371
5372 2006-08-27  Jim Meyering  <jim@meyering.net>
5373
5374         * doc/visibility.texi: Remove duplicate word: "pointer".
5375
5376 2006-08-26  Bruno Haible  <bruno@clisp.org>
5377
5378         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5379         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5380         (Makefile.am): Create inttypes.h from inttypes_.h.
5381         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5382
5383         * modules/imaxabs: New file.
5384
5385         * modules/imaxdiv: New file.
5386
5387 2006-08-26  Bruno Haible  <bruno@clisp.org>
5388
5389         * m4/inttypes.m4: New file.
5390         * m4/_inttypes_h.m4: Remove file.
5391         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5392         PRI_MACROS_BROKEN.
5393         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5394
5395         * m4/imaxabs.m4: New file.
5396
5397         * m4/imaxdiv.m4: New file.
5398
5399 2006-08-26  Bruno Haible  <bruno@clisp.org>
5400
5401         * lib/inttypes_.h: New file.
5402         * lib/inttypes.h: Remove file.
5403         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5404
5405         * lib/imaxabs.c: New file.
5406
5407         * lib/imaxdiv.c: New file.
5408
5409 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5410
5411         New config-h module, so that "make" output needn't be cluttered
5412         by -DHAVE_CONFIG_H.
5413         * MODULES.html.sh (Support for building libraries and executables):
5414         Add config-h.
5415         * modules/config-h: New file.
5416         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5417         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5418         the config-h module is used.
5419
5420         New configmake module, so that "make" output needn't be cluttered
5421         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5422         * MODULES.html.sh (Support for building libraries and executables):
5423         Add configmake.
5424         * modules/configmake: New file.
5425
5426 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5427
5428         * m4/config-h.m4: New file.
5429
5430 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5431
5432         * config/srclist.txt: Add elisp-comp.
5433
5434 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5435
5436         * MODULES.html.sh (Support for building libraries and executables):
5437         Add elisp-comp.
5438         * build-aux/elisp-comp: New file.
5439         * modules/elisp-comp: New file.
5440
5441 2006-08-24  Bruno Haible  <bruno@clisp.org>
5442
5443         * gnulib-tool (func_create_testdir): Use non-default values of
5444         sourcebase and m4base.
5445
5446 2006-08-24  Bruno Haible  <bruno@clisp.org>
5447
5448         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5449         HTML structure.
5450
5451 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5452
5453         * modules/openat (Depends-on): Add lchown.
5454
5455 2006-08-23  Bruno Haible  <bruno@clisp.org>
5456
5457         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5458         of gl_LOCK_EARLY instead of gl_LOCK.
5459
5460 2006-08-23  Bruno Haible  <bruno@clisp.org>
5461
5462         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5463         on OSF/1 to no.
5464         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5465
5466 2006-08-23  Bruno Haible  <bruno@clisp.org>
5467
5468         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5469         as unusable.
5470
5471         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5472         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5473         (gl_LOCK): New macro.
5474
5475 2006-08-22  Simon Josefsson  <jas@extundo.com>
5476
5477         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5478         to md5 module.
5479
5480 2006-08-22  Simon Josefsson  <jas@extundo.com>
5481
5482         * MODULES.html.sh: Add "Support for maintaining and release
5483         projects".
5484
5485         * build-aux/gnupload: New file, from coreutils.
5486
5487 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5488
5489         Avoid the need for AC_LIBSOURCES in m4 macros.
5490         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5491         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5492         * modules/check-version (EXTRA_DIST): Add check-version.h.
5493         * modules/crc (EXTRA_DIST): Add crc.h.
5494         * modules/des (EXTRA_DIST): Add des.h.
5495         * modules/gc (EXTRA_DIST): Add gc.h.
5496         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5497         * modules/getline (EXTRA_DIST): Add getline.h.
5498         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5499         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5500         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5501         * modules/md2 (EXTRA_DIST): Add md2.h.
5502         * modules/md4 (EXTRA_DIST): Add md4.h.
5503         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5504         * modules/read-file (EXTRA_DIST): Add read-file.h.
5505         * modules/readline (EXTRA_DIST): Add readline.h.
5506         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5507         rijndael-api-fst.h.
5508
5509 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5510
5511         * m4/rijndael.m4 (gl_ARCFOUR):
5512         * m4/arctwo.m4 (gl_ARCTWO):
5513         * m4/check-version.m4 (gl_CHECK_VERSION):
5514         * m4/crc.m4 (gl_CRC):
5515         * m4/des.m4 (gl_DES):
5516         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5517         * m4/gc.m4 (gl_GC):
5518         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5519         * m4/getline.m4 (gl_FUNC_GETLINE):
5520         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5521         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5522         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5523         * m4/md2.m4 (gl_MD2):
5524         * m4/md4.m4 (gl_MD4):
5525         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5526         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5527         * m4/readline.m4 (gl_FUNC_READLINE):
5528         * m4/rijndael.m4 (gl_RIJNDAEL):
5529         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5530         to get the necessary .h files and whatnot.
5531
5532 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5533
5534         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5535         gnulib rather than the other way around.
5536         * config/srclistvars.sh (COREUTILS): Remove.
5537
5538 2006-08-22  Jim Meyering  <jim@meyering.net>
5539
5540         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5541
5542         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5543
5544 2006-08-22  Eric Blake  <ebb9@byu.net>
5545
5546         * modules/regexprops-generic: New file.
5547         * MODULES.html.sh (Support for building documentation): List it.
5548
5549 2006-08-22  Eric Blake  <ebb9@byu.net>
5550
5551         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5552         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5553         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5554         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5555
5556 2006-08-22  Bruno Haible  <bruno@clisp.org>
5557
5558         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5559         and lib_LTLIBRARIES like the other lib_* variables.
5560
5561 2006-08-22  Bruno Haible  <bruno@clisp.org>
5562
5563         * build-aux/x-to-1.in: New file, from GNU gettext.
5564
5565 2006-08-22  Bruno Haible  <bruno@clisp.org>
5566
5567         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5568         <utmpx.h> exists.
5569
5570 2006-08-22  Bruno Haible  <bruno@clisp.org>
5571
5572         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5573         <utmpx.h> exists.
5574
5575 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5576
5577         BeOS portability.
5578         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5579         exist.
5580         Problem reported by Bruno Haible.
5581
5582 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5583
5584         Avoid the need for AC_LIBSOURCES in m4 macros.
5585         * modules/acl (EXTRA_DIST): Add acl.h.
5586         * modules/argmatch (Files): Add m4/argmatch.m4.
5587         (configure.ac): Add gl_ARGMATCH.
5588         (EXTRA_DIST): Renamed from lib_SOURCES, for
5589         consistency with the other modules.  Remove argmatch.c.
5590         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5591         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5592         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5593         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5594         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5595         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5596         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5597         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5598         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5599         * modules/closeout (EXTRA_DIST): Add closeout.h.
5600         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5601         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5602         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5603         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5604         dirname.h; remove basename.c and stripslash.c.
5605         * modules/exclude (EXTRA_DIST): Add exclude.h.
5606         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5607         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5608         * modules/file-type (EXTRA_DIST): Add file-type.h.
5609         * modules/filemode (EXTRA_DIST): Add filemode.h.
5610         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5611         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5612         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5613         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5614         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5615         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5616         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5617         * modules/getdate (EXTRA_DIST): Add getdate.c.
5618         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5619         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5620         * modules/getpass (EXTRA_DIST): Add getpass.h.
5621         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5622         * modules/group-member (EXTRA_DIST): Add group-member.h.
5623         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5624         * modules/hash (EXTRA_DIST): Add hash.h.
5625         * modules/human (EXTRA_DIST): Add human.h.
5626         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5627         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5628         * modules/lchown (EXTRA_DIST): Add lchown.h.
5629         * modules/long-options (EXTRA_DIST): Add long-options.h.
5630         * modules/lstat (EXTRA_DIST): Add lstat.h.
5631         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5632         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5633         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5634         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5635         * modules/memxor (EXTRA_DIST): Add memxor.h.
5636         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5637         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5638         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5639         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5640         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5641         * modules/physmem (EXTRA_DIST): Add physmem.h.
5642         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5643         * modules/posixver (EXTRA_DIST): Add posixver.h.
5644         * modules/quote (EXTRA_DIST): Add quote.h.
5645         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5646         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5647         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5648         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5649         regex_internal.h regexec.c.
5650         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5651         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5652         * modules/same (EXTRA_DIST): Add same.h.
5653         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5654         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5655         * modules/savedir (EXTRA_DIST): Add savedir.h.
5656         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5657         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5658         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5659         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5660         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5661         * modules/strdup (EXTRA_DIST): Add strdup.h.
5662         * modules/strftime (EXTRA_DIST): Add strftime.h.
5663         * modules/strndup (EXTRA_DIST): Add strndup.h.
5664         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5665         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5666         * modules/time_r (EXTRA_DIST): Add time_r.h.
5667         * modules/timespec (EXTRA_DIST): Add timespec.h.
5668         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5669         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5670         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5671         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5672         * modules/userspec (EXTRA_DIST): Add userspec.h.
5673         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5674         * modules/utimens (EXTRA_DIST): Add utimens.h.
5675         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5676         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5677         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5678         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5679         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5680         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5681         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5682         * modules/yesno (EXTRA_DIST): Add yesno.h.
5683
5684 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5685
5686         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5687
5688         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5689         * m4/dev-ino.m4, same-inode.m4: Remove.
5690
5691         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5692         * m4/acl.m4 (AC_FUNC_ACL):
5693         * m4/backupfile.m4 (gl_BACKUPFILE):
5694         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5695         * m4/canon-host.m4 (gl_CANON_HOST):
5696         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5697         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5698         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5699         * m4/cloexec.m4 (gl_CLOEXEC):
5700         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5701         * m4/closeout.m4 (gl_CLOSEOUT):
5702         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5703         * m4/dirname.m4 (gl_DIRNAME):
5704         * m4/exclude.m4 (gl_EXCLUDE):
5705         * m4/exitfail.m4 (gl_EXITFAIL):
5706         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5707         * m4/file-type.m4 (gl_FILE_TYPE):
5708         * m4/filemode.m4 (gl_FILEMODE):
5709         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5710         * m4/fpending.m4 (gl_FUNC_FPENDING):
5711         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5712         * m4/fts.m4 (gl_FUNC_FTS):
5713         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5714         * m4/getdate.m4 (gl_GETDATE):
5715         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5716         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5717         * m4/getpass.m4 (gl_FUNC_GETPASS):
5718         * m4/gettime.m4 (gl_GETTIME):
5719         * m4/getugroups.m4 (gl_GETUGROUPS):
5720         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5721         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5722         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5723         * m4/hash.m4 (gl_HASH):
5724         * m4/idcache.m4 (gl_IDCACHE):
5725         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5726         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5727         * m4/long-options.m4 (gl_LONG_OPTIONS):
5728         * m4/lstat.m4 (gl_FUNC_LSTAT):
5729         * m4/md5.m4 (gl_MD5):
5730         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5731         * m4/memcoll.m4 (gl_MEMCOLL):
5732         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5733         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5734         * m4/memxor.m4 (gl_MEMXOR):
5735         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5736         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5737         * m4/modechange.m4 (gl_MODECHANGE):
5738         * m4/mountlist.m4 (gl_MOUNTLIST):
5739         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5740         * m4/openat.m4 (gl_FUNC_OPENAT):
5741         * m4/pathmax.m4 (gl_PATHMAX):
5742         * m4/physmem.m4 (gl_PHYSMEM):
5743         * m4/posixtm.m4 (gl_POSIXTM):
5744         * m4/posixver.m4 (gl_POSIXVER):
5745         * m4/quote.m4 (gl_QUOTE):
5746         * m4/quotearg.m4 (gl_QUOTEARG):
5747         * m4/readtokens.m4 (gl_READTOKENS):
5748         * m4/readutmp.m4 (gl_READUTMP):
5749         * m4/regex.m4 (gl_REGEX):
5750         * m4/safe-read.m4 (gl_SAFE_READ):
5751         * m4/safe-write.m4 (gl_SAFE_WRITE):
5752         * m4/same.m4 (gl_SAME):
5753         * m4/save-cwd.m4 (gl_SAVE_CWD):
5754         * m4/savedir.m4 (gl_SAVEDIR):
5755         * m4/settime.m4 (gl_SETTIME):
5756         * m4/sha1.m4 (gl_SHA1):
5757         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5758         * m4/stat-macros.m4 (gl_STAT_MACROS):
5759         * m4/stat-time.m4 (gl_STAT_TIME):
5760         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5761         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5762         * m4/strdup.m4 (gl_FUNC_STRDUP):
5763         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5764         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5765         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5766         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5767         * m4/time_r.m4 (gl_TIME_R):
5768         * m4/timespec.m4 (gl_TIMESPEC):
5769         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5770         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5771         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5772         * m4/userspec.m4 (gl_USERSPEC):
5773         * m4/utimecmp.m4 (gl_UTIMECMP):
5774         * m4/utimens.m4 (gl_UTIMENS):
5775         * m4/xalloc.m4 (gl_XALLOC):
5776         * m4/xgetcwd.m4 (gl_XGETCWD):
5777         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5778         * m4/xreadlink.m4 (gl_XREADLINK):
5779         * m4/xstrtod.m4 (gl_XSTRTOD):
5780         * m4/yesno.m4 (gl_YESNO):
5781         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5782         to get the necessary .h files and whatnot.
5783
5784 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5785             Bruno Haible  <bruno@clisp.org>
5786
5787         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5788         /bin/sh understanding of '!' conditional negation.
5789
5790 2006-08-21  Jim Meyering  <jim@meyering.net>
5791
5792         * modules/openat (Depends-on): Really alphabetize.
5793
5794         * modules/acl (Depends-on): Add error and quote.
5795
5796         * check-module (find_included_lib_files): Add at-func.c to the
5797         ok-to-include-more-than-once white list.
5798
5799         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5800
5801 2006-08-21  Bruno Haible  <bruno@clisp.org>
5802
5803         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5804         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5805         Reported by Martin Lambers <marlam@marlam.de>.
5806
5807 2006-08-21  Bruno Haible  <bruno@clisp.org>
5808
5809         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5810         specify an installation location, don't emit a noinst_LIBRARIES or
5811         noinst_LTLIBRARIES assignment.
5812
5813 2006-08-21  Bruno Haible  <bruno@clisp.org>
5814
5815         BeOS portability.
5816         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5817         BeOS has mbrtowc() but no <wctype.h>.
5818
5819 2006-08-21  Bruno Haible  <bruno@clisp.org>
5820
5821         BeOS portability.
5822         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5823         exist.
5824
5825 2006-08-21  Bruno Haible  <bruno@clisp.org>
5826
5827         BeOS portability.
5828         * lib/mbchar.h: Include <wctype.h> only if it exists.
5829
5830 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5831
5832         Remove files that are no longer needed by their respective modules.
5833         * m4/obstack.m4: Remove.
5834         * m4/strerror_r.m4: Remove.
5835         * m4/uint32_t.m4: Remove.
5836         * m4/uintptr_t.m4: Remove.
5837         * m4/ullong_max.m4: Remove.
5838         * m4/xstrtoimax.m4: Remove.
5839         * m4/xstrtoumax.m4: Remove.
5840
5841         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5842         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5843         dependencies now capture this.
5844
5845         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5846         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5847         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5848         * m4/human.m4 (gl_HUMAN): Likewise.
5849         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5850         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5851
5852         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5853
5854         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5855         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5856         stdint.
5857         * m4/human.m4 (gl_HUMAN): Likewise.
5858         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5859         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5860         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5861         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5862         * m4/xstrtol (gl_XSTRTOL): Likewise.
5863
5864         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5865         AC_TYPE_LONG_LONG_INT.
5866         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5867         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5868         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5869         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5870
5871         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5872         on stdbool.
5873
5874         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5875         (gl_PREREQ_XSTRTOUL): Remove.
5876
5877         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5878
5879         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5880         mode.
5881
5882 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5883
5884         Add and change modules to make it easier for coreutils to use
5885         gnulib-tool.
5886         * modules/backupfile (Files): Remove m4/d-ino.m4.
5887         (Depends-on): Add d-ino.
5888         * modules/cycle-check (Depends-on): Add stdint.
5889         (lib_SOURCES): Add cycle-check.h.
5890         * modules/d-ino: New module.
5891         * modules/d-type: New module.
5892         * modules/error (Files): Remove m4/strerror_r.m4.
5893         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5894         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5895         m4/inttypes_h.m4, m4/uintmax_t.m4.
5896         (Depends-on): Add stdint.
5897         (lib_SOURCES): Add fsusage.h.
5898         * modules/getcwd (Files): Remove d-ino.m4.
5899         (Depends-on): Add d-ino.
5900         * modules/getndelim2 (Depends-on): Add stdint.
5901         * modules/glob (Files): Remove m4/d-type.m4.
5902         (Depends-on): Add d-type.
5903         * modules/host-os: New module.
5904         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5905         m4/inttypes_h.m4, m4/uintmax_t.m4.
5906         * Depends-on: Add stdint.
5907         (lib_SOURCES): Add human.h.
5908         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5909         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5910         m4/uintmax_t.m4, m4/ulonglong.m4.
5911         (Depends-on): Add stdint.
5912         (EXTRA_DIST): Add inttostr.h.
5913         * modules/lchmod: New module.
5914         * modules/link-follow: New module.
5915         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5916         (Depends-on): Add lchmod.
5917         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5918         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5919         (Depends-on): Add stdint.
5920         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5921         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5922         (Depends-on): Add stdint.
5923         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5924         * modules/perl: New module.
5925         * modules/regex (Depends-on): Add stdint.
5926         * modules/rmdir-errno: New module.
5927         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5928         m4/intmax_t.m4.
5929         (Depends-on): Add stdint.
5930         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5931         m4/uintmax_t.m4.
5932         (Depends-on): Add stdint.
5933         * modules/unlink-busy: New module.
5934         * modules/utimecmp (Depends-on): Add stdint.
5935         * modules/uptime: New module.
5936         * modules/winsz-ioctl: New module.
5937         * modules/winsz-termios: New module.
5938         * modules/xnanosleep (Depends-on): Add nanosleep.
5939         * modules/ullong_max: Remove.
5940         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5941         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5942         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5943         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5944         (Depends-on): Add inttypes.
5945         (lib_SOURCES): Add xstrtol.h.
5946         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5947         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5948         * MODULES.html.sh: Move 'assert' into the assert section.
5949         Move 'dummy' into the linking section.
5950         Remove ullong_max.
5951         Add section for compatibility checks for POSIX:2001 functions,
5952         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5953         winsz-ioctl, and winsz-termios into it.
5954         Add lchmod.
5955         Add top-level Misc section and put host-os, perl, and uptime
5956         into it.
5957
5958 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5959
5960         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5961         now assume the stdint module.  Do not include inttypes.h.
5962         * lib/fsusage.h: Likewise.
5963         * lib/getndelim2.c: Likewise.
5964         * lib/human.h: Likewise.
5965         * lib/inttostr.h: Likewise.
5966         * lib/obstack.c: Likewise.
5967         * lib/regex_internal.h: Likewise.
5968         * lib/tempname.c: Likewise.
5969         * lib/utimecmp.c: Likewise.
5970         * lib/xstrtol.h: Likewise.
5971
5972         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
5973
5974         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
5975         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
5976         * lib/xtime.h: Likewise.
5977
5978 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5979
5980         * modules/openat (Files): Add lib/fchmodat.c.
5981         Fixes problem reported by Jay Youngman.
5982
5983 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
5984
5985         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
5986         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
5987
5988 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
5989             Bruno Haible  <bruno@clisp.org>
5990
5991         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
5992         and is a script that invokes bison. Tighten the code. Add comments.
5993
5994 2006-08-18  Jim Meyering  <jim@meyering.net>
5995
5996         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
5997         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
5998         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
5999         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6000
6001 2006-08-18  Bruno Haible  <bruno@clisp.org>
6002
6003         * modules/bison-i18n: New file.
6004         * MODULES.html.sh (Internationalization functions): Add it.
6005
6006 2006-08-18  Bruno Haible  <bruno@clisp.org>
6007
6008         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6009         sys/statvfs.h. When getmntinfo was found, check its declaration and
6010         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6011
6012 2006-08-18  Bruno Haible  <bruno@clisp.org>
6013
6014         * m4/bison-i18n.m4: New file, from bison.
6015
6016 2006-08-18  Bruno Haible  <bruno@clisp.org>
6017
6018         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6019         (ME_DUMMY): Treat "kernfs" as a dummy.
6020         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6021
6022 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6023
6024         Update from coreutils.
6025
6026         2006-08-15  Jim Meyering  <jim@meyering.net>
6027
6028         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6029
6030         2006-01-17  Jim Meyering  <jim@meyering.net>
6031
6032         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6033
6034         2006-01-11  Jim Meyering  <jim@meyering.net>
6035
6036         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6037         Check for the lchmod function.
6038
6039 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6040
6041         Update from coreutils.
6042
6043         * lib/__fpending.h: Add copyright notice.
6044         * lib/fprintftime.h: Likewise.
6045         * lib/savedir.c: Use (C) in copyright notice.
6046         * lib/savedir.h: Likewise.
6047
6048         2006-08-15  Jim Meyering  <jim@meyering.net>
6049
6050         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6051         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6052         in support of the EXPECTED_ERRNO macro.
6053         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6054         definitions.  Instead, define the appropriate symbols and include
6055         "at-func.c".
6056         * lib/mkdirat.c (mkdirat): Likewise.
6057         * lib/fchmodat.c (fchmodat): Likewise.
6058         (ENOSYS): Remove definition.
6059         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6060         it.  Don't include "unistd--.h" -- it wasn't ever used.
6061
6062         2006-01-17  Jim Meyering  <jim@meyering.net>
6063
6064         Rewrite fts.c not to change the current working directory,
6065         by using openat, fstatat, fdopendir, etc..
6066
6067         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6068         (HAVE_OPENAT_SUPPORT): Define.
6069         [_LIBC] (fchdir): Don't undef or define; no longer used.
6070         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6071         Now, this `function' always succeeds, and consumes its file descriptor
6072         parameter -- so callers must not close such FDs.  Update callers.
6073         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6074         (diropen): Add parameter, SP.  Adjust all callers.
6075         Implement using diropen_fd, rather than open.
6076         (fts_open): Initialize new member, fts_cwd_fd.
6077         Remove fts_rft-setting code.
6078         (fts_close): Close fts_cwd_fd, if necessary.
6079         (__opendir2): Define in terms of opendir or opendirat,
6080         depending on whether the FST_NOCHDIR flag is set.
6081         (fts_build): Since fts_safe_changedir consumes its FD, and since
6082         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6083         and close the dup'd file descriptor upon failure.
6084         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6085         (fts_safe_changedir): Tweak semantics to reflect that this function
6086         now calls cwd_advance_fd and hence consumes its FD argument.
6087         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6088         [struct FTS] (fts_rft): Remove now-unused member.
6089         [struct FTS] (fts_cycle.state): Improve comment.
6090
6091         * lib/openat.c (openat_needs_fchdir): New function.
6092         * lib/openat.h (openat_needs_fchdir): Declare it.
6093
6094 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6095
6096         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6097         Problem and fix reported by Pádraig Brady in
6098         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6099
6100 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6101
6102         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6103
6104 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6105
6106         * lib/memcoll.c (memcoll): Optimize for the common case where the
6107         arguments are bytewise equal.
6108
6109 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6110
6111         * doc/regexprops-generic.texi: Add a copyright notice.
6112
6113 2006-08-15  Bruno Haible  <bruno@clisp.org>
6114
6115         * modules/tmpdir (License): Change to LGPL.
6116
6117 2006-08-15  Bruno Haible  <bruno@clisp.org>
6118
6119         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6120         module.
6121
6122 2006-08-14  Simon Josefsson  <jas@extundo.com>
6123
6124         * config/srclist.txt: Add gnupload.
6125
6126 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6127
6128         Change copyright notice from LGPL 2 to GPL 2, since that's the
6129         standard form used in the gnulib repository.
6130         * tests/test-lock.c: Likewise.
6131         * tests/test-stdint.c: Likewise.
6132         * tests/test-tls.c: Likewise.
6133
6134         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6135         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6136         Add copyright notice.
6137
6138         * check-module: Add copyright notice.  Output a copyright
6139         notice if "--version" is specified.
6140         * modules/COPYING: New file.
6141         * tests/test-getaddrinfo.c: Add copyright notice.
6142         * tests/test-verify.c: Likewise.
6143
6144 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6145
6146         Change copyright notice from LGPL 2 to GPL 2, since that's the
6147         standard form used in the gnulib repository.
6148         * lib/lock.c: LGPL -> GPL.
6149         * lib/lock.h: Likewise.
6150         * lib/strnlen1.c: Likewise.
6151         * lib/strnlen1.h: Likewise.
6152         * lib/tls.c: Likewise.
6153         * lib/tls.h: Likewise.
6154         * lib/tmpdir.c: Likewise.
6155
6156         * lib/TODO: Remove; this belongs only in coreutils.
6157
6158 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6159
6160         Add copyright notices to long-enough files that lack them, since
6161         otherwise the files aren't clearly free.  Use the same notice that
6162         getdate.texi already uses.
6163         * doc/alloca-opt.texi: Add copyright notice.
6164         * doc/alloca.texi: Likewise.
6165         * doc/ctime.texi: Likewise.
6166         * doc/functions.texi: Likewise.
6167         * doc/gcd.texi: Likewise.
6168         * doc/gnulib-tool.texi: Likewise.
6169         * doc/inet_ntoa.texi: Likewise.
6170         * doc/visibility.texi: Likewise.
6171
6172         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6173         * doc/quote.texi: Add copyright notice.
6174
6175         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6176         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6177         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6178         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6179         is now obsolete, and give a pointer to the Sun list.
6180         Add copyright notice.
6181
6182 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6183
6184         * config/srclistvars.sh: Add copyright notice.
6185
6186 2006-08-14  Eric Blake  <ebb9@byu.net>
6187
6188         Import the following change from libc:
6189
6190         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6191
6192         Upstream bug 2997.
6193         * lib/misc/error.c: Add space between program name and message if file
6194         name is missing.
6195
6196 2006-08-12  Karl Berry  <karl@gnu.org>
6197
6198         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6199         remove, these originate in gnulib now.
6200
6201 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6202
6203         * doc/Makefile (standards.info standards.html standards.dvi):
6204         Also depend on make-stds.texi.
6205
6206 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6207
6208         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6209         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6210
6211         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6212         in wchar_t.  Problem reported by Eric Blake.
6213
6214         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6215         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6216         Also, help the compiler to keep LEN in a register.
6217
6218 2006-08-11  Eric Blake  <ebb9@byu.net>
6219
6220         * users.txt: Sort.  Add tar.
6221
6222 2006-08-11  Bruno Haible  <bruno@clisp.org>
6223
6224         * users.txt: New file.
6225
6226 2006-08-11  Bruno Haible  <bruno@clisp.org>
6227
6228         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6229         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6230
6231 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6232
6233         * modules/snprintf (Depends-on): Remove minmax.
6234         (Maintainer): Add self and Bruno.
6235
6236 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6237
6238         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6239         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6240         (EOVERFLOW): Define if the system does not.
6241         Do not include "minmax.h"; it wasn't used.
6242         (snprintf): Don't assume size_t promotes to an unsigned type.
6243         Fix bug when generated string was too long for the buffer: the
6244         buffer's contents are supposed to be the initial prefix of the
6245         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6246         exceeds INT_MAX; do the check ourselves.
6247
6248         Import the following changes from libc:
6249
6250         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6251
6252         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6253         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6254         set wc to the byte which couldn't be converted.
6255         (re_string_reconstruct): Don't clear valid_raw_len before calling
6256         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6257         tip_context using re_string_context_at.
6258
6259         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6260
6261         * lib/posix/regex.h: g++ still cannot handled [restrict].
6262
6263         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6264
6265         * lib/posix/regex.h: Remove special handling for VMS.
6266
6267 2006-08-10  Jim Meyering  <jim@meyering.net>
6268
6269         * modules/same-inode: New module.
6270         * modules/dev-ino: New module.
6271         * modules/cycle-check: Depend on these modules, rather than simply
6272         including their .h files.
6273         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6274         required via m4/cycle-check.m4.
6275         * modules/same: Depend on new same-inode module, rather than
6276         including same-inode.h.
6277         * modules/chdir-safer: New file.
6278
6279         * modules/chown (Depends-on): Add stat-macros.
6280
6281 2006-08-10  Jim Meyering  <jim@meyering.net>
6282
6283         * m4/cycle-check.m4: New file.
6284         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6285         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6286
6287 2006-08-10  Eric Blake  <ebb9@byu.net>
6288
6289         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6290         in from original proposal.
6291
6292 2006-08-10  Eric Blake  <ebb9@byu.net>
6293         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6294
6295         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6296         namespace.
6297
6298 2006-08-10  Bruno Haible  <bruno@clisp.org>
6299
6300         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6301         as well.
6302
6303 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6304
6305         Sync from coreutils.
6306
6307         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6308
6309         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6310         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6311
6312 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6313
6314         * modules/restrict: Remove; no longer needed now that we assume
6315         Autoconf 2.59 or later.
6316         * MODULES.html.sh: Remove 'restrict'.
6317         * modules/argp (Depends-on): Remove 'restrict'.
6318         * modules/base64 (Depends-on): Likewise.
6319         * modules/gc (Depends-on): Likewise.
6320         * modules/getaddrinfo (Depends-on): Likewise.
6321         * modules/glob (Depends-on): Likewise.
6322         * modules/inet_ntop (Depends-on): Likewise.
6323         * modules/inet_pton (Depends-on): Likewise.
6324         * modules/memxor (Depends-on): Likewise.
6325         * modules/regex (Depends-on): Likewise.
6326         * modules/strtok_r (Depends-on): Likewise.
6327         * modules/time_r (Depends-on): Likewise.
6328
6329 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6330
6331         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6332         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6333         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6334         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6335         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6336         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6337         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6338         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6339
6340         Merge from coreutils.
6341         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6342         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6343         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6344         * m4/time_r.m4 (gl_TIME_R): Likewise.
6345
6346 2006-08-09  Karl Berry  <karl@gnu.org>
6347
6348         * config/srclist.txt: no more gettext-tools, per Bruno.
6349
6350 2006-08-08  Eric Blake  <ebb9@byu.net>
6351
6352         * modules/verror: New module.
6353         * MODULES.html.sh: Document it.
6354
6355 2006-08-08  Eric Blake  <ebb9@byu.net>
6356
6357         * lib/verror.h, lib/verror.c: New files.
6358
6359 2006-08-08  Eric Blake  <ebb9@byu.net>
6360
6361         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6362         verror_at_line output complies with GNU Coding Standards even when
6363         file is NULL.
6364
6365 2006-08-07  Bruno Haible  <bruno@clisp.org>
6366
6367         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6368         versions of AIX.
6369         Reported by Ralf Wildenhues.
6370
6371 2006-08-07  Bruno Haible  <bruno@clisp.org>
6372
6373         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6374         in an AC_DEFUN. Needed so that the autoconf snippets can use
6375         AC_REQUIRE.
6376
6377 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6378
6379         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6380         Initialize pkgdata_DATA.
6381         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6382         overriding it.
6383
6384 2006-08-06  Eric Blake  <ebb9@byu.net>
6385
6386         * lib/error.h: Fold in some upstream changes from glibc.
6387         * lib/error.c: Likewise.
6388
6389 2006-08-04  Bruno Haible  <bruno@clisp.org>
6390
6391         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6392         Make the mostlyclean-local rule depend on mostlyclean-generic.
6393         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6394
6395 2006-07-31  Bruno Haible  <bruno@clisp.org>
6396
6397         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6398         <stdlib.h>, <string.h>.
6399
6400 2006-07-30  Bruno Haible  <bruno@clisp.org>
6401
6402         * modules/readlink (License): Change to LGPL.
6403
6404 2006-07-30  Bruno Haible  <bruno@clisp.org>
6405
6406         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6407         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6408         set PKGDATADIR to point to it.
6409
6410 2006-07-30  Bruno Haible  <bruno@clisp.org>
6411
6412         * modules/csharpexec (configure.ac): Comment out macro invocation.
6413         * modules/javaexec (configure.ac): Likewise.
6414         * modules/javacomp-script (configure.ac): Likewise.
6415
6416         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6417
6418 2006-07-30  Bruno Haible  <bruno@clisp.org>
6419
6420         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6421         linked-list.
6422
6423 2006-07-30  Bruno Haible  <bruno@clisp.org>
6424
6425         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6426
6427 2006-07-30  Bruno Haible  <bruno@clisp.org>
6428
6429         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6430         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6431         get removed.
6432
6433 2006-07-29  Bruno Haible  <bruno@clisp.org>
6434
6435         Make it possible for gnulib-tool to work with locally modified or
6436         augmented gnulib repositories.
6437         * gnulib-tool (func_usage): Document --local-dir option.
6438         (local_gnulib_dir): New variable.
6439         Handle --local-dir option.
6440         (func_lookup_file): New function.
6441         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6442         (func_get_description, func_get_filelist, func_get_description,
6443         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6444         func_get_automake_snippet, func_get_include_directive,
6445         func_get_license, func_get_maintainer): Use func_lookup_file.
6446         (func_import, func_create_testdir): Use func_lookup_file.
6447
6448 2006-07-29  Bruno Haible  <bruno@clisp.org>
6449
6450         * modules/setenv (Depends-on): Add unistd.
6451
6452 2006-07-29  Bruno Haible  <bruno@clisp.org>
6453
6454         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6455
6456 2006-07-29  Bruno Haible  <bruno@clisp.org>
6457
6458         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6459
6460 2006-07-29  Bruno Haible  <bruno@clisp.org>
6461
6462         * gnulib-tool (import, update): If there is no Makefile.am, look at
6463         aclocal.m4, instead of bailing out.
6464
6465 2006-07-29  Bruno Haible  <bruno@clisp.org>
6466
6467         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6468         Categorize the options by when they are useful.
6469
6470 2006-07-29  Bruno Haible  <bruno@clisp.org>
6471
6472         * gnulib-tool (func_usage): Document option --no-libtool.
6473         Handle option --no-libtool.
6474         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6475         for changed semantics of $libtool variable.
6476         (func_import): Likewise. If libtool is not used, show this through
6477         an option --no-libtool.
6478         (func_create_testdir): Update.
6479
6480 2006-07-29  Bruno Haible  <bruno@clisp.org>
6481
6482         * gnulib-tool (func_import): Extend error message about missing
6483         --doc-base.
6484
6485 2006-07-29  Bruno Haible  <bruno@clisp.org>
6486
6487         * gnulib-tool (func_import): Don't create the $docbase directory if
6488         there is no file to store there.
6489
6490 2006-07-29  Bruno Haible  <bruno@clisp.org>
6491
6492         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6493         relevant, look for configure.ac there, not in the current directory.
6494         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6495
6496 2006-07-29  Bruno Haible  <bruno@clisp.org>
6497
6498         * gnulib-tool (SORT): New variable.
6499         (func_usage): Undocument --assume-autoconf option.
6500         Remove --assume-autoconf option handling.
6501         (autoconf_minversion): Determine from the contents of configure.ac.
6502         (func_import): Remove autoconf_minversion handling.
6503         Suggested by Eric Blake.
6504
6505 2006-07-29  Bruno Haible  <bruno@clisp.org>
6506
6507         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6508
6509 2006-07-29  Bruno Haible  <bruno@clisp.org>
6510
6511         * config/srclist.txt (*setenv.[ch]): Remove rules.
6512
6513 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6514
6515         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6516
6517 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6518
6519         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6520         arpa/inet.h.
6521
6522 2006-07-28  Simon Josefsson  <jas@extundo.com>
6523
6524         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6525         * modules/inet_pton (Depends-on): Likewise.
6526
6527 2006-07-28  Simon Josefsson  <jas@extundo.com>
6528
6529         * m4/netinet_in_h.m4: New file.
6530
6531 2006-07-28  Simon Josefsson  <jas@extundo.com>
6532
6533         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6534         #include's.
6535
6536 2006-07-28  Simon Josefsson  <jas@extundo.com>
6537
6538         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6539         #include's.
6540
6541 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6542
6543         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6544         setgid on directories only if they set these bits.
6545         * lib/modechange.h: Remove obsolete comment about masks.
6546
6547 2006-07-28  Eric Blake  <ebb9@byu.net>
6548
6549         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6550         macro expansion.
6551
6552 2006-07-28  Bruno Haible  <bruno@clisp.org>
6553
6554         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6555
6556 2006-07-28  Bruno Haible  <bruno@clisp.org>
6557
6558         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6559
6560 2006-07-28  Bruno Haible  <bruno@clisp.org>
6561
6562         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6563         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6564         Define fallbacks.
6565         Avoids link error on FreeBSD 4.x.
6566         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6567
6568         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6569         encoding.
6570         * lib/mbswidth.c (iswcntrl): Likewise.
6571
6572 2006-07-27  Bruno Haible  <bruno@clisp.org>
6573
6574         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6575         test.
6576
6577 2006-07-27  Bruno Haible  <bruno@clisp.org>
6578
6579         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6580         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6581         defined.
6582
6583 2006-07-26  Eric Blake  <ebb9@byu.net>
6584
6585         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6586
6587 2006-07-26  Eric Blake  <ebb9@byu.net>
6588
6589         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6590         like mingw that lack mkstemp.
6591         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6592         avoid compilation warning on mingw.
6593
6594 2006-07-26  Bruno Haible  <bruno@clisp.org>
6595
6596         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6597         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6598         INT_FAST*_MIN, INTPTR_MIN.
6599
6600 2006-07-25  Bruno Haible  <bruno@clisp.org>
6601
6602         * modules/version-etc (Depends-on): Add stdarg.
6603
6604 2006-07-25  Bruno Haible  <bruno@clisp.org>
6605
6606         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6607         complex commands.
6608
6609 2006-07-25  Bruno Haible  <bruno@clisp.org>
6610
6611         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6612         defined in <stdarg.h> or config.h.
6613
6614 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6615
6616         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6617         (gl_STDIO_SAFER): Remove.
6618
6619 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6620
6621         * MODULES.html.sh (File stream based Input/Output):
6622         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6623         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6624         * modules/fopen-safer, modules/tmpfile-safer: New files.
6625         * modules/stdio-safer: Remove.
6626
6627 2006-07-24  Bruno Haible  <bruno@clisp.org>
6628
6629         * modules/tmpdir: New file.
6630         * MODULES.html.sh (File system functions): Add it.
6631
6632 2006-07-24  Bruno Haible  <bruno@clisp.org>
6633
6634         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6635         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6636
6637 2006-07-24  Bruno Haible  <bruno@clisp.org>
6638
6639         * modules/clean-temp: New file.
6640
6641 2006-07-24  Bruno Haible  <bruno@clisp.org>
6642
6643         * m4/tmpdir.m4: New file, from GNU gettext.
6644
6645 2006-07-24  Bruno Haible  <bruno@clisp.org>
6646
6647         * lib/tmpdir.h: New file, from GNU gettext.
6648         * lib/tmpdir.c: New file, from GNU gettext.
6649
6650 2006-07-24  Bruno Haible  <bruno@clisp.org>
6651
6652         * lib/clean-temp.h: New file, from GNU gettext.
6653         * lib/clean-temp.c: New file, from GNU gettext.
6654
6655 2006-07-23  Eric Blake  <ebb9@byu.net>
6656
6657         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6658         (Depends-on): Add binary-io.
6659
6660 2006-07-23  Eric Blake  <ebb9@byu.net>
6661
6662         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6663
6664 2006-07-23  Eric Blake  <ebb9@byu.net>
6665
6666         * lib/tmpfile-safer.c: New file.
6667         * lib/stdio-safer.h (fopen_safer): Add prototype.
6668         * lib/stdio--.h (tmpfile): Make safer.
6669
6670 2006-07-23  Bruno Haible  <bruno@clisp.org>
6671
6672         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6673         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6674         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6675         gl_linked_remove_at): Use it.
6676
6677 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6678         and Simon Josefsson <jas@extundo.com>
6679
6680         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6681
6682         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6683
6684 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6685
6686         * modules/close-stream: New file.
6687         * modules/closeout (Description): Make it clear that it exits
6688         with a diagnostic on error.
6689         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6690         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6691
6692 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6693
6694         * m4/close-stream.m4: New file.
6695
6696 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6697
6698         * lib/close-stream.c, lib/close-stream.h: New files.
6699
6700 2006-07-22  Bruno Haible  <bruno@clisp.org>
6701
6702         Merge from GNU gettext 0.15.
6703
6704         2006-05-01  Bruno Haible  <bruno@clisp.org>
6705
6706                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6707
6708         2006-07-22  Bruno Haible  <bruno@clisp.org>
6709
6710                 * modules/javaversion: New file.
6711                 * MODULES.html.sh (Java): Add javaversion.
6712
6713         2006-03-12  Bruno Haible  <bruno@clisp.org>
6714
6715                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6716
6717         2005-12-04  Bruno Haible  <bruno@clisp.org>
6718
6719                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6720                 (untested).
6721
6722         2006-06-21  Bruno Haible  <bruno@clisp.org>
6723
6724                 Avoid warnings from recent versions of mcs.
6725                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6726                 -o, -L, -r any more. Use options documented since mcs-1.0
6727                 instead. Similarly for -g.
6728
6729         2005-12-04  Bruno Haible  <bruno@clisp.org>
6730
6731                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6732                 .resources, not .resource.
6733
6734         2005-07-09  Bruno Haible  <bruno@clisp.org>
6735
6736                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6737                 add a .dll suffix.
6738                 Reported by Mark Junker <mjscod@gmx.de>.
6739
6740         2006-07-22  Bruno Haible  <bruno@clisp.org>
6741
6742                 * modules/gettext: Upgrade to gettext-0.15.
6743                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6744                 m4/visibility.m4.
6745                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6746
6747 2006-07-22  Bruno Haible  <bruno@clisp.org>
6748
6749         Merge from GNU gettext 0.15.
6750
6751         2006-03-25  Bruno Haible  <bruno@clisp.org>
6752
6753                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6754
6755         2006-07-21  Bruno Haible  <bruno@clisp.org>
6756
6757                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6758                 "1.1".
6759
6760         2006-05-09  Bruno Haible  <bruno@clisp.org>
6761
6762                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6763                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6764                 for the conftestver execution.
6765
6766         2006-05-01  Bruno Haible  <bruno@clisp.org>
6767
6768                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6769                 optional target-version argument. Verify that the compiler
6770                 groks source of the specified source-version, or add -source
6771                 option as necessary. Verify that the compiler produces
6772                 bytecode in the specified target-version, or add -target and
6773                 -source options as necessary. Make the result of the test
6774                 available as variable CONF_JAVAC. Also log error output in
6775                 config.log.
6776
6777         2006-03-11  Bruno Haible  <bruno@clisp.org>
6778
6779                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6780
6781         2006-05-09  Bruno Haible  <bruno@clisp.org>
6782
6783                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6784                 CLASSPATH_SEPARATOR to a semicolon.
6785
6786         2006-03-12  Bruno Haible  <bruno@clisp.org>
6787
6788                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6789                 available as variable CONF_JAVA, for subsequent autoconf
6790                 tests. Also log error output in config.log.
6791
6792         2006-07-19  Bruno Haible  <bruno@clisp.org>
6793
6794                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6795                 that getline works on glibc2 systems. Needed to avoid trouble
6796                 in relocatable.c.
6797                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6798
6799         2005-12-04  Bruno Haible  <bruno@clisp.org>
6800
6801                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6802                 launcher (untested).
6803
6804         2005-12-04  Bruno Haible  <bruno@clisp.org>
6805
6806                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6807
6808         2006-07-22  Bruno Haible  <bruno@clisp.org>
6809
6810                 * gettext.m4: Update from GNU gettext-0.15.
6811                 * nls.m4: Likewise.
6812                 * po.m4: Likewise.
6813                 * inttypes-pri.m4: Likewise.
6814                 * inttypes-h.m4: Renamed from inttypes.m4.
6815                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6816
6817 2006-07-22  Bruno Haible  <bruno@clisp.org>
6818
6819         Merge from GNU gettext 0.15.
6820
6821         2005-07-05  Bruno Haible  <bruno@clisp.org>
6822
6823                 * printf-args.c (printf_fetchargs): Work around broken
6824                 definition of wint_t on mingw.
6825
6826         2005-02-12  Bruno Haible  <bruno@clisp.org>
6827
6828                 * xallocsa.h: Add extern "C" for C++.
6829
6830         2006-05-17  Bruno Haible  <bruno@clisp.org>
6831
6832                 Cygwin portability.
6833                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6834
6835         2006-04-30  Bruno Haible  <bruno@clisp.org>
6836
6837                 * progreloc.c: Include <mach-o/dyld.h> if available.
6838                 (find_executable): Use _NSGetExecutablePath when possible.
6839
6840         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6841
6842                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6843                 function.
6844
6845         2005-12-29  Bruno Haible  <bruno@clisp.org>
6846
6847                 * progreloc.c (set_program_name_and_installdir): Fix
6848                 compilation error.
6849
6850         2005-12-04  Bruno Haible  <bruno@clisp.org>
6851
6852                 Cygwin portability.
6853                 * progreloc.c: Include <windows.h> also on Cygwin.
6854                 (find_executable): Add support for Cygwin.
6855                 (set_program_name_and_installdir): Handle also platforms with
6856                 nonempty EXEEXT.
6857
6858         2006-07-11  Bruno Haible  <bruno@clisp.org>
6859
6860                 * javacomp.c: Fix a comment.
6861                 Reported by Jim Meyering.
6862
6863         2006-04-30  Bruno Haible  <bruno@clisp.org>
6864
6865                 * javacomp.h (compile_java_class): Add source_version,
6866                 target_version arguments.
6867                 * javacomp.c: Rewritten to choose only a compiler that
6868                 respects the specified source_version and target_version.
6869
6870         2006-06-27  Bruno Haible  <bruno@clisp.org>
6871
6872                 Assume correct S_ISDIR macro.
6873                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6874
6875         2006-07-22  Bruno Haible  <bruno@clisp.org>
6876
6877                 * javaversion.h: New file, from GNU gettext.
6878                 * javaversion.c: New file, from GNU gettext.
6879                 * javaversion.java: New file, from GNU gettext.
6880                 * javaversion.class: New file, from GNU gettext.
6881
6882         2006-05-17  Bruno Haible  <bruno@clisp.org>
6883
6884                 Cygwin portability.
6885                 * javaexec.c (execute_java_class): Test for jview program
6886                 also on Cygwin.
6887
6888         2006-04-09  Bruno Haible  <bruno@clisp.org>
6889
6890                 * fatal-signal.c: Don't include string.h.
6891                 (at_fatal_signal): Use a copying loop instead of memcpy.
6892
6893         2005-12-04  Bruno Haible  <bruno@clisp.org>
6894
6895                 * csharpexec.c: Add support for 'clix' launcher (untested).
6896                 (execute_csharp_using_sscli): New function.
6897                 (execute_csharp_program): Call it.
6898
6899         2006-06-21  Bruno Haible  <bruno@clisp.org>
6900
6901                 Avoid warnings from recent versions of mcs.
6902                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6903                 -o, -L, -r any more. Use options documented since mcs-1.0
6904                 instead. Similarly for -g.
6905
6906         2005-07-09  Bruno Haible  <bruno@clisp.org>
6907
6908                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6909                 add a .dll suffix.
6910                 Reported by Mark Junker <mjscod@gmx.de>.
6911
6912         2006-06-17  Bruno Haible  <bruno@clisp.org>
6913
6914                 * config.charset: Update for NetBSD 3.0.
6915
6916         2006-05-17  Bruno Haible  <bruno@clisp.org>
6917
6918                 Cygwin portability.
6919                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6920
6921         2006-05-16  Bruno Haible  <bruno@clisp.org>
6922
6923                 * localcharset.c [CYGWIN]: Include <windows.h>.
6924                 (get_charset_aliases): For Cygwin, return the same CPxxx
6925                 aliases list as under WIN32.
6926                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6927                 the environment variables. Fall back to GetACP().
6928
6929         2006-04-05  Bruno Haible  <bruno@clisp.org>
6930
6931                 * config.charset: Update Juan Manuel Guerrero's address.
6932
6933         2005-02-12  Bruno Haible  <bruno@clisp.org>
6934
6935                 * allocsa.h: Add extern "C" for C++.
6936
6937         2005-02-10  Bruno Haible  <bruno@clisp.org>
6938
6939                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6940                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6941
6942         2006-07-22  Bruno Haible  <bruno@clisp.org>
6943
6944                 * gettext.h: Update to GNU gettext-0.15.
6945
6946 2006-07-22  Bruno Haible  <bruno@clisp.org>
6947
6948         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6949         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6950         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6951
6952 2006-07-21  Eric Blake  <ebb9@byu.net>
6953
6954         * modules/stdlib-safer: New file.
6955         * MODULES.html.sh (File stream based Input/Output): Add
6956         stdlib-safer.
6957
6958 2006-07-21  Eric Blake  <ebb9@byu.net>
6959
6960         * lib/stdlib-safer.h: New file from coreutils, required by
6961         stdlib--.h.
6962
6963 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6964
6965         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6966
6967 2006-07-20  Bruno Haible  <bruno@clisp.org>
6968
6969         * gnulib-tool: Recognize new option --assume-autoconf.
6970         (autoconf_minversion): New variable.
6971         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6972
6973 2006-07-20  Bruno Haible  <bruno@clisp.org>
6974
6975         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
6976
6977 2006-07-19  Derek R. Price  <derek@ximbiot.com>
6978
6979         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
6980         Reindent and repaginate.
6981
6982 2006-07-19  Derek Price  <derek@ximbiot.com>
6983
6984         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
6985         Correct grammar.
6986
6987 2006-07-17  Bruno Haible  <bruno@clisp.org>
6988
6989         * modules/list: New file.
6990         * modules/array-list: New file.
6991         * modules/carray-list, modules/carray-list-tests: New files.
6992         * modules/linked-list, modules/linked-list-tests: New files.
6993         * modules/avltree-list, modules/avltree-list-tests: New files.
6994         * modules/rbtree-list, modules/rbtree-list-tests: New files.
6995         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
6996         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
6997         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
6998         * modules/oset: New file.
6999         * modules/array-oset: New file.
7000         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7001         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7002         * tests/test-carray_list.c: New file.
7003         * tests/test-linked_list.c: New file.
7004         * tests/test-avltree_list.c: New file.
7005         * tests/test-rbtree_list.c: New file.
7006         * tests/test-linkedhash_list.c: New file.
7007         * tests/test-avltreehash_list.c: New file.
7008         * tests/test-rbtreehash_list.c: New file.
7009         * tests/test-avltree_oset.c: New file.
7010         * tests/test-rbtree_oset.c: New file.
7011         * MODULES.html.sh (Container data structures): New section.
7012
7013 2006-07-17  Bruno Haible  <bruno@clisp.org>
7014
7015         * m4/gl_list.m4: New file.
7016
7017 2006-07-17  Bruno Haible  <bruno@clisp.org>
7018
7019         * lib/gl_list.h: New file.
7020         * lib/gl_list.c: New file.
7021         * lib/gl_array_list.h: New file.
7022         * lib/gl_array_list.c: New file.
7023         * lib/gl_carray_list.h: New file.
7024         * lib/gl_carray_list.c: New file.
7025         * lib/gl_linked_list.h: New file.
7026         * lib/gl_linked_list.c: New file.
7027         * lib/gl_anylinked_list1.h: New file.
7028         * lib/gl_anylinked_list2.h: New file.
7029         * lib/gl_avltree_list.h: New file.
7030         * lib/gl_avltree_list.c: New file.
7031         * lib/gl_anyavltree_list1.h: New file.
7032         * lib/gl_anyavltree_list2.h: New file.
7033         * lib/gl_rbtree_list.h: New file.
7034         * lib/gl_rbtree_list.c: New file.
7035         * lib/gl_anyrbtree_list1.h: New file.
7036         * lib/gl_anyrbtree_list2.h: New file.
7037         * lib/gl_anytree_list1.h: New file.
7038         * lib/gl_anytree_list2.h: New file.
7039         * lib/gl_linkedhash_list.h: New file.
7040         * lib/gl_linkedhash_list.c: New file.
7041         * lib/gl_anyhash_list1.h: New file.
7042         * lib/gl_anyhash_list2.h: New file.
7043         * lib/gl_avltreehash_list.h: New file.
7044         * lib/gl_avltreehash_list.c: New file.
7045         * lib/gl_rbtreehash_list.h: New file.
7046         * lib/gl_rbtreehash_list.c: New file.
7047         * lib/gl_anytreehash_list1.h: New file.
7048         * lib/gl_anytreehash_list2.h: New file.
7049
7050         * lib/gl_oset.h: New file.
7051         * lib/gl_oset.c: New file.
7052         * lib/gl_array_oset.h: New file.
7053         * lib/gl_array_oset.c: New file.
7054         * lib/gl_avltree_oset.h: New file.
7055         * lib/gl_avltree_oset.c: New file.
7056         * lib/gl_rbtree_oset.h: New file.
7057         * lib/gl_rbtree_oset.c: New file.
7058         * lib/gl_anytree_oset.h: New file.
7059
7060 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7061
7062         * m4/mkancesdirs.m4: New file.
7063         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7064         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7065         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7066         it.
7067
7068 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7069
7070         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7071         * lib/mkancesdirs.h: New files.
7072         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7073         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7074         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7075         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7076         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7077         callers changed.  Revamp internals significantly, by not
7078         attempting to create directories that are temporarily more
7079         permissive than the final results.  Do not attempt to use
7080         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7081         This removes some race conditions, fixes some bugs, and simplifies
7082         things.  Use new dirchownmod function to do owner and mode changes.
7083         * lib/mkdir-p.h: Likewise.
7084         * lib/modechange.c (octal_to_mode): New function.
7085         (struct mode_change): New member mentioned.
7086         (make_node_op_equals): New arg mentioned.  All callers changed.
7087         (mode_compile): Keep track of which mode bits the user has explicitly
7088         mentioned.
7089         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7090         New arg PMODE_BITS, to keep track of which mode bits the user
7091         mentioned; it treats S_ISUID and S_ISGID speciall.
7092         All callers changed.
7093         * lib/modechange.h: Likewise.
7094
7095 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7096
7097         * MODULES.html.sh: Add mkancestors.
7098         * modules/mkancesdirs: New module.
7099         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7100         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7101         The chdir-safer and afs files are now orphans; I'll remove them
7102         unless someone speaks up.
7103         Add lib/dirchownmod.c, lib/dirchownmod.h.
7104         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7105         Add lchown, mkancesdirs.
7106         (Maintainer): Add self.
7107
7108 2006-07-15  Karl Berry  <karl@gnu.org>
7109
7110         * gnulib-tool: help message wording/arrangement.
7111
7112 2006-07-14  Simon Josefsson  <jas@extundo.com>
7113
7114         * doc/gnulib.texi (Libtool and Windows): New section.
7115
7116 2006-07-12  Simon Josefsson  <jas@extundo.com>
7117
7118         * modules/gendocs (License): Fix license, approved by Karl.
7119
7120 2006-07-12  Eric Blake  <ebb9@byu.net>
7121
7122         * MODULES.html.sh: Add gendocs.
7123
7124 2006-07-11  Eric Blake  <ebb9@byu.net>
7125
7126         * modules/fdl: New module, to install doc/fdl.texi.
7127         * MODULES.html.sh: Add new section for documentation modules.
7128         * gnulib-tool: Avoid space-tab.
7129         (--doc-base): New option, to manage files from doc.
7130
7131 2006-07-11  Eric Blake  <ebb9@byu.net>
7132
7133         * m4/absolute-header.m4: Fix comments to match recent change.
7134
7135 2006-07-11  Eric Blake  <ebb9@byu.net>
7136
7137         * gnulib-tool: List --doc-base before --tests-base.
7138
7139 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7140
7141         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7142
7143 2006-07-11  Bruno Haible  <bruno@clisp.org>
7144
7145         * README: Mention where to put documentation.
7146
7147 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7148
7149         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7150
7151 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7152
7153         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7154         to stdint.m4.
7155
7156 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7157
7158         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7159         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7160         "no/such/file/stdint.h" when there is no such file, so that
7161         the resulting C code can be parsed by dodgy compilers.
7162         Problems reported by Bob Proulx.
7163
7164 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7165
7166         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7167         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7168         macros into the GNU _D_EXACT_NAMLEN.
7169         * lib/savedir.c:  Likewise.
7170         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7171
7172 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7173         and Paul Eggert  <eggert@cs.ucla.edu>
7174
7175         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7176         * m4/savedir.m4:
7177         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7178         macros into the GNU _D_EXACT_NAMLEN.
7179
7180 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7181
7182         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7183         around the absolute name, to work around a problem with the HP-UX
7184         11.23 native C compiler, reported by Bob Proulx.
7185
7186 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7187
7188         * doc/maintain.texi, make-stds.texi: Sync from
7189         <http://savannah.gnu.org/projects/gnustandards>.
7190
7191 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7192
7193         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7194
7195 2006-07-09  Jim Meyering  <jim@meyering.net>
7196
7197         * m4/glob.m4: Remove a doubled word in a comment.
7198
7199 2006-07-09  Jim Meyering  <jim@meyering.net>
7200
7201         * lib/argp-pv.c: Remove a doubled word in a comment.
7202         * lib/check-version.c (check_version): Likewise.
7203         * lib/javacomp.c (compile_java_class): Likewise.
7204
7205 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7206
7207         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7208         for the benefit of people using Autoconf 2.60.  If you want to
7209         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7210         (or m4/onceonly.m4, if pre-2.57) manually.
7211
7212 2006-07-08  Jim Meyering  <jim@meyering.net>
7213
7214         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7215         comment.
7216         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7217         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7218         comment.
7219
7220 2006-07-08  Jim Meyering  <jim@meyering.net>
7221
7222         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7223
7224 2006-07-07  Simon Josefsson  <jas@extundo.com>
7225
7226         * tests/test-crc.c: Change expected crc value, the test vector
7227         were probably computed using the old broken crc.c?
7228
7229 2006-07-06  Simon Josefsson  <jas@extundo.com>
7230
7231         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7232         now the canonical place for the M4 file).
7233
7234         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7235         from the sys_socket dependency now.
7236
7237         * modules/inet_pton (Files): Ditto.
7238
7239         * modules/inet_ntop (Files): Ditto.
7240
7241 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7242
7243         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7244         not gl_PREREQ_GETUSERSHELL.
7245
7246 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7247
7248         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7249         with only one argument, for Autoconf 2.60.
7250         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7251         expand to nothing, so add a shell command to avoid syntax error.
7252         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7253
7254 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7255
7256         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7257
7258 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7259
7260         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7261         no longer needed.  Check for isblank decl.
7262         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7263         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7264         of existence.
7265
7266 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7267
7268         * lib/getloadavg.c: Use __VMS, not VMS.
7269         * lib/getopt.c: Likewise.
7270         * lib/getpagesize.h: Likewise.
7271         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7272         and probably does not work.
7273
7274 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7275
7276         * lib/.cppi-disable: Add wcwidth.
7277         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7278         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7279         (ISGRAPH): Remove.  All uses changed to isgraph.
7280         (FOLD) [!defined _LIBC]: Remove special case.
7281         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7282         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7283         HAVE_ISBLANK.
7284         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7285         case.
7286
7287 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7288
7289         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7290         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7291         brackets.  Other minor changes to suppress some compiler
7292         warnings.
7293
7294 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7295         and Paul Eggert  <eggert@cs.ucla.edu>
7296
7297         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7298         of invoking obsolescent AC_HEADER_DIRENT macro.
7299         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7300         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7301         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7302         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7303         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7304         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7305         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7306         * m4/readdir.m4: Remove; no longer needed.
7307
7308 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7309         and Paul Eggert  <eggert@cs.ucla.edu>
7310
7311         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7312         Don't worry about this obsolete case any more.
7313         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7314         directories.
7315         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7316         worry about this obsolete case any more.
7317         * lib/fts.c: Likewise.
7318         * lib/getcwd.c: Likewise.
7319         * lib/glob.h: Likewise.
7320         * lib/savedir.c: Likewise.
7321
7322 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7323
7324         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7325         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7326         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7327         needed.
7328         All uses removed.
7329         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7330         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7331         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7332         needed.
7333         * m4/getdate.m4 (gl_GETDATE): Likewise.
7334         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7335         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7336         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7337         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7338         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7339         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7340         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7341         needed.
7342
7343 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7344
7345         * lib/memcasecmp.c: Include <limits.h>.
7346         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7347         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7348         Don't assume isdigit succeeds only on '0' through '9'.
7349
7350 2006-07-05  Eric Blake  <ebb9@byu.net>
7351
7352         * modules/getaddrinfo (Depends-on): Add snprintf.
7353
7354 2006-07-05  Eric Blake  <ebb9@byu.net>
7355
7356         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7357         to avoid 'header present but could not be compiled' on cygwin.
7358
7359 2006-07-05  Eric Blake  <ebb9@byu.net>
7360
7361         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7362         missing from netdb.h.
7363         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7364
7365 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7366
7367         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7368         no longer needed.
7369         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7370         * m4/getdate.m4 (gl_GETDATE): Likewise.
7371         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7372         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7373         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7374         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7375         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7376
7377 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7378
7379         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7380         All uses of is_space replaced by isspace.
7381         * lib/exit.h: Don't talk about STDC_HEADERS.
7382         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7383         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7384         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7385         replaced by isprint etc.
7386         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7387         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7388         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7389         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7390         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7391         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7392
7393 2006-07-05  Bruno Haible  <bruno@clisp.org>
7394
7395         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7396         the function exists, before testing against AIX.
7397         Reported by Martin Lambers <marlam@marlam.de>.
7398
7399 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7400
7401         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7402         From Mark D. Baushke.
7403
7404 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7405
7406         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7407         to the absolute name, not just one, to bypass Sun C 5.8's
7408         "warning: #include of /usr/include/... may be non-portable".
7409
7410 2006-07-04  Eric Blake  <ebb9@byu.net>
7411
7412         * modules/dirname-tests: New test module.
7413         * tests/test-dirname.c: New file, replacing dirname.c
7414         TEST_DIRNAME section that was recently deleted.
7415
7416 2006-07-04  Bruno Haible  <bruno@clisp.org>
7417
7418         Assume ANSI C header files and <ctype.h> functions.
7419         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7420         (mbsnwidth): Use isprint, iscntrl instead.
7421
7422 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7423
7424         Merge from coreutils.
7425         * MODULES.html.sh: Add xstrtold.
7426         * modules/xstrtold: New file.
7427         * modules/cycle-check (Files): Add lib/same-inode.h.
7428         * modules/dirname (Files): Add m4/double-slash-root.m4.
7429         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7430         * modules/mkdir-p (Files): Add lib/same-inode.h.
7431         * modules/same (Files): Add lib/same-inode.h.
7432
7433 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7434
7435         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7436         This is to keep the terminology clean; POSIX talks about
7437         "absolute pathnames", not "full pathnames", but the GNU
7438         Coding Standards say to use "path" for something else;
7439         so use "absolute" to keep both sides happy.
7440         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7441         Set gl_absolute_header, not gl_full_header_path.
7442         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7443         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7444         All uses changed.
7445
7446         Merge from coreutils.
7447
7448         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7449
7450         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7451         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7452         want to require the building of c-strtod.o.
7453         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7454         needs -lm directly.
7455         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7456
7457         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7458
7459         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7460         --as-needed option if available.  Problem reported by Albert Chin in
7461         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7462         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7463         cc merely issues a bunch of annoying warnings for --as-needed
7464         (this problem was reported by Bob Proulx).  Also, try linking with
7465         -lm to detect a bug in binutils 2.16 (this problem was reported
7466         by Ralf Wildenhues).
7467
7468         2006-06-18  Jim Meyering  <jim@meyering.net>
7469
7470         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7471         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7472         macro.
7473         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7474         also check for glibc-2.4's abort-inducing bug.
7475
7476         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7477         Low-probability clean-up should be to use rmdir to get rid of
7478         the just-created directory, not unlink.
7479
7480         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7481         configure fail, and request a bug report to inform us about it.
7482         Add a comment that, barring reports to the contrary, in 2007 we'll
7483         assume ftruncate is universally available.
7484
7485         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7486
7487         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7488
7489         2006-03-12  Jim Meyering  <jim@meyering.net>
7490
7491         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7492         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7493         * m4/same.m4 (gl_SAME): Likewise.
7494         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7495
7496         2006-03-11  Eric Blake  <ebb9@byu.net>
7497
7498         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7499         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7500         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7501         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7502
7503 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7504
7505         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7506         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7507         reported by Mark D. Baushke, one in
7508         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7509
7510         Merge from coreutils.
7511
7512         * lib/.cppi-disable: Add stdint_.h.
7513         * lib/.cvsignore: Add stdint.h.
7514
7515         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7516
7517         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7518         both double and long double versions.
7519         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7520         * lib/xstrtold.c: New file.
7521         * lib/xstrtod.h (xstrtold): New decl.
7522
7523         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7524
7525         * lib/filemode.c (setst): Remove.
7526         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7527         (arguably) clearer, and the generated code is a bit smaller on my
7528         Debian GNU/Linux stable x86 host.
7529
7530         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7531
7532         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7533         Assume that filemode.h includes sys/types.h and sys/stat.h.
7534         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7535         (ftypelet): Reorder to put common cases first, for efficiency.
7536         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7537         to do 'M'.
7538         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7539         of 10, for compatibility with FreeBSD.  All callers changed.
7540         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7541         types that can't be deduced solely from st_mode.  First arg is now a
7542         const pointer.
7543         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7544         (strmode): Renamed from mode_string.
7545         (filemodestring): New decl.
7546         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7547         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7548         needed.
7549         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7550
7551         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7554         fsusage.h now does that.  Include fsusage.h first, to test interface.
7555         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7556         at most one method (the old code could have generated decls that
7557         didn't conform to C89, not that this was ever exercised).
7558         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7559
7560         2006-03-19  Jim Meyering  <jim@meyering.net>
7561
7562         Work even in a chroot where d_ino values for entries in "/"
7563         don't match the stat.st_ino values for the same names.
7564         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7565         number, iterate through all entries again, using lstat instead.
7566         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7567         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7568
7569         * lib/getcwd.c (__getcwd): Clarify a comment.
7570         Use memcpy in place of a call to strcpy.
7571
7572         2006-03-12  Jim Meyering  <jim@meyering.net>
7573
7574         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7575         matches that of the current directory (which we're about to chdir ".."
7576         out of), then save the dev-ino of the parent, instead.
7577
7578         * lib/same-inode.h (SAME_INODE): New file/macro.
7579         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7580         Include "same-inode.h", instead.
7581         * lib/same.c: Likewise.
7582         * lib/cycle-check.h: Include "same-inode.h".
7583         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7584         * lib/cycle-check.c (SAME_INODE): Remove definition.
7585         * lib/root-dev-ino.h: Include "same-inode.h".
7586
7587         2006-03-11  Eric Blake  <ebb9@byu.net>
7588
7589         * lib/same.c (same_name): s/base_name/last_component/
7590         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7591         * lib/filenamecat.c (file_name_concat): Likewise.
7592
7593         2006-03-11  Eric Blake  <ebb9@byu.net>,
7594                     Paul Eggert  <eggert@cs.ucla.edu>
7595
7596         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7597         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7598         drive prefix.
7599         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7600         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7601         (last_component): New method.
7602         * lib/dirname.c (dir_len): Determine when drive letters need a
7603         subsequent slash.  Preserve // when it is special.
7604         (dir_name): Don't append dot when drive letter is absolute.
7605         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7606         * lib/basename.c (base_name): New semantics - malloc the result.
7607         Preserve // when it is special.  Preserve relative files that look
7608         like drive letters.
7609         (base_len): Preserve // when it is special.
7610         (last_component): New method, similar to old base_name semantics.
7611         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7612         base_name.  Strip redundant slashes from ///.
7613
7614 2006-07-03  Jim Meyering  <jim@meyering.net>
7615
7616         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7617         macro is used before the first cycle_check call.
7618
7619 2006-07-03  Eric Blake  <ebb9@byu.net>
7620
7621         * modules/dirname (Depends-on): Add xstrndup.
7622
7623 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7624
7625         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7626         test cases, so that config.log is a bit easier to follow.
7627
7628 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7629
7630         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7631         both are 64 bits, since this seems to be the tradition, and this
7632         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7633         we ever run into a host that prefers long long to long in this
7634         case, we'll need another configure-time test.  Problem reported by
7635         Jim Meyering.
7636
7637 2006-07-02  Eric Blake  <ebb9@byu.net>
7638
7639         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7640
7641 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7642
7643         * modules/inttypes (Depends-on): No longer depends on stdint.
7644         * modules/stdint (Description): Say more about assumptions.
7645         Say that the fast types might differ.  Say macros are used.
7646         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7647         (Makefile.am): Revise list of substituted symbols to match
7648         new stdint.m4.
7649         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7650         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7651         * tests/test-stdint.c (verify_same_types)
7652         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7653         the code conforms to C99/C89.
7654         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7655         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7656
7657 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7658
7659         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7660         but fix a bug, by requiring at least 64 bits.
7661         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7662         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7663         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7664         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7665
7666         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7667         changes.  Make 2.59 a prerequisite.  Check and substitute for
7668         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7669         inttypes.h.  Do not use special include files; just use the
7670         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7671         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7672         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7673         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7674         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7675         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7676         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7677         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7678         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7679         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7680         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7681         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7682         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7683         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7684         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7685         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7686         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7687         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7688         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7689         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7690         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7691         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7692         not check for things that C99 does not require, e.g., int8_t.  If
7693         a test isn't needed unless <stdint.h> isn't working, and is
7694         unlikely to be needed for any other reason, then don't do it
7695         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7696         size_t, since we assume C89 freestanding at least.  Do not check
7697         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7698         the right thing even if the types are not defined.  Instead use:
7699         (gl_STDINT_TYPE_PROPERTIES): New macro.
7700         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7701         testing whether <sys/types.h> clashes, as Autoconf does this for
7702         us now.  All uses removed.
7703         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7704         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7705         (gl_CHECK_TYPE_SAME):
7706         Remove; no longer needed.
7707         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7708         exists, since we'll return 0 anyway in that case.
7709         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7710
7711 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7712
7713         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7714         possible collision with system files.
7715         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7716         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7717         WCHAR_MIN and WCHAR_MAX in this case.
7718         (<stddef.h>): Do not include; no longer needed.
7719         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7720         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7721         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7722         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7723         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7724         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7725         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7726         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7727         !defined(__c99))]: Include in this case too, since it's harmless
7728         now.
7729         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7730         dangerous to do so.
7731         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7732         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7733         (_STDINT_MIN, _STDINT_MAX): New macros.
7734         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7735         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7736         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7737         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7738         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7739         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7740         macros, not typedefs; this simplifies things quite a bit.
7741         Use long int for all types narrower than int64_t.
7742         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7743         Define in terms of long long int or int64_t or long int,
7744         not int64_t or int32_t.  This saves some compile-time testing.
7745         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7746         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7747         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7748         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7749         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7750         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7751         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7752         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7753         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7754         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7755         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7756         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7757         undef any previous version and define our own version, for
7758         simplicity and consistency with the new macros for types.
7759         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7760         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7761         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7762         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7763         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7764         @WINT_T_SUFFIX@ to keep things simple here.
7765         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7766         Simplify by assuming typical 8/16/32/64 host, since we're
7767         already doing that elsewhere anyway.
7768         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7769         and assume long long int is 64 bits if available.  This
7770         speeds up 'configure'.
7771
7772 2006-07-01  Eric Blake  <ebb9@byu.net>
7773
7774         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7775         Reported by Andreas Buening.
7776
7777 2006-07-01  Eric Blake  <ebb9@byu.net>
7778
7779         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7780
7781 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7782
7783         * lib/getaddrinfo.c: fixed typo
7784
7785 2006-06-29  Jim Meyering  <jim@meyering.net>
7786
7787         * modules/strftime (Maintainer): Add my name, since with the
7788         FPRINTFTIME changes strftime.c has forked from glibc.
7789
7790 2006-06-29  Eric Blake  <ebb9@byu.net>
7791
7792         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7793
7794 2006-06-29  Eric Blake  <ebb9@byu.net>
7795
7796         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7797
7798 2006-06-29  Eric Blake  <ebb9@byu.net>
7799
7800         * lib/stat_.h: New file.
7801
7802 2006-06-29  Eric Blake  <ebb9@byu.net>
7803
7804         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7805         unused static function.
7806
7807 2006-06-29  Eric Blake  <ebb9@byu.net>
7808
7809         * doc/functions.texi (Function Portability): Document missing lstat
7810         on mingw.
7811
7812 2006-06-29  Eric Blake  <ebb9@byu.net>
7813
7814         * MODULES.html.sh: Add sys_stat.
7815         * modules/sys_stat: New module.
7816         * modules/mkstemp (Depends-on): Add sys_stat.
7817
7818 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7819
7820         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7821
7822 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7823
7824         * m4/c-bs-a.m4: Removed.
7825
7826 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7827
7828         * lib/strftime.c: Assume strftime() exists.
7829
7830 2006-06-29  Derek Price  <derek@ximbiot.com>
7831
7832         * modules/c-bs-a: Removed - \a is C89.
7833         * MODULES.html.sh: Remove c-bs-a.
7834
7835 2006-06-29  Bruno Haible  <bruno@clisp.org>
7836
7837         * modules/wcwidth (License): Change to LGPL.
7838
7839 2006-06-28  Simon Josefsson  <jas@extundo.com>
7840
7841         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7842         on _WIN32.
7843
7844         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7845         getnameinfo.
7846
7847 2006-06-28  Simon Josefsson  <jas@extundo.com>
7848
7849         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7850
7851 2006-06-28  Simon Josefsson  <jas@extundo.com>
7852
7853         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7854         functions there.  It will succeed on Windows XP, but on Windows
7855         2000 and (presumably) earlier, it will fail, and use the internal
7856         re-implementation.
7857         (use_win32_p): New function.
7858         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7859         Support AI_NUMERICSERV to disable getservbyname.
7860         (getnameinfo): New function, only supports
7861         NI_NUMERICHOST|NI_NUMERICSERV for now.
7862
7863         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7864         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7865         getnameinfo.
7866
7867 2006-06-28  Eric Blake  <ebb9@byu.net>
7868
7869         * modules/wcwidth: New file.
7870         * modules/mbchar (Depends-on): Add wcwidth.
7871         * modules/mbswidth (Depends-on): Add wcwidth.
7872         * MODULES.html.sh: Add wcwidth.
7873
7874 2006-06-28  Eric Blake  <ebb9@byu.net>
7875
7876         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7877         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7878
7879 2006-06-28  Eric Blake  <ebb9@byu.net>
7880
7881         * lib/xvasprintf.h: Fix comments.
7882
7883 2006-06-28  Eric Blake  <ebb9@byu.net>
7884
7885         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7886         * lib/mbswidth.c (wcwidth): Move from here...
7887         * lib/wcwidth.h: ...to this new file.
7888
7889 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7890
7891         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7892
7893         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7894         it's obsolete.
7895         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7896
7897 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7898
7899         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7900         Autoconf 2.60 says this stuff was obsolete.
7901
7902 2006-06-28  Bruno Haible  <bruno@clisp.org>
7903
7904         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7905
7906 2006-06-28  Bruno Haible  <bruno@clisp.org>
7907
7908         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7909         gt_TYPE_WCHAR_T.
7910
7911 2006-06-28  Bruno Haible  <bruno@clisp.org>
7912
7913         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7914         declaration for wcwidth.
7915         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7916
7917 2006-06-28  Bruno Haible  <bruno@clisp.org>
7918
7919         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7920         (mkdir): Define using _mkdir.
7921
7922 2006-06-28  Bruno Haible  <bruno@clisp.org>
7923
7924         * lib/getaddrinfo.h: Fix POSIX URL.
7925         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7926         _WIN32.
7927         (use_win32_p): Make static.
7928         (getaddrinfo): Reject service name if it is empty or does not consist
7929         solely of decimal digits, or if its value is > 65535.
7930         (getnameinfo): Remove useless casts.
7931
7932 2006-06-27  Simon Josefsson  <jas@extundo.com>
7933
7934         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7935         Eggert and Martin Lambers.
7936
7937 2006-06-27  Simon Josefsson  <jas@extundo.com>
7938
7939         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7940         Eggert and Martin Lambers.
7941
7942 2006-06-27  Bruno Haible  <bruno@clisp.org>
7943
7944         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7945         result to 0, not to empty.
7946         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7947
7948 2006-06-27  Bruno Haible  <bruno@clisp.org>
7949
7950         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7951
7952 2006-06-26  Simon Josefsson  <jas@extundo.com>
7953
7954         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7955         present.
7956
7957 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7958
7959         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7960         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7961         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7962
7963 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7964
7965         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7966
7967 2006-06-26  Bruno Haible  <bruno@clisp.org>
7968
7969         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7970
7971 2006-06-26  Bruno Haible  <bruno@clisp.org>
7972
7973         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
7974
7975 2006-06-26  Bruno Haible  <bruno@clisp.org>
7976
7977         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
7978         SGI C compiler in pre-C99 mode.
7979         Suggested by Mark D. Baushke and Larry Jones.
7980
7981 2006-06-26  Bruno Haible  <bruno@clisp.org>
7982
7983         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
7984         WCHAR_MAX.
7985         Reported by Mark D. Baushke and Larry Jones.
7986
7987 2006-06-26  Bruno Haible  <bruno@clisp.org>
7988
7989         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
7990         in pre-C99 mode.
7991         Suggested by Mark D. Baushke and Larry Jones.
7992
7993 2006-06-23  Simon Josefsson  <jas@extundo.com>
7994             Bruno Haible  <bruno@clisp.org>
7995
7996         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
7997         Emit mostlyclean-local rule.
7998         (func_emit_tests_Makefile_am): Likewise.
7999         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8000
8001 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8002
8003         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8004
8005 2006-06-23  Bruno Haible  <bruno@clisp.org>
8006
8007         * tests/test-stdint.c: Update to match ISO C 99 Technical
8008         Corrigendum 1.
8009
8010 2006-06-23  Bruno Haible  <bruno@clisp.org>
8011
8012         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8013
8014 2006-06-23  Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/stdint_.h: Treat IRIX like OpenBSD.
8017
8018 2006-06-23  Bruno Haible  <bruno@clisp.org>
8019
8020         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8021         ISO C 99 Technical Corrigendum 1.
8022
8023 2006-06-22  Simon Josefsson  <jas@extundo.com>
8024
8025         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8026         MinGW.
8027
8028 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8029
8030         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8031         needed.  Some compiler complained about some of them.  Problem reported
8032         by Larry Jones in
8033         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8034
8035 2006-06-21  Simon Josefsson  <jas@extundo.com>
8036
8037         * tests/test-getaddrinfo.c: New file.
8038
8039         * modules/getaddrinfo-tests: New file.
8040
8041         * MODULES.html.sh: Add inet_pton.
8042
8043         * modules/inet_pton: New file.
8044
8045 2006-06-21  Simon Josefsson  <jas@extundo.com>
8046
8047         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8048         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8049         of using the (limited) gnulib implementation on Windows XP.
8050
8051         * m4/inet_pton.m4: New file.
8052
8053 2006-06-21  Simon Josefsson  <jas@extundo.com>
8054
8055         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8056         variable.
8057
8058         * lib/socket_.h: Don't define WINVER.
8059
8060         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8061         slightly modified to work in gnulib.
8062
8063 2006-06-21  Simon Josefsson  <jas@extundo.com>
8064
8065         * doc/gnulib.texi (Windows sockets): Add.
8066
8067 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8068
8069         * lib/read-file.c (fread_file): Start with buffer allocation of
8070         0 bytes rather than 1 byte; this simplifies the code.
8071         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8072         code to free buffer and save/restore errno.
8073         (internal_read_file): Remove unused local.
8074
8075 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8076
8077         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8078         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8079         Problem reported by Denis Excoffier in
8080         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8081
8082 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8083
8084         * modules/sys_socket, modules/socklen: Include sys/types since
8085         FreeBSD 4.x's sys/socket.h needs it.
8086
8087 2006-06-19  Simon Josefsson  <jas@extundo.com>
8088
8089         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8090
8091 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8092
8093         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8094
8095 2006-06-19  Bruno Haible  <bruno@clisp.org>
8096
8097         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8098         and FULL_PATH_INTTYPES_H in angle brackets.
8099         Reported by Mark D. Baushke <mdb@gnu.org>.
8100
8101 2006-06-17  Eric Blake  <ebb9@byu.net>
8102
8103         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8104         errno.
8105
8106 2006-06-17  Bruno Haible  <bruno@clisp.org>
8107
8108         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8109         <sys/inttypes.h>.
8110
8111 2006-06-17  Bruno Haible  <bruno@clisp.org>
8112
8113         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8114         whether errno is declared. Assume <errno.h> declares errno.
8115
8116 2006-06-17  Bruno Haible  <bruno@clisp.org>
8117
8118         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8119
8120 2006-06-17  Bruno Haible  <bruno@clisp.org>
8121
8122         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8123         problem on Solaris 2.5.1.
8124
8125 2006-06-16  Eric Blake  <ebb9@byu.net>
8126
8127         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8128         * lib/unicodeio.c [!defined errno]: Likewise.
8129         * lib/strtol.c [!defined errno]: Likewise.
8130         * lib/strtod.c [!defined errno]: Likewise.
8131
8132 2006-06-15  Eric Blake  <ebb9@byu.net>
8133
8134         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8135
8136 2006-06-15  Eric Blake  <ebb9@byu.net>
8137
8138         * config/srclist.txt (ssize_t.m4): Lose sync.
8139
8140 2006-06-15  Bruno Haible  <bruno@clisp.org>
8141
8142         * modules/stdint (Files): Include m4/full-header-path.m4,
8143         m4/size_max.m4, m4/wchar_t.m4.
8144         (Makefile.am): Many more substitutions.
8145         * modules/stdint-tests: New file.
8146         * tests/test-stdint.c: New file.
8147
8148 2006-06-15  Bruno Haible  <bruno@clisp.org>
8149
8150         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8151         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8152         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8153         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8154         gl_CHECK_TYPE_SAME): New macros.
8155
8156 2006-06-15  Bruno Haible  <bruno@clisp.org>
8157
8158         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8159
8160 2006-06-15  Bruno Haible  <bruno@clisp.org>
8161
8162         * lib/stdint_.h: Rewritten to be fully auto-configured.
8163         Fixes bug on HP-UX/IA64.
8164
8165 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8166
8167         * lib/getdate.y (__attribute__): Don't define if already defined.
8168         Problem reported by Larry Jones.
8169         * lib/utimens.c (__attribute__): Likewise.
8170
8171 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8172
8173         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8174         reported by Andreas Schwab.
8175
8176 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8177             Bruno Haible  <bruno@clisp.org>
8178
8179         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8180         check for the declaration of strnlen and a run test that exposes the
8181         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8182         rpl_strndup.
8183
8184 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8185             Bruno Haible  <bruno@clisp.org>
8186
8187         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8188
8189 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8190
8191         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8192         compile test, for Tru64 4.0D.
8193
8194 2006-05-28  Karl Berry  <karl@gnu.org>
8195
8196         * config/srclist.txt (printf-args.c): lose sync.
8197
8198 2006-05-26  Martin Lambers  <marlam@marlam.de>
8199
8200         * lib/getpass.c: Updates the test for the native W32 API, and adds
8201         missing includes, thus fixing compilation warnings.
8202
8203 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8204
8205         * lib/exclude.c (exclude_fnmatch): New function.
8206         (excluded_file_name): Call exclude_fnmatch.
8207         * lib/exclude.h (excluded_file_name): New prototype
8208
8209 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8210
8211         * lib/tempname.c (small_open, large_open): New macros.
8212         (__open, __open64) [!_LIBC]: Remove.
8213         (__gen_tempname): Use small_open and large_open instead of __open
8214         and __open64.  This fixes a portability bug on HP-UX 11.11i
8215         reported by Simon Wing-Tang in
8216         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8217
8218 2006-05-24  Bruno Haible  <bruno@clisp.org>
8219
8220         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8221         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8222         Reported by Thorsten Maerz <torte@netztorte.de> via
8223         Aaron Stone <aaron@serendipity.cx>.
8224
8225 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8226
8227         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8228         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8229         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8230         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8231         not really conditional on the cache.
8232         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8233
8234 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8235
8236         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8237         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8238         (my_usleep): Don't mishandle maximum value.
8239
8240 2006-05-19  Jim Meyering  <jim@meyering.net>
8241
8242         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8243
8244 2006-05-17  Bruno Haible  <bruno@clisp.org>
8245
8246         Cygwin portability.
8247         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8248
8249 2006-05-17  Bruno Haible  <bruno@clisp.org>
8250
8251         * lib/stdint_.h: Fix recognition of Cygwin.
8252
8253 2006-05-15  Bruno Haible  <bruno@clisp.org>
8254
8255         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8256         on libtool patch by Ralf Wildenhues.
8257
8258 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8259
8260         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8261         test for C99 conformance; (bool) 0.5 is an integer constant
8262         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8263         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8264
8265 2006-05-11  Simon Josefsson  <jas@extundo.com>
8266
8267         * m4/xvasprintf.m4: Fix obvious typo.
8268
8269 2006-05-11  Jim Meyering  <jim@meyering.net>
8270
8271         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8272         James Lemley.
8273
8274 2006-05-10  Simon Josefsson  <jas@extundo.com>
8275
8276         * lib/md4.c: Typo fix, update copyright years.
8277         (K1, K2): Don't use L because it turn computations into 64-bit on
8278         64-bit platforms.
8279
8280 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8281
8282         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8283         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8284         unwanted sign propagation, e.g., on hosts with 64-bit int.
8285         There still are some problems with reeelly weird theoretical hosts
8286         (e.g., 33-bit int) but it's not worth worrying about now.
8287         * lib/sha1.c (rol): Likewise.
8288         (K1, K2, K3, K4): Remove unnecessary L suffix.
8289
8290 2006-05-10  Bruno Haible  <bruno@clisp.org>
8291
8292         * lib/des.c: Cast to avoid warnings.
8293
8294 2006-05-09  Bruno Haible  <bruno@clisp.org>
8295
8296         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8297         (Depends-on): Depend also on xsize, stdarg.
8298         (configure.ac): Add gl_XVASPRINTF.
8299
8300 2006-05-09  Bruno Haible  <bruno@clisp.org>
8301
8302         * m4/xvasprintf.m4: New file.
8303
8304 2006-05-09  Bruno Haible  <bruno@clisp.org>
8305
8306         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8307         (EOVERFLOW): Define fallback value.
8308         (xstrcat): New function.
8309         (xvasprintf): Recognize the special case of a string concatenation.
8310
8311 2006-05-08  Eric Blake  <ebb9@byu.net>
8312
8313         * gnulib-tool (func_version): Base copyright year on CVS date.
8314         (func_emit_copyright_notice): New function.
8315         (func_emit_lib_Makefile_am): Use it.
8316         (func_emit_tests_Makefile_am): Likewise.
8317         (func_import): Likewise.
8318
8319 2006-05-08  Bruno Haible  <bruno@clisp.org>
8320
8321         * modules/stdarg: New file.
8322         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8323
8324 2006-05-08  Bruno Haible  <bruno@clisp.org>
8325
8326         * m4/stdarg.m4: New file, from GNU gettext.
8327
8328 2006-05-08  Bruno Haible  <bruno@clisp.org>
8329
8330         * config/srclist.txt (build-aux/config.rpath): different from latest
8331         release.
8332
8333 2006-05-08  Bruno Haible  <bruno@clisp.org>
8334
8335         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8336
8337 2006-05-05  Jim Meyering  <jim@meyering.net>
8338
8339         * m4/warning.m4: New file, derived from bison's file by the same name.
8340
8341 2006-05-03  Bruno Haible  <bruno@clisp.org>
8342
8343         * lib/stdint_.h: Shorter URL.
8344         * lib/inttypes.h: Likewise.
8345
8346 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8347
8348         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8349
8350 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8351
8352         * lib/verify.h: Document the internals better.  Most of this change
8353         was written by Bruno Haible.
8354
8355 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8356
8357         * doc/verify.texi: New file, partly based on a proposal by
8358         Bruno Haible.
8359
8360 2006-05-02  Bruno Haible  <bruno@clisp.org>
8361
8362         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8363         test from here...
8364         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8365
8366 2006-04-29  Bruno Haible  <bruno@clisp.org>
8367
8368         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8369         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8370
8371 2006-04-29  Bruno Haible  <bruno@clisp.org>
8372
8373         * gnulib-tool: Make --update option actually work.
8374
8375 2006-04-29  Bruno Haible  <bruno@clisp.org>
8376
8377         * doc/gcd.texi: New file.
8378         * doc/gnulib.texi: Include it.
8379
8380 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8381
8382         * lib/getdate.y (get_date): When adding relative date, start with the
8383         initial time, not with the result of the first mktime call.
8384
8385 2006-04-25  Bruno Haible  <bruno@clisp.org>
8386
8387         * gnulib-tool (func_import): Output the include directives in three
8388         blocks, sorted separately.
8389         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8390
8391 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8392
8393         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8394         to define main with arguments, for C++.  Reported by Eric Blake.
8395         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8396         Prefer 'int main ()' to 'int main (void)', for C++.
8397         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8398         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8399         for 'main', for C99 and C++.
8400
8401 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8402
8403         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8404         Don't assume that exit status -1 is valid.
8405         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8406         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8407         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8408         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8409         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8410         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8411         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8412         functions can be used without declaring them, or that you can
8413         exit with status -1.
8414         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8415
8416 2006-04-24  Karl Berry  <karl@gnu.org>
8417
8418         * config/srclist.txt (longdouble.m4): sync lost.
8419
8420 2006-04-24  Eric Blake  <ebb9@byu.net>
8421
8422         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8423
8424 2006-04-24  Bruno Haible  <bruno@clisp.org>
8425
8426         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8427         poll() implementation in AIX.
8428         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8429
8430 2006-04-24  Bruno Haible  <bruno@clisp.org>
8431
8432         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8433         assigned exactly once.
8434
8435 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8436             Bruno Haible  <bruno@clisp.org>
8437
8438         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8439         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8440         for AM_CPPFLAGS.
8441
8442 2006-04-23  Bruno Haible  <bruno@clisp.org>
8443
8444         * modules/copy-file: Depend on unistd.
8445         * modules/execute: Likewise.
8446         * modules/fatal-signal: Likewise.
8447         * modules/findprog: Likewise.
8448         * modules/mkdtemp : Likewise.
8449         * modules/pipe: Likewise.
8450         * modules/wait-process: Likewise.
8451
8452 2006-04-23  Bruno Haible  <bruno@clisp.org>
8453
8454         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8455         condition was already detected.
8456         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8457
8458 2006-04-23  Bruno Haible  <bruno@clisp.org>
8459
8460         * lib/copy-file.c: Include <unistd.h> unconditionally.
8461         * lib/execute.c: Likewise.
8462         * lib/fatal-signal.c: Likewise.
8463         * lib/findprog.c: Likewise.
8464         * lib/mkdtemp.c: Likewise.
8465         * lib/pipe.h: Likewise.
8466         * lib/pipe.c: Likewise.
8467         * lib/wait-process.h: Likewise.
8468
8469 2006-04-23  Bruno Haible  <bruno@clisp.org>
8470
8471         * gnulib-tool (func_usage): Fix --import description. Document
8472         --update.
8473         (func_import): Create temporary file in a temporary directory, if
8474         --dry-run is specified. Silence errors from 'grep' when there are no
8475         m4 files in $m4dir.
8476         (func_create_testdir): Silence errors from 'grep' when there are no
8477         m4 files in $m4dir.
8478         Reported by Karl Berry <karl@freefriends.org>.
8479
8480 2006-04-20  Bruno Haible  <bruno@clisp.org>
8481
8482         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8483         one argument, so that the code will be portable to Autoconf 2.60.
8484         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8485         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8486         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8487
8488 2006-04-19  Derek Price  <derek@ximbiot.com>
8489             Eric Blake  <ebb9@byu.net>
8490
8491         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8492         rather than "/full/path.h".  Update comment to match.  Shorten &
8493         generalize m4_translit call via AS_TR_CPP.
8494
8495 2006-04-19  Derek Price  <derek@ximbiot.com>
8496             Eric Blake  <ebb9@byu.net>
8497
8498         * lib/inttypes.h: Correct grammar in comment.
8499
8500 2006-04-18  Derek Price  <derek@ximbiot.com>
8501             Paul Eggert  <eggert@cs.ucla.edu>
8502
8503         * modules/inttypes: New file.
8504         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8505
8506 2006-04-18  Derek Price  <derek@ximbiot.com>
8507             Paul Eggert  <eggert@cs.ucla.edu>
8508
8509         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8510         New files.
8511
8512 2006-04-18  Derek Price  <derek@ximbiot.com>
8513             Paul Eggert  <eggert@cs.ucla.edu>
8514
8515         * lib/inttypes.h: New file.
8516         * lib/strtoimax.c: Assume <inttypes.h>.
8517
8518 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8519
8520         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8521         isn't mounted.  Problem reported by Kir Kolyshkin.
8522
8523 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8524
8525         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8526         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8527         Derek R. Price.
8528         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8529         implementation.
8530
8531 2006-04-12  Eric Blake  <ebb9@byu.net>
8532
8533         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8534         is now done automatically by the corresponding Autoconf macro.
8535
8536 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8537
8538         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8539         time_r.h.
8540
8541 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8542
8543         Merge regex changes from libc, removing some of our
8544         POSIX-conformance changes that were rejected and redoing them in a
8545         less-intrusive way.
8546
8547         * lib/regcomp.c (re_compile_internal, init_dfa):
8548         Length arg is now size_t, not Idx.  All uses changed.
8549         (peek_token): Forward decl now says internal_function.
8550         (__re_error_msgid, __re_error_msgid_idx):
8551         Now static rather than extern with attribute_hidden.
8552         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8553         For some reason libc prefers K&R style defns for external functions.
8554         (regerror) [!defined _LIBC]: Likewise.
8555         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8556         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8557         (build_range_exp, build_collating_symbol):
8558         Use K&R-style defn.
8559         (re_compile_fastmap): Use '\0' to memset, not 0.
8560         (utf8_sb_map): Make the calculations more obvious.
8561         (init_dfa, parse_bracket_exp, build_charclass_op):
8562         Call calloc and cast result, as glibc does.
8563         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8564         (build_range_exp, build_collating_symbol):
8565         Now internal functions.
8566
8567         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8568
8569         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8570         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8571         Don't depend on VMS; depend on __VMS instead, for POSIX
8572         namespace cleanness.
8573         (regoff_t): Define to ssize_t, not long int.
8574
8575         Remove the REG_ macros named below.  Instead, make the old names
8576         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8577         __USE_GNU_REGEX.
8578         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8579         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8580         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8581         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8582         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8583         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8584         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8585         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8586         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8587         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8588         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8589         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8590         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8591         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8592         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8593         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8594         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8595         (REG_NREGS):
8596         Remove.  All uses replaced by the old RE_* names.
8597         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8598         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8599         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8600         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8601         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8602         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8603         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8604         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8605         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8606         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8607         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8608         Don't bother having these macros be independent of each others'
8609         values, since they no longer exist in the POSIX name space.
8610
8611         Rename the following member names back to their old names,
8612         unless !__USE_GNU_REGEX.  All uses changed back.
8613         (buffer): Renamed from re_buffer.
8614         (allocated): Renamed from re_allocated.
8615         (used): Renamed from re_used.
8616         (syntax): Renamed from re_syntax.
8617         (fastmap): Renamed from re_fastmap.
8618         (translate): Renamed from re_translate.
8619         (can_be_null): Renamed from re_can_be_null.
8620         (regs_allocated): Renamed from re_regs_allocated.
8621         (fastmap_accurate): Renamed from re_fastmap_accurate.
8622         (no_sub): Renamed from re_no_sub.
8623         (not_bol): Renamed from re_not_bol.
8624         (not_eol): Renamed from re_not_eol.
8625         (newline_anchor): Renamed from re_newline_anchor.
8626         (num_regs): Renamed from rm_num_regs.
8627         (start): Renamed from rm_start.
8628         (end): Renamed from rm_end.
8629
8630         (free_state): Move up a bit.
8631
8632         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8633         #define to be empty.
8634         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8635         when that is what is intended.
8636         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8637         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8638         (MAX): New macro.
8639         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8640         All uses changed back to re_malloc, etc.  It's now the caller's
8641         responsibility to check for overflow; all callers changed.
8642         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8643         (re_x2nrealloc): Remove.
8644         (free_state): Remove decl.
8645
8646         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8647         (re_set_registers, re_exec):
8648         Use K&R-style defn.
8649
8650         2006-01-31  Roland McGrath  <roland@redhat.com>
8651
8652         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8653         Reported by Mike Frysinger <vapier@gentoo.org>.
8654
8655         2006-01-15  Andreas Jaeger  <aj@suse.de>
8656
8657         [BZ #1950]
8658         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8659         build_wcs_upper_buffer change.
8660         (build_wcs_upper_buffer): Change return type.
8661
8662         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8663
8664         * lib/regex_internal.h: Include <stdint.h> if available.
8665
8666         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8667
8668         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8669
8670         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8671
8672         * lib/regcomp.c: Adjust for changed secondary hash function.
8673
8674         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8675
8676         * lib/regex.h: Pretty printing.
8677         Clean up namespace a bit.
8678
8679         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8680
8681         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8682         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8683
8684         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8685                     Ulrich Drepper  <drepper@redhat.com>
8686
8687         [BZ #1302]
8688         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8689         changed.
8690         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8691
8692         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8693
8694         [BZ #281]
8695         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8696         * lib/regcomp.c: Remove unnecessary uses of
8697         unsigned RE_TRANSLATE_TYPE.
8698         * lib/regex_internal.h: Likewise.
8699         * lib/regex_internal.c: Likewise.
8700         * lib/regexec.c: Likewise.
8701         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8702
8703         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8704
8705         * lib/regexec.c (find_recover_state): Remove unnecessary
8706         initialization.
8707         (transit_state_bkref): Make DFA a const pointer.
8708         (get_subexp): Likewise.
8709         (check_arrival): Likewise.
8710         (update_cur_sifted_state): Likewise.
8711         (re_search_internal): Likewise.
8712         (prune_impossible_nodes): Likewise.
8713         (acquire_init_state_context): Likewise.
8714         (proceed_next_node): Likewise.
8715         (set_regs): Likewise.
8716         (free_fail_stack_return): Likewise.
8717         (check_arrival_expand_ecl): Mark DFA parameter as const.
8718         (check_arrival_expand_ecl_sub): Likewise.
8719         (check_subexp_limits): Likewise.
8720         (sub_epsilon_src_nodes):  Likewise.
8721         (add_epsilon_src_nodes):  Likewise.
8722         (merge_state_array): Likewise.
8723         (update_regs): Likewise.
8724         (build_trtable): Likewise.
8725         (sift_states_backward): Mark MCTX parameter as const.
8726         (build_sifted_states): Likewise.
8727         (update_cur_sifted_state): Likewise.
8728         (sift_states_mkref): Likewise.
8729         (check_arrival_expand_ecl): Mark eclosure as const.
8730         (check_dst_limits_calc_pos_1): Likewise.
8731         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8732         pointer.
8733
8734         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8735
8736         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8737         (transit_state_sb): Likewise.
8738         (transit_state_mb): Likewise.
8739         (sift_states_iter_mb): Likewise.
8740         (check_arrival_add_next_nodes): Likewise.
8741         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8742         [_LIBC] (re_search_2_stub): Use mempcpy.
8743
8744         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8745         mbrtowc for very simple UTF-8 case.
8746
8747         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8748         a pointer-to-const.
8749         (re_acquire_state_context): Likewise.
8750         * lib/regex_internal.h: Adjust prototypes.
8751
8752         * lib/regex.c: Prevent using C++ compilers.
8753
8754         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8755         (re_acquire_state_context): Likewise.
8756
8757 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8758
8759         * modules/regex (Depends-on): Add ssize_t.
8760
8761 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8762
8763         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8764         translation table.
8765
8766 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8767
8768         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8769
8770 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8771             Bruno Haible  <bruno@clisp.org>
8772
8773         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8774         <sys/types.h> and <inttypes.h>.
8775
8776 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8777
8778         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8779         `__error_t_defined', so argp.h will not typedef the former.
8780
8781 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8782
8783         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8784         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8785         glibc names.  Even if glibc is changed to conform to POSIX, the
8786         traditional names will be available anyway, since regex depends on
8787         the extensions module.  Also, fix a longstanding typo in the
8788         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8789         reported by Emanuele Giaquinta.  Also, change sense of cached
8790         variable, so that the message makes sense.
8791
8792 2006-03-24  Simon Josefsson  <jas@extundo.com>
8793
8794         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8795         including some doc fixes.
8796         (base64_encode_alloc): Fix +1 bug on allocation failures.
8797
8798 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8799
8800         * lib/base64.c (base64_encode): Do not read past end of array with
8801         unsanitized input on systems with CHAR_BIT > 8.
8802
8803 2006-03-24  Eric Blake  <ebb9@byu.net>
8804
8805         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8806
8807 2006-03-22  Karl Berry  <karl@gnu.org>
8808
8809         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8810         * config/srclistvars.sh (COREUTILS): new var.
8811
8812 2006-03-17  Jim Meyering  <jim@meyering.net>
8813
8814         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8815         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8816
8817 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8818
8819         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8820         no longer needs it.  Instead, check that regoff_t is as least
8821         as wide as ptrdiff_t.
8822
8823         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8824         so that our regex.h stays compatible with the installed regex.
8825         This is helpful for installers who configure --without-included-regex.
8826         Problem reported by Emanuele Giaquinta.
8827
8828 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8829
8830         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8831         Typedef to long int, not to off_, as POSIX will likely change
8832         in that direction.
8833
8834 2006-03-15  Eric Blake  <ebb9@byu.net>
8835
8836         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8837
8838 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8839
8840         * lib/argp-help.c (validate_uparams): Fix typo
8841         * lib/argp-parse.c (argp_default_options): Consistently begin help
8842         messages with a lowercase letter.
8843
8844 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8845
8846         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8847         overrun buffers and shouldn't be used (much as gets shouldn't be
8848         used).
8849         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8850
8851 2006-03-08  Simon Josefsson  <jas@extundo.com>
8852
8853         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8854         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8855
8856 2006-03-08  Simon Josefsson  <jas@extundo.com>
8857
8858         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8859         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8860
8861 2006-03-08  Simon Josefsson  <jas@extundo.com>
8862
8863         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8864         signal that configure disabled the device.
8865
8866 2006-03-08  Simon Josefsson  <jas@extundo.com>
8867
8868         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8869         languages.
8870
8871 2006-03-07  Simon Josefsson  <jas@extundo.com>
8872
8873         * modules/getopt (Depends-on): Add unistd.
8874
8875         * modules/unistd: New file.
8876
8877 2006-03-07  Simon Josefsson  <jas@extundo.com>
8878
8879         * modules/gc-random: New file.
8880
8881 2006-03-07  Simon Josefsson  <jas@extundo.com>
8882
8883         * m4/unistd_h.m4: New file.
8884
8885 2006-03-07  Simon Josefsson  <jas@extundo.com>
8886
8887         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8888         test to be side-effect free by storing the result in the cache
8889         variable gl_cv_lib_readline, and moving the assignment of
8890         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8891         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8892
8893 2006-03-07  Simon Josefsson  <jas@extundo.com>
8894
8895         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8896         error on missing devices (the functions will return an error).
8897
8898         * m4/gc.m4: Move random stuff to gc-random.m4
8899
8900 2006-03-07  Simon Josefsson  <jas@extundo.com>
8901
8902         * lib/unistd_.h: New file.
8903
8904 2006-03-07  Simon Josefsson  <jas@extundo.com>
8905
8906         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8907
8908 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8909
8910         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8911         Problem reported by Juan Manuel Guerrero.
8912
8913 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8914
8915         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8916         the unistd module.
8917         * lib/getlogin_r.c: Likewise.
8918         * lib/getlogin_r.h: Likewise.
8919         * lib/glob.c: Likewise.
8920         * lib/pagealign_alloc.c: Likewise.
8921         * lib/unistd_.h: Remove; no longer needed.
8922
8923 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8924
8925         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8926         Add unistd.
8927         * modules/c-stack (Depends-on): Add unistd.
8928         * modules/getlogin_r: Likewise.
8929         * modules/glob: Likewise.
8930         * modules/pagealign_alloc: Likewise.
8931         * modules/unistd (Files): Remove lib/unistd_.h.
8932         (EXTRA_DIST): Remove.
8933         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8934         need unistd_.h.
8935         (MOSTLYCLEANFILES): Remove unistd.h-t.
8936
8937 2006-03-03  Simon Josefsson  <jas@extundo.com>
8938
8939         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8940
8941 2006-03-03  Simon Josefsson  <jas@extundo.com>
8942
8943         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8944         libidn and bison.
8945
8946 2006-03-03  Simon Josefsson  <jas@extundo.com>
8947
8948         * build-aux/maint.mk: Add indent target.
8949
8950 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8951
8952         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8953         our replacement poll.h in any case, to avoid a differing
8954         declaration from a system header.  Seen on AIX.
8955
8956 2006-03-01  Simon Josefsson  <jas@extundo.com>
8957
8958         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8959         <kasal@ucw.cz>.
8960
8961 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8962
8963         * modules/gettime (Depends-on): Add extensions module.
8964         * modules/nanosleep (Depends-on): Likewise.
8965         * modules/settime (Depends-on): Likewise.
8966
8967 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8968
8969         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8970         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8971         pedantically.
8972         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8973         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
8974
8975         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
8976         not "==".  Reported by Ralf Wildenhues.
8977
8978 2006-03-01  Karl Berry  <karl@gnu.org>
8979
8980         * doc/Copyright/request-*: new files, synced from gnuorg.
8981
8982 2006-03-01  Karl Berry  <karl@gnu.org>
8983
8984         * config/srclist.txt (Copyright/*): new entries.
8985
8986 2006-02-28  Simon Josefsson  <jas@extundo.com>
8987
8988         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
8989
8990 2006-02-27  Simon Josefsson  <jas@extundo.com>
8991
8992         * lib/base64.h: Indent #define's.  From Jim Meyering
8993         <jim@meyering.net>.
8994
8995 2006-02-27  Jim Meyering  <jim@meyering.net>
8996
8997         Revert the change of 2006-02-24, so these files can continue
8998         to be sync'd from gettext.
8999         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9000         of `config.h'.
9001
9002 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9003
9004         * modules/intprops: New file.
9005         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9006         Add intprops.
9007         * modules/getloadavg (Files): Remove lib/intprops.h.
9008         (Depends-on): Add intprops.
9009         * modules/human: Likewise.
9010         * modules/inttostr: Likewise.
9011         * modules/openat: Likewise.
9012         * modules/sig2str: Likewise.
9013         * modules/userspec: Likewise.
9014         * modules/utimecmp: Likewise.
9015         * modules/xnanosleep: Likewise.
9016         * modules/xstrtol: Likewise.
9017
9018 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9019
9020         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9021         * modules/lock-tests (TESTS): Use $(EXEEXT).
9022         * modules/tls-tests: Likewise.
9023         * modules/argp-tests: Likewise.
9024         (check_PROGRAMS): New var, replacing...
9025         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9026
9027 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9028
9029         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9030         `config.h'.
9031
9032 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9033
9034         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9035
9036 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9037
9038         Sync from coreutils.
9039         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9040         gl_CHDIR_SAFER.
9041
9042 2006-02-22  Jim Meyering  <jim@meyering.net>
9043
9044         Sync from coreutils.
9045         * m4/chdir-safer.m4: New file.
9046
9047 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9048
9049         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9050         AT_FDCWD exceeds INT_MAX.
9051         * lib/openat.h (AT_FDCWD): Likewise.
9052
9053 2006-02-17  Eric Blake  <address@hidden>
9054
9055         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9056
9057 2006-02-16  Simon Josefsson  <jas@extundo.com>
9058
9059         * modules/getaddrinfo (Depends-on): Add sys_socket.
9060
9061 2006-02-15  Simon Josefsson  <jas@extundo.com>
9062
9063         * build-aux/maint.mk: Add dsyntax-check rule.
9064
9065 2006-02-15  Eric Blake  <ebb9@byu.net>
9066
9067         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9068         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9069         'present but cannot compile' warnings on cygwin.
9070         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9071         use ws2tcpip.h if sys/socket.h works.
9072         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9073         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9074
9075 2006-02-14  Simon Josefsson  <jas@extundo.com>
9076
9077         * modules/maintainer-makefile (Files): Rename.
9078
9079         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9080         and (the local) Makefile.cfg to maint-cfg.mk.
9081
9082         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9083         to the latter.
9084
9085         * modules/maintainer-makefile: New module.
9086
9087         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9088         severaly stripped to make it possible to build it up from scratch
9089         with reliable tests.
9090
9091         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9092         fixes to permit overriding the default actions when configure and
9093         makefile are not available.
9094
9095 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9096
9097         Sync from coreutils.
9098         * modules/lstat (Depends-on): Don't depend on xalloc.
9099         (License): Change from GPL to LGPL, since this is now simply a
9100         replacement for a libc function.
9101
9102 2006-02-14  Jim Meyering  <jim@meyering.net>
9103
9104         Sync from coreutils.
9105
9106         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9107         failure on deficient systems, and simplify gnulib lgpl dependencies.
9108         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9109         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9110
9111         * lib/xalloc-die.c: Remove unused definition of N_.
9112
9113 2006-02-14  Jim Meyering  <jim@meyering.net>
9114
9115         Sync from coreutils.
9116         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9117         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9118         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9119         double-quote uses of that variable, to accommodate the rare case in
9120         which getmntent is available in none of the libraries checked.  This
9121         happens at least on FreeBSD 5.0.
9122
9123 2006-02-13  Simon Josefsson  <jas@extundo.com>
9124
9125         * gnulib-tool (Usage): Fix --import, from
9126         karl@freefriends.org (Karl Berry).
9127
9128 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9129
9130         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9131
9132 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9133
9134         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9135         "autoupdate" on 2005-12-12.
9136
9137 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         * modules/closeout (Depends-on): Remove atexit.
9140
9141 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9142
9143         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9144         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9145
9146 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9147
9148         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9149         __EXTENSIONS__ if this causes compilation to fail.  Problem
9150         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9151         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9152
9153 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9154
9155         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9156         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9157         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9158         All uses changed.
9159
9160 2006-01-26  Simon Josefsson  <jas@extundo.com>
9161
9162         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9163         prototype is visible on mingw32.
9164
9165         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9166         for mingw32.
9167
9168         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9169         mingw32).
9170
9171 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9172
9173         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9174         attempt to open for write; this always fails, at least on POSIX
9175         hosts.  This reinstates the 2006-01-09 change, which was
9176         inadvertently removed.
9177
9178 2006-01-26  Bruno Haible  <bruno@clisp.org>
9179
9180         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9181         Reported by Paul Eggert.
9182
9183 2006-01-26  Bruno Haible  <bruno@clisp.org>
9184             Paul Eggert  <eggert@cs.ucla.edu>
9185
9186         * lib/stdbool_.h (_Bool)
9187         [(! (defined __cplusplus || defined __BEOS__)
9188           && !defined __GNUC__
9189           && !(defined __HP_cc || defined __xlc__
9190                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9191                || defined __sgi))]:
9192         #define to signed char in these cases too; this simplifies
9193         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9194         etc., separately) and makes it more conservative.
9195
9196 2006-01-25  Simon Josefsson  <jas@extundo.com>
9197
9198         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9199         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9200         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9201
9202 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9203
9204         * lib/argp-namefrob.h: Bugfix. Remove stray #
9205
9206 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9207
9208         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9209         so that we test the test.
9210         Check for yet another HP-UX cc bug involving *bool |= bool.
9211
9212 2006-01-25  Karl Berry  <karl@gnu.org>
9213
9214         * config/srclist.txt (vasnprintf.c): sync lost.
9215
9216 2006-01-25  Jim Meyering  <jim@meyering.net>
9217
9218         Sync from the stable (b5) branch of coreutils:
9219
9220         * lib/fts.c (fts_children): Don't let close() clobber errno from
9221         failed fchdir().
9222
9223         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9224         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9225         a dangling symlink.  That can also happen at least for ELOOP.
9226         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9227         FYI, this bug predates the inclusion of fts.c in coreutils.
9228
9229         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9230         in their own block, so pre-c99 compilers don't object.
9231
9232         Avoid the double-free (first in fts_read, second in fts_close) that
9233         would occur when an `active' directory is made inaccessible (e.g.,
9234         via chmod a-x) during a traversal.
9235         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9236         before returning.  Reproduce this failure by
9237         mkdir -p a/b; cd a; chmod a-x . b
9238         Reported by Stavros Passas.
9239
9240 2006-01-25  Jim Meyering  <jim@meyering.net>
9241
9242         * lib/fileblocks.c: Remove more useless parentheses.
9243         * lib/readutmp.h: Likewise.
9244
9245 2006-01-25  Bruno Haible  <bruno@clisp.org>
9246
9247         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9248         warnings.
9249         Reported by Paul Eggert.
9250
9251 2006-01-25  Bruno Haible  <bruno@clisp.org>
9252
9253         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9254         rid of a trap command. For Solaris sh.
9255         Reported by Mark D. Baushke <mdb@gnu.org>.
9256
9257 2006-01-24  Simon Josefsson  <jas@extundo.com>
9258
9259         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9260         Bruno.
9261
9262 2006-01-24  Karl Berry  <karl@gnu.org>
9263
9264         * config/srclist.txt (argp-namefrob.h): sync lost.
9265
9266 2006-01-24  Jim Meyering  <jim@meyering.net>
9267
9268         * modules/openat (Files): Add lib/intprops.h.
9269         From Mark D. Baushke.
9270
9271 2006-01-24  Jim Meyering  <jim@meyering.net>
9272
9273         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9274         Reported by Mark D. Baushke.
9275
9276 2006-01-24  Jim Meyering  <jim@meyering.net>
9277
9278         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9279
9280 2006-01-24  Bruno Haible  <bruno@clisp.org>
9281
9282         * modules/strnlen (Maintainer): Change from glibc to all.
9283
9284 2006-01-24  Bruno Haible  <bruno@clisp.org>
9285
9286         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9287         Patch by Paul Eggert.
9288
9289 2006-01-24  Bruno Haible  <bruno@clisp.org>
9290
9291         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9292         already has it.
9293         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9294         2005-11-26.
9295
9296         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9297         'signed char' to avoid problems with the built-in _Bool type.
9298         Reported by Paul Eggert on 2005-11-26.
9299
9300 2006-01-24  Bruno Haible  <bruno@clisp.org>
9301
9302         * gnulib-tool (func_import): Avoid constructing complicated sed
9303         expressions inside backquote.
9304         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9305
9306 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9307
9308         These changes imported from libc.
9309         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9310         test and two separate function calls.
9311         * lib/strndup.c (__strndup): Add libc_hidden_def.
9312
9313 2006-01-23  Simon Josefsson  <jas@extundo.com>
9314
9315         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9316         Remove the test_*_SOURCES variable: automake infers it by default.
9317         * modules/tls-tests: Likewise.
9318
9319 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9320
9321         Work around porting bugs reported by Dieter in
9322         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9323         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9324         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9325         Include "getopt.h" first, to check interface.
9326         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9327         !HAVE_DECL_GETENV.
9328         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9329         (__strndup): Revert to K&R-style function dfns, the glibc style.
9330         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9331         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9332         Include strnlen.h first, to get prototype properly.
9333         (strnlen): Renamed from __strnlen.
9334         Remove weak alias.
9335
9336 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9337
9338         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9339
9340 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9341
9342         * config/srclist.txt: Adjust to reflect glibc reorganization.
9343         This affects only comments.
9344
9345 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9346
9347          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9348          Reported by Bruce Korb <bkorb@gnu.org>.
9349
9350 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9351
9352         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9353         to pacify gcc -Wswitch-default.
9354
9355 2006-01-22  Bruno Haible  <bruno@clisp.org>
9356
9357         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9358         temporary buffer for sprintf, take into account the precision also
9359         for 'd', 'i', 'u', 'o', 'x', 'X'.
9360
9361 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9362
9363         * modules/argp-tests: New module
9364         * tests/test-argp.c: New file
9365         * tests/test-argp-2.sh: New file
9366
9367 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9368
9369         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9370         (__argp_base_name): Removed
9371         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9372         typo.
9373         (__argp_base_name): Provide macro definition or extern declaration
9374         depending on the configuration
9375
9376 2006-01-20  Simon Josefsson  <jas@extundo.com>
9377
9378         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9379
9380 2006-01-20  Simon Josefsson  <jas@extundo.com>
9381
9382         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9383
9384 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9385
9386         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9387         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9388         Suggested by Bruno Haible.
9389
9390 2006-01-20  Karl Berry  <karl@gnu.org>
9391
9392         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9393         until changes propagate, I guess.
9394
9395 2006-01-19  Simon Josefsson  <jas@extundo.com>
9396
9397         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9398
9399 2006-01-19  Simon Josefsson  <jas@extundo.com>
9400
9401         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9402
9403 2006-01-19  Simon Josefsson  <jas@extundo.com>
9404
9405         * gnulib-tool: Set check_PROGRAMS.
9406
9407         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9408         modules/des-tests, modules/gc-arcfour-tests,
9409         modules/gc-arctwo-tests, modules/gc-des-tests,
9410         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9411         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9412         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9413         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9414         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9415         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9416         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9417         test_*_SOURCES.
9418
9419 2006-01-18  Simon Josefsson  <jas@extundo.com>
9420
9421         * modules/socklen (Depends-on): Depend on sys_socket.
9422
9423 2006-01-18  Simon Josefsson  <jas@extundo.com>
9424
9425         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9426         modules/des-tests, modules/gc-arcfour-tests,
9427         modules/gc-arctwo-tests, modules/gc-des-tests,
9428         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9429         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9430         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9431         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9432         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9433         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9434         $(EXEEXT) to automake TESTS variable, for mingw32.
9435
9436 2006-01-17  Simon Josefsson  <jas@extundo.com>
9437
9438         * modules/socklen (Include): Need sys/socket.h.
9439
9440 2006-01-17  Bruno Haible  <bruno@clisp.org>
9441
9442         * modules/ssize_t (Include): Add <sys/types.h>.
9443
9444 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9445
9446         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9447         it's not portable and it doesn't work with cross-compiles.
9448         Problem reported by Bruno Haible.  Fix missing-$ typo in
9449         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9450         -zignore from being used with Sun's C compiler.
9451
9452 2006-01-12  Simon Josefsson  <jas@extundo.com>
9453
9454         * lib/base64.c: Fix warning, reported by Bruno Haible
9455         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9456
9457 2006-01-12  Bruno Haible  <bruno@clisp.org>
9458
9459         * modules/ldd: New file.
9460         * build-aux/ldd.sh.in: New file.
9461         * MODULES.html.sh (Support for building libraries and executables): Add
9462         ldd.
9463
9464 2006-01-12  Bruno Haible  <bruno@clisp.org>
9465
9466         * m4/ldd.m4: New file.
9467
9468 2006-01-12  Bruno Haible  <bruno@clisp.org>
9469
9470         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9471         endless loop while replacing $auxdir with build-aux.
9472
9473 2006-01-11  Simon Josefsson  <jas@extundo.com>
9474
9475         * lib/stdint_.h (SIZE_MAX): Add missing (.
9476
9477 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9478
9479         Sync from coreutils.
9480         * lib/md5.c: Fix commentary typos.
9481         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9482         * lib/md5.h (__attribute__): Remove; unused.
9483         * lib/sha1.c: Fix commentary to match md5 better.
9484         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9485         so that we don't need to worry about alignment.  All uses changed.
9486         This merges the 2005-10-28 md5 change into sha1.
9487
9488 2006-01-11  Jim Meyering  <jim@meyering.net>
9489
9490         Sync from coreutils.
9491         * lib/md5.c (OP): Fix spacing.
9492
9493 2006-01-11  Bruno Haible  <bruno@clisp.org>
9494
9495         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9496         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9497         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9498
9499 2006-01-11  Bruno Haible  <bruno@clisp.org>
9500
9501         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9502         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9503         the "early" section as well.
9504
9505 2006-01-11  Bruno Haible  <bruno@clisp.org>
9506
9507         Avoid "ar: no archive members specified" error on MacOS X.
9508         * gnulib-tool (func_modules_add_dummy): New function.
9509         (func_import, func_create_testdir): Invoke it.
9510
9511 2006-01-11  Bruno Haible  <bruno@clisp.org>
9512
9513         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9514         with $auxdir in AC_CONFIG_FILES statements.
9515
9516 2006-01-11  Bruno Haible  <bruno@clisp.org>
9517
9518         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9519         Initialize also noinst_HEADERS to empty.
9520
9521 2006-01-11  Bruno Haible  <bruno@clisp.org>
9522
9523         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9524         variables.
9525         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9526         autoreconf.
9527
9528 2006-01-11  Bruno Haible  <bruno@clisp.org>
9529
9530         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9531         overridable by the user.
9532         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9533
9534 2006-01-10  Simon Josefsson  <jas@extundo.com>
9535
9536         * modules/sys_socket: New file.
9537
9538 2006-01-10  Simon Josefsson  <jas@extundo.com>
9539
9540         * m4/sys_socket_h.m4: New file.
9541
9542 2006-01-10  Simon Josefsson  <jas@extundo.com>
9543
9544         * lib/socket_.h: New file.
9545
9546 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * modules/readutmp (Maintainer): Add myself.
9549
9550 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9551
9552         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9553         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9554         People who are still concerned with buggy memcmp implementations
9555         can invoke gl_FUNC_MEMCMP themselves.
9556
9557 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9558
9559         * lib/regex_internal.h (BITSET_WORD_BITS):
9560         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9561         preprocessor mishandles large unsigned values as if they were signed.
9562         Problem reported by Claudio Fontana in
9563         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9564
9565 2006-01-10  Jim Meyering  <jim@meyering.net>
9566
9567         Avoid the double-free (first in fts_read, second in fts_close) that
9568         would occur when an `active' directory is made inaccessible (e.g.,
9569         via chmod a-x) during a traversal.
9570         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9571         before returning.  Reproduce this failure by
9572         mkdir -p a/b; cd a; chmod a-x . b
9573         Reported by Stavros Passas.
9574
9575         Sync from coreutils.
9576         * lib/sha1.c: Tweak grammar in a comment.
9577
9578 2006-01-10  Jim Meyering  <jim@meyering.net>
9579
9580         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9581         Patch by Joerg Sonnenberger.
9582
9583 2006-01-10  Bruno Haible  <bruno@clisp.org>
9584
9585         * modules/readutmp: Depend on module free.
9586         * modules/strtok_r: Depend on module restrict.
9587
9588 2006-01-10  Bruno Haible  <bruno@clisp.org>
9589
9590         * modules/gettext (configure.ac): Add an invocation of
9591         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9592
9593 2006-01-10  Bruno Haible  <bruno@clisp.org>
9594
9595         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9596         Reported by Werner Lemberg <wl@gnu.org>.
9597
9598 2006-01-10  Bruno Haible  <bruno@clisp.org>
9599
9600         * lib/localcharset.c: Update from GNU gettext.
9601
9602 2006-01-10  Bruno Haible  <bruno@clisp.org>
9603
9604         * lib/argp.h (__const): Remove macro. Use const instead.
9605         * lib/argp-fmtstream.h (__const): Likewise.
9606         * lib/glob_.h (__const): Remove macro.
9607         * lib/glob-libc.h: Use const instead of __const.
9608
9609 2006-01-10  Bruno Haible  <bruno@clisp.org>
9610
9611         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9612         variable.
9613         Needed to avoid an automake error regarding the 'gettext' module.
9614
9615 2006-01-09  Simon Josefsson  <jas@extundo.com>
9616
9617         * modules/inet_ntop (Depends-on): Add restrict.
9618
9619 2006-01-09  Simon Josefsson  <jas@extundo.com>
9620
9621         * modules/gc-rijndael-tests (License): Put under LGPL.
9622
9623         * modules/gc-des-tests (License): Likewise.
9624
9625         * modules/gc-arcfour-tests (License): Likewise.
9626
9627         * modules/gc-arctwo-tests (License): Likewise.
9628
9629         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9630
9631         * modules/gc-hmac-sha1-tests (Files): Likewise.
9632
9633         * modules/gc-hmac-md5-tests (License): Likewise.
9634
9635         * modules/gc-sha1-tests (License): Likewise.
9636
9637         * modules/gc-md5-tests (License): Likewise.
9638
9639         * modules/gc-md4-tests (License): Likewise.
9640
9641         * modules/gc-md2-tests (License): Likewise.
9642
9643         * modules/gc-tests (License): Likewise.
9644
9645         * modules/des-tests (License): Likewise.
9646
9647         * modules/md4-tests (License): Likewise.
9648
9649         * modules/md2-tests (License): Likewise.
9650
9651 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9652
9653         Sync from coreutils:
9654
9655         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9656         * modules/lib-ignore: New file.
9657         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9658         chdir-safer.m4, lchmod.m4.
9659         * modules/openat: Add mkdirat.c, openat-priv.h.
9660
9661 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9662
9663         Sync from coreutils.
9664         * m4/lib-ignore.m4: New file.
9665         * m4/lchmod.m4: New file.
9666
9667 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9668
9669         Sync from coreutils.
9670         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9671         for write access: POSIX says that must fail.
9672         * lib/fts.c (diropen): Likewise.
9673         * lib/save-cwd.c (save_cwd): Likewise.
9674         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9675         well, for minor improvements on hosts that lack O_DIRECTORY.
9676         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9677         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9678         Fall back on chown if open failed with EACCES.
9679
9680         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9681         Report an error at compile-time if only a 1-second nominal clock
9682         resolution is found.
9683
9684         * lib/lchmod.h: New file.
9685         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9686         (make_dir_parents): Use lchown rather than chown, and
9687         lchmod rather than chmod.
9688
9689         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9690         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9691         "proc" reported by n0dalus.
9692
9693         * lib/mountlist.c: Include <limits.h>.
9694         (dev_from_mount_options)
9695         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9696         New function.  It no longer assumes "dev=" has the System V meaning
9697         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9698         (read_file_system_list)
9699         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9700         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9701         dev= in that case.
9702
9703         * lib/posixtm.h (PDS_PRE_2000): New macro.
9704         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9705         allow_century.  All usages changed.  Reject dates outside the range
9706         1969-1999 if PDS_PRE_2000 is used.
9707
9708 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9709
9710         Sync from coreutils.
9711         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9712         (Time of day items): Mention the possibility of leap seconds.
9713         Problem reported by Dr. David Alan Gilbert.
9714
9715 2006-01-09  Jim Meyering  <jim@meyering.net>
9716
9717         Sync from coreutils.
9718
9719         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9720
9721         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9722
9723         * lib/modechange.c (mode_compile): Reject an invalid mode string
9724         that starts with an octal digit.  From Andreas Gruenbacher.
9725
9726         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9727         and dup to open_safer and dup_safer, respectively.
9728         (openat_permissive): Fix typo in comment.
9729
9730         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9731         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9732         (_): Remove; no longer needed.
9733         (openat): Renamed from rpl_openat; no need for rpl_openat
9734         since openat.h renames openat for us.
9735         Replace most of the body with a call to openat_permissive,
9736         to avoid duplicate code.
9737         Port to (probably hypothetical) environments were mode_t is
9738         wider than int.
9739         (openat_permissive): Require mode arg, so that we can check
9740         types better.  Put it just after flags.  Change cwd failure
9741         indicator from pointer-to-bool to pointer-to-errno-value.
9742         All callers changed.
9743         Invoke openat_save_fail and/or openat_restore_fail if
9744         cwd_errno is null, so that openat can call us.
9745         (openat_permissive, fdopendir, fstatat, unlinkat):
9746         Simplify errno handling to avoid some duplicate code,
9747         as it's OK to set errno on success.
9748         * lib/openat.h: Revamp code so that function macros depend on
9749         __OPENAT_PREFIX only, not also on AT_FDCWD.
9750         (openat_ro): Remove.  Caller changed to use openat_permissive.
9751         (openat_permissive): Now a macro, if not a function.
9752         (openat_restore_fail, openat_save_fail): Now always functions,
9753         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9754
9755         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9756         and openat.c.
9757         * lib/mkdirat.c: Include openat-priv.h.
9758         Remove definitions of macros defined therein.
9759         * lib/openat.c: Likewise.
9760
9761         * lib/mkdirat.c (mkdirat): New file and function.
9762         * lib/openat.h (mkdirat): Declare.
9763
9764         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9765
9766         * lib/openat.h (openat_permissive): Declare.
9767         (openat_ro): Define.
9768
9769         * lib/openat.c (EXPECTED_ERRNO): New macro.
9770         (openat_permissive): New function -- used in remove.c rewrite.
9771         (all functions): Set errno just before returning, only if there
9772         was an actual failure.
9773         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9774
9775         Emulate openat-family functions using Linux's procfs, if possible.
9776         Idea and some code based on Ulrich Drepper's glibc changes.
9777
9778         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9779         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9780         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9781         before falling back on save_cwd and restore_cwd.
9782         (fdopendir, fstatat, unlinkat): Likewise.
9783
9784         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9785         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9786
9787         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9788         as second argument to va_arg.  Otherwise, some versions of gcc
9789         warn that `if this code is reached, the program will abort'.
9790
9791 2006-01-09  Jim Meyering  <jim@meyering.net>
9792
9793         Sync from coreutils.
9794         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9795         Require openat-priv.h.
9796
9797 2006-01-09  Bruno Haible  <bruno@clisp.org>
9798
9799         * modules/strnlen (Include): Use strnlen.h.
9800
9801 2006-01-09  Bruno Haible  <bruno@clisp.org>
9802
9803         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9804
9805 2006-01-09  Bruno Haible  <bruno@clisp.org>
9806
9807         * lib/sysexit_.h (EX_OK): New macro.
9808         Suggested by Martin Lambers <marlam@marlam.de>.
9809
9810 2006-01-09  Bruno Haible  <bruno@clisp.org>
9811
9812         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9813         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9814
9815 2006-01-09  Bruno Haible  <bruno@clisp.org>
9816
9817         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9818         numbers.
9819
9820 2006-01-09  Bruno Haible  <bruno@clisp.org>
9821
9822         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9823         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9824         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9825         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9826
9827 2006-01-09  Bruno Haible  <bruno@clisp.org>
9828
9829         * build-aux/javacomp.sh.in: New file, moved from lib/.
9830         * modules/javacomp-script (Files): Update.
9831         (configure.ac): Add AC_CONFIG_FILES invocation.
9832         (EXTRA_DIST): Remove variable.
9833
9834         * build-aux/javaexec.sh.in: New file, moved from lib/.
9835         * modules/javaexec (Files): Update.
9836         (configure.ac): Add AC_CONFIG_FILES invocation.
9837         (EXTRA_DIST): Remove javaexec.sh.in.
9838
9839         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9840         * modules/csharpcomp-script (Files): Update.
9841         (configure.ac): Add AC_CONFIG_FILES invocation.
9842         (EXTRA_DIST): Remove variable.
9843
9844         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9845         * modules/csharpexec (Files): Update.
9846         (configure.ac): Add AC_CONFIG_FILES invocation.
9847         (EXTRA_DIST): Remove csharpexec.sh.in.
9848
9849 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9850
9851         Sync from coreutils.
9852
9853         Add POSIX ACL support
9854         * lib/acl.h (copy_acl, set_acl): Add declarations.
9855         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9856         systems other than Linux.
9857         (chmod_or_fchmod): New function: use fchmod when possible,
9858         and chmod otherwise.
9859         (file_has_acl): Add a POSIX ACL implementation, with a
9860         Linux-specific subcase.
9861         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9862         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9863         acls are unsupported.
9864         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9865         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9866         are unsupported.
9867
9868 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9869
9870         Sync from coreutils.
9871         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9872
9873 2006-01-07  Bruno Haible  <bruno@clisp.org>
9874
9875         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9876         gl_EARLY.
9877
9878 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9879
9880         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9881         Problem reported for Mingw by Mark Junker.
9882
9883 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9884
9885         * README: Gnulib normally doesn't generate a tarball.
9886
9887 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9888
9889         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9890         long int, not int, for nanosecond counts, so that people who are
9891         used to POSIX struct timespec won't be surprised.  Reported by Jim
9892         Meyering.
9893
9894 2005-12-28  Bruno Haible  <bruno@clisp.org>
9895
9896         * build-aux/config.rpath: Update from GNU gettext.
9897
9898 2005-12-16  Jim Meyering  <jim@meyering.net>
9899
9900         * modules/fprintftime: New module.
9901         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9902
9903 2005-12-16  Jim Meyering  <jim@meyering.net>
9904
9905         * m4/fprintftime.m4: New file.
9906
9907 2005-12-16  Jim Meyering  <jim@meyering.net>
9908
9909         * lib/fprintftime.c, lib/fprintftime.h: New files.
9910
9911 2005-12-15  Simon Josefsson  <jas@extundo.com>
9912
9913         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9914         new m4/socklen.m4.
9915
9916 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9917
9918         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9919         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9920
9921 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9922
9923         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9924         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9925         struct uparams is valid. Fall back to the default values if it is
9926         not.
9927
9928 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9929
9930         * modules/argp (Files): Add argp-pin.c
9931         (Depends-on): dirname
9932         (lib_SOURCES): Add argp-pin.c
9933
9934 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9935
9936         * m4/argp.m4:  Check if program_invocation_name and
9937         program_invocation_short_name are declared and define appropriate
9938         macros if they are not.
9939
9940 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9941
9942         * lib/argp-help.c (__argp_base_name): New function
9943         (__argp_short_program_name): Rewrite using __argp_base_name
9944         * lib/argp-namefrob.h: Define program_invocation_name and
9945         program_invocation_short_name if requested
9946         (__argp_base_name): Add prototype
9947         * lib/argp-parse.c (argp_def): Use gettext wrappers
9948         (argp_default_parser): Use __argp_base_name
9949         * lib/argp-pin.c: New file. Defines program_invocation_name and
9950         program_invocation_short_name on systems that lack them.
9951
9952 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9953
9954         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9955         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9956         porting problem reported by Georg Schwarz in
9957         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9958
9959 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9960
9961         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9962         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9963         porting problem reported by Georg Schwarz in
9964         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9965
9966 2005-12-05  Bruno Haible  <bruno@clisp.org>
9967
9968         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9969         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9970         Reported by Mark Junker <mjscod@gmx.de>.
9971
9972 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
9973
9974         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
9975         Use implementation from Albert Chin, with some
9976         comments/corrections by Stepan Kasal and myself.
9977
9978 2005-12-02  Bruno Haible  <bruno@clisp.org>
9979
9980         * gnulib-tool (func_import): Accept GPLed build tool modules when
9981         --lgpl is given.
9982         * modules/csharpcomp-script: New file.
9983         * modules/csharpcomp: Depend on it.
9984         * modules/javacomp-script: New file.
9985         * modules/javacomp: Depend on it.
9986         Suggested by Simon Josefsson.
9987
9988 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
9989
9990         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
9991         statement, to work around an HP-UX 10.20 compiler bug reported by
9992         Peter O'Gorman.
9993
9994 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9995
9996         * modules/savedir (Depends-on): Add openat.
9997
9998 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
9999
10000         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10001         (uintmax_t) [defined uintmax_t]: Do not declare.
10002         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10003         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10004         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10005         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10006         sake of portability to weird hosts that C allows (though we don't
10007         know of any practical examples).
10008
10009         * lib/savedir.h (fdsavedir): New decl.
10010         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10011         contains most of the former guts of savedir.
10012         (savedir): Use savedirstream.
10013         Include "openat.h".
10014
10015 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10016
10017         * modules/obstack (Files): Add m4/ulonglong.m4.
10018         Problem reported by Davide Angelocola.
10019
10020 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10021
10022         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10023         coreutils no longer futzes with rounding modes.
10024
10025 2005-11-14  Jim Meyering  <jim@meyering.net>
10026
10027         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10028         replacement of mkstemp.
10029
10030 2005-11-10  Simon Josefsson  <jas@extundo.com>
10031
10032         * lib/readline.c: Remove EOL.
10033
10034 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10035
10036         * modules/gethrxtime (Depends-on): Add gettime.
10037
10038 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10039
10040         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10041         or gettimeofday; no longer needed.
10042
10043 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10044
10045         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10046         time business.
10047         (gethrxtime) [! (HAVE_NANOUPTIME
10048         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10049         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10050         our own approximation.
10051
10052 2005-11-08  Eric Blake  <ebb9@byu.net>
10053
10054         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10055
10056 2005-11-08  Eric Blake  <ebb9@byu.net>
10057
10058         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10059
10060 2005-11-04  Bruno Haible  <bruno@clisp.org>
10061
10062         * gnulib-tool: Implement --update mode.
10063
10064 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10065
10066         Fix porting problem reported by Theodoros V. Kalamatianos.
10067         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10068         Don't assume that futimes failing means we must fail.
10069
10070 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10071
10072         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10073         variables to suggest the intended function of the PATH_MAX check.
10074
10075 2005-10-30  Kean Johnston  <jkj@sco.com>
10076
10077         Trivial changes to support SCO systems.
10078         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10079         as PATH_MAX.
10080         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10081         where __ptr is null when no I/O is pending.
10082
10083 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10084
10085         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10086         leave errno alone.  Problem reported by Dmitry V. Levin.
10087
10088 2005-10-28  Simon Josefsson  <jas@extundo.com>
10089
10090         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10091         Test more.
10092
10093         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10094
10095         * modules/md2, modules/md2-tests: New files.
10096
10097 2005-10-28  Simon Josefsson  <jas@extundo.com>
10098
10099         * m4/inet_ntop.m4: More tests.
10100
10101         * m4/gc-md2.m4, md2.m4: New file.
10102
10103 2005-10-28  Simon Josefsson  <jas@extundo.com>
10104
10105         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10106         "restrict" keywords, as per POSIX.  Protect the function
10107         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10108         Don't use K&R prototypes.  Check the sprintf return values.
10109         Re-define EAFNOSUPPORT if not present.  Indent.
10110
10111         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10112         suggested by Bruno Haible <bruno@clisp.org>.
10113
10114         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10115
10116         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10117
10118         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10119         libgcrypt).
10120
10121         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10122
10123         * lib/md2.h, lib/md2.c: New files.
10124
10125 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10126
10127         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10128         errno alone.  Problem reported by Frederic Jolliton.
10129
10130 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10131
10132         * modules/verify (License): Change from GPL to LGPL.  This is a
10133         tiny module and there are apparently near-equivalents that are
10134         under the BSD license.
10135
10136 2005-10-24  Simon Josefsson  <jas@extundo.com>
10137
10138         * modules/sha1: Relicense to LGPL.
10139
10140 2005-10-24  Simon Josefsson  <jas@extundo.com>
10141
10142         * lib/md4.h: Shrink buffer size, now that we changed the type.
10143
10144 2005-10-23  Simon Josefsson  <jas@extundo.com>
10145
10146         * gnulib-tool (func_import): Fix --tests-base.
10147
10148 2005-10-22  Simon Josefsson  <jas@extundo.com>
10149
10150         * modules/arcfour (Depends-on): Need stdint.
10151
10152 2005-10-22  Simon Josefsson  <jas@extundo.com>
10153
10154         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10155         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10156
10157 2005-10-22  Simon Josefsson  <jas@extundo.com>
10158
10159         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10160         suggested by Bruno Haible <bruno@clisp.org>.
10161
10162 2005-10-22  Simon Josefsson  <jas@extundo.com>
10163
10164         * lib/crc.h: Include stddef.h, for size_t.
10165
10166 2005-10-22  Simon Josefsson  <jas@extundo.com>
10167
10168         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10169         arcfour_context struct (simplify test vector testing in GNU
10170         Shishi).
10171
10172 2005-10-21  Simon Josefsson  <jas@extundo.com>
10173
10174         * modules/des, modules/des-tests: New files.
10175
10176         * modules/gc-des, modules/gc-des-tests: New files.
10177
10178         * tests/test-des.c, tests/test-gc-des.c: New file.
10179
10180 2005-10-21  Simon Josefsson  <jas@extundo.com>
10181
10182         * modules/arctwo, modules/arctwo-tests: New files.
10183
10184         * tests/test-arctwo.c: New file.
10185
10186         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10187
10188         * tests/test-gc-arctwo.c: New file.
10189
10190 2005-10-21  Simon Josefsson  <jas@extundo.com>
10191
10192         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10193         Bruno Haible <bruno@clisp.org>.
10194
10195         * m4/gc-des.m4: New file.
10196
10197 2005-10-21  Simon Josefsson  <jas@extundo.com>
10198
10199         * m4/arctwo.m4: New file.
10200
10201         * m4/gc-arctwo.m4: New file.
10202
10203 2005-10-21  Simon Josefsson  <jas@extundo.com>
10204
10205         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10206         block.
10207
10208 2005-10-21  Simon Josefsson  <jas@extundo.com>
10209
10210         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10211         <bruno@clisp.org>.
10212
10213         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10214
10215         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10216         Bruno Haible <bruno@clisp.org>.
10217
10218         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10219         <bruno@clisp.org>.
10220
10221 2005-10-21  Simon Josefsson  <jas@extundo.com>
10222
10223         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10224
10225 2005-10-21  Simon Josefsson  <jas@extundo.com>
10226
10227         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10228
10229 2005-10-21  Simon Josefsson  <jas@extundo.com>
10230
10231         * lib/des.h, lib/des.c: New files.
10232
10233         * lib/gc-gnulib.c: Support DES.c
10234
10235 2005-10-21  Simon Josefsson  <jas@extundo.com>
10236
10237         * lib/arctwo.h, lib/arctwo.c: New files.
10238
10239         * lib/gc-gnulib.c: Support ARCTWO.
10240
10241 2005-10-21  Simon Josefsson  <jas@extundo.com>
10242
10243         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10244         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10245
10246 2005-10-21  Simon Josefsson  <jas@extundo.com>
10247
10248         * gnulib-tool (func_import, func_create_testdir): Define automake
10249         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10250         Makefile.am snippet),
10251         suggested by Bruno Haible <bruno@clisp.org>.
10252
10253         * modules/gc (Makefile.am): Use it.
10254
10255 2005-10-21  Bruno Haible  <bruno@clisp.org>
10256
10257         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10258         patch.
10259
10260 2005-10-19  Simon Josefsson  <jas@extundo.com>
10261
10262         * tests/test-gc-rijndael.c: New file.
10263
10264         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10265
10266 2005-10-19  Simon Josefsson  <jas@extundo.com>
10267
10268         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10269         interface too.
10270
10271 2005-10-19  Simon Josefsson  <jas@extundo.com>
10272
10273         * tests/test-gc-arcfour.c: New file.
10274
10275         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10276
10277 2005-10-19  Simon Josefsson  <jas@extundo.com>
10278
10279         * modules/gc-md4, modules/gc-md4-tests: New file.
10280
10281         * tests/test-gc-md4.c: New file.
10282
10283 2005-10-19  Simon Josefsson  <jas@extundo.com>
10284
10285         * m4/gc-md4.m4: New file.
10286
10287 2005-10-19  Simon Josefsson  <jas@extundo.com>
10288
10289         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10290         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10291         <kasal@ucw.cz>.
10292
10293 2005-10-19  Simon Josefsson  <jas@extundo.com>
10294
10295         * m4/gc-arcfour.m4: New file.
10296
10297         * m4/gc-rijndael.m4: New file.
10298
10299 2005-10-19  Simon Josefsson  <jas@extundo.com>
10300
10301         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10302
10303 2005-10-19  Simon Josefsson  <jas@extundo.com>
10304
10305         * lib/gc-gnulib.c: Support ARCFOUR.
10306
10307 2005-10-19  Simon Josefsson  <jas@extundo.com>
10308
10309         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10310         support.
10311
10312         * lib/gc.h: Add ECB enum type.
10313
10314         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10315
10316 2005-10-18  Simon Josefsson  <jas@extundo.com>
10317
10318         * tests/test-md5.c: New file.
10319
10320         * modules/md5-tests: New file.
10321
10322 2005-10-18  Simon Josefsson  <jas@extundo.com>
10323
10324         * tests/test-md4.c: New file.
10325
10326         * modules/md4, modules/md4-tests: New files.
10327
10328 2005-10-18  Simon Josefsson  <jas@extundo.com>
10329
10330         * m4/md4.m4: New file.
10331
10332 2005-10-18  Simon Josefsson  <jas@extundo.com>
10333
10334         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10335
10336 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10337
10338         * gnulib-tool (func_create_testdir): Omit the second check whether
10339         BUILT_SOURCES in nonempty.
10340
10341 2005-10-17  Simon Josefsson  <jas@extundo.com>
10342
10343         * tests/test-rijndael.c: New file.
10344
10345 2005-10-17  Simon Josefsson  <jas@extundo.com>
10346
10347         * modules/sha1: Depend on stdint instead of md5.
10348
10349         * modules/md5: Depend on stdint, remove uint32_t.
10350
10351 2005-10-17  Simon Josefsson  <jas@extundo.com>
10352
10353         * modules/gc-sha1-tests: New file.
10354
10355         * tests/test-gc-sha1.c: New file.
10356
10357 2005-10-17  Simon Josefsson  <jas@extundo.com>
10358
10359         * m4/md5.m4: Remove call to uint32_t.m4.
10360
10361 2005-10-17  Simon Josefsson  <jas@extundo.com>
10362
10363         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10364
10365         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10366         md5.h.
10367
10368         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10369
10370         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10371
10372 2005-10-17  Simon Josefsson  <jas@extundo.com>
10373
10374         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10375
10376 2005-10-17  Simon Josefsson  <jas@extundo.com>
10377
10378         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10379
10380 2005-10-17  Simon Josefsson  <jas@extundo.com>
10381
10382         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10383
10384         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10385
10386 2005-10-17  Bruno Haible  <bruno@clisp.org>
10387
10388         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10389         that it can also be used in a test.
10390
10391 2005-10-16  Bruno Haible  <bruno@clisp.org>
10392
10393         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10394         TESTS_ENVIRONMENT, so that individual tests can augment it.
10395
10396         * gnulib-tool (func_create_testdir): Use an intermediate target for
10397         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10398         macros, like $(ALLOCA_H), which cannot be passed through the command
10399         line.
10400
10401 2005-10-15  Simon Josefsson  <jas@extundo.com>
10402
10403         * modules/rijndael-tests: New file.
10404
10405         * modules/rijndael: New file.
10406
10407 2005-10-15  Simon Josefsson  <jas@extundo.com>
10408
10409         * m4/rijndael.m4: New file.
10410
10411 2005-10-15  Simon Josefsson  <jas@extundo.com>
10412
10413         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10414
10415         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10416
10417 2005-10-14  Simon Josefsson  <jas@extundo.com>
10418
10419         * tests/test-arcfour.c: New file.
10420
10421         * modules/arcfour, modules/arcfour-tests: New files.
10422
10423 2005-10-14  Simon Josefsson  <jas@extundo.com>
10424
10425         * m4/arcfour.m4: New file.
10426
10427 2005-10-14  Simon Josefsson  <jas@extundo.com>
10428
10429         * lib/arcfour.h, lib/arcfour.c: New files.
10430
10431 2005-10-14  Roland McGrath  <roland@redhat.com>
10432
10433         Import from libc.  [BZ #1331]
10434         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10435         macro argument.
10436         Reported by Matej Vela <vela@debian.org>.
10437
10438 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10439
10440         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10441         include <wchar.h>; no longer needed.
10442
10443 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10444
10445         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10446
10447 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10448         and  Ulrich Drepper  <drepper@redhat.com>
10449
10450         Import from libc.
10451         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10452         instead of inline stream orientation test and two separate
10453         function calls.  Pay no attention to USE_IN_LIBIO.
10454
10455 2005-10-13  Simon Josefsson  <jas@extundo.com>
10456
10457         * modules/gc-hmac-md5-tests: New file.
10458
10459         * tests/test-gc-hmac-sha1.c: New file.
10460
10461         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10462
10463         * modules/gc-hmac-md5-tests: New file.
10464
10465         * tests/test-gc-md5.c: New file.
10466
10467         * modules/gc-md5-tests: New file.
10468
10469 2005-10-13  Simon Josefsson  <jas@extundo.com>
10470
10471         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10472         Move memory allocation outside of loop.
10473
10474 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10475
10476         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10477         intermediate directory is in a read-only file system.  Problem
10478         reported by Eric Blake.
10479
10480 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10481
10482         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10483
10484 2005-10-12  Simon Josefsson  <jas@extundo.com>
10485
10486         * tests/test-hmac-sha1.c: New file.
10487
10488         * modules/hmac-sha1-tests: New file.
10489
10490         * modules/hmac-sha1: New file.
10491
10492 2005-10-12  Simon Josefsson  <jas@extundo.com>
10493
10494         * modules/gc-sha1: New file.
10495
10496 2005-10-12  Simon Josefsson  <jas@extundo.com>
10497
10498         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10499
10500         * tests/test-gc-pbkdf2-sha1.c: New file.
10501
10502 2005-10-12  Simon Josefsson  <jas@extundo.com>
10503
10504         * modules/gc-md5, modules/gc-hmac-md5: New files.
10505
10506         * modules/gc (Files): Remove md5, memxor and hmac files.
10507
10508 2005-10-12  Simon Josefsson  <jas@extundo.com>
10509
10510         * m4/gc-pbkdf2-sha1.m4: New file.
10511
10512         * m4/gc-hmac-sha1.m4: New file.
10513
10514         * m4/gc-sha1: New file.
10515
10516         * m4/hmac-sha1.m4: New file.
10517
10518 2005-10-12  Simon Josefsson  <jas@extundo.com>
10519
10520         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10521
10522         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10523
10524 2005-10-12  Simon Josefsson  <jas@extundo.com>
10525
10526         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10527         suggested by Bruno Haible <bruno@clisp.org>.
10528
10529 2005-10-12  Simon Josefsson  <jas@extundo.com>
10530
10531         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10532
10533 2005-10-12  Simon Josefsson  <jas@extundo.com>
10534
10535         * lib/gc-pbkdf2-sha1.c: New file.
10536
10537         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10538
10539 2005-10-12  Simon Josefsson  <jas@extundo.com>
10540
10541         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10542
10543         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10544
10545 2005-10-12  Simon Josefsson  <jas@extundo.com>
10546
10547         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10548         GC_USE_HMAC_MD5, respectively.
10549
10550         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10551         (gc_md5): Fix typo.
10552
10553         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10554
10555         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10556
10557         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10558
10559 2005-10-12  Bruno Haible  <bruno@clisp.org>
10560
10561         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10562         Reported by Stepan Kasal <kasal@ucw.cz>.
10563
10564 2005-10-11  Simon Josefsson  <jas@extundo.com>
10565
10566         * tests/test-crc.c: New file.
10567
10568         * modules/crc, modules/crc-tests: New files.
10569
10570 2005-10-11  Simon Josefsson  <jas@extundo.com>
10571
10572         * m4/crc.m4: New file.
10573
10574 2005-10-11  Simon Josefsson  <jas@extundo.com>
10575
10576         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10577
10578         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10579
10580         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10581
10582 2005-10-11  Simon Josefsson  <jas@extundo.com>
10583
10584         * lib/crc.h, lib/crc.c: New files.
10585
10586         * lib/gc.h (gc_hash_buffer): Add doc.
10587
10588 2005-10-11  Bruno Haible  <bruno@clisp.org>
10589
10590         * modules/c-strcasestr: New file.
10591         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10592
10593 2005-10-11  Bruno Haible  <bruno@clisp.org>
10594
10595         * modules/c-strcase: New file.
10596         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10597
10598 2005-10-11  Bruno Haible  <bruno@clisp.org>
10599
10600         * lib/strcasecmp.c: Include limits.h.
10601         (strcasecmp): Avoid integer overflow on exotic platforms.
10602         * lib/strncasecmp.c: Include limits.h.
10603         (strncasecmp): Avoid integer overflow on exotic platforms.
10604         Reported by Paul Eggert.
10605
10606 2005-10-11  Bruno Haible  <bruno@clisp.org>
10607
10608         * lib/c-strcasestr.h: New file, from GNU gettext.
10609         * lib/c-strcasestr.c: New file, from GNU gettext.
10610
10611 2005-10-11  Bruno Haible  <bruno@clisp.org>
10612
10613         * lib/c-strcase.h: New file, from GNU gettext.
10614         * lib/c-strcasecmp.c: New file, from GNU gettext.
10615         * lib/c-strncasecmp.c: New file, from GNU gettext.
10616
10617 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10618
10619         * modules/mempcpy (License): GPL -> LGPL.
10620         * modules/strchrnul (License): Likewise.
10621         * modules/sysexits (License): Likewise.
10622
10623 2005-10-08  Simon Josefsson  <jas@extundo.com>
10624
10625         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10626
10627 2005-10-07  Simon Josefsson  <jas@extundo.com>
10628
10629         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10630
10631 2005-10-06  Simon Josefsson  <jas@extundo.com>
10632
10633         * tests/test-hmac-md5.c: New file.
10634
10635         * modules/hmac-md5-tests: New file.
10636
10637         * modules/hmac-md5: New file.
10638
10639 2005-10-06  Simon Josefsson  <jas@extundo.com>
10640
10641         * m4/hmac-md5.m4: New file.
10642
10643         * m4/memxor.m4: Require gl_C_RESTRICT.
10644
10645 2005-10-06  Simon Josefsson  <jas@extundo.com>
10646
10647         * lib/memxor.c (memxor): Avoid casts and warnings.
10648
10649 2005-10-06  Simon Josefsson  <jas@extundo.com>
10650
10651         * lib/hmac-md5.c: New file.
10652
10653         * lib/hmac.h: New file.
10654
10655 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10656
10657         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10658         promotes to int, not unsigned int, to catch the AIX 5.3
10659         compiler bug.
10660
10661 2005-10-05  Simon Josefsson  <jas@extundo.com>
10662
10663         * modules/memxor: New file.
10664
10665         * modules/iconv (Files): Move config.rpath to havelib, it is used
10666         there.
10667
10668         * modules/havelib (Files): Add config.rpath.
10669
10670 2005-10-05  Simon Josefsson  <jas@extundo.com>
10671
10672         * m4/memxor.m4: New file.
10673
10674 2005-10-05  Simon Josefsson  <jas@extundo.com>
10675
10676         * lib/memxor.c (memxor): Fix compiler error.
10677
10678         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10679         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10680
10681         * lib/memxor.h, lib/memxor.c: New files.
10682
10683         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10684         we assume all systems have it, suggested by Jim Meyering
10685         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10686         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10687         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10688         same reasons.
10689
10690 2005-10-05  Simon Josefsson  <jas@extundo.com>
10691
10692         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10693
10694 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10695
10696         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10697         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10698         needed, since the source code now assumes these .h files.
10699
10700 2005-10-05  Derek Price  <derek@ximbiot.com>
10701
10702         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10703
10704 2005-10-05  Bruno Haible  <bruno@clisp.org>
10705
10706         * modules/stdint (License): Change to LGPL.
10707
10708 2005-10-04  Simon Josefsson  <jas@extundo.com>
10709
10710         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10711         D. Baushke" <mdb@gnu.org>.
10712
10713 2005-10-04  Bruno Haible  <bruno@clisp.org>
10714
10715         * lib/verify.h (verify_true): Provide alternative definition for C++.
10716
10717 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10718
10719         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10720         (SSIZE_MAX): New macro, if not already defined.
10721         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10722         than 2 GiB.
10723
10724 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10725
10726         Sync from coreutils.
10727         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10728         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10729         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10730         ULLONG_MAX doesn't work with 2.7.2.1.
10731
10732 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10733
10734         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10735         From Ben Pfaff.
10736
10737         * modules/exclude (Depends-on): Depend on verify.
10738         * modules/strtoimax (Depends-on): Likewise.
10739         * modules/utimecmp (Depends-on): Likewise.
10740
10741 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10742
10743         * lib/exclude.c: Include verify.h.
10744         (verify): Remove.  All callers changed to use verify.h's version.
10745         * lib/strtoimax.c: Likewise.
10746         * lib/utimecmp.c: Likewis.e
10747
10748         Sync from coreutils.
10749         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10750         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10751         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10752         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10753         bother returning ENOSYS if settimeofday or stime fails; just let
10754         them return whatever errno they want to return.
10755         * lib/utimens.c: Include unistd.h, for dup2.
10756         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10757         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10758
10759 2005-10-02  Jim Meyering  <jim@meyering.net>
10760
10761         Sync from coreutils.
10762         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10763         from glibc-2.2.5 that fails for read-only files.
10764
10765 2005-10-02  Jim Meyering  <jim@meyering.net>
10766
10767         Sync from coreutils.
10768         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10769         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10770         `#if HAVE_CONFIG_H'.
10771         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10772         Remove AT_FDCWD test.
10773         Do not consume the fd unless successful.
10774         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10775         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10776         block, so that we don't even try to compile it if settimeofday is
10777         available.  This works around a compilation failure on OSF1 V5.1,
10778         due to stime requiring a `long int*' while tv_sec is `int'.
10779
10780 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10781
10782         Sync from coreutils.
10783         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10784         against `yes', rather than just testing for nonempty.
10785
10786 2005-10-01  Simon Josefsson  <jas@extundo.com>
10787
10788         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10789         and Darwin.
10790
10791         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10792         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10793         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10794         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10795         Check if struct addrinfo is declared.
10796
10797 2005-10-01  Simon Josefsson  <jas@extundo.com>
10798
10799         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10800         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10801         AI_* and EAI_* definitions.  Protect function declarations.
10802
10803 2005-10-01  Jim Meyering  <jim@meyering.net>
10804
10805         Sync from coreutils.
10806
10807         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10808         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10809         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10810         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10811         in the inet and nsl libraries.  Required on Solaris 5.7.
10812
10813 2005-10-01  Jim Meyering  <jim@meyering.net>
10814
10815         Sync from coreutils.
10816         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10817         in the inet and nsl libraries.  Required on Solaris 5.7.
10818
10819 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10820
10821         * lib/getdelim.c (getdelim): Remove unused variables.
10822
10823 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10824
10825         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10826         so that the code works even with ancient cpp.  Portability problem
10827         with GCC 2.7.2.1 reported by Thomas M.Ott.
10828
10829 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10830
10831         * modules/regex (Depends-on): Add strcase.
10832
10833         * modules/gethostname (Licence): Change from GPL to LGPL, since
10834         gethostname.c is a trivial implementation of a standard library
10835         function.
10836         * modules/poll (License): Change from GPL to LGPL, since it's
10837         derived from LGPL code.
10838
10839 2005-09-27  Jim Meyering  <jim@meyering.net>
10840
10841         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10842         HAVE_CONFIG_H.
10843
10844         * lib/intprops.h (signed_type_or_expr__): Define.
10845         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10846         for unsigned types.
10847
10848 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10849
10850         * lib/verify.h (verify_expr): Remove, replacing with:
10851         (verify_true): New macro that returns true instead of void.
10852         (verify_type__): Remove.
10853         (verify): Use verify_true rather than verify_type__.
10854
10855 2005-09-26  Bruno Haible  <bruno@clisp.org>
10856
10857         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10858         is necessary.
10859         (lib_SOURCES): Remove mbchar.c.
10860         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10861         (Files): Add m4/mbrtowc.m4.
10862         * modules/mbiter: Likewise.
10863         * modules/mbuiter: Likewise.
10864
10865 2005-09-26  Bruno Haible  <bruno@clisp.org>
10866
10867         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10868         compile mbchar.c if they are not both present.
10869         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10870         * m4/mbiter.m4 (gl_MBITER): Likewise.
10871         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10872         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10873         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10874
10875 2005-09-25  Jim Meyering  <jim@meyering.net>
10876
10877         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10878         also uses socklen_t.
10879
10880 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10881
10882         * lib/utimens.c (ENOSYS): Define if not already defined.
10883         (futimens): Support having a null PATH if the file descriptor
10884         is nonnegative.
10885
10886         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10887         Remove.
10888         (__attribute): Define to empty unless GCC 3.1 or later.
10889         This works around a core dump on OpenBSD 3.4, which has GCC
10890         2.95.3, which dumps core when given __attribute__(()).  It also
10891         simplifies other tests, since we really don't want to bother with
10892         worrying about which ancient version of GCC supported what.
10893         Original problem reported by Yoann Vandoorselaere, with part of
10894         the fix suggested by Derek Price.
10895
10896 2005-09-24  Jim Meyering  <jim@meyering.net>
10897
10898         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10899         so we can once again use a positive bitfield width of 1 -- now we
10900         don't have to explain why we were using a bitfield width of 2.
10901
10902 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10903
10904         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10905         and similarly for the other external symbols.  Problem reported
10906         by James Gallager.
10907
10908         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10909         bug reported by Jim Meyering.
10910
10911         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10912         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10913         not needed, since socklen is a prerequisite module.
10914
10915 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10916
10917         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10918         Problem reported by Eric Blake.
10919         (getaddrinfo): Initialize se so that it's not garbage.
10920         Redo internal storage allocation so that it doesn't make unportable
10921         assumptions about alignment.
10922         Fix a memory leak.
10923
10924         * lib/utimens.c (futimens): Use futimesat if available.
10925         Prefer it to futimes since it doesn't have the futimes bug.
10926
10927         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10928         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10929         Instead, declare a function that returns a pointer to an array,
10930         and use verify_type__ to declare the size of the array.
10931         Problem and germ of a solution reported by Bruno Haible.
10932         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10933         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10934
10935 2005-09-23  Jim Meyering  <jim@meyering.net>
10936
10937         Sync from coreutils.
10938         Correct build failure (socklen_t not defined) on at least
10939         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10940         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10941
10942 2005-09-23  Jim Meyering  <jim@meyering.net>
10943
10944         * modules/getaddrinfo (Depends-on): Add socklen.
10945
10946 2005-09-23  Bruno Haible  <bruno@clisp.org>
10947
10948         * tests/test-verify.c: New file.
10949
10950 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10951
10952         Sync from coreutils.
10953
10954         * modules/argmatch (Depends-on): Add verify.
10955         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10956         unistd-safer.
10957         * modules/save-cwd (Depends-on): Likewise.
10958
10959         * modules/openat (Files): Add lib/openat-die.c.
10960         (Depends-on): Remove error, exitfail.
10961         Add dirname.
10962
10963         * modules/verify: New file.
10964         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10965         with "verify" module.
10966
10967 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10968
10969         Sync from coreutils.
10970
10971         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10972         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
10973         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
10974         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
10975         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
10976         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
10977         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
10978         Don't bother checking for string.h, stdlib.h, unistd.h.
10979         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
10980         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
10981         module's job.
10982         * m4/jm-macros.m4 (gl_MACROS): Likewise.
10983         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
10984
10985         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
10986         (gl_GETDATE): Use it.
10987
10988         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
10989
10990 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10991
10992         Sync from coreutils.
10993
10994         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
10995         stat-time.h.
10996         * lib/argmatch.h: Include verify.h
10997         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
10998         (ARGMATCH_ASSERT): Remove; unused.
10999         * lib/canonicalize.c: Assume STDC_HEADERS.
11000         * lib/exclude.c: Include "strcase.h".
11001         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11002         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11003         and stdio-safer.h.
11004         (getusershell): Call fopen, not fopen_safer.
11005         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11006         Do not include unistd-safer.h.
11007         (save_cwd): Don't call fd_safer; no longer needed
11008         now that we include fcntl--.h.
11009
11010         * lib/getdate.y (relative_time): New type.
11011         (RELATIVE_TIME_0): New constant.
11012         (parser_control): Use relative_time instead of doing it ourselves.
11013         (%union): Add new relative_time rel member.
11014         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11015         Now typeless.
11016         (relunit, relunit_snumber): Now of type rel.
11017         (zone, rel, relunit, get_date): Adjust to above changes.
11018
11019         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11020         Do not include unistd-safer.h.
11021         (getloadavg): Don't call fd_safer; no longer needed
11022         now that we include fcntl--.h.
11023
11024         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11025         (make_dir_parents): Treat ENOSYS like EEXIST.
11026
11027         Improve quality of diagnostics on restore_cwd failure.
11028         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11029         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11030         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11031         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11032         each time through the loop.  Do not diagnose restore_cwd failure;
11033         that is the caller's job (and perhaps the caller does not care).
11034
11035         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11036         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11037         If the file already exists but is not a directory, don't bother
11038         to try to make its parents.
11039         Close potential file descriptor leak if we can't chdir("/") (!).
11040         Don't always return true if chdir($PWD) fails; return true only
11041         if the requested action was done successfully (except for the
11042         chdir($PWD)).
11043         Don't log final directory unless we actually made it.
11044         Refactor to avoid duplicate code to fix up permissions.
11045         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11046
11047         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11048         to make it a bit faster and (I hope) clearer.
11049         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11050         Fix bug in formats like %2N.
11051
11052         * lib/verify.h: New file.
11053
11054 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11055
11056         Sync from coreutils.
11057         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11058
11059 2005-09-22  Jim Meyering  <jim@meyering.net>
11060
11061         Sync from coreutils.
11062
11063         * m4/lstat.m4 (gl_FUNC_LSTAT):
11064         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11065         Remove obsolete comment.
11066         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11067         * m4/xstrtod.m4: Likewise.
11068
11069         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11070
11071 2005-09-22  Jim Meyering  <jim@meyering.net>
11072
11073         Sync from coreutils.
11074
11075         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11076
11077         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11078         the .tm_year member, since otherwise gcc-4.0 would now warn about
11079         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11080
11081         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11082         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11083
11084         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11085         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11086         when run in a time zone for which daylight savings time is in effect
11087         for the starting date.
11088
11089         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11090         stop us from restricting permissions of just-created absolute-named
11091         directories.
11092         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11093         to restore initial working directory.
11094         * lib/mkdir-p.c (make_dir_parents): New parameter:
11095         different_working_dir, to tell caller if/when we change the working
11096         directory and are unable to return to the initial one.
11097         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11098         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11099         `return false'.  This fixes a bug introduced on 2004-07-30.
11100
11101         * lib/openat.c (fdopendir): Be sure to close the supplied
11102         file descriptor before returning.  This makes our replacement
11103         implementation a little closer to Solaris's, where fdopendir
11104         ties the file descriptor to the returned DIR* pointer.
11105         * lib/openat.c (unlinkat): New function.
11106         * lib/openat.h (unlinkat): Add prototype.
11107         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11108         (openat_restore_fail): Rename from openat_restore_die.
11109         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11110
11111         Provide an alternative to exiting immediately upon save_cwd or
11112         restore_cwd failure.  Now, an application can arrange e.g.,
11113         to perform a longjump in that case.
11114         * lib/openat.c: Include dirname.h.
11115         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11116         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11117         and openat_restore_die rather than calling error directly.
11118         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11119
11120         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11121         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11122         define.
11123
11124         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11125         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11126                             int utc, int nanoseconds);
11127         Background:
11128         date should not have to allocate a megabyte of virtual memory to
11129         handle a format argument like +%1048575T.  When implemented with
11130         strftime, it must allocate such a buffer, use strftime to fill it
11131         in, print it, then free it.
11132         With fprintftime, it simply prints everything and exits.
11133         With no need for memory allocation, that's one fewer way to fail.
11134         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11135         optional field width, not before, so we accept %9:z, not %:9z.
11136         (my_strftime): Be sure to use L_('x') for literals.
11137
11138         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11139         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11140         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11141         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11142         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11143         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11144         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11145         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11146         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11147         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11148         * lib/xgethostname.c, lib/xreadlink.c:
11149         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11150
11151         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11152         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11153         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11154         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11155         and don't include <sys/file.h>).
11156
11157 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11158
11159         Sync from coreutils.
11160
11161         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11162         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11163         [!LDAV_DONE]: Avoid unused variable warning.
11164
11165 2005-09-21  Bruno Haible  <bruno@clisp.org>
11166
11167         * lib/unicodeio.h (unicode_to_mb): New declaration.
11168
11169 2005-09-20  Derek Price  <derek@ximbiot.com>
11170
11171         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11172         getaddrinfo.h.
11173
11174 2005-09-20  Bruno Haible  <bruno@clisp.org>
11175
11176         * gnulib-tool: Remove trailing slashes from the values specified for
11177         --source-base, --m4-base, --tests-base, --aux-dir.
11178         Suggested by Simon Josefsson <jas@extundo.com>.
11179
11180 2005-09-20  Bruno Haible  <bruno@clisp.org>
11181
11182         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11183         func_modules_to_filelist, func_import, func_create_testdir): Make all
11184         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11185         change when gnulib-tool is invoked in a different locale.
11186
11187 2005-09-19  Simon Josefsson  <jas@extundo.com>
11188
11189         * m4/socklen.m4: Fix typo.
11190
11191 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11192
11193         Use a consistent style for including <config.h>.
11194         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11195         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11196         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11197         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11198         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11199         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11200         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11201         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11202         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11203         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11204         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11205         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11206         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11207         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11208         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11209         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11210         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11211         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11212         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11213         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11214         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11215         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11216         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11217         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11218         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11219         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11220         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11221         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11222         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11223         lib/xstrtoumax.c, lib/yesno.c:
11224         Standardize inclusion of config.h.
11225         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11226         lib/inttostr.h:  Removed inclusion of config.h from header files.
11227         * lib/inttostr.c:  Adjusted in-tree users.
11228         * lib/timespec.h: Remove superfluous warning to include config.h.
11229         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11230         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11231         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11232         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11233         config.h with HAVE_CONFIG_H.
11234
11235 2005-09-19  Jim Meyering  <jim@meyering.net>
11236
11237         * modules/pathmax (License): Change to LGPL.
11238
11239 2005-09-19  Derek Price  <derek@ximbiot.com>
11240
11241         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11242
11243 2005-09-19  Bruno Haible  <bruno@clisp.org>
11244
11245         * gnulib-tool (import): Provide default for --tests-base.
11246
11247 2005-09-19  Bruno Haible  <bruno@clisp.org>
11248
11249         * doc/quote.texi: New file, extracted from gnulib.texi.
11250         * doc/ctime.texi: New file, extracted from gnulib.texi.
11251         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11252         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11253         * doc/gnulib.texi: Include them.
11254
11255 2005-09-18  Bruno Haible  <bruno@clisp.org>
11256
11257         Portability fix.
11258         * gnulib-tool (func_readlink): New function.
11259         (func_ln_if_changed): Use it.
11260
11261 2005-09-18  Bruno Haible  <bruno@clisp.org>
11262
11263         * gnulib-tool: Support --with-tests also with --import.
11264         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11265         (func_import): Use variables $testsbase and $inctests. Emit a
11266         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11267         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11268         SUBDIRS += $testsdir.
11269         (func_create_testdir): Update.
11270
11271 2005-09-18  Bruno Haible  <bruno@clisp.org>
11272
11273         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11274         instead of $dry_run.
11275         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11276         (func_ln_if_changed): Don't handle dry-run here.
11277         (func_import): In dry-run mode, detect more precisely which actions
11278         would be performed, and don't use "...ing" verbs.
11279
11280 2005-09-18  Bruno Haible  <bruno@clisp.org>
11281
11282         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11283         (func_import): Use join on two temporary files instead of three nested
11284         loops, in order to determine which files are new or old.
11285
11286 2005-09-18  Bruno Haible  <bruno@clisp.org>
11287
11288         * gnulib-tool (func_import): Comment out code that spits out the
11289         new files with --dry-run.
11290
11291 2005-09-18  Bruno Haible  <bruno@clisp.org>
11292
11293         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11294
11295 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11296
11297         * lib/stat-time.h: New file.
11298         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11299         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11300         in a different way.
11301         (timespec_cmp): New function.
11302         * lib/utimecmp.c: Include stat-time.h.
11303         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11304         members exist, not on the obsolescent ST_MTIM_NSEC.
11305         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11306
11307 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11308
11309         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11310
11311 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11312
11313         * MODULES.html.sh (File system functions): Add stat-time.
11314         * modules/stat-time: New file.
11315         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11316         is now done in a different way, by the stat-time module.
11317         * modules/utimecmp (Depends-on): Add stat-time.
11318
11319 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11320
11321         * m4/st_mtim.m4: Remove.  Superseded by...
11322         * m4/stat-time.m4: New file.
11323         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11324         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11325
11326 2005-09-15  Derek Price  <derek@ximbiot.com>
11327
11328         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11329
11330 2005-09-15  Derek Price  <derek@ximbiot.com>
11331
11332         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11333         * lib/regex_internal.c: Ditto, using this...
11334         (__GNUC_PREREQ): ...new macro.
11335         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11336         using...
11337         (__GNUC_PREREQ): ...this new macro.
11338
11339         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11340
11341 2005-09-15  Derek Price  <derek@ximbiot.com>
11342             Paul Eggert  <eggert@cs.ucla.edu>
11343
11344         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11345         changes, consolidating in...
11346         * lib/regex_internal.h: ...this file.
11347
11348 2005-09-13  Jim Meyering  <jim@meyering.net>
11349
11350         * lib/canon-host.c: Filter through gnu indent and reword comments
11351         slightly.
11352         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11353
11354 2005-09-13  Derek Price  <derek@ximbiot.com>
11355
11356         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11357         failure.
11358         Reported by Jim Meyering  <jim@meyering.net>.
11359
11360 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11361
11362         * lib/base64.c: Typo.
11363         (base64_encode): Put b64str in initialized data section.
11364
11365 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11366
11367         Merge glibc and coreutils changes into gnulib, plus a few
11368         extra fixes.
11369         * lib/md5.c: Use #error rather than a string.
11370         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11371         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11372         (__attribute__): Define to empty for non recent-GCC.
11373         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11374         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11375         Renamed from their non-__ counterparts, with new macros replacing
11376         them if not _LIBC.  Add __THROW attribute.
11377         (rol): Remove.
11378         (struct md5_ctx): Align buffer if using GCC.
11379         * lib/sha1.h (struct sha1_ctx): Likewise.
11380         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11381         The old name was backwards.
11382         (NOTSWAP): Remove; not used.
11383         (rol): New macro, moved here from md5.h.
11384         (sha1_process_block): Remove a FIXME that doesn't make sense.
11385
11386 2005-09-12  Derek Price  <derek@ximbiot.com>
11387
11388         Return usable errors from canon-host.
11389         * lib/canon-host.h: New file.
11390         * lib/canon-host.c (canon_host): Wrap...
11391         (canon_host_r): ...this new function, which now relies exclusively on
11392         getaddrinfo.
11393         (ch_strerror): New function.
11394         (last_cherror): New global.
11395         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11396         interface.
11397         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11398         void *.
11399         (freeaddrinfo): Free ai->ai_canonname when set.
11400
11401 2005-09-12  Derek Price  <derek@ximbiot.com>
11402
11403         Make canon-host require getaddrinfo.
11404         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11405         AC_LIBSOURCE canon-host.h.  Call...
11406         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11407         gl_GETADDRINFO.
11408         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11409
11410 2005-09-12  Derek Price  <derek@ximbiot.com>
11411
11412         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11413         LGPL.
11414         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11415
11416 2005-09-12  Derek Price  <derek@ximbiot.com>
11417
11418         * lib/gai_strerror.c: Include config.h when available.  Include
11419         getaddrinfo.h before other headers to test interface.
11420         Reported by Larry Jones <lawrence.jones@ugs.com>.
11421
11422 2005-09-12  Derek Price  <derek@ximbiot.com>
11423             Paul Eggert  <eggert@cs.ucla.edu>
11424
11425         * modules/glob (Files): Add glob-libc.h.
11426
11427 2005-09-12  Derek Price  <derek@ximbiot.com>
11428             Paul Eggert  <eggert@cs.ucla.edu>
11429
11430         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11431         glob_.h, glob-libc.h.
11432         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11433
11434 2005-09-12  Derek Price  <derek@ximbiot.com>
11435             Paul Eggert  <eggert@cs.ucla.edu>
11436
11437         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11438         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11439         protecting things that should be done only in gnulib contexts.
11440         * lib/glob_.h: New file, containing only the glob things needed for
11441         gnulib.
11442         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11443         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11444         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11445         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11446         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11447         and to respect the namespace rules better.
11448
11449 2005-09-08  Simon Josefsson  <jas@extundo.com>
11450
11451         * modules/socklen: New file.
11452
11453 2005-09-08  Simon Josefsson  <jas@extundo.com>
11454
11455         * m4/socklen.m4: New file.
11456
11457 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11458
11459         * modules/utimens (Files): Add m4/utimbuf.m4, since
11460         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11461         Reported by Sergey Poznyakoff.
11462
11463 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11464
11465         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11466         definitions, since that's the preferred style in glibc.
11467         Fix a minor spacing issue, and update copyright notice to match
11468         glibc's.
11469
11470 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11471
11472         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11473
11474 2005-09-06  Simon Josefsson  <jas@extundo.com>
11475
11476         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11477         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11478
11479 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11480
11481         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11482         warning.
11483
11484 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11485
11486         * config/srclist.txt: Add glibc bug 1302.
11487
11488 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11489
11490         Change bitset word type from unsigned int to unsigned long int,
11491         as this has better performance on typical 64-bit hosts.
11492         Port bitset code to hosts with unusual word sizes.
11493         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11494         (build_collating_symbol):
11495         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11496         argument is a bitset.  This is merely a style issue, but it makes
11497         it clearer that an entire array is expected.
11498         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11499         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11500         Port to the case where bitset_word is not the same as unsigned int.
11501         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11502         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11503         Likewise.
11504         * lib/regexec.c (check_dst_limits_calc_pos_1,
11505         check_subexp_matching_top):
11506         (build_trtable, group_nodes_into_DFAstates):
11507         Likewise.
11508         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11509         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11510         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11511         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11512         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11513         * lib/regcomp.c (optimize_subexps, lower_subexp):
11514         Work even if bitset_word has holes in its bitwise representation.
11515         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11516         * lib/regexec.c (check_dst_limits_calc_pos_1,
11517         check_subexp_matching_top):
11518         Likewise.
11519         * lib/regex_internal.c (re_string_reconstruct):
11520         Don't assume UCHAR_MAX == 255.
11521         * lib/regex_internal.h (bitset_set_all): Likewise.
11522         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11523         All uses changed.
11524         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11525         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11526         All uses changed.
11527         (BITSET_WORD_MAX): New macro.
11528         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11529         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11530         (bitset_empty, bitset_copy):
11531         Prefer sizeof (bitset) to multiplying it out ourselves.
11532         (bitset_not_merge): Remove; unused.
11533         (bitset_contain): Return bool, not unsigned int with one bit on.
11534         All callers changed.
11535         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11536         alignment than re_node_set; do this by defining a new internal
11537         type struct dests_alloc and using it to allocate memory.
11538
11539 2005-09-05  Bruno Haible  <bruno@clisp.org>
11540
11541         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11542         links.
11543
11544 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11545
11546         * modules/size_max (Makefile.am): Add size_max.h
11547
11548 2005-09-04  Derek Price  <derek@ximbiot.com>
11549
11550         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11551
11552 2005-09-03  Simon Josefsson  <jas@extundo.com>
11553
11554         * gnulib-tool: Fix typo.
11555
11556 2005-09-03  Simon Josefsson  <jas@extundo.com>
11557
11558         * config/srclist.txt: Add glibc bug 1293.
11559
11560 2005-09-03  Derek Price  <derek@ximbiot.com>
11561
11562         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11563         From Larry Jones <lawrence.jones@ugs.com>.
11564
11565 2005-09-02  Simon Josefsson  <jas@extundo.com>
11566
11567         * modules/socklen: New file.
11568
11569 2005-09-02  Simon Josefsson  <jas@extundo.com>
11570
11571         * modules/havelib: New module.
11572
11573         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11574         Use havelib.
11575
11576 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11577
11578         Check for arithmetic overflow when calculating sizes, to prevent
11579         some buffer-overflow issues.  These patches are conservative, in the
11580         sense that when I couldn't determine whether an overflow was possible,
11581         I inserted a run-time check.
11582         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11583         macros.
11584         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11585         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11586         (re_xnrealloc, re_x2nrealloc): New inline functions.
11587         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11588         parse_bracket_exp):
11589         (build_equiv_class, build_charclass): Check for arithmetic overflow
11590         in size expression calculations.
11591         * lib/regex_internal.c (re_string_realloc_buffers):
11592         (build_wcs_upper_buffer, re_node_set_add_intersect):
11593         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11594         (re_dfa_add_node, register_state): Likewise.
11595         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11596         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11597         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11598         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11599
11600 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11601
11602         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11603         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11604
11605 2005-09-02  Bruno Haible  <bruno@clisp.org>
11606
11607         Support for lib vs. lib64 distinction on biarch platforms.
11608         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11609         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11610         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11611
11612 2005-09-02  Bruno Haible  <bruno@clisp.org>
11613
11614         * gnulib-tool (import): In the other first-use case, provide defaults
11615         as well.
11616
11617 2005-09-02  Bruno Haible  <bruno@clisp.org>
11618
11619         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11620         patches not yet found in the latest gettext release.
11621
11622 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11623
11624         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11625         to avoid a collision with bits/local_lim.h in glibc.
11626         All uses changed.  Problem reported by Dmitry V. Levin in
11627         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11628
11629         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11630         bugs in int versus size_t comparisons.
11631         (re_string_context_at): Fix bug where the code assumed that
11632         Idx is signed.
11633
11634         Use bool where appropriate.
11635         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11636         All callers changed.
11637         (calc_eclosure_iter): Likewise, for ROOT arg.
11638         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11639         (build_charclass_op): Likewise, for NON_MATCH arg.
11640         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11641         (re_string_construct_common): Likewise, for ICASE arg.
11642         * lib/regexec.c (re_search_2_stub, re_search_stub):
11643         Likewise, for RET_LEN arg.
11644         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11645         (set_regs): Likewise, for FL_BACKTRACK arg.
11646         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11647         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11648         (calc_eclosure_iter, parse_bracket_exp):
11649         Use bool for internal variables that are booleans.
11650         * lib/regexec.c (re_search_internal, check_matching,
11651         proceed_next_node):
11652         (set_regs, build_sifted_states, sift_states_bkref):
11653         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11654         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11655         (find_collation_sequence_value):
11656         Likewise.
11657         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11658         (re_node_set_compare):
11659         Return bool, not int. All callers changed.
11660         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11661         (build_trtable, check_node_accept): Likewise.
11662         * lib/regex_internal.h: Include stdbool.h.
11663
11664         Fix bugs uncovered when converting to bool.
11665         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11666         failure instead of charging ahead blindly.
11667         * lib/regex_internal.c (register_state): Likewise.
11668         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11669         for freeing internal storage.
11670         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11671         bitset pieces used as boolean, to avoid undefined behavior
11672         on hosts that do int overflow checking.
11673
11674 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11675
11676         * config/srclist.txt: Add glibc bugs 1285-1287.
11677
11678 2005-09-01  Jim Meyering  <jim@meyering.net>
11679
11680         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11681         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11682         Require gl_STAT_MACROS, too.
11683
11684 2005-09-01  Bruno Haible  <bruno@clisp.org>
11685
11686         * gnulib-tool (import): In the first-use case, provide defaults.
11687
11688 2005-09-01  Bruno Haible  <bruno@clisp.org>
11689
11690         * gnulib-tool (func_import): Remove the .tmp files.
11691
11692 2005-09-01  Bruno Haible  <bruno@clisp.org>
11693
11694         * gnulib-tool (func_import): Fix handling of symbolic links.
11695
11696 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11697
11698         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11699         old glibc regex code mishandles strings longer than 2**31 bytes.
11700         This patch fixes this when the regex code is used in gnulib
11701         (i.e., outside glibc).
11702
11703         This patch should not affect the use of the regex code inside
11704         glibc.  No doubt this problem also needs to be handled for glibc
11705         as well, but the result will be an incompatible change to the
11706         glibc ABI, and the old ABI will have to be supported too.  That
11707         can be the the subject for another patch.
11708
11709         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11710         governing whether the rest of this patch is active.  By default,
11711         the macro is disabled and the patch has no effect.
11712         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11713         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11714         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11715         (re_match_2, re_set_registers): Use the new types.
11716         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11717         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11718         New macros.
11719         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11720         (re_string_context_at, bin_tree_t, re_dfastate_t):
11721         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11722         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11723         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11724         (re_string_char_size_at, re_string_wchar_at):
11725         (re_string_elem_size_at):
11726         Use the new types and macros to port to 64-bit hosts.
11727         Use unsigned types for internal values, so that the code
11728         mostly works even for arrays larger than SSIZE_MAX.
11729         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11730         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11731         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11732         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11733         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11734         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11735         (calc_inveclosure, parse_dup_op, build_range_exp):
11736         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11737         (fetch_number, create_token_tree, mark_opt_subexp):
11738         Likewise.
11739         * lib/regex_internal.c (re_string_construct_common,
11740         create_ci_newstate):
11741         (create_cd_newstate, re_string_allocate, re_string_construct):
11742         (re_string_realloc_buffers, build_wcs_upper_buffer):
11743         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11744         (re_string_reconstruct, re_string_peek_byte_case):
11745         (re_string_fetch_byte_case, re_string_context_at):
11746         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11747         (re_node_set_init_copy, re_node_set_add_intersect):
11748         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11749         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11750         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11751         (re_acquire_state, re_acquire_state_context, register_state):
11752         Likewise.
11753         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11754         search_cur_bkref_entry):
11755         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11756         (re_search_internal, re_search_2_stub, re_search_stub)
11757         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11758         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11759         (update_cur_sifted_state, check_dst_limits):
11760         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11761         (check_subexp_limits, sift_states_bkref, merge_state_array):
11762         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11763         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11764         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11765         (expand_bkref_cache, check_node_accept_bytes):
11766         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11767         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11768         (acquire_init_state_context, check_halt_node_context):
11769         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11770         (sift_states_backward, clean_state_log_if_needed):
11771         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11772         (find_recover_state, transit_state_sb, transit_state_mb):
11773         (transit_state_bkref, build_trtable, match_ctx_clean):
11774         Likewise.
11775         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11776         to work around an assumption that REG_MISSING is negative.
11777
11778         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11779         (seek_collating_symbol_entry) [defined _LIBC]:
11780         (lookup_collation_sequence_value) [defined _LIBC]:
11781         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11782         Use prototypes rather than old-style function definitions.
11783         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11784         (transit_state_sb) [0]:
11785         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11786
11787         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11788         rm_eo.
11789
11790         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11791         (optimize_subexps, lower_subexp):
11792         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11793         since the signed shift might overflow.  Use 1u<<31 instead.
11794         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11795         Likewise.
11796         * lib/regexec.c (check_dst_limits_calc_pos_1,
11797         check_subexp_matching_top): Likewise.
11798
11799         * lib/regcomp.c (optimize_subexps, lower_subexp):
11800         Use CHAR_BIT rather than 8, for clarity.
11801         * lib/regexec.c (check_dst_limits_calc_pos_1):
11802         (check_subexp_matching_top): Likewise.
11803         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11804         have to worry about portability issues when shifting it left.
11805         Remove no-longer-needed test for table_size > 0.
11806         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11807         in a word, as the resulting behavior is undefined.
11808         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11809         in one case, a <= should have been an <, and in another case the
11810         whole test was missing.
11811         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11812         the standard name CHAR_BIT.
11813         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11814         this is not true on one's complement and signed-magnitude hosts.
11815
11816         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11817         next_last_offset.
11818         (struct re_dfa_t): Remove unused member states_alloc.
11819         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11820
11821 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11822
11823         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11824         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11825         and large-file glibc and in 32-bit large-file Solaris.
11826
11827 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11828
11829         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11830         lengths fit in regoff_t; this isn't true if regoff_t is the same
11831         width as size_t.
11832         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11833         (= START + RANGE) instead of RANGE.  This avoids overflow
11834         problems when regoff_t is the same width as size_t.
11835         All callers changed.
11836         (re_search_2_stub): Check for overflow when adding the
11837         sizes of the two strings.
11838         (re_search_stub): Check for overflow when adding START
11839         to RANGE; if it occurs, substitute the extreme value.
11840
11841 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11842
11843         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11844
11845 2005-08-31  Jim Meyering  <jim@meyering.net>
11846
11847         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11848         a pointer-to-const.
11849         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11850         (register_state): Likewise.
11851         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11852         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11853         (group_nodes_into_DFAstates): Likewise.
11854
11855 2005-08-31  Jim Meyering  <jim@meyering.net>
11856
11857         * check-module: Add a FIXME comment.
11858
11859 2005-08-31  Eric Blake  <ebb9@byu.net>
11860
11861         * modules/unistd-safer (Files): Add unistd--.h.
11862         * modules/stdio-safer (Files): Add stdio--.h.
11863
11864 2005-08-31  Derek Price  <derek@ximbiot.com>
11865
11866         * lib/getdelim.c (getdelim): Return EOF on EOF.
11867         Reported by Larry Jones <lawrence.jones@ugs.com>.
11868
11869 2005-08-31  Bruno Haible  <bruno@clisp.org>
11870
11871         Avoid unnecessary diffs in the generated lib/Makefile.am.
11872         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11873         the generated files.
11874         (func_import): Don't set cmd.
11875
11876 2005-08-31  Bruno Haible  <bruno@clisp.org>
11877
11878         * lib/strstr.c: Include <stddef.h>, for NULL.
11879         * lib/strcasestr.c: Likewise.
11880         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11881
11882 2005-08-31  Bruno Haible  <bruno@clisp.org>
11883
11884         * gnulib-tool: New option --macro-prefix.
11885         (func_import): Use macro_prefix.
11886         (import): Handle option --macro-prefix.
11887
11888 2005-08-31  Bruno Haible  <bruno@clisp.org>
11889
11890         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11891         Also use new variables cached_lgpl, cached_libtool.
11892
11893 2005-08-31  Bruno Haible  <bruno@clisp.org>
11894
11895         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11896         always instantiating them.
11897
11898 2005-08-31  Bruno Haible  <bruno@clisp.org>
11899
11900         * gnulib-tool (func_import): Read the previous cached settings
11901         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11902         earlier added by gnulib but are now dropped. Warn when a gnulib file
11903         overwrites a non-gnulib file.
11904
11905 2005-08-31  Bruno Haible  <bruno@clisp.org>
11906
11907         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11908         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11909         projects that don't keep autogenerated files in CVS. Put into
11910         actioncmd only the specified modules, not the transitive closure.
11911
11912 2005-08-31  Bruno Haible  <bruno@clisp.org>
11913
11914         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11915         Create directories that shall be filled.
11916         (import): Don't look for gl_* macros in configure.ac. Recurse across
11917         all directories containing a gnulib-cache.m4 files, if meaningful.
11918
11919 2005-08-31  Bruno Haible  <bruno@clisp.org>
11920
11921         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11922         (import): Set seen_libtool when we see gl_LIBTOOL.
11923
11924 2005-08-31  Bruno Haible  <bruno@clisp.org>
11925
11926         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11927         declaration macro definitions from generated gnulib.m4.
11928
11929 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11930
11931         * lib/iconvme.h: Add prototype for iconv_alloc.
11932
11933 2005-08-29  Simon Josefsson  <jas@extundo.com>
11934
11935         * lib/iconvme.c: Fix errno.
11936
11937 2005-08-29  Bruno Haible  <bruno@clisp.org>
11938
11939         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11940         that it works when the directory contains spaces.
11941
11942 2005-08-29  Bruno Haible  <bruno@clisp.org>
11943
11944         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11945
11946 2005-08-29  Bruno Haible  <bruno@clisp.org>
11947
11948         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11949         Emit more advice.
11950
11951 2005-08-29  Bruno Haible  <bruno@clisp.org>
11952         and Stepan Kasal  <kasal@ucw.cz>
11953
11954         * check-module: If more parameters are given, check each of them
11955         separately; add more exceptions, as noted by Jim Meyering.
11956         (check_module): New procedure.
11957         (%exempt_header): Now contains all exceptions.
11958
11959 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11960
11961         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11962
11963 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11964
11965         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11966
11967 2005-08-28  Bruno Haible  <bruno@clisp.org>
11968
11969         * m4/gnulib-tool.m4: New file.
11970
11971 2005-08-27  Jim Meyering  <jim@meyering.net>
11972
11973         * modules/unistd-safer (Files): Add pipe-safer.c.
11974         * modules/fcntl-safer (Files): Add creat-safer.c.
11975
11976 2005-08-27  Jim Meyering  <jim@meyering.net>
11977
11978         * m4/stdlib-safer.m4: New file.  From coreutils.
11979         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
11980         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
11981         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
11982         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
11983         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
11984
11985 2005-08-27  Jim Meyering  <jim@meyering.net>
11986
11987         * lib/fopen-safer.c: Merge minor changes from coreutils.
11988         * lib/dup-safer.c: Likewise.
11989         * lib/fd-safer.c: Likewise.
11990
11991         Merge from coreutils.
11992         * lib/stdio--.h: New file.
11993         * lib/stdlib--.h: New file.
11994         * lib/mkstemp-safer.c: New file.
11995
11996         GNU tar needs these.
11997         * lib/pipe-safer.c: New file.
11998         * lib/creat-safer.c: New file.
11999         * lib/fcntl--.h (creat): Define to creat_safer.
12000         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12001         * lib/unistd--.h (pipe): Define to pipe_safer.
12002         * lib/unistd-safer.h: Declare pipe_safer.
12003
12004 2005-08-26  Simon Josefsson  <jas@extundo.com>
12005
12006         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12007         Haible <bruno@clisp.org>.
12008
12009 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12010
12011         * lib/regex_internal.h: Remove all references to
12012         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12013         or better.
12014         (bitset_not, bitset_merge, bitset_not_merge):
12015         (bitset_mask, re_string_allocate, re_string_construct):
12016         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12017         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12018         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12019         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12020         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12021         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12022         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12023         (re_acquire_state_context):
12024         Remove unnecessary forward decls.
12025         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12026         Put __attribute at function definition,
12027         now that the function decl has been removed.
12028         * lib/regex_internal.c (re_string_peek_byte_case):
12029         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12030         Likewise.
12031
12032 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12033
12034         * m4/regex.m4: Add AC_PREREQ(2.50).
12035         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12036
12037 2005-08-25  Simon Josefsson  <jas@extundo.com>
12038
12039         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12040         __fsetlocking.
12041
12042 2005-08-25  Simon Josefsson  <jas@extundo.com>
12043
12044         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12045         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12046         GLIBC specific code.
12047
12048 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12049
12050         Make regex safe for g++.  This fixes one real bug (an "err"
12051         that should have been "*err").  g++ problem reported by
12052         Sam Steingold.
12053         * lib/regex_internal.h (re_calloc): New macro, consistent with
12054         re_malloc etc.  All callers of calloc changed to use re_calloc.
12055         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12056         not int.  All callers changed.
12057         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12058         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12059         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12060         (find_recover_state): Change "err" to "*err"; this fixes what
12061         appears to be a real bug.
12062         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12063         versus int.
12064
12065 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12066
12067         * modules/regex (Depends-on): Add malloc, since the code
12068         assumes that !malloc(0) means failure.
12069
12070 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12071
12072         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12073
12074         alloca modernization/simplification for regex.
12075         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12076         needs to be at the start of the file, and can be moved into
12077         regex_internal.h and simplified.
12078         * lib/regex_internal.h: Include <alloca.h>.
12079         (__libc_use_alloca) [!defined _LIBC]: New macro.
12080         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12081         now works outside glibc.
12082
12083 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12084
12085         * config/srclist.txt: Add glibc bugs 1241, 1245.
12086
12087 2005-08-25  Jim Meyering  <jim@meyering.net>
12088
12089         * lib/open-safer.c: Include <config.h>.
12090         Otherwise, we'd lose LARGEFILE support in any file using
12091         e.g. "fcntl--.h"
12092
12093 2005-08-25  Bruno Haible  <bruno@clisp.org>
12094
12095         * m4/minmax.m4: Require autoconf 2.52.
12096         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12097         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12098         alternatives of translit over the alphabet.
12099         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12100
12101 2005-08-24  Simon Josefsson  <jas@extundo.com>
12102
12103         * tests/test-getpass.c: New file.
12104
12105 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12106
12107         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12108         for GNU regex features.
12109
12110 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12111
12112         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12113         * lib/regex.h (regerror): Likewise.
12114
12115         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12116         requires this.  (The code never needed it.)
12117
12118         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12119         All uses of recently-renamed identifiers changed to use the new,
12120         POSIX-compliant names.  The code will build and run just fine
12121         without these changes, but it's better to eat our own dog food
12122         and use the standard-conforming names.
12123
12124         * lib/regex.h: Fix a multitude of POSIX name space violations.
12125         These changes have an effect only for programs that define
12126         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12127         do not change anything for programs compiled in the normal way.
12128         Also, there is no effect on the ABI.
12129
12130         (_REGEX_SOURCE): New macro.
12131         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12132         defined and _GNU_SOURCE is not; this fixes a name space violation.
12133
12134         Rename the following macros to obey POSIX requirements.
12135         The old names are still visible as macros if _REGEX_SOURCE is defined.
12136         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12137         RE_BACKSLASH_ESCAPE_IN_LISTS.
12138         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12139         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12140         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12141         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12142         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12143         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12144         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12145         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12146         (REG_INTERVALS): renamed from RE_INTERVALS.
12147         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12148         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12149         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12150         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12151         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12152         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12153         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12154         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12155         RE_UNMATCHED_RIGHT_PAREN_ORD.
12156         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12157         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12158         (REG_DEBUG): renamed from RE_DEBUG.
12159         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12160         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12161         unusual, since we can't clash with the POSIX REG_ICASE.
12162         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12163         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12164         (REG_NO_SUB): renamed from RE_NO_SUB.
12165         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12166         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12167         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12168         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12169         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12170         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12171         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12172         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12173         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12174         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12175         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12176         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12177         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12178         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12179         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12180         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12181         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12182         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12183         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12184         (REG_FIXED): Renamed from REGS_FIXED.
12185         (REG_NREGS): Renamed from RE_NREGS.
12186
12187         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12188         of other REG_* macros, since POSIX says the user is allowed to
12189         #undef these macros selectively.
12190
12191         (reg_errcode_t): Update comment stating what other tables need
12192         to be consistent.
12193
12194         Rename the following enum values to obey POSIX requirements.
12195         The old names are still visible as macros.
12196         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12197         is not defined, since GNU is supposed to be a superset of POSIX as
12198         much as possible, and since we want reg_errcode_t to be a signed
12199         type for implementation consistency.
12200         (_REG_NOERROR): Renamed from REG_NOERROR.
12201         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12202         (_REG_BADPAT): Renamed from REG_BADPAT.
12203         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12204         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12205         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12206         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12207         (_REG_EBRACK): Renamed from REG_EBRACK.
12208         (_REG_EPAREN): Renamed from REG_EPAREN.
12209         (_REG_EBRACE): Renamed from REG_EBRACE.
12210         (_REG_BADBR): Renamed from REG_BADBR.
12211         (_REG_ERANGE): Renamed from REG_ERANGE.
12212         (_REG_ESPACE): Renamed from REG_ESPACE.
12213         (_REG_BADRPT): Renamed from REG_BADRPT.
12214         (_REG_EEND): Renamed from REG_EEND.
12215         (_REG_ESIZE): Renamed from REG_ESIZE.
12216         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12217         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12218         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12219         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12220         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12221
12222         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12223         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12224         changed.  But support the old name if the new one is not defined
12225         and if _REGEX_SOURCE.
12226
12227         Change the following member names in struct re_pattern_buffer.
12228         The old names are still supported if !_REGEX_SOURCE.
12229         The new names are always supported, regardless of _REGEX_SOURCE.
12230         (re_buffer): Renamed from buffer.
12231         (re_allocated): Renamed from allocated.
12232         (re_used): Renamed from used.
12233         (re_syntax): Renamed from syntax.
12234         (re_fastmap): Renamed from fastmap.
12235         (re_translate): Renamed from translate.
12236         (re_can_be_null): Renamed from can_be_null.
12237         (re_regs_allocated): Renamed from regs_allocated.
12238         (re_fastmap_accurate): Renamed from fastmap_accurate.
12239         (re_no_sub): Renamed from no_sub.
12240         (re_not_bol): Renamed from not_bol.
12241         (re_not_eol): Renamed from not_eol.
12242         (re_newline_anchor): Renamed from newline_anchor.
12243
12244         Change the following member names in struct re_registers.
12245         The old names are still supported if !_REGEX_SOURCE.
12246         The new names are always supported, regardless of _REGEX_SOURCE.
12247         (rm_num_regs): Renamed from num_regs.
12248         (rm_start): Renamed from start.
12249         (rm_end): Renamed from end.
12250
12251         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12252         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12253         Prepend __ to parameter names.
12254
12255         Undo yesterday's changes.
12256
12257 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12258
12259         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12260         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12261         lib/regex.c.
12262
12263 2005-08-24  Jim Meyering  <jim@meyering.net>
12264
12265         Sync from coreutils.
12266         * m4/fcntl-safer.m4: New file.
12267
12268         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12269         and object files for this module.
12270
12271 2005-08-24  Jim Meyering  <jim@meyering.net>
12272
12273         Sync from coreutils.
12274         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12275
12276 2005-08-24  Jim Meyering  <jim@meyering.net>
12277
12278         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12279         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12280
12281 2005-08-24  Jim Meyering  <jim@meyering.net>
12282
12283         * modules/fcntl-safer: New module.
12284         * modules/fts (Depends-on): Add fcntl-safer.
12285         * MODULES.html.sh (File descriptor based Input/Output):
12286         Add fcntl-safer.
12287
12288 2005-08-24  Bruno Haible  <bruno@clisp.org>
12289
12290         Support for unit test modules.
12291         * modules/README: Mention tests modules.
12292         * modules/TEMPLATE-TESTS: New file.
12293         * gnulib-tool: New options --extract-tests-module, --with-tests and
12294         --tests-base (unused for the moment).
12295         (testsbase, inctests): New variables.
12296         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12297         (func_verify_module): Exclude TEMPLATE-TESTS.
12298         (func_verify_nontests_module, func_verify_tests_module): New functions.
12299         (func_get_dependencies): Add implicit dependency for tests modules.
12300         (func_get_tests_module): New function.
12301         (func_modules_transitive_closure): When --with-tests was specified,
12302         include the unit tests as well, unless explicitly avoided.
12303         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12304         (func_emit_tests_Makefile_am): New function.
12305         (func_create_testdir): When --with-tests was specified, emit a
12306         tests/ directory.
12307         * MODULES.html.sh (Future developments): Update.
12308
12309 2005-08-24  Bruno Haible  <bruno@clisp.org>
12310
12311         * modules/tls-tests: New file.
12312         * tests/test-tls.c: New file, from GNU gettext.
12313
12314 2005-08-24  Bruno Haible  <bruno@clisp.org>
12315
12316         * modules/lock-tests: New file.
12317         * tests/test-lock.c: New file, from GNU gettext.
12318
12319 2005-08-24  Bruno Haible  <bruno@clisp.org>
12320
12321         * lib/lock.h: Add multiple inclusion guard.
12322         * lib/tls.h: Add multiple inclusion guard.
12323
12324 2005-08-24  Bruno Haible  <bruno@clisp.org>
12325
12326         * gnulib-tool: Add support for the --aux-dir option to
12327         --create-testdir, --create-megatestdir, --test, --megatest.
12328         (func_create_testdir, func_create_megatestdir): Optionally emit a
12329         AC_CONFIG_AUX_DIR directive.
12330         (create-testdir, create-megatestdir, test, megatest): Provide a
12331         default value for $auxdir.
12332
12333 2005-08-24  Bruno Haible  <bruno@clisp.org>
12334
12335         * gnulib-tool (import): Use compound statement instead of subshell
12336         where possible.
12337
12338 2005-08-24  Bruno Haible  <bruno@clisp.org>
12339
12340         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12341
12342 2005-08-24  Bruno Haible  <bruno@clisp.org>
12343
12344         * gnulib-tool (func_version): Update.
12345
12346 2005-08-24  Bruno Haible  <bruno@clisp.org>
12347
12348         * gnulib-tool (func_import, func_create_testdir,
12349         func_create_megatestdir): Quote all autoconf macro arguments.
12350
12351 2005-08-24  Bruno Haible  <bruno@clisp.org>
12352
12353         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12354         option --force, because --force causes the aclocal.m4 of each
12355         subdirectory to be newer than the corresponding config.h.in.
12356
12357 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12358
12359         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12360         All contents moved to gl_REGEX.
12361         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12362         assume that it does.
12363
12364 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12365
12366         * lib/regex.h (REG_NOSYS)
12367         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12368         Define, since POSIX requires it as of 2001.
12369         (_REG_ENOSYS)
12370         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12371         New private symbol, used to keep the enum signed in all cases.
12372         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12373         Youngman in
12374         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12375
12376         * lib/regex_internal.c (re_string_skip_chars, register_state):
12377         (calc_state_hash):
12378         Remove forward decls; no longer needed now that we use prototypes.
12379         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12380         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12381         (clean_state_log_if_needed): Likewise.
12382
12383 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12384
12385         * config/srclist.txt: Add glibc bugs 1231-1233.
12386
12387 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12388
12389         Fix problems reported by Sam Steingold in
12390         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12391         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12392         assumed that reg_errcode_t is a signed type, which is not
12393         necessarily true if _XOPEN_SOURCE is not defined.
12394         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12395         since some compilers warn about it otherwise.
12396
12397 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12398
12399         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12400         (init_word_char, create_initial_state, duplicate_node_closure):
12401         (fetch_token, peek_token_bracket, build_range_exp):
12402         (build_collating_symbol): Remove forward decls; no longer needed
12403         now that we use prototypes.
12404
12405         * lib/regcomp.c:
12406         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12407         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12408         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12409         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12410         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12411         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12412         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12413         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12414         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12415         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12416         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12417         (build_charclass, build_charclass_op, fetch_number, create_tree):
12418         (create_token_tree, mark_opt_subexp, duplicate_tree):
12419         Use prototypes rather than old-style definitions.
12420
12421         * lib/regex_internal.c:
12422         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12423         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12424         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12425         (re_string_reconstruct, re_string_peek_byte_case):
12426         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12427         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12428         (re_node_set_init_copy, re_node_set_add_intersect):
12429         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12430         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12431         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12432         (re_acquire_state, re_acquire_state_context, register_state):
12433         (create_ci_newstate, create_cd_newstate, free_state):
12434         Likewise.
12435         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12436         re_search_2):
12437         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12438         (re_search_internal, prune_impossible_nodes):
12439         (acquire_init_state_context, check_matching, static):
12440         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12441         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12442         (update_regs, sift_states_backward, build_sifted_states):
12443         (clean_state_log_if_needed, merge_state_array):
12444         (update_cur_sifted_state, add_epsilon_src_nodes):
12445         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12446         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12447         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12448         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12449         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12450         (check_arrival, check_arrival_add_next_nodes):
12451         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12452         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12453         (check_node_accept_bytes, check_node_accept, extend_buffers):
12454         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12455         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12456         (sift_ctx_init):
12457         Likewise.
12458
12459         * lib/regex_internal.h:
12460         (re_string_allocate, re_string_construct, re_string_reconstruct):
12461         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12462         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12463         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12464         (re_string_context_at, re_string_peek_byte_case):
12465         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12466         is defined, since we now use prototypes always.
12467
12468         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12469         C89 or better.  All uses removed.
12470
12471 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12472
12473         * config/srclist.txt: Add glibc bugs 1220-1227.
12474
12475 2005-08-20  Jim Meyering  <jim@meyering.net>
12476
12477         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12478         of unused local, dfa.
12479
12480 2005-08-20  Bruno Haible  <bruno@clisp.org>
12481
12482         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12483
12484 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12485
12486         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12487         (re_node_set_insert_last, re_dfa_add_node):
12488         Rename local variables to avoid GCC shadowing warnings.
12489
12490 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12491
12492         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12493         [defined lint]: Suppress bogus uninitialized-variable warnings.
12494
12495         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12496         and let the caller return REG_ESPACE if out of space.  This
12497         removes an uninitialied-variable warning with GCC 4.0.1, and also
12498         avoids taking the address of a local variable.  All callers
12499         changed.
12500
12501 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12502
12503         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12504         $LIBCSRC/posix/regexec.c.
12505         Add glibc bug 1217 for regcomp.c.
12506
12507 2005-08-19  Jim Meyering  <jim@meyering.net>
12508
12509         * lib/regexec.c (proceed_next_node): Redo local variables to
12510         avoid GCC shadowing warnings.
12511
12512 2005-08-18  Bruno Haible  <bruno@clisp.org>
12513
12514         * lib/strstr.c (strstr): Fix return value in multibyte case.
12515         * lib/strcasestr.c (strcasestr): Likewise.
12516
12517 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12518
12519         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12520
12521 2005-08-17  Jim Meyering  <jim@meyering.net>
12522
12523         Make the %s format (seconds since the epoch) work for a negative
12524         number and when used with a zero-padded field width, e.g. %015s.
12525
12526         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12527         label so that it precedes the code to set `digits'.  Otherwise,
12528         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12529         print `00-22'.  Now, it prints `-0022', as it should.
12530
12531 2005-08-17  Bruno Haible  <bruno@clisp.org>
12532
12533         * modules/strstr (Files): Add m4/mbrtowc.m4.
12534         (Depends-on): Add mbuiter.
12535
12536 2005-08-17  Bruno Haible  <bruno@clisp.org>
12537
12538         * modules/strcasestr: New file.
12539         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12540         strcasestr.
12541
12542 2005-08-17  Bruno Haible  <bruno@clisp.org>
12543
12544         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12545
12546 2005-08-17  Bruno Haible  <bruno@clisp.org>
12547
12548         * modules/mbuiter: New file.
12549         * MODULES.html.sh (Extended multibyte and wide character utilities):
12550         Add mbuiter.
12551
12552 2005-08-17  Bruno Haible  <bruno@clisp.org>
12553
12554         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12555         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12556
12557 2005-08-17  Bruno Haible  <bruno@clisp.org>
12558
12559         * m4/strcasestr.m4: New file.
12560
12561 2005-08-17  Bruno Haible  <bruno@clisp.org>
12562
12563         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12564         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12565
12566 2005-08-17  Bruno Haible  <bruno@clisp.org>
12567
12568         * lib/strcasestr.h: New file.
12569         * lib/strcasestr.c: New file.
12570
12571 2005-08-17  Bruno Haible  <bruno@clisp.org>
12572
12573         * lib/strcasecmp.c: Use mbuiter.h.
12574
12575 2005-08-17  Bruno Haible  <bruno@clisp.org>
12576
12577         * lib/mbuiter.h: New file.
12578
12579 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12580
12581         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12582         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12583         and gl_GETOPT are both invoked via different paths (as happens
12584         with GNU tar CVS because it uses both argp and getopt), the former
12585         wins.
12586
12587 2005-08-16  Bruno Haible  <bruno@clisp.org>
12588
12589         * modules/tls: New file.
12590         * MODULES.html.sh (Multithreading): Add tls.
12591
12592 2005-08-16  Bruno Haible  <bruno@clisp.org>
12593
12594         * modules/strnlen1: New file.
12595         * MODULES.html.sh (String handling): Add strnlen1.
12596
12597 2005-08-16  Bruno Haible  <bruno@clisp.org>
12598
12599         * modules/strcase (Files): Add m4/mbrtowc.m4.
12600         (Depends-on): Add strnlen1, mbchar.
12601
12602 2005-08-16  Bruno Haible  <bruno@clisp.org>
12603
12604         * modules/mbiter: New file.
12605         * MODULES.html.sh (Extended multibyte and wide character utilities):
12606         Add mbiter.
12607
12608 2005-08-16  Bruno Haible  <bruno@clisp.org>
12609
12610         * modules/mbfile: New file.
12611         * MODULES.html.sh (Extended multibyte and wide character utilities):
12612         Add mbfile.
12613
12614 2005-08-16  Bruno Haible  <bruno@clisp.org>
12615
12616         * modules/mbchar: New file.
12617         * MODULES.html.sh (Extended multibyte and wide character utilities):
12618         New section.
12619
12620 2005-08-16  Bruno Haible  <bruno@clisp.org>
12621
12622         * m4/tls.m4: New file, from GNU gettext.
12623
12624 2005-08-16  Bruno Haible  <bruno@clisp.org>
12625
12626         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12627         always.
12628         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12629
12630 2005-08-16  Bruno Haible  <bruno@clisp.org>
12631
12632         * m4/mbiter.m4: New file.
12633
12634 2005-08-16  Bruno Haible  <bruno@clisp.org>
12635
12636         * m4/mbfile.m4: New file.
12637
12638 2005-08-16  Bruno Haible  <bruno@clisp.org>
12639
12640         * m4/mbchar.m4: New file.
12641
12642 2005-08-16  Bruno Haible  <bruno@clisp.org>
12643
12644         * lib/tls.h: New file, from GNU gettext.
12645         * lib/tls.c: New file, from GNU gettext.
12646
12647 2005-08-16  Bruno Haible  <bruno@clisp.org>
12648
12649         * lib/strnlen1.h: New file.
12650         * lib/strnlen1.c: New file.
12651
12652 2005-08-16  Bruno Haible  <bruno@clisp.org>
12653
12654         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12655         (mbi_init): Update.
12656         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12657         NUL byte, not after it.
12658
12659 2005-08-16  Bruno Haible  <bruno@clisp.org>
12660
12661         * lib/strcase.h (strcasecmp): Add note in comments.
12662         * lib/strncasecmp.c: Use code from strcasecmp.c.
12663         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12664         (strcasecmp): Work correctly in multibyte locales.
12665
12666 2005-08-16  Bruno Haible  <bruno@clisp.org>
12667
12668         * lib/mbiter.h: New file.
12669
12670 2005-08-16  Bruno Haible  <bruno@clisp.org>
12671
12672         * lib/mbfile.h: New file.
12673
12674 2005-08-16  Bruno Haible  <bruno@clisp.org>
12675
12676         * lib/mbchar.h: New file.
12677         * lib/mbchar.c: New file.
12678
12679 2005-08-16  Bruno Haible  <bruno@clisp.org>
12680
12681         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12682         the valid ones. Makes the comparison operations transitive:
12683         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12684         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12685
12686 2005-08-15  Simon Josefsson  <jas@extundo.com>
12687
12688         * modules/ssize_t (License): Change to 'unlimited'.
12689
12690         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12691
12692 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12693
12694         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12695         Add comments for each pending glibc patch.
12696
12697 2005-08-15  Bruno Haible  <bruno@clisp.org>
12698
12699         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12700         __cplusplus is defined.
12701
12702 2005-08-14  Jim Meyering  <jim@meyering.net>
12703
12704         Sync from coreutils.
12705
12706         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12707         Use the hash-table-based cycle-detection code not just when
12708         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12709         Reported by James Youngman in
12710         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12711         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12712         FTS_TIGHT_CYCLE_CHECK.
12713         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12714         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12715         once again.
12716         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12717         * lib/fts.c (fd_safer): Remove decl.
12718         Include fcntl--.h rather than unistd-safer.h
12719         (fts_safe_changedir): Don't call fd_safer; no longer needed
12720         now that we include fcntl--.h.
12721
12722 2005-08-12  Simon Josefsson  <jas@extundo.com>
12723
12724         * modules/getndelim2: Use ssize_t module.
12725         * modules/getnline: Likewise.
12726         * modules/safe-read: Likewise.
12727         * modules/xreadlink: Likewise.
12728
12729         * modules/ssize_t: New file.
12730
12731 2005-08-12  Simon Josefsson  <jas@extundo.com>
12732
12733         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12734
12735 2005-08-12  Simon Josefsson  <jas@extundo.com>
12736
12737         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12738         ssize_t.
12739
12740 2005-08-12  Simon Josefsson  <jas@extundo.com>
12741
12742         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12743         readline, getdelim and check_version.
12744         (Support for systems lacking ISO C 99: Sizes of integer types):
12745         Add size_max.
12746
12747 2005-08-12  Bruno Haible  <bruno@clisp.org>
12748
12749         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12750
12751 2005-08-11  Simon Josefsson  <jas@extundo.com>
12752
12753         * modules/readline: New file.
12754
12755         * modules/strnlen (Files): Add strnlen.h.
12756
12757 2005-08-11  Simon Josefsson  <jas@extundo.com>
12758
12759         * m4/readline.m4: New file.
12760
12761 2005-08-11  Simon Josefsson  <jas@extundo.com>
12762
12763         * lib/readline.h, readline.c: New file.
12764
12765 2005-08-11  Simon Josefsson  <jas@extundo.com>
12766
12767         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12768         gl_AVOID.
12769
12770 2005-08-11  Bruno Haible  <bruno@clisp.org>
12771
12772         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12773
12774 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12775
12776         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12777
12778 2005-08-10  Simon Josefsson  <jas@extundo.com>
12779
12780         * tests/test-iconvme.c: New file.
12781
12782 2005-08-10  Simon Josefsson  <jas@extundo.com>
12783
12784         * m4/strnlen.m4: New file.
12785
12786         * m4/strndup.m4: Don't check for strnlen declaration, done in
12787         strnlen.m4.
12788
12789 2005-08-10  Simon Josefsson  <jas@extundo.com>
12790
12791         * lib/strndup.c: Use strnlen.h.
12792
12793         * lib/strnlen.h: New file.
12794
12795 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12796
12797         * README: Typos.
12798
12799 2005-08-02  Simon Josefsson  <jas@extundo.com>
12800
12801         * modules/readline: New file.
12802
12803 2005-08-02  Simon Josefsson  <jas@extundo.com>
12804
12805         * modules/getdelim: New file.
12806
12807         * modules/getline: Rewrite, don't use getndelim2.
12808
12809 2005-08-02  Simon Josefsson  <jas@extundo.com>
12810
12811         * m4/getline.m4: Separate out getdelim stuff into separate module.
12812
12813         * m4/getdelim.m4: New file.
12814
12815 2005-08-02  Simon Josefsson  <jas@extundo.com>
12816
12817         * lib/getline.h, getline.c: Rewrite.
12818
12819         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12820
12821 2005-07-31  Bruno Haible  <bruno@clisp.org>
12822
12823         * lib/lock.h (gl_lock_initializer): New macro.
12824         (gl_lock_define_initialized): Use it.
12825         (gl_rwlock_initializer): New macro.
12826         (gl_rwlock_define_initialized): Use it.
12827         (gl_recursive_lock_initializer): New macro.
12828         (gl_recursive_lock_define_initialized): Use it.
12829
12830 2005-07-30  Karl Berry  <karl@gnu.org>
12831
12832         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12833         Report from Ben Pfaff, regarding getopt.
12834
12835 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12836
12837         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12838         normal way.
12839         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12840         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12841         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12842         (gl_GETOPT): Use the new macros.  Most of the implementation
12843         is moved to the new macros.  This is for programs like Emacs
12844         that don't want all the functionality of gl_GETOPT.
12845
12846 2005-07-26  Bruno Haible  <bruno@clisp.org>
12847
12848         * m4/lock.m4: Update from GNU gettext.
12849
12850 2005-07-26  Bruno Haible  <bruno@clisp.org>
12851
12852         * lib/lock.h: Update from GNU gettext.
12853         * lib/lock.c: Update from GNU gettext.
12854
12855 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12856
12857         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12858         obsolescent AC_TRY_RUN.  Include the default includes files, for
12859         'exit'.
12860
12861 2005-07-24  Bruno Haible  <bruno@clisp.org>
12862
12863         * modules/visibility: New file.
12864         * MODULES.html.sh (Misc): Add visibility.
12865
12866 2005-07-24  Bruno Haible  <bruno@clisp.org>
12867
12868         * m4/visibility.m4: New file.
12869
12870 2005-07-24  Bruno Haible  <bruno@clisp.org>
12871
12872         * doc/visibility.texi: New file.
12873
12874 2005-07-22  Bruno Haible  <bruno@clisp.org>
12875
12876         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12877         $(ALLOCA_H), redundant through BUILT_SOURCES.
12878         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12879         redundant through BUILT_SOURCES.
12880         * modules/byteswap (Makefile.am): Remove explicit dependency on
12881         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12882         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12883         $(FNMATCH_H), redundant through BUILT_SOURCES.
12884         * modules/getopt (Makefile.am): Remove explicit dependency on
12885         $(GETOPT_H), redundant through BUILT_SOURCES.
12886         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12887         redundant through BUILT_SOURCES.
12888         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12889         redundant through BUILT_SOURCES.
12890         * modules/stdbool (Makefile.am): Remove explicit dependency on
12891         $(STDBOOL_H), redundant through BUILT_SOURCES.
12892         * modules/stdint (Makefile.am): Remove explicit dependency on
12893         $(STDINT_H), redundant through BUILT_SOURCES.
12894         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12895         Remove explicit dependency on $(SYSEXITS_H).
12896         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12897
12898 2005-07-18  Simon Josefsson  <jas@extundo.com>
12899
12900         * lib/check-version.c (check_version): Accept identical versions too.
12901
12902 2005-07-18  Bruno Haible  <bruno@clisp.org>
12903
12904         * modules/lock: New file.
12905         * MODULES.html.sh (Multithreading): New section.
12906
12907 2005-07-18  Bruno Haible  <bruno@clisp.org>
12908
12909         * m4/lock.m4: New file, from GNU gettext.
12910
12911 2005-07-18  Bruno Haible  <bruno@clisp.org>
12912
12913         * lib/lock.h: New file, from GNU gettext.
12914         * lib/lock.c: New file, from GNU gettext.
12915
12916 2005-07-18  Bruno Haible  <bruno@clisp.org>
12917
12918         * lib/lock.h (gl_once_t): New type.
12919         (gl_once_define, gl_once): New macros.
12920         * lib/lock.c (fresh_once): New variable.
12921         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12922         functions.
12923
12924 2005-07-16  Simon Josefsson  <jas@extundo.com>
12925
12926         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12927         workaround, suggested by Bruno.
12928
12929 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12930
12931         * modules/xalloc (Depends-on): Add xalloc-die.
12932         * modules/xvasprintf (Depends-on): Add xalloc-die.
12933
12934 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12935
12936         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12937         with a minor change.
12938
12939 2005-07-15  Bruno Haible  <bruno@clisp.org>
12940
12941         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12942         When using lib/poll.c, define poll as rpl_poll.
12943
12944 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12945
12946         * modules/argp (Depends-on): Remove unlocked-io.
12947
12948 2005-07-14  Derek Price  <derek@ximbiot.com>
12949
12950         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12951         for glob symlink bug.
12952
12953 2005-07-14  Bruno Haible  <bruno@clisp.org>
12954
12955         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12956         Instead, test for *_unlocked function declarations directly.
12957
12958 2005-07-11  Simon Josefsson  <jas@extundo.com>
12959
12960         * modules/size_max: New file.
12961
12962         * modules/xsize: Depend on size_max module for size_max.m4.
12963
12964 2005-07-11  Simon Josefsson  <jas@extundo.com>
12965
12966         * lib/size_max.h: New file.
12967
12968 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12969
12970         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12971         copyright symbol and the year.
12972         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
12973         (version_etc_va): Use parameterized copyright notice.
12974         Reword to conform to the current GNU coding standards.
12975
12976 2005-07-11  Karl Berry  <karl@gnu.org>
12977
12978         * doc/gnulib.texi (Quoting): new node.
12979         (Initial import): more info, from Patrice.
12980
12981 2005-07-11  Bruno Haible  <bruno@clisp.org>
12982
12983         * gnulib-tool (func_usage): Document option --avoid.
12984         (Command line options): Handle --avoid.
12985         (func_acceptable): New function.
12986         (func_modules_transitive_closure): Use it.
12987
12988 2005-07-11  Bruno Haible  <bruno@clisp.org>
12989
12990         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
12991         Reported by Jim Meyering.
12992
12993 2005-07-10  Bruno Haible  <bruno@clisp.org>
12994
12995         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
12996         Needed when size_t is smaller than 'unsigned int'.
12997         Reported by Paul Eggert.
12998
12999 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13000
13001         * modules/argp (Depends-on): Add unlocked-io
13002
13003 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13004
13005         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13006         block of defines.
13007
13008 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13011         fix now.
13012
13013 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13014         and Paul Eggert  <eggert@cs.ucla.edu>
13015
13016         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13017         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13018
13019 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13020
13021         * modules/regex (Files): Add lib/regex_internal.c,
13022         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13023         (Depends-on): Add extensions.
13024         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13025
13026 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13027
13028         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13029         pathconf.
13030         * m4/same.m4 (gl_SAME): Likewise.
13031         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13032
13033         * m4/regex.m4: Adjust to new libc regex implementation.
13034         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13035         all the .c and .h parts of (the new) regex.
13036         Quote the m4 stuff better.
13037         Check for RE_ICASE bug of old gnulib.
13038         Check for REG_STARTEND of recent libc.
13039         Rename local variables from jm_* to gl_*.
13040         Quote operand of "test -f".
13041         Say "recent enough" version of libc, not "version 2".
13042         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13043         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13044         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13045         Remove check for btowc, isascii.
13046         Require AM_LANGINFO_CODESET.
13047
13048 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13049
13050         * lib/regex.c, regex.h: Sync from libc.
13051         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13052         * lib/regexec.c:
13053         New files, synced from libc, except that regex_internal.h
13054         currently has a small porting fix.
13055
13056 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13057
13058         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13059         regex_internal.c, regexec.c.
13060         Add regex_internal.h too, but as a comment, since the libc version
13061         is currently broken in gnulib mode.
13062
13063 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13064
13065         Support programs like Emacs that use gnulib but not gettext.
13066         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13067         * modules/gettext-h: New file.
13068         * modules/gettext (Files): Remove lib/gettext.h.
13069         (Depends-on): Add gettext-h.
13070         (Makefile.am): Remove lib_SOURCES.
13071         * modules/argmatch, modules/c-stack, modules/closeout:
13072         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13073         * modules/execute, modules/file-type, modules/getaddrinfo:
13074         * modules/getopt, modules/human, modules/javacomp:
13075         * modules/javaexec, modules/mkdir-p, modules/obstack:
13076         * modules/openat, modules/pagealign_alloc, modules/pipe:
13077         * modules/quotearg, modules/regex, modules/rpmatch:
13078         * modules/unicodeio, modules/userspec, modules/version-etc:
13079         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13080         * modules/xsetenv:
13081         Depend on gettext-h, not gettext.
13082
13083 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13084
13085         * gnulib-tool (func_import): Add support for 'public domain' license.
13086         * modules/alloca, modules/atexit, modules/memmove:
13087         Now public domain, not GPL.
13088         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13089         * modules/realloc, modules/strerror, modules/strtod:
13090         Now LGPL, not GPL.
13091
13092 2005-07-05  Bruno Haible  <bruno@clisp.org>
13093
13094         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13095         autoconf CVS. Needed for mingw.
13096
13097 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13098
13099         Remove the dependency of the strftime module on the tzset module.
13100         * modules/strftime (Depends-on): Remove dependency on tzset.
13101
13102 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13103
13104         Remove the dependency of the strftime module on the tzset module.
13105         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13106         gl_FUNC_TZSET_CLOBBER.
13107
13108 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13109
13110         Remove the dependency of the strftime module on the tzset module.
13111         * lib/strftime.c (my_strftime)
13112         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13113         Copy the input structure, to work around some of the bug with
13114         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13115         Solaris releases, you should also use the tzset module, but we won't
13116         require it as a dependency any more since we don't want LGPLed code
13117         to depend on GPLed code.
13118
13119 2005-07-02  Jim Meyering  <jim@meyering.net>
13120
13121         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13122         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13123         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13124         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13125
13126 2005-07-02  Jim Meyering  <jim@meyering.net>
13127
13128         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13129
13130 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13131
13132         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13133         declares only 'struct timespec;' (!).
13134
13135 2005-07-01  Jim Meyering  <jim@meyering.net>
13136
13137         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13138         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13139         * lib/save-cwd.c, tempname.c:
13140         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13141         and don't include <sys/file.h>).
13142
13143 2005-06-29  Jim Meyering  <jim@meyering.net>
13144
13145         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13146         type name.  Use the variable name instead.
13147         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13148         Likewise.
13149
13150 2005-06-28  Simon Josefsson  <jas@extundo.com>
13151
13152         * modules/check-version (Files): Add check-version.m4.
13153
13154 2005-06-28  Simon Josefsson  <jas@extundo.com>
13155
13156         * m4/check-version.m4: New file, suggested by Jim Meyering
13157         <jim@meyering.net>.
13158
13159 2005-06-28  Simon Josefsson  <jas@extundo.com>
13160
13161         * lib/check-version.h, lib/check-version.c: New files.
13162
13163 2005-06-28  Simon Josefsson  <jas@extundo.com>
13164
13165         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13166         collision with global variable.  Better indentation.  Don't
13167         increment buffer pointer beyond buffer end.  Based on comments
13168         from Paul Eggert <eggert@cs.ucla.edu>.
13169
13170         * lib/base64.h: Indent.
13171
13172 2005-06-28  Simon Josefsson  <jas@extundo.com>
13173
13174         * doc/gnulib.texi (Library version handling): New section.
13175
13176 2005-06-28  Jim Meyering  <jim@meyering.net>
13177
13178         * check-module (find_included_lib_files): Hard-code another
13179         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13180         but modules/fts-lgpl (correctly) does not list those files.
13181
13182         * modules/canonicalize (Files): Add lib/pathmax.h.
13183
13184 2005-06-25  Simon Josefsson  <jas@extundo.com>
13185
13186         * modules/check-version: New file.
13187
13188 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13189
13190         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13191         initializer of struct addrinfo, as an indication that we don't
13192         care how many members the structure has.
13193
13194 2005-06-24  Derek Price  <derek@ximbiot.com>
13195         and Bruno Haible  <bruno@clisp.org>
13196
13197         Remove stat module & update lstat.
13198         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13199         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13200         * m4/stat.m4: Remove this file.
13201
13202 2005-06-24  Derek Price  <derek@ximbiot.com>
13203         and Bruno Haible  <bruno@clisp.org>
13204
13205         Remove stat module & update lstat.
13206         * lib/stat.c: Remove this file...
13207         (slash_aware_lstat): ...moving this content and its support...
13208         * lib/lstat.c (rpl_lstat): ...into here.
13209         * lib/lstat.h: New file.
13210
13211 2005-06-24  Derek Price  <derek@ximbiot.com>
13212         and Bruno Haible  <bruno@clisp.org>
13213
13214         Remove stat module & update lstat.
13215         * config/srclist.txt (libc sources): Remove stat.
13216
13217 2005-06-24  Derek Price  <derek@ximbiot.com>
13218         and Bruno Haible  <bruno@clisp.org>
13219
13220         Remove stat module & update lstat.
13221         * MODULES.html.sh (stat): Remove.
13222         * MODULES.html: Regenerated.
13223         * modules/lstat (Description): Correct function name.
13224         (Files): Add "lstat.h".
13225         (Depends-on): Remove stat, add xalloc, stat-macros.
13226         * modules/stat: Remove this file.
13227         (Include): Add "lstat.h", remove <sys/stat.h>.
13228
13229 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13232         (ranged_convert): Don't save conversion in a temporary struct.
13233         This causes a warning with GCC 4.0.0, and anyway in the typical
13234         case it's not worth the extra 100 bytes or so of code.
13235         (ranged_convert, __mktime_internal): When calling a function via a
13236         pointer P, use P () rather than (*P) (), as we now assume C89 or
13237         better.
13238
13239 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13240
13241         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13242         "who -r" failed to give output.  Problem reported by Tim Waugh.
13243
13244         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13245         (xcalloc): Use it to avoid needless tests.
13246         Problem reported by Jim Meyering.
13247
13248 2005-06-20  Derek Price  <derek@ximbiot.com>
13249
13250         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13251         unnecessary for Autoconfs > 2.59c.
13252
13253 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13254
13255         * lib/argp.h (__option_is_short): Check upper limit of
13256         __key. Isprint() requires its argument to have the value
13257         of an unsigned char or EOF.
13258
13259 2005-06-16  Jim Meyering  <jim@meyering.net>
13260
13261         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13262         when either N or S is zero.
13263
13264 2005-06-16  Derek Price  <derek@ximbiot.com>
13265
13266         * m4/bison.m4: Declare YACC & YFLAGS precious.
13267
13268 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13269
13270         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13271         multibyte string or pattern, fall back on unibyte matching.
13272         Problem reported by James Youngman.
13273
13274 2005-06-08  Bruno Haible  <bruno@clisp.org>
13275
13276         * modules/csharpcomp: New file.
13277         * MODULES.html.sh (C#): Add csharpcomp.
13278
13279 2005-06-08  Bruno Haible  <bruno@clisp.org>
13280
13281         * m4/csharpcomp.m4: New file, from GNU gettext.
13282
13283 2005-06-08  Bruno Haible  <bruno@clisp.org>
13284
13285         * lib/csharpcomp.h: New file, from GNU gettext.
13286         * lib/csharpcomp.c: New file, from GNU gettext.
13287         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13288
13289 2005-06-08  Bruno Haible  <bruno@clisp.org>
13290
13291         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13292         warning on mingw.
13293
13294 2005-06-07  Derek Price  <derek@ximbiot.com>
13295
13296         Sync from CVS.
13297         * lib/glob_.h: Indent nested #ifdef.
13298
13299 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13300
13301         Sync from coreutils.
13302         Use "file name" when talking about file names, instead of "filename"
13303         or "path", as per the GNU coding standards.
13304         * lib/mkdir-p.c: Renamed from makepath.c.
13305         (make_dir_parents): Renamed from make_path.  All callers changed.
13306         * lib/mkdir-p.h: Likewise.  All includers changed.
13307         * lib/filenamecat.c: Renamed from path-concat.c.
13308         (file_name_concat): Renamed from path_concat.  All callers changed.
13309         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13310         * lib/filenamecat.h: Likewise.  All includers changed.
13311         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13312         in comments or local variable names.
13313         * lib/basename.c: Likewise.
13314         * lib/canonicalize.c, canonicalize.h: Likewise.
13315         * lib/dirname.c, dirname.h: Likewise.
13316         * lib/euidaccess.c: Likewise.
13317         * lib/exclude.c: Likewise
13318         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13319         * lib/fsusage.c, fsuage.h: Likewise.
13320         * lib/fts.c, fts_.h: Likewise.
13321         * lib/getcwd.c: Likewise.
13322         * lib/getloadavg.c: Likewise.
13323         * lib/mkstemp.c: Likewise.
13324         * lib/mountlist.c, mountlist.h: Likewise.
13325         * lib/openat.c, openat.h: Likewise.
13326         * lib/readlink-stub.c: Likewise.
13327         * lib/readutmp.c, readutmp.h: Likewise.
13328         * lib/rename.c: Likewise.
13329         * lib/rmdir.c: Likewise.
13330         * lib/same.c: Likewise.
13331         * lib/savedir.c: Likewise.
13332         * lib/stripslash.c: Likewise.
13333         * lib/tempname.c: Likewise.
13334         * lib/xreadlink.c: Likewise.
13335         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13336         All uses changed.
13337         * lib/exclude.h: Likewise.
13338
13339         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13340         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13341         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13342         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13343         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13344         files have been getting away with it for years (MORE/BSD 4.3
13345         is extinct now).
13346         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13347         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13348
13349         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13350         Define to 256, not 255, as per modern POSIX.
13351
13352 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13353
13354         Sync from coreutils.
13355         Use "file name" when talking about file names, instead of "filename"
13356         or "path", as per the GNU coding standards.
13357         * MODULES.html.sh: mkdir-p renamed from makepath.
13358         filenamecat renamed from path-concat.
13359         * modules/filenamecat: Renamed from modules/path-concat.
13360         (Files): filenamecat.h and filenamecat.c renamed from
13361         path-concat.h and path-concat.c.
13362         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13363         (Include): filenamecat.h, not path-concat.h.
13364         * modules/mkdir-p: Renamed from modules/makepath.
13365         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13366         makepath.c.
13367         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13368         (Include): mkdir-p.h, not makepath.h.
13369
13370 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13371
13372         Sync from coreutils.
13373         * m4/mkdir-p.m4: Renamed from makepath.m4.
13374         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13375         Rename files from makepath.c to mkdir-p.c, and from
13376         makepath.h to mkdir-p.h.
13377         * m4/filenamecat.m4: Renamed from path-concat.m4.
13378         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13379         Rename files from path-concat.c to filenamecat.c,
13380         and from path-concat.h to filenamecat.h.
13381         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13382         "file name" in local variables or comments.
13383         * m4/rename.m4: Likewise.
13384
13385 2005-06-01  Bruno Haible  <bruno@clisp.org>
13386
13387         * modules/csharpexec: New file.
13388         * MODULES.html.sh (C#): New section.
13389
13390 2005-06-01  Bruno Haible  <bruno@clisp.org>
13391
13392         * m4/csharp.m4: New file, from GNU gettext.
13393         * m4/csharpexec.m4: New file, from GNU gettext.
13394
13395 2005-06-01  Bruno Haible  <bruno@clisp.org>
13396
13397         * lib/csharpexec.h: New file, from GNU gettext.
13398         * lib/csharpexec.c: New file, from GNU gettext.
13399         * lib/csharpexec.sh.in: New file, from GNU gettext.
13400
13401 2005-05-31  Derek Price  <derek@ximbiot.com>
13402             Paul Eggert  <eggert@cs.ucla.edu>
13403
13404         Sync from cvs.
13405         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13406
13407 2005-05-31  Derek Price  <derek@ximbiot.com>
13408             Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         Sync from cvs.
13411         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13412
13413 2005-05-29  Derek Price  <derek@ximbiot.com>
13414
13415         * config/srclist.txt (glob_.h, glob.c): Add these files.
13416
13417 2005-05-29  Derek Price  <derek@ximbiot.com>
13418
13419         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13420         * modules/glob: New file.
13421         * modules/getlogin_r: Add link to POSIX spec in description.
13422
13423 2005-05-29  Derek Price  <derek@ximbiot.com>
13424             Paul Eggert  <eggert@cs.ucla.edu>
13425
13426         * m4/glob.m4: New file.
13427
13428 2005-05-29  Derek Price  <derek@ximbiot.com>
13429             Paul Eggert  <eggert@cs.ucla.edu>
13430
13431         * lib/glob_.h, lib/glob.c: New files.
13432
13433 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13434
13435         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13436         * modules/fts-lgpl (Depends-on): Remove gettext.
13437
13438 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13439
13440         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13441         and don't require gt_INTTYPES_PRI.
13442
13443 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13444
13445         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13446
13447         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13448         the configuration hassle isn't worth it.
13449         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13450         (LONGEST_MODIFIER, PRIuMAX): Remove.
13451
13452 2005-05-27  Bruno Haible  <bruno@clisp.org>
13453
13454         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13455
13456 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13457
13458         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13459         _POSIX_PTHREAD_SEMANTICS for Solaris.
13460
13461 2005-05-25  Derek Price  <derek@ximbiot.com>
13462
13463         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13464
13465 2005-05-25  Derek Price  <derek@ximbiot.com>
13466             Paul Eggert  <eggert@cs.ucla.edu>
13467
13468         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13469         * lib/getlogin_r.c, getlogin_r.h: New files.
13470
13471 2005-05-25  Bruno Haible  <bruno@clisp.org>
13472             Derek Price  <derek@ximbiot.com>
13473
13474         * lib/getlogin_r.h: Simplify API documentation.
13475
13476 2005-05-23  Derek Price  <derek@ximbiot.com>
13477
13478         * modules/minmax (Files): Add m4/minmax.m4.
13479         (configure.ac): Add gl_MINMAX.
13480
13481 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13484         so that unistd-safer.h (GPL'ed code) need not be included.
13485
13486 2005-05-22  Bruno Haible  <bruno@clisp.org>
13487
13488         * m4/minmax.m4: New file.
13489         Based on a patch by Derek Price <derek@ximbiot.com>.
13490
13491 2005-05-22  Bruno Haible  <bruno@clisp.org>
13492
13493         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13494         (INT64_MIN): Fix definition.
13495         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13496
13497         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13498         NEED_SIGNED_INT_TYPES.
13499
13500         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13501         HAVE_SYSTEM_INTTYPES.
13502
13503 2005-05-22  Bruno Haible  <bruno@clisp.org>
13504
13505         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13506         Also include <sys/param.h> if it defines MIN, MAX.
13507         Based on a patch by Derek Price <derek@ximbiot.com>.
13508
13509 2005-05-21  Jim Meyering  <jim@meyering.net>
13510
13511         * modules/fts (Files): Add m4/inttypes-pri.m4.
13512         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13513
13514 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13515
13516         New fts module.
13517         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13518         (setup_dir, free_dir): New functions.
13519         (enter_dir, leave_dir): Define trivial
13520         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13521         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13522         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13523         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13524         Move to fts-cycle.c.
13525         (fts_open): Use setup_dir.
13526         (fts_close): Use free_dir.
13527         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13528         This adds a label and some gotos, but the alternatives were messier.
13529         Check for memory allocation failure when entering a dir.
13530         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13531         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13532         (FTS): New member fts_cycle, that is a union that contains the
13533         old active_dir_ht and cycle_state.  All uses changed to mention
13534         fts_cycle.ht and fts_cycle.state.
13535         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13536         fts.c, with the following changes:
13537         (setup_dir, free_dir): New functions.
13538         (enter_dir): Now returns bool.  Return true if successful, false
13539         if memory exhausted.  All callers changed.
13540         Do not bother partly cleaning up on
13541         memory allocation failure; that is free_dir's job.
13542         However, free ad if hash_insert fails, to avoid memory leak.
13543         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13544         fts->fts_options to see which union member to use.
13545
13546 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13547
13548         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13549         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13550
13551 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13552
13553         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13554
13555 2005-05-20  Jim Meyering  <jim@meyering.net>
13556
13557         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13558         Now a macro, to pacify GCC.
13559
13560 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13561
13562         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13563         of -1.
13564
13565 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13566
13567         * lib/chown.c (rpl_chown): Return -1 on failure.
13568
13569 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13570
13571         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13572         Don't check for stddef.h.
13573         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13574         don't use its results.
13575         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13576         since we include them unconditionally.  Don't require
13577         AM_STDBOOL_H, since stdbool is a prerequisite.
13578         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13579         since we assume C89 or better.
13580         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13581         as we don't use their results.
13582         Don't check for fchdir, memmove, memset, strrchr, as we use
13583         them unconditionally.
13584         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13585         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13586
13587 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13588
13589         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13590         Include <stddef.h> unconditionally, since we assume C89 now.
13591         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13592         * lib/fts.c: Include fts_.h first, to check interface.
13593         Do not include intprops.h; no longer needed.
13594         Include cycle-check.h and hash.h, since fts_.h no longer does.
13595         Remove unnecessary casts of closedir to void.
13596         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13597         decide whether to decrement nlinks.
13598         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13599         (FTS): Use struct hash_table * instead of Hash_table, so that
13600         we no longer need to include hash.h here.
13601
13602 2005-05-18  Jim Meyering  <jim@meyering.net>
13603
13604         * modules/dirfd (License): Change to LGPL.  Most of the code
13605         is already in the public domain.
13606
13607 2005-05-18  Jim Meyering  <jim@meyering.net>
13608
13609         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13610         Reported by Yoann Vandoorselaere.
13611
13612 2005-05-17  Jim Meyering  <jim@meyering.net>
13613
13614         * m4/fts.m4: New file, from coreutils.
13615
13616 2005-05-17  Jim Meyering  <jim@meyering.net>
13617
13618         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13619
13620 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13621
13622         Sync from coreutils.
13623         * m4/unlinkdir.m4: New file.
13624
13625 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13626
13627         Sync from coreutils.
13628         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13629         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13630         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13631         White space changes only.
13632         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13633         special.
13634         * lib/yesno.c: Include getline.h, not ctype.h.
13635         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13636         Use getline to remove arbitrary restriction on response length.
13637
13638 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13639
13640         * config/srclist-update: Spell out "Street" in FSF postal
13641         mail address; this is the style the FSF seems to prefer.
13642
13643         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13644         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13645         this updates FSF postal mail address.
13646
13647         Sync from coreutils.
13648         * modules/unlinkdir: New file.
13649         * modules/yesno (Depends-on): Add getline.
13650         * MODULES.html.sh (File system functions): Add unlinkdir.
13651
13652 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13653
13654         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13655         lib/strsep.h:
13656         Change the initial comment to refer to GPL, not LGPL.
13657         gnulib-tool will change it to LGPL as needed.
13658
13659         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13660         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13661         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13662         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13663         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13664         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13665         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13666         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13667         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13668         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13669         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13670         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13671         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13672         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13673         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13674         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13675         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13676         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13677         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13678         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13679         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13680         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13681         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13682         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13683         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13684         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13685         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13686         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13687         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13688         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13689         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13690         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13691         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13692         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13693         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13694         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13695         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13696         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13697         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13698         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13699         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13700         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13701         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13702         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13703         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13704         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13705         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13706         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13707         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13708         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13709         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13710         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13711         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13712         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13713         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13714         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13715         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13716         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13717         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13718         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13719         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13720         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13721         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13722         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13723         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13724         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13725         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13726         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13727         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13728         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13729         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13730         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13731         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13732         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13733         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13734         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13735         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13736         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13737         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13738         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13739         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13740         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13741         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13742         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13743         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13744         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13745         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13746         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13747         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13748         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13749         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13750         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13751         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13752         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13753         lib/yesno.c, lib/yesno.h:
13754         Update FSF postal mail address.
13755
13756 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13757
13758         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13759         tests/test-memmem.c, tests/test-stpncpy.c:
13760         Update FSF postal mail address.
13761
13762 2005-05-13  Bruno Haible  <bruno@clisp.org>
13763
13764         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13765         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13766         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13767         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13768         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13769         Add support for 64-bit integers in the MSVC compiler.
13770
13771 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13772
13773         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13774
13775 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13776
13777         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13778
13779 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13780
13781         * doc/getdate.texi (General date syntax): Don't say that date
13782         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13783         Problem reported by Nic Ferrier.
13784
13785 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13786
13787         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13788         specified in ai_socktype. Fix invalid ai_protocol
13789         check. ai_protocol is usually set to 0 or depending on
13790         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13791         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13792         ai_socktype / ai_protocol in the returned addrinfo structure.
13793
13794 2005-05-10  Simon Josefsson  <jas@extundo.com>
13795
13796         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13797         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13798
13799 2005-05-10  Karl Berry  <karl@gnu.org>
13800
13801         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13802         (from http://www.gnu.org/licenses).
13803         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13804         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13805         fdl.texi suffices.
13806
13807 2005-05-10  Karl Berry  <karl@gnu.org>
13808
13809         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13810         (COPYING.DOC): remove.
13811
13812         * config/srclist-update: new FSF address.
13813
13814 2005-05-10  Derek Price  <derek@ximbiot.com>
13815
13816         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13817         possible.
13818
13819 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13820             Bruno Haible  <bruno@clisp.org>
13821
13822         * modules/inet_ntop: New file.
13823         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13824         inet_ntop.
13825
13826 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13827             Bruno Haible  <bruno@clisp.org>
13828
13829         * m4/inet_ntop.m4: New file.
13830
13831 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13832             Bruno Haible  <bruno@clisp.org>
13833
13834         * lib/inet_ntop.h: New file.
13835         * lib/inet_ntop.c: New file, from glibc with modifications.
13836
13837 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13838
13839         * modules/time_r (License): Change to LGPL.
13840         * modules/extensions (License): Change to LGPL.  Actually,
13841         the license is more permissive than that, but currently gnulib-tool
13842         doesn't know how to handle more-permissive licenses.
13843
13844         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13845         Problem reported by Dave Love.
13846
13847 2005-05-08  Jim Meyering  <jim@meyering.net>
13848
13849         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13850         blank.
13851
13852 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13853
13854         * modules/argmatch (Depends-on): Add stdbool.
13855         * modules/backupfile (Depends-on): Likewise.
13856         * modules/chdir-long (Depends-on): Likewise.
13857         * modules/closeout (Depends-on): Likewise.
13858         * modules/cycle-check (Depends-on): Likewise.
13859         * modules/dirname (Depends-on): Likewise.
13860         * modules/fnmatch (Depends-on): Likewise.
13861         * modules/fsusage (Depends-on): Likewise.
13862         * modules/fwriteerror (Depends-on): Likewise.
13863         * modules/getcwd (Depends-on): Likewise.
13864         * modules/getloadavg (Depends-on): Likewise.
13865         * modules/hard-locale (Depends-on): Likewise.
13866         * modules/makepath (Depends-on): Likewise.
13867         * modules/mountlist (Depends-on): Likewise.
13868         * modules/nanosleep (Depends-on): Likewise.
13869         * modules/posixtm (Depends-on): Likewise.
13870         * modules/quotearg (Depends-on): Likewise.
13871         * modules/readtokens (Depends-on): Likewise.
13872         * modules/readtokens0 (Depends-on): Likewise.
13873         * modules/readutmp (Depends-on): Likewise.
13874         * modules/save-cwd (Depends-on): Likewise.
13875         * modules/strftime (Depends-on): Likewise.
13876         * modules/userspec (Depends-on): Likewise.
13877         * modules/utimecmp (Depends-on): Likewise.
13878         * modules/xgetcwd (Depends-on): Likewise.
13879         * modules/xnanosleep (Depends-on): Likewise.
13880         * modules/xstrtod (Depends-on): Likewise.
13881         * modules/yesno (Depends-on): Likewise.
13882
13883 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13884
13885         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13886         needless checks.
13887
13888 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13889
13890         Merge from coreutils.  Among other things,
13891         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13892         * lib/fd-safer.c: New file.
13893         * lib/fcntl-safer.h, open-safer.c: Remove.
13894         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13895         * lib/dup-safer.c: Include unistd-safer.h first.
13896         Don't include errno.h.
13897         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13898         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13899         * lib/file-type.c: Rely on file-type.h change.
13900         * lib/getloadavg.c: Include unistd-safer.h.
13901         (getloadavg): Use safer open.
13902         * lib/getusershell.c: Include "stdio-safer.h".
13903         (getusershell): Use safer fopen.
13904         * lib/long-options.c (long_options): Use NULL rather than 0.
13905         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13906         'free'.
13907         * lib/modechange.c: Likewise.
13908         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13909         (MODE_DONE): New constant.
13910         (struct mode_change): Remove 'next' member.
13911         (make_node_op_equals): New function; like the old one of the
13912         same name, except it allocates an array.
13913         (mode_compile, mode_create_from_ref): Use it.
13914         (mode_compile): Allocate result as an array, not a linked list.
13915         Parse octal string ourself, so that we catch mistakes like "+0".
13916         (mode_adjust): Arg is an array, not a linked list.
13917         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13918         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13919         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13920         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13921         Remove.  This is now stat-macros.h's job.
13922         (talloc): Remove.  All callers replaced by xalloc, so that
13923         our invokers don't have to worry about reporting memory failures.
13924         (make_node_op_equals): Remove.
13925         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13926         New constants.
13927         (struct mode_change): Moved here from modechange.h.
13928         (mode_append_entry): Remove.
13929         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13930         apps to have incorrect behavior.  Use simpler algorithm for head
13931         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13932         Detect more invalid usages rather than having somewhat-random behavior.
13933         Don't insert an "a=" action, as that leads to incorrect behavior.
13934         (mode_compile, mode_create_from_ref): Return NULL on error instead
13935         of an enum, since now there's only one way to have an error.  All
13936         callers changed.
13937         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13938         at the correct time.  Simplify calculation of "+u" and its ilk.
13939         Don't mishandle "+X".
13940         (mode_free): Remove "register" and localize decls.
13941         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13942         (struct mode_change): Move to modechange.c; callers don't
13943         need to see this stuff.
13944         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13945         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13946         (mode_change, mode_adjust): Reflect the new signatures noted above.
13947         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13948         that might redefine system include files.
13949         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13950         (my_usleep): Use NULL rather than (void *) 0.
13951         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13952         Use siginterrupt to specify that system calls should be interrupted.
13953         (rpl_nanosleep): Move initialization of suspended closer to call of
13954         my_usleep.
13955         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13956         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13957         (desirable_utmp_entry): New function.
13958         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13959         using x2nrealloc, to simplify logic.
13960         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13961         size calculation.  Do not assume utmp file is a regular file.
13962         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13963         (READ_UTMP_CHECK_PIDS): New constant.
13964         * lib/save-cwd.c: Include unistd-safer.h.
13965         (save_cwd): Use fd_safer.
13966         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13967         [!_LIBC] Include "stat-macros.h" instead.
13968         * lib/unistd-safer.h (fd_safer): New decl.
13969
13970 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13971
13972         * modules/getloadavg (Depends-on): Add unistd-safer.
13973         * modules/getusershell (Depends-on): Add stdio-safer.
13974         * modules/lstat (Depends-on): Remove xalloc.
13975         * modules/mkstemp (Depends-on): Add stat-macros.
13976         * modules/modechange (Depends-on): Remove xstrtol.
13977         Add stat-macros, xalloc.
13978         * modules/save-cwd (Depends-on): Add unistd-safer.
13979         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
13980         * modules/unistd-safer (Files): Add lib/fd-safer.c
13981         (Makefile.am): Remove lib_SOURCES.
13982
13983         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
13984         Remove fcntl-safer; unistd-safer supersedes it.
13985
13986 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
13989         AC_HEADER_STAT.
13990         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
13991         (gl_PREREQ_CHOWN): Remove.
13992         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
13993         it.  Don't require AC_HEADER_STAT.
13994         (gl_PREREQ_LSTAT): Remove.
13995         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
13996         Don't require AC_HEADER_STAT.
13997         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
13998         (gl_PREREQ_RMDIR): Remove.
13999         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14000         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14001         the stat-macros module a prerequisite.
14002         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14003         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14004         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14005         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14006         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14007         variable names.
14008         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14009         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14010         variable prefixes.
14011         * m4/fcntl-safer.m4: Remove.
14012         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14013         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14014         Invoke gl_PREREQ_FD_SAFER.
14015         (gl_PREREQ_FD_SAFER): New macro.
14016         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14017         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14018         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14019         Remove duplicate call to AC_LIBOBJ(readutmp).
14020         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14021
14022         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14023         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14024
14025 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14026
14027         * MODULES.html.sh (Misc): Add byteswap.
14028
14029 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14030
14031         * modules/getcwd (Depends-on): Add extensions.
14032         * modules/openat (Depends-on): Likewise.
14033
14034 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14035
14036         * modules/byteswap: New file.
14037
14038 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14039
14040         * m4/byteswap.m4: New file.
14041
14042 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14043
14044         * lib/byteswap_.h: New file.
14045
14046 2005-04-25  Karl Berry  <karl@gnu.org>
14047
14048         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14049
14050 2005-04-25  Albert Chin  <china@thewrittenword.com>
14051
14052         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14053         Toolkit C bug.
14054
14055 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14056
14057         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14058         (func_ln_if_changed) Remove forcibly for no error message
14059         in case file does not exist.
14060
14061 2005-04-19  Simon Josefsson  <jas@extundo.com>
14062
14063         * gnulib-tool (Options): Make --symlink mean --symbolic.
14064
14065 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14066
14067         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14068
14069 2005-04-16  Simon Josefsson  <jas@extundo.com>
14070
14071         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14072
14073 2005-04-15  Simon Josefsson  <jas@extundo.com>
14074
14075         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14076
14077 2005-04-15  Simon Josefsson  <jas@extundo.com>
14078
14079         * gnulib-tool: Rename --symlink to --symbolic.
14080
14081 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14082
14083         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14084         symbolic links to files instead of copying/moving.  Add --aux-dir,
14085         specifying directory relative --dir where auxiliary build tools
14086         are placed.
14087
14088 2005-04-14  Bruno Haible  <bruno@clisp.org>
14089
14090         * modules/allocsa (License): Change to LGPL.
14091         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14092
14093 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14094
14095         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14096         that "UTC +1 second" continues to work.  Problem reported
14097         by Dmitry V. Levin.
14098         (relunit_snumber): New rule.
14099         (relunit): Use it.
14100
14101 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14102
14103         * lib/getdate.y (universal_time_zone_table): New constant.
14104         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14105         universal_time_zone_table.
14106         (lookup_zone): Prefer universal_time_zone_table to
14107         local_time_zone_table, so that "GMT" time stamps are allowed in
14108         London during the summer.  Problem reported by Ian Abbott.
14109
14110 2005-04-12  Jim Meyering  <jim@meyering.net>
14111
14112         * lib/human.c (humblock): Set *options even when returning due to
14113         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14114         warning from gcc-4.
14115
14116 2005-04-09  Jim Meyering  <jim@meyering.net>
14117
14118         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14119         -Wuninitialized: initialize tm0.tm_year.
14120
14121 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14122
14123         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14124         count, since there's no maximum.  All uses changed.
14125         Add member dsts_seen.
14126         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14127         not being INT_MAX.
14128         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14129         Use pc_rels_seen to decide whther a date is absolute.
14130
14131         * lib/getdate.y (number): Don't overwrite year.
14132         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14133         check.
14134
14135 2005-04-02  Simon Josefsson  <jas@extundo.com>
14136
14137         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14138         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14139
14140 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14141
14142         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14143         where no absolute path name can be longer than PATH_MAX.
14144
14145 2005-03-27  Jim Meyering  <jim@meyering.net>
14146
14147         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14148
14149 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14150
14151         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14152         "one's complement" -> "ones' complement" in comment, as per Knuth.
14153         "value of type" -> "type or expression" in comment.
14154         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14155
14156 2005-03-26  Jim Meyering  <jim@meyering.net>
14157
14158         Comment nits.
14159         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14160         Correct typos: s/or/of/.
14161
14162 2005-03-26  Jim Meyering  <jim@meyering.net>
14163
14164         * modules/check-include-files: Move to ../ and rename to...
14165         * check-module: ...this.
14166
14167 2005-03-25  Jim Meyering  <jim@meyering.net>
14168
14169         * modules/xvasprintf (Files): Add xalloc.h.
14170
14171 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14172
14173         * modules/gettext (Files): config/config.rpath ->
14174         build-aux/config.rpath
14175         * modules/iconv (Files): Likewise.
14176         Problem reported by Oskar Liljeblad.
14177
14178 2005-03-23  Jim Meyering  <jim@meyering.net>
14179
14180         * modules/check-include-files: New script to check for
14181         missing dependencies, multiple includes, etc.
14182
14183         * modules/c-strtold (Depends-on): Add xalloc.
14184         * modules/c-strtod (Depends-on): Add xalloc.
14185         * modules/hash (Depends-on): Add xalloc.
14186         (Files): Remove lib/xalloc.h.
14187
14188         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14189         * modules/userspec (Files): Add lib/inttostr.h.
14190
14191 2005-03-23  Jim Meyering  <jim@meyering.net>
14192
14193         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14194
14195 2005-03-22  Jim Meyering  <jim@meyering.net>
14196
14197         * modules/stat-macros: New module.
14198         * modules/canonicalize, modules/euidaccess, modules/file-type,
14199         * modules/filemode, modules/lchown, modules/makepath,
14200         * modules/rmdir, modules/stat: Depend on new stat-macros module
14201         rather than listing lib/stat-macros.h manually.
14202         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14203
14204 2005-03-22  Jim Meyering  <jim@meyering.net>
14205
14206         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14207
14208 2005-03-22  Bruno Haible  <bruno@clisp.org>
14209
14210         * config/srclist.txt: Replace target directory 'config' with
14211         'build-aux'.
14212         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14213         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14214         ../build-aux/.
14215
14216 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14217
14218         * modules/chdir-long (Depends-on): Add mempcpy.
14219
14220         * modules/acl, modules/backupfile, modules/c-strtod,
14221         modules/c-strtold, modules/canon-host, modules/canonicalize,
14222         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14223         modules/exclude, modules/exitfail, modules/file-type,
14224         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14225         modules/getdate, modules/getline, modules/getpagesize,
14226         modules/getpass, modules/getugroups, modules/group-member,
14227         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14228         modules/inttostr, modules/long-options, modules/makepath,
14229         modules/md5, modules/memcasecmp, modules/memcoll,
14230         modules/modechange, modules/mountlist, modules/path-concat,
14231         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14232         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14233         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14234         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14235         modules/strftime, modules/strndup, modules/strverscmp,
14236         modules/timespec, modules/unlocked-io, modules/userspec,
14237         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14238         modules/yesno:
14239         Remove lib_SOURCES line from Makefile.am section, as this is now
14240         done automatically by the corresponding Autoconf macro.
14241
14242 2005-03-21  Jim Meyering  <jim@meyering.net>
14243
14244         Changes imported from coreutils.
14245
14246         * lib/cycle-check.c: Don't include xalloc.h.
14247
14248         * lib/path-concat.c: Don't include assert.h.
14249         (path_concat): Remove assertion that would have triggered
14250         for ABASE starting with more than one slash.
14251         Reported by Andreas Schwab.
14252
14253         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14254         properly when ABASE is an absolute file name.
14255         Correct the description of this function.
14256         Include <assert.h>.
14257         Add an assertion and a test driver.
14258         This fixes a bug introduced on 2004-07-02.
14259         Andreas Schwab reported the resulting failure of cp --parents:
14260         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14261
14262 2005-03-21  Jim Meyering  <jim@meyering.net>
14263
14264         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14265         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14266
14267 2005-03-21  Jim Meyering  <jim@meyering.net>
14268         and  Paul Eggert  <eggert@cs.ucla.edu>
14269
14270         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14271         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14272         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14273         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14274         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14275         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14276         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14277         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14278         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14279         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14280         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14281         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14282         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14283         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14284         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14285         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14286         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14287         for these modules.
14288
14289 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14290
14291         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14292         (which shouldn't happen), generate nothing instead of returning 0
14293         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14294
14295 2005-03-16  Bruno Haible  <bruno@clisp.org>
14296
14297         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14298         HAVE_LONGLONG_64BIT.
14299
14300 2005-03-16  Bruno Haible  <bruno@clisp.org>
14301
14302         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14303         HAVE_LONGLONG_64BIT.
14304
14305 2005-03-16  Bruno Haible  <bruno@clisp.org>
14306
14307         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14308         HAVE_LONGLONG_64BIT.
14309
14310 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14311
14312         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14313         reliably distinguish strftime failure from empty output on POSIX
14314         hosts.
14315
14316 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14317
14318         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14319         (iconv_string): Don't guess a size-zero buffer, as that might cause
14320         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14321         result would be 'too large', where 'too large' is (heuristically)
14322         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14323         overflow concerns.  This will prevent some unwanted malloc failures
14324         when the inputs are very large.
14325
14326 2005-03-15  Karl Berry  <karl@gnu.org>
14327
14328         * config/srclist.txt (config.rpath): from gettext.
14329         * config/config.rpath: update.
14330
14331 2005-03-15  Bruno Haible  <bruno@clisp.org>
14332
14333         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14334         to 'negate'.
14335
14336         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14337         variable.
14338
14339         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14340         results.
14341
14342 2005-03-14  Simon Josefsson  <jas@extundo.com>
14343
14344         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14345         <fx@gnu.org>.
14346
14347 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14348
14349         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14350         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14351         intprops.h.
14352         * lib/strtol.c: Likewise.
14353
14354 2005-03-14  Jim Meyering  <jim@meyering.net>
14355
14356         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14357         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14358         to be nonzero so that we (and caller) can detect the difference
14359         between a valid zero-length expansion and an error return, even
14360         when the underlying strftime fails before writing anything into
14361         that location.
14362
14363 2005-03-14  Bruno Haible  <bruno@clisp.org>
14364
14365         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14366         Update from GNU gettext 0.14.3.
14367
14368 2005-03-10  Jim Meyering  <jim@meyering.net>
14369
14370         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14371
14372 2005-03-10  Jim Meyering  <jim@meyering.net>
14373
14374         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14375         so that this module works on systems without fchdir.
14376
14377 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14378
14379         Factor int-properties macros into a single file, except for
14380         glibc-related files.
14381         * lib/intprops.h: New file.
14382         * lib/getloadavg.c: Include it instead of limits.h.
14383         (INT_STRLEN_BOUND): Remove.
14384         * lib/human.c: Include intprops.h.
14385         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14386         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14387         302/1000.
14388         * lib/inttostr.h: Include intprops.h instead of limits.h.
14389         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14390         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14391         for consistency with intprops.h.
14392         (time_t_is_integer, twos_complement_arithmetic): Use them.
14393         * lib/sig2str.h: Include <signal.h>, intprops.h.
14394         (INT_STRLEN_BOUND): Remove.
14395         * lib/strftime.c (TYPE_SIGNED): Remove.
14396         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14397         * lib/strtol.c: Adjust comments to match intprops.h.
14398         * lib/userspec.c: Include intprops.h.
14399         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14400         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14401         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14402         instead of rolling our own expressions.
14403         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14404
14405         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14406         instead of int.
14407         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14408         the right thing even if adding 1900 would overflow.  Similarly
14409         for tm_mon + 1 and tm_yday + 1.
14410         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14411         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14412         (DO_SIGNED_NUMBER): New macro.
14413         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14414
14415 2005-03-07  Bruno Haible  <bruno@clisp.org>
14416
14417         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14418
14419 2005-03-07  Bruno Haible  <bruno@clisp.org>
14420
14421         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14422
14423 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14424
14425         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14426         (func_import): Only replace files via --import when they have actually
14427         changed.
14428
14429 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14430
14431         * m4/mmap-anon.m4: New file.
14432         * m4/pagealign_alloc.m4: New file.
14433
14434 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14435             Bruno Haible  <bruno@clisp.org>
14436
14437         * modules/pagealign_alloc: New file.
14438         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14439
14440 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14441             Bruno Haible  <bruno@clisp.org>
14442
14443         * lib/pagealign_alloc.h: New file.
14444         * lib/pagealign_alloc.c: New file.
14445
14446 2005-03-03  Bruno Haible  <bruno@clisp.org>
14447
14448         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14449         Use an all-permissive copyright notice, recommended by RMS.
14450
14451 2005-03-02  Bruno Haible  <bruno@clisp.org>
14452
14453         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14454         of AIX, the replacement has to be done only after <string.h> is
14455         included, therefore not in config.h. stpncpy.h does the replacement,
14456         and stpncpy.c uses it.
14457
14458 2005-03-02  Bruno Haible  <bruno@clisp.org>
14459
14460         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14461         stpncpy.c uses it.
14462
14463 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14464
14465         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14466         The workaround isn't strictly needed for POSIX conformance, and
14467         it's too much of a pain to configure and maintain.  We'll ask
14468         people to fix their kernels instead.
14469         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14470         (NANOSLEEP_BUG_WORKAROUND): Remove.
14471         (xnanosleep): Remove the workaround.
14472
14473 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14474
14475         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14476         Reported by Derek Price.
14477         (Include): Add "timespec.h".
14478
14479         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14480
14481 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14482
14483         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14484         to detect nanosleep bug.
14485
14486 2005-03-01  Bruno Haible  <bruno@clisp.org>
14487
14488         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14489
14490 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         * modules/gethrxtime: New file.
14493         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14494         (Depends-on): Add gethrxtime.
14495         (configure.ac): Add gl_XNANOSLEEP.
14496         (Makefile.am): Remove lib_SOURCES line.
14497
14498 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14499
14500         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14501         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14502
14503 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14504
14505         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14506         * lib/timespec.h (gettime): Return void, since it always
14507         succeeds now.  All uses changed.
14508         * lib/gettime.c (gettime) Likewise.
14509         [HAVE_NANOTIME]: Prefer nanotime.
14510         Assume gettimeofday succeeds, as POSIX requires.
14511         Assime time () succeeds, since other code already does.
14512         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14513         (timespec_subtract): Remove.
14514         (NANOSLEEP_BUG_WORKAROUND): New constant.
14515         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14516         things considerably.  Use it only on GNU/Linux hosts, since the
14517         workaround shouldn't be needed elsewhere.
14518
14519 2005-02-24  Bruno Haible  <bruno@clisp.org>
14520
14521         * modules/gettext (Files): Add m4/glibc2.m4.
14522
14523 2005-02-24  Bruno Haible  <bruno@clisp.org>
14524
14525         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14526         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14527         * m4/progtest.m4:
14528         Update from GNU gettext 0.14.2.
14529         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14530
14531 2005-02-24  Bruno Haible  <bruno@clisp.org>
14532
14533         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14534         * lib/config.charset: Update from GNU gettext 0.14.2.
14535
14536 2005-02-24  Bruno Haible  <bruno@clisp.org>
14537
14538         * lib/gettext.h: Update from GNU gettext 0.14.2.
14539
14540 2005-02-23  Simon Josefsson  <jas@extundo.com>
14541
14542         * m4/iconvme.m4: New file.
14543
14544 2005-02-23  Jim Meyering  <jim@meyering.net>
14545
14546         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14547         change.
14548         Thanks to Bruno Haible for catching it.
14549
14550 2005-02-22  Simon Josefsson  <jas@extundo.com>
14551
14552         * modules/iconvme: New file.
14553
14554         * MODULES.html.sh: Add iconvme.
14555
14556 2005-02-22  Simon Josefsson  <jas@extundo.com>
14557
14558         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14559
14560 2005-02-22  Simon Josefsson  <jas@extundo.com>
14561
14562         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14563
14564 2005-02-22  Jim Meyering  <jim@meyering.net>
14565
14566         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14567         s/ifndef/ifdef/.
14568
14569 2005-02-20  Neil Conway  <neilc@samurai.com>
14570
14571         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14572         returned by OSX/Darwin if the specified buffer is not large
14573         enough for the hostname.
14574
14575 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14576
14577         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14578         pass it to _help, otherwise the latter coredumps trying to
14579         dereference state.root_argp.
14580
14581 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14582
14583         * modules/chdir-long (Depends-on): Add memrchr.
14584         * modules/memrchr (Files): Add lib/memrchr.h.
14585         (Include): "memrchr.h".
14586
14587 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14588
14589         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14590
14591 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14592
14593         * lib/memrchr.h: New file.
14594         * lib/chdir-long.c: Include it.
14595         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14596         Don't bother including stddef.h.
14597
14598 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14599
14600         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14601         inclusion.
14602         Include <sys/types.h>, for dev_t.
14603         (ME_DUMMY, ME_REMOTE): Move from here....
14604         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14605         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14606         Dmitry V. Levin.
14607         Include mountlist.h first, to test the interface.
14608
14609 2005-01-29  Bruno Haible  <bruno@clisp.org>
14610
14611         * lib/progname.c (program_name): Initialize.
14612         Needed when linking statically on MacOS X.
14613
14614 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         Sync from coreutils.
14617         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14618         (Depends-on): Add c-strtod.
14619         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14620
14621 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         Sync from coreutils.
14624         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14625
14626         Remove files that are specific to coreutils.
14627         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14628
14629 2005-01-28  Bruno Haible  <bruno@clisp.org>
14630
14631         * modules/javacomp: New file.
14632         * MODULES.html.sh (Java): Add javacomp.
14633
14634 2005-01-28  Bruno Haible  <bruno@clisp.org>
14635
14636         * m4/javacomp.m4: New file, from GNU gettext.
14637
14638 2005-01-28  Bruno Haible  <bruno@clisp.org>
14639
14640         * lib/javacomp.sh.in: New file, from GNU gettext.
14641         * lib/javacomp.h: New file, from GNU gettext.
14642         * lib/javacomp.c: New file, from GNU gettext.
14643
14644 2005-01-26  Simon Josefsson  <jas@extundo.com>
14645
14646         * lib/gai_strerror.c: Use GPL in header.
14647
14648 2005-01-26  Bruno Haible  <bruno@clisp.org>
14649
14650         * modules/javaexec: New file.
14651         * MODULES.html.sh (Java): Add javaexec.
14652
14653 2005-01-26  Bruno Haible  <bruno@clisp.org>
14654
14655         * m4/javaexec.m4: New file, from GNU gettext.
14656
14657 2005-01-26  Bruno Haible  <bruno@clisp.org>
14658
14659         * lib/javaexec.sh.in: New file, from GNU gettext.
14660         * lib/javaexec.h: New file, from GNU gettext.
14661         * lib/javaexec.c: New file, from GNU gettext.
14662
14663 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14664
14665         * modules/lchown (Depends-on): Remove lchown.h
14666
14667 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14668
14669         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14670         must be defined if the header file was not found, in order
14671         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14672
14673 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14674
14675         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14676         initializers for struct pentry_state.
14677         (__argp_error): Check return value of __asprintf
14678         (__argp_failure): Translate error message
14679
14680         * lib/argp-parse.c: Removed braces around the expansion of N_()
14681
14682 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14683
14684         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14685         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14686         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14687         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14688         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14689         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14690         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14691         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14692         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14693         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14694         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14695         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14696         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14697         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14698         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14699         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14700         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14701         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14702         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14703         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14704         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14705         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14706         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14707         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14708         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14709         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14710         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14711         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14712         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14713         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14714         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14715         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14716         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14717         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14718         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14719         Use an all-permissive copyright notice, recommended by RMS.
14720
14721 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14722
14723         * modules/chdir-long (Depends-on): Remove mempcpy.
14724
14725 2005-01-21  Jim Meyering  <jim@meyering.net>
14726
14727         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14728         same value as for Solaris 9.
14729
14730         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14731         component length.  This included changing the parameter to be
14732         of type `char *' rather than `char const *'.
14733         * lib/chdir-long.h (chdir_long): Update prototype.
14734
14735         * lib/openat.c (fdopendir, fstatat): New functions.
14736         * lib/openat.h: Include headers required for use of DIR and struct
14737         stat.
14738         [AT_SYMLINK_NOFOLLOW]: Define.
14739         (fdopendir, fstatat): Add prototypes.
14740
14741 2005-01-21  Bruno Haible  <bruno@clisp.org>
14742
14743         * modules/classpath: New file.
14744         * MODULES.html.sh (Java): Add classpath.
14745
14746 2005-01-21  Bruno Haible  <bruno@clisp.org>
14747
14748         * lib/classpath.h: New file, from GNU gettext.
14749         * lib/classpath.c: New file, from GNU gettext.
14750
14751 2005-01-20  Simon Josefsson  <jas@extundo.com>
14752
14753         * modules/version-etc-fsf: New file.
14754
14755 2005-01-20  Simon Josefsson  <jas@extundo.com>
14756
14757         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14758         * lib/version-etc.c: Remove version_etc_copyright.
14759         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14760         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14761
14762 2005-01-20  Simon Josefsson  <jas@extundo.com>
14763
14764         * lib/base64.h (isbase64): Add.
14765
14766         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14767         using a unsigned prototype, don't inline.
14768         (base64_decode): Use it.
14769
14770 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14771
14772         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14773         it.
14774
14775 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14776
14777         * lib/save-cwd.c (save_cwd): Remove code to support the case
14778         where fchdir is missing or flaky.
14779
14780 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14781
14782         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14783
14784 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14785
14786         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14787         AC_LIBSOURCES now does this.
14788         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14789         with new ullong_max module.
14790
14791 2005-01-19  Bruno Haible  <bruno@clisp.org>
14792
14793         * modules/sh-quote: New file.
14794         * MODULES.html.sh (Executing programs): Add sh-quote.
14795
14796 2005-01-19  Bruno Haible  <bruno@clisp.org>
14797
14798         * lib/sh-quote.h: New file, from GNU gettext.
14799         * lib/sh-quote.c: New file, from GNU gettext.
14800
14801 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14802
14803         Merge from coreutils.
14804         * m4/ullong_max.m4: New file.
14805         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14806         (gl_MACROS): Assume localeconv exists.
14807
14808 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14809
14810         Merge changes from coreutils, as described below in several
14811         changelogs dated today.
14812
14813         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14814         (O_DIRECTORY): Remove; not needed here, since "." must be
14815         a directory.  All uses removed.
14816         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14817         universal on Suns, and we also need to test for IRIX.
14818         Revamp code to use 'if' rather than '#if'.
14819         Avoid unnecessary comparison of cwd->desc to 0.
14820
14821         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14822         for known valid error numbers rather than observed invalid ones.
14823
14824 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * modules/ullong_max: New file.
14827
14828         * modules/chdir-long, modules/openat: New files.
14829         * modules/save-cwd (Depends-on): Depend on chdir-long.
14830         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14831
14832 2005-01-18  Jim Meyering  <jim@meyering.net>
14833
14834         Merge from coreutils.
14835         * m4/chdir-long.m4, m4/openat.m4: New files.
14836         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14837         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14838         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14839         is sane and DOES follow symlinks.  Besides, testing 20 different
14840         systems found no broken chown implementations.
14841         Prompted by a change in rsync's copy of this macro.
14842         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14843
14844         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14845
14846         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14847         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14848         NULL-means-set-to-current-time semantics.
14849         Remove temporary file immediately, rather than waiting
14850         for configure's at-exit trap code to do it.
14851
14852 2005-01-18  Jim Meyering  <jim@meyering.net>
14853
14854         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14855
14856         * lib/utimens.c (futimens): Account for the fact that futimes
14857         can also fail with errno == ENOSYS or errno == ENOENT.
14858         Patch from Dmitry V. Levin.
14859
14860         Change the name of the robust chdir function from chdir to chdir_long.
14861         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14862         (restore_cwd): Use chdir_long, not chdir.
14863         * lib/chdir-long.c: Renamed from chdir.c.
14864         * lib/chdir-long.h: Renamed from chdir.h.
14865         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14866         Hurd.
14867
14868 2005-01-18  Bruno Haible  <bruno@clisp.org>
14869
14870         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14871         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14872         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14873         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14874         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14875         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14876         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14877         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14878         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14879         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14880         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14881         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14882         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14883         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14884         Use an all-permissive copyright notice, recommended by RMS.
14885
14886 2005-01-18  Bob Proulx  <bob@proulx.com>
14887
14888         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14889         simplify offsetof() macro construct to avoid compile failure with
14890         native HP-UX 11.0 ANSI C compiler.
14891
14892 2005-01-17  Bruno Haible  <bruno@clisp.org>
14893
14894         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14895         redundant because stpncpy.m4 takes care of it.
14896
14897 2005-01-17  Bruno Haible  <bruno@clisp.org>
14898
14899         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14900
14901 2005-01-17  Bruno Haible  <bruno@clisp.org>
14902
14903         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14904         used.
14905
14906 2005-01-17  Bruno Haible  <bruno@clisp.org>
14907
14908         * lib/fwriteerror.h (fwriteerror): Change specification to include
14909         fclose.
14910         * lib/fwriteerror.c: Include <stdbool.h>.
14911         (fwriteerror): At the end, close the file stream. Record whether
14912         stdout was already closed.
14913
14914 2005-01-17  Bruno Haible  <bruno@clisp.org>
14915
14916         * lib/execute.c (environ): Declare if needed.
14917         * lib/pipe.c (environ): Likewise.
14918         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14919
14920 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14921
14922         * modules/argp: Depend on vsnprintf
14923
14924 2005-01-10  Jim Meyering  <jim@meyering.net>
14925
14926         * modules/closeout (Depends-on): Add atexit.
14927
14928 2005-01-06  Bruno Haible  <bruno@clisp.org>
14929
14930         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14931
14932 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14933
14934         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14935         definitions to be after all include files, to avoid collisions.
14936         Problem reported by Bob Proulx.
14937
14938 2005-01-04  Jim Meyering  <jim@meyering.net>
14939
14940         Changes imported from coreutils.
14941         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14942         as the mkstemp template, use a temporary directory and an
14943         8.3-friendly template to avoid trouble on systems like DJGPP.
14944         Reported by Juan M. Guerrero via Stepan Kasal.
14945         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14946         close. Remove the temporary directory right away, rather than waiting
14947         for configure's at-exit trap code to do it.
14948         Suggestion from Stepan Kasal.
14949
14950 2005-01-01  Simon Josefsson  <jas@extundo.com>
14951
14952         * gnulib-tool: Print #include directives when --import'ing.
14953
14954 2004-12-28  Simon Josefsson  <jas@extundo.com>
14955
14956         * tests/test-base64.c: Include required header files.  Remove
14957         unused variables.
14958
14959 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         * modules/error (Depends-on): Remove gettext.
14962
14963 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14964
14965         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14966         not needed.  This removes a dependency on the gettext module.
14967         [defined _LIBC]: Do not include <libintl.h>; not needed.
14968
14969 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14970
14971         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14972         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
14973
14974 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14975
14976         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
14977         HAVE_DECL_STRTOLD.
14978
14979 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14980
14981         * modules/getdate (Depends-on): Remove alloca-opt.
14982
14983 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14984
14985         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
14986
14987 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
14988
14989         * lib/argp-parse.c: Include <stddef.h>.
14990         (alignof, alignto): New macros.
14991         (parser_init): Don't assume that void * is aligned sufficiently
14992         for struct option.
14993
14994         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
14995         need to extend the stack.
14996         (YYINITDEPTH): New macro, so that the initial stack isn't overly
14997         large.
14998
14999 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15000
15001         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15002
15003 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15004
15005         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15006         (2004-10-24) change.  Apparently this was a false alarm.
15007
15008         * modules/getdate: Depend on alloca-opt, not alloca.
15009
15010 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15011
15012         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15013         Remove now-obsolete comment about AIX.
15014         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15015         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15016         (YYMAXDEPTH): New macro.
15017
15018 2004-12-18  Simon Josefsson  <jas@extundo.com>
15019
15020         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15021
15022 2004-12-18  Bruno Haible  <bruno@clisp.org>
15023
15024         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15025
15026 2004-12-18  Bruno Haible  <bruno@clisp.org>
15027
15028         * lib/fatal-signal.c (fatal_signals): Make non-const.
15029         (init_fatal_signals): New function.
15030         (uninstall_handlers, install_handlers): Ignore signals that were set to
15031         SIG_IGN.
15032         (at_fatal_signal): Call init_fatal_signals.
15033         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15034         SIG_IGN.
15035         Reported by Paul Eggert.
15036
15037 2004-12-18  Bruno Haible  <bruno@clisp.org>
15038
15039         * doc/alloca.texi: New file.
15040         * doc/alloca-opt.texi: New file.
15041
15042 2004-12-17  Jim Meyering  <jim@meyering.net>
15043
15044         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15045         Otherwise, install-sh could exit with improper exit status when
15046         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15047
15048 2004-12-16  Simon Josefsson  <jas@extundo.com>
15049
15050         * tests/test-base64.c: Add license.
15051
15052 2004-12-15  Stepan Kasal  <address@hidden>
15053
15054         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15055
15056 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15057
15058         * modules/getcwd (Files): Add m4/d-ino.m4.
15059         Suggested by Mark D. Baushke.
15060
15061 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15062
15063         * lib/getdate.y (textint): New member "negative".
15064         (time_zone_hhmm): New function.
15065         Expect 14 shift-reduce conflicts, not 13.
15066         (o_colon_minutes): New rule.
15067         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15068         (yylex): Set the "negative" member of signed numbers.
15069
15070 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15071
15072         * doc/getdate.texi (Time of day items, Time zone items):
15073         Describe new formats +00:00, UTC+00:00.
15074
15075 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15076
15077         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15078         spurious "-l"s.  Problem reported by Stepan Kasal.
15079
15080 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15081
15082         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15083         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15084
15085 2004-12-04  Simon Josefsson  <jas@extundo.com>
15086
15087         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15088         Vandoorselaere <yoann@prelude-ids.org>.
15089
15090 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15091
15092         Changes imported from coreutils.
15093         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15094         exist.
15095         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15096
15097 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15098
15099         Changes imported from coreutils.
15100         * lib/hard-locale.c: Assume <locale.h> exists.
15101         Include "strdup.h".
15102         (GLIBC_VERSION): New macro.
15103         (hard_locale): Assume setlocale exists.
15104         Rewrite to avoid #ifdef.
15105         Use strdup rather than malloc + strcpy.
15106         * lib/human.c: Assume <locale.h> exists.
15107         (human_readable): Assume localeconv exists.
15108
15109 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15110
15111         * modules/hard-locale (Depends-on): Add strdup.
15112
15113 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15114
15115         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15116         convert T2, not T.  (Imported from libc.)
15117
15118 2004-11-30  Simon Josefsson  <jas@extundo.com>
15119
15120         * modules/restrict (License): Change to LGPL.
15121
15122 2004-11-30  Simon Josefsson  <jas@extundo.com>
15123
15124         * m4/restrict.m4: Add copyright and copying conditions.
15125
15126 2004-11-30  Simon Josefsson  <jas@extundo.com>
15127
15128         * m4/base64.m4: New file.
15129
15130 2004-11-30  Simon Josefsson  <jas@extundo.com>
15131
15132         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15133         base64.
15134
15135         * tests/test-base64.c: New file.
15136
15137         * modules/base64: New file.
15138
15139 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15140
15141         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15142         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15143
15144         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15145
15146 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15147
15148         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15149         (__getcwd.c): Don't restore errno; glibc doesn't.
15150         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15151         first, falling back to our code only if its results look suspicious.
15152         Ensure that the resulting buffer is only as large as necessary.
15153
15154         * lib/readutmp.c: Include readutmp.h first.
15155         Include <errno.h>, since readutmp.h no longer does that.
15156         * lib/readutmp.h: Don't include <errno.h>,
15157         <sys/param.h>, <time.h>; not needed to establish interface.
15158         (errno): Remove decl.
15159         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15160         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15161         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15162
15163 2004-11-28  Simon Josefsson  <jas@extundo.com>
15164
15165         * lib/base64.h, base64.c: New file.
15166
15167 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15168
15169         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15170
15171 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15172
15173         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15174         (Depends-on): Remove pathmax, same.  Add mempcpy.
15175         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15176         (Makefile.am): Append getcwd.h to lib_SOURCES.
15177         (Include): Add getcwd.h.
15178         (Maintainer): Change from Jim Meyering to "all, glibc",
15179         since getdate now uses intended-for-glibc code.
15180         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15181         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15182
15183 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15184
15185         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15186         HP's ANSI C compiler.
15187         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15188         Declaring int functions causes warnings on some modern systems and
15189         shouldn't be needed to compile on ancient ones.
15190         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15191         defined.
15192
15193         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15194         with the following changes.
15195         (__set_errno): Parenthesize properly.
15196         Include <stdbool.h>.
15197         (MIN, MAX, MATCHING_INO): New macros.
15198         (__getcwd): Define with prototype, not K&R form.
15199         Use heuristics to allocate default buffer on stack if possible.
15200         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15201         behavior, and to avoid the PATH_MAX limit when computing
15202         ../../../../...
15203         Use MATCHING_INO to compare inode number to file.
15204         Check for arithmetic overflow in size calculations.
15205         Fix bug in reallocation of dot array that caused getcwd to fail
15206         on directories nested deeper than 75.
15207         Be more careful about saving errno on error.
15208         Do not use realloc; use only free+malloc, as this is a bit
15209         more flexible and avoids a needless copy operation.
15210         Do not inspect st_dev and st_ino for symbolic links; POSIX
15211         doesn't specify the latter.
15212         Check for closedir errors.
15213         Avoid needless casts.
15214         Use "#ifdef weak_alias" around weak_alias, to be like other
15215         glibc code.
15216         The following changes to getcwd.c have effect only when used in
15217         gnulib; they have no effect inside glibc proper.
15218         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15219         as alloca isn't used.
15220         (alloca, __alloca): Likewise.
15221         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15222         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15223         unconditionally, as gnulib assumes C89 or better.
15224         Do not include <sys/param.h>.
15225         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15226         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15227         better.
15228         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15229         Include <dirent.h> in a way that is compatible with modern Autoconf.
15230         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15231         New macros, if not already defined.
15232         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15233         Use "_LIBC", not "defined _LIBC", for consistency.
15234         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15235         a mempcpy module.
15236         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15237         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15238         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15239         credit only to Jim Meyering and adjust the copyright dates.
15240         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15241         <stdlib.h>, <unistd.h>, "pathmax.h".
15242         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15243         (INITIAL_BUFFER_SIZE): Remove.
15244         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15245
15246 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15247
15248         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15249         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15250         Use the _ONCE methods, for efficiency.
15251         Check for fcntl.h.  In test program, include <errno.h>
15252         and <fcntl.h> if available.  Remove old K&R cruft from
15253         test program.  Check for common errors in GNU/Linux,
15254         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15255         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15256         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15257         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15258         name accordingly.
15259         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15260         accommodate new getcwd.c.
15261         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15262         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15263         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15264         that's all we need now.
15265
15266 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15267
15268         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15269         argp-parse.c depends on getopt internals, that means we should
15270         always use our getopt, to be on the safe side.
15271         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15272         order not to spoil the result of an eventual previous invocation
15273         of gl_GETOPT_SUBSTITUTE.
15274
15275 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15276
15277         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15278         redefinition warnings. To avoid them, include the defines
15279         in `#if !defined __need_getopt ... #endif'. The only place
15280         where __getopt_argv_const is used is in definitions
15281         of getopt_long and getopt_long_only below, which are as well
15282         protected by `#ifndef __need_getopt'.
15283         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15284         __need_getopt after including <stdio.h> and <unistd.h> These
15285         headers might have defined it.
15286
15287 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15288
15289         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15290
15291 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15292
15293         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15294         (futimens): New function, which uses futimes if available.
15295         (futimens, utimens): Support timespec==NULL, with same semantics
15296         as utime and utimens.
15297         * lib/utimens.h (futimens): New decl.
15298
15299 2004-11-23  Jim Meyering  <jim@meyering.net>
15300
15301         * lib/getopt_.h: Remove trailing blanks.
15302
15303 2004-11-23  Jim Meyering  <jim@meyering.net>
15304
15305         * lib/__fpending.c: Add comment.
15306
15307 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15308
15309         * modules/canonicalize (Depends-on): Add xreadlink.
15310         Problem reported by James Youngman.
15311
15312 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15313
15314         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15315         New macros.
15316         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15317         optopt): Use them instead of invoking ## directly; otherwise, the
15318         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15319
15320 2004-11-19  Bruno Haible  <bruno@clisp.org>
15321
15322         * lib/strtok_r.c: Move comments from here...
15323         * lib/strtok_r.h: ... to here.
15324
15325 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15326
15327         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15328         implementations that mishandle size_t overflow.
15329
15330 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15331
15332         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15333         might fail.  Problem reported by Yoann Vandoorselaere.
15334         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15335         implementations that mishandle size_t overflow.
15336
15337 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15338
15339         * modules/canon-host (Depends-on): Add strdup.
15340
15341 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15342
15343         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15344
15345 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15346
15347         * lib/canon-host.c: Include "strdup.h".
15348         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15349         Use strdup instead of malloc/strcpy to duplicate strings.
15350
15351         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15352         (human_space_before_unit): New constant.
15353         * lib/human.c (human_readable): Support it.
15354
15355         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15356         (xgetcwd): Set errno correctly when failing.
15357         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15358         the failure is actually due to a PATH_MAX problem.
15359
15360         Further getopt changes to make it more likely that glibc will
15361         buy the changes back.
15362         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15363         (getopt): Use it, so to preserve glibc semantic
15364         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15365         when compiling for libc.
15366         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15367         (getopt_long, getopt_long_only): Use it.
15368
15369         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15370         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15371         (getopt): Argv is now char * const *, as per standard.
15372         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15373         not char *__getopt_argv_const *.
15374         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15375         _getopt_long_only_r): Likewise.
15376         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15377         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15378         _getopt_long_r, _getopt_long_only_r): Likewise.
15379         * lib/getopt_.h (__getopt_argv_const): Remove.
15380         (getopt): Argv is now char * const *, as per standard.
15381
15382         * lib/getdate.y (tORDINAL): New token.
15383         (day, relunit): Allow it for relative times.
15384         (relative_time_table): Use tORDINAL for ordinals.
15385
15386 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15387
15388         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15389         Document that "second" isn't allowed as an ordinal number.
15390
15391 2004-11-16  Jim Meyering  <jim@meyering.net>
15392
15393         * modules/closeout (Depends-on): Add fpending.
15394
15395 2004-11-15  Jim Meyering  <jim@meyering.net>
15396
15397         * lib/closeout.c: Include "__fpending.h" once again.
15398         Include <stdbool.h>.
15399         (close_stdout): Don't fail just because stdout was closed initially,
15400         since some programs don't write to stdout in the normal course of
15401         operation (other than --version and --help), and we don't want this
15402         function to make e.g. `touch file >&-' fail.
15403         But do fail if it was closed and someone has tried to write to it.
15404         E.g., `printf foo >&-' must fail.
15405
15406 2004-11-13  Jim Meyering  <jim@meyering.net>
15407
15408         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15409
15410 2004-11-12  Simon Josefsson  <jas@extundo.com>
15411
15412         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15413         small doc fix is still pending.
15414
15415 2004-11-11  Simon Josefsson  <jas@extundo.com>
15416
15417         * modules/strtok_r: New file.
15418
15419         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15420         strtok_r.
15421
15422 2004-11-11  Simon Josefsson  <jas@extundo.com>
15423
15424         * m4/strtok_r.m4: New file.
15425
15426         * m4/getopt.m4: Replace opterr.
15427
15428 2004-11-11  Simon Josefsson  <jas@extundo.com>
15429
15430         * lib/strtok_r.h, strtok_r.c: New file.
15431
15432 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15433
15434         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15435         of replacing opterr, getopt, etc.  This should handle the
15436         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15437
15438 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15439
15440         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15441         we can stop lying to compilers about the constness of argv when we
15442         are compiled outside glibc.
15443         (getopt, getopt_long, getopt_long_only): Use it.
15444         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15445         _getopt_internal, getopt): Likewise.
15446         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15447         _getopt_long_only_r): Likewise.
15448         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15449         _getopt_long_r, _getopt_long_only_r): Likewise.
15450
15451         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15452         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15453         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15454         the other external symbols.
15455         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15456         declaration, since the above renaming now works around collisions.
15457
15458 2004-11-11  Jim Meyering  <jim@meyering.net>
15459
15460         * lib/linebreak.c: Remove trailing blanks.
15461         * lib/alloca_.h: Likewise.
15462         * lib/acosl.c: Likewise.
15463         * lib/euidaccess.c: Likewise.
15464         * lib/allocsa.h: Likewise.
15465
15466 2004-11-10  Simon Josefsson  <jas@extundo.com>
15467
15468         * m4/getaddrinfo.m4: New file.
15469
15470 2004-11-10  Simon Josefsson  <jas@extundo.com>
15471
15472         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15473
15474 2004-11-10  Simon Josefsson  <jas@extundo.com>
15475
15476         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15477         getaddrinfo.
15478
15479         * modules/getaddrinfo: New file.
15480
15481 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15482
15483         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15484
15485 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15486
15487         * lib/mktime.c (SHR): New macro, which is a portable
15488         substitute for >> that should work even on Crays.
15489         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15490         Problem reported by Mark D. Baushke in
15491         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15492         * lib/getdate.y (SHR): Likewise.
15493         (tm_diff): Use it.
15494         * lib/strftime.c (SHR): Likewise.
15495         (tm_diff): Use it.
15496         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15497         quote_these_too, so that right shifts are well defined.  All uses
15498         changed.
15499
15500 2004-11-10  Jim Meyering  <jim@meyering.net>
15501
15502         Ensure that no close failure goes unreported.
15503         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15504         return early when it seems there's nothing to flush.
15505         Don't include __fpending.h.
15506
15507 2004-11-10  Jim Meyering  <jim@meyering.net>
15508
15509         * modules/closeout (Depends-on): Remove fpending.
15510
15511 2004-11-10  Jim Meyering  <jim@meyering.net>
15512
15513         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15514
15515 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15516
15517         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15518         gl_FUNC_STRFTIME.
15519         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15520         and AC_REQUIRE when possible, to avoid duplicate checks.
15521         Check for <wchar.h>.
15522
15523 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15524
15525         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15526
15527 2004-11-09  Bruno Haible  <bruno@clisp.org>
15528
15529         * m4/sockpfaf.m4: New file.
15530
15531 2004-11-05  Bruno Haible  <bruno@clisp.org>
15532
15533         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15534         Reported by Mark D. Baushke <mdb@cvshome.org>.
15535
15536 2004-11-04  Bruno Haible  <bruno@clisp.org>
15537
15538         2004-09-11  Bruno Haible  <bruno@clisp.org>
15539                 * allocsa.valgrind: New file.
15540         2004-02-06  Bruno Haible  <bruno@clisp.org>
15541                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15542                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15543                 Reported by Christopher Seip <chris.seip@hp.com>.
15544
15545 2004-11-04  Bruno Haible  <bruno@clisp.org>
15546
15547         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15548         (Makefile.am): Distribute it.
15549
15550 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15553         with errno == ERANGE if the buffer is too small.
15554         Problem reported by Mark D. Baushke.
15555
15556 2004-11-03  Albert Chin  <china@thewrittenword.com>
15557             Paul Eggert  <eggert@cs.ucla.edu>
15558
15559         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15560         equivalent, substitute $ac_type for equivalent type rather than
15561         blindly using uint32_t *always* which won't work if uint32_t is not
15562         available.  Define _UINT32_T to work around typedef of uint32_t if
15563         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15564         2.5.1.
15565
15566 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15567
15568         * m4/jm-macros.m4: Sync from coreutils.
15569         (gl_MACROS): Check for mbrlen, for pathchk.
15570         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15571
15572 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15573
15574         * lib/xreadlink.c (MAXSIZE): New macro.
15575         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15576         size does not exceed MAXSIZE.  Avoid cast.
15577         As suggested by Mark D. Baushke in
15578         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15579         if readlink fails with buffer size just under MAXSIZE, try again
15580         with MAXSIZE.
15581
15582 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15583
15584         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15585
15586 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15587         and  Paul Eggert  <eggert@cs.ucla.edu>
15588
15589         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15590         (get_date): Overparenthesize to avoid GCC warning.
15591
15592 2004-11-02  Bruno Haible  <bruno@clisp.org>
15593
15594         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15595         returns void.
15596
15597 2004-11-02  Bruno Haible  <bruno@clisp.org>
15598
15599         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15600         function returns void.
15601
15602 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15603
15604         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15605         fflush_unlocked, flockfile, funlockfile, funlockfile,
15606         fputs_unlocked, putc_unlocked.
15607
15608 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15609
15610         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15611         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15612         already declared.
15613
15614 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15615
15616         * modules/getdate (Files): Add doc/getdate.texi.
15617         (Depends-on): Add setenv, xalloc.
15618
15619 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15620
15621         * lib/getdate.y: Add support for TZ="foo" within a date string.
15622         Fix some bugs near time_t boundaries.  Reject dates with
15623         out-of-range components, e.g., "Sept 31".
15624         Include <stdlib.h>, "setenv.h", "xalloc.h".
15625         (ISDIGIT_LOCALE): Remove; unused.
15626         Note that the TZ and time functions used here are not reentrant.
15627         (mktime_ok, get_tz): New functions.
15628         (TZBUFSIZE): New constant.
15629         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15630         This requires that we sometimes generate our own TZ="XXX..." setting.
15631
15632 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15633
15634         * doc/getdate.texi: New file, from coreutils with modifications for
15635         the new TZ parsing.
15636
15637 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15638
15639         * lib/mktime.c (not_equal_tm): Remove redundant check.
15640
15641 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15642
15643         * modules/regex (lib_SOURCES): Add regex.c.
15644         Reported by James Youngman in
15645         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15646
15647 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15648
15649         * lib/getdate.y: Use Bison 1.875 features, and some minor
15650         code cleanups.  This change does not affect semantics.
15651         Don't include <stdlib.h>; no longer needed.
15652         Don't include unlocked-io.h; only the "#if TEST" code uses
15653         stdio, and performance isn't crucial there.
15654         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15655         Bison 1.875 features as described below.
15656         All uses of "PC." replaced by "pc->".
15657         (YYSTYPE): Add a forward declaration.
15658         (yylex, yyerror): Use full prototypes in forward decls.
15659         Use "%pure-parser" rather than obsolescent "%pure_parser".
15660         Use %parse-param and %lex-param instead of obsolescent
15661         YYPARSE_PARAM and YYLEX_PARAM.
15662         (meridian_table, month_and_day_table, time_units_table,
15663         relative_time_table, time_zone_table, military_table,
15664         lookup_zone, lookup_word, get_date):
15665         Use NULL instead of 0 where appropriate.
15666         (to_hour): Avoid abort (), to avoid a dependency on
15667         stdlib.h.
15668         (yyerror, yylex): Now accepts parser_control * arg.
15669         (main) [TEST]: Use '\0' rather than 0 for char.
15670
15671 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15672
15673         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15674
15675 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15678         It's now the caller's responsibility to handle the case where
15679         !HAVE_GETPAGESIZE && !defined getpagesize.
15680
15681         * lib/mktime.c (leapyear): Arg is long int, not int.
15682
15683 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15684
15685         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15686
15687 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15690         missing.  Problem reported by James Youngman.
15691
15692 2004-10-16  Simon Josefsson  <jas@extundo.com>
15693
15694         * gnulib-tool: Fix comments.  Fix parse problem.
15695         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15696
15697 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15698
15699         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15700         implementation of getopt_long.  Problem reported by Alexander Taler in:
15701         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15702
15703 2004-10-15  Bruno Haible  <bruno@clisp.org>
15704
15705         * gnulib-tool: Untabify. Initialize supplied_libname.
15706         (func_usage): More homogenous output.
15707         (func_modules_transitive_closure, func_modules_to_filelist,
15708         func_emit_lib_Makefile_am): New functions.
15709         (func_import): New function, extracted from big case statement. Use
15710         func_get_license, func_modules_transitive_closure,
15711         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15712         opt_lgpl. Don't use test -a, as it's not portable.
15713         (func_create_testdir): Use func_modules_transitive_closure,
15714         func_modules_to_filelist, func_emit_lib_Makefile_am.
15715
15716 2004-10-15  Bruno Haible  <bruno@clisp.org>
15717
15718         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15719
15720 2004-10-15  Bruno Haible  <bruno@clisp.org>
15721
15722         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15723         the portions belonging to each module.
15724         Suggested by Derek Robert Price <derek@ximbiot.com>.
15725
15726 2004-10-12  Simon Josefsson  <jas@extundo.com>
15727
15728         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15729         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15730         to real functions.
15731
15732 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15733
15734         * modules/vsnprintf: New file.
15735
15736 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15737
15738         * m4/vsnprintf.m4: New file.
15739
15740 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15741
15742         * lib/vsnprintf.h: New file.
15743         * lib/vsnprintf.c: New file.
15744
15745 2004-10-11  Bruno Haible  <bruno@clisp.org>
15746
15747         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15748         vsnprintf.
15749
15750 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15753
15754 2004-10-07  Bruno Haible  <bruno@clisp.org>
15755
15756         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15757         fits into the provided buffer.
15758
15759 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15760
15761         * lib/diacrit.c, diacrit.h: Add GPL notice.
15762
15763         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15764         notice.
15765         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15766         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15767         This avoids a potential constant-folding bug.
15768
15769 2004-10-05  Bruno Haible  <bruno@clisp.org>
15770
15771         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15772         for the declaration of strsep.
15773
15774 2004-10-05  Bruno Haible  <bruno@clisp.org>
15775
15776         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15777
15778 2004-10-04  Simon Josefsson  <jas@extundo.com>
15779
15780         * modules/memmem: New file.
15781         * tests/test-memmem.c: New file.
15782         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15783
15784 2004-10-04  Simon Josefsson  <jas@extundo.com>
15785
15786         * m4/memmem.m4: New file.
15787
15788 2004-10-04  Simon Josefsson  <jas@extundo.com>
15789
15790         * lib/memmem.h: New file.
15791         * lib/memmem.c: New file, taken from glibc.
15792
15793 2004-10-04  Simon Josefsson  <jas@extundo.com>
15794
15795         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15796         '#ifdef USE_UNLOCKED_IO'.
15797
15798 2004-10-04  Simon Josefsson  <jas@extundo.com>
15799
15800         * config/srclist.txt: Add memmem from glibc.
15801
15802 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15803
15804         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15805
15806         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15807         modules/exclude, modules/getdate, modules/getline,
15808         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15809         modules/getusershell, modules/linebuffer, modules/md5,
15810         modules/mountlist, modules/posixtm, modules/readtokens,
15811         modules/readutmp, modules/regex, modules/sha1,
15812         modules/version-etc, modules/yesno:
15813         Remove dependency on unlocked-io.
15814
15815 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15816
15817         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15818
15819         * m4/unlocked-io.m4: Add copyright notice.
15820         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15821
15822 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15823
15824         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15825         * lib/xmalloc.c (xmemdup): Likewise.
15826         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15827         XFREE): Remove these long-obsolescent macros.
15828         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15829         * lib/xstrdup.c: Remove.
15830
15831         * lib/regex.c (re_comp): Cast gettext return value to char *,
15832         Problem reported by Martin Neitzel via Mark D. Baushke.
15833
15834 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15835
15836         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15837         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15838         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15839         regex.c, sha1.c, version-etc.c, yesno.c:
15840         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15841         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15842         the includer's responsibility.
15843
15844         Sync from coreutils.
15845
15846         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15847         points to the start of a string, as the C Standard says the
15848         resulting behavior is undefined.
15849
15850         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15851         simple -> simple_backups, numbered_existing ->
15852         numbered_existing_backups, numbered -> numbered_backups
15853         to avoid shadowing problems.  All uses changed.
15854         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15855         * lib/backupfile.c (check_extension, numbered_backup):
15856         Rename locals to avoid shadowing 'basename'.
15857         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15858         once.
15859
15860         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15861         * lib/.cvsignore: Add getopt.h.
15862
15863 2004-10-04  Bruno Haible  <bruno@clisp.org>
15864
15865         * modules/README: New file.
15866         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15867         not a module.
15868
15869 2004-10-02  Jim Meyering  <jim@meyering.net>
15870
15871         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15872
15873 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15874
15875         * modules/strsep: New file.
15876
15877 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15878
15879         * m4/strsep.m4: New file.
15880
15881 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15882
15883         * lib/strsep.h: New file.
15884         * lib/strsep.c: New file.
15885
15886 2004-10-01  Simon Josefsson  <jas@extundo.com>
15887
15888         * lib/snprintf.c (snprintf): Handle size==0.
15889
15890 2004-10-01  Simon Josefsson  <jas@extundo.com>
15891             Bruno Haible  <bruno@clisp.org>
15892
15893         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15894         (snprintf): Declare 'args'.
15895
15896 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15897
15898         * lib/snprintf.c: Remove comments as to why each header is needed.
15899
15900 2004-10-01  Bruno Haible  <bruno@clisp.org>
15901
15902         * MODULES.html.sh: Add strsep.
15903
15904 2004-09-30  Simon Josefsson  <jas@extundo.com>
15905
15906         * modules/snprintf: New file.
15907
15908 2004-09-30  Simon Josefsson  <jas@extundo.com>
15909
15910         * m4/snprintf.m4: New file.
15911
15912 2004-09-30  Simon Josefsson  <jas@extundo.com>
15913
15914         * lib/snprintf.h, lib/snprintf.c: New files.
15915
15916 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15917
15918         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15919         (hol_entry_help): Never translate an empty string.
15920         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15921         * lib/argp.h (OPTION_NO_TRANS): New option.
15922
15923 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15924
15925         * modules/argp (Maintainer): Replace Simon Josefsson
15926         by Sergey Poznyakoff.
15927
15928 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15929
15930         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15931         changes merged back into glibc.
15932
15933 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15934
15935         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15936
15937 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15938
15939         * lib/xvasprintf.c: Include xalloc.h.
15940         (xvasprintf): Use xalloc_die, not xmalloc_die.
15941
15942 2004-09-29  Bruno Haible  <bruno@clisp.org>
15943
15944         * modules/alloca-opt: New file, derived from modules/alloca.
15945         * modules/allocsa: Depend on alloca-opt instead of alloca.
15946         * modules/setenv: Likewise.
15947         * modules/vasnprintf: Likewise.
15948         * MODULES.html.sh: Add alloca-opt.
15949
15950 2004-09-28  Simon Josefsson  <jas@extundo.com>
15951
15952         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15953         LGPL, and to replace license template from GPL to LGPL.
15954
15955 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * modules/dummy: Change license to LGPL.
15958
15959 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15960
15961         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15962
15963 2004-09-24  Simon Josefsson  <jas@extundo.com>
15964
15965         * modules/minmax (License): Change from GPL to LGPL.
15966
15967 2004-09-23  Simon Josefsson  <jas@extundo.com>
15968
15969         * gnulib-tool (--import): Typo.
15970
15971 2004-09-23  Simon Josefsson  <jas@extundo.com>
15972
15973         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
15974
15975 2004-09-22  Bruno Haible  <bruno@clisp.org>
15976
15977         * modules/*: Add 'License' field.
15978         * gnulib-tool: Accept --extract-license option.
15979         (func_get_license): New function.
15980
15981 2004-09-21  Bruno Haible  <bruno@clisp.org>
15982
15983         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
15984         Reported by Simon Josefsson.
15985
15986 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15987
15988         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
15989         gl_AC_TYPE_LONG_LONG.
15990
15991 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
15992
15993         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
15994
15995 2004-09-18  Simon Josefsson  <jas@extundo.com>
15996         and  Paul Eggert  <eggert@cs.ucla.edu>
15997
15998         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
15999         calls with autoreconf.  Define GL_LIB.
16000
16001 2004-09-14  Karl Berry  <karl@gnu.org>
16002
16003         * config/srclist.txt: unsync setenv.c, sigh.
16004
16005 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16006
16007         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16008         Problem reported by Bruno Haible in:
16009         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16010
16011 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16012
16013         * config/srclist.txt: Comment out argp-pvh.c.
16014
16015 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16016
16017         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16018         in case some system header has #define'd it.  Problem reported by
16019         Soeren D. Schulze in
16020         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16021
16022 2004-09-09  Karl Berry  <karl@gnu.org>
16023
16024         * regex.[ch]: delete from the root.  These were supposed to be
16025                 synced with emacs cvs, but this has not happened for about
16026                 a year, and anyway nothing else uses emacs regex.[ch].
16027                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16028                 lib/regex[.ch] is untouched.
16029
16030 2004-09-09  Bruno Haible  <bruno@clisp.org>
16031
16032         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16033
16034 2004-09-09  Bruno Haible  <bruno@clisp.org>
16035
16036         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16037         modifications.
16038         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16039
16040 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16041
16042         * modules/xvasprintf: New file.
16043         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16044
16045 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16046
16047         * lib/xvasprintf.h: New file.
16048         * lib/xvasprintf.c: New file.
16049         * lib/xasprintf.c: New file.
16050
16051 2004-09-08  Bruno Haible  <bruno@clisp.org>
16052
16053         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16054
16055 2004-09-08  Bruno Haible  <bruno@clisp.org>
16056
16057         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16058         length is > INT_MAX.
16059         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16060         more.
16061
16062 2004-09-08  Bruno Haible  <bruno@clisp.org>
16063
16064         * lib/stdint_.h: New file, taken from GNU clisp.
16065
16066 2004-09-08  Bruno Haible  <bruno@clisp.org>
16067             Oskar Liljeblad  <oskar@osk.mine.nu>
16068
16069         * modules/stdint: New file.
16070         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16071
16072 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16073
16074         Import from coreutils.
16075         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16076         strings on unbounded length.  alloca's performance benefits aren't
16077         that important here.
16078         (V_STRDUP): Remove.
16079         (parse_with_separator): New function, with most of the internals
16080         of the old parse_user_spec.  Allow user to omit both user and group,
16081         for compatibility with FreeBSD.
16082         Clone only the user name, not the entire spec.
16083         Do not set *uid, *gid unless entirely successful.
16084         Avoid memory leak in some failing cases.
16085         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16086         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16087         (parse_user_spec): Rewrite to use parse_with_separator.
16088
16089 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16090
16091         * modules/userspec: Don't depend on alloca.
16092
16093 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16094
16095         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16096
16097 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16098
16099         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16100         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16101         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16102
16103 2004-08-16  Simon Josefsson  <jas@extundo.com>
16104
16105         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16106         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16107         Add --dry-run for --import.
16108         Let user provided command line parameters override configure.ac
16109         settings.
16110
16111 2004-08-12  Simon Josefsson  <jas@extundo.com>
16112
16113         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16114         as discussed with Paul Eggert in threads rooted at
16115         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16116         and
16117         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16118         Before, the test was empty, and relied on ELIDE_CODE in source
16119         code.)
16120         (gl_PREREQ_GETOPT): New macro.
16121         (gl_GETOPT): Use them.
16122
16123 2004-08-12  Simon Josefsson  <jas@extundo.com>
16124
16125         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16126         * lib/getopt_.h: Renamed from getopt.h.
16127
16128 2004-08-12  Simon Josefsson  <jas@extundo.com>
16129
16130         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16131         Change default library name from libfoo to libgnu.
16132         Now, if you have a configure.ac that says:
16133                 gl_SOURCE_BASE(gl)
16134                 gl_M4_BASE(gl/m4)
16135                 gl_MODULES(error getopt etcetera)
16136                 gl_INIT
16137         you can import all you need by running:
16138                 ../gnulib/gnulib-tool --import
16139
16140         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16141         (Makefile.am): Rewrite, use logic from argz.
16142         (Include): Use <getopt.h> instead of "getopt.h".
16143
16144 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16145
16146         * modules/argp (Files): Add m4/unlocked-io.m4.
16147         (Depends-on): Add extensions.
16148
16149 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16150
16151         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16152         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16153         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16154         Check for program_invocation_name, program_invocation_short_name,
16155         flockfile, funlockfile, features.h, _getopt_long_only_r.
16156
16157 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16158
16159         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16160         its complicated substitute.
16161         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16162         and program_invocation_name.
16163         (__argp_basename) [!_LIBC]: Remove; the only use was
16164         replaced by its body.
16165         (__argp_short_program_name): Change condition from
16166         !defined __argp_short_program_name to
16167         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16168         to match argp-namefrob.h.
16169         (__argp_failure): Don't assume strerror_r returns char *.
16170         * lib/argp-parse.c (N_): Define unconditionally.
16171         (argp_default_options): Fill out initializers with 0 to avoid
16172         gcc warnings.
16173
16174 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16175
16176         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16177         getopt1.c.
16178
16179 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16180
16181         Merge from coreutils.
16182
16183         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16184
16185         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16186         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16187
16188 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16189
16190         Merge from coreutils.
16191
16192         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16193         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16194         for Reliant Unix 5.43.
16195
16196         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16197         (union fooround): Use uintmax_t, not long int.
16198         The rest is a merge from libc:
16199         [defined _LIBC]: Include <shlib-compat.h>.
16200         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16201
16202         * lib/settime.c (settime): Recode to avoid warning with
16203         Sun Forte C 6U2.
16204
16205         * lib/strverscmp.c: Convert to UTF-8.
16206
16207 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16208
16209         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16210         m4/uintmax_t.m4.
16211
16212 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16213
16214         * modules/xalloc-die: New file.
16215         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16216
16217         * modules/md5 (Files): Add m4/uint32_t.m4.
16218         * modules/sha1: Renamed from modules/sha.
16219         (Files):
16220         Rename lib/sha.h to lib/sha1.h.
16221         Rename lib/sha.c to lib/sha1.c.
16222         Rename m4/sha.m4 to m4/sha1.m4.
16223         (lib_SOURCES): Likewise.
16224         (configure.ac): Rename gl_SHA to gl_SHA1.
16225         (Include): sha.h -> sha1.h.
16226
16227 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16228
16229         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16230         * m4/sha1.m4: Renamed from sha.m4.
16231         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16232
16233 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16234
16235         * lib/obstack.h (obstack_empty_p):
16236         Don't assume that chunk->contents is suitably aligned.
16237         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16238         Likewise. Problem reported by Benno in
16239         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16240
16241         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16242         readable.  This could be improved further but it'd take some work.
16243
16244 2004-08-08  Simon Josefsson  <jas@extundo.com>
16245
16246         * modules/xgethostname (Depends-on): Remove exit and error (not
16247         used).
16248
16249         * modules/getpass-gnu: Add getpass.h.
16250         (Depends-on): Add stdbool.
16251         * modules/getpass: Add getpass.h.
16252
16253 2004-08-08  Simon Josefsson  <jas@extundo.com>
16254
16255         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16256         Check getpass declaration.
16257
16258 2004-08-08  Simon Josefsson  <jas@extundo.com>
16259
16260         * lib/xgethostname.c: Don't include error.h (not used).
16261
16262         * lib/getpass.h: Add.
16263         * lib/getpass.c: Include getpass.h first.
16264
16265 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16266
16267         * lib/xalloc-die.c: New file.
16268         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16269         All uses removed.
16270         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16271         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16272         xalloc-die.c.
16273         (_, N_, xalloc_die): Move to xalloc-die.c.
16274         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16275         so that we needn't mess with xalloc_msg_memory_exhausted.
16276
16277         * lib/sha1.h: Renamed from sha.h.
16278         (SHA1_H): Renamed from _SHA_H.
16279         (sha1_ctx): Renamed from sha_ctx.
16280         (sha1_init_ctx): Renamed from sha_init_ctx.
16281         (sha1_process_block): Renamed from sha_process_block.
16282         (sha1_process_bytes): Renamed from sha_process_bytes.
16283         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16284         (sha1_read_ctx): Renamed from sha_read_ctx.
16285         (sha1_stream): Renamed from sha_stream.
16286         (sha1_buffer): Renamed from sha_buffer.
16287         * lib/sha1.c: Likewise; renamed from sha.c.
16288         Do not include <sys/types.h>.
16289         Include <stddef.h> rather than <stdlib.h>.
16290
16291 2004-08-08  Bruno Haible  <bruno@clisp.org>
16292
16293         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16294         FILESYSTEM_PREFIX_LEN.
16295         * lib/progreloc.c: Likewise.
16296         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16297
16298 2004-08-06  Simon Josefsson  <jas@extundo.com>
16299
16300         * modules/progname (Depends-on): Don't depend on stdbool.
16301
16302 2004-08-06  Simon Josefsson  <jas@extundo.com>
16303
16304         * modules/getsubopt: New file.
16305         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16306         getsubopt.
16307
16308 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16309
16310         More merge from coreutils.
16311
16312         * m4/utimens.m4, m4/utimecmp.m4: New files.
16313         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16314         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16315         prereq.m4, sha.m4: Import changes from coreutils.
16316
16317 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16318
16319         More merge from coreutils.
16320         * modules/raise, modules/readtokens0, modules/utimens:
16321         * modules/utimecmp, module/xnanosleep: New files.
16322         * modules/strftime: Add lib/strftime.h.
16323         Change include from <time.h> to "strftime.h".
16324         * modules/yesno: Add lib/yesno.h.
16325         * modules/backupfile: Remove lib/addext.c.
16326         * modules/euidaccess: Add stat-macros.h.
16327         * modules/canonicalize, modules/euidaccess,
16328         modules/filemode, modules/lchown, modules/makepath,
16329         modules/rmdir, modules/stat: Likewise.
16330
16331 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16332
16333         Merge from tar.
16334         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16335         SIZE_MAX is a valid preprocessor constant.
16336         (__argp_basename): Change from "#ifndef _LIBC"
16337         to "#ifndef __argp_short_program_name", so that
16338         we don't compile these functions for tar.
16339
16340         More merges from coreutils.
16341         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16342         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16343         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16344         * lib/addext.c: Remove; no longer needed.
16345         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16346         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16347         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16348         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16349         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16350         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16351         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16352         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16353         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16354         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16355         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16356         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16357         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16358         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16359         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16360         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16361         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16362         Import changes from coreutils.
16363
16364 2004-08-05  Simon Josefsson  <jas@extundo.com>
16365
16366         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16367
16368 2004-08-05  Simon Josefsson  <jas@extundo.com>
16369
16370         * m4/getsubopt.m4: New file.
16371
16372 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16373
16374         Merge from coreutils.
16375
16376         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16377         * m4/getcwd-path-max.m4: New files.
16378
16379         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16380         FILESYSTEM_PREFIX_LEN ->
16381         FILE_SYSTEM_PREFIX_LEN.
16382         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16383         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16384         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16385         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16386
16387         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16388         prerequisite modules now handle the DOS stuff.
16389         Don't check for unistd.h.
16390
16391 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16392
16393         Merge from coreutils.
16394
16395         * lib/.gdb-history: Remove; this doesn't belong here.
16396
16397         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16398         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16399         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16400         * lib/getcwd.c: New files.
16401
16402         * lib/dirname.h: Include <stdbool.h>.
16403         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16404         for consistency with POSIX terminology.  All uses changed.
16405         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16406         (strip_trailing_slashes): Use bool for booleans.
16407         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16408
16409         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16410         sometimes returns a positive errno value even when it succeeds.
16411         (print_errno_message) [!LIBC]: Fall back on strerror if
16412         __strerror_r fails.
16413
16414         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16415         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16416         (longest_relative_suffix): New function.
16417         (path_concat): Use it.  Assume first argument is not NULL.
16418         Port to DOS.  Omit redundant separators.
16419         Report an error instead of returning NULL.
16420         Use mempcpy instead of memcpy.
16421         (xpath_concat): Remove: not declared or used.
16422
16423         * lib/same.h: Include <stdbool.h>
16424         (same_name): Return bool, not int.
16425         * lib/same.c (same_name): Likewise.
16426         (errno): Don't declare; we assume C89 or better now.
16427
16428         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16429         if not already defined.
16430
16431         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16432         * lib/dup-safer.c (errno): Likewise.
16433
16434 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16435
16436         Merge from coreutils.
16437         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16438         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16439         * modules/path-concat: Don't depend on strdup.
16440
16441 2004-08-03  Simon Josefsson  <jas@extundo.com>
16442
16443         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16444         * lib/progname.h: Don't include stdbool.h.
16445
16446 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16447
16448         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16449         * MODULES.html.sh (func_all_modules): Remove fatal.
16450
16451 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16452
16453         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16454
16455 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16456
16457         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16458         working.
16459
16460 2004-08-02  Simon Josefsson  <jas@extundo.com>
16461
16462         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16463         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16464         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16465
16466 2004-08-01  Simon Josefsson  <jas@extundo.com>
16467
16468         * lib/xgetdomainname.c: Include stdlib.h, for free().
16469
16470 2004-07-19  Bruno Haible  <bruno@clisp.org>
16471
16472         * MODULES.html.sh (func_all_modules): Add dummy.
16473
16474 2004-07-16  Simon Josefsson  <jas@extundo.com>
16475
16476         * modules/dummy: New file.
16477
16478 2004-07-16  Simon Josefsson  <jas@extundo.com>
16479
16480         * lib/dummy.c: New file.
16481
16482 2004-07-16  Bruno Haible  <bruno@clisp.org>
16483
16484         * lib/backupfile.h: Add extern "C" for C++.
16485         * lib/closeout.h: Likewise.
16486         * lib/copy-file.h: Likewise.
16487         * lib/findprog.h: Likewise.
16488         * lib/full-write.h: Likewise.
16489         * lib/pathname.h: Likewise.
16490         * lib/progname.h: Likewise.
16491         * lib/stpcpy.h: Likewise.
16492         * lib/stpncpy.h: Likewise.
16493         * lib/strcase.h: Likewise.
16494         * lib/strstr.h: Likewise.
16495         * lib/xalloc.h: Likewise.
16496
16497         * lib/mbswidth.h: Add extern "C" for C++.
16498         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16499
16500 2004-07-13  Robert Millan  <robertmh@gnu.org>
16501
16502         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16503
16504 2004-07-09  Simon Josefsson  <jas@extundo.com>
16505
16506         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16507         failed without this.)
16508
16509 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16510
16511         * modules/chown (Files): Add lib/fchown-stub.c, since
16512         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16513
16514 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16515
16516         * lib/fchown-stub.c: New file.
16517
16518 2004-06-24  Jim Meyering  <jim@meyering.net>
16519
16520         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16521
16522 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16523
16524         * modules/argz: Omit "#include".
16525
16526         * MODULES.html.sh (func_all_modules): Add calloc, to match
16527         2004-06-01 addition of calloc module.
16528
16529 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16530
16531         * m4/argz.m4: New file, which is autoupdated from libtool.
16532
16533 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16534
16535         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16536         libtool.
16537
16538 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16539
16540         * config/srclist-update: Don't insist on "USA." before the
16541         close-comment, as libtool omits the period and puts the */ on a
16542         separate line.
16543         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16544         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16545
16546 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16547
16548         * modules/argz: New file.
16549         * MODULES.html.sh (func_all_modules): Add argz.
16550
16551 2004-06-12  Jim Meyering  <jim@meyering.net>
16552         and  Paul Eggert  <eggert@cs.ucla.edu>
16553
16554         * modules/hash (Files): Add lib/xalloc.h.
16555         * modules/pipe (Depends-on): Add wait-process.
16556         * modules/stat (Depends-on): Add xalloc.
16557         * modules/userspec (Files): Add lib/userspec.h.
16558         * modules/xstrto
16559
16560         Upgrade from gettext-0.13.
16561         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16562         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16563         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16564
16565 2004-06-10  Jim Meyering  <jim@meyering.net>
16566
16567         * lib/calloc.c: New file.
16568
16569 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16570
16571         * lib/getdate.y (yylex): Allow space between sign and number.
16572         Problem reported by Dan Jacobson.
16573
16574 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16575
16576         Merge from coreutils CVS.
16577
16578         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16579         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16580         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16581         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16582         xstrtol.m4: Fix copyright date and/or serial number.
16583
16584         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16585         See if we need an fchown replacement.
16586         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16587         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16588         and use the replacement function if we detect either defect.
16589
16590         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16591         gl_UTIMECMP.
16592
16593 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16594         and  Jim Meyering  <jim@meyering.net>
16595
16596         Merge from coreutils CVS.
16597
16598         * lib/stat-macros.h: New file, with contents from file-type.h
16599         and coreutils' system.h.
16600         * lib/file-type.c: Include "stat-macros.h".
16601         * lib/file-type.h (file_type): Move all macro definitions to new file,
16602         stat-macros.h.
16603
16604         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16605         Wrap old code with this conditional.
16606         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16607         function that does not dereference symlinks.
16608         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16609
16610         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16611         dependency problems.
16612         (xreadlink): Accept new arg SIZE, for efficiency.
16613         All decls and uses changed.
16614         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16615
16616         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16617         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16618
16619         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16620         sysexits.h.
16621
16622 2004-06-01  Jim Meyering  <jim@meyering.net>
16623
16624         * m4/calloc.m4: New file.
16625
16626 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16627
16628         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16629         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16630         Also, fix a typo in a diagnostic.
16631
16632 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16633
16634         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16635         or AC_FUNC_REALLOC.
16636
16637 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16638
16639         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16640         macros to be defined.
16641         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16642         the allocator returns NULL because the requested size is zero.
16643
16644 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16645
16646         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16647         var.  Add comment explaining why libc still defines it.  This
16648         merges the following patch from glibc:
16649         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16650
16651 2004-05-20  Andreas Schwab  <schwab@suse.de>
16652
16653         * m4/free.m4: Replace free if it not known to work, not the other
16654         way round.
16655
16656 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16657
16658         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16659         present in glibc since revision 1.1 of this file.
16660         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16661         obstack_alignment_mask, obstack_alloc, obstack_base,
16662         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16663         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16664         obstack_grow0, obstack_init, obstack_int_grow,
16665         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16666         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16667         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16668         nonexistent functions.
16669
16670 2004-05-18  Karl Berry  <karl@gnu.org>
16671
16672         * config/srclist.txt: break link for vasnprintf.c.
16673
16674 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16675
16676         Port obstack to the AS/400, where pointers are 16 bytes wide and
16677         you cannot cast an integer to a valid pointer.  This patch is
16678         currently waiting to be integrated into glibc; see
16679         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16680
16681         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16682         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16683         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16684         (struct obstack): temp member is now a union of a pointer and
16685         an integer, instead of an integer.  All integer uses changed.
16686         This does not affect the physical layout of struct obstack,
16687         except on hosts (like the AS/400) where the size or alignment of
16688         void * is greater than that of ptrdiff_t.
16689         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16690         __STDC__)]: Store temporary in pointer member of union, not
16691         integer member.
16692         * lib/obstack.c: Include <stddef.h>, for offsetof.
16693         (struct fooalign): Remove; it doesn't need a name.
16694         (union fooround): Change double to long double, and add void *.
16695         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16696         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16697         not a macro.  Hence the values are always int; so remove all
16698         casts-to-int in uses.
16699
16700 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16701
16702         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16703         we can get this patch merged into glibc.
16704
16705 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16706             Paul Eggert  <eggert@cs.ucla.edu>
16707
16708         * m4/argp: Depend on alloca.
16709
16710 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16711             Paul Eggert  <eggert@cs.ucla.edu>
16712
16713         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16714         freecoding.
16715
16716 2004-05-17  Bruno Haible  <bruno@clisp.org>
16717
16718         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16719         precision that consists of a '.' followed by an empty digit string.
16720         Patch by Tor Lillqvist <tml@iki.fi>.
16721
16722 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16723
16724         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16725         for backward compatibility with older code.  We need our own
16726         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16727         it under some other name, and our alloca.h will define it.
16728
16729 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16730             Derek Price  <derek@ximbiot.com>
16731
16732         * lib/alloca.c: Include <alloca.h>, to get our interface.
16733         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16734         include <alloca.h> first.  Use C89 prototype for alloca; this
16735         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16736         Use #elif for simplicity, since we can assume C89 now.
16737         Don't try to source the system alloca.h since it will not be found
16738         and to prevent recursively including its replacement.
16739         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16740         * lib/regex.c: Likewise.
16741
16742 2004-05-16  Derek Price  <derek@ximbiot.com>
16743             Paul Eggert  <eggert@cs.ucla.edu>
16744
16745         getline cleanup.  This changes the getndelim2 API: both order of
16746         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16747         no delimiter).
16748
16749         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16750         interface does that.
16751         (getline): Always use getdelim, so that we don't have two
16752         copies of this code.
16753         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16754         if available.
16755         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16756         (GETNDELIM2_MAXIMUM): New macro.
16757         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16758         instead of the old practice of delim2==0.  All callers changed.
16759         Return -1 on overflow, instead of returning junk.
16760         Do not set *linesize unless allocation succeeds.
16761         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16762         that we include sys/types.h.
16763         * lib/getnline.h: Likewise.
16764         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16765         (getndelim2): Reorder arguments.
16766         * lib/getnline.c (getnline, getndelim):
16767         Don't discard the NMAX argument.
16768         (getnline): Invoke getndelim, to avoid code duplication.
16769         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16770         of (size_t) -1 by callers of the getnline family.
16771
16772 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16773
16774         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16775         Check for gettimeofday.
16776         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16777         Check for settimeofday, stime.
16778
16779 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16780
16781         * lib/nanosleep.c (suspended): Change its type from int to
16782         sig_atomic_t volatile.
16783         (first_call): Make it private to rpl_nanosleep, and have it
16784         be zero initially as that's a bit faster.
16785         (my_usleep): Round up fractional times instead of truncating them,
16786         as this is the usual meaning for 'sleep'.
16787
16788         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16789         doesn't work.
16790         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16791         (ENOSYS): Define if not defined.
16792         (settime): Fall back on stime if it exists and settimeofday fails.
16793         But don't bother with fallbacks if a method fails with errno == EPERM.
16794
16795 2004-05-11  Jim Meyering  <jim@meyering.net>
16796
16797         Prior to this change, the save_cwd caller required read access to the
16798         current directory on most systems (ones with the fchdir function).
16799
16800         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16801         fails, try write-only, and finally, resort to using xgetcwd.
16802
16803 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16804
16805         * lib/obstack.c, obstack.h: Import changes from libc.
16806
16807 2004-04-28  Bruno Haible  <bruno@clisp.org>
16808
16809         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16810         also implicitly appends .exe to executables.
16811         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16812         accepts Windows pathnames.
16813         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16814         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16815         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16816         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16817         Reported by Derek Robert Price <derek@ximbiot.com>.
16818
16819 2004-04-21  Karl Berry  <karl@gnu.org>
16820
16821         * config/srclist.txt (localcharset.c): break sync.
16822
16823 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16824
16825         * m4/host-os.m4: Add a copyright notice.
16826
16827 2004-04-20  Jim Meyering  <jim@meyering.net>
16828
16829         Change UTILS_ to gl_ in AC_DEFINE'd names.
16830         Change utils_- and jm_-prefixed variables, too.
16831         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16832         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16833         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16834
16835         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16836         Don't emit trailing blanks.
16837         Also rename jm_-prefixed variables to have gl_ prefix.
16838
16839         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16840         Also rename jm_-prefixed variables to have gl_ prefix.
16841
16842         * m4/jm-macros.m4: Reflect the renamings.
16843         * m4/prereq.m4: Likewise.
16844
16845 2004-04-20  Jim Meyering  <jim@meyering.net>
16846
16847         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16848         memory.
16849
16850 2004-04-20  Jim Meyering  <jim@meyering.net>
16851             Bruno Haible  <bruno@clisp.org>
16852
16853         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16854         memory when realloc fails.
16855
16856 2004-04-19  Jim Meyering  <jim@meyering.net>
16857
16858         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16859         now that readutmp.c may call `free (0)'.
16860
16861 2004-04-19  Bruno Haible  <bruno@clisp.org>
16862
16863         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16864         * m4/inttypes_h.m4: Likewise.
16865         * m4/stdint_h.m4: Likewise.
16866         * m4/intmax_t.m4: Likewise.
16867         * m4/uintmax_t.m4: Likewise.
16868
16869 2004-04-18  Jim Meyering  <jim@meyering.net>
16870
16871         * m4/prereq.m4: Don't forbid jm_ prefix.
16872
16873         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16874         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16875         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16876         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16877         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16878         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16879         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16880         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16881         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16882         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16883         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16884         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16885         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16886         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16887         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16888         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16889         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16890         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16891         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16892
16893 2004-04-18  Jim Meyering  <jim@meyering.net>
16894
16895         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16896         failure, don't leak memory and do call END_UTMP_ENT.
16897
16898 2004-04-16  Jim Meyering  <jim@meyering.net>
16899
16900         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16901         coreutils' stat program.
16902         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16903
16904 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16905
16906         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16907         C89.
16908         (CHAR_BIT): Remove, since we assume C89.
16909         Include <stdint.h> if available, as per current Autoconf CVS advice.
16910
16911 2004-03-31  Jim Meyering  <jim@meyering.net>
16912
16913         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16914         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16915         * m4/xalloc.m4: Likewise.
16916
16917 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16918
16919         Merge from coreutils.
16920
16921         * m4/inttostr.m4: New file.
16922         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16923         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16924         Require gl_CLOCK_TIME.
16925         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16926
16927 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16928
16929         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16930         not bool, to be more consistent with Unix conventions.
16931         Suggested by Bruno Haible.
16932
16933         Merge from coreutils.
16934
16935         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16936         * lib/umaxtostr.c: New files.
16937
16938         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16939         the usual <time.h> dance.
16940         (get_date): Change signature to support fractional time stamps.
16941         All callers changed.
16942         * lib/getdate.y: Include "getdate.h" first, as we can now
16943         assume C89 and don't need to worry about 'const'.
16944         Similarly, include "unlocked-io.h" near start, not in middle.
16945         Include <limits.h>.
16946         (textint.value): Use long int rather than int.
16947         (textint.digits): Use size_t rather than int.
16948         (BILLION, LOG10_BILLION): New constants.
16949         (parser_control): New member rel_ns.  Members day_ordinal,
16950         time_zone, month, day, hour, minutes, rel_year, rel_month,
16951         rel_day, rel_hour, rel_minutes, rel_seconds
16952         are now long int, not int.  Member seconds is now struct timespec,
16953         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16954         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16955         not int.
16956         (%union.intval): Now long int, not int.
16957         New member timespec.
16958         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16959         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16960         (spec): Now is a timespec or an item list.
16961         (timespec, items): New nonterminals.
16962         (time, rel, relunit, number, get_date):
16963         Add support for fractional seconds.
16964         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16965         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16966         (to_hour): First arg is now long int, not int.
16967         (to_year): Returns long int, not int.
16968         Don't treat year -70 like 70.
16969         (tm_diff): Returns long int, not int.
16970         (lookup_word): Use bool instead of int when appropriate.
16971         (yylex): Use size_t for count, not int.
16972         Detect overflow when parsing large integer constants.
16973         Add support for fractions.
16974         (get_date): Make pointers 'const' if possible.
16975         Use more-portable code to detect integer overflow.
16976         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
16977         Don't use ctime; it's not reliable if the year has >4 digits.
16978
16979         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
16980         This is for compatibility with BSD.
16981
16982         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
16983         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
16984         From coreutils' system.h.
16985
16986         * lib/userspec.c: Don't include "posixver.h".
16987         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
16988         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
16989         compatible extension.  Simplify code by removing a boolean int
16990         that was always nonzero if a string was nonnull.
16991
16992 2004-03-30  Jim Meyering  <jim@meyering.net>
16993
16994         Merge from coreutils.
16995
16996         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
16997         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
16998         on some systems one must include <grp.h> before it.
16999         Reported by Christian Krackowizer.
17000
17001 2004-03-30  Jim Meyering  <jim@meyering.net>
17002
17003         Merge from coreutils.
17004
17005         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17006
17007         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17008         an empty input stream.
17009
17010         * lib/readtokens.c: Include <stdbool.h>.
17011         (readtoken): Use `size_t' rather than int/long.
17012         All callers adjusted.
17013         Use `bool' rather than `int' where appropriate.
17014         Use memset rather than an explicit loop.
17015         Use x2nrealloc rather than xrealloc.
17016         Allow the use of `\0' as a delimiter.
17017         (readtokens): Likewise.
17018         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17019
17020 2004-03-30  Jim Meyering  <jim@meyering.net>
17021
17022         * m4/realloc.m4: Remove file, since now it does no more than
17023         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17024         the `configure.ac' section of module/realloc.
17025         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17026
17027 2004-03-30  Bruno Haible  <bruno@clisp.org>
17028
17029         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17030         nonnull.
17031
17032 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17033
17034         Merge changes to getloadavg.c from coreutils and Emacs.
17035
17036         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17037         Define to an expression, not to the empty string.
17038         Include cloexec.h and xalloc.h.
17039         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17040         Use set_cloexec_flag rather than rolling our own.
17041         * lib/cloexec.c, lib/cloexec.h: New files.
17042
17043 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17044
17045         * m4/cloexec.m4: New file.
17046
17047 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17048
17049         * lib/getopt.h: Sync with libc CVS.
17050
17051 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17052             Bruno Haible  <bruno@clisp.org>
17053
17054         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17055         mbswidth.
17056
17057 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17058             Bruno Haible  <bruno@clisp.org>
17059
17060         * lib/mbswidth.h: Include <wchar.h> only if
17061         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17062         <wchar.h>.
17063         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17064
17065 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17066
17067         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17068         Sync with libc CVS.
17069         * lib/getopt_int.h: New file, also synced from libc.
17070
17071 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17072
17073         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17074         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17075         Bring back getopt.c, getopt.h, getopt1.c.
17076
17077 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17078
17079         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17080         All uses changed.  Check for sa_sigaction member; this fixes
17081         a bug first reported by Jason Andrade in
17082         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17083
17084 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17085
17086         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17087         '#if' expressions.  Unlike the code it replaces, it does not
17088         depend on (defined _SC_PAGESIZE).  However, it does depend on
17089         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17090         first reported by Jason Andrade in
17091         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17092
17093 2004-02-25  Simon Josefsson  <jas@extundo.com>
17094
17095         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17096
17097 2004-02-25  Simon Josefsson  <jas@extundo.com>
17098
17099         * lib/strdup.h: New file.
17100         * lib/strdup.c: Include it.
17101         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17102         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17103
17104 2004-02-23  Karl Berry  <karl@gnu.org>
17105
17106         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17107         (from fencepost.gnu.org:/gd/gnuorg).
17108
17109 2004-02-23  Karl Berry  <karl@gnu.org>
17110
17111         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17112         * config/srclist.txt: add maintain/standards documents.
17113
17114 2004-02-18  Bruno Haible  <bruno@clisp.org>
17115
17116         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17117         Reported by Derek Robert Price <derek@ximbiot.com>.
17118
17119 2004-02-16  Karl Berry  <karl@gnu.org>
17120
17121         * config/mkinstalldirs, install-sh: update from automake.
17122
17123 2004-02-06  Karl Berry  <karl@gnu.org>
17124
17125         * m4/po.m4: update from gettext 0.14.1.
17126
17127 2004-02-06  Karl Berry  <karl@gnu.org>
17128
17129         * lib/config.charset: update from gettext 0.14.1.
17130
17131 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17132
17133         Add comments and code, prompted by suggestions from Bruno Haible
17134         for sh-quote.
17135         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17136         describing the enum quoting_style values.
17137         * lib/quotearg.c (quotearg_alloc): New function.
17138         (quotearg_buffer_restyled): Treat lone { and } as special.
17139         Treat = as special.  Work around bug with older shells
17140         that "see" a '\' that is really the 2nd byte of a multibyte char.
17141         Quote empty string with shell_quoting_style.
17142
17143 2004-02-03  Bruno Haible  <bruno@clisp.org>
17144
17145         * m4/pipe.m4: New file, from GNU gettext.
17146
17147 2004-02-03  Bruno Haible  <bruno@clisp.org>
17148
17149         * lib/pipe.h: New file, from GNU gettext.
17150         * lib/pipe.c: New file, from GNU gettext.
17151
17152 2004-01-27  Bruno Haible  <bruno@clisp.org>
17153
17154         * m4/execute.m4: New file, from GNU gettext.
17155
17156 2004-01-27  Bruno Haible  <bruno@clisp.org>
17157
17158         * lib/execute.h: New file, from GNU gettext.
17159         * lib/execute.c: New file, from GNU gettext.
17160         * lib/w32spawn.h: New file, from GNU gettext.
17161
17162 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17163
17164         Merge from diffutils.
17165
17166         * lib/file-type.c (file_type): Add typed memory objects.
17167         * lib/file-type.h (S_TYPEISTMO): New macro.
17168
17169         * lib/c-stack.h (c_stack_action): Remove argv argument.
17170         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17171         (die): Don't calculate message unless segv_action returns.
17172         (get_stack_location, min_address_from_argv, max_address_from_argv,
17173         volatile stack_base, volatile_stack_size): Remove.
17174         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17175         that every segmentation violation is a stack overflow.  (Ouch!)
17176         See Debian bug 136249 (still outstanding) for more info about why
17177         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17178
17179 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17180
17181         Exit-status fix from coreutils.
17182
17183         Use exit_failure consistently in place of EXIT_FAILURE,
17184         so that program exit statuses are consistent on failure.
17185
17186         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17187         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17188         * lib/argmatch.h: Comment fix to match the above.
17189         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17190         Now a macro referring to exit_failure, instead of a separate
17191         variable.  Include "exitfail.h" to get it.
17192         * lib/xstrtol.h: Include "exitfail.h".
17193         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17194
17195         * lib/long-options.c (parse_long_options): Use prototype
17196         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17197         for clarity.
17198
17199 2004-01-21  Jim Meyering  <jim@meyering.net>
17200
17201         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17202         so as not to conflict with a different-sized __mktime_internal
17203         function in GNU libc.
17204         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17205         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17206
17207 2004-01-20  Karl Berry  <karl@gnu.org>
17208
17209         * config/config.guess: update from config.
17210
17211         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17212
17213 2004-01-20  Bruno Haible  <bruno@clisp.org>
17214
17215         Safer stack allocation.
17216         * lib/setenv.c: Include allocsa.h.
17217         (alloca): Remove fallback definition.
17218         (freea): Remove macro.
17219         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17220         instead of freea.
17221
17222 2004-01-20  Bruno Haible  <bruno@clisp.org>
17223
17224         * m4/eealloc.m4: New file, from GNU gettext.
17225
17226 2004-01-20  Bruno Haible  <bruno@clisp.org>
17227
17228         * m4/allocsa.m4: New file, from GNU gettext.
17229
17230 2004-01-20  Bruno Haible  <bruno@clisp.org>
17231
17232         * lib/xallocsa.h: New file, from GNU gettext.
17233         * lib/xallocsa.c: New file, from GNU gettext.
17234
17235 2004-01-20  Bruno Haible  <bruno@clisp.org>
17236
17237         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17238
17239 2004-01-20  Bruno Haible  <bruno@clisp.org>
17240
17241         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17242         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17243         specially.
17244
17245 2004-01-20  Bruno Haible  <bruno@clisp.org>
17246
17247         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17248         patch.
17249
17250 2004-01-20  Bruno Haible  <bruno@clisp.org>
17251
17252         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17253
17254 2004-01-20  Bruno Haible  <bruno@clisp.org>
17255
17256         * lib/eealloc.h: New file.
17257
17258 2004-01-20  Bruno Haible  <bruno@clisp.org>
17259
17260         * lib/binary-io.h: Avoid warnings on Cygwin.
17261
17262 2004-01-20  Bruno Haible  <bruno@clisp.org>
17263
17264         * lib/allocsa.h: New file, from GNU gettext.
17265         * lib/allocsa.c: New file, from GNU gettext.
17266
17267 2004-01-18  Karl Berry  <karl@gnu.org>
17268
17269         * doc/gpl.texi, doc/lgpl.texi: new files.
17270
17271 2004-01-18  Karl Berry  <karl@gnu.org>
17272
17273         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17274         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17275
17276 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17277
17278         Merge from coreutils.
17279
17280         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17281         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17282         (gl_DEFAULT_POSIX2_VERSION): Move
17283         the documentation from 'configure' into 'config.hin',
17284         so that 'configure --help' isn't burdened by it and
17285         we don't have to worry about its formatting there.
17286         Reword the documentation so that it's more succinct
17287         and can be run together into a single paragraph.
17288         * m4/same.m4 (gl_SAME): Check for pathconf.
17289
17290 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17291
17292         Merge from coreutils.
17293
17294         * lib/posixver.c: Include posixver.h.
17295
17296         * lib/same.c: Include <stdbool.h>, <limits.h>.
17297         (_POSIX_NAME_MAX): Define if not defined.
17298         (MIN): New macro.
17299         (same_name): If file names are silently truncated, report
17300         that the file names are the same if they are the same after
17301         the silent truncation.
17302
17303         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17304         conversion function.
17305         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17306         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17307         longer needed.
17308
17309 2004-01-15  Jim Meyering  <jim@meyering.net>
17310
17311         Merge from coreutils.
17312
17313         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17314         if no library is required.
17315         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17316         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17317         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17318         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17319         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17320         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17321         value, $ac_cv_search_crypt, if it's "none required".
17322         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17323         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17324         not gl_FUNC_GETLOADAVG.
17325         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17326         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17327
17328 2004-01-15  Jim Meyering  <jim@meyering.net>
17329
17330         Merge from coreutils.
17331
17332         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17333         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17334         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17335
17336         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17337         optional configure-time default.
17338
17339         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17340
17341         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17342
17343 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17344
17345         Merge from coreutils.
17346
17347         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17348         value, $ac_cv_search_nanosleep, if it's "none required".
17349
17350 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17351
17352         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17353         with like-named macro in fnmatch.c.
17354         (EXT): Use an internal constant instead.
17355
17356         Merge fnmatch patches from glibc.
17357         * lib/fnmatch.c (mbsinit): Remove define.
17358         Add libc_hidden_ver (__fnmatch, fnmatch).
17359         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17360         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17361
17362 2004-01-14  Karl Berry  <karl@gnu.org>
17363
17364         * config/install-sh: update from automake.
17365
17366 2004-01-13  Karl Berry  <karl@gnu.org>
17367
17368         * config/install-sh: update from automake.
17369
17370 2004-01-09  Karl Berry  <karl@gnu.org>
17371
17372         * config/install-sh: update from automake.
17373
17374 2004-01-05  Karl Berry  <karl@gnu.org>
17375
17376         * config/config.{sub,guess}: update from config.
17377
17378 2003-12-31  Karl Berry  <karl@gnu.org>
17379
17380         * config/depcomp: update from automake.
17381
17382 2003-12-14  Karl Berry  <karl@gnu.org>
17383
17384         * lib/config.charset: update from gettext-runtime.
17385
17386 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17387
17388         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17389         Bug reported by Alfred M. Szmidt.
17390
17391 2003-12-03  Bruno Haible  <bruno@clisp.org>
17392
17393         * m4/gettext.m4: Upgrade from gettext-0.13.
17394         * m4/po.m4: Upgrade from gettext-0.13.
17395         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17396         * m4/intmax.m4: New file, from gettext-0.13.
17397         * m4/printf-posix.m4: New file, from gettext-0.13.
17398
17399 2003-11-29  Karl Berry  <karl@gnu.org>
17400
17401         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17402
17403 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17404             Bruno Haible  <bruno@clisp.org>
17405
17406         * lib/printf-parse.h: Don't include sys/types.h.
17407         (ARG_NONE): New macro.
17408         (char_directive): Change type of *arg_index fields to size_t.
17409         * lib/printf-parse.c: Don't include sys/types.h.
17410         (SSIZE_MAX): Remove macro.
17411         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17412         Remove unnecessary overflow check.
17413         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17414         fields.
17415
17416 2003-11-25  Bruno Haible  <bruno@clisp.org>
17417
17418         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17419
17420 2003-11-25  Bruno Haible  <bruno@clisp.org>
17421
17422         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17423         gt_TYPE_SSIZE_T.
17424
17425 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17426
17427         * modules/alloca: Remove dependency on xalloc.
17428
17429 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17430
17431         * lib/alloca.c: Remove dependency on xalloc module.
17432         (xalloc_die): Remove.
17433         (memory_full) [!defined emacs]: New macro.
17434         [!defined emacs]: Don't include xalloc.h.
17435         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17436         address arithmetic overflows.  Change datatypes a bit to avoid
17437         unnecessary casts.
17438
17439 2003-11-22  Jim Meyering  <jim@meyering.net>
17440
17441         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17442         s/size/size_t/.
17443
17444 2003-11-21  Karl Berry  <karl@gnu.org>
17445
17446         * config/config.{sub,guess}: update from config.
17447
17448 2003-11-18  Karl Berry  <karl@gnu.org>
17449
17450         * config/config.{sub,guess}: update from config.
17451
17452         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17453
17454 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17455
17456         * README: Mention that S+T cannot overflow if S is the size of
17457         an existing object and T is sufficiently small.
17458
17459 2003-11-17  Jim Meyering  <jim@meyering.net>
17460
17461         On systems without utime and without a utimes function capable of
17462         dealing with a NULL struct utimbuf* argument, this utime replacement
17463         could -- in unusual circumstances -- leak a file descriptor.
17464         * lib/utime.c: Include <unistd.h> and <errno.h>.
17465         (utime_null): Be sure to close `fd' and to preserve errno.
17466         Reported by Geoff Collyer via Arnold Robbins.
17467
17468 2003-11-17  Bruno Haible  <bruno@clisp.org>
17469
17470         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17471         (Depends-on): Add xsize.
17472
17473 2003-11-17  Bruno Haible  <bruno@clisp.org>
17474
17475         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17476
17477 2003-11-17  Bruno Haible  <bruno@clisp.org>
17478
17479         * lib/vasnprintf.c (alloca): Remove fallback definition.
17480         (freea): Remove definition.
17481         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17482         Reported by Paul Eggert.
17483
17484 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17485             Bruno Haible  <bruno@clisp.org>
17486
17487         Protect against address arithmetic overflow.
17488         * lib/printf-args.h: Include stddef.h.
17489         (arguments): Change type of field 'count' to size_t.
17490         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17491         'unsigned int' where appropriate.
17492         * lib/printf-parse.h: Include sys/types.h.
17493         (char_directive): Change type of *arg_index fields to ssize_t.
17494         (char_directives): Change type of fields 'count', max_*_length to
17495         size_t.
17496         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17497         (SSIZE_MAX): Define fallback value.
17498         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17499         instead of 'int' where appropriate. Check a_allocated, d_allocated
17500         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17501         * lib/vasnprintf.c: Include xsize.h.
17502         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17503         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17504         overflow. Avoid wraparound when converting a width or precision from
17505         decimal to binary.
17506
17507 2003-11-16  Bruno Haible  <bruno@clisp.org>
17508
17509         Update from GNU gettext.
17510         * lib/printf-parse.c: Generalize to it can be compiled for wide
17511         strings.
17512         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17513         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17514         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17515         SNPRINTF): New macros.
17516         Don't include <alloca.h> if the file is used inside libintl.
17517         (local_wcslen): New function, for Solaris 2.5.1.
17518         (VASNPRINTF): Use it instead of wcslen.
17519
17520 2003-11-16  Bruno Haible  <bruno@clisp.org>
17521
17522         * lib/xsize.h (xmax): New function.
17523         (xsum, xsum3, xsum4): Declare as "pure" functions.
17524
17525 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17526
17527         * modules/xalloc (Files): Undo latest change, since xalloc.h
17528         no longer needs SIZE_MAX or PTRDIFF_MAX.
17529
17530 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17531
17532         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17533         gl_PTRDIFF_MAX.
17534
17535 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17536
17537         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17538         "return", to pacify some unknown compiler.  Problem reported
17539         by Joerg Schilling.
17540
17541 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17542
17543         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17544         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17545         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17546         heuristic is just as accurate as far as we know, and it removes a
17547         dependency on size_max.m4 and ptrdiff_max.m4.
17548
17549 2003-11-11  Bruno Haible  <bruno@clisp.org>
17550
17551         * modules/xsize (Files): Add m4/size_max.m4.
17552         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17553
17554 2003-11-11  Bruno Haible  <bruno@clisp.org>
17555
17556         * m4/size_max.m4: New file.
17557         * m4/ptrdiff_max.m4: New file.
17558         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17559         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17560         (gl_XALLOC): Invoke it.
17561
17562 2003-11-11  Bruno Haible  <bruno@clisp.org>
17563
17564         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17565         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17566         defined.
17567
17568 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17569
17570         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17571         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17572         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17573         From Bruno Haible.
17574         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17575         not (size_t) -1, since it's defined here.
17576
17577 2003-11-09  Karl Berry  <karl@gnu.org>
17578
17579         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17580
17581 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17582
17583         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17584         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17585         Reject sizes of exactly SIZE_MAX bytes.
17586         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17587         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17588
17589 2003-11-05  Bruno Haible  <bruno@clisp.org>
17590
17591         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17592         SIZE_MAX defined in <limits.h> on Solaris.
17593
17594 2003-11-04  Jim Meyering  <jim@meyering.net>
17595
17596         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17597         variable names, rather than @VAR@.
17598         * modules/poll: Likewise.
17599
17600 2003-11-04  Bruno Haible  <bruno@clisp.org>
17601
17602         * modules/xsize: New file.
17603         * modules/linebreak: Depend on xsize.
17604         * MODULES.html.sh (func_all_modules): Add xsize.
17605
17606 2003-11-04  Bruno Haible  <bruno@clisp.org>
17607
17608         * m4/xsize.m4: New file.
17609
17610 2003-11-04  Bruno Haible  <bruno@clisp.org>
17611
17612         * lib/xsize.h: New file.
17613         * lib/linebreak.c: Include xsize.h.
17614         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17615         argument for overflow.
17616         Suggested by Paul Eggert.
17617
17618 2003-11-03  Karl Berry  <karl@gnu.org>
17619
17620         * config/config.{guess,sub}: update from config.
17621
17622 2003-11-03  Jim Meyering  <jim@meyering.net>
17623
17624         * modules/userspec (lib_SOURCES): Add userspec.h.
17625         (Include): Add "userspec.h".
17626         Improve description.
17627
17628 2003-11-03  Jim Meyering  <jim@meyering.net>
17629
17630         * lib/userspec.c: Include "userspec.h".
17631         * lib/userspec.h: New file.
17632
17633 2003-11-03  Bruno Haible  <bruno@clisp.org>
17634
17635         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17636
17637 2003-11-03  Bruno Haible  <bruno@clisp.org>
17638
17639         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17640         available, to avoid (extremely rare) race condition.
17641         Suggested by Paul Eggert.
17642
17643 2003-11-02  Karl Berry  <karl@gnu.org>
17644
17645         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17646
17647 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17648
17649         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17650         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17651         (read_filesystem_list): Set and use me_type_malloced.
17652         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17653         whatever the type happens to be), for brevity and consistency.
17654         Check for size calculation overflow on Alphas running OSF/1.
17655
17656 2003-10-31  Jim Meyering  <jim@meyering.net>
17657
17658         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17659
17660         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17661
17662 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17663             Bruno Haible  <bruno@clisp.org>
17664
17665         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17666         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17667
17668 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17669
17670         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17671         netbsd*-gnu*.  Suggested by Robert Millan.
17672
17673 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17674
17675         * modules/group-member: Depend on stdbool.
17676
17677 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17678
17679         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17680
17681 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17682
17683         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17684         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17685         after the 'gnu' in these cases.  This fixes some bugs in the
17686         previous change, and is based on suggestions by Robert Millan.
17687
17688 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17689
17690         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17691         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17692         no longer needed.
17693         * lib/quotearg.c (quotearg_n_options): Use it.
17694         * lib/group-member.c: Include <stdbool.h>.
17695         (free_group_info): Arg is now const *; don't free arg.
17696         (get_group_info): Now returns bool and accepts struct group_info *,
17697         rather than returning a malloc'ed struct group_info *.
17698         All uses changed.  Check for overflow in internal size calculation.
17699
17700         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17701         rather than xmalloc/xrealloc.
17702         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17703         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17704         conformance bug: the old code used a pointer after freeing the
17705         storage that it addressed.
17706         * lib/hash.c (hash_initialize): Simplify the code by using
17707         xalloc_oversized rather than doing it by hand.
17708         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17709         the buffer preserved.  Use free and xmalloc instead.
17710         * lib/quotearg.c (quotearg_n_options): Likewise.
17711         Use a simpler test for size overflow.  Don't use xalloc_oversized
17712         because unsigned int might be wider than size_t (!); this suggests
17713         that we should switch from unsigned int to size_t for slot numbers.
17714
17715 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17716
17717         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17718         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17719         NetBSD kernels.  Requested by Richard Stallman.
17720
17721 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17722
17723         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17724         to allocate the returned structure.  Do not allocate a subarray,
17725         as x2nrealloc will do that.
17726         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17727         instead of xnrealloc.
17728         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17729
17730 2003-10-27  Bruno Haible  <bruno@clisp.org>
17731
17732         * lib/stdbool_.h: Better support for BeOS.
17733
17734 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17735
17736         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17737         now uses inline.
17738
17739 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17740
17741         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17742         callers that want to do their own size-overflow checking.  Include
17743         <stdbool.h>, since xalloc_oversized returns bool.
17744         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17745         to use xalloc_oversized.
17746
17747         Add two functions x2realloc, x2nrealloc, for programs that grow
17748         arrays dynamically by doubling their sizes.
17749         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17750         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17751         New functions.
17752
17753         Port to C99 semantics for 'inline' of external functions.
17754         Bug reported by Bruno Haible.
17755         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17756         with the old contents of xnmalloc.
17757         (xnmalloc, xmalloc): Use it.
17758         (xnrealloc_inline): New static inline function,
17759         with the old contents of xnrealloc.
17760         (xnrealloc, xrealloc): Use it.
17761
17762         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17763         that.
17764
17765 2003-10-26  Karl Berry  <karl@gnu.org>
17766
17767         * config/srclist.txt (COPYING.DOC): no longer available from
17768         /gd/gnuorg; don't know where the ultimate source is.
17769
17770 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17771
17772         Fix several address-calculation bugs in the hash modules,
17773         plus some minor code cleanup.
17774
17775         * lib/hash.h: Include <stdbool.h>, for bool.
17776         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17777         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17778         hash_get_n_entries, hash_get_max_bucket_length,
17779         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17780         hash_rehash): Use size_t rather than unsigned.
17781         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17782         hash_get_n_buckets_used, hash_get_n_entries,
17783         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17784         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17785         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17786         Likewise.
17787         (SIZE_MAX): Define if not defined.
17788         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17789         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17790         hash_print):
17791         Use const * when possible.
17792         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17793         (check_tuning): Fix bug: if tuning parameters were very close to
17794         0 or 1, rounding errors could have caused subscript violations.
17795         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17796         (hash_initialize): Add 'fail:' label
17797         to free table and return NULL, and use it to simplify code.
17798         Use calloc rather than clearing the storage ourself.
17799         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17800         buffer size calculations.
17801         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17802         Include <stddef.h>, for size_t.
17803         * lib/hash-pjw.c (hash_pjw): Likewise.
17804         Switch to method described by Bruno Haible.
17805         Include <limits.h>, for CHAR_BIT.
17806         (SIZE_BITS): New macro.
17807
17808 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17809
17810         * m4/getline.m4 (AM_FUNC_GETLINE):
17811         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17812         hosts.  Problem reported by Derek Robert Price in
17813         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17814         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17815         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17816
17817 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17818
17819         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17820         ceiling the allocation at NMAX bytes rather than silently
17821         discarding input bytes before NMAX is reached.  This makes
17822         a difference only if NMAX exceeds SIZE_MAX / 2.
17823
17824         * lib/obstack.c: Merge from glibc.
17825         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17826         Add libc_hidden_def (_obstack_newchunk).
17827         (_obstack_free) [! defined _LIBC]: Remove.
17828         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17829         a clone of the function body.
17830         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17831         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17832
17833         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17834         glibc.
17835         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17836         arg to memcpy.
17837
17838         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17839         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17840         Don't use lvalue casts, as GCC plans to remove support for them
17841         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17842         was also present in the non-GCC version, indicating that this
17843         code had always been buggy and had never been widely used.
17844         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17845         Use the fast variant of each macro, rather than copying the
17846         definiens of the fast variant; that way, we'll be more likely to
17847         catch future bugs in the fast variants.
17848
17849 2003-10-20  Bruno Haible  <bruno@clisp.org>
17850
17851         * modules/wait-process: New file.
17852         * MODULES.html.sh (func_all_modules): Add wait-process.
17853
17854 2003-10-20  Bruno Haible  <bruno@clisp.org>
17855
17856         * m4/wait-process.m4: New file.
17857
17858 2003-10-20  Bruno Haible  <bruno@clisp.org>
17859
17860         * lib/wait-process.h: New file, from GNU gettext.
17861         * lib/wait-process.c: New file, from GNU gettext.
17862
17863 2003-10-19  Jim Meyering  <jim@meyering.net>
17864
17865         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17866         HPUX 10.20.
17867
17868 2003-10-18  Karl Berry  <karl@gnu.org>
17869
17870         * config/config.guess: update from config.
17871
17872 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17873
17874         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17875         (getgroups): First arg is int, not size_t.
17876         Don't let 'free' mangle errno.
17877
17878 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17879
17880         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17881
17882 2003-10-16  Karl Berry  <karl@gnu.org>
17883
17884         * config/config.{guess,sub}: update from config.
17885
17886 2003-10-16  Jim Meyering  <jim@meyering.net>
17887
17888         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17889         memcpy.
17890
17891 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17892
17893         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17894         (SIZE_MAX): Remove.
17895         (new_exclude, add_exclude_file): Initial size no longer needs to
17896         be a power of 2.
17897         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17898         our own address arithmetic overflow checking.
17899
17900         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17901         (fnmatch): Do not alloca more than 2000 wide characters;
17902         instead, use malloc for large buffers.
17903         Check for address arithmetic overflow, and return -1
17904         with errno set to ENOMEM in that case.
17905         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17906         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17907         instead, return -1.  Check for address arithmetic overflow.
17908
17909 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17910
17911         Handle invalid suffixes and overflow independently, so that
17912         callers can treat them independently as needed.  Fix some bugs in
17913         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17914         suffix for a human-readable blocksize.  The major caller-visible
17915         change is the addition of a new
17916         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17917         that both overflow and suffix chars were found.
17918
17919         * lib/human.c (humblock): Don't check separately for invalid suffix
17920         char; that is xstrtoumax's job (now that its bug is fixed).
17921         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17922         INTMAX_MAX]: New macros.
17923         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17924         TYPE_MAXIMUM): New macros.
17925         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17926         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17927         if overflow occurs, as it's what __strtol does and it's more useful
17928         in practice.
17929         (__xstrtol): If __strtol reports some error other than ERANGE,
17930         reflect it to the caller as LONGINT_INVALID.  If it reports
17931         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17932         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17933         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17934         value.
17935         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17936         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17937         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17938         [defined UINTMAX_MAX]: New macros.
17939
17940 2003-10-14  Bruno Haible  <bruno@clisp.org>
17941
17942         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17943
17944 2003-10-14  Bruno Haible  <bruno@clisp.org>
17945
17946         * m4/sig_atomic_t: New file, from GNU gettext.
17947         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17948
17949 2003-10-14  Bruno Haible  <bruno@clisp.org>
17950
17951         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17952         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17953         Also use volatile where needed.
17954
17955 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17956
17957         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17958         Change maintainer from Bruno Haible to 'all'.
17959
17960 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17961
17962         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17963
17964 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17965
17966         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17967         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17968         and define in terms of the other primitives.
17969         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17970         (SIZE_MAX): Define if not already defined.
17971         (array_size_overflow): New function.
17972         (xalloc_die): Abort instead of exiting if 'error' returns.
17973         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
17974         (xmalloc, xrealloc): Use them.
17975         (xcalloc): Check for address arithmetic overflow.
17976         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
17977         a bit faster than strcpy.
17978
17979 2003-10-10  Simon Josefsson  <jas@extundo.com>
17980
17981         * modules/argp (Depends-on): Add restrict and strcase.
17982
17983 2003-10-10  Simon Josefsson  <jas@extundo.com>
17984
17985         * m4/argp.m4: Add AC_C_INLINE.
17986
17987 2003-10-08  Paul Eggert  <eggert@twinsun.com>
17988
17989         Merge getpass from libc, plus a few fixes.
17990
17991         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
17992         Include <stdbool.h>.
17993         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
17994         __fsetlocking to empty.
17995         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
17996         do include <bits/libc-lock.h>.
17997         Do not include <fcntl.h>; not needed.
17998         [_LIBC]: Include <wchar.h>.
17999         (NOTCANCEL_MODE): New macro.
18000         (flockfile, funlockfile) [_LIBC]: New macros.
18001         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18002         [!_LIBC]: New macros.
18003         (call_fclose): New function.
18004         (getpass): Use it.  Save tty stream separately; this simplifies the
18005         code and makes it more reliable if stdin happens to equal stdout.
18006         Invoke __fsetlocking on tty.
18007         Handle thread cancellation if needed.
18008         Namespace cleanup (use __tcgetattr, __getline).
18009         Use bool for Booleans.
18010         [USE_IN_LIBIO]: Handle wide streams.
18011         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18012         stream might go where.
18013
18014         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18015         doesn't have to include <stdio.h> before us.
18016         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18017         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18018         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18019         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18020         if not declared, so that we can use getpass.c code from libc without
18021         rewriting it.
18022         (flockfile, ftrylockfile, funlockfile): New macros.
18023
18024 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18025
18026         * modules/getpass: Depend on stdbool.
18027
18028 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18029
18030         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18031
18032 2003-10-07  Karl Berry  <karl@gnu.org>
18033
18034         * config/config.{guess,sub}: update from config.
18035
18036 2003-10-06  Jim Meyering  <jim@meyering.net>
18037             Bruno Haible  <bruno@clisp.org>
18038
18039         This lets translators provide better translations for the
18040         "Written by ..." part of --version output.
18041         * lib/version-etc.h: Include stdarg.h.
18042         (version_etc_copyright): Declare as readonly.
18043         (version_etc): Make this function variadic with a NULL-terminated list
18044         of author name strings.
18045         (version_etc_va): New declaration.
18046         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18047         (version_etc_copyright): Declare as readonly.
18048         (version_etc_va): New function. Provide a different translatable string
18049         for each possible number of authors < 10. Abbreviate when there are 10
18050         authors or more.
18051         (version_etc): Make this function variadic. Call version_etc_va.
18052         Suggestion from Gary V. Vaughan.
18053
18054         * lib/long-options.h (parse_long_options): Change prototype: the
18055         authors string is moved to the end and becomes variadic.
18056         * lib/long-options.c: Include stdarg.h.
18057         (parse_long_options): Make this function variadic, too.
18058         Call version_etc_va, not version_etc.
18059
18060 2003-10-06  Bruno Haible  <bruno@clisp.org>
18061
18062         * modules/version-etc-2: Remove file.
18063         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18064
18065 2003-10-06  Bruno Haible  <bruno@clisp.org>
18066
18067         * modules/fatal-signal: New file.
18068         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18069
18070 2003-10-06  Bruno Haible  <bruno@clisp.org>
18071
18072         * m4/fatal-signal.m4: New file.
18073         * m4/signalblocking.m4: New file, from GNU gettext.
18074
18075 2003-10-06  Bruno Haible  <bruno@clisp.org>
18076
18077         * lib/version-etc-2.h: Remove file.
18078         * lib/version-etc-2.c: Remove file.
18079
18080 2003-10-06  Bruno Haible  <bruno@clisp.org>
18081
18082         * lib/fatal-signal.h: New file, from GNU gettext.
18083         * lib/fatal-signal.c: New file, from GNU gettext.
18084
18085 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18086
18087         * README: Rework advice for preventing empty .o files.
18088         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18089         not <sys/types.h>.
18090
18091 2003-10-04  Karl Berry  <karl@gnu.org>
18092
18093         * lib/argp*: update from libc.
18094
18095 2003-10-04  Karl Berry  <karl@gnu.org>
18096
18097         * config/config.{guess,sub}: update from config.
18098
18099 2003-10-02  Bruno Haible  <bruno@clisp.org>
18100
18101         * modules/lchown (Include): Add lchown.h.
18102         * modules/time_r (Include): Use "..." syntax.
18103         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18104
18105 2003-10-01  Simon Josefsson  <jas@extundo.com>
18106
18107         * MODULES.html.sh (func_all_modules): Move gethostname from section
18108         'based on' to section 'lacking' POSIX:2001.
18109
18110 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18111
18112         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18113         to output mode on the same stream.
18114
18115 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18116
18117         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18118         Fix arg typo in previous patch.
18119
18120 2003-09-28  Jim Meyering  <jim@meyering.net>
18121
18122         * lib/error.c: Correct cpp indentation.
18123
18124 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18125
18126         * modules/free: New file.
18127
18128 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18129
18130         * m4/free.m4: New file.
18131
18132 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18133
18134         * lib/minmax.h (MIN, MAX)
18135         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18136         Omit the special code that used __typeof__, since we worry that
18137         it could be more trouble than it's worth.  See:
18138         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18139         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18140
18141         * lib/free.c: New file.
18142
18143 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18144
18145         Trivial fixes to Makefile.am parts of module listings.
18146         * modules/strstr: Append strstr.h to lib_SOURCES.
18147         * modules/strcase: Likewise, for strcase.h.
18148
18149 2003-09-27  Karl Berry  <karl@gnu.org>
18150
18151         * config/mkinstalldirs: update from automake.
18152
18153 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18154
18155         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18156         (error_tail): Do not loop, reallocating temporary buffer, since
18157         the output cannot contain more wide characters than the input
18158         contains bytes, the size must be big enough already.  This avoids
18159         one potential size overflow calculation.  Check for size overflow
18160         when calculating temporary buffer size.  Free temporary buffer
18161         when done, if it was allocated with malloc; this plugs a memory
18162         leak.  Remove casts from void * to pointers, that are no longer
18163         needed now that we're assuming C89 or better.
18164
18165         Merge error changes from glibc.
18166
18167         * lib/error.c, error.h: Update copyright notice header to match glibc.
18168         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18169         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18170         Disable cancellation while printing error.
18171         * lib/error.h: Prepend __ to parameter names.
18172
18173 2003-09-26  Jim Meyering  <jim@meyering.net>
18174
18175         * lib/error.c (error_tail): Move some declarations
18176         into inner scope where the local variables are used.
18177
18178 2003-09-26  Bruno Haible  <bruno@clisp.org>
18179
18180         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18181         stpncpy().
18182         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18183
18184 2003-09-26  Bruno Haible  <bruno@clisp.org>
18185
18186         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18187         (stpncpy): Define as alias for gnu_stpncpy.
18188         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18189
18190 2003-09-25  Simon Josefsson  <jas@extundo.com>
18191
18192         * lib/xgetdomainname.h: New file.
18193         * lib/xgetdomainname.c: New file.
18194
18195 2003-09-25  Simon Josefsson  <jas@extundo.com>
18196             Bruno Haible  <bruno@clisp.org>
18197
18198         * modules/getdomainname: New file.
18199         * modules/xgetdomainname: New file.
18200         * MODULES.html.sh (func_all_modules): Add getdomainname,
18201         xgetdomainname.
18202
18203 2003-09-25  Simon Josefsson  <jas@extundo.com>
18204             Bruno Haible  <bruno@clisp.org>
18205
18206         * m4/getdomainname.m4: New file.
18207
18208 2003-09-25  Simon Josefsson  <jas@extundo.com>
18209             Bruno Haible  <bruno@clisp.org>
18210
18211         * lib/getdomainname.h: New file.
18212         * lib/getdomainname.c: New file.
18213
18214 2003-09-25  Karl Berry  <karl@gnu.org>
18215
18216         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18217
18218 2003-09-25  Karl Berry  <karl@gnu.org>
18219
18220         * config/install-sh: update from automake.
18221
18222 2003-09-25  Bruno Haible  <bruno@clisp.org>
18223
18224         * modules/version-etc-2: New file, from modules/version-etc with
18225         modifications.
18226         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18227
18228 2003-09-25  Bruno Haible  <bruno@clisp.org>
18229
18230         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18231         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18232
18233 2003-09-24  Simon Josefsson  <jas@extundo.com>
18234
18235         * modules/xgethostname: Add xgethostname.h.
18236
18237 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18238
18239         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18240         the buffer associated with the argument.  Bug reported by
18241         Simon Josefsson.
18242
18243 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18244
18245         * README: Document assumptions that 'int' is at least 32 bits
18246         wide, that integer arithmetic is 2's complement without overflow,
18247         that there are no holes in integer values, that adding sizes of
18248         two nonoverlapping objects can't overflow, and that all-bits-zero
18249         yields scalar zero.  Fix spelling and capitalization typos.
18250
18251 2003-09-19  Karl Berry  <karl@gnu.org>
18252
18253         * lib/argp.h: update from libc.
18254
18255 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18256
18257         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18258         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18259         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18260
18261 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18262
18263         * gnulib-tool: Use "test -h", not "test -L", for portability
18264         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18265         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18266         (sed_extract_prog): Issue s commands one-by-one, rather than
18267         using \| in one s command.
18268
18269 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18270
18271         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18272         input error, instead of returning NULL the next time we are called
18273         (and therefore losing track of errno).
18274
18275 2003-09-16  Bruno Haible  <bruno@clisp.org>
18276
18277         * gnulib-tool (func_create_testdir): Warn about duplicated
18278         dependencies.
18279
18280 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18281
18282         * modules/argmatch, modules/fatal, modules/obstack,
18283         modules/xalloc, modules/xgethostname: Sort dependencies by
18284         importance, not alphabetically.
18285
18286 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18287
18288         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18289         fails, so that the caller gets the proper errno.
18290
18291         * lib/readutmp.c (read_utmp): Likewise.
18292         Check for fstat error.  Close stream and free storage
18293         when failing.
18294
18295 2003-09-14  Karl Berry  <karl@gnu.org>
18296
18297         * config/srclist.txt (strdup.c): disable for c89 changes.
18298
18299 2003-09-14  Jim Meyering  <jim@meyering.net>
18300
18301         * lib/getloadavg.c: Correct cpp indentation.
18302         * lib/strdup.c: Likewise.
18303         * lib/vasnprintf.c: Likewise.
18304
18305 2003-09-14  Bruno Haible  <bruno@clisp.org>
18306
18307         * modules/fwriteerror: New file.
18308         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18309
18310 2003-09-14  Bruno Haible  <bruno@clisp.org>
18311
18312         * lib/fwriteerror.h: New file.
18313         * lib/fwriteerror.c: New file.
18314
18315 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18316
18317         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18318         modules/xgethostname, modules/xalloc: Depend on exit.
18319
18320 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18321
18322         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18323
18324         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18325         and AC_MINIX, too, so that their extensions are available.
18326
18327         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18328         This macro has been superseded by gl_BACKUPFILE.
18329
18330         More patches to assume C89 or better.
18331
18332         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18333
18334         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18335         unconditionally.
18336         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18337         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18338         Include <string.h>, <stdlib.h> unconditionally.
18339         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18340         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18341         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18342         headers or for string.h.
18343         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18344         or strtoul.
18345
18346         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18347         headers.
18348         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18349         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18350         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18351         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18352         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18353         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18354         memcpy, memset.
18355         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18356         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18357         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18358         strtol.
18359         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18360         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18361         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18362         strtoul.
18363
18364 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18365
18366         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18367         * lib/obstack.c [!defined _LIBC]: Likewise.
18368         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18369         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18370         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18371
18372         More changes to assume C89 or better.
18373
18374         * lib/error.c (error_tail): Assume vprintf.
18375
18376         * lib/argmatch.c (getenv): Remove decl.
18377         * lib/progreloc.c (get_full_program_name): Define via prototype.
18378         * lib/setenv.c (clearenv): Likewise.
18379         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18380         needed.
18381         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18382         (malloc, memcpy): Remove decls.
18383         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18384         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18385         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18386         (memcpy): Remove macro.
18387         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18388         (__P): Remove.  All uses removed.
18389         (PTR): Remove.  All uses changed to void *.
18390         (CHAR_BIT, NULL): Remove.
18391         (spaces, zeros, memset_space, memset_zero)
18392         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18393         Remove.
18394         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18395         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18396         Define with prototype.
18397         Remove now-unnecessary prototype decl.
18398         (extra_args_spec): Assume ANSI C.  All uses changed.
18399         (extra_args_spec_iso): Remove.
18400         (my_strftime, emacs_strftimeu): Define via prototype.
18401         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18402         unconditionally.
18403         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18404         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18405         (strtoul, strtol): Remove decls.
18406         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18407         LONG_MAX): Remove.
18408         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18409         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18410         (LOCALE_PARAM_PROTO): New macro.
18411         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18412         (INTERNAL (strtol), strtol): Define with a prototype.
18413         (PARAMS): Remove.  All uses removed.
18414         * lib/tempname.c: Include <string.h> unconditionally.
18415         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18416         * lib/xgethostname.c (main): Define with a prototype.
18417         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18418         Include <stdlib.h> unconditionally.
18419         (calloc, malloc, realloc, free): Remove decls.
18420         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18421         Include <stdlib.h> unconditionally.  Sort include file names.
18422         (strtod): Remove.
18423         (xstrtod): Define with a prototype.
18424         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18425         (strtol, strtoul): Remove decls.
18426
18427 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18428
18429         More patches to assume C89 or better.
18430         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18431         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18432         string.h, memchr, STDC_HEADERS.
18433
18434 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18435
18436         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18437         Include <stdlib.h>, <string.h> unconditionally.
18438         Remove now-unnecessary cast to char *.
18439         * lib/strnlen.c: Include <string.h> unconditionally.
18440         * lib/yesno.c (yesno): Define with a prototype.
18441
18442 2003-09-11  Bruno Haible  <bruno@clisp.org>
18443
18444         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18445
18446 2003-09-10  Jim Meyering  <jim@meyering.net>
18447
18448         * lib/error.c: Correct indentation of cpp directives.
18449
18450 2003-09-10  Bruno Haible  <bruno@clisp.org>
18451
18452         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18453         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18454         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18455         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18456         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18457         <stdlib.h> and <string.h> checks.
18458         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18459         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18460
18461 2003-09-10  Bruno Haible  <bruno@clisp.org>
18462
18463         * lib/strcspn.c: Include <string.h> unconditionally.
18464         * lib/strpbrk.c: Include <string.h> unconditionally.
18465         * lib/strstr.c: Include <string.h> unconditionally.
18466         * lib/unicodeio.c: Include <string.h> unconditionally.
18467         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18468         * lib/unsetenv.c: Likewise.
18469         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18470         * lib/yesno.c: Include <stdlib.h> unconditionally.
18471         (rpmatch): Add prototype.
18472
18473 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18474
18475         More patches to assume C89 or better.
18476         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18477         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18478         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18479         or for string.h.
18480         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18481         stdlib.h.
18482         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18483         C headers.
18484         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18485         string.h.
18486         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18487         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18488         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18489         or for string.h.
18490         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18491         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18492         C headers.
18493         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18494         memcpy.
18495         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18496         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18497         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18498         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18499         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18500         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18501         string.h, free.
18502         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18503         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18504         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18505         C headers, or for string.h.
18506         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18507         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18508         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18509         headers, memory.h, stdlib.h, string.h, strings.h.
18510         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18511         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18512         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18513         strchr.
18514         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18515         headers, memory.h, string.h.
18516         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18517         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18518         free.
18519         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18520         headers.
18521         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18522         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18523         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18524         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18525         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18526
18527 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18528
18529         More K&R removal.
18530
18531         * lib/acosl.c (main): Use a prototype.
18532         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18533         tanl.c: Likewise.
18534
18535         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18536
18537         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18538         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18539         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18540         with a prototype.
18541         * lib/getopt.c (const): Remove macro.
18542         Include <string.h> unconditionally.
18543         (my_index): Remove; all uses changed to strchr.
18544         (strlen): Remove decl.
18545         (exchange): Remove forward decl; no longer needed.
18546         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18547         Define with prototype.
18548         * lib/getopt1.c (const): Remove macro.
18549         (getopt_long, getopt_long_only, main): Define with prototype.
18550
18551         * lib/getugroups.c: Include <string.h> unconditionally.
18552
18553         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18554         (getusershell, setusershell, endusershell, readname, main):
18555         Define with prototypes.
18556
18557         * lib/group-member.c: Include group-member.h first.
18558         Include <stdlib.h> unconditionally.
18559
18560         * lib/hard-locale.c: Include hard-locale.h first.
18561         Include <stdlib.h>, <string.h> unconditionally.
18562
18563         * lib/hash.c (free, malloc): Remove decls.
18564         Include <stdlib.h> unconditionally.
18565
18566         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18567         (getenv): Do not declare.
18568
18569         * lib/idcache.c: Include <string.h> unconditionally.
18570
18571         * lib/long-options.c: Include long-options.h first, to test interface.
18572         Include <stdlib.h> unconditionally.
18573
18574         * lib/makepath.c: Include makepath.h first, to test interface.
18575         Include <stdlib.h> and <string.h> unconditionally.
18576
18577         * lib/linebuffer.c: Include <stdlib.h>.
18578         (free): Remove decl.
18579
18580         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18581         stddef.h. rpl_malloc returns void *, not char *.
18582         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18583         prototype.
18584
18585         * lib/md5.h: Include <limits.h> unconditionally.
18586         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18587         (__P): Remove; all uses removed.
18588         * lib/md5.c: Include "md5.h" first.
18589         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18590         md5_buffer, md5_process_bytes, md5_process_block):
18591         Define with prototypes.
18592         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18593         * lib/sha.c: Include "sha.h" first.
18594         Include <stdlib.h>, <string.h> unconditionally.
18595
18596         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18597         * lib/memcmp.c (__ptr_t): Likewise.
18598         * lib/memrchr.c (__ptr_t): Likewise.
18599         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18600         Include <string.h> unconditionally.
18601         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18602         * lib/memchr.c: Include <stdlib.h> unconditionally.
18603         * lib/memchr.c (LONG_MAX): Remove.
18604         * lib/memrchr.c (LONG_MAX): Likewise.
18605         * lib/memchr.c (__memchr): Define via a prototype.
18606         * lib/memrchr.c (__memrchr): Likewise.
18607         * lib/memcmp.c (__P): Remove, and remove all uses.
18608         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18609         Remove forward decls; no longer needed.
18610         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18611         Use types required by C89 in prototype.
18612
18613         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18614         * lib/savedir.c: Likewise.
18615         * lib/mkdir.c (free): Remove decl.
18616         * lib/rmdir.c (rmdir): Define with a prototype.
18617         * lib/savedir.c: Include savedir.h first, to test interface.
18618
18619         * lib/mktime.c (STDC_HEADERS): Remove.
18620         Include <stdlib.h>, <string.h> unconditionally.
18621
18622         * lib/modechange.c: Include <stdlib.h> unconditionally.
18623         (malloc): Remove decl.
18624
18625         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18626         (free): Remove decl.
18627
18628         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18629         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18630         (This type really should be intptr_t, but that's a C99ism.)
18631         (_obstack_memcpy): Remove: all uses changed to memcpy.
18632         Include <string.h> unconditionally.
18633         (struct obstack): Assume __STDC__ for types of members
18634         chunkfun, freefun, extra_arg.
18635         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18636         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18637         obstack_begin, obstack_specify_allocation,
18638         obstack_specify_allocation_with_arg, obstack_chunkfun,
18639         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18640         Remove unprototyped decls and the macros that use them.
18641         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18642         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18643         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18644         (defined __STDC__ && __STDC__)]:
18645         Remove nonprototyped code.
18646         Include <stdlib.h> unconditionally.
18647         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18648         _obstack_allocated_p, _obstack_free, obstack_free,
18649         _obstack_memory_used, print_and_abort):
18650         Define using prototypes.
18651         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18652         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18653         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18654         obstack_next_free, obstack_object_size, obstack_room) [0]:
18655         Remove unused, unprototyped code.
18656
18657         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18658
18659         * lib/physmem.c (physmem_total, physmem_available, main): Define
18660         with prototypes.
18661
18662         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18663         (main): Define with a prototype.
18664
18665         * lib/posixver.c (getenv): Remove decl.
18666
18667         * lib/putenv.c (malloc): Returns void *, not char *.
18668         Include <string.h> unconditionally.
18669         (strchr, memcpy, NULL): Do not define.
18670
18671         * lib/readtokens.c: Include readtokens.h first, to test interface.
18672         Include <stdlib.h>, <string.h> unconditionally.
18673         (init_tokenbuffer): Define with a prototype.
18674
18675         * lib/regex.c (PARAMS): Remove.  All uses removed.
18676         All uses of _RE_ARGS removed, too.
18677         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18678         unconditionally.
18679         (bzero): Assume memset exists.
18680         (memcmp, memcpy, NULL): Remove.
18681         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18682         char, or assignments to local vars of type signed char.
18683         (init_syntax_once, PREFIX(extract_number_and_incr),
18684         PREFIX(print_partial_compiled_pattern),
18685         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18686         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18687         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18688         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18689         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18690         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18691         wcs_compile_range, byte_compile_range, truncate_wchar,
18692         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18693         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18694         count_mbs_length, wcs_re_match_2_internal,
18695         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18696         PREFIX(alt_match_null_string_p),
18697         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18698         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18699         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18700         now-unnecessary declaration, if any.
18701         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18702         regcomp, regexec):
18703         Remove now-unnecessary casts among pointer types.
18704         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18705
18706         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18707         (free): Remove decl.
18708
18709         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18710
18711         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18712         (free): Remove decl.
18713
18714         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18715         * lib/xgetcwd.c: Likewise.
18716
18717         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18718         (free): Remove decl.
18719
18720         * lib/strchrnul.c (strchrnul): Define with a prototype.
18721         Fix bug: c_in was not converted to char before searching.
18722
18723         The following changes are not K&R related:
18724
18725         * lib/group-member.h: Include <sys/types.h>, so that this file is
18726         self-contained.
18727         * lib/makepath.h: Likewise.
18728
18729         * lib/getusershell.c (readname, default_index, line_size, readname):
18730         Use size_t, not int, for sizes.
18731         (readname): If the size overflows, report an error instead of
18732         looping forever.
18733
18734 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18735
18736         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18737         libc.
18738
18739 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18740
18741         * README: New section: portability guidelines.
18742
18743 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18744
18745         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18746         C89 spec.
18747
18748 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18749
18750         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18751
18752 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18753
18754         Assume C89 or better; remove K&R cruft.
18755         A few of these changes were first proposed by Derek Robert Price
18756         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18757
18758         * lib/addext.c: Include <string.h> unconditionally.
18759         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18760         Don't declare getenv or malloc.
18761
18762         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18763         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18764         (NULL): Remove.
18765         (find_stack_direction, alloca): Use prototypes.
18766
18767         * lib/atexit.c (atexit): Define using a prototype.
18768
18769         * lib/basename.c, dirname.c, stripslash.c:
18770         Include <string.h> unconditionally.
18771
18772         * lib/bcopy.c: Include <stddef.h>.
18773         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18774
18775         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18776
18777         * lib/error.h (error, error_at_line, error_print_progname)
18778         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18779         * lib/error.c: Include error.h first, to check interface.
18780         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18781         (VA_START): Remove; all uses changeed to va_start.
18782         (exit, strerror): Remove decls.
18783         (error_print_progname): Prototype uncondionally.
18784         Don't include <errno.h>; no longer needed.
18785         (private_strerror): Remove.
18786         (error_tail): Always define.
18787         (error, error_at_line): Assume C89 or better; always use prototypes.
18788         * lib/fatal.c: Include "fatal.h" first, to test interface.
18789         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18790         (VA_START): Remove; all uses changed to va_start.
18791         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18792         this case.
18793         (exit): Remove decl.
18794         (fatal): Prototype unconditionally.  Assume va_start works.
18795         Abort at end, to pacify gcc.
18796
18797         * lib/euidaccess.c (main): Define with a prototype.
18798
18799         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18800
18801         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18802
18803         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18804         prototypes.
18805         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18806         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18807         (getenv): Remove decl.
18808         (fnmatch): Define using a prototype.
18809         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18810         (FCT): Define using a prototype.
18811
18812         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18813
18814         * lib/gethostname.c: Include <stddef.h>.
18815         (gethostname): Define with prototype.  Length is size_t, not int.
18816
18817 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18818
18819         Assume C89 or better; remove K&R cruft.
18820         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18821         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18822         string.h, getenv, malloc.
18823         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18824         headers.
18825         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18826         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18827         do not check for strerror.
18828         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18829         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18830         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18831         do not check for doprnt or vprintf.
18832         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18833         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18834
18835 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18836
18837         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18838         getversion.c should have been removed then, but was accidentally
18839         preserved.
18840
18841         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18842         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18843
18844 2003-09-08  Karl Berry  <karl@gnu.org>
18845
18846         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18847                 config, forget about prep.
18848
18849         * config/depcomp, missing: update from automake.
18850
18851 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18852
18853         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18854         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18855
18856 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18857
18858         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18859         copy_tm_result.  Bug reported by Simon Josefsson in
18860         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18861
18862 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18863
18864         * m4/time_r.m4: New file.
18865         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18866         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18867         is. Check for timegm declaration.
18868         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18869         Do not check for gmtime_r.
18870         Replace mktime if __mktime_internal does not exist and if mktime
18871         hasn't been replaced already.
18872
18873 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18874
18875         * lib/time_r.c, lib/time_r.h: New files.
18876
18877         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18878         __localtime_r.
18879         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18880         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18881
18882         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18883         __gmtime_r.
18884         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18885         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18886         Include <time_r.h>.
18887
18888         * lib/timegm.c: Switch to glibc implementation, with the following
18889         changes:
18890         [defined HAVE_CONFIG_H]: Include <config.h>.
18891         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18892         (__mktime_internal) [!defined _LIBC]: New decl.
18893         (__gmtime_r) [!defined _LIBC]: New macro and function.
18894         (timegm): Use a prototype, since gnulib assumes C89.
18895         Do not bother declaring tmp to be const, as it's not really usefu.
18896         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18897         (timegm): Declare only if HAVE_DECL_TIMEGM.
18898
18899 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18900
18901         * MODULES.html.sh (func_all_modules): Add time_r.
18902         * modules/time_r: New file.
18903         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18904         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18905
18906 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18907
18908         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18909         Bug reported by Lute Kamstra in
18910         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18911
18912         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18913         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18914         course with correspondingly smaller numbers for tomorrow and
18915         yesterday.  From Tadayoshi Funaba.  Originally installed into
18916         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18917         coreutils merge?).
18918
18919 2003-08-31  Simon Josefsson  <jas@extundo.com>
18920
18921         * modules/timegm: New file.
18922         * MODULES.html.sh (func_all_modules): Add timegm.
18923
18924 2003-08-31  Simon Josefsson  <jas@extundo.com>
18925
18926         * m4/timegm.m4: New file.
18927
18928 2003-08-31  Simon Josefsson  <jas@extundo.com>
18929
18930         * lib/timegm.h: New file.
18931         * lib/timegm.c: New file.  Based on
18932         wget-1.8.2/src/http.c:mktime_from_utc.
18933
18934 2003-08-31  Karl Berry  <karl@gnu.org>
18935
18936         * lib/argp.h: update from libc.
18937
18938 2003-08-28  Bruno Haible  <bruno@clisp.org>
18939
18940         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18941         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18942         followed by '#define fnmatch fnmatch_posix' gives an error.
18943
18944 2003-08-28  Bruno Haible  <bruno@clisp.org>
18945
18946         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18947         warning on QNX, which defines O_BINARY to 000000.
18948
18949 2003-08-27  Jim Meyering  <jim@meyering.net>
18950
18951         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18952         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18953         would fail after 32.  Reported by Danny Levinson.  Details here:
18954         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18955
18956 2003-08-24  Bruno Haible  <bruno@clisp.org>
18957
18958         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18959         MSVC7 <stdio.h> is included later.
18960
18961 2003-08-22  Simon Josefsson  <jas@extundo.com>
18962
18963         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18964
18965 2003-08-20  Karl Berry  <karl@gnu.org>
18966
18967         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18968
18969 2003-08-20  Bruno Haible  <bruno@clisp.org>
18970
18971         * modules/progname: New file.
18972         * MODULES.html.sh (func_all_modules): Add progname.
18973
18974 2003-08-20  Bruno Haible  <bruno@clisp.org>
18975
18976         * lib/progname.h: New file, from GNU gettext.
18977         * lib/progname.c: New file, from GNU gettext.
18978         * lib/progreloc.c: New file, from GNU gettext.
18979
18980 2003-08-19  Jim Meyering  <jim@meyering.net>
18981
18982         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
18983         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
18984
18985 2003-08-19  Bruno Haible  <bruno@clisp.org>
18986
18987         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
18988         more.
18989
18990 2003-08-19  Bruno Haible  <bruno@clisp.org>
18991
18992         * lib/xstrdup.c: Assume <string.h> exists.
18993
18994 2003-08-18  Paul Eggert  <eggert@twinsun.com>
18995
18996         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
18997         in makefile rules.
18998
18999 2003-08-18  Jim Meyering  <jim@meyering.net>
19000
19001         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19002         * m4/lib-ld.m4: Likewise.
19003
19004 2003-08-18  Jim Meyering  <jim@meyering.net>
19005
19006         * lib/setenv.h: Indent nested cpp directive.
19007         * lib/vasnprintf.c: Remove trailing blanks.
19008
19009 2003-08-17  Simon Josefsson  <jas@extundo.com>
19010
19011         * modules/xstrndup: New file.
19012         * MODULES.html.sh (func_all_modules): Add xstrndup.
19013
19014 2003-08-17  Simon Josefsson  <jas@extundo.com>
19015
19016         * modules/argp: Fix autoconf macro name. Add more dependencies.
19017
19018 2003-08-17  Simon Josefsson  <jas@extundo.com>
19019
19020         * m4/xstrndup.m4: New file.
19021
19022 2003-08-17  Simon Josefsson  <jas@extundo.com>
19023
19024         * m4/argp.m4: New file.
19025
19026 2003-08-17  Simon Josefsson  <jas@extundo.com>
19027             Bruno Haible  <bruno@clisp.org>
19028
19029         * lib/xstrndup.h: New file.
19030         * lib/xstrndup.c: New file.
19031
19032 2003-08-17  Bruno Haible  <bruno@clisp.org>
19033
19034         * modules/strndup (Files, Include): Add lib/strndup.h.
19035
19036 2003-08-17  Bruno Haible  <bruno@clisp.org>
19037
19038         * modules/euidaccess (Files): Add lib/euidaccess.h.
19039
19040 2003-08-17  Bruno Haible  <bruno@clisp.org>
19041
19042         * lib/strndup.h: New file.
19043
19044 2003-08-17  Bruno Haible  <bruno@clisp.org>
19045
19046         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19047         like AC_GNU_SOURCE.
19048         * modules/extensions (configure.ac): Comment out the invocation of
19049         gl_USE_SYSTEM_EXTENSIONS.
19050
19051 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19052
19053         Merges from coreutils, etc.
19054         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19055         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19056         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19057         fixing a typo.
19058         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19059         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19060
19061 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19062
19063         Document merge from coreutils.
19064         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19065         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19066         * modules/utime: Add m4/utimes-null.m4.
19067
19068 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19069
19070         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19071         space, undoing this 2003-08-12 change:
19072         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19073
19074 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19075
19076         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19077         strtoul.c from libc, undoing this 2003-08-12 change:
19078         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19079
19080 2003-08-16  Jim Meyering  <jim@meyering.net>
19081
19082         Merges from coreutils.
19083         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19084         prefix.  Adjust cache variables similarly.  Create 500 rather than
19085         just 300 files, to exercise bug on Darwin6.5, too.
19086         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19087         $missing_dir.
19088         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19089         AM_SYS_POSIX_TERMIOS.
19090         Reported by mkc@mathdogs.com.
19091         Also change use of $am_cv_sys_posix_termios
19092         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19093         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19094         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19095         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19096         in /proc/mounts until it finds one with matching device number.  This
19097         is unnecessary when the FILE argument *is* a mount point.  No stat call
19098         is necessary in that case.  So, disable the statvfs-testing code on
19099         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19100         as RedHat bug# 84846.
19101         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19102         to 1MB, so as not to render systems with no stack size limit (e.g.,
19103         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19104         Include <unistd.h>.  On some systems,
19105         it is required for the definition of _SC_PAGESIZE.
19106
19107 2003-08-16  Jim Meyering  <jim@meyering.net>
19108
19109         Merge from coreutils.
19110         * lib/xstrtoimax.c: #else #if -> #elif.
19111         * lib/xstrtoumax.c: Likewise.
19112
19113 2003-08-16  Jim Meyering  <jim@meyering.net>
19114
19115         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19116         * m4/utimes.m4: Removed.
19117         * m4/utimes-null.m4: Renamed from utimes.m4.
19118
19119         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19120         to 1MB, so as not to render systems with no stack size limit (e.g.,
19121         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19122         Include <unistd.h>.  On some systems,
19123         it is required for the definition of _SC_PAGESIZE.
19124
19125 2003-08-16  Jim Meyering  <jim@meyering.net>
19126         and Paul Eggert  <eggert@cs.ucla.edu>
19127
19128         Merges from coreutils, etc.
19129
19130         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19131         using the latest version from cvs.  This avoids problems with #line
19132         directives using a vendor (Sun) compiler.
19133         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19134         Don't set GETGROUPS_LIB here; now it's
19135         done via getgroups.m4's wrapper function.
19136         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19137         rather than just in sh-util/configure.in, so that the
19138         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19139         same.
19140         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19141         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19142         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19143         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19144         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19145         Remove code that is now done by the newly-required macros.
19146         Append $(EXEEXT) to DF_PROG.
19147         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19148         Do not invoke or require the following here,
19149         since prereq.m4 or some gnulib .m4 now does this for us:
19150         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19151         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19152         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19153         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19154         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19155         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19156         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19157         AC_FUNC_OBSTACK.
19158         Do not replace the following functions, as this is now the job
19159         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19160         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19161         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19162         atexit getpass, strdup, getpagesize.
19163         Replace 'raise'.
19164         Do not check for the following functions, as this is now the job
19165         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19166         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19167         setregid.
19168         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19169         Check for sys/sysctl.h.
19170         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19171         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19172         of checking for ssize_t ourselves.
19173
19174         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19175         Require every macro that gnulib/modules/* suggests for us.
19176         (jm_PREREQ_ADDEXT): New macro.
19177         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19178         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19179
19180         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19181         (gl_PHYSMEM): Use it.
19182         Also check for `table' function.
19183         Check for new headers and functions.
19184         Add check for sys/sysmp.h.
19185         With suggestions from Kaveh Ghazi.
19186         Ignore headers that are present but cannot be compiled.  This
19187         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19188         C 5.4.
19189
19190 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19191
19192         Document merge from coreutils.
19193         * modules/userspec: Depend on posixver.
19194         * modules/strftime: Depend on tzset.
19195
19196 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19197
19198         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19199         rather than tab, after '#' in shell-script copyright notices.
19200         Suggested by Bruno Haible.
19201
19202 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19203
19204         * config/srclist-update: Use three spaces, rather than tab, after '#'
19205         in shell-script copyright notices.  Suggested by Bruno Haible.
19206         Remove unnecessary parenthesization in regular expression.
19207
19208 2003-08-15  Jim Meyering  <jim@meyering.net>
19209
19210         Merge from coreutils.
19211         * lib/xgethostname.c: Include <stdlib.h>.
19212         (xghostname): Don't exit for anything other than memory-related
19213         failure; just return NULL.
19214         * lib/userspec.c: Include "posixver.h".
19215         (parse_user_spec): Accept `.' as a separator only
19216         in pre-POSIX-200112 mode.
19217         * lib/strtoimax.c: Use #elif rather than #else #if.
19218         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19219         Remove function, now that we can rely on a working tzset function.
19220         [!_LIBC]: Ensure that the required autoconf test has been run.
19221         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19222         Use underlying_strftime for %r.
19223         * lib/sha.c: Merge in some clean-up and optimization changes from
19224         glibc.
19225         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19226         Ensure that it is a multiple of 64.
19227         Rearrange loop exit tests so as to avoid performing an
19228         additional fread after encountering an error or EOF.
19229         * lib/realloc.c: Update copyright date.
19230
19231 2003-08-15  Jim Meyering  <jim@meyering.net>
19232         and Paul Eggert  <eggert@twinsun.com>
19233
19234         Merge from coreutils.
19235         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19236         member but strut utmpx does not.  Needed for AIX 4.3.3.
19237         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19238
19239 2003-08-15  Jim Meyering  <jim@meyering.net>
19240         and Paul Eggert  <eggert@cs.ucla.edu>
19241
19242         Merges from coreutils, etc.
19243         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19244         Require gl_FUNC_TZSET_CLOBBER.
19245         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19246         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19247         members.
19248
19249 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19250
19251         Help the merge from coreutils.
19252         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19253         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19254         * m4/tzset.m4: Use it too.
19255
19256 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19257
19258         * modules/tzset: New file.
19259
19260 2003-08-14  Jim Meyering  <jim@meyering.net>
19261
19262         Merges from coreutils.
19263         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19264         variable names, rather than @FNMATCH_H@.
19265         * modules/alloca: Likewise for $(ALLOCA_H).
19266
19267         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19268         the three copies of the literal target, `fnmatch.h'.
19269         * modules/alloca (alloca.h): Likewise.
19270
19271 2003-08-14  Jim Meyering  <jim@meyering.net>
19272
19273         Merge from coreutils.
19274         * m4/tzset.m4: New file.
19275         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19276         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19277         otherwise, AIX 5.1 systems would end up using the latter.
19278         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19279         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19280         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19281         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19282
19283 2003-08-14  Jim Meyering  <jim@meyering.net>
19284
19285         Merge from coreutils.
19286         * lib/obstack.h: Whitespace changes.
19287         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19288         and xcalloc return values.
19289         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19290         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19291         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19292         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19293         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19294         error from mntctl.
19295         Use mntctl's return value to drive the entry-processing loop, since
19296         we can't rely on the value of the vmt_length member in the last
19297         entry.  On some systems doing so could result in exhausting
19298         virtual memory.  Based in part on a patch from Mike Jetzer.
19299
19300 2003-08-14  Jim Meyering  <jim@meyering.net>
19301         and Paul Eggert  <eggert@twinsun.com>
19302
19303         Merges from coreutils, plus other fixes.
19304         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19305         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19306         for credits and details.  Thanks to Kaveh Ghazi for helping
19307         to keep these files in sync.
19308         (ARRAY_SIZE): Define it.
19309         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19310         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19311         (memcasecmp): Don't assume size_t fits in unsigned int.
19312         Remove casts and duplicate code.
19313         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19314         (memcpy): Remove definition.
19315         Merge in some clean-up and optimization changes from glibc.
19316         [BLOCKSIZE]: Move definition to top of file.
19317         Ensure that it is a multiple of 64.
19318         Rearrange loop exit tests so as to avoid performing an
19319         additional fread after encountering an error or EOF.
19320         * lib/md5.h (md5_uintptr): Define.
19321         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19322         return to the initial working directory.  Preserve errno
19323         for caller.
19324         * lib/idcache.c: Include "xalloc.h".
19325         (xmalloc, xrealloc): Remove decls.
19326         (getuser): Remove casts no longer required in C89.
19327         * lib/human.c: Include stdio.h, for sprintf.
19328         * lib/group-member.c: Include "xalloc.h".
19329         (xmalloc, xrealloc): Remove decls.
19330         (get_group_info): Remove casts no longer required in C89.
19331         * lib/getusershell.c (readname): Remove casts no longer required in
19332         C89.
19333         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19334         * lib/getline.c: Whitespace fix, from coreutils.
19335
19336 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19337
19338         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19339         Check for isascii.
19340
19341         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19342         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19343         Undo previous (whitespace-only) change.
19344
19345 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19346
19347         * lib/exclude.c: Include <ctype.h>
19348         (IN_CTYPE_DOMAIN): New macro.
19349         (is_space): New fn.
19350         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19351         and empty lines.
19352
19353         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19354         Undo previous (whitespace-only) change.
19355
19356 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19357
19358         * config/srclist-update: Change update back to the old behavior,
19359         leaving whitespace alone.  Use one 'sed' command rather than a
19360         pipeline.
19361         (fixlicense): Now a variable, not a function.
19362         (remove_trailing_blanks): Remove.
19363         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19364         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19365         Undo previous (whitespace-only) change.
19366
19367 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19368
19369         Merge from coreutils.
19370         * modules/euidaccess: Add lib_SOURCES, include for new
19371         file euidaccess.h
19372
19373 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19374
19375         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19376         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19377         Normalize leading white space and remove trailing white space.
19378
19379         Merge from coreutils
19380         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19381
19382         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19383         0.12.1.  These files are now being upgraded automatically by
19384         ../config/srclist-update.
19385
19386 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19387
19388         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19389         Normalize leading white space and remove trailing white space.
19390         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19391         notice, as per ../config/srclist-update.
19392
19393         Merge from coreutils.
19394         * lib/euidaccess.h: New file.
19395         * lib/euidaccess.c: Include it.
19396         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19397         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19398         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19399
19400 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19401
19402         * config/srclist-update: Add copyright notice.
19403         (remove_id_lines, remove_trailing_blanks): New constants.
19404         (fixfile): Use them to normalize spacing a bit in copied files.
19405         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19406         Normalize leading white space and remove trailing white space.
19407
19408         * config/texinfo.tex: Sync with texinfo.
19409
19410         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19411         strtoul.c from libc, to merge coreutils whitespace changes.
19412
19413         * config/srclist.txt: Get the following m4 files from gettext:
19414         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19415         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19416         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19417         wint_t.m4.
19418
19419 2003-08-12  Karl Berry  <karl@gnu.org>
19420
19421         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19422         been made.
19423
19424 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19425
19426         * modules/gnu-source, m4/gnu-source.m4:
19427         Remove; we're assuming Autoconf 2.54 or later now.
19428         Suggested by Bruno Haible.
19429         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19430
19431 2003-08-11  Bruno Haible  <bruno@clisp.org>
19432
19433         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19434
19435 2003-08-11  Bruno Haible  <bruno@clisp.org>
19436
19437         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19438         (vasnprintf): Use it instead of wcslen.
19439
19440 2003-08-11  Bruno Haible  <bruno@clisp.org>
19441
19442         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19443         value to ensure that _Bool promotes to int. Use #define for _Bool when
19444         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19445
19446 2003-08-10  Karl Berry  <karl@gnu.org>
19447
19448         * lib/regex.h: update from libc (whitespace fix).
19449
19450 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19451
19452         Merge some files from coreutils.  These changes were
19453         originally made by Jim Meyering.
19454         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19455         many older Unixes require this.
19456         * lib/alloca.c (alloca): Remove cast to argument of free;
19457         no longer needed in C89.
19458         * lib/alloca_.h, regex.h: Fix white space to match
19459         what GNU indent does.
19460
19461 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19462
19463         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19464         apparently Emacs's Unicode mode got confused before my 2003-08-05
19465         checkin.
19466
19467 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19468
19469         * m4/extensions.m4: New file.
19470         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19471         Require gl_USE_SYSTEM_EXTENSIONS.
19472         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19473         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19474
19475 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19476
19477         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19478         * modules/extensions, modules/gnu-source: New files.
19479         * modules/timespec, modules/unlocked-io: Depend on extensions.
19480
19481 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19482
19483         * modules/restrict: New file.
19484         * MODULES.html.sh (func_all_modules): Add restrict.
19485         * modules/regex: Depend on restrict.
19486
19487 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19488
19489         * m4/restrict.m4: New file.
19490         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19491
19492 2003-08-07  Bruno Haible  <bruno@clisp.org>
19493
19494         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19495         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19496
19497 2003-08-07  Bruno Haible  <bruno@clisp.org>
19498
19499         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19500         makes the module 'getndelim2' compatible with the module 'getline'.
19501
19502 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19503
19504         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19505         byte with "\201" to avoid glitches when editing that source file
19506         with multi-gnome-terminal.
19507
19508 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19509
19510         * lib/bumpalloc.h: Remove.
19511
19512 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19513
19514         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19515         * modules/bumpalloc: Remove.
19516
19517 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19518
19519         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19520         GNU coding style.
19521
19522         Merge from coreutils.
19523         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19524         1. From glibc.
19525         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19526         from Karl Berry, implemented by Jim Meyering.
19527         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19528         from Dmitry V. Levin.
19529         Remove anachronistic cast of xrealloc.
19530         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19531         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19532         type. Otherwise, it wouldn't compile with at least /bin/cc on
19533         ymp-cray-unicos9.0.2.X.
19534         Combine two mostly-identical uses of alloca into one.
19535         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19536
19537 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19538
19539         [From Emacs.]
19540
19541         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19542         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19543         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19544         obsolete NLIST_NAME_UNION.
19545         [__GNU__]: Undef BSD and FSCALE.
19546         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19547
19548 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19549
19550         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19551         an enum type, so that it's guaranteed to promote to int.  See:
19552         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19553
19554 2003-08-03  Karl Berry  <karl@gnu.org>
19555
19556         * config/depcomp: update from automake.
19557
19558 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19559
19560         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19561         (strerror): Don't assume that a printable int fits in 14 bytes.
19562
19563 2003-07-31  Bruno Haible  <bruno@clisp.org>
19564
19565         * modules/getpass-gnu: New file.
19566         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19567
19568 2003-07-31  Bruno Haible  <bruno@clisp.org>
19569
19570         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19571
19572 2003-07-24  Karl Berry  <karl@gnu.org>
19573
19574         * config/missing: update from automake.
19575
19576 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19577             Bruno Haible  <bruno@clisp.org>
19578
19579         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19580         * lib/getline.c (getline, getdelim): Likewise.
19581         Remove _GNU_SOURCE define; now it's defined in config.h through
19582         m4/getline.m4.
19583
19584 2003-07-23  Karl Berry  <karl@gnu.org>
19585
19586         * config/config.sub: update from prep.
19587
19588 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19589
19590         * modules/xalloc (Depends-on): Add exitfail.
19591         * modules/xmemcoll: Likewise.
19592
19593 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19594
19595         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19596         over-parenthesization in macros.
19597
19598         Sync with coreutils.
19599
19600         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19601         required by C99.
19602
19603         Use `exit_failure' for xalloc and xmemcoll instead of their own
19604         private exit-failure variables.
19605         * lib/xalloc.h (xalloc_exit_failure): Remove.
19606         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19607         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19608         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19609         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19610         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19611
19612 2003-07-20  Jim Meyering  <jim@meyering.net>
19613
19614         * modules/closeout (Depends-on): Add exitfail.
19615         Suggestion from Bruno Haible.
19616
19617 2003-07-19  Karl Berry  <karl@gnu.org>
19618
19619         * config/config.sub: update from prep.
19620
19621 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19622
19623         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19624         Remove.
19625         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19626         to test that it can stand by itself.  Include "exitfail.h".
19627         Clients should set exit_failure instead.
19628         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19629
19630 2003-07-18  Bruno Haible  <bruno@clisp.org>
19631
19632         * modules/getndelim2: New file.
19633         * modules/getline: Share files with module getndelim2.
19634         * modules/getnline: Depend on getndelim2 instead of sharing files with
19635         it. Add getnline.c to lib_SOURCES.
19636         * MODULES.html.sh (func_all_modules): Add getndelim2.
19637
19638 2003-07-18  Bruno Haible  <bruno@clisp.org>
19639
19640         * m4/getndelim2.m4: New file.
19641         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19642         invoke gl_PREREQ_GETNDELIM2.
19643         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19644         gl_PREREQ_GETNDELIM2.
19645         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19646         gl_GETNDELIM2.
19647
19648 2003-07-18  Bruno Haible  <bruno@clisp.org>
19649
19650         * lib/getndelim2.h: New file.
19651         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19652         getndelim2.h.
19653         (getndelim2): Make non-static. Change return type to ssize_t.
19654         * lib/getline.h: Change argument names.
19655         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19656         * lib/getnline.c: Include getndelim2.h.
19657
19658 2003-07-18  Andreas Schwab  <schwab@suse.de>
19659
19660         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19661
19662 2003-07-17  Karl Berry  <karl@gnu.org>
19663
19664         * config/config.sub: update from prep.
19665
19666 2003-07-17  Bruno Haible  <bruno@clisp.org>
19667
19668         * modules/getnline: New file.
19669         * modules/getline: Add lib/getndelim2.c to source file list.
19670         * MODULES.html.sh (func_all_modules): Add getnline.
19671
19672 2003-07-17  Bruno Haible  <bruno@clisp.org>
19673
19674         * m4/getnline.m4: New file.
19675
19676 2003-07-17  Bruno Haible  <bruno@clisp.org>
19677
19678         * m4/Makefile.am.in: Remove file.
19679         * m4/Makefile.am: Remove file.
19680         * m4/Makefile.in: Remove file.
19681
19682 2003-07-17  Bruno Haible  <bruno@clisp.org>
19683
19684         * lib/getnline.h: New file.
19685         * lib/getnline.c: New file.
19686         * lib/getndelim2.c: New file, extracted from getline.c.
19687         (getndelim2): Renamed from getdelim2, with added nmax argument.
19688         * lib/getline.c: Include getndelim2.c.
19689         (getdelim2): Moved out to getndelim2.c.
19690         (getline, getdelim): Update.
19691
19692 2003-07-17  Bruno Haible  <bruno@clisp.org>
19693
19694         * lib/Makefile.am: Remove file.
19695         * lib/Makefile.in: Remove file.
19696
19697 2003-07-17  Bruno Haible  <bruno@clisp.org>
19698
19699         * configure.in: Remove file.
19700         * Makefile.in: Remove file.
19701
19702 2003-07-17  Bruno Haible  <bruno@clisp.org>
19703
19704         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19705
19706 2003-07-16  Karl Berry  <karl@gnu.org>
19707
19708         * config/srclist-update: was running fixlicense twice, which caused
19709                 texinfo.tex to be nullified for some reason.  Simplify,
19710                 $gplsrc is no longer needed as far as I can see?
19711
19712 2003-07-16  Jim Meyering  <jim@meyering.net>
19713
19714         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19715
19716 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19717
19718         * config/srclist.txt: Get the following files from gettext-runtime/intl
19719         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19720         ref-del.sin.  From Bruno Haible.
19721         * config/srclist-update (fixfile): Change grep pattern again, since the
19722         previous fix didn't work (there was another trailing $).  Use
19723         '[$]' to escape the $s.
19724
19725 2003-07-15  Karl Berry  <karl@gnu.org>
19726
19727         * lib/vasnprintf.c: update from gettext.
19728
19729 2003-07-15  Karl Berry  <karl@gnu.org>
19730
19731         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19732         gets expanded when surrounded by '$'.
19733
19734 2003-07-15  Jim Meyering  <jim@meyering.net>
19735
19736         * modules/save-cwd: Don't depend on error.  From Derek Price.
19737
19738 2003-07-15  Jim Meyering  <jim@meyering.net>
19739
19740         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19741
19742 2003-07-14  Simon Josefsson  <jas@extundo.com>
19743
19744         * modules/mempcpy: New file.
19745         * MODULES.html.sh (func_all_modules): Add mempcpy.
19746
19747 2003-07-14  Simon Josefsson  <jas@extundo.com>
19748
19749         * m4/mempcpy.m4: New file.
19750
19751 2003-07-14  Simon Josefsson  <jas@extundo.com>
19752
19753         * lib/mempcpy.h: New file.
19754         * lib/mempcpy.c: New file.
19755
19756 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19757
19758         * modules/getdate, modules/posixtm: Depend on mktime.
19759
19760 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19761
19762         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19763         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19764         unicodeio.c, unicodeio.h, unlocked-io.h:
19765         Switch from LGPL to GPL.
19766
19767 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19768
19769         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19770         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19771         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19772         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19773         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19774         updated automatically by ../config/srclist-update.  This changes
19775         their license from LPGL to GPL.
19776
19777 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19778
19779         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19780         assumed to refer to the root of the most recent stable gettext version.
19781         * config/srclistvars.sh: Add defaults for eggert.
19782         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19783         Match "This program" as well as "The program".  This is needed
19784         for gettext.
19785
19786 2003-07-14  Jim Meyering  <jim@meyering.net>
19787
19788         Don't emit diagnostics.  Let callers do that.
19789         * lib/save-cwd.c: Don't include "error.h".
19790         (save_cwd): Don't call error.  Ensure that errno is valid
19791         when returning nonzero.
19792
19793         * lib/save-cwd.h (restore_cwd): Update prototype.
19794         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19795         Simplify.  Don't call error upon failure.  Let callers do that.
19796         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19797         when auditing is enabled.  But don't bother updating the #if.
19798
19799 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19800
19801         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19802         it breaks C++ compilation.
19803         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19804
19805 2003-07-10  Simon Josefsson  <jas@extundo.com>
19806
19807         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19808
19809 2003-07-10  Jim Meyering  <jim@meyering.net>
19810
19811         * m4/clock_time.m4: Remove trailing blank.
19812         * m4/intmax_t.m4: Likewise.
19813
19814 2003-07-10  Jim Meyering  <jim@meyering.net>
19815
19816         * lib/vasnprintf.c: Remove trailing blanks.
19817         Make cpp indentation consistent.
19818
19819 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19820
19821         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19822         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19823         Switch from LGPL to GPL.
19824
19825 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19826
19827         * config/srclist.txt: Sort sublists.  Add
19828         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19829         that differ from gnulib for one reason or another; we'd like this list
19830         to be smaller but for now let's document what we have.
19831
19832 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19833
19834         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19835         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19836         and sweeter "eval x=$x".
19837         * config/srclist.txt: Get lib/argp* from glibc.
19838
19839 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19840
19841         * lib/mktime.c: Fix some boundary cases and remove need for floating
19842         point.
19843
19844         Issue a compile-time diagnostic if time_t is floating point, or if
19845         two's complement arithmetic is not in effect, or if arithmetic
19846         right shift does not propagate the sign.  These assumptions were
19847         all in the original code but they weren't checked.
19848
19849         (TIME_T_MIDPOINT, verify): New macros.
19850         (__isleap): Remove; it has integer overflow problems.
19851         (leapyear): New function, without those problems.
19852         (ydhms_tm_diff): Remove; splitting into two parts.
19853         (ydhms_diff): New function, containing the arithmetic part of
19854         the old ydhms_tm_diff function.  Issue a compile-time
19855         diagnostic if we are not using C99 integer division.
19856         Avoid casts when possible.
19857         (guess_time_tm): New function, containing the checking part of
19858         the old ydhms_tm_diff function.  Return the new value, rather than
19859         the difference between it and the old.  Accept a new argument T
19860         so that *T specifies the old value.  Check for overflow in the result.
19861
19862         (__mktime_internal): Use a time_t offset, not a long int offset.
19863         This undoes the 2003-06-04 change, which is no longer needed now
19864         that we have better overflow checking.
19865         (localtime_offset): Likewise.
19866
19867         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19868         and long are 64-bit but int is only 32-bit.
19869         (ydhms_diff): Use long int to store year1 and yday1.
19870         Issue a compile-time diagnostic if long int is not wide enough.
19871
19872         (__mktime_internal): Use long int to store adjusted year and yday.
19873         Use plain C rather than preprocessor commands, if that doesn't
19874         affect efficiency.
19875         Check for overflow (and try to repair) after each probe
19876         rather than checking only at the very end.  This avoids some bugs
19877         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19878         does not equal GMT offset at maximum time).
19879         Use integer to check for overflow rather than floating point; this
19880         is more portable to non-IEEE hosts, and is a tad faster.
19881         When we detect that we are oscillating between two values,
19882         don't check whether tm_isdst has the requested value, since
19883         we already know the answer.  When tm_isdst has the wrong value,
19884         use a different heuristic to find the right one, based on the
19885         extreme values actually observed in practice in tz2003a,
19886         rather than the (overly optimistic) "previous 3 calendar quarters".
19887
19888         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19889         "T const" to accommodate glibc style.
19890         (check_result): Use less-confusing report format.  "long" -> "long int.
19891         (main): Likewise.
19892         Don't loop if the iteration overflows time_t.
19893         Allow a negative step in the iteration.
19894
19895 2003-07-06  Karl Berry  <karl@gnu.org>
19896
19897         * config/depcomp: update from automake.
19898         * config/config.sub: update from prep.
19899
19900 2003-07-03  Karl Berry  <karl@gnu.org>
19901
19902         * config/config.guess: update from prep.
19903
19904 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19905
19906         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19907         xreadlink.c now includes it unconditionally.
19908
19909 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19910
19911         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19912         having it depend on HAVE_SYS_TYPES_H.
19913
19914 2003-07-01  Bruno Haible  <bruno@clisp.org>
19915
19916         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19917         <sys/types.h> should be sufficient.
19918         Reported by Paul Eggert.
19919
19920 2003-06-26  Karl Berry  <karl@gnu.org>
19921
19922         * config/depcomp: update from automake.
19923
19924 2003-06-26  Bruno Haible  <bruno@clisp.org>
19925
19926         * modules/human: Depend on module stdbool.
19927
19928 2003-06-25  Bruno Haible  <bruno@clisp.org>
19929
19930         * modules/readlink: New file.
19931         * modules/xreadlink: Depend on it.
19932         * MODULES.html.sh (func_all_modules): Add readlink.
19933
19934 2003-06-25  Bruno Haible  <bruno@clisp.org>
19935
19936         * m4/readlink.m4: New file.
19937
19938 2003-06-25  Bruno Haible  <bruno@clisp.org>
19939
19940         * lib/readlink.c: New file.
19941
19942 2003-06-22  Karl Berry  <karl@gnu.org>
19943
19944         * config/srclist.txt: update mkinstalldirs from automake.
19945         * config/mkinstalldirs: update.
19946
19947 2003-06-22  Bruno Haible  <bruno@clisp.org>
19948
19949         Portability to mingw32.
19950         * m4/ssize_t.m4: New file, from GNU gettext.
19951         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19952         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19953
19954 2003-06-22  Bruno Haible  <bruno@clisp.org>
19955
19956         * modules/safe-read: Add m4/ssize_t.m4.
19957         * modules/xreadlink: Add m4/ssize_t.m4.
19958
19959 2003-06-20  Bruno Haible  <bruno@clisp.org>
19960
19961         Assume C89, so PARAMS isn't needed.
19962         * lib/unicodeio.h (PARAMS): Remove.
19963         * lib/unicodeio.c: Don't use PARAMS.
19964
19965 2003-06-18  Karl Berry  <karl@gnu.org>
19966
19967         * config/config.{guess,sub}: update from prep.
19968
19969 2003-06-18  Jim Meyering  <jim@meyering.net>
19970
19971         Merge changes from coreutils.
19972         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
19973         Remove explicit declarations of xmalloc and realloc.
19974         Include xalloc.h.
19975         (read_utmp): Remove anachronistic cast of xmalloc.
19976
19977 2003-06-17  Paul Eggert  <eggert@twinsun.com>
19978
19979         Assume C89, so PARAMS isn't needed.
19980         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
19981         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
19982         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
19983         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
19984         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
19985         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
19986         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
19987         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
19988         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
19989         lib/xstrtod.h, lib/xstrtol.h: Likewise.
19990         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
19991         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
19992         no longer needed. Anyway, config.h should always be included before any
19993         other file.
19994
19995 2003-06-11  Simon Josefsson  <jas@extundo.com>
19996
19997         * modules/sysexits: New file.
19998         * MODULES.html.sh (func_all_modules): Add sysexits.
19999
20000 2003-06-11  Simon Josefsson  <jas@extundo.com>
20001
20002         * lib/sysexit_.h: New file.
20003
20004 2003-06-11  Derek Price  <derek@ximbiot.com>
20005
20006         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20007         necessary.
20008
20009 2003-06-11  Bruno Haible  <bruno@clisp.org>
20010
20011         * m4/sysexits.m4: New file.
20012
20013 2003-06-10  Simon Josefsson  <jas@extundo.com>
20014
20015         * lib/argp.h: New file, from glibc.
20016         * lib/argp-ba.c: New file, from glibc.
20017         * lib/argp-eexst.c: New file, from glibc.
20018         * lib/argp-fmtstream.c: New file, from glibc.
20019         * lib/argp-fmtstream.h: New file, from glibc.
20020         * lib/argp-fs-xinl.c: New file, from glibc.
20021         * lib/argp-help.c: New file, from glibc.
20022         * lib/argp-namefrob.h: New file, from glibc.
20023         * lib/argp-parse.c: New file, from glibc.
20024         * lib/argp-pv.c: New file, from glibc.
20025         * lib/argp-pvh.c: New file, from glibc.
20026         * lib/argp-xinl.c: New file, from glibc.
20027
20028 2003-06-10  Simon Josefsson  <jas@extundo.com>
20029
20030         * modules/strchrnul: New file.
20031
20032 2003-06-10  Simon Josefsson  <jas@extundo.com>
20033
20034         * modules/argp: New file.
20035
20036 2003-06-10  Simon Josefsson  <jas@extundo.com>
20037
20038         * m4/strchrnul.m4: New file.
20039
20040 2003-06-10  Simon Josefsson  <jas@extundo.com>
20041
20042         * lib/strchrnul.h: New file.
20043         * lib/strchrnul.c: New file.
20044
20045 2003-06-10  Bruno Haible  <bruno@clisp.org>
20046
20047         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20048
20049 2003-06-07  Karl Berry  <karl@gnu.org>
20050
20051         * config/config.{guess,sub}: update from prep.
20052
20053 2003-06-07  Jim Meyering  <jim@meyering.net>
20054
20055         * modules/strtod: Use $(...) notation, not @...@ for
20056         AC_REPLACE'd variables.
20057         * modules/localcharset: Likewise.
20058
20059 2003-06-07  Jim Meyering  <jim@meyering.net>
20060
20061         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20062         in place of my name in the copyright comment.
20063         Remove definition and uses of __P.
20064
20065         From coreutils.
20066         * lib/stat.c: Don't declare xmalloc explicitly.
20067         Instead, include "xalloc.h".
20068         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20069         xrealloc, and xcalloc return values.
20070         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20071         Improve comment.
20072         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20073
20074 2003-06-07  Bruno Haible  <bruno@clisp.org>
20075
20076         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20077         avoid AC_CONFIG_LINKS.
20078         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20079         fnmatch.h, to avoid AC_CONFIG_LINKS.
20080         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20081
20082 2003-06-07  Bruno Haible  <bruno@clisp.org>
20083
20084         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20085         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20086         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20087         directory.
20088         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20089         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20090         directory.
20091
20092 2003-06-06  Jim Meyering  <jim@meyering.net>
20093
20094         Merge from coreutils.
20095         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20096         Consolidate declarations and initializations of *_base* locals.
20097
20098         Merge from coreutils.
20099         This avoids a core dump on systems without GNU putenv,
20100         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20101         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20102         (unsetenv): New static function, from GNU libc.
20103         (rpl_putenv): Use it.
20104
20105         * lib/modechange.c: Remove trailing blanks.
20106
20107         Merge from coreutils.
20108         * lib/fsusage.c: Remove declaration of statfs.
20109         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20110
20111         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20112
20113 2003-06-06  Jim Meyering  <jim@meyering.net>
20114
20115         * lib/stdbool_.h: Renamed from stdbool.h.in.
20116
20117 2003-06-06  Jim Meyering  <jim@meyering.net>
20118             Bruno Haible  <bruno@clisp.org>
20119
20120         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20121         Adjust Makefile.am snippet not to redirect directly to target.
20122         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20123
20124 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20125
20126         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20127         mismatch, look in future quarters as well as past.  This fixes a
20128         bug when processing fall-backwards gaps immediately after a long
20129         period of daylight-saving time.
20130
20131         * lib/mktime.c: Assume freestanding C89 or better.
20132         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20133         (__P): Remove; not used.
20134         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20135         (mktime, not_equal_tm, print_tm, check_result,
20136         main): Use prototypes.  Use const * where appropriate.
20137         (main): Fix typo in testing code that uncovered by above changes.
20138         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20139
20140 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20141
20142         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20143         locale.h, localeconv.  This merges changes from coreutils.
20144
20145         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20146         It can be removed after the next Autoconf is released.
20147         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20148         needed.
20149
20150 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20151
20152         * lib/mktime.c: Fix Debian bug 177940
20153         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20154         (localtime_offset): Now long int, not time_t, because we want it
20155         to be guaranteed to be signed.  All uses changed.
20156         (__mktime_internal): If overflow would occur when adding offset,
20157         don't add it.
20158
20159         Merge 'human' changes from coreutils.  Rewrite to support
20160         locale-specific notations like thousands separators.
20161         * lib/human.c: Simplify authorship notice.
20162         Include human.h immediately after config.h.
20163         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20164         <limits.h>: Do not include, since human.h does.
20165         (SIZE_MAX, UINTMAX_MAX): New macros.
20166         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20167         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20168         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20169         (power_letter): Renamed from suffixes.
20170         (generate_suffix_backwards): Remove.
20171         (adjust_value): Now takes int style (because of human.h changes)
20172         and long double value (for greater precision on some platforms).
20173         (group_number): New function.
20174         (human_readable): Use it.  Use integer options, not enum.
20175         Put the options before the sizes in the arg list.
20176         Support all the new options.
20177         The old human_readable function has been removed;
20178         use inttostr.h instead.
20179         (human_readable, default_block_size, humblock):
20180         Use uintmax_t, not int, for block sizes.
20181         (human_readable_inexact, block_size_types): Remove.
20182         (block_size_opts): New constant.
20183         (human_options): Renamed from human_block_size, with new signature
20184         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20185         * lib/human.h: Add copyright and authorship notice.
20186         Include <limits.h> and <stdbool.h> unconditionally.
20187         (PARAMS): Remove.  All uses removed.
20188         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20189         (enum human_inexact_style): Remove tag; now a nameless enum.
20190         (human_floor, human_ceiling, human_round_to_even): Now have
20191         values 2, 0, 1 rather than -1, 1, 0.
20192         (human_group_digits, human_suppress_point_zero, human_autoscale,
20193         human_base_1024, human_SI, human_B): New constants.
20194         (human_readable_inexact, human_block_size): Remove.
20195         (human_readable): Size args are now uintmax_t, not int.
20196         (human_options): New decl.
20197
20198         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20199         unnecessary now that we assume C89 or better.  This change
20200         imported from coreutils.
20201
20202         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20203         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20204         in the 2003-05-30 sync from glibc.
20205
20206         .h files should stand alone, but we shouldn't include <sys/types.h>
20207         if we can get away with just <stddef.h>.
20208
20209         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20210         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20211         rather than <sys/types.h>, as we merely need size_t.
20212         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20213         to get size_t.
20214         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20215         Include <stdio.h>, to get FILE.
20216         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20217         memcasecmp.h has included <stddef.h> and all we need is size_t.
20218         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20219         our interface, instead of including <sys/types.h>
20220
20221 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20222
20223         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20224         now, as glibc mktime is buggy on non-glibc systems.
20225
20226 2003-06-03  Karl Berry  <karl@gnu.org>
20227
20228         * config/config.sub: update from prep.
20229
20230 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20231
20232         [from coreutils]
20233         Fix some minor time-related bugs with POSIX time arguments.
20234         Some valid time stamps were being rejected (notably -1, and
20235         time stamps before 1900 on 64-bit hosts).  And some invalid
20236         time stamps were being accepted, e.g. September 31.
20237
20238         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20239         that we can return (time_t) -1 successfully.
20240         * lib/posixtm.c: Likewise.
20241         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20242         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20243         (t): Remove static var.
20244         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20245         of static var.  All uses changed.
20246         (year): Do not reject years before 1900; they can occur with
20247         64-bit time_t.
20248         (posix_time_parse): Do not check for out-of-range components;
20249         that is now the caller's responsibility, since our checks were
20250         only approximations.
20251         (posixtime): Use mktime to check for out-of-range components,
20252         since it knows them exactly.
20253         If mktime returns (time_t) -1, check whether an error actually occurred
20254         by invoking localtime on -1.
20255         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20256         posixtime failures better.
20257         Improve the test data (in comments only).
20258
20259 2003-06-02  Karl Berry  <karl@gnu.org>
20260
20261         * config/mkinstalldirs (version): new variable.
20262         (--version): new option.
20263         (usage): improve message.
20264
20265 2003-05-30  Karl Berry  <karl@gnu.org>
20266
20267         * lib/mktime.c: update from libc.
20268
20269 2003-05-30  Bruno Haible  <bruno@clisp.org>
20270
20271         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20272         * config/config.rpath: Upgrade to gettext-0.12.1.
20273
20274 2003-05-30  Bruno Haible  <bruno@clisp.org>
20275
20276         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20277         * m4/nls.m4: New file, from gettext-0.12.1.
20278         * m4/po.m4: New file, from gettext-0.12.1.
20279         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20280
20281 2003-05-30  Bruno Haible  <bruno@clisp.org>
20282
20283         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20284         * lib/localcharset.h: Likewise.
20285         * lib/localcharset.c: Likewise.
20286
20287 2003-05-29  Karl Berry  <karl@gnu.org>
20288
20289         * config/config.rpath: update from gettext.
20290
20291 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20292
20293         Assume the headers required for C89 freestanding compilers.
20294         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20295         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20296         * m4/human.m4 (gl_HUMAN): Likewise.
20297         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20298         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20299         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20300         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20301         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20302         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20303
20304 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20305
20306         Assume the headers required for C89 freestanding compilers.
20307         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20308         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20309         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20310         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20311         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20312         define, since <limits.h> is guaranteed to do that.
20313         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20314         * lib/exclude.c: Include <stdbool.h> unconditionally.
20315         * lib/tempname.c: Include <stddef.h> unconditionally.
20316         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20317         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20318         <stddef.h> does that.
20319         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20320         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20321         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20322         needed.
20323         * lib/xstrtol.c: Likewise.
20324         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20325         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20326
20327         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20328         warnings on some platforms.
20329
20330         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20331         arbitrarily.
20332
20333 2003-05-26  Jim Meyering  <jim@meyering.net>
20334
20335         Merge in a change from coreutils:
20336         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20337         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20338         that condition, rather than `-1' which is slightly misleading.
20339         Change the name of the cache variable to have the gl_ prefix.
20340         Prompted by a patch from Richard Dawe for DJGPP.
20341
20342 2003-05-24  Karl Berry  <karl@gnu.org>
20343
20344         * config/config.guess: update from prep.
20345
20346 2003-05-22  Karl Berry  <karl@gnu.org>
20347
20348         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20349
20350 2003-05-20  Karl Berry  <karl@gnu.org>
20351
20352         * config/config.guess: update from prep.
20353
20354 2003-05-18  Karl Berry  <karl@gnu.org>
20355
20356         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20357         might actually be set by the user.
20358
20359         * config/depcomp, install-sh, mdate-sh: update from automake.
20360
20361 2003-05-17  Bruno Haible  <bruno@clisp.org>
20362
20363         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20364         invalid expansion for AC_EGREP_CPP.
20365         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20366         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20367         Suggested by Akim Demaille <akim@epita.fr> in
20368         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20369
20370 2003-05-12  Jim Meyering  <jim@meyering.net>
20371
20372         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20373         the space-padded-by-default conversion specifiers, %e, %k, %l.
20374
20375 2003-05-12  Bruno Haible  <bruno@clisp.org>
20376
20377         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20378         the string is longer than 4 KB.
20379
20380 2003-05-11  Karl Berry  <karl@gnu.org>
20381
20382         * config/config.{guess,sub}: update from prep.
20383
20384 2003-05-09  Bruno Haible  <bruno@clisp.org>
20385
20386         * modules/error: Add m4/strerror_r.m4 to file list.
20387
20388 2003-05-03  Bruno Haible  <bruno@clisp.org>
20389
20390         Upgrade to Unicode-4.0.
20391         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20392         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20393         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20394         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20395         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20396         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20397         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20398         Change width of U+E0100..U+E01EF from 1 to 0.
20399
20400 2003-04-25  Jim Meyering  <jim@meyering.net>
20401
20402         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20403         of type size_t, not int.
20404
20405 2003-04-25  Bruno Haible  <bruno@clisp.org>
20406
20407         * lib/copy-file.c: Include <stddef.h>, for size_t.
20408
20409 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20410
20411         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20412         code which expansion is under static control.  Patch imported from
20413         Akim Demaille's patch to Bison; see
20414         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20415
20416 2003-04-14  Bruno Haible  <bruno@clisp.org>
20417
20418         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20419
20420 2003-04-11  Jim Meyering  <jim@meyering.net>
20421
20422         Merge changes from Coreutils.
20423
20424         2003-03-22  Jim Meyering  <jim@meyering.net>
20425
20426         * lib/strftime.c (widen): Cast alloca return value to proper type.
20427
20428         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20429
20430         From GNU libc.
20431         * lib/strftime.c (my_strftime): Handle very large width
20432         specifications for numeric values correctly.  Improve checks for
20433         overflow.
20434
20435         2003-01-19  Jim Meyering  <jim@meyering.net>
20436
20437         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20438         definitions.
20439         (nl_get_alt_digit) [! defined my_strftime]: Define.
20440         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20441         _nl_get_alt_digit and _nl_get_walt_digit.
20442
20443         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20444         libc. These changes have no effect outside of _LIBC.
20445
20446 2003-04-10  Bruno Haible  <bruno@clisp.org>
20447
20448         * modules/findprog: New file.
20449         * MODULES.html.sh (func_all_modules): Add it.
20450
20451 2003-04-10  Bruno Haible  <bruno@clisp.org>
20452
20453         * m4/findprog.m4: New file.
20454         * m4/eaccess.m4: New file.
20455
20456 2003-04-10  Bruno Haible  <bruno@clisp.org>
20457
20458         * lib/findprog.h: New file, from GNU gettext.
20459         * lib/findprog.c: New file, from GNU gettext.
20460
20461 2003-04-05  Jim Meyering  <jim@meyering.net>
20462
20463         Merge changes from Coreutils.
20464
20465         * lib/exclude.h (PARAMS): Remove definition and uses.
20466         * lib/exclude.c: Remove uses of `PARAMS'.
20467
20468         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20469         Add test-cases for DOS filenames. Declare program_name.
20470         (main): Set up program_name.  Patch by Rich Dawe.
20471
20472         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20473         error from mntctl.
20474         Use mntctl's return value to drive the entry-processing loop, since
20475         we can't rely on the value of the vmt_length member in the last
20476         entry.  On some systems doing so could result in exhausting
20477         virtual memory.  Based in part on a patch from Mike Jetzer.
20478
20479 2003-04-04  Bruno Haible  <bruno@clisp.org>
20480
20481         * modules/linebreak: New file.
20482         * MODULES.html.sh (func_all_modules): Add it.
20483
20484 2003-04-04  Bruno Haible  <bruno@clisp.org>
20485
20486         * m4/linebreak.m4: New file.
20487
20488 2003-04-04  Bruno Haible  <bruno@clisp.org>
20489
20490         * lib/linebreak.h: New file, from GNU gettext.
20491         * lib/linebreak.c: New file, from GNU gettext with slight
20492         modifications.
20493         * lib/lbrkprop.h: New file, from GNU gettext.
20494
20495 2003-04-03  Bruno Haible  <bruno@clisp.org>
20496
20497         * modules/utf8-ucs4: New file.
20498         * modules/utf16-ucs4: New file.
20499         * modules/ucs4-utf8: New file.
20500         * modules/ucs4-utf16: New file.
20501         * MODULES.html.sh (func_all_modules): Add them.
20502
20503 2003-04-03  Bruno Haible  <bruno@clisp.org>
20504
20505         * m4/utf-ucs4.m4: New file.
20506         * m4/ucs4-utf.m4: New file.
20507
20508 2003-04-03  Bruno Haible  <bruno@clisp.org>
20509
20510         * lib/utf8-ucs4.h: New file, from GNU gettext.
20511         * lib/utf16-ucs4.h: New file, from GNU gettext.
20512         * lib/ucs4-utf8.h: New file, from GNU gettext.
20513         * lib/ucs4-utf16.h: New file, from GNU gettext.
20514
20515 2003-04-02  Bruno Haible  <bruno@clisp.org>
20516
20517         * modules/binary-io: New file.
20518         * MODULES.html.sh (func_all_modules): Add it.
20519
20520 2003-04-02  Bruno Haible  <bruno@clisp.org>
20521
20522         * lib/binary-io.h: New file, from GNU gettext.
20523
20524 2003-04-01  Bruno Haible  <bruno@clisp.org>
20525
20526         * modules/pathname: New file.
20527         * MODULES.html.sh (func_all_modules): Add it.
20528
20529 2003-04-01  Bruno Haible  <bruno@clisp.org>
20530
20531         * lib/pathname.h: New file, from GNU gettext.
20532         * lib/concatpath.c: New file, from GNU gettext.
20533
20534 2003-03-30  Bruno Haible  <bruno@clisp.org>
20535
20536         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20537
20538 2003-03-30  Bruno Haible  <bruno@clisp.org>
20539
20540         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20541         function chown() doesn't exist.
20542
20543 2003-03-28  Bruno Haible  <bruno@clisp.org>
20544
20545         * modules/copy-file: New file.
20546         * MODULES.html.sh (func_all_modules): Add it.
20547
20548 2003-03-28  Bruno Haible  <bruno@clisp.org>
20549
20550         * m4/copy-file.m4: New file.
20551
20552 2003-03-28  Bruno Haible  <bruno@clisp.org>
20553
20554         * lib/copy-file.h: New file, from GNU gettext.
20555         * lib/copy-file.c: New file, from GNU gettext.
20556
20557 2003-03-18  Jim Meyering  <jim@meyering.net>
20558
20559         * lib/quote.c (quote_n): Fix typo in comment.
20560
20561 2003-03-18  Bruno Haible  <bruno@clisp.org>
20562
20563         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20564         checking.
20565         * m4/onceonly_2_57.m4: Likewise.
20566
20567 2003-03-17  Bruno Haible  <bruno@clisp.org>
20568
20569         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20570         (m4_quote): Remove macro.
20571         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20572
20573 2003-03-14  Jim Meyering  <jim@meyering.net>
20574
20575         Merge changes from Coreutils.
20576         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20577         to be const, in order to avoid warnings.
20578         (obstack_room): Likewise.
20579         (obstack_empty_p): Likewise.
20580
20581 2003-03-14  Bruno Haible  <bruno@clisp.org>
20582
20583         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20584         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20585
20586 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20587
20588         Merge changes from Bison.
20589         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20590         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20591         when compiling Bison 1.875's `bitset bset = obstack_alloc
20592         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20593         * lib/hash.c: Include <stdbool.h> unconditionally.
20594
20595 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20596
20597         * m4/onceonly.m4 (m4_quote): New macro.
20598         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20599         Quote AC_FOREACH variable-expansions properly.
20600
20601 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20602
20603         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20604
20605 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20606
20607         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20608         Reported by Bruce Becker; see:
20609         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20610
20611 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20612             Bruno Haible  <bruno@clisp.org>
20613
20614         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20615         Reported by John Hughes, see
20616         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20617
20618 2003-02-20  Bruno Haible  <bruno@clisp.org>
20619
20620         * MODULES.html.sh (func_all_modules): Add poll.
20621
20622 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20623
20624         * modules/poll: New file.
20625
20626 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20627
20628         * lib/poll_.h: New file.
20629         * lib/poll.c: New file.
20630
20631 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20632
20633         * m4/poll.m4: New file.
20634
20635 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20636
20637         * modules/mathl: New file.
20638
20639 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20640
20641         * lib/mathl.h: New file.
20642         * lib/acosl.c: New file.
20643         * lib/asinl.c: New file.
20644         * lib/atanl.c: New file.
20645         * lib/ceill.c: New file.
20646         * lib/cosl.c: New file.
20647         * lib/expl.c: New file.
20648         * lib/floorl.c: New file.
20649         * lib/frexpl.c: New file.
20650         * lib/ldexpl.c: New file.
20651         * lib/logl.c: New file.
20652         * lib/sincosl.c: New file.
20653         * lib/sinl.c: New file.
20654         * lib/sqrtl.c: New file.
20655         * lib/tanl.c: New file.
20656         * lib/trigl.c: New file.
20657         * lib/trigl.h: New file.
20658
20659 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20660
20661         * m4/mathl.m4: New file.
20662
20663 2003-02-18  Bruno Haible  <bruno@clisp.org>
20664
20665         * MODULES.html.sh (func_all_modules): Add mathl.
20666
20667 2003-02-17  Bruno Haible  <bruno@clisp.org>
20668
20669         * modules/mkdtemp: New module.
20670         * MODULES.html.sh (func_all_modules): Add it.
20671
20672 2003-02-17  Bruno Haible  <bruno@clisp.org>
20673
20674         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20675
20676 2003-02-17  Bruno Haible  <bruno@clisp.org>
20677
20678         * lib/mkdtemp.h: New file, from GNU gettext.
20679         * lib/mkdtemp.c: New file, from GNU gettext.
20680
20681 2003-02-02  Jim Meyering  <jim@meyering.net>
20682
20683         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20684         e.g. glibc-2.2.93.
20685
20686 2003-01-31  Bruno Haible  <bruno@clisp.org>
20687
20688         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20689         'rpl_rename'.
20690         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20691         'rpl_strnlen'.
20692         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20693         'rpl_strtod'.
20694         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20695         'rpl_utime'.
20696
20697 2003-01-31  Bruno Haible  <bruno@clisp.org>
20698
20699         * lib/rename.c: #undef rename before defining rpl_rename.
20700         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20701
20702 2003-01-30  Bruno Haible  <bruno@clisp.org>
20703
20704         * modules/vasnprintf, modules/vasprintf: New modules.
20705         * MODULES.html.sh (func_all_modules): Add them.
20706
20707 2003-01-30  Bruno Haible  <bruno@clisp.org>
20708
20709         * m4/signed.m4: New file, from GNU gettext.
20710         * m4/longdouble.m4: New file, from GNU gettext.
20711         * m4/wchar_t.m4: New file, from GNU gettext.
20712         * m4/wint_t.m4: New file, from GNU gettext.
20713         * m4/vasnprintf.m4: New file.
20714         * m4/vasprintf.m4: New file.
20715
20716 2003-01-30  Bruno Haible  <bruno@clisp.org>
20717
20718         * lib/printf-args.h: New file, from GNU gettext.
20719         * lib/printf-args.c: New file, from GNU gettext.
20720         * lib/printf-parse.h: New file, from GNU gettext.
20721         * lib/printf-parse.c: New file, from GNU gettext.
20722         * lib/vasnprintf.h: New file, from GNU gettext.
20723         * lib/vasnprintf.c: New file, from GNU gettext.
20724         * lib/asnprintf.c: New file, from GNU gettext.
20725         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20726         * lib/vasprintf.c: New file, from GNU gettext.
20727         * lib/asprintf.c: New file, from GNU gettext.
20728
20729 2003-01-29  Bruno Haible  <bruno@clisp.org>
20730
20731         * modules/stpncpy: New module.
20732         * MODULES.html.sh (func_all_modules): Add it.
20733
20734 2003-01-29  Bruno Haible  <bruno@clisp.org>
20735
20736         * m4/stpncpy.m4: New file.
20737
20738 2003-01-29  Bruno Haible  <bruno@clisp.org>
20739
20740         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20741         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20742
20743 2003-01-28  Bruno Haible  <bruno@clisp.org>
20744
20745         * modules/c-ctype: New module.
20746         * MODULES.html.sh (func_all_modules): Add it.
20747
20748 2003-01-28  Bruno Haible  <bruno@clisp.org>
20749
20750         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20751         Paul Eggert.
20752         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20753         Paul Eggert.
20754
20755 2003-01-27  Bruno Haible  <bruno@clisp.org>
20756
20757         * modules/xsetenv: New module.
20758         * MODULES.html.sh (func_all_modules): Add it.
20759
20760 2003-01-27  Bruno Haible  <bruno@clisp.org>
20761
20762         * lib/xsetenv.h: New file, from GNU gettext.
20763         * lib/xsetenv.c: New file, from GNU gettext.
20764
20765 2003-01-23  Jim Meyering  <jim@meyering.net>
20766
20767         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20768         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20769
20770 2003-01-23  Bruno Haible  <bruno@clisp.org>
20771
20772         * modules/minmax: New module.
20773         * MODULES.html.sh (func_all_modules): Add it.
20774
20775 2003-01-23  Bruno Haible  <bruno@clisp.org>
20776
20777         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20778         Eggert.
20779
20780 2003-01-22  Bruno Haible  <bruno@clisp.org>
20781
20782         * modules/exit: New module.
20783         * MODULES.html.sh (func_all_modules): Add it.
20784
20785 2003-01-22  Bruno Haible  <bruno@clisp.org>
20786
20787         * lib/exit.h: New file, from GNU gettext.
20788
20789 2003-01-19  Bruno Haible  <bruno@clisp.org>
20790
20791         * gnulib-tool: Recognize option --extract-maintainer.
20792         (func_get_maintainer): New function.
20793         * modules/*: Add Maintainer entry.
20794
20795 2003-01-16  Jim Meyering  <jim@meyering.net>
20796
20797         * m4/regex.m4: The `regex' struct is both input and output.
20798         Initialize it before each use.  Patch by Tim Waugh.
20799
20800 2003-01-16  Bruno Haible  <bruno@clisp.org>
20801
20802         * MODULES.html.sh: Add a table of contents. Add the module name as
20803         leftmost column. Add hyperlinks.
20804
20805 2003-01-15  Bruno Haible  <bruno@clisp.org>
20806
20807         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20808
20809 2003-01-15  Bruno Haible  <bruno@clisp.org>
20810
20811         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20812         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20813         suffix.
20814
20815 2003-01-15  Bruno Haible  <bruno@clisp.org>
20816
20817         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20818
20819 2003-01-15  Bruno Haible  <bruno@clisp.org>
20820
20821         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20822         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20823
20824 2003-01-14  Jim Meyering  <jim@meyering.net>
20825
20826         * lib/same.c (same_name): Tweak a comment.
20827
20828 2003-01-14  Bruno Haible  <bruno@clisp.org>
20829
20830         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20831         when a string comparison is sufficient.
20832
20833 2003-01-14  Bruno Haible  <bruno@clisp.org>
20834
20835         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20836         'unsigned int'.
20837
20838 2003-01-14  Bruno Haible  <bruno@clisp.org>
20839
20840         * lib/hash-pjw.c: Add comment about low quality of this function.
20841
20842 2003-01-13  Bruno Haible  <bruno@clisp.org>
20843
20844         * modules/stpcpy: Distribute lib/stpcpy.h.
20845         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20846
20847 2003-01-13  Bruno Haible  <bruno@clisp.org>
20848
20849         * modules/*: Add a description.
20850         * modules/strpbrk: Fix Makefile.am snippet.
20851         * modules/strtoimax: Fix dependencies.
20852         * modules/strtoumax: Likewise.
20853
20854 2003-01-13  Bruno Haible  <bruno@clisp.org>
20855
20856         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20857         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20858         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20859
20860 2003-01-13  Bruno Haible  <bruno@clisp.org>
20861
20862         * gnulib-tool (func_create_testdir): Store config/* files in the main
20863         directory.
20864         * config.rpath: Move to ...
20865         * config/config.rpath: ... here.
20866         * modules/gettext: Contains config/config.rpath, not config.rpath.
20867         * modules/iconv: Likewise.
20868
20869 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20870
20871         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20872         to avoid collisions with libcurses and libreadline.
20873
20874         * m4/getstr.m4: Remove.
20875         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20876
20877 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20878
20879         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20880         to avoid collisions with libcurses and libreadline.
20881
20882         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20883         * lib/getstr.h, getstr.c: Remove.
20884         * lib/getline.c: Include "getline.h", to check interface.
20885         Move body of old getstr.c here: this defines MIN_CHUNK and
20886         declares getdelim2, which is renamed from getstr.
20887         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20888
20889         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20890         All uses changed.
20891         * lib/linebuffer.h: Likewise.
20892         (readline): Remove backward-compatibility macro.
20893
20894 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20895
20896         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20897         to avoid collisions with libcurses and libreadline.
20898         * getstr: Remove.
20899         * MODULES.html.sh: Remove getstr.
20900         * modules/getline: Depend on unlocked-io, not getstr.
20901
20902 2003-01-12  Jim Meyering  <jim@meyering.net>
20903
20904         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20905
20906 2003-01-10  Bruno Haible  <bruno@clisp.org>
20907
20908         * modules/alloca: Change Makefile.am requirements. Simplify Include
20909         requirements. Add lib/alloca_.h to file list.
20910
20911 2003-01-10  Bruno Haible  <bruno@clisp.org>
20912
20913         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20914
20915 2003-01-10  Bruno Haible  <bruno@clisp.org>
20916
20917         * lib/alloca_.h: New file.
20918         * lib/getdate.y: Unconditionally include alloca.h.
20919         * lib/makepath.c: Likewise.
20920         * lib/setenv.c: Likewise.
20921         * lib/userspec.c: Likewise.
20922
20923 2003-01-09  Karl Berry  <karl@gnu.org>
20924
20925         * MODULES.html.sh: include `dirname $0` in PATH, to find
20926         gnulib-tool.
20927
20928 2003-01-09  Bruno Haible  <bruno@clisp.org>
20929
20930         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20931         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20932
20933 2003-01-09  Bruno Haible  <bruno@clisp.org>
20934
20935         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20936
20937 2003-01-09  Bruno Haible  <bruno@clisp.org>
20938
20939         * lib/stdbool.h.in: New file.
20940
20941 2003-01-09  Bruno Haible  <bruno@clisp.org>
20942
20943         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20944         * MODULES.html.sh: Likewise.
20945
20946 2003-01-08  Jim Meyering  <jim@meyering.net>
20947
20948         * lib/full-write.c: Undefine and define-away `const' after inclusion
20949         of errno.h, not before.  Suggestion from Bruno Haible.
20950
20951 2003-01-08  Bruno Haible  <bruno@clisp.org>
20952
20953         * modules/full-read: Depend on full-write.
20954
20955 2003-01-08  Bruno Haible  <bruno@clisp.org>
20956
20957         * lib/safe-read.c: Include specification header first, to ensure its
20958         selfcontainedness.
20959         * lib/full-write.c: Likewise.
20960
20961 2003-01-07  Jim Meyering  <jim@meyering.net>
20962
20963         * lib/full-write.c: Rework so that it may serve to define full_read,
20964         too.
20965         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20966
20967 2003-01-07  Bruno Haible  <bruno@clisp.org>
20968
20969         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20970         <inttypes.h>.
20971         * lib/xstrtol.h: Likewise.
20972         * lib/xstrtoimax.c: Likewise.
20973         * lib/xstrtoumax.c: Likewise.
20974         * lib/human.h: Likewise.
20975
20976         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
20977         on systems that have <inttypes.h> but not <stdint.h>.
20978
20979 2003-01-07  Bruno Haible  <bruno@clisp.org>
20980
20981         * MODULES.html.sh: Add copyright notice.
20982         (missed_files): Omit CVS directory entries.
20983         (func_module): Make it work with sed-3.02.
20984         * MODULES.txt: Remove file.
20985
20986 2003-01-06  Jim Meyering  <jim@meyering.net>
20987
20988         * lib/version-etc.c: Update year in translatable copyright string.
20989
20990 2003-01-03  Karl Berry  <karl@gnu.org>
20991
20992         * config/config.{guess,sub}: update from prep.
20993
20994 2003-01-02  Karl Berry  <karl@gnu.org>
20995
20996         * doc/COPYING.DOC: belatedly updated to 1.2.
20997
20998 2003-01-01  Karl Berry  <karl@gnu.org>
20999
21000         * gnulib-tool (func_verify_module): report module name $module in
21001         error message, not $1.
21002         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21003         be created, only if it doesn't exist.
21004         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21005
21006 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21007
21008         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21009
21010 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21011
21012         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21013         memcmp if strcoll doesn't work.
21014
21015 2002-12-31  Bruno Haible  <bruno@clisp.org>
21016
21017         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21018         nonempty.
21019
21020 2002-12-31  Bruno Haible  <bruno@clisp.org>
21021
21022         * lib/memcoll.c (STRCOLL): New macro.
21023         (memcoll): Use it.
21024
21025 2002-12-31  Bruno Haible  <bruno@clisp.org>
21026
21027         * lib/localcharset.h: New file.
21028         * lib/localcharset.c: Include it.
21029         * lib/unicodeio.c: Likewise.
21030
21031 2002-12-31  Bruno Haible  <bruno@clisp.org>
21032
21033         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21034         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21035
21036 2002-12-31  Bruno Haible  <bruno@clisp.org>
21037
21038         * lib/getline.h: Include <stddef.h>, for size_t.
21039
21040         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21041         * lib/unicodeio.c: Don't include <stddef.h>.
21042
21043 2002-12-31  Bruno Haible  <bruno@clisp.org>
21044
21045         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21046         HAVE_TM_ZONE.
21047
21048 2002-12-24  Karl Berry  <karl@gnu.org>
21049
21050         * config/config.guess: update from prep.
21051
21052 2002-12-24  Bruno Haible  <bruno@clisp.org>
21053
21054         General infrasructure.
21055         * m4/README: Rewritten.
21056         * m4/onceonly.m4: New file.
21057         * m4/onceonly_2_57.m4: New file.
21058
21059         Module atexit.
21060         * m4/atexit.m4: New file.
21061
21062         Module strtod.
21063         * m4/strtod.m4: New file.
21064
21065         Module strtol.
21066         * m4/strtol.m4: New file.
21067
21068         Module strtoul.
21069         * m4/strtoul.m4: New file.
21070
21071         Module memchr.
21072         * m4/memchr.m4: New file.
21073
21074         Module memcmp.
21075         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21076         (jm_FUNC_MEMCMP): Invoke it.
21077
21078         Module memcpy.
21079         * m4/memcpy.m4: New file.
21080
21081         Module memmove.
21082         * m4/memmove.m4: New file.
21083
21084         Module memset.
21085         * m4/memset.m4: New file.
21086
21087         Module strcspn.
21088         * m4/strcspn.m4: New file.
21089
21090         Module strpbrk.
21091         * m4/strpbrk.m4: New file.
21092
21093         Module strstr.
21094         * m4/strstr.m4: New file.
21095
21096         Module strerror.
21097         * m4/strerror.m4: New file.
21098
21099         Module mktime.
21100         * m4/mktime.m4: Renamed from jm-mktime.m4.
21101         (gl_PREREQ_MKTIME): New macro.
21102         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21103
21104         Module malloc.
21105         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21106         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21107         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21108
21109         Module realloc.
21110         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21111         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21112         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21113
21114         Module strftime.
21115         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21116         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21117         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21118         gl_TM_GMTOFF.
21119         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21120
21121         Module xalloc.
21122         * m4/xalloc.m4: New file.
21123
21124         Module alloca.
21125         * m4/alloca.m4: New file.
21126
21127         Module putenv.
21128         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21129         (jm_FUNC_PUTENV): Invoke it.
21130
21131         Module setenv.
21132         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21133         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21134         when invoked twice.
21135         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21136         gt_FUNC_SETENV.
21137
21138         Module memrchr.
21139         * m4/memrchr.m4: New file.
21140
21141         Module stpcpy.
21142         * m4/stpcpy.m4: New file.
21143
21144         Module strcase.
21145         * m4/strcase.m4: New file.
21146
21147         Module strdup.
21148         * m4/strdup.m4: New file.
21149
21150         Module strnlen.
21151         * m4/strnlen.m4: New file.
21152
21153         Module strndup.
21154         * m4/strndup.m4: New file.
21155
21156         Module xstrtod.
21157         * m4/xstrtod.m4: New file.
21158
21159         Module xstrtol.
21160         * m4/xstrtol.m4: New file.
21161
21162         Module getdate.
21163         * m4/getdate.m4: New file.
21164
21165         Module unlocked-io.
21166         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21167         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21168         * m4/jm-glibc-io.m4n: Remove file.
21169
21170         Module long-options.
21171         * m4/long-options.m4: New file.
21172
21173         Module md5.
21174         * m4/md5.m4: New file.
21175
21176         Module sha.
21177         * m4/sha.m4: New file.
21178
21179         Module getstr.
21180         * m4/getstr.m4: New file.
21181
21182         Module getline.
21183         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21184         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21185         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21186         simply getline. Infoke gl_PREREQ_GETLINE.
21187
21188         Module obstack.
21189         * m4/obstack.m4: New file.
21190
21191         Module hash.
21192         * m4/hash.m4: New file.
21193
21194         Module readtokens.
21195         * m4/readtokens.m4: New file.
21196
21197         Module strverscmp.
21198         * m4/strverscmp.m4: New file.
21199
21200         Module stdbool.
21201         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21202         OSF/1.
21203
21204         Module strtoll.
21205         * m4/strtoll.m4: New file.
21206
21207         Module strtoull.
21208         * m4/strtoull.m4: New file.
21209
21210         Module strtoimax.
21211         * m4/strtoimax.m4: New file.
21212
21213         Module strtoumax.
21214         * m4/strtoumax.m4: New file.
21215
21216         Module xstrtoimax.
21217         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21218         jm_AC_PREREQ_XSTRTOIMAX.
21219         Moved the strtol prerequisites to strtol.m4.
21220         Moved the strtoll prerequisites to strtoll.m4.
21221         Moved the strtoimax prerequisites to strtoimax.m4.
21222
21223         Module xstrtoumax.
21224         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21225         jm_AC_PREREQ_XSTRTOUMAX.
21226         Moved the strtoul prerequisites to strtoul.m4.
21227         Moved the strtoull prerequisites to strtoull.m4.
21228         Moved the strtoumax prerequisites to strtoumax.m4.
21229
21230         Module chown.
21231         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21232         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21233
21234         Module dup2.
21235         * m4/dup2.m4: New file.
21236
21237         Module ftruncate.
21238         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21239         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21240
21241         Module getgroups.
21242         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21243         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21244
21245         Module gettimeofday.
21246         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21247         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21248         gl_PREREQ_GETTIMEOFDAY.
21249
21250         Module mkdir.
21251         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21252         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21253
21254         Module mkstemp.
21255         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21256         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21257         jm_AC_TYPE_UINTMAX_T.
21258         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21259
21260         Module stat.
21261         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21262         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21263
21264         Module lstat.
21265         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21266         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21267
21268         Module timespec.
21269         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21270         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21271         * m4/st_mtim.m4: Indentation.
21272
21273         Module nanosleep.
21274         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21275         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21276         gl_PREREQ_NANOSLEEP.
21277
21278         Module regex.
21279         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21280         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21281         (gl_REGEX): New macro.
21282
21283         Module rename.
21284         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21285         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21286
21287         Module rmdir.
21288         * m4/rmdir.m4: New file.
21289
21290         Module utime.
21291         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21292         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21293         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21294
21295         Module dirname.
21296         * m4/dirname.m4: New file.
21297
21298         Module getopt.
21299         * m4/getopt.m4: New file.
21300
21301         Module unistd-safer.
21302         * m4/unistd-safer.m4: New file.
21303
21304         Module fnmatch.
21305         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21306         declaration.
21307         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21308         (gl_FUNC_FNMATCH_POSIX): New macro.
21309         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21310         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21311         simply fnmatch.
21312
21313         Module exclude.
21314         * m4/exclude.m4: New file.
21315
21316         Module human.
21317         * m4/human.m4: New file.
21318
21319         Module acl.
21320         * m4/acl.m4: Nop.
21321
21322         Module backupfile.
21323         * m4/backupfile.m4: New file.
21324         * m4/d-ino.m4: Indentation.
21325
21326         Module fsusage.
21327         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21328         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21329         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21330
21331         Module dirfd.
21332         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21333         requirements.
21334
21335         Module euidaccess.
21336         * m4/euidaccess.m4: New file.
21337
21338         Module file-type.
21339         * m4/file-type.m4: New file.
21340
21341         Module fileblocks.
21342         * m4/fileblocks.m4: New file.
21343
21344         Module filemode.
21345         * m4/filemode.m4: New file.
21346
21347         Module isdir.
21348         * m4/isdir.m4: New file.
21349
21350         Module lchown.
21351         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21352         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21353
21354         Module makepath.
21355         * m4/makepath.m4: New file.
21356
21357         Module modechange.
21358         * m4/modechange.m4: New file.
21359
21360         Module mountlist.
21361         * m4/mountlist.m4: New file.
21362         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21363         Indentation.
21364
21365         Module path-concat.
21366         * m4/path-concat.m4: New file.
21367
21368         Module pathmax.
21369         * m4/pathmax.m4: New file.
21370
21371         Module same.
21372         * m4/same.m4: New file.
21373
21374         Module save-cwd.
21375         * m4/save-cwd.m4: New file.
21376
21377         Module savedir.
21378         * m4/savedir.m4: New file.
21379
21380         Module xgetcwd.
21381         * m4/xgetcwd.m4: New file.
21382         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21383
21384         Module xreadlink.
21385         * m4/xreadlink.m4: New file.
21386
21387         Module safe-read.
21388         * m4/safe-read.m4: New file.
21389
21390         Module safe-write.
21391         * m4/safe-write.m4: New file.
21392
21393         Module closeout.
21394         * m4/closeout.m4: New file.
21395
21396         Module stdio-safer.
21397         * m4/stdio-safer.m4: New file.
21398
21399         Module getpass.
21400         * m4/getpass.m4: New file.
21401
21402         Module getugroups.
21403         * m4/getugroups.m4: New file.
21404
21405         Module group-member.
21406         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21407         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21408
21409         Module idcache.
21410         * m4/idcache.m4: New file.
21411
21412         Module userspec.
21413         * m4/userspec.m4: New file.
21414
21415         Module gettime.
21416         * m4/clock_time.m4: New file.
21417         * m4/gettime.m4: New file.
21418
21419         Module settime.
21420         * m4/settime.m4: New file.
21421
21422         Module posixtm.
21423         * m4/posixtm.m4: New file.
21424
21425         Module gethostname.
21426         * m4/gethostname.m4: New file.
21427
21428         Module canon-host.
21429         * m4/canon-host.m4: New file.
21430
21431         Module gettext.
21432         * m4/codeset.m4: New file, from gettext-0.11.5.
21433         * m4/gettext.m4: New file, from gettext-0.11.5.
21434         * m4/glibc21.m4: New file, from gettext-0.11.5.
21435         * m4/iconv.m4: New file, from gettext-0.11.5.
21436         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21437         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21438         * m4/inttypes.m4: New file, from gettext-0.11.5.
21439         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21440         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21441         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21442         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21443         * m4/lib-link.m4: New file, from gettext-0.11.5.
21444         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21445         * m4/progtest.m4: New file, from gettext-0.11.5.
21446         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21447         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21448         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21449
21450         Module localcharset.
21451         * m4/localcharset.m4: New file.
21452
21453         Module hard-locale.
21454         * m4/hard-locale.m4: New file.
21455
21456         Module mbswidth.
21457         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21458         onceonly macros.
21459         * m4/mbrtowc.m4: Add comment.
21460
21461         Module memcasecmp.
21462         * m4/memcasecmp.m4: New file.
21463
21464         Module memcoll.
21465         * m4/memcoll.m4: New file.
21466
21467         Module unicodeio.
21468         * m4/unicodeio.m4: New file.
21469
21470         Module rpmatch.
21471         * m4/rpmatch.m4: New file.
21472
21473         Module yesno.
21474         * m4/yesno.m4: New file.
21475
21476         Module exitfail.
21477         * m4/exitfail.m4: New file.
21478
21479         Module c-stack.
21480         * m4/c-stack.m4 (gl_C_STACK): New macro.
21481         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21482
21483         Module error.
21484         * m4/error.m4 (gl_ERROR): New macro.
21485         (jm_PREREQ_ERROR): Use onceonly macros.
21486
21487         Module fatal.
21488         * m4/fatal.m4: New file.
21489
21490         Module getloadavg.
21491         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21492         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21493
21494         Module getpagesize.
21495         * m4/getpagesize.m4: New file.
21496
21497         Module getusershell.
21498         * m4/getusershell.m4: New file.
21499
21500         Module physmem.
21501         * m4/physmem.m4: New file.
21502
21503         Module posixver.
21504         * m4/posixver.m4: New file.
21505
21506         Module quotearg.
21507         * m4/quotearg.m4: New file.
21508
21509         Module quote.
21510         * m4/quote.m4: New file.
21511
21512         Module readutmp.
21513         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21514
21515         Module sig2str.
21516         * m4/sig2str.m4: New file.
21517
21518         Other.
21519         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21520         ulonglong.m4.
21521         * m4/intmax_t.m4: New file.
21522         * m4/d-type.m4: Indentation.
21523         * m4/jm-macros.m4: Update.
21524         * m4/prereq.m4 (jm_PREREQ): Update.
21525         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21526         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21527         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21528         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21529         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21530         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21531         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21532         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21533         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21534         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21535         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21536         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21537         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21538         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21539         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21540         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21541         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21542         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21543         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21544
21545 2002-12-24  Bruno Haible  <bruno@clisp.org>
21546
21547         * MODULES.txt: Update according to m4/ changes.
21548
21549         Module gettext.
21550         * config.rpath: New file, from gettext-0.11.5.
21551
21552         * modules/*: New module descriptions.
21553         * gnulib-tool: New file.
21554         * MODULES.html.sh: New file.
21555
21556 2002-12-21  Karl Berry  <karl@gnu.org>
21557
21558         * doc/fdl.texi: update to version 1.2.
21559
21560 2002-12-19  Karl Berry  <karl@gnu.org>
21561
21562         * config/config.guess: update from prep.
21563
21564 2002-12-18  Bruno Haible  <bruno@clisp.org>
21565
21566         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21567         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21568
21569 2002-12-17  Bruno Haible  <bruno@clisp.org>
21570
21571         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21572         stdlib.h, string.h.
21573
21574 2002-12-17  Bruno Haible  <bruno@clisp.org>
21575
21576         * lib/canon-host.c (strdup): Remove unused declaration.
21577
21578         * lib/fsusage.c: Include full_read.h.
21579         (get_fs_usage): Use full_read instead of safe_read.
21580
21581         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21582
21583 2002-12-12  Karl Berry  <karl@gnu.org>
21584
21585         * config/config.guess: update from prep.
21586
21587 2002-12-11  Bruno Haible  <bruno@clisp.org>
21588
21589         * m4/setenv.m4: New file, from gettext-0.11.5.
21590
21591 2002-12-11  Bruno Haible  <bruno@clisp.org>
21592
21593         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21594         not unsetenv().
21595         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21596         modifications:
21597
21598         2002-12-11  Bruno Haible  <bruno@clisp.org>
21599
21600                 * setenv.c (alloca): Fall back to malloc.
21601                 (freea): New macro.
21602                 (setenv): Use freea() to free memory allocated with alloca().
21603
21604         2002-11-13  Bruno Haible  <bruno@clisp.org>
21605
21606                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21607                 function declarations.
21608                 * unsetenv.c (unsetenv): Likewise.
21609
21610         2002-03-04  Bruno Haible  <bruno@clisp.org>
21611
21612                 Portability to AIX 4.3.3.
21613                 * unsetenv.c: New file, extracted from setenv.c.
21614                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21615
21616         2001-12-20  Bruno Haible  <bruno@clisp.org>
21617
21618                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21619                 use malloc instead. For SunOS 4.
21620
21621         2001-12-11  Bruno Haible  <bruno@clisp.org>
21622
21623                 * setenv.c: Declare alloca.
21624                 (compar_fn_t): New typedef.
21625                 (KNOWN_VALUE, STORE_VALUE): Use it.
21626
21627         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21628         setenv.h.
21629
21630 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21631
21632         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21633         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21634         Choose values that are less likely to collide with system fnmatch
21635         options.
21636         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21637         defined (e.g., a pure POSIX system).
21638         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21639         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21640
21641 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21642
21643         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21644         a pain in practice to deal with generated m4 files.  This change
21645         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21646
21647         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21648         and jm-glibc-io.m4, as they are no longer a special case.
21649         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21650         kludge and the auto-generation stuff.  Check only whether the
21651         functions are declared, not whether they exist, since older hosts
21652         that don't declare the functions can't use the optimization anyway.
21653
21654 2002-12-06  Jim Meyering  <jim@meyering.net>
21655
21656         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21657
21658         Merge in changes from libc's misc/error.c, in preparation
21659         for the merge of gnulib's changes back into libc.
21660
21661         * lib/error.c (_): Define only if not already defined.
21662         Move definition to follow all #include directives.
21663         Include unlocked-io.h only if !_LIBC.
21664         [_LIBC]: Include <libio/libioP.h>.
21665         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21666         (fflush): Tweak definition to use INTUSE.
21667         (putc): Define.
21668
21669 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21670
21671         * lib/alloca.c [defined emacs]: Include "lisp.h".
21672         (xalloc_die) [defined emacs]: New macro.
21673         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21674         [! defined emacs]: Include <xalloc.h>.
21675         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21676         (pointer): Typedef to POINTER_TYPE *.
21677         (malloc): Remove decl; we now always use xmalloc.
21678         (alloca): Use old-style definition, since Emacs needs this.
21679         Check for arithmetic overflow when computing combined size.
21680
21681 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21682
21683         Do not generate unlocked-io.h automatically, since it's easier to
21684         maintain it by hand.
21685
21686         * lib/unlocked-io.h: New file, from GNU diffutils,
21687         but with proper copyright notice and attribution.
21688         * lib/gen-uio: Remove.
21689         * lib/Makefile.am: Add copyright notice.
21690         (libfetish_a_SOURCES): Add unlocked-io.h.
21691         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21692         (DISTCLEANFILES, io_functions): Remove macros.
21693         (EXTRA_DIST): Remove gen_uio.
21694         (unlocked-io.h): Remove rule.
21695
21696 2002-12-04  Jim Meyering  <jim@meyering.net>
21697
21698         Reflect the fact that stat.c and lstat.c are no longer generated.
21699         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21700         (DISTCLEANFILES): Likewise.
21701         (EXTRA_DIST): Likewise.
21702         (all_local): Don't depend on stat.c or lstat.c.
21703         (stat.c, lstat.c): Remove rules.
21704         (EXTRA_DIST): Remove xstat.in.
21705
21706         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21707         * lib/stat.c: New file.  Contents mostly from xstat.in.
21708         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21709         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21710
21711         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21712         too.
21713         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21714
21715 2002-12-03  Jim Meyering  <jim@meyering.net>
21716
21717         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21718         but not semantics, to minimize the differences between these two files.
21719         (safe_read): Change comment to mention SAFE_READ_ERROR.
21720
21721         * lib/safe-read.c (IS_EINTR): Define.
21722         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21723
21724 2002-12-02  Jim Meyering  <jim@meyering.net>
21725
21726         * lib/safe-read.c (EINTR): Define.
21727         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21728         (INT_MAX): Provide fallback.
21729         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21730
21731         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21732
21733 2002-12-02  Bruno Haible  <bruno@clisp.org>
21734
21735         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21736         Define, taken from safe-read.c.
21737         (INT_MAX): Provide fallback.
21738         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21739         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21740
21741         * lib/safe-read.c (EINTR): Remove definition.
21742         (safe_read): Don't use EINTR if it is absent.
21743
21744 2002-12-01  Jim Meyering  <jim@meyering.net>
21745
21746         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21747         zero.
21748         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21749
21750 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21751
21752         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21753         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21754         with `if (! (value < limit)) abort ();', for readability.
21755
21756 2002-11-26  Karl Berry  <karl@gnu.org>
21757
21758         * lib/strdup.c: copy from libc again, with jim's ok.
21759         * lib/.cppi-disable: re-add strdup.c
21760
21761 2002-11-25  Karl Berry  <karl@gnu.org>
21762
21763         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21764         instead of "strtol.c".
21765
21766 2002-11-25  Karl Berry  <karl@gnu.org>
21767
21768         * config/install-sh: update from automake for variable quoting, $0 in
21769         error msgs, etc.
21770
21771         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21772         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21773         entry.
21774
21775 2002-11-25  Jim Meyering  <jim@meyering.net>
21776
21777         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21778
21779 2002-11-24  Karl Berry  <karl@gnu.org>
21780
21781         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21782         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21783
21784 2002-11-24  Jim Meyering  <jim@meyering.net>
21785
21786         Update from coreutils:
21787
21788         * lib/mktime.c: Merge in changes from libc.
21789
21790         Avoid a link-time failure on some Linux systems.
21791         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21792         (otherwise).
21793         (__mon_yday): Declare with the STATIC attribute.
21794         (__mktime_internal): Likewise.
21795         Based on a report from Greg Schafer.
21796
21797 2002-11-23  Jim Meyering  <jim@meyering.net>
21798
21799         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21800         Use `unsigned', not `int', as type of index.
21801
21802         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21803
21804         * lib/fsusage.c: Remove unneeded parentheses around operands of
21805         `defined'.
21806
21807 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21808
21809         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21810         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21811         so that we can be included first.
21812         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21813         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21814         No need to include stddef.h or sys/types.h any more.
21815         Surround local include files with "", not "<>".
21816         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21817         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21818         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21819         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21820         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21821         (ISPRINT): Remove; no longer needed now that we assume C89.
21822
21823         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21824         Preserve errno.
21825
21826         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21827         quotearg_char): Use SIZE_MAX rather than
21828         (size_t) -1 when we are talking about "infinity".
21829
21830         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21831
21832 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21833
21834         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21835         hint that one should use `if (! x) abort ();' rather than `assert
21836         (x);', and anyway it's one less thing to worry about configuring.
21837         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21838         hash_rehash, hash_insert): Use abort rather than assert.
21839
21840 2002-11-22  Bruno Haible  <bruno@clisp.org>
21841
21842         * lib/safe-read.h: Assume C89. Add comments.
21843         (safe_read): Change return type to size_t.
21844         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21845         byte counts > SSIZE_MAX correctly.
21846         * lib/safe-write.h: New file.
21847         * lib/safe-write.c: New file.
21848         * lib/full-read.h: New file.
21849         * lib/full-read.c: New file.
21850         * lib/full-write.h: Assume C89. Add comments.
21851         * lib/full-write.c: Include safe-write.h.
21852         (full_write): Rewritten to use safe_write.
21853         Suggested by Jim Meyering and Paul Eggert.
21854
21855 2002-11-21  Jim Meyering  <jim@meyering.net>
21856
21857         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21858
21859         Merge in changes from the coreutils.
21860
21861         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21862         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21863         <stdint.h>.
21864         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21865         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21866         int.  Work more efficiently if X is the same width as uintmax_t.
21867         Do not compare X to -1, to avoid bogus compiler warning.
21868         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21869         Don't assume that f_frsize and f_bsize are the same type.
21870
21871         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21872         warning on FreeBSD.
21873
21874         * lib/makepath.c (make_path): Restore umask *before* creating the final
21875         component.
21876         (make_path): Minor reformatting.
21877
21878         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21879         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21880         HAVE_MALLOC/HAVE_REALLOC.
21881
21882         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21883         dummy ones.  At least on GNU/Linux systems, `auto' means something
21884         else.
21885         From Michael Stone.
21886
21887 2002-11-21  Bruno Haible  <bruno@clisp.org>
21888
21889         Remove case insensitive option matching.
21890         * lib/argmatch.h (argcasematch): Remove declaration.
21891         (ARGCASEMATCH): Remove macro.
21892         (__xargmatch_internal): Remove case_sensitive argument.
21893         (XARGMATCH): Update.
21894         (XARGCASEMATCH): Remove macro.
21895         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21896         case_sensitive argument.
21897         (argcasematch): Remove function.
21898         (__xargmatch_internal): Remove case_sensitive argument.
21899         (main): Use XARGMATCH instead of XARGCASEMATCH.
21900
21901         * lib/xmalloc.c: Change compile-time error message. Add comment about
21902         required autoconf version.
21903
21904 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21905
21906         Merge argmatch cleanups from Bison.  Assume C89.
21907
21908         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21909         Include stdlib.h, for EXIT_FAILURE.
21910         Always include <string.h>, since we assume C89.
21911         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21912         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21913         Include <stddef.h> instead, since it's all we need for size_t.
21914         (PARAMS): Remove.  All uses removed.
21915         (ARRAY_CARDINALITY): Do not bother to #undef.
21916         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21917         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21918         Remove unnecessary parentheses.
21919         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21920         Insert necessary parentheses.
21921         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21922         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21923
21924 2002-11-19  Bruno Haible  <bruno@clisp.org>
21925
21926         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21927         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21928
21929         * lib/mbswidth.h (PARAMS): Remove macro.
21930         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21931         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21932
21933         * lib/gcd.h (PARAMS): Remove macro.
21934         (gcd): Use ANSI C function declarations.
21935         * lib/gcd.c (gcd): Likewise.
21936
21937 2002-11-15  Bruno Haible  <bruno@clisp.org>
21938
21939         * lib/strcspn.c: Include <stddef.h>.
21940         (strcspn): Use ANSI C function declaration. Change return type to
21941         size_t. Use NULL.
21942         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21943         (strpbrk): Use NULL.
21944         * lib/strpbrk.h (PARAMS): Remove macro.
21945         (strpbrk): Use ANSI C function declaration.
21946         * lib/strstr.c: Don't include <sys/types.h>.
21947         * lib/strstr.h (PARAMS): Remove macro.
21948         (strstr): Use ANSI C function declarations.
21949
21950 2002-11-14  Karl Berry  <karl@gnu.org>
21951
21952         * config/mkinstalldirs: `do' on separate line, instead of
21953         `for var; do'.
21954
21955 2002-11-06  Bruno Haible  <bruno@clisp.org>
21956
21957         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21958         * lib/gcd.c (gcd): Likewise.
21959
21960 2002-11-05  Bruno Haible  <bruno@clisp.org>
21961
21962         * lib/gcd.h: New file, from gettext-0.11.5.
21963         * lib/gcd.c: New file, from gettext-0.11.5.
21964
21965 2002-11-05  Bruno Haible  <bruno@clisp.org>
21966
21967         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21968         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21969         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21970         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21971
21972         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
21973         <libintl.h>.
21974         * lib/makepath.c: Include gettext.h instead of <locale.h> and
21975         <libintl.h>.
21976
21977         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
21978         * lib/human.c: Include gettext.h instead of <libintl.h>.
21979         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
21980         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
21981         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
21982         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
21983         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
21984         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
21985         (textdomain): Remove definition.
21986         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
21987
21988         * lib/long-options.c: Remove include of <libintl.h> and definition of
21989         _.
21990         * lib/same.c: Remove include of <libintl.h> and definition of _.
21991
21992 2002-11-04  Owen Taylor  <otaylor@redhat.com>
21993
21994         * lib/config.charset: A few additions for Solaris.
21995
21996 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
21997
21998         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
21999         * lib/localcharset.c (locale_charset): Declare as extern "C".
22000
22001 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22002
22003         * lib/config.charset: msdos in uk_UA uses CP1125.
22004
22005 2002-11-04  Bruno Haible  <bruno@clisp.org>
22006
22007         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22008         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22009         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22010         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22011         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22012
22013 2002-11-04  Bruno Haible  <bruno@clisp.org>
22014
22015         * lib/localcharset.c (locale_charset): Don't return an empty string.
22016
22017 2002-11-04  Bruno Haible  <bruno@clisp.org>
22018
22019         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22020         aliases.
22021
22022 2002-11-04  Bruno Haible  <bruno@clisp.org>
22023
22024         * lib/config.charset: Update for newest glibc. Add canonical names
22025         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22026
22027 2002-11-04  Bruno Haible  <bruno@clisp.org>
22028
22029         * lib/config.charset: Add support for NetBSD.
22030
22031 2002-11-04  Bruno Haible  <bruno@clisp.org>
22032
22033         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22034
22035 2002-11-01  Bruno Haible  <bruno@clisp.org>
22036
22037         * configure.in: Add AC_CONFIG_AUX_DIR call.
22038         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22039         test/Makefile.
22040         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22041
22042 2002-09-28  Karl Berry  <karl@gnu.org>
22043
22044         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22045         installed automake until the next release, since changes have been
22046         made.
22047
22048 2002-09-25  Karl Berry  <karl@gnu.org>
22049
22050         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22051         * lib/getopt*: copy from libc/posix.
22052         * lib/gettext.h: copy from gettext.
22053         * lib/.cppi-disable: add strdup.c, gettext.h.
22054
22055 2002-09-25  Karl Berry  <karl@gnu.org>
22056
22057         * config/srclist.txt: enable gettext.h check.
22058         * config/config.{guess,sub}: update from prep.
22059         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22060                 from automake 1.6.3.
22061         See srclist*.
22062
22063 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22064
22065         * regex.c (PATFETCH): Remove the translating fetch.
22066         (PATFETCH_RAW): Rename to PATFETCH.
22067         (set_image_of_range): New fun.
22068         (SET_RANGE_TABLE_WORK_AREA): Use it.
22069         (regex_compile): Don't translate the pattern chars so eagerly.
22070         Only do it when inserting an `exactn' bytecode or when handling
22071         a char-range.
22072         (mutually_exclusive_p): Avoid empty statement.
22073
22074 2002-07-06  Jim Meyering  <meyering@lucent.com>
22075
22076         * m4/README: Don't mention Makefile.am.in.
22077         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22078
22079 2002-07-01  Jim Meyering  <meyering@lucent.com>
22080
22081         * lib/c-stack.c: Include sys/time.h.
22082         From Volker Borchert.
22083
22084 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22085
22086         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22087
22088 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22089
22090         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22091         New macro.  Use it uniformly instead of
22092         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22093         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22094         reported by Vin Shelton.
22095
22096 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22097
22098         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22099         Do not assume SA_SIGINFO behavior.
22100         Bug reported by Jim Meyering on NetBSD 1.5.2.
22101
22102 2002-06-22  Jim Meyering  <meyering@lucent.com>
22103
22104         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22105         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22106
22107         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22108         now that configure.ac uses AC_GNU_SOURCE.
22109         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22110         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22111
22112         Update to latest tools.  Suggestions from Paul Eggert.
22113         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22114         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22115         * m4/fnmatch.m4: Likewise.
22116         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22117         to AC_HEADER_STDBOOL
22118
22119 2002-06-22  Jim Meyering  <meyering@lucent.com>
22120
22121         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22122         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22123
22124 2002-06-22  Jim Meyering  <meyering@lucent.com>
22125
22126         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22127
22128         * lib/exitfail.c, exitfail.h: Likewise.
22129         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22130
22131         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22132         of fnmatch.h.
22133         (EXTRA_DIST): Add fnmatch_loop.c.
22134         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22135
22136         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22137         * lib/fnmatch.c: Update from diffutils-2.8.2.
22138         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22139         * lib/fnmatch.h: Remove file.
22140
22141 2002-06-21  Jim Meyering  <meyering@lucent.com>
22142
22143         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22144         * m4/mbrtowc.m4: Likewise.
22145
22146         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22147         * m4/mbswidth.m4: Reflect name change:
22148         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22149         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22150
22151         * m4/lib-link.m4: Update from gettext-0.11.2.
22152         * m4/gettext.m4: Likewise.
22153
22154         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22155         From Alfred M. Szmidt.
22156
22157 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22158
22159         * lib/file-type.h: Report an error if neither S_ISREG nor
22160         S_IFREG is defined, instead of using a test specific to glibc
22161         2.2.  This should be safe, since POSIX requires S_ISREG and
22162         Unix Version 7 had S_IFREG.  We don't need to check for
22163         <sys/types.h> since we don't use any symbols that it defines.
22164
22165 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22166
22167         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22168         $@-t, so that each temporary file name is unique and valid in the first
22169         8 characters, for operation under DOS.
22170
22171 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22172
22173         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22174
22175 2002-06-15  Jim Meyering  <meyering@lucent.com>
22176
22177         Work even with DJGPP 2.03, which lacks support for symlinks.
22178         From Richard Dawe.
22179         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22180         is defined.
22181         * lib/lchown.c (S_ISLNK): Likewise.
22182
22183 2002-06-15  Jim Meyering  <meyering@lucent.com>
22184
22185         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22186         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22187         have been included before this file.
22188
22189 2002-06-14  Jim Meyering  <meyering@lucent.com>
22190
22191         * lib/file-type.h: Use the version from diffutils-2.8.2.
22192         * lib/file-type.c: Likewise.
22193
22194 2002-06-07  Jim Meyering  <meyering@lucent.com>
22195
22196         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22197         They're needed at least for NetBSD 1.5.2.
22198         ($statxfs_includes): Include those same headers.
22199         ($statxfs_includes): Include sys/vfs.h if available.
22200         ($statxfs_includes): Likewise for sys/statvfs.h.
22201         Check for the following members in both structs statfs and statvfs:
22202         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22203
22204 2002-06-01  Jim Meyering  <meyering@lucent.com>
22205
22206         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22207         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22208
22209 2002-05-28  Jim Meyering  <meyering@lucent.com>
22210
22211         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22212         Reported by Volker Borchert.
22213
22214 2002-05-27  Jim Meyering  <meyering@lucent.com>
22215
22216         Fix a problem seen only on nonconforming systems whereby ls.c's
22217         use of localtime, and then of gettimeofday would cause trouble:
22218         the localtime call used to initialize rpl_gettimeofday's save
22219         mechanism would clobber ls's current local time information so
22220         that in any long listing the first file would always be listed
22221         with date 1970-01-01.  Analysis by Volker Borchert.
22222
22223         * lib/gettimeofday.c (localtime): Undefine.
22224         (rpl_localtime): New function.
22225
22226 2002-05-27  Jim Meyering  <meyering@lucent.com>
22227
22228         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22229         localtime.
22230
22231         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22232         use the replacement function; it wouldn't resolve at link time.
22233         Reported by Volker Borchert.
22234
22235 2002-05-22  Jim Meyering  <meyering@lucent.com>
22236
22237         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22238         file-type.h.
22239         * lib/file-type.h: New file.
22240         * lib/file-type.c (file_type): New file/function.  Extracted from
22241         diffutils.
22242
22243 2002-04-30  Jim Meyering  <meyering@lucent.com>
22244
22245         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22246
22247 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22248
22249         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22250
22251 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22252
22253         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22254         Do not check for alloca.h (no longer used) or stdbool.h (was never
22255         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22256
22257 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22258
22259         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22260
22261 2002-04-29  Jim Meyering  <meyering@lucent.com>
22262
22263         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22264         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22265         Use AC_FUNC_STRNLEN here instead.
22266
22267         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22268         With autoconf-2.53a, it's part of AC_PROG_CC.
22269
22270 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22271
22272         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22273         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22274
22275 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22276
22277         * lib/sig2str.h, lib/sig2str.c: New files.
22278         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22279
22280 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22281
22282         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22283         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22284         of 127, since 64 is the largest conceivable number for ancient
22285         nonstandard hosts.
22286         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22287
22288 2002-04-28  Jim Meyering  <meyering@lucent.com>
22289
22290         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22291
22292 2002-04-24  Jim Meyering  <meyering@lucent.com>
22293
22294         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22295         (jm_PREREQ): Use it.
22296
22297         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22298         mach/mach.h fcntl.h.
22299         Check for this function: setlocale.
22300
22301 2002-04-24  Jim Meyering  <meyering@lucent.com>
22302
22303         * lib/gettext.h: New file, from Gettext.
22304         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22305         (libfetish_a_SOURCES): Add gettext.h.
22306
22307 2002-04-16  Jim Meyering  <meyering@lucent.com>
22308
22309         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22310         ut_pid, ut_id, ut_exit.
22311
22312 2002-04-16  Jim Meyering  <meyering@lucent.com>
22313
22314         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22315         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22316         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22317
22318 2002-04-12  Jim Meyering  <meyering@lucent.com>
22319
22320         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22321         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22322         existence of the getmntinfo function.  Needed for Darwin 5.3.
22323
22324         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22325         This is necessary at least on Darwin 5.3.
22326
22327         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22328         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22329         strnlen.o in the library, and that makes some versions of ranlib
22330         object.
22331
22332 2002-04-12  Jim Meyering  <meyering@lucent.com>
22333
22334         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22335
22336 2002-04-09  Jim Meyering  <meyering@lucent.com>
22337
22338         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22339         to be more precise.  Rather than saying we're checking whether the
22340         function `works', say what we're testing.
22341         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22342         Reported by Bruno Haible.
22343
22344 2002-03-10  Jim Meyering  <meyering@lucent.com>
22345
22346         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22347         Suggestion from Santiago Vila.
22348
22349 2002-03-08  Jim Meyering  <meyering@lucent.com>
22350
22351         * lib/rename.c: Mention that this wrapper is needed also on
22352         mips-dec-ultrix4.4 systems.
22353
22354 2002-03-02  Jim Meyering  <meyering@lucent.com>
22355
22356         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22357         not HAVE_CLOCK_SETTIME.
22358
22359 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22360
22361         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22362         Check for clock_settime.
22363
22364 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22365
22366         * lib/nanosleep.h: Rename to....
22367         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22368
22369         * lib/gettime.c: New file.
22370         * lib/settime.c: New file.
22371         * lib/stime.c: Remove.
22372
22373         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22374         timespec.h.  Remove nanosleep.h.
22375
22376 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22377
22378         * m4/acl.m4: New file.
22379         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22380         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22381
22382 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22383
22384         * lib/acl.c, lib/acl.h: New files.
22385         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22386
22387 2002-02-24  Jim Meyering  <meyering@lucent.com>
22388
22389         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22390         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22391         cause trouble.  Reported by Nelson Beebe.
22392
22393 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22394
22395         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22396         compilers that don't know that xalloc_die never returns.
22397
22398 2002-02-20  Jim Meyering  <meyering@lucent.com>
22399
22400         * lib/getdate.c: Regenerate using bison-1.33.
22401
22402 2002-02-17  Jim Meyering  <meyering@lucent.com>
22403
22404         * config/config.guess (main): Don't use `head -1'; it's no longer
22405         portable. Use `sed 1q' instead.
22406
22407 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22408
22409         * m4/codeset.m4: Upgrade to gettext-0.11.
22410         * m4/gettext.m4: Upgrade to gettext-0.11.
22411         * m4/glibc21.m4: Upgrade to gettext-0.11.
22412         * m4/iconv.m4: Upgrade to gettext-0.11.
22413         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22414         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22415         * m4/lib-ld.m4: New file, from gettext-0.11.
22416         * m4/lib-link.m4: New file, from gettext-0.11.
22417         * m4/lib-prefix.m4: New file, from gettext-0.11.
22418         * m4/progtest.m4: Upgrade to gettext-0.11.
22419
22420 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22421
22422         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22423         (jm_PREREQ): Use it.
22424
22425 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22426
22427         * lib/posixver.c, lib/posixver.h: New files.
22428         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22429
22430 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22431             Bruno Haible  <bruno@clisp.org>
22432
22433         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22434         (fwrite_success_callback): New declaration.
22435         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22436         print_unicode_char. Call failure callback instead of error.
22437         (fwrite_success_callback): New function.
22438         (exit_failure_callback): New function.
22439         (fallback_failure_callback): New function.
22440         (print_unicode_char): Call unicode_to_mb.
22441
22442 2002-01-26  Jim Meyering  <meyering@lucent.com>
22443
22444         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22445         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22446
22447 2002-01-26  Jim Meyering  <meyering@lucent.com>
22448
22449         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22450
22451 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22452
22453         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22454
22455 2002-01-22  Jim Meyering  <meyering@lucent.com>
22456
22457         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22458         Otherwise, some versions of automake would omit the rule that makes
22459         Makefile from Makefile.in.
22460
22461 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22462
22463         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22464         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22465         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22466         (memcoll): Set errno to zero if there is no error.
22467
22468         * lib/quotearg.c (quotearg_buffer_restyled):
22469         Fix bug with quoting buffers containing NUL when backslashing escapes.
22470         This bug was exposed by the other changes in this patch.
22471         (quotearg_n_options): New arg ARGSIZE.
22472         All callers changed.
22473         (quoting_options_from_style): New function.
22474         (quotearg_n_style): Use it.
22475         (quotearg_n_style_mem): New function.
22476
22477         * lib/quotearg.h (quotearg_n_style_mem): New function.
22478
22479 2002-01-19  Jim Meyering  <meyering@lucent.com>
22480
22481         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22482         Remove useless quotes: DF_PROG="df".
22483         * m4/strnlen.m4: New file.
22484
22485 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22486
22487         * lib/backupfile.c (ISDIGIT): Comment fix.
22488         * lib/getdate.y (ISDIGIT): Likewise.
22489         * lib/posixtm.c (ISDIGIT, year): Likewise.
22490         * lib/strverscmp.c (ISDIGIT): Likewise.
22491         * lib/userspec.c (ISDIGIT): Likewise.
22492
22493 2002-01-16  Jim Meyering  <meyering@lucent.com>
22494
22495         * lib/getdate.y: Add three semicolons, each just before a closing
22496         brace. Bison (as of version 1.31) no longer papers over that mistake.
22497
22498 2002-01-05  Jim Meyering  <meyering@lucent.com>
22499
22500         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22501
22502 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22503
22504         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22505         not silently exit merely because the output buffer happens to
22506         have nothing pending.
22507
22508 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22509
22510         See the big note in ../ChangeLog.
22511         * lib/human.c (suffixes): Prefer K to k for 1024.
22512         (generate_suffix_backwards): New function.
22513         (human_readable_inexact): Use it.
22514         * lib/xstrtol.c (__xstrtol): If there is no number but there
22515         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22516         Accept 'K' as well as 'k'.
22517
22518 2001-12-15  Jim Meyering  <meyering@lucent.com>
22519
22520         * lib/regex.h (__restrict_arr): Update from libc.
22521
22522         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22523         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22524         (STREQ): Define.
22525
22526 2001-12-14  Jim Meyering  <meyering@lucent.com>
22527
22528         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22529         Suggestion from Bruno Haible.
22530
22531 2001-12-10  Jim Meyering  <meyering@lucent.com>
22532
22533         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22534         xrealloc, Instead, include "xalloc.h".
22535         (initbuffer): Don't cast xmalloc return value to char*.
22536         (readline): Reword comment.
22537         Don't cast xrealloc return value to char*
22538         Return NULL, not 0.
22539
22540 2001-12-09  Jim Meyering  <meyering@lucent.com>
22541
22542         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22543         about `signed and unsigned type in conditional expression'.
22544         * lib/posixtm.c (posix_time_parse): Likewise.
22545
22546         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22547
22548         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22549         to avoid a pedantic warning.
22550
22551         * lib/getstr.c: Don't include assert.h.
22552         (getstr): Remove warning-evoking assertions.
22553         Return -1 if offset parameter is out of bounds.
22554         Change the type of a local from int to size_t.
22555
22556         * lib/strftime.c (my_strftime_localtime_r): Include this function
22557         definition in the `#if ! HAVE_TM_GMTOFF' block.
22558
22559         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22560         Include xalloc.h instead.
22561
22562 2001-12-02  Jim Meyering  <meyering@lucent.com>
22563
22564         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22565         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22566         included.
22567
22568         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22569         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22570
22571 2001-11-30  Akim Demaille  <akim@epita.fr>
22572
22573         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22574         before being defined.
22575
22576 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22577
22578         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22579         First arg is int, not unsigned.
22580         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22581         (SIZE_MAX, UINT_MAX): New macros.
22582         (quotearg_n_options): Abort if N is negative.
22583         Avoid overflow check on hosts where size_t is 64 bits and int
22584         is 32 bits, as overflow is impossible there.
22585         Fix off-by-one typo that caused unnecessary reallocation.
22586
22587 2001-11-27  Jim Meyering  <meyering@lucent.com>
22588
22589         * lib/tempname.c: Merge with version from libc.
22590         * lib/regex.c: Likewise.
22591
22592         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22593         systems for which STDC_HEADERS is 0, it was not included, resulting in
22594         a warning about an integer-to-pointer conversion problem with getenv.
22595         Reported by Volker Borchert.
22596
22597 2001-11-26  Jim Meyering  <meyering@lucent.com>
22598
22599         * lib/gtod.h: Remove file.
22600         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22601         * lib/gettimeofday.c: Don't include gtod.h.
22602         (GTOD_init): Remove function.
22603         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22604         Suggestion from Volker Borchert.
22605
22606 2001-11-23  Jim Meyering  <meyering@lucent.com>
22607
22608         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22609         it.
22610         * lib/hash.c (struct hash_table): Define it here instead.
22611
22612 2001-11-22  Jim Meyering  <meyering@lucent.com>
22613
22614         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22615
22616 2001-11-20  Jim Meyering  <meyering@lucent.com>
22617
22618         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22619         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22620
22621 2001-11-19  Jim Meyering  <meyering@lucent.com>
22622
22623         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22624         directory.  Use "conftestXXXXXX" as the template.
22625         Suggestion from Paul Eggert.
22626
22627         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22628         immediately, so the test doesn't mistakenly hit the max-open-files
22629         limit.
22630
22631 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22632
22633         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22634         (TEMPORARIES): New macro.
22635         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22636         removes an artificial limitation (e.g. HP-UX 10.20, where
22637         TMP_MAX is 17576).
22638
22639 2001-11-18  Jim Meyering  <meyering@lucent.com>
22640
22641         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22642
22643 2001-11-18  Jim Meyering  <meyering@lucent.com>
22644
22645         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22646         on SunOS 4.
22647
22648         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22649         files will be created before anything else.
22650
22651 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22652
22653         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22654         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22655
22656 2001-11-17  Jim Meyering  <meyering@lucent.com>
22657
22658         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22659         Prompted by a report from Bob Proulx.
22660
22661         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22662         Instead, require UTILS_FUNC_MKSTEMP.
22663
22664 2001-11-17  Jim Meyering  <meyering@lucent.com>
22665
22666         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22667         Now, that's done as part of AC_FUNC_STRTOD.
22668
22669 2001-11-17  Jim Meyering  <meyering@lucent.com>
22670
22671         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22672         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22673         rather than group writable.  Patch by Juan F. Codagnone.
22674
22675         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22676         xrealloc, Instead, include "xalloc.h".
22677
22678         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22679         Remove explicit declarations of xmalloc, xrealloc,
22680         and xstrdup.  Instead, include "xalloc.h".
22681
22682         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22683         unlocked-io.h.
22684         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22685         Likewise.
22686         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22687
22688         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22689         Reported by Padraig Brady.
22690
22691         * lib/mkstemp.c: #undef mkstemp.
22692         Include config.h.
22693         (rpl_mkstemp): Rename from mkstemp.
22694         Protoize.
22695
22696 2001-11-16  Jim Meyering  <meyering@lucent.com>
22697
22698         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22699         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22700         determine the amount of total physical memory, use pstat_getstatic.
22701         HPUX-11 doesn't define _SC_PHYS_PAGES.
22702         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22703         If sysconf couldn't be used to determine the amount of available
22704         physical memory, use both pstat_getstatic and pstat_getdynamic.
22705         Based on a patch from Bob Proulx.
22706
22707 2001-11-10  Jim Meyering  <meyering@lucent.com>
22708
22709         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22710         (jm_PREREQ): Use it.
22711
22712 2001-11-09  Jim Meyering  <meyering@lucent.com>
22713
22714         * m4/jm-macros.m4: Require autoconf-2.52f.
22715         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22716         Use these AC_-prefixed names, not the AM_-prefixed ones.
22717
22718         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22719
22720 2001-11-05  Jim Meyering  <meyering@lucent.com>
22721
22722         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22723
22724 2001-11-04  Jim Meyering  <meyering@lucent.com>
22725
22726         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22727         $DEFS.
22728
22729 2001-11-03  Jim Meyering  <meyering@lucent.com>
22730
22731         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22732         of AC_DEFUN.
22733
22734         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22735         know the name of the variable in the macro definition.
22736
22737 2001-11-03  Jim Meyering  <meyering@lucent.com>
22738
22739         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22740         in argmatch_to_argument call.
22741
22742         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22743         argument.
22744
22745         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22746         e.g., a fault due to an attempt to free a NULL pointer.
22747
22748 2001-11-01  Jim Meyering  <meyering@lucent.com>
22749
22750         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22751         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22752
22753 2001-11-01  Jim Meyering  <meyering@lucent.com>
22754
22755         * lib/dirfd.c, lib/dirfd.h: New files.
22756         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22757
22758         * lib/hash.c (hash_print) [TESTING]: Clean up.
22759
22760 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22761
22762         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22763         to avoid a warning if -Wall.
22764
22765 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22766
22767         * README: New file
22768         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22769         (per RMS's instructions, this is now the canonical source)
22770         * lgpl/, gpl/: New directories.
22771
22772 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22773
22774         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22775
22776 2001-10-21  Jim Meyering  <meyering@lucent.com>
22777
22778         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22779         this code would end up calling gettext even in packages built
22780         with --disable-nls.
22781         * lib/getopt.c (_): Likewise.
22782         * lib/regex.c (_): Likewise.
22783
22784 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22785
22786         * m4/error.m4 (jm_PREREQ_ERROR):
22787         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22788         AC_FUNC_STRERROR_R does that.
22789         Check for strerror declaration.
22790
22791         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22792         are supposed to have them these days.
22793         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22794         Merge changes from latest Autoconf CVS.
22795         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22796         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22797         POSIX decided to standardize on the int flavor of strerror_r.
22798
22799 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22800
22801         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22802         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22803         Use strerror_r that is only a macro, even if it is not a function.
22804         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22805         (private_strerror): Use prototypes, not old-style function definition.
22806         (print_errno_message): New function.
22807         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22808         char*-flavored one.
22809         (error_tail, error, error_at_line): Use it.
22810
22811 2001-10-11  Jim Meyering  <meyering@lucent.com>
22812
22813         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22814         and quote_n (1, ... to avoid clobbering a buffer.
22815
22816 2001-10-05  Jim Meyering  <meyering@lucent.com>
22817
22818         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22819         hash-pjw.h.
22820         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22821         * lib/hash-pjw.h: New file.
22822
22823 2001-09-30  Jim Meyering  <meyering@lucent.com>
22824
22825         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22826         `struct fsstat' has the `f_fstypename' member.
22827         Use that to define FS_TYPE, which is now used to make
22828         the getfsstat link test tighter.
22829
22830 2001-09-30  Jim Meyering  <meyering@lucent.com>
22831
22832         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22833         Include <sys/ucred.h>, for Apple Darwin.
22834         Include sys/mount.h and sys/fs_types.h only if available.
22835         (FS_TYPE): Define.
22836         (read_filesystem_list): Use FS_TYPE.
22837
22838 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22839
22840         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22841         a boolean context.
22842
22843 2001-09-29  Jim Meyering  <meyering@lucent.com>
22844
22845         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22846         [one-argument getmntent function]): Include stdio.h before mntent.h.
22847         SunOS 4.1.x needs it for the declaration of `FILE'.
22848         Patch by Volker Borchert.
22849
22850         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22851         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22852         sys/fs_types.h, and make the link-test for getfsstat guard #include
22853         directives with appropriate #if HAVE_*_H tests so that we can
22854         detect getfsstat on Apple Darwin1.3.7 systems.
22855         Reported by Nelson Beebe.
22856         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22857
22858 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22859
22860         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22861         #defines strtoimax.  Also treat the other strto* functions
22862         like strtoimax.
22863
22864         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22865         Check for strtoul and strtoumax,
22866         as those declarations are made even in the signed case.
22867         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22868         Likewise, for strtol and strtoimax.
22869
22870 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22871
22872         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22873         #defines strtoimax.  Also treat the other strto* functions
22874         like strtoimax.
22875
22876         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22877         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22878         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22879
22880 2001-09-26  Jim Meyering  <meyering@lucent.com>
22881
22882         Most macros in unlocked-io.h had the wrong number of arguments.
22883         * lib/gen-uio: New script.
22884         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22885         * lib/unlocked-io.hin: Remove file.
22886         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22887         rather than trying to embed it here.
22888         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22889         Reported by Padraig Brady.
22890
22891 2001-09-25  Volker Borchert  <bt@teknon.de>
22892
22893         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22894         `result'.
22895
22896 2001-09-24  Jim Meyering  <meyering@lucent.com>
22897
22898         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22899
22900 2001-09-23  Jim Meyering  <meyering@lucent.com>
22901
22902         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22903         instead of the mere test for existence of mntent.h.  The latter
22904         would get a false-positive on AIX 3.4 systems.
22905         In the outer getmntent if-block, don't die if neither of the getmntent
22906         tests succeeds.  Instead, just fall through and continue with the
22907         remaining tests.
22908
22909 2001-09-23  Jim Meyering  <meyering@lucent.com>
22910
22911         * lib/mountlist.c: Remove useless parentheses in #if directives.
22912         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22913         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22914
22915 2001-09-22  Jim Meyering  <meyering@lucent.com>
22916
22917         * m4/gettext.m4: New file.  From gettext.
22918         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22919         * m4/progtest.m4: Likewise
22920         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22921         * m4/glibc21.m4: Likewise.
22922
22923         * m4/libintl.m4: Remove.  No longer used.
22924
22925 2001-09-22  Jim Meyering  <meyering@lucent.com>
22926
22927         * lib/localcharset.c: Update from latest gettext.
22928         * lib/config.charset: Likewise.
22929
22930 2001-09-20  Jim Meyering  <meyering@lucent.com>
22931
22932         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22933         strtoimax.
22934         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22935         strtoumax.
22936
22937 2001-09-20  Jim Meyering  <meyering@lucent.com>
22938
22939         * lib/xstrtol.c (strtoimax): Guard declaration with
22940         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22941         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22942         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22943         (strtoumax): Likewise, for completeness (it wasn't necessary).
22944
22945 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22946
22947         * lib/strtoimax.c (HAVE_LONG_LONG):
22948         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22949         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22950         to work around bug in IBM C compiler.
22951
22952 2001-09-17  Jim Meyering  <meyering@lucent.com>
22953
22954         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22955         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22956         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22957         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22958         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22959         whenever the right hand side need not be expanded by the shell.
22960
22961 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22962
22963         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22964         library.  It's not correct, as some older glibcs are buggy.
22965         fnmatch wasn't fixed until glibc 2.2.
22966
22967         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22968         special shell magic here.
22969
22970 2001-09-16  Jim Meyering  <meyering@lucent.com>
22971
22972         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
22973         * m4/jm-macros.m4: Require it.
22974
22975 2001-09-16  Jim Meyering  <meyering@lucent.com>
22976
22977         * lib/mkdir.c: New file.
22978
22979 2001-09-15  Jim Meyering  <meyering@lucent.com>
22980
22981         * m4/jm-macros.m4: Check for help2man.
22982
22983 2001-09-11  Jim Meyering  <meyering@lucent.com>
22984
22985         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
22986         The body, by Paul Eggert, was moved here from configure.in.
22987         * m4/jm-macros.m4: Require UTILS_HOST_OS.
22988
22989 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22990
22991         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
22992         (jm_PREREQ): Use it.
22993
22994 2001-09-04  Paul Eggert  <eggert@twinsun.com>
22995
22996         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
22997         Use ssize_t, not int, to store result of readlink.
22998         Check for ssize_t overflow as well as size_t overflow,
22999         as POSIX says the result of readlink is implementation-defined
23000         when ssize_t overflows.
23001         Remove unnecessary cast to char*.
23002         Use free+malloc instead of realloc, as the storage doesn't need
23003         to be preserved and it's clearer and can be more efficient that way.
23004         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23005         * lib/xreadlink.h (xreadlink): Update prototype.
23006
23007 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23008
23009         * lib/xgetcwd.c: Revert some of the previous change; intead,
23010         fix the HAVE_GETCWD_NULL code to behave more like the
23011         !HAVE_GETCWD_NULL code used to.
23012
23013         Include "xalloc.h".
23014         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23015         invoke xalloc_die.
23016
23017 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23018
23019         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23020         sys/param.h, as pathmax.h includes them.
23021
23022 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23023
23024         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23025         (jm_PREREQ_XGETCWD): New macro.
23026
23027         * m4/getcwd.m4: New file.
23028
23029 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23030
23031         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23032         like the HAVE_GETCWD_NULL code.
23033         Include pathmax.h if not HAVE_GETCWD.
23034         Do not include xalloc.h.
23035         (INITIAL_BUFFER_SIZE): New symbol.
23036         Do not use xmalloc / xrealloc, since the caller is responsible for
23037         handling errors.  Preserve errno around `free' during failure.
23038         Do not overrun buffer when using getwd.
23039
23040 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23041
23042         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23043         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23044         getcwd (NULL, 0).
23045
23046 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23047
23048         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23049         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23050         spotted by Jim Meyering.
23051
23052 2001-09-03  Jim Meyering  <meyering@lucent.com>
23053
23054         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23055         failure.
23056
23057 2001-09-02  Jim Meyering  <meyering@lucent.com>
23058
23059         * lib/error.c: Update from GNU libc.
23060
23061 2001-09-01  Jim Meyering  <meyering@lucent.com>
23062
23063         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23064         Used by df.
23065
23066 2001-09-01  Jim Meyering  <meyering@lucent.com>
23067
23068         * lib/xreadlink.c: New file.
23069         * lib/xreadlink.h: New file.
23070         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23071         xreadlink.h.
23072
23073         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23074         doesn't conflict with sparc Solaris 7's definition in
23075         /usr/include/sys/int_types.h.
23076
23077         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23078         files.
23079         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23080         and strncasecmp as r-values.  Unixware didn't have declarations.
23081
23082 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23083
23084         * lib/xstrtol.h: Add copyright notice.
23085         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23086         LONGINT_INVALID_SUFFIX_CHAR.
23087
23088 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23089
23090         * lib/xstrtol.c (strtoimax): New decl.
23091
23092 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23093
23094         * lib/xgetcwd.c: Don't include pathmax.h.
23095         Include stdlib.h and unistd.h if available.
23096         Include xalloc.h.
23097         (xmalloc, xstrdup, free): Remove decls.
23098         (xgetcwd): Don't assume sizes fit in unsigned.
23099         Check for overflow when computing sizes.
23100         Simplify reallocation code.
23101
23102 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23103
23104         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23105         a directory's st_size can have an arbitrary value, so the old
23106         usage could waste an arbitrary amount of memory.  All uses
23107         changed.
23108         * lib/savedir.h: Update prototype.
23109
23110 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23111
23112         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23113
23114         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23115         old strtoimax.c.
23116
23117         Also, make the following further changes to make this file's
23118         configuration more similar to that of strtol.c:
23119         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23120         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23121         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23122         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23123         changed to signed values.
23124
23125         And make the following changes as well:
23126         Fix copyright notice, as 1999 was missing.
23127         (verify): New macro.
23128         (strtoimax): Check sizes at compile-time, not run-time.
23129         Prefer strtol to strtoll if both work.
23130         (main): Remove; it was not that useful and was a pain to maintain.
23131
23132         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23133
23134 2001-08-31  Jim Meyering  <meyering@lucent.com>
23135
23136         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23137         Use an initial, malloc'd, buffer of length 128 rather than
23138         a statically allocated one of length 1024.
23139
23140 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23141
23142         Simplify code, partly by assuming autoconf 2.52 semantics.
23143
23144         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23145
23146         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23147         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23148         All uses removed.
23149         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23150         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23151         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23152         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23153         jm_AC_HEADER_INTTYPES_H.
23154         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23155
23156         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23157
23158         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23159         Quote first arg of AC_DEFUN.
23160         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23161         since they are needed to parse the include file even if we need
23162         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23163         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23164         but with opposite signedness.
23165
23166 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23167
23168         Merge 'exclude' changes from tar 1.13.22.
23169         This fixes one or two unlikely storage allocation overflow bugs,
23170         but doesn't change user-visible behavior otherwise.
23171
23172 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23173
23174         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23175         (jm_PREREQ_EXCLUDE): New macro.
23176
23177 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23178
23179         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23180         tm to be declared.
23181
23182 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23183
23184         * lib/hash.c: Remove '2001' from copyright notice.
23185
23186 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23187
23188         * lib/full-write.h: New file.
23189         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23190         * lib/full-write.c: Correct credits, as cccp.c no longer
23191         exists and anyway it was so heavily changed from the old cccp
23192         code as to be unrecognizable.  Include full-write.h.
23193         (full_write) Return size_t, with short writes meaning failure.
23194         All callers changed.  This fixes a bug with large buffers
23195         on 64-bit hosts.
23196         * lib/utime.c: Include full-write.h.
23197
23198 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23199
23200         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23201         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23202         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23203         Include if available.
23204         (<xalloc.h>): Include
23205         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23206         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23207         collide with FNM macros.
23208         (struct patopts): New struct.
23209         (struct exclude): Use it, as exclude patterns now come with options.
23210         (new_exclude): Support above changes.
23211         (new_exclude, add_exclude_file):
23212         Initial size must now be a power of two to simplify overflow checking.
23213         (free_exclude, fnmatch_no_wildcards): New function.
23214         (excluded_filename): No longer requires options arg, as the options
23215         are determined by add_exclude.  Now returns bool, not int.
23216         (excluded_filename, add_exclude):
23217         Add support for the fancy new exclusion options.
23218         (add_exclude, add_exclude_file): Now takes int options arg.
23219         Check for arithmetic overflow when computing sizes.
23220         (add_exclude_file): xrealloc might modify errno, so don't
23221         realloc until after errno might be used.
23222
23223         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23224         New macros.
23225         (free_exclude): New decl.
23226         (add_exclude, add_exclude_file): Now takes int options arg.
23227         (excluded_filename): No longer requires options arg, as the options
23228         are determined by add_exclude.  Now returns bool, not int.
23229
23230 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23231
23232         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23233
23234 2001-08-27  Jim Meyering  <meyering@lucent.com>
23235
23236         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23237
23238         * lib/version-etc.c (N_): Remove definition.
23239         Revert most of last change.
23240         Instead, simply don't mark the `Copyright...' string for translation.
23241         Based on advice from Paul Eggert.
23242
23243         * lib/strtoxmax.c: Tweak comment.
23244
23245 2001-08-26  Jim Meyering  <meyering@lucent.com>
23246
23247         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23248
23249         * m4/xstrtoimax.m4: New file.
23250         * m4/xstrtoumax.m4: Add comments explaining why we
23251         AC_REPLACE_FUNCS(strtol).
23252
23253 2001-08-26  Jim Meyering  <meyering@lucent.com>
23254
23255         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23256         of copyright with `%s' so translators don't get an untranslated
23257         message in 2002.
23258         (COPYRIGHT_YEAR): Define.
23259         (version_etc): Use fprintf rather than fputs.
23260         Suggestion from Ulrich Drepper.
23261
23262         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23263
23264         * lib/strtoll.c: New file, from GNU libc.
23265         * lib/xstrtoimax.c: New file.
23266
23267         * lib/xstrtol.h: Add xstrtoimax.
23268         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23269         * lib/strtoimax.c: New file.  Likewise, but first define
23270         STRTOUXMAX_SIGNED.
23271
23272         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23273         ...
23274         * lib/strtoxmax.c: ... then renamed to this.
23275
23276 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23277
23278         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23279         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23280         (jm_AC_TYPE_INTMAX_T): New macro.
23281         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23282
23283         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23284
23285         * m4/longlong.m4: Renamed from ulonglong.m4.
23286         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23287         * m4/uintmax_t.m4: Removed.
23288
23289 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23290
23291         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23292         Port to Solaris 8, where 'sed' requires a space after the 'r'
23293         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23294         Redirect output to $tmp just once.
23295
23296 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23297
23298         * lib/addext.c (<errno.h>): Include.
23299         (errno): Declare if not defined.
23300         (addext): Work correctly when pathconf returns -1 and leaves
23301         errno alone because there is no limit.  Also, work even if
23302         pathconf returns a value greater than SIZE_MAX.
23303
23304 2001-08-12  Jim Meyering  <meyering@lucent.com>
23305
23306         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23307         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23308         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23309         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23310         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23311         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23312         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23313         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23314         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23315         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23316         utime.m4, utimes.m4, xstrtoumax.m4:
23317         Quote the first argument in each use of AC_DEFUN.
23318
23319 2001-08-12  Jim Meyering  <meyering@lucent.com>
23320
23321         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23322         Simply `return getcwd (NULL, 0);'.
23323         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23324         Use 1300 as initial value for length, not PATH_MAX.
23325
23326         * lib/pathmax.h: Clean up cpp syntax.
23327
23328 2001-08-12  Jim Meyering  <meyering@lucent.com>
23329
23330         * lib/gettimeofday.c: New file.
23331         * lib/gtod.h: New file.
23332         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23333
23334 2001-08-05  Jim Meyering  <meyering@lucent.com>
23335
23336         * m4/jm-macros.m4: Require autoconf-2.52.
23337
23338 2001-08-04  Jim Meyering  <meyering@lucent.com>
23339
23340         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23341         stmt, to get in sync with glibc.
23342
23343 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23344
23345         The following changes are from gettext 0.10.39 as maintained by
23346         Bruno Haible.
23347
23348         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23349         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23350         with inverted sense.  All uses changed.
23351
23352         * lib/mbswidth.c: Don't include <limits.h>.
23353         Include <stdlib.h> and <string.h> unconditionally.
23354         (iswcntrl, mbsinit, ISCNTRL): New macros.
23355         (mbsnwidth): Use K&R style function declarations.
23356         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23357         can optimize it when MB_CUR_MAX == 1.
23358         The width of control characters is zero, not 1.
23359
23360 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23361
23362         The following changes are from gettext 0.10.39 as maintained by
23363         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23364
23365         * m4/codeset.m4: Upgrade to serial AM1.
23366         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23367         all uses changed.  Quote first arg of AC_DEFUN.
23368         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23369
23370         * m4/iconv.m4: Upgrade to serial AM2.
23371         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23372         Add --with-libconv-prefix.
23373         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23374         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23375         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23376         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23377         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23378
23379         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23380         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23381         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23382         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23383         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23384         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23385         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23386         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23387         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23388
23389         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23390         string.h any more.
23391
23392         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23393         not the default value.
23394
23395         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23396         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23397         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23398         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23399         Also check for iswcntrl, used for wcwidth fallback.
23400         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23401         to Autoconf 2.13.
23402
23403 2001-08-03  Jim Meyering  <meyering@lucent.com>
23404
23405         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23406         as it was in the original.  Reported by Paul Eggert.
23407
23408 2001-07-16  Jim Meyering  <meyering@lucent.com>
23409
23410         * m4/gettimeofday.m4: New file.
23411         Prompted by a report from Bernhard Baehr.
23412
23413 2001-07-15  Jim Meyering  <meyering@lucent.com>
23414
23415         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23416         stuff. Now it's in ../Makefile.cfg.
23417
23418 2001-07-15  Jim Meyering  <meyering@lucent.com>
23419
23420         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23421         (BUILT_SOURCES): Add unlocked-io.h.
23422         (io_functions): Define.
23423         (unlocked-io.h): New rule.
23424         (DISTCLEANFILES): Add unlocked-io.h.
23425         (all-local): Depend on unlocked-io.h, to ensure it is created.
23426
23427         * lib/unlocked-io.hin: New file
23428
23429         * lib/regex.c: Update from glibc.
23430
23431 2001-07-05  Jim Meyering  <meyering@lucent.com>
23432
23433         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23434         recommendation.
23435         (libfetish_a_SOURCES): Put all .h files here instead.
23436         Remove a thus-exposed (better checks in automake) duplicate and
23437         two unnecessary .h files.
23438
23439 2001-07-04  Jim Meyering  <meyering@lucent.com>
23440
23441         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23442         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23443         distcheck failure.
23444
23445 2001-07-02  Jim Meyering  <meyering@lucent.com>
23446
23447         The following changes were prompted by suggestions from Bruno Haible.
23448
23449         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23450         is now generated.
23451         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23452         definition of EXTRA_DIST.
23453         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23454         ensure that the generated file is created/updated whenever the list
23455         of $(unlocked_functions) is changed.
23456         (jm-glibc-io.m4): New rule.
23457         (unlocked-io.h): New rule -- currently unused.
23458
23459 2001-06-24  Jim Meyering  <meyering@lucent.com>
23460
23461         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23462         unmatched right bracket, rather than kludging it with an extra,
23463         falsely-matching quote in a comment.  Patch by Akim Demaille.
23464
23465 2001-06-11  Jim Meyering  <meyering@lucent.com>
23466
23467         * lib/regex.c: Update from GNU libc.
23468
23469 2001-05-27  Jim Meyering  <meyering@lucent.com>
23470
23471         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23472         Check for ut_type in struct utmp.
23473
23474 2001-05-27  Jim Meyering  <meyering@lucent.com>
23475
23476         * lib/readutmp.h (UT_TYPE): Define.
23477
23478 2001-05-24  Jim Meyering  <meyering@lucent.com>
23479
23480         * lib/argmatch.c: Include "quote.h".
23481         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23482         quote function.  Reported by Göran Uddeborg.
23483
23484 2001-05-22  Jim Meyering  <meyering@lucent.com>
23485
23486         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23487         now that we use the package-supplied version unconditionally.
23488         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23489
23490 2001-05-21  Jim Meyering  <meyering@lucent.com>
23491
23492         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23493         shell syntax errors.
23494
23495 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23496
23497         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23498
23499 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23500
23501         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23502         Don't bother to check library strftime, since
23503         we'll be using our own my_strftime function anyway.
23504         Define my_strftime instead of strftime.
23505
23506 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23507
23508         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23509         which is not yet declared.
23510
23511 2001-05-15  Jim Meyering  <meyering@lucent.com>
23512
23513         * m4/regex.m4: Use proper quoting so brackets appear in the test
23514         program.
23515         Reported by, and with help from, Bruno Haible.
23516
23517 2001-05-13  Jim Meyering  <meyering@lucent.com>
23518
23519         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23520         undefined.
23521
23522 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23523
23524         dirname code cleanup.  base_name now behaves more compatibly
23525         with POSIX basename when given file names that have trailing
23526         slashes, and similarly for dir_name.  Add new primitives
23527         base_len and dir_len.  Put the directory-name-related decls
23528         into dirname.h.
23529
23530         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23531         * lib/backupfile.c (base_name): Likewise.
23532         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23533         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23534         * lib/makepath.c (strip_trailing_slashes): Likewise.
23535         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23536         ISSLASH): Likewise.
23537         * lib/rename.c (strip_trailing_slashes): Likewise.
23538         * lib/same.c (base_name): Likewise.
23539         * lib/stripslash.c (ISSLASH): Likewise.
23540
23541         * lib/addext.c: Include <dirname.h> after size_t is defined.
23542         * lib/backupfile.c: Likewise.
23543
23544         * lib/addext.c (addext): Use base_len to trim redundant
23545         trailing slashes instead of doing it ourselves.
23546         But do not trim the last slash if it is not redundant.
23547
23548         * lib/backupfile.c (find_backup_file_name,
23549         max_backup_version): Use base_len instead of rolling it ourselves.
23550         Handle the case of "" and (on DOS) "C:" correctly.
23551
23552         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23553         needed. Include <string.h>, <dirname.h>.
23554         (base_name): Allow file names ending in slashes, other than names
23555         that are all slashes.  In this case, return the basename followed
23556         by the slashes.  This is more general, and can be used in places
23557         where the original base_name purposely had an assertion failure.
23558         (base_len): New function.
23559
23560         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23561         Do not include <assert.h>; no longer needed.
23562         Include xalloc.h.
23563         (memrchr): Remove decl.
23564         (dir_name_r): Remove.
23565         (dir_len): Renamed from dirlen.  All callers changed.
23566         Rewrite in terms of base_name, for simplicity and consistency.
23567         (dir_name): Never return NULL.  All callers changed.
23568         Do not include <stdlib.h> in test program; no longer needed.
23569         return 0; is fine for test program.
23570
23571         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23572         New macros.
23573         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23574
23575         * lib/path-concat.c (path_concat): Use base_len to compute
23576         base length, not strlen; this means we cannot rely on memcpy
23577         to null-terminate.
23578
23579         * lib/same.c (STREQ): Remove.
23580         (same_name): Handle the case where the basename ends in trailing '/'.
23581
23582         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23583         a slash was stripped.  Do not strip the last slash after a
23584         file system prefix.
23585
23586 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23587
23588         * lib/Makefile.am (libfetish_a_SOURCES):
23589         Add strftime.c, since we now compile it on all hosts.
23590
23591         * lib/strftime.c (my_strftime):
23592         Define to nstrftime if emacs, but only if my_strftime is not defined.
23593         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23594         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23595         Add one more extra argument: a nanoseconds value.
23596         All uses changed.
23597         (ns): New macro.
23598         (my_strftime function): Add %N format.
23599         (emacs_strftimeu): Renamed from emacs_strftime,
23600         with extra ut argument.
23601
23602 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23603
23604         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23605
23606 2001-04-21  Jim Meyering  <meyering@lucent.com>
23607
23608         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23609         doesn't interfere.
23610
23611 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23612
23613         * m4/ftruncate.m4: Check for chsize.
23614         Link with ftruncate.o unconditionally if ftruncate is missing.
23615         This was required when cross-compiling to i586-mingw32msvc.
23616
23617 2001-04-08  Jim Meyering  <meyering@lucent.com>
23618
23619         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23620         recomputed; that's necessary when the offset spans a DST transition.
23621         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23622
23623 2001-04-02  Jim Meyering  <meyering@lucent.com>
23624
23625         * lib/regex.h, regex.c: Update from GNU libc.
23626
23627 2001-03-24  Jim Meyering  <meyering@lucent.com>
23628
23629         * m4/jm-macros.m4: Require autoconf-2.49d.
23630
23631 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23632
23633         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23634
23635 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23636
23637         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23638
23639 2001-03-17  Jim Meyering  <meyering@lucent.com>
23640
23641         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23642         now that the version in autoconf is equivalent.
23643         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23644
23645         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23646         Suggestion from Akim Demaille.
23647
23648         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23649         (jm_PREREQ_TEMPNAME): New function.
23650
23651 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23652
23653         * lib/tempname.c (uint64_t): Define to uintmax_t if
23654         not defined, and if UINT64_MAX is not defined.
23655         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23656         Reported by John David Anglin.
23657
23658 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23659
23660         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23661         resolve alias if codeset is empty.
23662         * lib/config.charset (BeOS): Use wildcard syntax.
23663
23664 2001-03-13  Jim Meyering  <meyering@lucent.com>
23665
23666         * lib/path-concat.c (path_concat)
23667         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23668         concatenating e.g., `C:' and `foo'.
23669         From Bruno Haible.
23670
23671 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23672
23673         * lib/localcharset.c (locale_charset): Don't use
23674         setlocale(LC_CTYPE,NULL). Don't return NULL.
23675         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23676
23677 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23678
23679         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23680         support for DOS/DJGPP.
23681
23682 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23683
23684         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23685         lacks mkstemp.  Compile our own tempname.c if we compile our own
23686         mkstemp.c, as mkstemp relies on tempname.
23687
23688 2001-03-01  Jim Meyering  <meyering@lucent.com>
23689
23690         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23691         AH_VERBATIM really does output its argument verbatim.
23692
23693 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23694
23695         * lib/Makefile.am (libfetish_a_SOURCES):
23696         Add dup-safer.c, fopen-safer.c.
23697         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23698
23699         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23700         * lib/unistd-safer.h: New files.
23701
23702 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23703
23704         The mkstemp replacement is taken from glibc 2.2.2, with some
23705         portability fixes for use outside glibc, as follows:
23706
23707         * lib/tempname.c (struct_stat64): New macro.
23708         (direxists, __gen_tempname): Use it.
23709         This avoids a portability problem with Solaris 8.
23710
23711         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23712         (<stddef.h>, <stdint.h>, <string.h>):
23713         Include only if STDC_HEADERS || _LIBC.
23714         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23715         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23716         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23717         (__set_errno): Define this macro if <errno.h> doesn't.
23718         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23719         Define these macros if <stdio.h> doesn't.
23720         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23721         Define these macros if <sys/stat.h>
23722         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23723         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23724         __xstat64): Define if not _LIBC.
23725         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23726         (__gen_tempname): Invoke gettimeofday only if
23727         HAVE_GETTIMEOFDAY || _LIBC;
23728         otherwise, fall back on plain "time".
23729         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23730
23731         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23732
23733         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23734
23735 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23736
23737         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23738
23739 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23740
23741         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23742         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23743         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23744         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23745
23746 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23747
23748         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23749         Remove workaround macros for hosts that have mbrtowc but not
23750         mbstate_t, as we now insist on proper declarations for both
23751         before using mbrtowc.
23752
23753 2001-02-17  Jim Meyering  <meyering@lucent.com>
23754
23755         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23756         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23757         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23758         UnixWare 7.1.1.
23759
23760         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23761         rather than AC_CACHE_VAL.
23762
23763 2001-02-17  Jim Meyering  <meyering@lucent.com>
23764
23765         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23766         around included file name.
23767
23768         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23769
23770         * lib/strftime.c: Update from GNU libc (the only changes were to
23771         comments).
23772
23773 2001-02-17  Jim Meyering  <meyering@lucent.com>
23774
23775         * lib/regex.c: Update from libc.
23776
23777 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23778
23779         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23780         clash.
23781
23782 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23783
23784         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23785         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23786         Reported by Mark Hounschell via Paul Eggert.
23787
23788 2001-02-07  Jim Meyering  <meyering@lucent.com>
23789
23790         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23791
23792 2001-02-05  Jim Meyering  <meyering@lucent.com>
23793
23794         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23795         it includes the patch required for `large file' support with at least
23796         HP-UX's 10.20 /bin/cc.
23797
23798 2001-02-03  Jim Meyering  <meyering@lucent.com>
23799
23800         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23801         AS_IF, now that it works once again (mysteriously).
23802         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23803
23804 2001-01-30  Jim Meyering  <meyering@lucent.com>
23805
23806         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23807         * m4/chown.m4: Rename conftestchown to conftest.chown.
23808         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23809         s/conftestdir2/conftest.d2/.
23810         * m4/utimes.m4: s/conftestdata/conftest.data/
23811         Inspired by Pavel Roskin's change in autoconf.
23812
23813 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23814
23815         * lib/config.charset: Update for FreeBSD 4.2.
23816
23817 2001-01-27  Jim Meyering  <meyering@lucent.com>
23818
23819         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23820         a use of AS_IF.
23821         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23822
23823 2001-01-26  Jim Meyering  <meyering@lucent.com>
23824
23825         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23826         quotearg.c includes it.
23827
23828 2001-01-26  Jim Meyering  <meyering@lucent.com>
23829
23830         * lib/quotearg.c: Include stddef.h.
23831         * lib/quote.c: Include stddef.h.
23832         Reported by Axel Kittenberger.
23833
23834         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23835         line in double quotes so that it evokes a better diagnostic.
23836         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23837         Reported by Axel Kittenberger.
23838
23839 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23840
23841         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23842         as if it was a `charset'.
23843
23844 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23845
23846         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23847         has const.
23848
23849 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23850
23851         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23852         to avoid a warning.  Add back 'const' to inptr.
23853
23854 2001-01-20  Jim Meyering  <meyering@lucent.com>
23855
23856         Be sure that headers are checked before used in code compiled
23857         for the type checks.
23858         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23859         In place of that, invoke jm_CHECK_ALL_TYPES.
23860         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23861         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23862         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23863         The check for ssize_t was mistakenly run before the test for unistd.h.
23864
23865         The configure-time check for stdbool.h was missing.
23866         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23867         (jm_PREREQ_HASH): New function.
23868
23869 2001-01-17  Jim Meyering  <meyering@lucent.com>
23870
23871         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23872         for autoconf-2.49c.
23873         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23874
23875 2001-01-16  Jim Meyering  <meyering@lucent.com>
23876
23877         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23878         From Bruno Haible.
23879
23880 2001-01-14  Jim Meyering  <meyering@lucent.com>
23881
23882         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23883         foo and bar.  Create conftestdir/ in the script, not in the C code.
23884         Remove directories in the script, not in the C code.
23885         Remove conftestdir{,2} before trying to create the directory.
23886         Make the entire configure script fail if the mkdir fails.
23887
23888 2001-01-14  Jim Meyering  <meyering@lucent.com>
23889
23890         * lib/rename.c: New file.  From Volker Borchert.
23891         Include stdlib.h, string.h or strings.h, and xalloc.h.
23892         Use strip_trailing_slashes rather than open-coding it.
23893
23894 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23895
23896         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23897
23898 2001-01-03  Jim Meyering  <meyering@lucent.com>
23899
23900         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23901         of local `inptr' to avoid warning with some system declarations of
23902         iconv.
23903
23904 2001-01-02  Volker Borchert  <bt@teknon.de>
23905
23906         * m4/rename.m4: New file.
23907         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23908
23909 2001-01-01  Jim Meyering  <meyering@lucent.com>
23910
23911         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23912         even on systems with utmpx.h.  It's necessary for the declaration of
23913         utmp's ut_user member.  Reported by Andreas Jaeger.
23914
23915         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23916         available. They are required for the declarations of getgrgid and
23917         getpwuid resp.
23918         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23919         Reported by Andreas Jaeger.
23920
23921 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23922
23923         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23924         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23925         so `make install' also works in VPATH builds.
23926
23927 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23928
23929         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23930         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23931         can be used in subdirectories.
23932
23933 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23934
23935         * lib/modechange.c: Do not assume that mode_t uses the
23936         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23937         the other-execute bit of FOO even if S_IXOTH != 1.
23938
23939         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23940         WOTH, XOTH, ALLM): New macros.
23941         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23942          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23943         Use them.
23944         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23945         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23946         (mode_compile):
23947         No need to use uintmax_t; unsigned long is long enough.
23948         Don't bother to get suffix since we don't use it.
23949
23950 2000-12-26  Jim Meyering  <meyering@lucent.com>
23951
23952         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23953         better with autoheader.
23954
23955 2000-12-24  Jim Meyering  <meyering@lucent.com>
23956
23957         * lib/hash.c (is_prime): Return explicit boolean values.
23958         (hash_get_first): Return NULL to appease Irix5.6's 89.
23959         Reported by Nelson Beebe.
23960
23961 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23962
23963         * lib/localcharset.c (locale_charset): Add support for Win32.
23964
23965 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23966
23967         * lib/physmem.h, lib/physmem.c: New files.
23968
23969         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23970         (noinst_HEADERS): Add physmem.h.
23971
23972         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
23973         't' for compatibility with Solaris 8 sort.
23974
23975 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
23976
23977         * lib/config.charset: Add support for BeOS.
23978
23979 2000-12-17  Jim Meyering  <meyering@lucent.com>
23980
23981         * m4/dos.m4 (jm_AC_DOS): New file and macro.
23982         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
23983
23984 2000-12-16  Jim Meyering  <meyering@lucent.com>
23985
23986         This bug had a serious impact on chown: `chown N:M FILE' (for integer
23987         N and M) would have treated it like `chown N:N FILE'.
23988
23989         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
23990
23991 2000-12-16  Jim Meyering  <meyering@lucent.com>
23992
23993         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
23994         SHELLS_FILE to a file name that's useful on djgpp systems.
23995         Include stdlib.h.
23996         (ADDITIONAL_DEFAULT_SHELLS): Define.
23997         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
23998         Based mostly on a patch from Prashant TR.
23999
24000 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24001
24002         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24003         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24004         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24005
24006 2000-12-08  Andreas Schwab  <schwab@suse.de>
24007
24008         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24009         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24010
24011 2000-12-07  Jim Meyering  <meyering@lucent.com>
24012
24013         * lib/stripslash.c (ISSLASH): Define.
24014         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24015         `/'.
24016         From Prashant TR.
24017
24018         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24019         (dir_name_r): Declare this function as static.
24020         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24021         manifest itself on a name containing a mix of slashes and
24022         backslashes.
24023         Make this function work with names starting with a DOS-style
24024         drive letter and colon prefix.
24025         (dir_name): Append `.' if necessary.
24026         Based mostly on patches from Prashant TR and Eli Zaretskii.
24027
24028         * lib/dirname.h (dir_name_r): Remove prototype.
24029
24030 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24031
24032         * m4/off_t-format.m4: Remove this file.
24033         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24034
24035 2000-12-06  Jim Meyering  <meyering@lucent.com>
24036
24037         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24038         replacement strtoull, we may well need the replacement strtoul, too.
24039         Check for declarations of strtoul and strtoull.
24040         Check for strtol.  Mainly as a cue to cause automake to include
24041         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24042         Check for limits.h -- strtol.c needs it.
24043
24044 2000-12-05  Jim Meyering  <meyering@lucent.com>
24045
24046         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24047
24048 2000-12-04  Jim Meyering  <meyering@lucent.com>
24049
24050         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24051         Also include memory.h, stdlib.h, unistd.h if appropriate.
24052         Reported by Andreas Jaeger (conflicting declaration of malloc).
24053
24054 2000-12-02  Jim Meyering  <meyering@lucent.com>
24055
24056         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24057         * m4/jm-macros.m4 (jm_MACROS): require it.
24058
24059 2000-12-02  Jim Meyering  <meyering@lucent.com>
24060
24061         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24062
24063 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24064
24065         * lib/memrchr.c: Include <config.h> before any system include file.
24066
24067 2000-11-30  Jim Meyering  <meyering@lucent.com>
24068
24069         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24070
24071 2000-11-30  Jim Meyering  <meyering@lucent.com>
24072
24073         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24074
24075 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24076
24077         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24078
24079 2000-11-26  Jim Meyering  <meyering@lucent.com>
24080
24081         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24082
24083 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24084
24085         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24086         size of (size_t) -1; it's not portable.
24087
24088 2000-11-17  Jim Meyering  <meyering@lucent.com>
24089
24090         * lib/strstr.c: Update from GNU libc.
24091
24092 2000-11-17  Akim Demaille  <akim@epita.fr>
24093
24094         * lib/obstack.h: Formatting changes.
24095         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24096         prevent type checking.
24097         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24098         cast the value to (void *): assigning a `foo *' to a `void *'
24099         variable is valid.
24100         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24101
24102 2000-11-16  Jim Meyering  <meyering@lucent.com>
24103
24104         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24105
24106 2000-11-11  Jim Meyering  <meyering@lucent.com>
24107
24108         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24109
24110 2000-11-10  Jim Meyering  <meyering@lucent.com>
24111
24112         * lib/obstack.h: Update from GNU libc.
24113         * lib/obstack.c: Likewise.
24114
24115 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24116
24117         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24118
24119 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24120
24121         * lib/getusershell.c (setusershell): Use rewind rather than
24122         fseek/fseeko, to avoid configuration hassles with fseeko.
24123         Don't bother opening SHELLS_FILE if shellstream is NULL;
24124         it's not necessary.
24125
24126 2000-11-05  Jim Meyering  <meyering@lucent.com>
24127
24128         * lib/makepath.h (make_dir): Declare.
24129         * lib/makepath.c (make_dir): Remove `static' attribute.
24130         Tweak a comment.
24131
24132 2000-11-04  Jim Meyering  <meyering@lucent.com>
24133
24134         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24135
24136 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24137
24138         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24139         last one in a bucket, advance to the next bucket.
24140
24141 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24142
24143         * lib/fnmatch.c: Do not comment out all the code if we are using
24144         the GNU C library, because in some cases we are replacing buggy
24145         code in the GNU C library itself.
24146
24147 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24148
24149         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24150         (regex_compile): Catch bogus \(\1\).
24151
24152 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24153
24154         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24155         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24156         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24157
24158 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24159
24160         * lib/error.h, getline.h, modechange.h:
24161         Remove "2000" from Copyright line, as the file hasn't been
24162         changed this year other than in the copyright notice.
24163
24164         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24165         was changed this year.
24166
24167 2000-10-29  Jim Meyering  <meyering@lucent.com>
24168
24169         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24170         renaming.
24171         * m4/ls-mntd-fs.m4: Likewise
24172
24173 2000-10-29  Jim Meyering  <meyering@lucent.com>
24174
24175         * lib/xstat.in: Fix grammar in comment.
24176
24177 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24178
24179         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24180         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24181         doesn't define __restrict_arr.
24182
24183 2000-10-28  Jim Meyering  <meyering@lucent.com>
24184
24185         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24186         (jm_PREREQ_MEMCHR): New function.
24187
24188 2000-10-28  Jim Meyering  <meyering@lucent.com>
24189
24190         * lib/memchr.c: Update from libc.
24191         Adjust for portability:
24192         [HAVE_STDLIB_H]: Include stdlib.h.
24193         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24194         Undef __memchr, too.
24195         [!weak_alias]: Define __memchr to memchr.
24196
24197         * lib/regex.c: Update from libc.
24198         * lib/regex.h: Likewise.
24199         * lib/getopt1.c: Likewise.
24200         * lib/memcmp.c: Likewise.
24201
24202         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24203         Avoid using fseek, when possible -- it's broken by design.
24204         Patch by Ulrich Drepper.
24205
24206 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24207
24208         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24209         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24210         Giving in to popular pressure to shut up the compiler with casts.
24211
24212 2000-10-26  Jim Meyering  <meyering@lucent.com>
24213
24214         * lib/strftime.c: Update from libc.
24215
24216 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24217
24218         * regex.c: More `unsigned char' -> `re_char' changes.
24219         Also change several `int' into `re_wchar_t'.
24220         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24221         (PUSH_FAILURE_POINTER): Don't cast any more.
24222         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24223         We want GCC to complain, since this piece of code makes
24224         re_match non-reentrant, which *should* be fixed.
24225         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24226         (EXTEND_BUFFER): Use RETALLOC.
24227         (SET_LIST_BIT): Don't cast.
24228         (re_wchar_t): New type.
24229         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24230         that those two functions will always properly return.
24231         (IMMEDIATE_QUIT_CHECK): Cast to void.
24232         (analyse_first): Use recursion rather than an explicit stack.
24233         (re_compile_fastmap): Can't fail anymore.
24234         (re_search_2): Don't check re_compile_fastmap for failure.
24235         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24236         Now also sets the new value (passed in a new argument).
24237         (re_match_2_internal): Use it.
24238         Also, use a new var `reg' of type size_t when looping through regs
24239         rather than reuse the inappropriate `mcnt'.
24240
24241 2000-10-25  Jim Meyering  <meyering@lucent.com>
24242
24243         * lib/obstack.c: Update from libc.
24244
24245 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24246
24247         * regex.c (regex_compile): Change the way of handling a range from
24248         a char less than 256 to a char not less than 256.
24249
24250 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24251
24252         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24253         NT-Emacs only.
24254         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24255         so that re_search functions only quit when callers expect them to.
24256
24257 2000-10-23  Jim Meyering  <meyering@lucent.com>
24258
24259         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24260         wrong.  That set_locale call must not have any side effects.
24261         From Paul Eggert.
24262
24263 2000-10-22  Jim Meyering  <meyering@lucent.com>
24264
24265         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24266         [CYCLIC]: Remove now-unused definition.
24267
24268         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24269         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24270         Suggestion from Ulrich Drepper.
24271
24272 2000-10-21  Jim Meyering  <meyering@lucent.com>
24273
24274         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24275         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24276         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24277
24278 2000-10-21  Jim Meyering  <meyering@lucent.com>
24279
24280         * lib/dirname.c (memrchr): Declare if necessary.
24281         (dir_name): Remove the restriction that there be no
24282         trailing slashes.  Now, this code skips past them, effectively
24283         ignoring them.
24284         [TEST_DIRNAME] (main): New unit tests.
24285
24286         * lib/memrchr.c: New file from GNU libc.
24287         Undef __memrchr, too.
24288         [!weak_alias]: Define __memrchr to memrchr.
24289         Guard weak_alias use with `#ifdef weak_alias'.
24290
24291 2000-10-21  Jim Meyering  <meyering@lucent.com>
24292
24293         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24294         (dir_name): Use dir_name_r.
24295         * lib/dirname.h (dir_name_r): Declare it.
24296
24297 2000-10-17  Jim Meyering  <meyering@lucent.com>
24298
24299         * lib/quote.h (PARAMS): Define and use.
24300         Reported by Akim Demaille.
24301
24302         * lib/getopt.c: Update from libc.
24303
24304 2000-10-16  Jim Meyering  <meyering@lucent.com>
24305
24306         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24307         setlocale.
24308         From Jan Fedak.
24309
24310 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24311
24312         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24313
24314 2000-09-25  Jim Meyering  <meyering@lucent.com>
24315
24316         * lib/md5.h (rol): Define (from GnuPG).
24317
24318         * lib/sha.c: Give credit (GnuPG) where due.
24319         (M): Use rol rather than open-coding it.
24320         Add a FIXME comment.
24321
24322 2000-09-21  Jim Meyering  <meyering@lucent.com>
24323
24324         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24325         Reported by Michael Stone.
24326
24327 2000-09-20  Jim Meyering  <meyering@lucent.com>
24328
24329         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24330         (noinst_HEADERS): Add sha.h.
24331         Based on code from Scott G. Miller and from GnuPG.
24332
24333 2000-09-18  Jim Meyering  <meyering@lucent.com>
24334
24335         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24336         LIBS. Otherwise, everyone ends up linking with -lelf for some
24337         configurations.
24338         Reported by Mike Stone.
24339
24340 2000-09-15  Jim Meyering  <meyering@lucent.com>
24341
24342         * lib/regex.c: Update from libc.
24343
24344 2000-09-10  Jim Meyering  <meyering@lucent.com>
24345
24346         * lib/getopt.c (_getopt_internal): Update from glibc.
24347
24348 2000-09-09  Jim Meyering  <meyering@lucent.com>
24349
24350         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24351         think it should be used as a general replacement for isascii.
24352         * lib/fnmatch.c: Likewise.
24353         * lib/mbswidth.c: Likewise
24354         * lib/regex.c: Likewise.
24355
24356         Don't use atoi.
24357         * lib/userspec.c: Include sys/param.h and limits.h.
24358         Include xstrtol.h.
24359         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24360         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24361         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24362         UID, GID.  Check range.
24363
24364 2000-09-06  Jim Meyering  <meyering@lucent.com>
24365
24366         * lib/getopt.c (_getopt_internal): Update from glibc.
24367
24368 2000-08-30  Jim Meyering  <meyering@lucent.com>
24369
24370         * lib/strftime.c: Merge in changes from GNU libc.
24371
24372 2000-08-26  Jim Meyering  <meyering@lucent.com>
24373
24374         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24375         * m4/fpending.m4: New file.
24376
24377 2000-08-26  Jim Meyering  <meyering@lucent.com>
24378
24379         * lib/closeout.c: Include "__fpending.h".
24380         (close_stdout_status): Return right away if there's nothing to flush.
24381
24382         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24383         * lib/__fpending.c: New file.
24384         * lib/__fpending.h: New file.
24385
24386 2000-08-20  Jim Meyering  <meyering@lucent.com>
24387
24388         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24389         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24390         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24391
24392 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24393
24394         Improve fileutils installation on systems where running
24395         programs (like install) can't be unlinked.
24396         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24397         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24398
24399 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24400
24401         Standardize on "memory exhausted" instead of "Memory exhausted"
24402         or "virtual memory exhausted".
24403         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24404         "virtual memory exhausted".
24405         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24406         our own message.
24407         * lib/userspec.c (parse_user_spec): Likewise.
24408         * lib/bumpalloc.h: comment fix
24409         * lib/same.c, userspec.c: Include xalloc.h.
24410
24411         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24412         not char *const and pointing to a constant array.
24413         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24414         (xrealloc): Comment fix.
24415
24416         * lib/userspec.c (parse_user_spec):
24417         Don't translate a message until just before returning,
24418         to avoid unnecessary translation.
24419
24420 2000-08-07  Jim Meyering  <meyering@lucent.com>
24421
24422         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24423         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24424         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24425         getgroups.c, gethostname.c, getopt.h, group-member.c,
24426         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24427         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24428         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24429         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24430         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24431         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24432         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24433         yesno.c: Back out Copyright date changes for each file with no change
24434         this year.  This eases coordination with other programs using the same
24435         source code modules.  From Paul Eggert.
24436
24437 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24438
24439         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24440         not char, for compatibility with glibc 2.1.3 strftime.c.
24441
24442 2000-08-03  Greg McGary  <greg@mcgary.org>
24443
24444         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24445         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24446         (EXTEND_BUFFER): Use them.
24447
24448 2000-08-01  Jim Meyering  <meyering@lucent.com>
24449
24450         * lib/dirname.c (ISSLASH): Define.
24451         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24452         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24453         both `\' and `/' may be use as path separators.
24454         Based on a patch from Prashant TR.
24455
24456 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24457
24458         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24459         slot vector a constant, since it might get modified.
24460
24461 2000-07-31  Jim Meyering  <meyering@lucent.com>
24462
24463         * lib/xmalloc.c: Use `virtual memory exhausted', not
24464         `Memory exhausted'.
24465         * lib/obstack.c (print_and_abort): Likewise.
24466
24467 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24468
24469         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24470         buffer, so that the caller can always quote one small
24471         component of a "memory exhausted" message in slot 0.
24472         From a suggestion by Jim Meyering.
24473
24474 2000-07-30  Jim Meyering  <meyering@lucent.com>
24475
24476         * lib/makepath.c (make_path): Quote the other instance, too.
24477
24478         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24479         (STATIC_BUF_SIZE): Define.
24480         (quotearg_n_options): Use only statically allocated storage when
24481         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24482         than STATIC_BUF_SIZE.
24483
24484 2000-07-29  Jim Meyering  <meyering@lucent.com>
24485
24486         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24487         * lib/dirname.c (dir_name): Likewise.
24488
24489         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24490         `/'.
24491
24492         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24493         (dir_name): Assert that there are no trailing slashes.
24494
24495 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24496
24497         * lib/mbswidth.h (mbswidth): Add a flags argument.
24498         (mbswidth): New declaration.
24499         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24500         * lib/mbswidth.c (mbswidth): Add a flags argument.
24501         (mbsnwidth): New function.
24502
24503 2000-07-24  Jim Meyering  <meyering@lucent.com>
24504
24505         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24506
24507 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24508
24509         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24510
24511 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24512
24513         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24514         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24515         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24516         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24517         invoke multibyte primitives.
24518
24519 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24520
24521         * lib/quotearg.c:
24522         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24523         so that mbstate_t is always defined.
24524
24525         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24526         be 1 in at least one GCC installation, and this configuration
24527         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24528         performance on hosts that have mbrtowc but have only unibyte
24529         locales, but I assume these hosts are rare.
24530
24531 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24532
24533         * lib/mbswidth.c (_XOPEN_SOURCE):
24534         Don't define; this causes problems on Solaris 7.
24535         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24536
24537 2000-07-23  Jim Meyering  <meyering@lucent.com>
24538
24539         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24540         too: getgrgid, getpwuid, getuid.
24541
24542 2000-07-23  Jim Meyering  <meyering@lucent.com>
24543
24544         * lib/basename.c (base_name): Add an assertion.
24545
24546 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24547
24548         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24549         shadow its mbsinit function.
24550
24551 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24552
24553         * lib/mbswidth.h: New file.
24554         * lib/mbswidth.c: New file.
24555         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24556         (noinst_HEADERS): Add mbswidth.h.
24557
24558 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24559
24560         * lib/config.charset: Add support for FreeBSD. Improve support for
24561         HP-UX and IRIX 6.
24562
24563 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24564
24565         * m4/mbswidth.m4: New file.
24566         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24567
24568 2000-07-15  Jim Meyering  <meyering@lucent.com>
24569
24570         * lib/makepath.c: Include quote.h.
24571         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24572         corresponding argument in a `quote (...)' call.
24573         Give better diagnostics.
24574
24575         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24576         (noinst_HEADERS): Add quote.h.
24577
24578         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24579         from tar's src/misc.c.
24580         * lib/quote.h: New file.  Prototypes for same.
24581
24582 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24583
24584         From a suggestion by Bruno Haible.
24585         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24586         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24587         to decide whether to define the BeOS workaround macro;
24588         this adjusts to the change to AC_MBSTATE_T.
24589
24590 2000-07-14  Jim Meyering  <meyering@lucent.com>
24591
24592         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24593         jm_AC_TYPE_UINTMAX_T.
24594
24595 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24596
24597         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24598
24599         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24600         quotearg_buffer_restyled): Add support for
24601         clocale_quoting_style.  Undo previous change to
24602         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24603         and "{RIGHT QUOTATION MARK}" msgids.
24604
24605 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24606
24607         From a suggestion by Bruno Haible.
24608         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24609         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24610         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24611         and mbstate_t, to a single-part test that simply defines mbstate_t.
24612         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24613         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24614
24615 2000-07-10  Jim Meyering  <meyering@lucent.com>
24616
24617         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24618
24619         * m4/gnu-source.m4: Output to confdefs.h directly.
24620         Suggestion from Akim Demaille.
24621
24622 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24623
24624         The old behavior of quoting `like this' doesn't look good with
24625         newer, ISO-style fonts.  See:
24626         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24627
24628         Instead, quote "like this" by default.  Let the translator
24629         tailor the locale-specific quoting behavior by providing
24630         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24631
24632         * lib/quotearg.c (N_): New macro.
24633         (gettext_default): New function.
24634         (quotearg_buffer_restyled): Use
24635         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24636         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24637
24638 2000-07-09  Jim Meyering  <meyering@lucent.com>
24639
24640         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24641         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24642
24643         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24644         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24645
24646 2000-07-09  Jim Meyering  <meyering@lucent.com>
24647
24648         * lib/Most files: Update copyright dates to include 2000.
24649
24650 2000-07-08  Jim Meyering  <meyering@lucent.com>
24651
24652         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24653         if not defined.
24654         (xgethostname): Remove now-unnecessary #ifdef.
24655         Move declaration of `err' into loop where it's used.
24656
24657 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24658         and Bruno Haible  <haible@clisp.cons.org>
24659
24660         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24661         only if the test for an object-type mbstate_t fails.  This
24662         prevents us from mistakenly reporting that mbstate_t is a
24663         system object type after we "#define mbstate_t int" to work
24664         around its lack.
24665
24666 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24667         and Bruno Haible  <haible@clisp.cons.org>
24668
24669         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24670
24671 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24672
24673         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24674         to strerror_r.
24675         Include <ctype.h> for use of isalpha.
24676
24677 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24678
24679         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24680         by allocating a larger buffer. Test the gethostname return value for
24681         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24682         returns an error and ENAMETOOLONG isn't defined.
24683
24684 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24685
24686         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24687         dimension.
24688
24689 2000-07-04  Jim Meyering  <meyering@lucent.com>
24690
24691         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24692         of the deprecated AC_CHECKING.
24693
24694 2000-07-04  Jim Meyering  <meyering@lucent.com>
24695
24696         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24697         Reported by Bruno Haible.
24698
24699 2000-07-04  Jim Meyering  <meyering@lucent.com>
24700
24701         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24702         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24703         lacks mbrtowc.
24704
24705 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24706
24707         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24708         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24709
24710 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24711         and Bruno Haible  <haible@clisp.cons.org>
24712
24713         * lib/quotearg.c (mbrtowc):
24714         Assign to *pwc, and return 1 only if result is nonzero.
24715         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24716
24717 2000-07-03  Jim Meyering  <meyering@lucent.com>
24718
24719         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24720
24721 2000-07-03  Jim Meyering  <meyering@lucent.com>
24722
24723         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24724         This is necessary to get a definition of e.g., UTMP_FILE on
24725         HP-UX 10.20.
24726         From Bob Proulx.
24727
24728 2000-07-02  Jim Meyering  <meyering@lucent.com>
24729
24730         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24731
24732         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24733         AC_LIBOBJ(function_name).
24734         * m4/chown.m4: Likewise.
24735         * m4/fnmatch.m4: Likewise.
24736         * m4/ftruncate.m4: Likewise.
24737         * m4/getgroups.m4: Likewise.
24738         * m4/getline.m4: Likewise.
24739         * m4/group-member.m4: Likewise.
24740         * m4/jm-macros.m4: Likewise.
24741         * m4/lstat.m4: Likewise.
24742         * m4/malloc.m4: Likewise.
24743         * m4/memcmp.m4: Likewise.
24744         * m4/nanosleep.m4: Likewise.
24745         * m4/putenv.m4: Likewise.
24746         * m4/realloc.m4: Likewise.
24747         * m4/regex.m4: Likewise.
24748         * m4/stat.m4: Likewise.
24749         * m4/strftime.m4: Likewise.
24750
24751 2000-07-02  Jim Meyering  <meyering@lucent.com>
24752
24753         * lib/quotearg.c (mbstate_t): Don't define here.
24754
24755 2000-07-02  Jim Meyering  <meyering@lucent.com>
24756
24757         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24758
24759 2000-07-01  Jim Meyering  <meyering@lucent.com>
24760
24761         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24762
24763 2000-07-01  Jim Meyering  <meyering@lucent.com>
24764
24765         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24766         problem.
24767
24768 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24769
24770         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24771         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24772
24773 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24774
24775         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24776         per change in ../m4/ls-mntd-fs.m4.
24777         (read_filesystem_list): Ignore symbolic links.
24778
24779 2000-06-29  Jim Meyering  <meyering@lucent.com>
24780
24781         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24782         for declaration of strcmp.
24783
24784         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24785
24786         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24787         Avoid warning by casting result to `char *' to remove `const'.
24788
24789 2000-06-28  Jim Meyering  <meyering@lucent.com>
24790
24791         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24792         included by quotearg.c, for which we perform this test.  From
24793         Bruno Haible.
24794
24795 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24796
24797         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24798         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24799         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24800
24801 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24802
24803         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24804
24805 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24806
24807         savedir now sets errno on failure and invokes xmalloc to get memory.
24808         Fix a couple of other minor bugs while we're at it.
24809
24810         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24811         (NAMLEN): Remove macro.
24812         (malloc, realloc): Remove decls.
24813         (stpcpy): Likewise.
24814         ("xalloc.h"): Include.
24815         (NAME_SIZE_DEFAULT): New macro.
24816         (savedir): Use xmalloc / xrealloc to allocate memory.
24817         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24818         Skip "" directory entries.
24819         Use strlen to calculate directory entry length, since the old method
24820         is rarely used these days and isn't worth supporting.
24821         Don't use a pointer after freeing it.
24822         Check for integer overflow when calculating allocation size.
24823         Use memcpy to copy entries, instead of stpcpy.
24824         Set errno properly when returning NULL.
24825         Check for readdir error.
24826
24827 2000-06-26  Jim Meyering  <meyering@lucent.com>
24828
24829         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24830
24831 2000-06-25  Jim Meyering  <meyering@lucent.com>
24832
24833         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24834         Linux header bug when _XOPEN_SOURCE is defined to 500.
24835
24836 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24837
24838         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24839         deficiency.
24840
24841 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24842
24843         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24844         Include xalloc.h.
24845         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24846
24847 2000-06-24  Jim Meyering  <meyering@lucent.com>
24848
24849         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24850         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24851         for which strerror does return char*, but which lacks a conveniently
24852         accessible declaration of the function.  If the compile-test says
24853         strerror_r doesn't work, then resort to a `run'-test that works on
24854         BeOS and segfaults on DEC Unix.
24855
24856 2000-06-24  Jim Meyering  <meyering@lucent.com>
24857
24858         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24859
24860 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24861
24862         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24863         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24864
24865 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24866
24867         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24868         (mbrtowc, mbstate_t): Define substitutes if
24869         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24870         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24871         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24872
24873 2000-06-23  Jim Meyering  <meyering@lucent.com>
24874
24875         * m4/afs.m4: Add missing AC_MSG_RESULT.
24876         Reported by Bruno Haible.
24877
24878         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24879         Suggestion from Bruno Haible.
24880
24881 2000-06-23  Jim Meyering  <meyering@lucent.com>
24882
24883         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24884
24885 2000-06-21  Jim Meyering  <meyering@lucent.com>
24886
24887         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24888
24889 2000-06-21  Jim Meyering  <meyering@lucent.com>
24890
24891         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24892         (noinst_HEADERS): Add getstr.h.
24893
24894         * lib/getline.c (getstr): Move into a separate file.
24895         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24896         the following changes: new parameter, delim2; both delim[12]
24897         parameters have type `int', not `char'.  The latter would lose
24898         with 8-bit delimiters.
24899         * lib/getstr.h: New file.
24900
24901 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24902
24903         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24904         than 1024, return a memory chunk of least possible size, instead
24905         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24906         Use free/xmalloc instead of xrealloc to avoid copying for very long
24907         paths.
24908
24909 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24910
24911         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24912         the empty string.
24913
24914 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24915
24916         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24917         address, not strdup.  Include <stdlib.h> and don't declare free().
24918
24919 2000-06-19  Jim Meyering  <meyering@lucent.com>
24920
24921         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24922
24923 2000-06-18  Jim Meyering  <meyering@lucent.com>
24924
24925         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24926
24927         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24928         `checking whether...' message to be consistent with that of the
24929         lstat test.
24930
24931 2000-06-18  Jim Meyering  <meyering@lucent.com>
24932
24933         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24934         Besides, these days every porting target provides a mkdir function.
24935
24936         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24937         needed. (this snippet comes from src/system.h).
24938
24939 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24940
24941         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24942
24943 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24944
24945         * lib/human.c (adjust_value): New function.
24946         (human_readable_inexact): Apply rounding style even when
24947         printing approximate values.
24948
24949 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24950
24951         * lib/human.c (human_readable_inexact): Allow an input block
24952         size that is not a multiple of the output block size, and vice versa.
24953         Reported by Piergiorgio Sartor.
24954
24955 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24956
24957         * lib/getdate.y (get_date): Apply relative times after time
24958         zone indicator, not before.  Reported by Todd A. Jacobs.
24959
24960 2000-06-13  Jim Meyering  <meyering@lucent.com>
24961
24962         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24963
24964         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24965
24966 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24967
24968         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24969
24970 2000-06-12  Jim Meyering  <meyering@lucent.com>
24971
24972         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
24973         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
24974         optional argument.
24975         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
24976         the optional argument, `lib'.
24977
24978 2000-06-08  Jim Meyering  <meyering@lucent.com>
24979
24980         * m4/largefile.m4: Remove file (now that it's part of autoconf).
24981
24982 2000-06-04  Paul Eggert  <eggert@twinsun.com>
24983
24984         Rewrite largefile configuration so that we don't need to run
24985         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
24986         AC_CANONICAL_HOST in configure.in -- jmm]
24987
24988         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
24989         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
24990         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
24991         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
24992         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
24993         All uses changed.
24994         Instead of inspecting the output of getconf, try to compile the
24995         test program without and with the macro definition.
24996         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
24997         for getconf.  Instead, check for the needed flags by compiling
24998         test programs.
24999
25000 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25001
25002         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
25003
25004 2000-06-04  Jim Meyering  <meyering@lucent.com>
25005
25006         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
25007         SunOS 4.1.4 for which gid_t is an unsigned type.
25008
25009 2000-06-03  Jim Meyering  <meyering@lucent.com>
25010
25011         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
25012         now that autoconf requires that.
25013
25014         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
25015         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
25016         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
25017
25018 2000-06-03  Jim Meyering  <meyering@lucent.com>
25019
25020         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
25021
25022 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25023
25024         * m4/glibc21.m4: New file.
25025         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
25026
25027 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25028
25029         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
25030         newer, don't install charset.alias.
25031         * lib/config.charset: Change the Linux/glibc rules so they become empty
25032         on glibc-2.1 or newer.
25033
25034 2000-06-02  Jim Meyering  <meyering@lucent.com>
25035
25036         * lib/mountlist.c: Back out last change.  Instead, do this...
25037         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
25038         me_dummy member using the same `ignore'-testing code.
25039         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
25040         fs_type strings.
25041         From Mark D. Roth.
25042
25043 2000-05-29  Jim Meyering  <meyering@lucent.com>
25044
25045         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
25046         mounts with the `ignore' attribute.  Based on a patch from
25047         Mark D. Roth.
25048
25049 2000-05-28  Jim Meyering  <meyering@lucent.com>
25050
25051         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
25052         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25053         * m4/stat.m4: Likewise.
25054         * m4/lstat.m4: Likewise.
25055         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
25056
25057         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
25058         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
25059
25060 2000-05-26  Jim Meyering  <meyering@lucent.com>
25061
25062         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
25063
25064 2000-05-24  Jim Meyering  <meyering@lucent.com>
25065
25066         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
25067         autoconf requires that.
25068         * m4/lib-check.m4: Likewise.
25069         * m4/jm-macros.m4: Likewise.
25070         * m4/strftime.m4: Likewise.
25071
25072         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
25073         AC_CHECK_DECLS, now that autoconf requires that.
25074
25075 2000-05-22  Jim Meyering  <meyering@lucent.com>
25076
25077         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25078         * m4/lstat.m4: Likewise.
25079
25080 2000-05-22  Jim Meyering  <meyering@lucent.com>
25081
25082         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
25083
25084 2000-05-20  Jim Meyering  <meyering@lucent.com>
25085
25086         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
25087         (jm_PREREQ): Use it.
25088
25089 2000-05-18  Jim Meyering  <meyering@lucent.com>
25090
25091         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
25092         back, too, since it may have been modified by allocate_entry.
25093         (hash_delete): Rewrite to use neither the assignment operator
25094         nor the comma operator in an if-expression.
25095
25096 2000-05-15  Paul Eggert  <eggert@twinsun.com>
25097
25098         * lib/closeout.c:
25099         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
25100         Remove; no longer needed.
25101         "quotearg.h": Add include.
25102         (file_name): Do not bother to explicitly initialize to NULL; it's less
25103         efficient on some hosts.
25104         (close_stdout_status): Remove test as to whether stdout was already
25105         closed; it breaks for the case "echo x | sort >&-".
25106         Quote file name colons.
25107         Do not assume that _("write error") lacks format strings.
25108
25109 2000-05-15  Jim Meyering  <meyering@lucent.com>
25110
25111         * lib/version-etc.c (version_etc_copyright): Update the copyright
25112         string used in all --version output.
25113
25114 2000-05-14  Jim Meyering  <meyering@lucent.com>
25115
25116         * lib/closeout.c (close_stdout_set_file_name): New function.
25117         (close_stdout_status): Use new file-scoped global.
25118         Return right away if fstat says the stdout file descriptor is invalid.
25119         * lib/closeout.h (close_stdout_set_file_name): Declare.
25120
25121 2000-05-10  Jim Meyering  <meyering@lucent.com>
25122
25123         * lib/closeout.c [default_exit_status]: New file-scoped variable.
25124         (close_stdout_set_status): New function.
25125         * lib/closeout.h (close_stdout_set_status): Declare.
25126
25127 2000-05-09  Jim Meyering  <meyering@lucent.com>
25128
25129         * m4/gettext.m4: Rename this...
25130         * m4/libintl.m4: ...to this.
25131
25132 2000-05-08  Jim Meyering  <meyering@lucent.com>
25133
25134         * lib/long-options.c: Don't include closeout.h.
25135         (parse_long_options): Don't call close_stdout for --version.
25136
25137 2000-05-06  Paul Eggert  <eggert@twinsun.com>
25138
25139         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
25140         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
25141         2.1.3 bug.  This avoids a clash when files like regex.c define
25142         _GNU_SOURCE.
25143
25144 2000-05-06  Jim Meyering  <meyering@lucent.com>
25145
25146         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25147         (AC_REPLACE_FUNCS): Add strnlen.
25148
25149         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25150         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25151
25152         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25153         AC_SEARCH_LIBS call for nanosleep.
25154         (LIB_NANOSLEEP): Set and AC_SUBST.
25155
25156 2000-05-06  Jim Meyering  <meyering@lucent.com>
25157
25158         * lib/strnlen.c: Undefine __strnlen and strnlen.
25159         [!weak_alias]: Define __strnlen to strnlen.
25160
25161         * lib/atexit.c: New file, from libiberty.
25162
25163 2000-05-06  Jim Meyering  <meyering@lucent.com>
25164
25165         * lib/closeout.c (close_stdout_status): Also check for errors on the
25166         stderr stream.
25167
25168 2000-05-05  Jim Meyering  <meyering@lucent.com>
25169
25170         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25171         AC_SEARCH_LIBS call for clock_gettime.
25172         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25173
25174         * m4/search-libs.m4: Update from autoconf.
25175
25176         su doesn't work on Solaris 2.6.
25177         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25178         <shadow.h>.  Reported by Dragos Harabor.
25179
25180 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25181
25182         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25183         memcpy instead of xmalloc, xrealloc, path_concat.
25184         (locale_charset): Treat empty environment variables as absent.
25185         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25186
25187 2000-05-04  Jim Meyering  <meyering@lucent.com>
25188
25189         * lib/getopt.c: Update from glibc.
25190         * lib/obstack.c: Likewise.
25191         * lib/obstack.h: Likewise.
25192         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25193         file
25194
25195         * lib/regex.h: Likewise.
25196         * lib/strndup.c: Likewise.
25197         * lib/strnlen.c: New file, from glibc.
25198
25199 2000-05-03  Jim Meyering  <meyering@lucent.com>
25200
25201         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25202
25203 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25204
25205         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25206         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25207         compile-time test, rather than inspecting host and OS, to
25208         decide whether to define _LARGEFILE_SOURCE.
25209
25210 2000-05-01  Jim Meyering  <meyering@lucent.com>
25211
25212         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25213
25214         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25215         Based on a patch from Bruno Haible.
25216
25217 2000-05-01  Jim Meyering  <meyering@lucent.com>
25218
25219         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25220
25221 2000-04-29  Jim Meyering  <meyering@lucent.com>
25222
25223         * lib/path-concat.c: Declare strdup only if it's not defined.
25224         * lib/canon-host.c: Likewise.
25225
25226 2000-04-28  Jim Meyering  <meyering@lucent.com>
25227
25228         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25229         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25230         is included first, then limits.h is included by locale.h by libintl.h.
25231         From John David Anglin.
25232
25233 2000-04-25  Jim Meyering  <meyering@lucent.com>
25234
25235         * lib/makepath.c (S_IRWXUGO): Define.
25236         (make_path): Always perform explicit chmod if MODE specifies any
25237         of the `special' permission bits.  Prompted by a bug report against
25238         install from Mate Wierdl and Joost van Baal.
25239
25240 2000-04-18  Jim Meyering  <meyering@lucent.com>
25241
25242         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25243         (jm_PREREQ): Use it.
25244
25245 2000-04-18  Jim Meyering  <meyering@lucent.com>
25246
25247         * lib/README: New file.
25248
25249         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25250         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25251
25252 2000-04-17  Jim Meyering  <meyering@lucent.com>
25253
25254         Get it right :-)
25255         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25256         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25257         Suggestion from Akim Demaille.
25258
25259 2000-04-17  Jim Meyering  <meyering@lucent.com>
25260
25261         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25262         the definition of it to rpl_strftime also defined-away the system's
25263         declaration.
25264
25265 2000-04-15  Jim Meyering  <meyering@lucent.com>
25266
25267         Use `C' to denote so-called `contiguous' files, the same way
25268         that tar does.
25269         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25270         (ftypelet): Use S_ISCTG.
25271         From Michael Deutschmann.
25272
25273 2000-04-14  Jim Meyering  <meyering@lucent.com>
25274
25275         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25276         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25277         clobbered.
25278
25279 2000-04-14  Jim Meyering  <meyering@lucent.com>
25280
25281         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25282
25283 2000-04-13  Jim Meyering  <meyering@lucent.com>
25284
25285         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25286         AH_VERBATIM to insert required #ifndef into config.h.in.
25287         Suggestion from Akim Demaille.
25288
25289 2000-04-12  Jim Meyering  <meyering@lucent.com>
25290
25291         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25292         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25293         Christian Krackowizer.
25294
25295         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25296         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25297         (AC_SYS_LARGEFILE): Require.
25298         (AM_C_PROTOTYPES): Require.
25299
25300 2000-04-08  Jim Meyering  <meyering@lucent.com>
25301
25302         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25303         names don't conflict.  Reported by Eli Zaretskii.
25304
25305 2000-04-07  Jim Meyering  <meyering@lucent.com>
25306
25307         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25308         sys/types.h, to work around system header problems on AIX 3.2.5.
25309         From Bruno Haible.
25310
25311 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25312
25313         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25314         bug.  Deal with the different error behavior of Irix iconv.
25315
25316 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25317
25318         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25319         IRIX if the installer said otherwise.
25320
25321 2000-04-05  Jim Meyering  <meyering@lucent.com>
25322
25323         Portability tweaks required for ultrix4.3.
25324         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25325         (jm_CHECK_DECLS): Add getutent to the list of functions.
25326         (_jm_DECL_HEADERS): Add utmpx.h.
25327         From John David Anglin.
25328
25329         * m4/strftime.m4: Back out the 2000-04-02 change.
25330         Instead of that change, simply undefine putenv in the test program.
25331
25332 2000-04-05  Jim Meyering  <meyering@lucent.com>
25333
25334         Portability tweaks required for ultrix4.3.
25335         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25336         getutent.
25337         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25338         * lib/canon-host.c: Declare strdup.
25339         * lib/path-concat.c: Likewise.
25340         From John David Anglin.
25341
25342 2000-04-04  Jim Meyering  <meyering@lucent.com>
25343
25344         Be more DOS 8.3-friendly.
25345         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25346         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25347         * lib/Makefile.am: Reflect renaming.
25348         Reported by Eli Zaretskii.
25349
25350         Use a temporary file name that won't clash with `charset.alias'
25351         in the DOS 8.3 name space.
25352         * lib/Makefile.am (charset_tmp): Define.
25353         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25354         (uninstall-local): Likewise.
25355         Reported by Eli Zaretskii.
25356
25357 2000-04-03  Jim Meyering  <meyering@lucent.com>
25358
25359         * m4/gettext.m4: Fix typo in comment.
25360
25361         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25362         textutils/configure.in).  Suggestion from Paul Eggert.
25363         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25364
25365 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25366
25367         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25368         variable in the shell rather than using putenv, which isn't
25369         portable.  This avoids the configure-time inter-test dependency
25370         on the potentially-renamed putenv function.
25371
25372 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25373
25374         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25375         before checking struct stat.st_blksize, so that
25376         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25377
25378 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25379
25380         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25381         since strftime.c uses HAVE_STRFTIME to decide whether to use
25382         the underlying strftime.
25383
25384 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25385
25386         * lib/time/strftime.c (my_strftime): Make sure we call the system
25387         strftime, not ourselves, when invoking the underlying strftime.
25388
25389 2000-03-24  Jim Meyering  <meyering@lucent.com>
25390
25391         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25392         (charset_alias): Define.
25393         (install-exec-local): Factor out common code.
25394         (uninstall-local): Split lines longer than 80.
25395         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25396         (SUFFIXES): Define.
25397         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25398         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25399
25400 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25401
25402         * lib/config.charset: Output a line containing "Packages using this
25403         file".
25404         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25405         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25406         ref-del.sed): New rules.
25407
25408 2000-03-17  Jim Meyering  <meyering@lucent.com>
25409
25410         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25411         Otherwise, include <strings.h>
25412
25413 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25414
25415         * lib/unicodeio.c (utf8_wctomb): New function.
25416         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25417         format instead of in UCS-4 with platform dependent endianness.
25418
25419 2000-03-10  Jim Meyering  <meyering@lucent.com>
25420
25421         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25422         From Marco Franzen.
25423
25424 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25425
25426         * lib/savedir.c (savedir): Work even if directory size is
25427         negative; this can happen with some screwy NFS configurations.
25428
25429 2000-03-06  Jim Meyering  <meyering@lucent.com>
25430
25431         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25432         if it's NULL (because we ran out of memory).  From Bruno Haible.
25433
25434 2000-03-05  Jim Meyering  <meyering@lucent.com>
25435
25436         * lib/localcharset.c ("path-concat.h"): Include.
25437         (get_charset_aliases): Use path_concat instead of ANSI string
25438         concatenation.
25439
25440         * lib/unicodeio.h (PARAMS): Define.
25441         Use it to guard prototype.
25442
25443 2000-03-04  Jim Meyering  <meyering@lucent.com>
25444
25445         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25446         for lib/localcharset.c.
25447
25448 2000-03-04  Jim Meyering  <meyering@lucent.com>
25449
25450         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25451         installing into it.
25452         (uninstall-local): Uncomment this rule so `make distcheck' works
25453         once again.
25454
25455         * lib/unicodeio.c (<errno.h>): Include it.
25456         (errno): Declare if not defined.
25457
25458         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25459
25460         * lib/config.charset: New version, incorporating remarks from a linux
25461         i18n mailing list.  From Bruno Haible.
25462
25463 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25464
25465         * m4/codeset.m4: New file.
25466         * m4/iconv.m4: New file.
25467         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25468
25469 2000-03-03  Jim Meyering  <meyering@lucent.com>
25470
25471         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25472
25473 2000-03-02  Jim Meyering  <meyering@lucent.com>
25474
25475         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25476         the messages come out on separate lines.
25477
25478         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25479         rather than jm_CHECK_DECLARATIONS.
25480         * m4/decl.m4: Remove now-unused file.
25481
25482         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25483         geteuid.
25484
25485 2000-03-02  Jim Meyering  <meyering@lucent.com>
25486
25487         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25488
25489 2000-03-01  Jim Meyering  <meyering@lucent.com>
25490
25491         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25492         * lib/unicodeio.c: Likewise.
25493
25494 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25495
25496         * lib/config.charset: New file.
25497         * lib/localcharset.c: New file.
25498         * lib/unicodeio.h, lib/unicodeio.c: New files.
25499         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25500         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25501         (noinst_HEADERS): Add unicodeio.h.
25502         (all-local, install-exec-local, charset.alias): New targets.
25503
25504 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25505
25506         * lib/quotearg.c (ALERT_CHAR): New macro.
25507         (quotearg_buffer_restyled): Use it.
25508
25509 2000-02-27  Jim Meyering  <meyering@lucent.com>
25510
25511         * m4/check-decl.m4: Add getenv to the list.
25512
25513 2000-02-27  Jim Meyering  <meyering@lucent.com>
25514
25515         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25516         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25517
25518         * lib/backupfile.c: Guard inclusion of stdlib.h with
25519         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25520         Declare malloc if needed.
25521
25522         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25523         `#ifndef HAVE_DECL..'
25524         now that autoconf always defines the HAVE_DECL_ symbols.
25525         * lib/human.c: Likewise.
25526         * lib/same.c: Likewise.
25527         * lib/strtoumax.c: Likewise.
25528
25529         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25530         declaration check was not run.
25531         * lib/hash.c: Likewise.
25532         * lib/human.c: Likewise.
25533         * lib/same.c: Likewise.
25534         * lib/strtoumax.c: Likewise.
25535
25536         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25537         `.', then first look up the entire `.'-containing string as a login
25538         name.
25539
25540 2000-02-23  Jim Meyering  <meyering@lucent.com>
25541
25542         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25543         in place of my hack.
25544
25545 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25546
25547         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25548         (textint): New typedef.
25549         (parser_control): Member year changed from int to textint.
25550         All uses changed.
25551         (YYSTYPE): Removed; replaced by %union with int and textint members.
25552         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25553         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25554         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25555         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25556         (date, number, to_year): Use width of number in digits, not its value,
25557         to determine whether it's a 2-digit year, or a 2-digit time.
25558         (yylex): Store number of digits of numeric tokens.
25559         Reported by John Kendall.
25560
25561         (parser_control): Changed from struct parser_control to typedef (for
25562         consistency).  All uses changed.
25563
25564         (tID): Removed; not used.
25565         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25566
25567 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25568
25569         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25570         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25571
25572 2000-02-12  Jim Meyering  <meyering@lucent.com>
25573
25574         * lib/userspec.c (ISDIGIT): Define it.
25575         (isdigit): Remove definition.
25576         (is_number): Use ISDIGIT, not isdigit.
25577         <libintl.h>: Include.
25578         (_ and N_): Define.
25579         (parse_user_spec): Mark translatable strings.
25580
25581 2000-02-10  Jim Meyering  <meyering@lucent.com>
25582
25583         With these changes, nanosleep.[ch] are finally enough like the other
25584         lib/* replacement files to compile on a few more losing systems.
25585
25586         * lib/nanosleep.h: Don't include config.h.
25587         Remove prototype from declaration of nanosleep.
25588         (PARAMS): Remove now-unneeded definition.
25589         * lib/nanosleep.c: #undef nanosleep.
25590         (rpl_nanosleep): Rename from nanosleep.
25591
25592 2000-02-10  Jim Meyering  <meyering@lucent.com>
25593
25594         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25595         gnu_nanosleep to rpl_nanosleep.
25596
25597 2000-02-09  Jim Meyering  <meyering@lucent.com>
25598
25599         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25600         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25601
25602 2000-02-08  Akim Demaille  <akim@epita.fr>
25603
25604         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25605         `[' and `]' and remove uses of `changequote'.
25606         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25607         (AC_SYS_LARGEFILE): Likewise.
25608         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25609         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25610         of changequote.
25611         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25612         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25613         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25614         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25615
25616 2000-02-05  Jim Meyering  <meyering@lucent.com>
25617
25618         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25619         Remove explicit use of AC_HEADER_TIME.  It is required by
25620         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25621         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25622         in autoconf whereby the expansion of the latter ended up preceding
25623         the expansion of its prerequisite, AC_HEADER_TIME.
25624         Reported by Volker Borchert.
25625
25626 2000-02-03  Jim Meyering  <meyering@lucent.com>
25627
25628         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25629
25630 2000-02-03  Jim Meyering  <meyering@lucent.com>
25631
25632         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25633         rather than with `#if HAVE_UTMPNAME'.
25634
25635 2000-02-02  Jim Meyering  <meyering@lucent.com>
25636
25637         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25638         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25639         Reported by Eli Zaretskii.
25640
25641 2000-02-01  Jim Meyering  <meyering@lucent.com>
25642
25643         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25644
25645 2000-01-31  Jim Meyering  <meyering@lucent.com>
25646
25647         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25648         functions.  Add the time.h and sys/time.h headers along with the
25649         AC_REQUIRE'ment of AC_HEADER_TIME.
25650
25651 2000-01-31  Jim Meyering  <meyering@lucent.com>
25652
25653         * lib/nanosleep.h (nanosleep): Guard declaration with
25654         `#if ! HAVE_DECL_NANOSLEEP'.
25655         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25656         the declaration in that vendor's sys/timers.h.
25657         Reported by Christian Krackowizer.
25658
25659         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25660         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25661         (ISPRINT): Likewise.
25662         Reported by Tom Tromey.
25663
25664 2000-01-30  Jim Meyering  <meyering@lucent.com>
25665
25666         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25667
25668         * m4/prereq.m4 (utmp_includes): Define.
25669         Check for ut_user and ut_name members in both struct utmpx
25670         and struct utmp.
25671
25672 2000-01-30  Jim Meyering  <meyering@lucent.com>
25673
25674         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25675         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25676         header files where only utmpx.ut_user is declared.
25677
25678         * lib/readutmp.h (UT_USER): Define.
25679
25680 2000-01-29  Jim Meyering  <meyering@lucent.com>
25681
25682         * m4/lib-check.m4: New file containing library-related checks from
25683         fileutils and sh-utils (textutils had none).
25684
25685 2000-01-28  Jim Meyering  <meyering@lucent.com>
25686
25687         * m4/perl.m4: Change format of warning message to look more like that
25688         from the missing script.  Suggestion from François Pinard.
25689
25690 2000-01-25  Jim Meyering  <meyering@lucent.com>
25691
25692         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25693         well as time.h in the compile check.
25694         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25695         Fix typo in cross-compiling case: s/yes/no/.
25696
25697 2000-01-23  Jim Meyering  <meyering@lucent.com>
25698
25699         * m4/jm-macros.m4: Move df-related tests here from
25700         fileutils/configure.in
25701
25702         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25703         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25704
25705         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25706         s/space/ac_fsusage_space/.
25707         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25708
25709         * m4/ftruncate.m4: New file (derived from part of
25710         fileutils/configure.in).
25711         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25712         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25713
25714         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25715         AC_SUBST these here, rather than just in sh-util/configure.in, so
25716         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25717         all the same.
25718         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25719         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25720         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25721         (AC_SUBST(POW_LIBM)): Likewise.
25722         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25723
25724 2000-01-23  Jim Meyering  <meyering@lucent.com>
25725
25726         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25727         obstack.c.
25728
25729 2000-01-22  Jim Meyering  <meyering@lucent.com>
25730
25731         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25732
25733         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25734
25735         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25736         configure.in
25737         (AC_CHECK_HEADERS): Likewise for sh-utils.
25738         (AC_CHECK_HEADERS): Likewise for textutils.
25739         Merge the three lists of headers.
25740
25741         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25742         from fileutils' configure.in.
25743
25744         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25745         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25746         check-decl.m4.
25747
25748         * m4/check-decl.m4: Use #if rather than #ifdef.
25749         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25750         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25751         (_jm_DECL_HEADERS): Define new function.
25752         (jm_CHECK_DECLARATIONS): Require it.
25753
25754 2000-01-22  Jim Meyering  <meyering@lucent.com>
25755
25756         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25757         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25758         Required for some AIX systems.  Reported by Christian Krackowizer.
25759         [TESTING] (main): New function.
25760
25761         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25762         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25763         letters.
25764
25765         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25766         iswprint.
25767
25768         * lib/strverscmp.c (ISDIGIT): Define.
25769         (strverscmp): Use ISDIGIT, not isdigit.
25770
25771 2000-01-19  Jim Meyering  <meyering@lucent.com>
25772
25773         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25774         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25775         defines `struct timespec' in <sys/time.h>
25776
25777         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25778         Thanks to Akim for explaining.
25779
25780 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25781
25782         * lib/nanosleep.c (nanosleep):
25783         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25784         POSIX.1 doesn't require SA_INTERRUPT and some systems
25785         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25786         it's been part of POSIX.1 since day 1 (in 1988).
25787
25788 2000-01-17  Jim Meyering  <meyering@lucent.com>
25789
25790         * lib/interlock: Remove unused file.  Reported by François Pinard.
25791
25792 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25793
25794         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25795         alert, backslash, formfeed, and vertical tab unnecessarily in
25796         shell quoting style.
25797
25798 2000-01-16  Jim Meyering  <meyering@lucent.com>
25799
25800         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25801         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25802         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25803         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25804
25805 2000-01-16  Jim Meyering  <meyering@lucent.com>
25806
25807         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25808         because the latter didn't work.
25809
25810 2000-01-15  Jim Meyering  <meyering@lucent.com>
25811
25812         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25813         (AC_REPLACE_FUNCS): Add memcpy and memset.
25814         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25815         Add strpbrk.
25816         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25817
25818 2000-01-12  Jim Meyering  <meyering@lucent.com>
25819
25820         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25821         (jm_PREREQ): Use it.
25822         (jm_PREREQ_READUTMP): New macro.
25823         (jm_PREREQ): Use it.
25824
25825 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25826
25827         Quote multibyte characters correctly.
25828         * m4/c-bs-a.m4: New file.
25829         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25830         (jm_PREREQ): Use it.
25831
25832 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25833
25834         * m4/uintmax_t.m4: Port to autoconf 2.13.
25835
25836 2000-01-08  Jim Meyering  <meyering@ascend.com>
25837
25838         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25839         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25840
25841 2000-01-04  Jim Meyering  <meyering@ascend.com>
25842
25843         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25844         jm_STRUCT_DIRENT_D_TYPE.
25845         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25846         jm_STRUCT_DIRENT_D_INO.
25847         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25848         jm_STRUCT_UTIMBUF.
25849         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25850         renamings.
25851         * m4/utime.m4: Likewise.
25852
25853         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25854         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25855
25856 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25857
25858         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25859         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25860
25861 2000-01-02  Jim Meyering  <meyering@ascend.com>
25862
25863         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25864         remember if this is necessary.
25865
25866 1999-12-26  Jim Meyering  <meyering@ascend.com>
25867
25868         * m4/jm-macros.m4: Use it here.
25869         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25870
25871 1999-12-23  Jim Meyering  <meyering@ascend.com>
25872
25873         * m4/jm-macros.m4: Check for clock_gettime (moved from
25874         fileutils/configure.in)
25875         Check for gettimeofday.
25876
25877 1999-12-20  Jim Meyering  <meyering@ascend.com>
25878
25879         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25880         autoconf-2.14a-1999-12-20.
25881
25882 1999-12-19  Jim Meyering  <meyering@ascend.com>
25883
25884         * m4/lstat-slash.m4: New file.
25885         * m4/jm-macros.m4: Use the new macro:
25886         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25887
25888 1999-12-07  Jim Meyering  <meyering@ascend.com>
25889
25890         * m4/perl.m4: Require that File::Compare be available, too.
25891         Too many systems seem to lack it.
25892
25893         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25894         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25895
25896 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25897
25898         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25899         problem with the QNX 4.25 shell, which doesn't propagate exit
25900         status of failed commands inside shell assignments.
25901
25902 1999-11-17  Jim Meyering  <meyering@ascend.com>
25903
25904         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25905
25906 1999-11-07  Jim Meyering  <meyering@ascend.com>
25907
25908         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25909
25910 1999-11-06  Jim Meyering  <meyering@ascend.com>
25911
25912         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25913         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25914
25915 1999-11-05  Jim Meyering  <meyering@ascend.com>
25916
25917         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25918         configure.in of textutils, fileutils, and sh-utils into this one
25919         (shared between those packages) file.
25920         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25921         AC_STRUCT_ST_BLKSIZE.
25922
25923 1999-11-03  Jim Meyering  <meyering@ascend.com>
25924
25925         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25926         of AC_CHECK_TYPE checks includes unistd.h.
25927         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25928         Suggestion from Akim Demaille.
25929
25930 1999-10-30  Jim Meyering  <meyering@ascend.com>
25931
25932         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25933         m4-quoted string.
25934         * m4/ls-mntd-fs.m4: Likewise.
25935         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25936         * m4/jm-winsz1.m4: Likewise.
25937
25938         * m4/const.m4: Remove file, since the fix made it into the experimental
25939         version of autoconf.
25940         * m4/mktime.m4: Likewise.
25941
25942         * m4/check-type.m4: Remove file, now that the latest version of
25943         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25944
25945         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25946         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25947         AC_CHECK_TYPE.
25948
25949 1999-10-04  Jim Meyering  <meyering@ascend.com>
25950
25951         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25952
25953 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25954
25955         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25956         2.95.1 bug with HP-UX 10.20.
25957
25958 1999-09-17  Jim Meyering  <meyering@ascend.com>
25959
25960         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25961         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25962         due to missing strdup (against sh-utils-2.0).
25963
25964 1999-08-29  Jim Meyering  <meyering@ascend.com>
25965
25966         * m4/jm-macros.m4: Require jm_BISON.
25967         * m4/bison.m4: New file.
25968
25969 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25970
25971         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25972         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
25973
25974 1999-08-05  Jim Meyering  <meyering@ascend.com>
25975
25976         * m4/getline.m4: Rename test file from conftestdata to conftest.data
25977         to avoid conflicts with `conftest' on 8+3 filesystems.
25978         Suggestion from Eli Zaretskii.
25979
25980 1999-08-04  Jim Meyering  <meyering@ascend.com>
25981
25982         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
25983         fileutils and sh-utils (textutils's getline test was inadequate).
25984         (AM_FUNC_GETLINE): Run this test.
25985         (AC_CHECK_FUNCS): Check for getdelim.
25986         Reported by Bob Proulx.
25987
25988 1999-08-02  Jim Meyering  <meyering@ascend.com>
25989
25990         * m4/jm-macros.m4: Add a comment.
25991
25992 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25993
25994         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
25995         <inttypes.h> defines strtoumax as a macro (and not as a
25996         function).
25997
25998 1999-08-01  Paul Eggert  <eggert@twinsun.com>
25999
26000         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
26001         that we can shift, multiply and divide unsigned long long
26002         values; Ultrix cc can't do it.
26003
26004 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26005
26006         * m4/mktime.m4: New file, which is a preview of what should appear
26007         in the next public autoconf release.
26008
26009 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26010
26011         * m4/lfs.m4: Remove this file.
26012         * m4/largefile.m4: New file.  It contains the old contents of
26013         lfs.m4, except that all names with prefix AC_LFS have been
26014         changed to use the prefix AC_SYS_LARGEFILE instead, to be
26015         compatible with future autoconf versions.  Also, some minor m4
26016         quoting problems have been fixed.
26017
26018 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26019
26020         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
26021         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
26022         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
26023         and simplify the shell code.
26024
26025 1999-08-01  Jim Meyering  <meyering@ascend.com>
26026
26027         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
26028         m4.
26029
26030 1999-07-20  Jim Meyering  <meyering@ascend.com>
26031
26032         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
26033
26034 1999-07-15  Jim Meyering  <meyering@ascend.com>
26035
26036         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
26037
26038 1999-05-22  Jim Meyering  <meyering@ascend.com>
26039
26040         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
26041
26042 1999-05-20  Jim Meyering  <meyering@ascend.com>
26043
26044         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
26045         Add a colon after each `then' in case $4 is empty.
26046
26047 1999-05-16  Jim Meyering  <meyering@ascend.com>
26048
26049         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
26050
26051 1999-05-10  Jim Meyering  <meyering@ascend.com>
26052
26053         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
26054
26055         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
26056         AC_FUNC_MKTIME.
26057
26058 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
26059
26060         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
26061
26062 1999-05-04  Paul Eggert  <eggert@twinsun.com>
26063
26064         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
26065         not CPPFLAGS, so that linking works correctly in IRIX.
26066
26067 1999-04-30  Paul Eggert  <eggert@twinsun.com>
26068
26069         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
26070
26071 1999-04-20  Paul Eggert  <eggert@twinsun.com>
26072
26073         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
26074         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
26075         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
26076         jm_AC_TYPE_UNSIGNED_LONG_LONG.
26077         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
26078
26079         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
26080
26081 1999-04-20  Jim Meyering  <meyering@ascend.com>
26082
26083         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
26084         AC_REPLACE xstroull if necessary.  From Paul Eggert.
26085         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
26086
26087 1999-04-18  Jim Meyering  <meyering@ascend.com>
26088
26089         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
26090         * m4/jm-macros.m4: Use it.
26091
26092 1999-04-06  Jim Meyering  <meyering@ascend.com>
26093
26094         * m4/strftime.m4: Remove test for %f.
26095
26096 1999-03-29  Jim Meyering  <meyering@ascend.com>
26097
26098         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
26099         superset of the AC_TYPE_* checks in the textutils, fileutils,
26100         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
26101         AC_TYPE_PID_T.
26102
26103 1999-03-28  Jim Meyering  <meyering@ascend.com>
26104
26105         * m4/jm-macros.m4: Define GNU_PACKAGE here.
26106         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
26107         replaced e.g., in the *.sh files of the sh-utils.
26108
26109 1999-03-20  Jim Meyering  <meyering@ascend.com>
26110
26111         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
26112         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
26113         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
26114
26115 1999-03-19  Jim Meyering  <meyering@ascend.com>
26116
26117         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
26118
26119 1999-03-12  Jim Meyering  <meyering@ascend.com>
26120
26121         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
26122
26123 1999-03-07  Jim Meyering  <meyering@ascend.com>
26124
26125         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
26126         declared.
26127
26128 1999-02-17  Jim Meyering  <meyering@ascend.com>
26129
26130         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
26131         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
26132
26133 1999-02-07  Jim Meyering  <meyering@ascend.com>
26134
26135         * m4/group-member.m4: New file -- extracted from sh-utils'
26136         configure.in.
26137
26138         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
26139         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
26140
26141 1999-02-06  Jim Meyering  <meyering@ascend.com>
26142
26143         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26144         * m4/fnmatch.m4: Likewise.
26145         * m4/getgroups.m4: Likewise.
26146         * m4/lstat.m4: Likewise.
26147         * m4/malloc.m4: Likewise.
26148         * m4/putenv.m4: Likewise.
26149         * m4/realloc.m4: Likewise.
26150         * m4/regex.m4: Likewise.
26151         * m4/stat.m4: Likewise.
26152         * m4/strftime.m4: Likewise.
26153         Suggestion from Alain Magloire.
26154
26155         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26156         * m4/fnmatch.m4: Likewise.
26157         * m4/getgroups.m4: Likewise.
26158         * m4/getline.m4: Likewise.
26159         * m4/lstat.m4: Likewise.
26160         * m4/malloc.m4: Likewise.
26161         * m4/memcmp.m4: Likewise.
26162         * m4/putenv.m4: Likewise.
26163         * m4/realloc.m4: Likewise.
26164         * m4/regex.m4: Likewise.
26165         * m4/stat.m4: Likewise.
26166         * m4/strftime.m4: Likewise.
26167         Suggestion from Alain Magloire.
26168
26169         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26170         an argument.
26171
26172         * m4/regex.m4: Add a run-time Test for proper operation of
26173         re_compile_pattern.
26174
26175 1999-01-31  Jim Meyering  <meyering@ascend.com>
26176
26177         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26178
26179 1999-01-30  Jim Meyering  <meyering@ascend.com>
26180
26181         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26182
26183         * m4/jm-mktime.m4: Make this a wrapper around the official
26184         AM_FUNC_MKTIME rather than my private copy, now that the official one
26185         is up to date.
26186         * m4/mktime.m4: Remove file.
26187
26188         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26189         * m4/uptime.m4: Likewise.
26190         * m4/uintmax_t.m4: Likewise.
26191
26192 1999-01-28  Jim Meyering  <meyering@ascend.com>
26193
26194         * m4/jm-macros.m4: Use jm_AFS.
26195         * m4/afs.m4: New file (from fileutils' configure.in).
26196
26197         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26198         * m4/chown.m4: Likewise.
26199         * m4/d-ino.m4: Likewise.
26200         * m4/d-type.m4: Likewise.
26201         * m4/fnmatch.m4: Likewise.
26202         * m4/getgroups.m4: Likewise.
26203         * m4/gettext.m4: Likewise.
26204         * m4/jm-mktime.m4: Likewise.
26205         * m4/jm-winsz2.m4: Likewise.
26206         * m4/lcmessage.m4: Likewise.
26207         * m4/ls-mntd-fs.m4: Likewise.
26208         * m4/malloc.m4: Likewise.
26209         * m4/memcmp.m4: Likewise.
26210         * m4/putenv.m4: Likewise.
26211         * m4/realloc.m4: Likewise.
26212         * m4/st_mtim.m4: Likewise.
26213         * m4/strftime.m4: Likewise.
26214
26215 1999-01-16  Jim Meyering  <meyering@ascend.com>
26216
26217         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26218         (ARGMATCH_DIE_DECL): Define.
26219
26220 1999-01-12  Jim Meyering  <meyering@ascend.com>
26221
26222         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26223         Reported by Lars Hecking.
26224
26225 1999-01-10  Jim Meyering  <meyering@ascend.com>
26226
26227         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26228         gross kludge.
26229         * m4/inttypes_h.m4: Likewise.
26230         * m4/lstat.m4: Likewise.
26231         * m4/malloc.m4: Likewise.
26232         * m4/readdir.m4: Likewise.
26233         * m4/realloc.m4: Likewise.
26234         * m4/st_dm_mode.m4: Likewise.
26235         * m4/stat.m4: Likewise.
26236         * m4/utimbuf.m4: Likewise.
26237         * m4/utimes.m4: Likewise.
26238
26239         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26240         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26241         comments in config.h.in are meaningful.
26242
26243         * m4/jm-macros.m4: Require autoconf-2.13 here.
26244
26245         * m4/regex.m4: By default, don't use the included regex.c on systems
26246         with glibc 2.  Suggestion from Uli Drepper.
26247
26248 1999-01-02  Jim Meyering  <meyering@ascend.com>
26249
26250         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26251
26252 1998-12-18  Jim Meyering  <meyering@ascend.com>
26253
26254         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26255         Based on a suggestion from Lars Hecking.
26256
26257 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26258
26259         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26260
26261 1998-11-16  Jim Meyering  <meyering@ascend.com>
26262
26263         * m4/lfs.m4: Double-quote the `uname...` expression.
26264
26265 1998-11-14  Jim Meyering  <meyering@ascend.com>
26266
26267         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26268         * m4/stat.m4: Likewise.
26269
26270 1998-11-03  Jim Meyering  <meyering@ascend.com>
26271
26272         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26273         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26274
26275 1998-10-18  Jim Meyering  <meyering@ascend.com>
26276
26277         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26278
26279 1998-10-17  Jim Meyering  <meyering@ascend.com>
26280
26281         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26282         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26283         calls for those previously hard-coded headers.  Instead, take a new
26284         parameter.
26285         (jm_CHECK_DECLARATIONS): Reflect interface change.
26286         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26287         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26288
26289         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26290
26291 1998-10-14  Jim Meyering  <meyering@ascend.com>
26292
26293         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26294         instead of "TZ=America/Vancouver".  From Paul Eggert.
26295
26296 1998-10-11  Jim Meyering  <meyering@ascend.com>
26297
26298         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26299         This adds a test for a recently added compatibility fix for mktime.c.
26300         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26301
26302 1998-09-27  Jim Meyering  <meyering@ascend.com>
26303
26304         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26305
26306         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26307         ../configure.in, including a change from Gordon Matzigkeit to allow
26308         cross-compiling for the Hurd.
26309
26310         * m4/glibc.m4: New file/macro to test for the GNU C Library
26311         versions 1 and 2.  From Gordon Matzigkeit.
26312         Indent.
26313
26314 1998-09-21  Jim Meyering  <meyering@ascend.com>
26315
26316         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26317
26318 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26319
26320         Port nanosecond-resolution times to UnixWare 2.1.2 and
26321         pedantic Solaris 2.6.
26322
26323         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26324         AC_STRUCT_ST_MTIM.
26325         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26326         Generate name of ns member, instead of just 1 or undef.
26327         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26328
26329 1998-08-15  Jim Meyering  <meyering@ascend.com>
26330
26331         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26332         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26333         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26334         instead of jm_TYPE_SSIZE_T.
26335
26336 1998-08-12  Jim Meyering  <meyering@ascend.com>
26337
26338         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26339
26340 1998-08-02  Jim Meyering  <meyering@ascend.com>
26341
26342         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26343         in acconfig.h manually.
26344
26345 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26346
26347         * m4/st_mtim.m4: New file.
26348
26349 1998-07-28  Jim Meyering  <meyering@ascend.com>
26350
26351         * m4/utimes.m4: Undef stat.
26352
26353 1998-07-25  Jim Meyering  <meyering@ascend.com>
26354
26355         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26356         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26357
26358 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26359
26360         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26361         uid and gid actually remain unchanged.
26362
26363 1998-07-07  Jim Meyering  <meyering@ascend.com>
26364
26365         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26366
26367 1998-07-04  Jim Meyering  <meyering@ascend.com>
26368
26369         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26370         to prove that this macro can be used in packages without regex.c.
26371
26372 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26373
26374         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26375         is to be used.
26376
26377 1998-07-03  Jim Meyering  <meyering@ascend.com>
26378
26379         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26380
26381         * m4/gettext.m4: New file -- from gettext-0.10.35.
26382         * m4/lcmessage.m4: Likewise.
26383         * m4/progtest.m4: Likewise.
26384
26385         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26386         * m4/jm-macros.m4: Require the new macro.
26387
26388 1998-06-29  Jim Meyering  <meyering@ascend.com>
26389
26390         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26391         for the definition of NGROUPS (used in a system header included
26392         by sys/mount.h).
26393
26394 1998-06-28  Jim Meyering  <meyering@ascend.com>
26395
26396         * m4/ls-mntd-fs.m4: New file.
26397         * m4/fstypename.m4: New file.
26398
26399         * m4/jm-macros.m4: Require the new macro.
26400         * m4/jm-glibc-io.m4: New file.
26401
26402 1998-05-19  Jim Meyering  <meyering@ascend.com>
26403
26404         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26405         * m4/lchown.m4: New file.
26406
26407         * m4/Makefile.am.in: New file.
26408         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26409
26410 1998-05-14  Jim Meyering  <meyering@ascend.com>
26411
26412         * m4/Makefile.am (EXTRA_DIST): Add them.
26413         * m4/jm-macros.m4: New file.
26414         * m4/utimbuf.m4: New file.
26415
26416 1998-05-12  Jim Meyering  <meyering@ascend.com>
26417
26418         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26419
26420 1998-05-11  Jim Meyering  <meyering@ascend.com>
26421
26422         * m4/isc-posix.m4: New file.
26423
26424 1998-05-10  Jim Meyering  <meyering@ascend.com>
26425
26426         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26427
26428 1998-05-09  Jim Meyering  <meyering@ascend.com>
26429
26430         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26431         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26432         with automake.
26433
26434         * m4/ssize_t.m4: New file.
26435         * m4/mktime.m4: Remove file -- the new automake has this now.
26436
26437 1998-04-26  Jim Meyering  <meyering@ascend.com>
26438
26439         * m4/assert.m4: New file.
26440         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26441
26442 1998-04-05  Jim Meyering  <meyering@ascend.com>
26443
26444         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26445         (jm_PREREQ): Use it here.
26446
26447 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26448
26449         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26450         in acconfig.h.
26451
26452 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26453
26454         * m4/prereq.m4: New file.
26455         * m4/error.m4: New file.
26456         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26457
26458 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26459
26460         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26461         cache-check for the same variable -- that defeated the purpose of
26462         the test; the test program was never run.  This was a problem only
26463         on systems with losing getline functions -- HP-UX 10.20 is one.
26464         Reported by Bjorn Helgaas.
26465
26466 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26467
26468         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26469
26470 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26471
26472         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26473
26474         * m4/const.m4: New file.  Use an initializer in this declaration
26475         typedef int charset[2]; const charset x;
26476         Reported by Bob Glickstein.
26477
26478 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26479
26480         * m4/chown.m4: Fix reversed types on -1 args to chown.
26481         From Kaveh Ghazi.
26482
26483 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26484
26485         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26486         Add lseek and memchr.
26487
26488         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26489         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26490         have a 20-character limit on names.
26491
26492 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26493
26494         * m4/inttypes_h.m4: New file.
26495         * m4/uintmax_t.m4: New file.
26496         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26497
26498 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26499   Free Software Foundation, Inc.
26500 Copying and distribution of this file, with or without modification,
26501 are permitted provided the copyright notice and this notice are preserved.