New module 'mbstok_r'.
[gnulib.git] / ChangeLog
1 2007-02-04  Bruno Haible  <bruno@clisp.org>
2
3         New module mbstok_r.
4         * modules/mbstok_r: New file.
5         * lib/mbstok_r.c: New file.
6         * lib/string_.h (strtok_r): Change argument names to match the
7         comments. Add a conditional link warning.
8         (mbstok_r): New declaration.
9         * m4/mbstok_r.m4: New file.
10         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
11         GNULIB_MBSTOK_R.
12         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
13         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
14
15 2007-02-04  Bruno Haible  <bruno@clisp.org>
16
17         New module mbsspn.
18         * modules/mbsspn: New file.
19         * lib/mbsspn.c: New file.
20         * lib/string_.h (strspn): Add a conditional link warning.
21         (mbsspn): New declaration.
22         * m4/mbsspn.m4: New file.
23         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
24         GNULIB_MBSSPN.
25         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
26         * MODULES.html.sh (Internationalization functions): Add mbsspn.
27
28 2007-02-04  Bruno Haible  <bruno@clisp.org>
29
30         New module mbspbrk.
31         * modules/mbspbrk: New file.
32         * lib/mbspbrk.c: New file.
33         * lib/string_.h (strpbrk): Add a conditional link warning.
34         (mbspbrk): New declaration.
35         * m4/mbspbrk.m4: New file.
36         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
37         GNULIB_MBSPBRK.
38         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
39         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
40
41 2007-02-04  Bruno Haible  <bruno@clisp.org>
42
43         New module mbscspn.
44         * modules/mbscspn: New file.
45         * lib/mbscspn.c: New file.
46         * lib/string_.h (strcspn): Add a conditional link warning.
47         (mbscspn): New declaration.
48         * m4/mbscspn.m4: New file.
49         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
50         GNULIB_MBSCSPN.
51         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
52         * MODULES.html.sh (Internationalization functions): Add mbscspn.
53
54 2007-02-04  Bruno Haible  <bruno@clisp.org>
55
56         New module mbscasestr, reduced goal of strcasestr.
57         * modules/mbscasestr: New file.
58         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
59         (mbscasestr): Renamed from strcasestr.
60         * lib/strcasestr.c: Don't include mbuiter.h.
61         (strcasestr): Remove support for multibyte locales.
62         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
63         Change the conditional link warning.
64         (mbscasestr): New declaration.
65         * m4/mbscasestr.m4: New file.
66         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
67         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
68         REPLACE_STRCASESTR.
69         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
70         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
71         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
72         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
73         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
74         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
75         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
76         (Depends-on): Remove mbuiter.
77         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
78
79 2007-02-04  Bruno Haible  <bruno@clisp.org>
80
81         Simplify handling of strncasecmp.
82         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
83         the conditional link warning.
84         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
85         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
86         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
87         * modules/strcase (configure.ac): Don't invoke
88         gl_STRING_MODULE_INDICATOR.
89         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
90
91 2007-02-04  Bruno Haible  <bruno@clisp.org>
92
93         New module mbscasecmp, reduced goal of strcasecmp.
94         * modules/mbscasecmp: New file.
95         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
96         (mbscasecmp): Renamed from strcasecmp.
97         * lib/strcasecmp.c: Don't include mbuiter.h.
98         (strcasecmp): Remove support for multibyte locales.
99         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
100         Change the conditional link warning.
101         (mbscasecmp): New declaration.
102         * m4/mbscasecmp.m4: New file.
103         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
104         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
105         REPLACE_STRCASECMP.
106         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
107         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
108         GNULIB_MBSCASECMP.
109         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
110         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
111         * modules/strcase (Files): Remove m4/mbrtowc.m4.
112         (Depends-on): Remove mbuiter.
113         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
114
115 2007-02-04  Bruno Haible  <bruno@clisp.org>
116
117         New module mbsstr. Remove module strstr.
118         * modules/mbsstr: New file.
119         * modules/strstr: Remove file.
120         * lib/mbsstr.c: Renamed from lib/strstr.c.
121         (mbsstr): Renamed from strstr.
122         * lib/string_.h (strstr): Remove declaration. Change the conditional
123         link warning.
124         (mbsstr): New declaration.
125         * m4/mbsstr.m4: New file.
126         * m4/strstr.m4: Remove file.
127         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
128         REPLACE_STRSTR.
129         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
130         Don't initialize GNULIB_STRSTR.
131         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
132         substitute GNULIB_STRSTR and REPLACE_STRSTR.
133         * MODULES.html.sh (Internationalization functions): Add mbsstr.
134         (Support for systems lacking ANSI C 89): Remove strstr.
135
136 2007-02-04  Bruno Haible  <bruno@clisp.org>
137
138         New module mbsrchr.
139         * modules/mbsrchr: New file.
140         * lib/mbsrchr.c: New file.
141         * lib/string_.h (strrchr): Add a conditional link warning.
142         (mbsrchr): New declaration.
143         * m4/mbsrchr.m4: New file.
144         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
145         GNULIB_MBSRCHR.
146         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
147         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
148
149 2007-02-04  Bruno Haible  <bruno@clisp.org>
150
151         New module mbschr.
152         * modules/mbschr: New file.
153         * lib/mbschr.c: New file.
154         * lib/string_.h (strchr): Add a conditional link warning.
155         (mbschr): New declaration.
156         * m4/mbschr.m4: New file.
157         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
158         GNULIB_MBSCHR.
159         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
160         * MODULES.html.sh (Internationalization functions): Add mbschr.
161
162 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
163
164         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
165
166         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
167
168 2007-02-04  Bruno Haible  <bruno@clisp.org>
169
170         New module description section 'configure.ac-early'.
171         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
172         (func_get_autoconf_early_snippet): New function.
173         (func_import, func_create_testdir): Use it. Remove special cases for
174         modules 'extensions' and 'lock'.
175         * modules/extensions (configure.ac-early): Require
176         gl_USE_SYSTEM_EXTENSIONS.
177         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
178
179 2007-02-04  Bruno Haible  <bruno@clisp.org>
180
181         Make use of gcj-4.3's -fsource and -ftarget option.
182         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
183         and if so try the options -fsource and -ftarget.
184         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
185         source_version, ftarget_option, target_version arguments.
186         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
187         (is_envjavac_oldgcj_14_14_usable): Renamed from
188         is_envjavac_gcj_14_14_usable.
189         (is_envjavac_oldgcj_14_13_usable): Renamed from
190         is_envjavac_gcj_14_13_usable.
191         (is_gcj_present): Update.
192         (is_gcj_43, is_gcj43_usable): New functions.
193         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
194         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
195         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
196         try the options -fsource and -ftarget.
197
198 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
199
200         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
201         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
202         larger value.
203
204 2007-02-03  Jim Meyering  <jim@meyering.net>
205
206         Give tools a better chance to allocate space for very large buffers.
207         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
208
209         Make pwd and readlink work also when run with an unreadable parent dir
210         on systems with openat support.
211         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
212         provided getcwd function, even when we have openat support.
213         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
214
215 2007-02-02  Bruno Haible  <bruno@clisp.org>
216
217         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
218         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
219         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
220         portability problems if one of these functions is only used on specific
221         platforms.
222         Reported by Paul Eggert.
223
224 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
225
226         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
227         is causing more trouble than it's curing.
228         * lib/regex_internal.h (__mempcpy): Remove.
229         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
230         (and make the code a tad smaller to boot).
231         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
232
233 2007-02-02  Jim Meyering  <jim@meyering.net>
234
235         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
236         section, not in the Makefile.am: one.
237
238 2007-02-02  Eric Blake  <ebb9@byu.net>
239
240         * lib/strchrnul.c: Always include config.h first.
241
242         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
243         gnulib strstr is not necessary here.
244
245 2007-02-02  Simon Josefsson  <simon@josefsson.org>
246
247         * m4/socklen.m4: Fix typo.
248
249 2007-02-02  Eric Blake  <ebb9@byu.net>
250
251         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
252         * modules/netinet_in (Makefile.am): Likewise.
253
254 2007-02-01  Bruno Haible  <bruno@clisp.org>
255
256         * lib/string_.h (GL_LINK_WARNING): New macro.
257         (strcasecmp, strstr, strcasestr): If provided by the system,
258         conditionally define as a macro that leads to a warning instead of to
259         an error.
260         (strncasecmp): Conditionally define as a macro that leads to a warning.
261
262 2007-02-01  Jim Meyering  <jim@meyering.net>
263
264         Give tools a better chance to allocate space for very large buffers.
265         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
266
267 2007-02-01  Karl Berry  <karl@gnu.org>
268
269         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
270
271 2007-02-01  Bruno Haible  <bruno@clisp.org>
272
273         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
274         renamings.
275
276 2007-02-01  Eric Blake  <ebb9@byu.net>
277
278         * modules/regex (Depends-on): Revert dependence on mempcpy.
279         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
280         module's definition of mempcpy.
281         Reported by Paul Eggert.
282
283 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
284
285         * lib/string_.h: If the gnulib module XYZ is not present, undefine
286         the symbol XYZ before redefining it.  This fixes a problem with
287         programs that don't use XYZ, when compiled on systems that define
288         XYZ to something else.
289
290 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
291
292         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
293         occurs when "mkdir -m foo" creates a setgid directory that is (1)
294         writeable to group or other and (2) is intended to have a special
295         mode bit that is set or cleared.  In such a case, the directory
296         should be neither group- nor other-writeable until the special
297         mode bits are right.
298
299 2007-01-31  Eric Blake  <ebb9@byu.net>
300
301         * modules/mountlist (Depends-on): Add strstr.
302
303         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
304         bug.
305         * modules/string (Makefile.am): Remove redundant replacement.
306         * modules/regex (Depends-on): Add mempcpy.
307
308 2007-01-31  Bruno Haible  <bruno@clisp.org>
309
310         New module description field 'Link'.
311         * gnulib-tool (func_usage): Document --extract-link-directive.
312         (sed_extract_prog): Recognize 'Link' directive.
313         (func_get_link_directive): New function.
314         (func_import): Show summary of link directives.
315         Handle --extract-link-directive option.
316         * modules/acl (Link): New section.
317         * modules/clock-time (Link): New section.
318         * modules/euidaccess (Link): New section.
319         * modules/gettext (Link): New section.
320         * modules/iconv (Link): New section.
321         * modules/lock (Link): New section.
322         * modules/nanosleep (Link): New section.
323         * modules/readline (Link): New section.
324
325 2007-01-27  Bruno Haible  <bruno@clisp.org>
326
327         Enforce the use of gnulib modules for unportable <string.h> functions.
328         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
329         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
330         (gl_HEADER_STRING_H_BODY): Require it.
331         * lib/string_.h: If the gnulib module XYZ is not present, redefine
332         the symbol XYZ to one that gives a link error.
333         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
334         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
335         * modules/mempcpy (configure.ac): Likewise.
336         * modules/memrchr (configure.ac): Likewise.
337         * modules/stpcpy (configure.ac): Likewise.
338         * modules/stpncpy (configure.ac): Likewise.
339         * modules/strcase (configure.ac): Likewise.
340         * modules/strcasestr (configure.ac): Likewise.
341         * modules/strchrnul (configure.ac): Likewise.
342         * modules/strdup (configure.ac): Likewise.
343         * modules/strndup (configure.ac): Likewise.
344         * modules/strnlen (configure.ac): Likewise.
345         * modules/strpbrk (configure.ac): Likewise.
346         * modules/strsep (configure.ac): Likewise.
347         * modules/strstr (configure.ac): Likewise.
348         * modules/strtok_r (configure.ac): Likewise.
349
350 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
351
352         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
353
354 2007-01-30  Jim Meyering  <jim@meyering.net>
355
356         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
357
358 2007-01-29  Bruno Haible  <bruno@clisp.org>
359
360         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
361         * lib/execute.c: Likewise.
362         * lib/pipe.c: Likewise.
363         * lib/printf-args.h: Likewise.
364         * lib/printf-args.c: Likewise.
365         * lib/printf-parse.c: Likewise.
366         * lib/vasnprintf.c: Likewise.
367
368 2007-01-29  Eric Blake  <ebb9@byu.net>
369
370         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
371         declaration.
372
373 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
374
375         * lib/strptime.h (strptime): Use 'restrict' for args where
376         POSIX requires this.
377         * lib/strptime.c (strptime): Likewise.
378         Change license notice from LGPL to GPL, since gnulib-tool will
379         change this as needed.
380         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
381         defined.
382         Include "strptime.h" first, to check interface.
383         Do not #undef _LIBC and _NL_CURRENT.
384         Do not include <stdlib.h>; no longer needed.
385         Include "time_r.h" and declare ptime_locale_status
386         only if _LIBC is not defined.
387         (__P): Remove unused macro.
388         (match_string): Bring back glibc version, but use it only if _LIBC
389         is defined.
390         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
391         Remove unnecessary assertion and abort() call.
392         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
393         * m4/strptime.m4: Fix serial number comment.
394         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
395         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
396         (Depends-on): Add time_r.
397
398 2007-01-29  Bruno Haible  <bruno@clisp.org>
399
400         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
401         strptime.
402         * modules/strptime (Depends-on): Add stdbool.
403         * lib/strptime.h: Include <time.h> always. Add comments.
404
405 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
406
407         * modules/strptime: New file.
408         * lib/strptime.h: New file.
409         * lib/strptime.c: New file.
410         * m4/strptime.m4: New file.
411
412 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
413
414         * MODULES.html.sh: New module mpsort.
415         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
416
417         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
418         a circularity problem with HP-UX ia64 reported by Bob Proulx in
419         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
420         All uses changed.
421         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
422         All uses changed.
423         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
424         to _Restrict_.
425         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
426         the parameter matches the prototype.
427
428 2007-01-28  Jim Meyering  <jim@meyering.net>
429
430         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
431         sys/time.h here, reverting that part of the previous patch:
432         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
433
434 2007-01-28  Bruno Haible  <bruno@clisp.org>
435
436         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
437         value of $(SYS_TIME_H).
438         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
439         remove it conditionally, too. [added by Jim Meyering]
440         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
441         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
442         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
443         GETTIMEOFDAY_REPLACEMENT to 1.
444
445 2007-01-28  Bruno Haible  <bruno@clisp.org>
446
447         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
448         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
449         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
450         Set UNISTD_H instead of UNISTD_H2.
451         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
452
453 2007-01-28  Bruno Haible  <bruno@clisp.org>
454
455         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
456         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
457
458 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
459
460         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
461         (func_create_testdir): Ensure C locale for `grep' and `tr'
462         character ranges.
463         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
464         ACLOCAL_AMFLAGS parsing state machine.
465
466 2007-01-27  Bruno Haible  <bruno@clisp.org>
467
468         * modules/unistr/base: Update.
469
470 2007-01-27  Bruno Haible  <bruno@clisp.org>
471
472         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
473         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
474         * modules/unistr/u32-mbtouc-unsafe: Renamed from
475         modules/unistr/u32-mbtouc.
476         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
477         * lib/unistr.h: Update.
478         * lib/linebreak.c: Update.
479         * modules/unistr/u32-mbtouc: Renamed from
480         modules/unistr/u32-mbtouc-safe.
481         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
482         * lib/unistr.h: Update.
483         * lib/unistr/u32-to-u8.c: Update.
484         * lib/unistr/u32-to-u16.c: Update.
485
486 2007-01-27  Bruno Haible  <bruno@clisp.org>
487
488         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
489         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
490         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
491         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
492         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
493         * modules/unistr/u16-mbtouc-unsafe: Renamed from
494         modules/unistr/u16-mbtouc.
495         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
496         * lib/unistr.h: Update.
497         * lib/linebreak.c: Update.
498         * modules/linebreak: Update.
499         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
500         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
501         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
502         * modules/unistr/u16-mbtouc: Renamed from
503         modules/unistr/u16-mbtouc-safe.
504         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
505         * lib/unistr.h: Update.
506         * lib/unistr/u16-to-u8.c: Update.
507         * modules/unistr/u16-to-u8: Update.
508         * lib/unistr/u16-to-u32.c: Update.
509         * modules/unistr/u16-to-u32: Update.
510
511 2007-01-27  Bruno Haible  <bruno@clisp.org>
512
513         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
514         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
515         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
516         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
517         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
518         * modules/unistr/u8-mbtouc-unsafe: Renamed from
519         modules/unistr/u8-mbtouc.
520         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
521         * lib/unistr.h: Update.
522         * lib/striconveh.c: Update.
523         * modules/striconveh: Update.
524         * lib/linebreak.c: Update.
525         * modules/linebreak: Update.
526         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
527         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
528         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
529         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
530         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
531         * lib/unistr.h: Update.
532         * lib/striconveh.c: Update.
533         * modules/striconveh: Update.
534         * lib/unistr/u8-to-u16.c: Update.
535         * modules/unistr/u8-to-u16: Update.
536         * lib/unistr/u8-to-u32.c: Update.
537         * modules/unistr/u8-to-u32: Update.
538
539 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
540
541         Sync from Libtool.
542         * lib/argz.c: Do not include strings.h nor memory.h, include
543         string.h unconditionally.  Patch by Simon Josefsson.
544
545 2007-01-27  Bruno Haible  <bruno@clisp.org>
546
547         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
548         from gl_HEADER_STRING_H_BODY.
549         (gl_HEADER_STRING_H_BODY): Require it.
550         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
551         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
552         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
553         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
554         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
555         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
556         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
557         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
558         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
559         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
560         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
561         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
562         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
563         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
564         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
565
566 2007-01-27  Bruno Haible  <bruno@clisp.org>
567
568         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
569         check_PROGRAMS into noinst_PROGRAMS.
570         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
571         check_PROGRAMS in this case.
572         (func_import): Set for_test to false.
573         (func_create_testdir): Set for_test to true.
574
575 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
576             Bruno Haible  <bruno@clisp.org>
577
578         * modules/strcasestr (Files): Remove lib/strcasestr.h.
579         (Depends-on): Add string.
580         (Includes): Use <string.h> instead of strcasestr.h.
581         * modules/string (Makefile.am): Also substitute the value of
582         REPLACE_STRCASESTR.
583         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
584         assume strcasestr is declared in <string.h> not <strings.h>. Also
585         set REPLACE_STRCASESTR.
586         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
587         REPLACE_STRCASESTR.
588         * lib/strcasestr.h: Remove file.
589         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
590         * lib/string_.h (strcasestr): New declaration.
591
592 2007-01-27  Bruno Haible  <bruno@clisp.org>
593
594         * lib/string_.h: Use 'extern'.
595
596 2007-01-27  Jim Meyering  <jim@meyering.net>
597
598         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
599         of set-but-not-used local, "q".
600
601         * lib/mempcpy.c: Include <config.h> before <string.h>.
602         This fixes a compilation error on HP-UX, due to the system's
603         "restrict"-using mempcpy prototype.
604
605 2007-01-26  Bruno Haible  <bruno@clisp.org>
606
607         Small optimization.
608         * lib/javacomp.c: Include c-strstr.h.
609          (is_envjavac_gcj): Use c_strstr instead of strstr.
610         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
611
612 2007-01-26  Bruno Haible  <bruno@clisp.org>
613
614         * MODULES.html.sh (Unicode string functions): Add the new modules.
615
616         * modules/uniconv/u32-strconv-to-locale: New file.
617         * lib/uniconv/u32-strconv-to-locale.c: New file.
618
619         * modules/uniconv/u16-strconv-to-locale: New file.
620         * lib/uniconv/u16-strconv-to-locale.c: New file.
621
622         * modules/uniconv/u8-strconv-to-locale: New file.
623         * lib/uniconv/u8-strconv-to-locale.c: New file.
624
625         * modules/uniconv/u32-strconv-from-locale: New file.
626         * lib/uniconv/u32-strconv-from-locale.c: New file.
627
628         * modules/uniconv/u16-strconv-from-locale: New file.
629         * lib/uniconv/u16-strconv-from-locale.c: New file.
630
631         * modules/uniconv/u8-strconv-from-locale: New file.
632         * lib/uniconv/u8-strconv-from-locale.c: New file.
633
634         * modules/uniconv/u32-strconv-to-enc: New file.
635         * lib/uniconv/u32-strconv-to-enc.c: New file.
636         * modules/uniconv/u32-strconv-to-enc-tests: New file.
637         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
638
639         * modules/uniconv/u16-strconv-to-enc: New file.
640         * lib/uniconv/u16-strconv-to-enc.c: New file.
641         * lib/uniconv/u-strconv-to-enc.h: New file.
642         * modules/uniconv/u16-strconv-to-enc-tests: New file.
643         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
644
645         * modules/uniconv/u8-strconv-to-enc: New file.
646         * lib/uniconv/u8-strconv-to-enc.c: New file.
647         * modules/uniconv/u8-strconv-to-enc-tests: New file.
648         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
649
650         * modules/uniconv/u32-strconv-from-enc: New file.
651         * lib/uniconv/u32-strconv-from-enc.c: New file.
652         * modules/uniconv/u32-strconv-from-enc-tests: New file.
653         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
654
655         * modules/uniconv/u16-strconv-from-enc: New file.
656         * lib/uniconv/u16-strconv-from-enc.c: New file.
657         * modules/uniconv/u16-strconv-from-enc-tests: New file.
658         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
659
660         * modules/uniconv/u8-strconv-from-enc: New file.
661         * lib/uniconv/u8-strconv-from-enc.c: New file.
662         * lib/uniconv/u-strconv-from-enc.h: New file.
663         * modules/uniconv/u8-strconv-from-enc-tests: New file.
664         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
665
666         * modules/uniconv/u32-conv-from-enc: New file.
667         * lib/uniconv/u32-conv-from-enc.c: New file.
668         * modules/uniconv/u32-conv-from-enc-tests: New file.
669         * tests/uniconv/test-u32-conv-from-enc.c: New file.
670
671         * modules/uniconv/u16-conv-from-enc: New file.
672         * lib/uniconv/u16-conv-from-enc.c: New file.
673         * lib/uniconv/u-conv-from-enc.h: New file.
674         * modules/uniconv/u16-conv-from-enc-tests: New file.
675         * tests/uniconv/test-u16-conv-from-enc.c: New file.
676
677         * modules/uniconv/u8-conv-from-enc: New file.
678         * lib/uniconv/u8-conv-from-enc.c: New file.
679         * modules/uniconv/u8-conv-from-enc-tests: New file.
680         * tests/uniconv/test-u8-conv-from-enc.c: New file.
681
682         * modules/uniconv/base: New file.
683         * lib/uniconv.h: New file.
684
685 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
686
687         * doc/gnulib-tool.texi (Initial import): Update to match current
688         behavior with strdup module.
689         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
690         * lib/memmem.h: Remove; all uses removed.  This is now done
691         by <string.h>.
692         * lib/mempcpy.h: Likewise.
693         * lib/memrchr.h: Likewise.
694         * lib/stpcpy.h: Likewise.
695         * lib/stpncpy.h: Likewise.
696         * lib/strcase.h: Likewise.
697         * lib/strchrnul.h: Likewise.
698         * lib/strdup.h: Likewise.
699         * lib/strndup.h: Likewise.
700         * lib/strnlen.h: Likewise.
701         * lib/strpbrk.h: Likewise.
702         * lib/strsep.h: Likewise.
703         * lib/strstr.h: Likewise.
704         * lib/strtok_r.h: Likewise.
705         * lib/string_.h: New file.
706         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
707         Rely on <string.h> instead.
708         * lib/canon-host.c: Likewise.
709         * lib/chdir-long.c: Likewise.
710         * lib/concatpath.c: Likewise.
711         * lib/exclude.c: Likewise.
712         * lib/fchdir.c: Likewise.
713         * lib/getaddrinfo.c: Likewise.
714         * lib/getcwd.c: Likewise.
715         * lib/getsubopt.c: Likewise.
716         * lib/glob.c: Likewise.
717         * lib/hard-locale.c: Likewise.
718         * lib/iconvme.c: Likewise.
719         * lib/javacomp.c: Likewise.
720         * lib/mempcpy.c: Likewise.
721         * lib/memrchr.c: Likewise.
722         * lib/regex_internal.h: Likewise.
723         * lib/stpncpy.c: Likewise.
724         * lib/strcasecmp.c: Likewise.
725         * lib/strchrnul.c: Likewise.
726         * lib/strdup.c: Likewise.
727         * lib/striconv.c: Likewise.
728         * lib/striconveh.c: Likewise.
729         * lib/striconveha.c: Likewise.
730         * lib/strncasecmp.c: Likewise.
731         * lib/strndup.c: Likewise.
732         * lib/strnlen.c: Likewise.
733         * lib/strsep.c: Likewise.
734         * lib/strstr.c: Likewise.
735         * lib/strtok_r.c: Likewise.
736         * lib/userspec.c: Likewise.
737         * lib/w32spawn.h: Likewise.
738         * lib/xstrndup.c: Likewise.
739         * lib/mountlist.c (strstr): Remove decl.
740         * m4/string_h.m4: New file.
741         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
742         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
743         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
744         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
745         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
746         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
747         Set REPLACE_STRCASECMP if necessary.
748         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
749         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
750         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
751         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
752         HAVE_DECL_STRDUP if necessary.
753         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
754         since gl_FUNC_STRNDUP does that now.
755         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
756         Check for decl here...
757         (gl_PREREQ_STRNLEN): ... not here.
758         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
759         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
760         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
761         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
762         necessary.
763         * modules/string: New file.
764         * modules/memmem (Files): Remove special-purpose include file.
765         (Depends-on): Add string.
766         (Include): Include <string.h>, not the removed file.
767         * modules/mempcpy: Likewise.
768         * modules/memrchr: Likewise.
769         * modules/stpcpy: Likewise.
770         * modules/stpncpy: Likewise.
771         * modules/strcase: Likewise.
772         * modules/strchrnul: Likewise.
773         * modules/strdup: Likewise.
774         * modules/strndup: Likewise.
775         * modules/strnlen: Likewise.
776         * modules/strpbrk: Likewise.
777         * modules/strsep: Likewise.
778         * modules/strstr: Likewise.
779         * modules/strtok_r: Likewise.
780         * tests/test-dirname.c: Don't include "strdup.h", since
781         <string.h> now suffices.
782         * tests/test-memmem.c: Don't include "memmem.h", since
783         <string.h> now suffices.
784
785 2007-01-25  Bruno Haible  <bruno@clisp.org>
786
787         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
788         *resultp is 0.
789
790         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
791         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
792         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
793         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
794
795         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
796         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
797         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
798         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
799         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
800         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
801
802 2007-01-24  Bruno Haible  <bruno@clisp.org>
803
804         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
805         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
806         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
807         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
808         gl_FUNC_FTS_CORE.
809         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
810         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
811         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
812         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
813         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
814         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
815         gl_FUNC_FCHOWNAT.
816         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
817         gl_FUNC_STRFTIME.
818         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
819         Reported by Ralf Wildenhues.
820
821 2007-01-24  Bruno Haible  <bruno@clisp.org>
822
823         Drop AC_REQUIRE calls that are redundant with the module dependencies.
824         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
825         gl_GETADDRINFO.
826         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
827         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
828         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
829
830 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
831
832         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
833         Don't use 'exit'; just return from 'main'.
834         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
835
836         * lib/fnmatch_.h: Readjust white space and comments to match
837         glibc, to avoid spurious diffs.
838
839 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
840
841         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
842         2004-12-01 change by Jakub Jelinek, since this code won't compile
843         if !LIBC.  Problem reported by Bob Proulx.
844
845 2007-01-23  Bruno Haible  <bruno@clisp.org>
846
847         * lib/striconveh.c: Include c-strcaseeq.h.
848         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
849         * modules/striconveh (Depends-on): Add c-strcaseeq.
850
851 2007-01-23  Bruno Haible  <bruno@clisp.org>
852
853         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
854
855         * modules/c-strcaseeq: New file.
856         * lib/c-strcaseeq.h: New file.
857
858         * modules/streq: New file.
859         * lib/streq.h: New file.
860
861 2007-01-23  Bruno Haible  <bruno@clisp.org>
862
863         * modules/striconveha-tests: New file.
864         * tests/test-striconveha.c: New file.
865
866         * lib/striconveha.h: Include <stdbool.h>.
867         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
868         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
869         (mem_iconveha_notranslit): Renamed from mem_iconveha.
870         (mem_iconveha): New function.
871         (str_iconveha_notranslit): Renamed from str_iconveha.
872         (str_iconveha): New function.
873         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
874         c-strcase.
875
876 2007-01-23  Bruno Haible  <bruno@clisp.org>
877
878         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
879         encodings without forgiving before trying any encoding with handler.
880         (str_iconveha): Try all encodings without forgiving before trying any
881         encoding with handler.
882
883 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
884
885         Import the following changes from libc.
886
887         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
888
889         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
890
891         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
892
893         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
894         normal_bracket label.
895
896         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
897
898         [BZ #361]
899         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
900         to normal_bracket after fetching the next character.
901
902 2007-01-22  Bruno Haible  <bruno@clisp.org>
903
904         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
905         argument.
906         * lib/striconveh.c (iconv_carefully_1): New function.
907         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
908         argument.
909         (str_cd_iconveh): Update.
910         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
911         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
912         * tests/test-striconveh.c (MAGIC): New macro.
913         (new_offsets): New function.
914         (main): Test call with and without offsets.
915
916 2007-01-22  Bruno Haible  <bruno@clisp.org>
917
918         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
919         * modules/sys_select (Makefile.am): Likewise.
920         * modules/sys_socket (Makefile.am): Likewise.
921         * modules/sys_time (Makefile.am): Likewise.
922
923 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
924
925         * modules/gettimeofday (License): Change from GPL to LGPL, since
926         gettimeofday is a library function.
927
928 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
929
930         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
931
932 2007-01-21  Bruno Haible  <bruno@clisp.org>
933
934         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
935
936 2007-01-21  Bruno Haible  <bruno@clisp.org>
937
938         * modules/striconveha: New file.
939         * lib/striconveha.h: New file.
940         * lib/striconveha.c: New file.
941         * MODULES.html.sh (Internationalization functions): Add striconveha.
942         * lib/striconv.c (str_iconv): Optimize the case of an empty input
943         string.
944         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
945
946 2007-01-21  Bruno Haible  <bruno@clisp.org>
947
948         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
949         * lib/striconveh.c (str_iconveh): Likewise.
950
951 2007-01-21  Bruno Haible  <bruno@clisp.org>
952
953         * lib/striconveh.h (mem_iconveh): New declaration.
954         * lib/striconveh.c (mem_iconveh): New function.
955         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
956
957 2007-01-21  Bruno Haible  <bruno@clisp.org>
958
959         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
960
961         * lib/striconveh.h (mem_cd_iconveh): Change specification.
962         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
963         original result buffer.
964         (str_cd_iconveh): Update.
965         * tests/test-striconveh.c (main): Update.
966
967         * lib/striconv.h (mem_cd_iconv): Change specification.
968         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
969         result buffer.
970         (str_cd_iconv): Update.
971         * tests/test-striconv.c (main): Update.
972
973 2007-01-21  Bruno Haible  <bruno@clisp.org>
974
975         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
976
977 2007-01-20  Jim Meyering  <jim@meyering.net>
978
979         * lib/userspec.c (parse_with_separator): If a user or group string
980         starts with "+", skip the corresponding name-to-ID look-up, since
981         such a look-up must fail: user and group names may not include "+".
982
983 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
984
985         * lib/poll.c: Include sys/time.h and time.h unconditionally,
986         since we now assume the sys_time module.
987         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
988         check for sys/time.h; no longer needed.
989         * modules/poll (Depends-on): Depend on sys_time.
990
991 2007-01-18  Bruno Haible  <bruno@clisp.org>
992
993         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
994         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
995
996         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
997         gettimeofday.
998
999         * tests/test-gettimeofday.c: Include <time.h>.
1000         (dummy): Remove variable.
1001
1002         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1003         gl_HEADER_SYS_TIME_H.
1004         (gl_HEADER_SYS_TIME_H): New macro.
1005
1006         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1007         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1008         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1009         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1010         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1011         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1012         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1013         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1014         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1015         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1016         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1017
1018         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1019         last change; it caused a compilation error when cross-compiling to
1020         Cygwin.
1021
1022 2007-01-18  Jim Meyering  <jim@meyering.net>
1023
1024         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1025         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1026         than the race-prone "test -d sys || mkdir sys".
1027         (configure.ac): Use AC_PROG_MKDIR_P.
1028         * modules/sys_select: Likewise.
1029         * modules/sys_socket: Likewise.
1030         * modules/sys_time: Likewise.
1031
1032 2007-01-18  Eric Blake  <ebb9@byu.net>
1033
1034         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1035         replace gettimeofday.
1036         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1037         name, to avoid infinite recursion.
1038
1039 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1040
1041         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1042         module sys_time.
1043         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1044         assume timespec.h defines struct timeval.
1045         * lib/settime.c: Likewise.
1046         * lib/utimens.c: Likewise.
1047         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1048         since we now assume the gettimeofday module.
1049         * lib/tempname.c (__gen_tempname): Likewise.
1050         * lib/gettimeofday.h: Remove.
1051         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1052         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1053         Include <time.h>, for 'time()'.
1054         (localtime_buffer_addr): Also use this workaround if
1055         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1056         to simplify the uses.  All uses changed.
1057         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1058         that #undef is inside {}, and 'const' follows type name consistently.
1059         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1060         (gettimeofday): Do not use the maximum possible value for
1061         tv->tv_usec, since that might break usages other than ls.c.
1062         Instead, we'll leave ls.c alone.  This undoes today's patch
1063         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1064         we've never observed the problem but might as well keep the
1065         canary.
1066         * lib/nanosleep.c: Include timespec.h first, for interface check.
1067         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1068         now assume the sys_time module.
1069         * lib/tempname.c: Likewise.
1070         * lib/timespec.h: Likewise.
1071         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1072         needed.
1073         * lib/strftime.c: Likewise.
1074         * lib/timespec.h: Likewise.
1075         * lib/posixtm.c: Include posixtm.h first, for interface check.
1076         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1077         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1078         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1079         * lib/sys_time_.h: New file.
1080         * lib/timespec.h (struct timespec): Use long int, not long.
1081         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1082         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1083         Remove obsolescent call to AC_HEADER_TIME.
1084         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1085         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1086         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1087         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1088         Likewise.
1089         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1090         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1091         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1092         into the sys_time module.  Check for gettimeofday just once.
1093         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1094         for gettimeofday signature to just check the signature.  Merely
1095         compile it, since linking doesn't test signature.  Improve test for
1096         whether gettimeofday.o is actually needed.
1097         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1098         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1099         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1100         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1101         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1102         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1103         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1104         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1105         than worrying about sys/time.h.
1106         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1107         Don't bother worrying about TIME_WITH_SYS_TIME.
1108         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1109         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1110         * m4/sys_time_h.m4: New file.
1111         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1112         Don't include sys/time.h.  Return from main rather than exiting.
1113         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1114         all uses changed.
1115         * modules/gethrxtime (Depends-on): Add sys_time.
1116         * modules/gettime (Depends-on): Likewise.
1117         * modules/gettimeofday (Depends-on): Likewise.
1118         * modules/nanosleep (Depends-on): Likewise.
1119         * modules/settime (Depends-on): Likewise.
1120         * modules/tempname (Depends-on): Likewise.
1121         * modules/utimens (Depends-on): Likewise.
1122         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1123         (Include:) Change back to <sys/time.h>.
1124         (Maintainer:) Add self.
1125         * modules/sys_time: New file.
1126         * modules/tempname (Depends-on): Add gettimeofday.
1127         * tests/test-gettimeofday.c: Include <sys/time.h>
1128         rather than gettimeofday.h.
1129
1130 2007-01-17  Bruno Haible  <bruno@clisp.org>
1131
1132         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1133         the license default to GPL.
1134         (func_create_testdir): Don't complain if a module is LGPL and its
1135         tests module depends on GPLed modules.
1136
1137 2007-01-17  Bruno Haible  <bruno@clisp.org>
1138
1139         * lib/gettimeofday.c (gettimeofday): Add code for the case
1140         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1141         maximum possible value for tv->tv_usec, rather than the minimum one.
1142
1143 2005-10-08  Martin Lambers  <marlam@marlam.de>
1144 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1145 2007-01-16  Bruno Haible  <bruno@clisp.org>
1146
1147         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1148         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1149         gl_FUNC_GETTIMEOFDAY.
1150         (Include): Add gettimeofday.h.
1151         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1152         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1153         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1154         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1155         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1156         * lib/gettimeofday.h: New file.
1157         * lib/gettimeofday.c: Include <sys/timeb.h>.
1158         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1159         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1160         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1161         fall back on time().
1162
1163         * tests/test-gettimeofday.c: New file.
1164         * modules/gettimeofday-tests: New file.
1165
1166 2007-01-16  Eric Blake  <ebb9@byu.net>
1167
1168         * modules/fnmatch (Depends-on): Depend on wchar.
1169         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1170         * m4/fnmatch.m4: Likewise.
1171         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1172         * m4/mbchar.m4: Likewise.
1173         * modules/mbswidth (Depends-on): Depend on wchar.
1174         * lib/mbswidth.c: Assume <wchar.h>.
1175         * m4/mbswidth.m4: Likewise.
1176         * modules/quotearg (Depends-on): Depend on wchar.
1177         * lib/quotearg.c: Assume <wchar.h>.
1178         * m4/quotearg.m4: Likewise.
1179         * modules/regex (Depends-on): Depend on wchar.
1180         * lib/regex_internal.h: Assume <wchar.h>.
1181         * m4/regex.m4: Likewise.
1182         * modules/stdint (Depends-on): Depend on wchar.
1183         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1184         * m4/stdint.m4: Likewise.
1185         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1186         * modules/strftime (Depends-on): Depend on wchar.
1187         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1188         * modules/strtol (Depends-on): Depend on wchar.
1189         * lib/strtol.c: Assume <wchar.h>.
1190         * modules/wcwidth (Depends-on): Depend on wchar.
1191         * lib/wcwidth.h: Assume <wchar.h>.
1192         * m4/wcwidth.m4: Likewise.
1193
1194 2007-01-16  Bruno Haible  <bruno@clisp.org>
1195
1196         * modules/csharpexec-script: New, created from...
1197         * modules/csharpexec: ... this.
1198
1199 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1200
1201         * modules/javaexec-script: New, created from...
1202         * modules/javaexec: ... this.
1203
1204 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1205
1206         * modules/poll (Dependencies): Add sys_select.
1207
1208 2007-01-15  Jim Meyering  <jim@meyering.net>
1209
1210         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1211         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1212         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1213         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1214
1215 2007-01-15  Bruno Haible  <bruno@clisp.org>
1216
1217         * modules/striconveh: New file.
1218         * lib/striconveh.h: New file.
1219         * lib/striconveh.c: New file.
1220         * MODULES.html.sh (Internationalization functions): Add striconveh.
1221
1222         * modules/striconveh-tests: New file.
1223         * tests/test-striconveh.c: New file.
1224
1225 2007-01-15  Bruno Haible  <bruno@clisp.org>
1226
1227         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1228         not from GNU libiconv or GNU libc.
1229
1230 2007-01-15  Bruno Haible  <bruno@clisp.org>
1231
1232         * doc/gnulib-intro.texi (Copyright): Explain the different license
1233         terms for module descriptions, autoconf macros, tests, documentation.
1234
1235 2007-01-14  Bruno Haible  <bruno@clisp.org>
1236
1237         * modules/striconv-tests: New file.
1238         * tests/test-striconv.c: New file.
1239
1240 2007-01-14  Bruno Haible  <bruno@clisp.org>
1241
1242         * modules/iconv-tests: New file.
1243         * tests/test-iconv.c: New file.
1244
1245 2007-01-14  Bruno Haible  <bruno@clisp.org>
1246
1247         * gnulib-tool (func_get_license): For test modules, use the license of
1248         the main module.
1249
1250 2007-01-14  Bruno Haible  <bruno@clisp.org>
1251
1252         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1253         if iconv is found to exist.
1254
1255 2007-01-14  Bruno Haible  <bruno@clisp.org>
1256
1257         * modules/c-ctype-tests: New file.
1258         * tests/test-c-ctype.c: New file.
1259
1260 2007-01-14  Bruno Haible  <bruno@clisp.org>
1261
1262         * modules/binary-io-tests: New file.
1263         * tests/test-binary-io.sh: New file.
1264         * tests/test-binary-io.c: New file.
1265
1266 2007-01-14  Bruno Haible  <bruno@clisp.org>
1267
1268         * modules/array-oset-tests: New file.
1269         * tests/test-array_oset.c: New file.
1270
1271 2007-01-14  Bruno Haible  <bruno@clisp.org>
1272
1273         * modules/array-list-tests: New file.
1274         * tests/test-array_list.c: New file.
1275
1276 2007-01-14  Bruno Haible  <bruno@clisp.org>
1277
1278         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1279         and make.
1280         Reported by Simon Josefsson in
1281         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1282
1283 2007-01-14  Bruno Haible  <bruno@clisp.org>
1284
1285         * modules/allocsa-tests: New file.
1286         * tests/test-allocsa.c: New file.
1287
1288 2007-01-14  Bruno Haible  <bruno@clisp.org>
1289
1290         * modules/fchdir (Depends-on): Add absolute-header.
1291         * modules/unistd (Depends-on): Likewise.
1292
1293 2006-12-30  Bruno Haible  <bruno@clisp.org>
1294
1295         * modules/fchdir: New file.
1296         * modules/unistd (Files): Add lib/unistd_.h.
1297         (Makefile.am): Generate unistd.h from unistd_.h.
1298         * lib/fchdir.c: New file.
1299         * lib/dirent_.h: New file.
1300         * lib/unistd_.h: New file.
1301         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1302         * m4/fchdir.m4: New file.
1303         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1304         (gl_HEADER_UNISTD): Invoke it.
1305         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1306         function.
1307         * lib/backupfile.c (opendir, closedir): Undefine.
1308         * lib/chown.c (open, close): Undefine.
1309         * lib/clean-temp.c (open, close): Undefine.
1310         * lib/copy-file.c (open, close): Undefine.
1311         * lib/execute.c (open, close): Undefine.
1312         * lib/fsusage.c (open, close): Undefine.
1313         * lib/gc-gnulib.c (open, close): Undefine.
1314         * lib/getcwd.c (opendir, closedir): Undefine.
1315         * lib/glob.c (opendir, closedir): Undefine.
1316         * lib/javacomp.c (open, close): Undefine.
1317         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1318         * lib/openat-proc.c (open, close): Undefine.
1319         * lib/pagealign_alloc.c (open, close): Undefine.
1320         * lib/pipe.c (open, close): Undefine.
1321         * lib/progreloc.c (open, close): Undefine.
1322         * lib/savedir.c (opendir, closedir): Undefine.
1323         * lib/utime.c (open, close): Undefine.
1324         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1325
1326 2007-01-10  Bruno Haible  <bruno@clisp.org>
1327
1328         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1329
1330 2007-01-12  Eric Blake  <ebb9@byu.net>
1331
1332         Provide a robust <wchar.h>.  Further simplifications are now
1333         possible in other modules, but not included here.
1334         * modules/wchar: New module.
1335         * m4/wchar.m4: New file.
1336         * lib/wchar_.h: Likewise.
1337         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1338         of the new module.
1339         * MODULES.html.sh (Extended multibyte and wide character utilities):
1340         New section.
1341
1342 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1343
1344         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1345         to a reasonable default for memory allocation.
1346         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1347         file system that reports garbage st_size values for symlinks.
1348         Problem reported by Liyang Hu.
1349
1350 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1351
1352         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1353         Emacs .#* auto-save files).
1354
1355 2007-01-11  Bruno Haible  <bruno@clisp.org>
1356
1357         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1358         directory.
1359
1360 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1361
1362         Use @...@ consistently in lib/wctype_.h.
1363         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1364         on it being set to 1 or 0.
1365         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1366         go back to AC_SUBSTing it.
1367         * modules/wctype (Makefile.am): Undo previous change.
1368
1369 2007-01-10  Eric Blake  <ebb9@byu.net>
1370
1371         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1372         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1373         * modules/wctype (Makefile.am): Likewise.
1374         Reported by Chris McGuire.
1375
1376 2007-01-10  Jim Meyering  <jim@meyering.net>
1377
1378         fts.c: a small readability/maintainability improvement
1379         * lib/fts.c (fts_read): Make this code slightly more readable and
1380         maintainable by hoisting the "sp->fts_cur = p" assignments to
1381         immediately follow the statements that set P.  Derived from
1382         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1383
1384 2007-01-10  Eric Blake  <ebb9@byu.net>
1385
1386         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1387         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1388         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1389         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1390         Reported by Chris McGuire.
1391
1392 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1393
1394         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1395         in sed script.
1396
1397 2007-01-09  Bruno Haible  <bruno@clisp.org>
1398
1399         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1400         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1401         variables.
1402         (func_module): Use them.
1403
1404 2007-01-09  Bruno Haible  <bruno@clisp.org>
1405
1406         * modules/unistr/base: New file.
1407         * lib/unistr.h: New file.
1408
1409         * modules/unistr/u8-to-u16: New file.
1410         * lib/unistr/u8-to-u16.c: New file.
1411
1412         * modules/unistr/u8-to-u32: New file.
1413         * lib/unistr/u8-to-u32.c: New file.
1414
1415         * modules/unistr/u16-to-u8: New file.
1416         * lib/unistr/u16-to-u8.c: New file.
1417
1418         * modules/unistr/u16-to-u32: New file.
1419         * lib/unistr/u16-to-u32.c: New file.
1420
1421         * modules/unistr/u32-to-u8: New file.
1422         * lib/unistr/u32-to-u8.c: New file.
1423
1424         * modules/unistr/u32-to-u16: New file.
1425         * lib/unistr/u32-to-u16.c: New file.
1426
1427         * modules/unistr/u8-check: New file.
1428         * modules/unistr/u16-check: New file.
1429         * modules/unistr/u32-check: New file.
1430         * lib/unistr/u8-check.c: New file.
1431         * lib/unistr/u16-check.c: New file.
1432         * lib/unistr/u32-check.c: New file.
1433
1434         * modules/unistr/u8-chr: New file.
1435         * modules/unistr/u16-chr: New file.
1436         * modules/unistr/u32-chr: New file.
1437         * lib/unistr/u8-chr.c: New file.
1438         * lib/unistr/u16-chr.c: New file.
1439         * lib/unistr/u32-chr.c: New file.
1440
1441         * modules/unistr/u8-cmp: New file.
1442         * modules/unistr/u16-cmp: New file.
1443         * modules/unistr/u32-cmp: New file.
1444         * lib/unistr/u8-cmp.c: New file.
1445         * lib/unistr/u16-cmp.c: New file.
1446         * lib/unistr/u32-cmp.c: New file.
1447
1448         * modules/unistr/u8-cpy: New file.
1449         * modules/unistr/u16-cpy: New file.
1450         * modules/unistr/u32-cpy: New file.
1451         * lib/unistr/u8-cpy.c: New file.
1452         * lib/unistr/u16-cpy.c: New file.
1453         * lib/unistr/u32-cpy.c: New file.
1454         * lib/unistr/u-cpy.h: New file.
1455
1456         * modules/unistr/u8-cpy-alloc: New file.
1457         * modules/unistr/u16-cpy-alloc: New file.
1458         * modules/unistr/u32-cpy-alloc: New file.
1459         * lib/unistr/u8-cpy-alloc.c: New file.
1460         * lib/unistr/u16-cpy-alloc.c: New file.
1461         * lib/unistr/u32-cpy-alloc.c: New file.
1462         * lib/unistr/u-cpy-alloc.h: New file.
1463
1464         * modules/unistr/u8-endswith: New file.
1465         * modules/unistr/u16-endswith: New file.
1466         * modules/unistr/u32-endswith: New file.
1467         * lib/unistr/u8-endswith.c: New file.
1468         * lib/unistr/u16-endswith.c: New file.
1469         * lib/unistr/u32-endswith.c: New file.
1470         * lib/unistr/u-endswith.h: New file.
1471
1472         * modules/unistr/u8-mblen: New file.
1473         * modules/unistr/u16-mblen: New file.
1474         * modules/unistr/u32-mblen: New file.
1475         * lib/unistr/u8-mblen.c: New file.
1476         * lib/unistr/u16-mblen.c: New file.
1477         * lib/unistr/u32-mblen.c: New file.
1478
1479         * modules/unistr/u8-mbtouc: New file.
1480         * modules/unistr/u16-mbtouc: New file.
1481         * modules/unistr/u32-mbtouc: New file.
1482         * lib/unistr/u8-mbtouc.c: New file.
1483         * lib/unistr/u16-mbtouc.c: New file.
1484         * lib/unistr/u32-mbtouc.c: New file.
1485
1486         * modules/unistr/u8-mbtouc-safe: New file.
1487         * modules/unistr/u16-mbtouc-safe: New file.
1488         * modules/unistr/u32-mbtouc-safe: New file.
1489         * lib/unistr/u8-mbtouc-safe.c: New file.
1490         * lib/unistr/u16-mbtouc-safe.c: New file.
1491         * lib/unistr/u32-mbtouc-safe.c: New file.
1492
1493         * modules/unistr/u8-move: New file.
1494         * modules/unistr/u16-move: New file.
1495         * modules/unistr/u32-move: New file.
1496         * lib/unistr/u8-move.c: New file.
1497         * lib/unistr/u16-move.c: New file.
1498         * lib/unistr/u32-move.c: New file.
1499         * lib/unistr/u-move.h: New file.
1500
1501         * modules/unistr/u8-next: New file.
1502         * modules/unistr/u16-next: New file.
1503         * modules/unistr/u32-next: New file.
1504         * lib/unistr/u8-next.c: New file.
1505         * lib/unistr/u16-next.c: New file.
1506         * lib/unistr/u32-next.c: New file.
1507
1508         * modules/unistr/u8-prev: New file.
1509         * modules/unistr/u16-prev: New file.
1510         * modules/unistr/u32-prev: New file.
1511         * lib/unistr/u8-prev.c: New file.
1512         * lib/unistr/u16-prev.c: New file.
1513         * lib/unistr/u32-prev.c: New file.
1514
1515         * modules/unistr/u8-set: New file.
1516         * modules/unistr/u16-set: New file.
1517         * modules/unistr/u32-set: New file.
1518         * lib/unistr/u8-set.c: New file.
1519         * lib/unistr/u16-set.c: New file.
1520         * lib/unistr/u32-set.c: New file.
1521         * lib/unistr/u-set.h: New file.
1522
1523         * modules/unistr/u8-startswith: New file.
1524         * modules/unistr/u16-startswith: New file.
1525         * modules/unistr/u32-startswith: New file.
1526         * lib/unistr/u8-startswith.c: New file.
1527         * lib/unistr/u16-startswith.c: New file.
1528         * lib/unistr/u32-startswith.c: New file.
1529         * lib/unistr/u-startswith.h: New file.
1530
1531         * modules/unistr/u8-stpcpy: New file.
1532         * modules/unistr/u16-stpcpy: New file.
1533         * modules/unistr/u32-stpcpy: New file.
1534         * lib/unistr/u8-stpcpy.c: New file.
1535         * lib/unistr/u16-stpcpy.c: New file.
1536         * lib/unistr/u32-stpcpy.c: New file.
1537         * lib/unistr/u-stpcpy.h: New file.
1538
1539         * modules/unistr/u8-stpncpy: New file.
1540         * modules/unistr/u16-stpncpy: New file.
1541         * modules/unistr/u32-stpncpy: New file.
1542         * lib/unistr/u8-stpncpy.c: New file.
1543         * lib/unistr/u16-stpncpy.c: New file.
1544         * lib/unistr/u32-stpncpy.c: New file.
1545         * lib/unistr/u-stpncpy.h: New file.
1546
1547         * modules/unistr/u8-strcat: New file.
1548         * modules/unistr/u16-strcat: New file.
1549         * modules/unistr/u32-strcat: New file.
1550         * lib/unistr/u8-strcat.c: New file.
1551         * lib/unistr/u16-strcat.c: New file.
1552         * lib/unistr/u32-strcat.c: New file.
1553         * lib/unistr/u-strcat.h: New file.
1554
1555         * modules/unistr/u8-strchr: New file.
1556         * modules/unistr/u16-strchr: New file.
1557         * modules/unistr/u32-strchr: New file.
1558         * lib/unistr/u8-strchr.c: New file.
1559         * lib/unistr/u16-strchr.c: New file.
1560         * lib/unistr/u32-strchr.c: New file.
1561
1562         * modules/unistr/u8-strcmp: New file.
1563         * modules/unistr/u16-strcmp: New file.
1564         * modules/unistr/u32-strcmp: New file.
1565         * lib/unistr/u8-strcmp.c: New file.
1566         * lib/unistr/u16-strcmp.c: New file.
1567         * lib/unistr/u32-strcmp.c: New file.
1568
1569         * modules/unistr/u8-strcpy: New file.
1570         * modules/unistr/u16-strcpy: New file.
1571         * modules/unistr/u32-strcpy: New file.
1572         * lib/unistr/u8-strcpy.c: New file.
1573         * lib/unistr/u16-strcpy.c: New file.
1574         * lib/unistr/u32-strcpy.c: New file.
1575         * lib/unistr/u-strcpy.h: New file.
1576
1577         * modules/unistr/u8-strcspn: New file.
1578         * modules/unistr/u16-strcspn: New file.
1579         * modules/unistr/u32-strcspn: New file.
1580         * lib/unistr/u8-strcspn.c: New file.
1581         * lib/unistr/u16-strcspn.c: New file.
1582         * lib/unistr/u32-strcspn.c: New file.
1583         * lib/unistr/u-strcspn.h: New file.
1584
1585         * modules/unistr/u8-strdup: New file.
1586         * modules/unistr/u16-strdup: New file.
1587         * modules/unistr/u32-strdup: New file.
1588         * lib/unistr/u8-strdup.c: New file.
1589         * lib/unistr/u16-strdup.c: New file.
1590         * lib/unistr/u32-strdup.c: New file.
1591         * lib/unistr/u-strdup.h: New file.
1592
1593         * modules/unistr/u8-strlen: New file.
1594         * modules/unistr/u16-strlen: New file.
1595         * modules/unistr/u32-strlen: New file.
1596         * lib/unistr/u8-strlen.c: New file.
1597         * lib/unistr/u16-strlen.c: New file.
1598         * lib/unistr/u32-strlen.c: New file.
1599         * lib/unistr/u-strlen.h: New file.
1600
1601         * modules/unistr/u8-strmblen: New file.
1602         * modules/unistr/u16-strmblen: New file.
1603         * modules/unistr/u32-strmblen: New file.
1604         * lib/unistr/u8-strmblen.c: New file.
1605         * lib/unistr/u16-strmblen.c: New file.
1606         * lib/unistr/u32-strmblen.c: New file.
1607
1608         * modules/unistr/u8-strmbtouc: New file.
1609         * modules/unistr/u16-strmbtouc: New file.
1610         * modules/unistr/u32-strmbtouc: New file.
1611         * lib/unistr/u8-strmbtouc.c: New file.
1612         * lib/unistr/u16-strmbtouc.c: New file.
1613         * lib/unistr/u32-strmbtouc.c: New file.
1614
1615         * modules/unistr/u8-strncat: New file.
1616         * modules/unistr/u16-strncat: New file.
1617         * modules/unistr/u32-strncat: New file.
1618         * lib/unistr/u8-strncat.c: New file.
1619         * lib/unistr/u16-strncat.c: New file.
1620         * lib/unistr/u32-strncat.c: New file.
1621         * lib/unistr/u-strncat.h: New file.
1622
1623         * modules/unistr/u8-strncmp: New file.
1624         * modules/unistr/u16-strncmp: New file.
1625         * modules/unistr/u32-strncmp: New file.
1626         * lib/unistr/u8-strncmp.c: New file.
1627         * lib/unistr/u16-strncmp.c: New file.
1628         * lib/unistr/u32-strncmp.c: New file.
1629
1630         * modules/unistr/u8-strncpy: New file.
1631         * modules/unistr/u16-strncpy: New file.
1632         * modules/unistr/u32-strncpy: New file.
1633         * lib/unistr/u8-strncpy.c: New file.
1634         * lib/unistr/u16-strncpy.c: New file.
1635         * lib/unistr/u32-strncpy.c: New file.
1636         * lib/unistr/u-strncpy.h: New file.
1637
1638         * modules/unistr/u8-strnlen: New file.
1639         * modules/unistr/u16-strnlen: New file.
1640         * modules/unistr/u32-strnlen: New file.
1641         * lib/unistr/u8-strnlen.c: New file.
1642         * lib/unistr/u16-strnlen.c: New file.
1643         * lib/unistr/u32-strnlen.c: New file.
1644         * lib/unistr/u-strnlen.h: New file.
1645
1646         * modules/unistr/u8-strpbrk: New file.
1647         * modules/unistr/u16-strpbrk: New file.
1648         * modules/unistr/u32-strpbrk: New file.
1649         * lib/unistr/u8-strpbrk.c: New file.
1650         * lib/unistr/u16-strpbrk.c: New file.
1651         * lib/unistr/u32-strpbrk.c: New file.
1652         * lib/unistr/u-strpbrk.h: New file.
1653
1654         * modules/unistr/u8-strrchr: New file.
1655         * modules/unistr/u16-strrchr: New file.
1656         * modules/unistr/u32-strrchr: New file.
1657         * lib/unistr/u8-strrchr.c: New file.
1658         * lib/unistr/u16-strrchr.c: New file.
1659         * lib/unistr/u32-strrchr.c: New file.
1660
1661         * modules/unistr/u8-strspn: New file.
1662         * modules/unistr/u16-strspn: New file.
1663         * modules/unistr/u32-strspn: New file.
1664         * lib/unistr/u8-strspn.c: New file.
1665         * lib/unistr/u16-strspn.c: New file.
1666         * lib/unistr/u32-strspn.c: New file.
1667         * lib/unistr/u-strspn.h: New file.
1668
1669         * modules/unistr/u8-strstr: New file.
1670         * modules/unistr/u16-strstr: New file.
1671         * modules/unistr/u32-strstr: New file.
1672         * lib/unistr/u8-strstr.c: New file.
1673         * lib/unistr/u16-strstr.c: New file.
1674         * lib/unistr/u32-strstr.c: New file.
1675         * lib/unistr/u-strstr.h: New file.
1676
1677         * modules/unistr/u8-strtok: New file.
1678         * modules/unistr/u16-strtok: New file.
1679         * modules/unistr/u32-strtok: New file.
1680         * lib/unistr/u8-strtok.c: New file.
1681         * lib/unistr/u16-strtok.c: New file.
1682         * lib/unistr/u32-strtok.c: New file.
1683         * lib/unistr/u-strtok.h: New file.
1684
1685         * modules/unistr/u8-uctomb: New file.
1686         * modules/unistr/u16-uctomb: New file.
1687         * modules/unistr/u32-uctomb: New file.
1688         * lib/unistr/u8-uctomb.c: New file.
1689         * lib/unistr/u16-uctomb.c: New file.
1690         * lib/unistr/u32-uctomb.c: New file.
1691
1692         * MODULES.html.sh (Unicode string functions): Add the new modules.
1693
1694 2007-01-08  Bruno Haible  <bruno@clisp.org>
1695
1696         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1697         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1698         subdirectories.
1699
1700 2007-01-08  Karl Berry  <karl@gnu.org>
1701
1702         * doc/error.texi: mention that main() fns must set program_name
1703         when progname is used.
1704
1705 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1706
1707         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1708         WCTYPE_H is empty, for the benefit of builds from non-distclean
1709         directories.  Problem reported by Eric Blake in
1710         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1711
1712 2007-01-08  Bruno Haible  <bruno@clisp.org>
1713
1714         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1715         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1716         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1717         PROVIDE_CANONICALIZE_FILENAME_MODE.
1718         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1719
1720 2007-01-08  Bruno Haible  <bruno@clisp.org>
1721
1722         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1723         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1724         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1725         * lib/fts.c: Likewise.
1726         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1727
1728 2006-12-25  Bruno Haible  <bruno@clisp.org>
1729
1730         * modules/utf8-ucs4-safe: New file.
1731         * lib/utf8-ucs4-safe.h: New file.
1732         * lib/unistr/utf8-ucs4-safe.c: New file.
1733
1734         * modules/utf16-ucs4-safe: New file.
1735         * lib/utf16-ucs4-safe.h: New file.
1736         * lib/unistr/utf16-ucs4-safe.c: New file.
1737
1738         * MODULES.html.sh (Unicode string functions): Add the new modules.
1739
1740 2007-01-08  Bruno Haible  <bruno@clisp.org>
1741
1742         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1743         (Depends-on): Add unitypes.
1744         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1745         (u8_mbtouc_aux): Move out to separate file.
1746         (u8_mbtouc): Use ucs4_t, uint8_t types.
1747         * lib/unistr/utf8-ucs4.c: New file.
1748
1749         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1750         (Depends-on): Add unitypes.
1751         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1752         (u16_mbtouc_aux): Move out to separate file.
1753         (u16_mbtouc): Use ucs4_t, uint16_t types.
1754         * lib/unistr/utf16-ucs4.c: New file.
1755
1756         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1757         (Depends-on): Add unitypes.
1758         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1759         (u8_uctomb_aux): Move out to separate file.
1760         (u8_uctomb): Use ucs4_t, uint8_t types.
1761         * lib/unistr/ucs4-utf8.c: New file.
1762
1763         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1764         (Depends-on): Add unitypes.
1765         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1766         (u16_uctomb_aux): Move out to separate file.
1767         (u16_uctomb): Use ucs4_t, uint16_t types.
1768         * lib/unistr/ucs4-utf16.c: New file.
1769
1770 2006-12-25  Bruno Haible  <bruno@clisp.org>
1771
1772         * modules/unitypes: New file.
1773         * lib/unitypes.h: New file.
1774         * MODULES.html.sh (func_all_modules): New section "Unicode string
1775         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1776         this section. Add unitypes.
1777
1778 2007-01-08  Bruno Haible  <bruno@clisp.org>
1779
1780         Avoid variable names that conflict with those from libtool.
1781         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1782         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1783         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1784         library_names_spec to acl_library_names_spec, hardcode_* to
1785         acl_hardcode_*.
1786         Reported by Ralf Wildenhues.
1787
1788 2007-01-08  Bruno Haible  <bruno@clisp.org>
1789
1790         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1791         definition.
1792         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1793         definition.
1794         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1795         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1796         definition.
1797         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1798         definition.
1799         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1800         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1801         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1802         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1803         definition.
1804         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1805         definition.
1806         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1807         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1808         GC_USE_<algorithm>.
1809         * lib/gc-libgcrypt.c: Likewise.
1810         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1811         * modules/gc-arctwo (configure.ac): Likewise.
1812         * modules/gc-des (configure.ac): Likewise.
1813         * modules/gc-hmac-md5 (configure.ac): Likewise.
1814         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1815         * modules/gc-md2 (configure.ac): Likewise.
1816         * modules/gc-md4 (configure.ac): Likewise.
1817         * modules/gc-md5 (configure.ac): Likewise.
1818         * modules/gc-random (configure.ac): Likewise.
1819         * modules/gc-rijndael (configure.ac): Likewise.
1820         * modules/gc-sha1 (configure.ac): Likewise.
1821
1822 2007-01-08  Bruno Haible  <bruno@clisp.org>
1823
1824         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1825         macro definition.
1826         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1827         definition.
1828         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1829         definition.
1830         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1831         * modules/fcntl-safer (configure.ac): Likewise.
1832         * modules/fopen-safer (configure.ac): Likewise.
1833         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1834         GNULIB_FWRITEERROR macro definition.
1835
1836 2007-01-08  Bruno Haible  <bruno@clisp.org>
1837
1838         * m4/gnulib-common.m4: New file.
1839         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1840         (func_get_filelist): Add m4/gnulib-common.m4.
1841
1842 2007-01-08  Bruno Haible  <bruno@clisp.org>
1843
1844         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1845         command.
1846
1847 2007-01-08  Jim Meyering  <jim@meyering.net>
1848
1849         Use a more robust test for a "can't happen" condition.
1850         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1851         narrowed the st_size value.  Presuming the "can't happen" condition
1852         is true, that narrowing could conceivably convert an invalid st_size
1853         value into a valid one.  Instead, use a change based on Matthew
1854         Woehlke's original patch.
1855
1856         Slight readability improvement: use an assert-like macro
1857         in place of literal "abort ()" uses.
1858         * lib/fts.c (fts_assert): Define.
1859         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1860         Use this macro instead of a bare 'abort'.
1861
1862 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1863
1864         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1865         simply work around them.
1866         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1867         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1868         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1869         Don't bother to define as macros, since the standard doesn't require it.
1870         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1871         longer worry about IRIX 5.3.
1872         (HAVE_WCTYPE_CTMP_BUG): Remove.
1873
1874 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1875
1876         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1877         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1878         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1879         Problems reported by Georg Schwarz for IRIX 5.3.
1880
1881         * gnulib-tool (autoconf_minversion): Take the maximum version number
1882         found, not the minimum.  Problem reported by James Youngman.
1883
1884 2007-01-03  Karl Berry  <karl@gnu.org>
1885
1886         * doc/error.texi: new file, explaining interaction with progname.
1887         * doc/gnulib.texi: include it.  Update copyright.
1888
1889 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1890
1891         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1892         AC_CANONICAL_HOST, to improve autobuild outputs.
1893
1894 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1895             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1896
1897         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1898         sockets, server sockets, and other file descriptors.  Count errors
1899         to compute the return value.  Reorder the code a bit to be easier
1900         to follow.  Don't set event bits that were not requested (except
1901         POLLERR and POLLHUP).
1902
1903 2007-01-01  Bruno Haible  <bruno@clisp.org>
1904
1905         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1906
1907 2007-01-03  Jim Meyering  <jim@meyering.net>
1908
1909         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1910
1911 2007-01-02  Bruno Haible  <bruno@clisp.org>
1912
1913         * modules/settime (Include): Require timespec.h.
1914         * modules/nanosleep (Include): Likewise.
1915
1916 2007-01-01  Bruno Haible  <bruno@clisp.org>
1917
1918         * gnulib-tool (func_emit_copyright_notice): Bump year.
1919         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1920
1921 2007-01-01  Bruno Haible  <bruno@clisp.org>
1922
1923         Improve support for OpenBSD.
1924         * build-aux/config.rpath (libname_spec): Export.
1925         (library_names_spec): New variable. Export.
1926         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1927         library_names_spec from the config.rpath output. Locate shared library
1928         through the name pattern in library_names_spec.
1929
1930 2007-01-01  Eric Blake  <ebb9@byu.net>
1931
1932         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1933
1934 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1935
1936         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1937         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1938         assume the C locale, and avoid an "eval" that could cause trouble.
1939         Problem with SORT reported by Bob Proulx.
1940
1941         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1942         Define.  Trivial patch from Henning Nielsen Lund, originally
1943         sent to bug-grep@gnu.org today.
1944
1945 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1946
1947         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
1948         struct stat.  Problem reported by Henning Nielsen Lund.
1949         * lib/acl.c: Include acl.h first, to check interface.  Don't
1950         bother to include sys/types.h and sys/stat.h again.
1951
1952 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
1953
1954         Import the following change from libc; problem reported by
1955         Sven Verdoolaege.
1956
1957         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
1958
1959         [BZ #1373]
1960         * lib/argp.h: Remove __NTH for __argp_usage inline function.
1961
1962 2006-12-28  Jim Meyering  <jim@meyering.net>
1963
1964         * build-aux/announce-gen: Do not assume that the package
1965         builds any of tar.gz, tar.bz2, and .xdelta files.
1966         Suggestion from Simon Josefsson.
1967
1968 2006-12-28  Simon Josefsson  <simon@josefsson.org>
1969
1970         * modules/announce-gen: New file.
1971
1972 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
1973
1974         * lib/mbchar.h: Just include <wctype.h>; the wctype module
1975         handles its gotchas now.
1976         * lib/mbswidth.c: Likewise.
1977         * lib/wcwidth.h: Likewise.
1978         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
1979         and iswcntrl; the wctype module does this stuff now.
1980         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
1981         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1982         * modules/mbchar (Depends-on): Add wctype.
1983         * modules/mbswidth (Depends-on): Likewise.
1984         * modules/wcwidth (Depends-on): Likewise.
1985
1986 2006-12-27  Eric Blake  <ebb9@byu.net>
1987
1988         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
1989         module uses more than what <wctype.h> is required to provide.
1990
1991 2006-12-26  Eric Blake  <ebb9@byu.net>
1992
1993         * gnulib-tool (sed_extract_prog): Avoid space-tab.
1994
1995 2006-12-26  Eric Blake  <ebb9@byu.net>
1996
1997         * modules/absolute-header: New module.
1998         * modules/fcntl (Depends-on): Depend on it.
1999         * modules/inttypes (Depends-on): Likewise.
2000         * modules/stdint (Depends-on): Likewise.
2001         * modules/sys_stat (Depends-on): Likewise.
2002         * modules/wctype (Depends-on): Likewise.
2003         * MODULES.html.sh (Support for building libraries and
2004         executables): Document it.
2005
2006 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2007
2008         * gnulib-tool (SED): Remove, undoing previous change.
2009         The problem was that it broke coreutils on Solaris, because
2010         "sed --posix" leaked into a makefile.
2011         (sed): New alias, if 'alias' and GNU sed.
2012
2013 2006-12-24  Jim Meyering  <jim@meyering.net>
2014
2015         Work around an fchownat bug in glibc-2.4:
2016         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2017         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2018         in spite of the -P option.
2019         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2020         New macros.
2021         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2022         * modules/openat (Files): Add lib/fchownat.c.
2023         * lib/openat.c (fchownat): Don't define here.  Move to...
2024         * lib/fchownat.c: ...this new file.
2025
2026 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2027
2028         Fix bug reported by Bruno Haible in
2029         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2030         where quotearg.c didn't compile on Mac OS X 10.2 because it
2031         lacks <wchar.h> and wint_t.
2032         * lib/wctype_.h (__wctype_wint_t): New type.
2033         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2034         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2035         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2036         Arg is now of type __wctype_wint_t, not wint_t.
2037         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2038         substitute HAVE_WINT_T.
2039         * modules/wctype (Files): Add m4/wint_t.m4.
2040         (wctype.h): Substitute HAVE_WINT_T.
2041
2042 2006-12-23  Bruno Haible  <bruno@clisp.org>
2043
2044         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2045
2046 2006-12-23  Bruno Haible  <bruno@clisp.org>
2047
2048         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2049         S_ISLNK.
2050         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2051         mingw.
2052
2053 2006-12-22  Bruno Haible  <bruno@clisp.org>
2054
2055         * lib/copy-file.c: Include acl.h.
2056         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2057         Close the file descriptors only after being done with copy_acl.
2058         * modules/copy-file (Depends-on): Add acl.
2059
2060 2006-12-22  Bruno Haible  <bruno@clisp.org>
2061
2062         * gnulib-tool (SED): New variable.
2063         Use $SED instead of sed everywhere.
2064
2065 2006-12-22  Bruno Haible  <bruno@clisp.org>
2066
2067         * modules/no-c++: New file.
2068         * m4/no-c++.m4: New file.
2069         * MODULES.html.sh (Support for building libraries and executables):
2070         Add no-c++.
2071
2072 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2073
2074         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2075         Include <limits.h>, and use its INT_MAX to rewrite the
2076         j loop so that it does not overflow 'int'.  Problem reported by
2077         Ralf Wildenhues in
2078         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2079         Play it safe by shifting left by 1 rather than multiplying by 2,
2080         as GCC is less likely to optimize this away when the value
2081         is signed (when it assumes overflow leads to undefined behavior).
2082         Also, don't assume time_t uses two's complement.
2083
2084 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2085
2086         * MODULES.html.sh: New module wctype.
2087         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2088         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2089         <wctype.h>, since the new wctype module should fix this.
2090         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2091         the wctype module should arrange for it.
2092         * lib/regex_internal.h: Likewise.
2093         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2094         since the wctype module should handle this now.
2095         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2096         * modules/fnmatch (Depends-on): Add wctype.
2097         * modules/quotearg (Depends-on): Likewise.
2098         * modules/regex (Depends-on): Likewise.
2099
2100 2006-12-19  Bruno Haible  <bruno@clisp.org>
2101
2102         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2103         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2104
2105 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2106
2107         * modules/savewd (Depends-on): Fix dependency on fcntl.
2108
2109 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2110
2111         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2112         conforms to C99, rather than relying on the user's environment
2113         setting of STDINT_H.
2114
2115 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2116         and Eric Blake  <ebb9@byu.net>
2117
2118         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2119         This is more consistent with the other defines here.
2120         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2121         Port to z/OS.  Problem reported by Paul Gilmartin.
2122         Change local vars to use gl_ prefix rather than ac_.
2123         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2124         with other defines.
2125         * modules/double-slash-root: New module.
2126         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2127         (Depends-on): Add double-slash-root.
2128         * MODULES.html.sh (File system functions): Mention new module.
2129
2130 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2131
2132         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2133         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2134         This is for the benefit of gzip, which doesn't do i18n.
2135
2136 2006-12-12  Jim Meyering  <jim@meyering.net>
2137
2138         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2139         Reported by Andreas Schwab <schwab@suse.de>.
2140
2141 2006-12-12  Bruno Haible  <bruno@clisp.org>
2142
2143         Merge these changes.
2144         2006-09-05  Bruno Haible  <bruno@clisp.org>
2145         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2146         iconv_alloc succeeded.
2147         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2148         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2149         test for " && dest " at the end - dest is always != NULL there. Call
2150         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2151         with 2xNULL arguments, also to flush the state storage. Handle the
2152         IRIX iconv behaviour. Realloc the final result, to throw away unused
2153         memory.
2154
2155 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2156
2157         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2158         and fchmodat unconditionally, since glibc 2.4 has them.
2159         Problem reported by Arkadiusz Miskiewicz.
2160
2161 2006-12-10  Bruno Haible  <bruno@clisp.org>
2162
2163         * gnulib-tool (func_import): Show the include files only for those
2164         modules that are copied and specified.
2165         Reported by Karl Berry.
2166
2167 2006-12-08  Jim Meyering  <jim@meyering.net>
2168
2169         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2170         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2171
2172         * build-aux/announce-gen: Add two new options, both optional:
2173         --bootstrap-tools=TOOL_LIST
2174               a comma-separated list of tools, e.g.,
2175               autoconf,automake,bison,gnulib
2176         --gnulib-snapshot-date=DATE
2177               if gnulib is in the bootstrap tool list,
2178               then report this as the snapshot date.
2179               If not specified, use the current date/time.
2180               If you specify a date here, be sure it's UTC.
2181
2182 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2183
2184         * tests/test-argp-2.sh: Fix test to match actual output.
2185         (func_compare): Fix sed script to be portable.
2186
2187 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2188
2189         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2190         workaround for this case.  It is not autoconfigured now; offhand
2191         it's hard to see how to autoconfigure it.
2192
2193 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2194
2195         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2196         a directory that is about to be chowned.  Such a directory's
2197         initial file permissions should permit the owner only and this
2198         should not be changed until after the chown, since the group and
2199         other bits would be incorrect if they granted permission before
2200         the chown.
2201
2202         Fix porting problem for iswctype reported by Georg Schwarz in:
2203         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2204         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2205         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2206         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2207         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2208
2209 2006-12-03  Jim Meyering  <jim@meyering.net>
2210
2211         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2212         p->fts_statp may not yet be defined.
2213         (fts_read): Instead, set it in the caller, once p->fts_statp is
2214         sure to be defined, and corresponds to a top-level directory.
2215         This bug made du -x fail.  Here's the coreutils test case:
2216         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2217         Reported by Mike Frysinger.
2218
2219 2006-12-01  Jim Meyering  <jim@meyering.net>
2220
2221         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2222         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2223         Reported by Simon Josefsson.
2224
2225 2006-11-30  Jim Meyering  <jim@meyering.net>
2226
2227         * m4/warning.m4: Use the all-permissive copyright notice
2228         recommended by RMS (rather than LGPL).
2229         * m4/vararrays.m4: Likewise.
2230         * m4/flexmember.m4: Likewise.
2231
2232 2006-11-29  Bruno Haible  <bruno@clisp.org>
2233
2234         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2235         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2236         using +=.
2237         Reported by Simon Josefsson <simon@josefsson.org>.
2238
2239 2006-11-28  James Youngman <jay@gnu.org>
2240
2241         * README: Advise users that they might find the bug-gnulib@gnu.org
2242         and autotools-announce@gnu.org mailing lists useful.
2243
2244 2006-11-28  Bruno Haible  <bruno@clisp.org>
2245
2246         * m4/ptrdiff_max.m4: Remove file.
2247
2248 2006-11-21  Bruno Haible  <bruno@clisp.org>
2249
2250         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2251         _AC_COMPUTE_INT.
2252         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2253         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2254         _AC_COMPUTE_INT.
2255         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2256         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2257         _AC_COMPUTE_INT.
2258         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2259
2260 2006-11-28  Jim Meyering  <jim@meyering.net>
2261
2262         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2263         warning from "gcc -Wshadow" about shadowing the builtin.
2264
2265 2006-11-27  Bruno Haible  <bruno@clisp.org>
2266
2267         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2268         _AC_COMPUTE_INT.
2269         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2270
2271 2006-11-27  Bruno Haible  <bruno@clisp.org>
2272             Paul Eggert  <eggert@cs.ucla.edu>
2273
2274         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2275
2276 2006-11-26  Bruno Haible  <bruno@clisp.org>
2277
2278         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2279         noinst_LTLIBRARIES.
2280
2281 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2282             Bruno Haible  <bruno@clisp.org>
2283
2284         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2285         if compiling with "gcc -ansi".
2286
2287 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2288
2289         Fix some incompatibilities with gcc -ansi -pedantic.
2290         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2291         if compiling pedantically with GCC, unless it's C99 or later.
2292         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2293         it mishandles gcc -ansi -pedantic as well.
2294         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2295         if gcc -pedantic.
2296         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2297         initializers for struct if -pedantic, unless it's C99 or later.
2298
2299 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2300
2301         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2302         Don't close an fd more than once. Identical atimes indicate
2303         success, not failure.
2304
2305 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2306
2307         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2308
2309 2006-11-23  Jim Meyering  <jim@meyering.net>
2310
2311         * build-aux/announce-gen: New file.  From coreutils.
2312
2313 2006-11-22  Jim Meyering  <jim@meyering.net>
2314
2315         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2316         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2317         (fts_read): Use a temporary to narrow the overused st_size member
2318         before using it in a switch statement.  Reported by Matthew Woehlke.
2319
2320         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2321         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2322
2323 2006-11-20  Bruno Haible  <bruno@clisp.org>
2324
2325         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2326         changequote instead of pairs of brackets.
2327         Reported by Andreas Schwab <schwab@suse.de>.
2328
2329 2006-11-21  Jim Meyering  <jim@meyering.net>
2330
2331         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2332         so as to remain compatible with older compilers.
2333         Patch from Michael Deutschmann.
2334
2335 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2336
2337         * MODULES.html.sh (File system functions): Add openat.
2338
2339         * lib/openat.h (rpl_fstatat): New macro, if
2340         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2341         (fstatat): Define to rpl_fstatat under the same conditions,
2342         unless COMPILING_FSTATAT.
2343         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2344         seems to have the bug.
2345         * lib/fstatat.c: New file.
2346         * modules/openat (Files): Add it.
2347
2348 2006-11-20  Bruno Haible  <bruno@clisp.org>
2349
2350         * Makefile: New file.
2351
2352 2006-11-20  Jim Meyering  <jim@meyering.net>
2353
2354         The beginnings of syntax-related checks for gnulib.
2355         * lib/Makefile: New file.
2356         * lib/t-idcache: New script.  Ensure that the two halves of
2357         idcache.c stay in sync.
2358
2359         * lib/idcache.c: Adjust comments in user- and group- portions to
2360         be more accurate, and to be consistent with one another.
2361
2362 2006-11-20  Jim Meyering  <jim@meyering.net>
2363
2364         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2365         continue using the flexible array member (thus, this module performs
2366         half as many malloc calls), with the addition that...
2367         (getgroup, getuser): Consistently record a non-match via an empty
2368         "name" string, and map an empty string match to a NULL return value.
2369         * modules/idcache (Depends-on): Re-add flexmember.
2370
2371         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2372         (getuidbyname, getgroup, getgidbyname): Likewise.
2373
2374         Use cleaner syntax: NULL rather than 0.
2375         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2376
2377 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2378
2379         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2380         It mishandled the case where the group was missing.
2381         Problem reported by Greg Schafer.
2382         * modules/idcache: Likewise.
2383
2384 2006-11-18  Jim Meyering  <jim@meyering.net>
2385
2386         * check-module (%exempt_header): Add exception for some
2387         conditionally-included headers.
2388
2389         * modules/i-ring (Depends-on): Add verify.
2390         (License): Change to LGPL.
2391
2392 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2393
2394         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2395         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2396         and inttostr.h.  Use snprintf rather than uinttostr, so that
2397         LGPLed code doesn't depend on GPLed.
2398
2399 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2400
2401         * modules/inline (License): Change from GPL to LGPL.
2402
2403 2006-11-17  Jim Meyering  <jim@meyering.net>
2404
2405         * modules/d-type (License): Switch to LGPL.
2406
2407 2006-11-15  Bruno Haible  <bruno@clisp.org>
2408
2409         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2410
2411 2006-11-15  Eric Blake  <ebb9@byu.net>
2412
2413         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2414         the module dependency.
2415
2416 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2417             Bruno Haible  <bruno@clisp.org>
2418
2419         * gnulib-tool (func_create_testdir): Add license consistency check.
2420
2421 2006-11-15  Eric Blake  <ebb9@byu.net>
2422
2423         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2424         random "(cached)" in configure output.
2425
2426 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2427
2428         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2429         test for conforming inttypes.h is both announced and cached.
2430
2431         * MODULES.html.sh (seen_modules, seen_files): New variables.
2432         (func_module): Rewrite to use a few less gnulib-tool and sed
2433         invocations.  Avoid a couple of quadratic algorithms for ...
2434         (missed_modules, missed_files): ... these, with ...
2435         (func_append, func_tmpdir): ... these new functions, from
2436         gnulib-tool.  Analogously, install traps for cleanup.
2437
2438         * tests/test-gc.c (main): Remove unused variables.
2439         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2440
2441 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2442
2443         * modules/inttostr (License): Change to LGPL.
2444
2445 2006-11-14  Eric Blake  <ebb9@byu.net>
2446
2447         * modules/tempname (License): Change to LGPL.
2448
2449 2006-11-14  Eric Blake  <ebb9@byu.net>
2450
2451         * doc/functions.texi (Function Portability): *printf functions on
2452         Cygwin now understand all POSIX size specifiers.
2453
2454 2006-11-14  Bruno Haible  <bruno@clisp.org>
2455
2456         * modules/c-ctype (License): Change to LGPL.
2457
2458 2006-11-12  Bruno Haible  <bruno@clisp.org>
2459
2460         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2461         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2462         for GNOME libraries, for which the include files are installed in
2463         subdirectories of $prefix/include.
2464
2465 2006-11-12  Bruno Haible  <bruno@clisp.org>
2466
2467         * m4/lib-link.m4: Require at least autoconf-2.54.
2468         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2469         name to underscores for the --with option.
2470
2471 2006-11-13  Bruno Haible  <bruno@clisp.org>
2472
2473         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2474         the tests directory.
2475         Reported by Ralf Wildenhues.
2476
2477 2006-11-13  Bruno Haible  <bruno@clisp.org>
2478
2479         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2480         (func_emit_initmacro_end): Undo the override here.
2481         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2482         Works around the famous automake error in coreutils.
2483
2484 2006-11-13  Eric Blake  <ebb9@byu.net>
2485
2486         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2487         element, not its node.
2488
2489 2006-11-12  Bruno Haible  <bruno@clisp.org>
2490
2491         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2492         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2493
2494 2006-11-12  Bruno Haible  <bruno@clisp.org>
2495
2496         * gnulib-tool: New option --local-symlink.
2497         (func_usage): Document it.
2498         (lsymbolic): New variable.
2499         (func_import, func_create_testdir): If --symlink was not specified,
2500         test whether --local-symlink was specified and the file comes from
2501         the local_gnulib_dir.
2502
2503 2006-11-12  Bruno Haible  <bruno@clisp.org>
2504
2505         * gnulib-tool (func_ln): New function.
2506         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2507
2508 2006-11-12  Bruno Haible  <bruno@clisp.org>
2509
2510         Finish support for source files in subdirectories.
2511         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2512         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2513         AUTOMAKE_OPTIONS.
2514         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2515
2516 2006-11-12  Bruno Haible  <bruno@clisp.org>
2517
2518         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2519         EXTRA_lib_SOURCES augmentation.
2520         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2521
2522 2006-11-12  Jim Meyering  <jim@meyering.net>
2523
2524         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2525         file descriptors.  This also averts a failure on systems with
2526         native openat support when a traversed directory lacks "x" access.
2527         * lib/fts_.h: Include "i-ring.h"
2528         (struct FTS) [fts_fd_ring]: New member.
2529         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2530         (FCHDIR): Add parentheses.
2531         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2532         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2533         When descending, rather than simply closing the previous
2534         fts_cwd_fd value, push that file descriptor onto the ring.
2535         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2536         (fts_open): Initialize the new fd_ring member.
2537         (fts_close): Clear the ring.
2538         (fts_safe_changedir): When possible, use our new fd_ring to skip
2539         the diropen and fstat and dev/ino comparison that would normally
2540         accompany a virtual `chdir ("..")'.
2541
2542         * modules/fts (Depends-on): Add i-ring.
2543         * modules/i-ring: New module.
2544         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2545         * m4/i-ring.m4: New file.
2546
2547 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2548
2549         * gnulib-tool (func_create_testdir): Fix replacement of
2550         `build-aux' in configure.ac.  Run autotools in gltests
2551         subdirectory.
2552         (func_create_testdir, func_create_megatestdir, test): There is
2553         no need for '--force' in most autotool invocations in a new
2554         tree.  Actually fail the whole test if any of the tools, or the
2555         configure or make stages fail.
2556
2557         Sync from Automake.
2558         * build-aux/gnupload: Revert last change.  Add pointer to upload
2559         instructions of the GNU Maintenance Instructions.
2560         Suggestion by Karl Berry.
2561
2562 2006-11-10  Jim Meyering  <jim@meyering.net>
2563
2564         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2565
2566 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2567
2568         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2569         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2570         (bind_textdomain_codeset) [! ENABLE_NLS]:
2571         Evaluate all the arguments.  That way, callers get compatible behavior
2572         if the arguments have side effects.  Also, it avoids some GCC
2573         diagnostics in some cases; Joel E. Denny reported problems when Bison
2574         was configured with --enable-gcc-warnigs.
2575
2576 2006-11-10  Jim Meyering  <jim@meyering.net>
2577
2578         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2579         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2580         account.
2581
2582 2006-11-10  Jim Meyering  <jim@meyering.net>
2583
2584         * modules/inline: New file/module.
2585         * modules/xalloc (Files): Remove m4/inline.m4.
2586         (Depends-on): Add inline, instead.
2587         * modules/oset: Likewise.
2588         * modules/list: Likewise.
2589
2590 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2591
2592         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2593         Problem reported by Matthew Woehlke.
2594
2595 2006-11-09  Bruno Haible  <bruno@clisp.org>
2596
2597         * lib/tempname.c (gen_tempname): Remove variant that invokes
2598         __gen_tempname.
2599         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2600         __gen_tempname.
2601
2602 2006-11-08  Bruno Haible  <bruno@clisp.org>
2603
2604         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2605         to 'yes' instead of 'cross-compiling'.
2606
2607 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2608
2609         * lib/quotearg.h (quotearg_free): New decl.
2610         * lib/quotearg.c (quotearg_free): New function.
2611         (slot0, nslots, slotvec0, slotvec):
2612         Now file-scope so that quotearg_free can get at them.
2613
2614 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2615
2616         Sync from Automake.
2617         * build-aux/gnupload: Add missing 'gnu' to example URL.
2618         Report by Karl Berry.
2619
2620 2006-11-08  Bruno Haible  <bruno@clisp.org>
2621
2622         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2623         Suggested by Paul Eggert.
2624
2625 2006-11-08  Jim Meyering  <jim@meyering.net>
2626
2627         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2628         It's already included if !_LIBC.
2629         (fts_safe_changedir): Add a comment.
2630
2631 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2632
2633         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2634         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2635         Matthew Woehlke.
2636
2637         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2638         definitions up, to avoid colliding with change below.
2639         (static_inline) [HAVE_INLINE]: New macro.
2640         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2641         Provide extern decls when !HAVE_INLINE.  Do not define unless
2642         static_inline is defined, either by us or by xmalloc.c.  Use
2643         static_inline rather than static inline.
2644         (XCALLOC): Optimize sizeof(T) = 1 case.
2645         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2646
2647 2006-11-07  Bruno Haible  <bruno@clisp.org>
2648
2649         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2650         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2651         AC_C_INLINE.
2652         * modules/xalloc (Files): Add m4/inline.m4.
2653
2654 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2655
2656         * README: Fix typo.
2657         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2658         (Miscellanous Notes): ...from this.
2659
2660 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2661
2662         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2663         Mention that offsetof should be used instead of sizeof.
2664         From Bruno Haible.
2665
2666 2006-11-07  Bruno Haible  <bruno@clisp.org>
2667
2668         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2669
2670 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2671
2672         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2673         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2674         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2675         (gl_tree_add_before, gl_tree_add_after):
2676         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2677         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2678         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2679         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2680         (gl_linked_add_after, gl_linked_add_at): Likewise.
2681         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2682         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2683         (gl_tree_add_before, gl_tree_add_after): Likewise.
2684         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2685         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2686         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2687
2688 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2689
2690         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2691
2692 2006-11-06  Bruno Haible  <bruno@clisp.org>
2693
2694         * m4/inline.m4: New file.
2695         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2696         * modules/list (Files): Add m4/inline.m4.
2697         * modules/oset (Files): Likewise.
2698
2699 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2700
2701         * lib/idcache.c: Include <stddef.h>, for offsetof.
2702         (struct userid.name): Change from char * to a flexible array member.
2703         All uses changed.
2704         * modules/idcache (Depends-on): Add flexmember.
2705
2706         * MODULES.html.sh (Core language properties): New module flexmember.
2707         * modules/flexmember, m4/flexmember.m4: New files.
2708
2709         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2710         inline functions that are identical with the old xnmalloc_inline,
2711         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2712         that we can avoid some unnecessary integer multiplications and
2713         divisions in the common case where the element size is known at
2714         compile time.
2715         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2716         needed.
2717         (xnboundedmalloc): Remove.
2718         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2719         arguments, for consistency with rest of this header.
2720         (xcharalloc): Rewrite using XNMALLOC.
2721         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2722         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2723         versions have been moved to lib/xalloc.h and renamed to be the
2724         non-*_inline versions.
2725         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2726         and xnrealloc functions, since those functions are now inline and
2727         now call us.
2728         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2729         renaming described above.
2730         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2731         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2732         captures the dependency in AC_C_INLINE.
2733
2734         New module canonicalize-lgpl, proposed by Charles Wilson in
2735         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2736         with a few small changes afterwards.
2737         * MODULES.html.sh (File system functions): New module
2738         canonicalize-lgpl.
2739         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2740         and canonicalize_file_name.
2741         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2742         * modules/canonicalize-lgpl: New files.
2743
2744 2006-11-05  Bruno Haible  <bruno@clisp.org>
2745
2746         * gnulib-tool (func_import, func_create_testdir): Create directories
2747         also for files in subdirectories of lib/.
2748
2749 2006-11-05  Bruno Haible  <bruno@clisp.org>
2750
2751         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2752         ANSI C compliant.
2753
2754 2006-11-03  Bruno Haible  <bruno@clisp.org>
2755
2756         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2757         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2758         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2759         (xnboundedmalloc): New inline function.
2760         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2761         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2762         xmalloc.
2763         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2764         xmalloc.
2765         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2766         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2767         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2768         xmalloc.
2769         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2770         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2771         xmalloc.
2772         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2773         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2774         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2775         xmalloc.
2776         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2777         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2778         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2779         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2780         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2781         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2782         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2783
2784 2006-11-03  Bruno Haible  <bruno@clisp.org>
2785
2786         * lib/c-ctype.h [C++]: Define functions without name mangling.
2787         * lib/fwriteerror.h [C++]: Likewise.
2788         * lib/gcd.h [C++]: Likewise.
2789         * lib/linebreak.h [C++]: Likewise.
2790
2791 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2792
2793         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2794         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2795         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2796         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2797         Check for functions and headers just once.
2798         Check for declaration of canonicalize_file_name.
2799         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2800
2801 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2802
2803         * gnulib-tool (func_import): Fix typo in actioncmd.
2804
2805 2006-11-02  Bruno Haible  <bruno@clisp.org>
2806
2807         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2808         newline sequence in the Makefile.am snippet as a space, like "make"
2809         does.
2810         Reported by Roger Persson <perrog@gmail.com>.
2811
2812 2006-11-01  Bruno Haible  <bruno@clisp.org>
2813
2814         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2815         already declared in <string.h>.
2816         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2817
2818 2006-11-01  Bruno Haible  <bruno@clisp.org>
2819
2820         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2821         * lib/strcase.h: Include <string.h>.
2822         (strcasecmp): Define to rpl_strcasecmp here.
2823
2824 2006-11-01  Bruno Haible  <bruno@clisp.org>
2825
2826         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2827
2828 2006-11-01  Eric Blake  <ebb9@byu.net>
2829
2830         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2831
2832         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2833
2834 2006-10-29  Bruno Haible  <bruno@clisp.org>
2835
2836         Make it compile in C++ mode.
2837         * lib/full-write.c (full_rw): Add a cast.
2838
2839 2006-11-01  Bruno Haible  <bruno@clisp.org>
2840
2841         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2842         be POSIX compliant.
2843         Reported by Roger Persson <perrog@gmail.com>.
2844
2845 2006-11-01  Eric Blake  <ebb9@byu.net>
2846
2847         * lib/getopt_.h: Fix comments.
2848
2849 2006-10-31  Eric Blake  <ebb9@byu.net>
2850
2851         * modules/tmpdir (Depends-on): Add sys_stat.
2852         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2853         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2854         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2855         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2856         tempname.
2857
2858 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2859
2860         Avoid some C++ diagnostics reported by Bruno Haible.
2861         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2862         xmalloc.
2863         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2864         (struct slotvec): Move to top level.
2865         (quotearg_n_options): Rewrite to avoid xmalloc.
2866         * lib/xalloc.h (xcharalloc): New function.
2867         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2868         [defined __cplusplus]: Add function template that provides result
2869         type propagation.  This part of the change is from Bruno Haible.
2870
2871 2006-10-29  Bruno Haible  <bruno@clisp.org>
2872
2873         Make it compile in C++ mode.
2874         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2875         * lib/strnlen1.c (strnlen1): Cast memchr result.
2876         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2877         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2878         (create_temp_dir): Rename local variable 'template'.
2879         (compile_csharp_using_sscli): Add cast.
2880         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2881         * lib/findprog.c (find_in_path): Likewise.
2882         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2883         * lib/wait-process.c (register_slave_subprocess): Likewise.
2884
2885 2006-10-22  Bruno Haible  <bruno@clisp.org>
2886
2887         * modules/tsearch: New file.
2888         * lib/tsearch.h: New file.
2889         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2890         * m4/tsearch.m4: New file.
2891         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2892
2893 2006-10-29  Eric Blake  <ebb9@byu.net>
2894
2895         * lib/arcfour.c: Assume config.h.
2896         * lib/arctwo.c: Likewise.
2897         * lib/base64.c: Likewise.
2898         * lib/check-version.c: Likewise.
2899         * lib/crc.c: Likewise.
2900         * lib/des.c: Likewise.
2901         * lib/gc-gnulib.c: Likewise.
2902         * lib/gc-libgcrypt.c: Likewise.
2903         * lib/gc-pbkdf2-sha1.c: Likewise.
2904         * lib/getaddrinfo.c: Likewise.
2905         * lib/getdelim.c: Likewise.
2906         * lib/getline.c: Likewise.
2907         * lib/hmac-md5.c: Likewise.
2908         * lib/hmac-sha1.c: Likewise.
2909         * lib/iconvme.c: Likewise.
2910         * lib/md2.c: Likewise.
2911         * lib/md4.c: Likewise.
2912         * lib/memxor.c: Likewise.
2913         * lib/read-file.c: Likewise.
2914         * lib/readline.c: Likewise.
2915         * lib/rijndael-alg-fst.c: Likewise.
2916         * lib/rijndael-api-fst.c: Likewise.
2917         * lib/xgetdomainname.c: Likewise.
2918
2919 2006-10-28  Eric Blake  <ebb9@byu.net>
2920
2921         * lib/xstrndup.c: Assume config.h.
2922
2923 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2924
2925         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2926         stat-macros.h is now for our own macros, whereas stat_h is for
2927         macros in the <sys/stat.h> name space.
2928         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2929         (STAT_MACROS_H): Remove.
2930         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2931         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2932         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2933         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2934         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2935         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2936         Move these macros to ...
2937         * lib/stat_.h: here.  Don't include stat-macros.h.
2938         * lib/canonicalize.c: Don't include stat-macros.h.
2939         * lib/chown.c: Likewise.
2940         * lib/euidaccess.c: Likewise.
2941         * lib/file-type.c: Likewise.
2942         * lib/filemode.c: Likewise.
2943         * lib/glob.c: Likewise.
2944         * lib/isapipe.c: Likewise.
2945         * lib/lchown.c: Likewise.
2946         * lib/lstat.c: Likewise.
2947         * lib/mkdir-p.c: Likewise.
2948         * lib/rmdir.c: Likewise.
2949         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
2950         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
2951         unless mkdir isn't declared, to speed up 'configure'.
2952         Always create sys/stat.h, since it's unlikely any real sys/stat.h
2953         would define all the S_* symbols.
2954         * modules/canonicalize (Depends-on):
2955         Depend on sys_stat, not stat-macros.
2956         * modules/chown: Likewise.
2957         * modules/euidaccess: Likewise.
2958         * modules/filemode: Likewise.
2959         * modules/file-type: Likewise.
2960         * modules/glob: Likewise.
2961         * modules/isapipe: Likewise.
2962         * modules/lchown: Likewise.
2963         * modules/lstat: Likewise.
2964         * modules/mkancesdirs: Likewise.
2965         * modules/rmdir: Likewise.
2966         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
2967         * modules/modechange: Likewise.
2968         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
2969         (configure.ac): Remove gl_STAT_MACROS.
2970         * modules/sys_stat (Depends-on): Remove stat-macros.
2971
2972 2006-10-27  Bruno Haible  <bruno@clisp.org>
2973
2974         * m4/signed.m4: Remove file.
2975         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
2976         invocation.
2977         * modules/vasnprintf (Files): Remove m4/signed.m4.
2978
2979 2006-10-27  Bruno Haible  <bruno@clisp.org>
2980
2981         Update to GNU gettext 0.16.
2982         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
2983         m4/inttypes-h.m4, m4/signed.m4.
2984         * m4/gettext.m4: Update to GNU gettext 0.16.
2985         * m4/intl.m4: New file, from GNU gettext.
2986         * m4/intldir.m4: New file, from GNU gettext.
2987         * config/srclist.txt: Update
2988
2989 2006-10-27  Eric Blake  <ebb9@byu.net>
2990
2991         * MODULES.html.sh: Document tempname.
2992         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
2993         dependencies.
2994         (Files): Move lib/tempname.c...
2995         * modules/tempname: ...to this new module.
2996         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
2997         (gl_PREREQ_TEMPNAME): Move...
2998         * m4/tempname.m4: ...to this new file.
2999         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3000         * modules/sys_stat (Depends-on): Add stat-macros.
3001         * lib/stat_.h (includes): Pick up stat macros.
3002         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3003         if stat macros are broken.
3004         * lib/tempname.c (includes): No need to include "stat-macros.h".
3005         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3006         (direxists, __path_search) [!_LIBC]: Don't compile these in
3007         gnulib; the tmpdir module covers that.
3008         * lib/tempname.h: New file.
3009
3010 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3011
3012         * COPYING: Explain how gnulib-tool converts licence headers.
3013         Almost all wording by Eric Blake.
3014
3015 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3016
3017         * lib/mbchar.h (is_basic_table): Make read-only.
3018         * lib/mbchar.c (is_basic_table): Likewise.
3019         Reported by John Darrington.
3020
3021 2006-10-25  Bruno Haible  <bruno@clisp.org>
3022
3023         * lib/progname.h (set_program_name): Undefine before defining.
3024
3025 2006-10-25  Bruno Haible  <bruno@clisp.org>
3026
3027         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3028         false for non-gcc C++ compilers.
3029         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3030
3031 2006-10-24  Bruno Haible  <bruno@clisp.org>
3032
3033         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3034         iconv implementations like Irix iconv.
3035
3036 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3037
3038         * modules/vararrays: New file.
3039         * m4/vararrays.m4: New file, taken from diffutils.
3040         * MODULES.html.sh: New module vararrays.
3041
3042 2006-10-24  Karl Berry  <karl@gnu.org>
3043
3044         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3045         Don't call GNU Unix.
3046
3047 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3048
3049         * users.txt: Add Libtool.
3050
3051         Sync from Libtool:
3052
3053         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3054
3055         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3056         to gnulib's policy of including config.h unconditionally.
3057
3058 2006-10-24  Bruno Haible  <bruno@clisp.org>
3059
3060         * modules/wcwidth (Files): Add m4/wint_t.m4.
3061         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3062         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3063
3064 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3065
3066         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3067         to pacify GCC with some -W flags enabled.  Problem reported by
3068         Bruno Haible.
3069
3070 2006-10-24  Jim Meyering  <jim@meyering.net>
3071
3072         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3073         Reported by Karl Berry.
3074
3075 2006-10-23  Bruno Haible  <bruno@clisp.org>
3076
3077         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3078
3079 2006-10-24  Bruno Haible  <bruno@clisp.org>
3080
3081         * lib/gl_list.h: Use C comment style, not C++ comment style.
3082
3083 2006-10-23  Eric Blake  <ebb9@byu.net>
3084
3085         * lib/getaddrinfo.c (includes): Add missing include.
3086
3087 2006-10-23  Bruno Haible  <bruno@clisp.org>
3088             Paul Eggert  <eggert@cs.ucla.edu>
3089
3090         Ability to rename obstack_free.
3091         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3092         obstack_free.
3093         (obstack_free): Invoke the __obstack_free macro.
3094         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3095
3096 2006-10-23  Bruno Haible  <bruno@clisp.org>
3097             Paul Eggert  <eggert@cs.ucla.edu>
3098
3099         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3100         __argc, __argv from the declaration. (They are defined as macros on
3101         mingw.)
3102
3103 2006-10-22  Bruno Haible  <bruno@clisp.org>
3104
3105         * doc/gnulib-intro.texi: New file.
3106         * doc/gnulib.texi: Include it.
3107
3108 2006-10-21  Bruno Haible  <bruno@clisp.org>
3109
3110         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3111         "Introduction", "Miscellanous Notes", "Particular Modules".
3112
3113 2006-10-21  Bruno Haible  <bruno@clisp.org>
3114
3115         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3116         Change mostlyclean-local rule to avoid sh syntax error from bash
3117         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3118
3119 2006-10-23  Jim Meyering  <jim@meyering.net>
3120
3121         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3122         in place of snprintf.
3123
3124         * modules/inttostr (Files): Add lib/uinttostr.c.
3125         * lib/uinttostr.c (inttostr): New file/function.
3126         * lib/inttostr.h (uinttostr): Declare.
3127         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3128         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3129         Add uinttostr.
3130         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3131
3132 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3133
3134         * lib/canonicalize.c (ELOOP): Define if not already defined.
3135         Problem reported by Bruno Haible in
3136         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3137
3138 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3139
3140         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3141         Problem reported by Perry Smith and Ville Laurikari.
3142
3143         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3144         uses.
3145
3146 2006-10-19  Bruno Haible  <bruno@clisp.org>
3147
3148         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3149         for mingw.
3150
3151 2006-10-19  Bruno Haible  <bruno@clisp.org>
3152
3153         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3154         Needed for mingw.
3155
3156 2006-10-19  Bruno Haible  <bruno@clisp.org>
3157
3158         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3159
3160 2006-10-19  Bruno Haible  <bruno@clisp.org>
3161
3162         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3163         it.
3164
3165 2006-10-19  Bruno Haible  <bruno@clisp.org>
3166
3167         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3168         invocation.
3169
3170 2006-10-19  Bruno Haible  <bruno@clisp.org>
3171
3172         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3173         mountlist by default.
3174
3175 2006-10-16  Bruno Haible  <bruno@clisp.org>
3176
3177         * lib/c-strstr.c: Include c-strstr.h.
3178
3179 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3180
3181         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3182         in a slash.
3183
3184 2006-10-18  Bruno Haible  <bruno@clisp.org>
3185
3186         * lib/lock.h [C++]: Wrap definitions in extern "C".
3187
3188 2006-10-18  Bruno Haible  <bruno@clisp.org>
3189
3190         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3191         gl_LIBOBJS list.
3192
3193 2006-10-18  Bruno Haible  <bruno@clisp.org>
3194
3195         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3196
3197 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3198
3199         * lib/xstrtol.h: Include gettext.h.
3200         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3201         Problem reported by Eric Blake.
3202         * modules/xstrtol (Depends-on): Add gettext-h.
3203
3204 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3205
3206         * lib/strftime.c (advance): New macro.
3207         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3208         incomplete type, so you can't add 0 to it.  Problem and patch
3209         reported by Eelco Dolstra for dietlibc.
3210
3211 2006-10-18  Jim Meyering  <jim@meyering.net>
3212
3213         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3214         type for a local, and rename it: s/up/user_proc/.
3215
3216 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3217
3218         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3219         READ_UTMP_USER_PROCESS.
3220         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3221
3222 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3223
3224         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3225         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3226
3227 2006-10-17  Eric Blake  <ebb9@byu.net>
3228
3229         * lib/sigprocmask.c (sigprocmask): Fix typo.
3230
3231         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3232
3233         * modules/clean-temp (Makefile.am): Don't add to make output...
3234         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3235         config.h.
3236
3237 2006-10-17  Bruno Haible  <bruno@clisp.org>
3238
3239         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3240         differently if DEFAULT_TEXT_DOMAIN is set.
3241
3242 2006-10-16  Bruno Haible  <bruno@clisp.org>
3243
3244         * lib/clean-temp.c: Include fwriteerror.h.
3245
3246 2006-10-16  Bruno Haible  <bruno@clisp.org>
3247
3248         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3249
3250 2006-10-16  Bruno Haible  <bruno@clisp.org>
3251
3252         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3253         * lib/sigprocmask.h: Include <sys/types.h>.
3254         (sigset_t): Use the system's definition if present.
3255
3256 2006-10-17  Eric Blake  <ebb9@byu.net>
3257
3258         * lib/xvasprintf.c (includes): Assume config.h.
3259         * lib/xasprintf.c (includes): Likewise.
3260
3261 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3262
3263         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3264         at least as wide as intmax_t.
3265
3266 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3267
3268         (Imported from Automake.)
3269         * build-aux/gnupload: Update to version 1.1 of directive file.
3270
3271 2006-10-16  Eric Blake  <ebb9@byu.net>
3272
3273         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3274         match Automake 1.10a.
3275
3276 2006-10-14  Bruno Haible  <bruno@clisp.org>
3277
3278         * modules/sigprocmask: New file.
3279         * lib/sigprocmask.h: New file.
3280         * lib/sigprocmask.c: New file.
3281         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3282         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3283         request sigprocmask.o.
3284         (gl_PREREQ_SIGPROCMASK): New macro.
3285         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3286         (Depends-on): Add sigprocmask.
3287         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3288         gt_SIGNALBLOCKING. Test for 'raise' only once.
3289         * lib/fatal-signal.c: Include sigprocmask.h.
3290         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3291         unblock_fatal_signals): Define always.
3292         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3293         sigprocmask.
3294
3295 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3296
3297         Sync from Automake.
3298         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3299         which incorrectly sets the mode of an existing destination
3300         directory.  In some cases the unpatched install-sh could do the
3301         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3302         system.  We hope this is rare in practice, but it's clearly worth
3303         fixing.  Problem reported by Alex Unleashed in
3304         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3305         Also, don't bother to check for -m bugs unless we're using -m;
3306         suggested by Stepan Kasal.
3307
3308 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3309
3310         Sync from Automake.
3311         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3312         `-c' flag, so they appear at the same position as in %FASTDEP%
3313         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3314         which ignores unknown options only after the first non-option.
3315         Bug report against M4 by Nelson H. F. Beebe.
3316
3317 2006-10-13  Jim Meyering  <jim@meyering.net>
3318
3319         Fix a bug in yesterday's change.
3320         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3321         p->fts_statp->st_dev would be used uninitialized.
3322         Ensures that we always call fts_stat on the very first entry.
3323         Miklos Szeredi reported that find -xdev stopped working.
3324
3325 2006-10-12  Bruno Haible  <bruno@clisp.org>
3326
3327         * gnulib-tool (func_get_automake_snippet): Append an automatically
3328         computed EXTRA_DIST augmentation.
3329         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3330         * modules/alloca-opt (Makefile.am): Likewise.
3331         * modules/allocsa (Makefile.am): Likewise.
3332         * modules/arcfour (Makefile.am): Likewise.
3333         * modules/arctwo (Makefile.am): Likewise.
3334         * modules/argmatch (Makefile.am): Likewise.
3335         * modules/argz (Makefile.am): Likewise.
3336         * modules/atexit (Makefile.am): Likewise.
3337         * modules/backupfile (Makefile.am): Likewise.
3338         * modules/byteswap (Makefile.am): Likewise.
3339         * modules/c-strtod (Makefile.am): Likewise.
3340         * modules/c-strtold (Makefile.am): Likewise.
3341         * modules/calloc (Makefile.am): Likewise.
3342         * modules/canon-host (Makefile.am): Likewise.
3343         * modules/canonicalize (Makefile.am): Likewise.
3344         * modules/chdir-long (Makefile.am): Likewise.
3345         * modules/chdir-safer (Makefile.am): Likewise.
3346         * modules/check-version (Makefile.am): Likewise.
3347         * modules/chown (Makefile.am): Likewise.
3348         * modules/cloexec (Makefile.am): Likewise.
3349         * modules/close-stream (Makefile.am): Likewise.
3350         * modules/closeout (Makefile.am): Likewise.
3351         * modules/crc (Makefile.am): Likewise.
3352         * modules/csharpexec (Makefile.am): Likewise.
3353         * modules/cycle-check (Makefile.am): Likewise.
3354         * modules/des (Makefile.am): Likewise.
3355         * modules/dev-ino (Makefile.am): Likewise.
3356         * modules/dirfd (Makefile.am): Likewise.
3357         * modules/dirname (Makefile.am): Likewise.
3358         * modules/dup2 (Makefile.am): Likewise.
3359         * modules/eealloc (Makefile.am): Likewise.
3360         * modules/error (Makefile.am): Likewise.
3361         * modules/euidaccess (Makefile.am): Likewise.
3362         * modules/exclude (Makefile.am): Likewise.
3363         * modules/exitfail (Makefile.am): Likewise.
3364         * modules/fcntl-safer (Makefile.am): Likewise.
3365         * modules/fcntl (Makefile.am): Likewise.
3366         * modules/file-type (Makefile.am): Likewise.
3367         * modules/fileblocks (Makefile.am): Likewise.
3368         * modules/filemode (Makefile.am): Likewise.
3369         * modules/filenamecat (Makefile.am): Likewise.
3370         * modules/fnmatch (Makefile.am): Likewise.
3371         * modules/fopen-safer (Makefile.am): Likewise.
3372         * modules/fpending (Makefile.am): Likewise.
3373         * modules/fprintftime (Makefile.am): Likewise.
3374         * modules/free (Makefile.am): Likewise.
3375         * modules/fsusage (Makefile.am): Likewise.
3376         * modules/ftruncate (Makefile.am): Likewise.
3377         * modules/fts (Makefile.am): Likewise.
3378         * modules/gc-arcfour (Makefile.am): Likewise.
3379         * modules/gc-des (Makefile.am): Likewise.
3380         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3381         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3382         * modules/gc-md4 (Makefile.am): Likewise.
3383         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3384         * modules/gc-sha1 (Makefile.am): Likewise.
3385         * modules/gc (Makefile.am): Likewise.
3386         * modules/getaddrinfo (Makefile.am): Likewise.
3387         * modules/getcwd (Makefile.am): Likewise.
3388         * modules/getdelim (Makefile.am): Likewise.
3389         * modules/getdomainname (Makefile.am): Likewise.
3390         * modules/getgroups (Makefile.am): Likewise.
3391         * modules/gethostname (Makefile.am): Likewise.
3392         * modules/gethrxtime (Makefile.am): Likewise.
3393         * modules/getline (Makefile.am): Likewise.
3394         * modules/getloadavg (Makefile.am): Likewise.
3395         * modules/getlogin_r (Makefile.am): Likewise.
3396         * modules/getndelim2 (Makefile.am): Likewise.
3397         * modules/getopt (Makefile.am): Likewise.
3398         * modules/getpagesize (Makefile.am): Likewise.
3399         * modules/getpass-gnu (Makefile.am): Likewise.
3400         * modules/getpass (Makefile.am): Likewise.
3401         * modules/getsubopt (Makefile.am): Likewise.
3402         * modules/gettime (Makefile.am): Likewise.
3403         * modules/gettimeofday (Makefile.am): Likewise.
3404         * modules/getugroups (Makefile.am): Likewise.
3405         * modules/getusershell (Makefile.am): Likewise.
3406         * modules/glob (Makefile.am): Likewise.
3407         * modules/group-member (Makefile.am): Likewise.
3408         * modules/hard-locale (Makefile.am): Likewise.
3409         * modules/hash (Makefile.am): Likewise.
3410         * modules/hmac-md5 (Makefile.am): Likewise.
3411         * modules/hmac-sha1 (Makefile.am): Likewise.
3412         * modules/human (Makefile.am): Likewise.
3413         * modules/idcache (Makefile.am): Likewise.
3414         * modules/imaxabs (Makefile.am): Likewise.
3415         * modules/imaxdiv (Makefile.am): Likewise.
3416         * modules/inet_ntop (Makefile.am): Likewise.
3417         * modules/inet_pton (Makefile.am): Likewise.
3418         * modules/intprops (Makefile.am): Likewise.
3419         * modules/inttostr (Makefile.am): Likewise.
3420         * modules/inttypes (Makefile.am): Likewise.
3421         * modules/isapipe (Makefile.am): Likewise.
3422         * modules/javaversion (Makefile.am): Likewise.
3423         * modules/lchmod (Makefile.am): Likewise.
3424         * modules/lchown (Makefile.am): Likewise.
3425         * modules/localcharset (Makefile.am): Likewise.
3426         * modules/long-options (Makefile.am): Likewise.
3427         * modules/lstat (Makefile.am): Likewise.
3428         * modules/malloc (Makefile.am): Likewise.
3429         * modules/mathl (Makefile.am): Likewise.
3430         * modules/mbchar (Makefile.am): Likewise.
3431         * modules/md2 (Makefile.am): Likewise.
3432         * modules/md4 (Makefile.am): Likewise.
3433         * modules/md5 (Makefile.am): Likewise.
3434         * modules/memcasecmp (Makefile.am): Likewise.
3435         * modules/memchr (Makefile.am): Likewise.
3436         * modules/memcmp (Makefile.am): Likewise.
3437         * modules/memcoll (Makefile.am): Likewise.
3438         * modules/memcpy (Makefile.am): Likewise.
3439         * modules/memmem (Makefile.am): Likewise.
3440         * modules/memmove (Makefile.am): Likewise.
3441         * modules/mempcpy (Makefile.am): Likewise.
3442         * modules/memrchr (Makefile.am): Likewise.
3443         * modules/memset (Makefile.am): Likewise.
3444         * modules/memxor (Makefile.am): Likewise.
3445         * modules/mkancesdirs (Makefile.am): Likewise.
3446         * modules/mkdir-p (Makefile.am): Likewise.
3447         * modules/mkdir (Makefile.am): Likewise.
3448         * modules/mkdtemp (Makefile.am): Likewise.
3449         * modules/mkstemp (Makefile.am): Likewise.
3450         * modules/mktime (Makefile.am): Likewise.
3451         * modules/modechange (Makefile.am): Likewise.
3452         * modules/mountlist (Makefile.am): Likewise.
3453         * modules/nanosleep (Makefile.am): Likewise.
3454         * modules/obstack (Makefile.am): Likewise.
3455         * modules/openat (Makefile.am): Likewise.
3456         * modules/pagealign_alloc (Makefile.am): Likewise.
3457         * modules/pathmax (Makefile.am): Likewise.
3458         * modules/physmem (Makefile.am): Likewise.
3459         * modules/poll (Makefile.am): Likewise.
3460         * modules/posixtm (Makefile.am): Likewise.
3461         * modules/posixver (Makefile.am): Likewise.
3462         * modules/putenv (Makefile.am): Likewise.
3463         * modules/quote (Makefile.am): Likewise.
3464         * modules/quotearg (Makefile.am): Likewise.
3465         * modules/raise (Makefile.am): Likewise.
3466         * modules/read-file (Makefile.am): Likewise.
3467         * modules/readline (Makefile.am): Likewise.
3468         * modules/readlink (Makefile.am): Likewise.
3469         * modules/readtokens (Makefile.am): Likewise.
3470         * modules/readutmp (Makefile.am): Likewise.
3471         * modules/realloc (Makefile.am): Likewise.
3472         * modules/regex (Makefile.am): Likewise.
3473         * modules/rename-dest-slash (Makefile.am): Likewise.
3474         * modules/rename (Makefile.am): Likewise.
3475         * modules/rijndael (Makefile.am): Likewise.
3476         * modules/rmdir (Makefile.am): Likewise.
3477         * modules/rpmatch (Makefile.am): Likewise.
3478         * modules/safe-read (Makefile.am): Likewise.
3479         * modules/safe-write (Makefile.am): Likewise.
3480         * modules/same-inode (Makefile.am): Likewise.
3481         * modules/same (Makefile.am): Likewise.
3482         * modules/save-cwd (Makefile.am): Likewise.
3483         * modules/savedir (Makefile.am): Likewise.
3484         * modules/setenv (Makefile.am): Likewise.
3485         * modules/settime (Makefile.am): Likewise.
3486         * modules/sha1 (Makefile.am): Likewise.
3487         * modules/sig2str (Makefile.am): Likewise.
3488         * modules/snprintf (Makefile.am): Likewise.
3489         * modules/stat-macros (Makefile.am): Likewise.
3490         * modules/stat-time (Makefile.am): Likewise.
3491         * modules/stdbool (Makefile.am): Likewise.
3492         * modules/stdint (Makefile.am): Likewise.
3493         * modules/stdlib-safer (Makefile.am): Likewise.
3494         * modules/stpcpy (Makefile.am): Likewise.
3495         * modules/stpncpy (Makefile.am): Likewise.
3496         * modules/strcase (Makefile.am): Likewise.
3497         * modules/strcasestr (Makefile.am): Likewise.
3498         * modules/strchrnul (Makefile.am): Likewise.
3499         * modules/strcspn (Makefile.am): Likewise.
3500         * modules/strdup (Makefile.am): Likewise.
3501         * modules/strerror (Makefile.am): Likewise.
3502         * modules/strftime (Makefile.am): Likewise.
3503         * modules/strndup (Makefile.am): Likewise.
3504         * modules/strnlen (Makefile.am): Likewise.
3505         * modules/strpbrk (Makefile.am): Likewise.
3506         * modules/strsep (Makefile.am): Likewise.
3507         * modules/strstr (Makefile.am): Likewise.
3508         * modules/strtod (Makefile.am): Likewise.
3509         * modules/strtoimax (Makefile.am): Likewise.
3510         * modules/strtok_r (Makefile.am): Likewise.
3511         * modules/strtol (Makefile.am): Likewise.
3512         * modules/strtoll (Makefile.am): Likewise.
3513         * modules/strtoul (Makefile.am): Likewise.
3514         * modules/strtoull (Makefile.am): Likewise.
3515         * modules/strtoumax (Makefile.am): Likewise.
3516         * modules/strverscmp (Makefile.am): Likewise.
3517         * modules/sys_socket (Makefile.am): Likewise.
3518         * modules/sys_stat (Makefile.am): Likewise.
3519         * modules/sysexits (Makefile.am): Likewise.
3520         * modules/time_r (Makefile.am): Likewise.
3521         * modules/timegm (Makefile.am): Likewise.
3522         * modules/timespec (Makefile.am): Likewise.
3523         * modules/tmpfile-safer (Makefile.am): Likewise.
3524         * modules/trim (Makefile.am): Likewise.
3525         * modules/unistd-safer (Makefile.am): Likewise.
3526         * modules/unlinkdir (Makefile.am): Likewise.
3527         * modules/unlocked-io (Makefile.am): Likewise.
3528         * modules/userspec (Makefile.am): Likewise.
3529         * modules/utime (Makefile.am): Likewise.
3530         * modules/utimecmp (Makefile.am): Likewise.
3531         * modules/utimens (Makefile.am): Likewise.
3532         * modules/vasnprintf (Makefile.am): Likewise.
3533         * modules/vasprintf (Makefile.am): Likewise.
3534         * modules/vsnprintf (Makefile.am): Likewise.
3535         * modules/xalloc (Makefile.am): Likewise.
3536         * modules/xgetcwd (Makefile.am): Likewise.
3537         * modules/xnanosleep (Makefile.am): Likewise.
3538         * modules/xreadlink (Makefile.am): Likewise.
3539         * modules/xstrtod (Makefile.am): Likewise.
3540         * modules/xstrtol (Makefile.am): Likewise.
3541         * modules/xstrtold (Makefile.am): Likewise.
3542         * modules/yesno (Makefile.am): Likewise.
3543         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3544
3545 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3546
3547         * modules/error (Makefile.am): Distribute files through
3548         EXTRA_DIST, not lib_SOURCES.
3549
3550 2006-10-12  Eric Blake  <ebb9@byu.net>
3551
3552         * modules/error (Makefile.am): Distribute files in /lib.
3553         * modules/obstack (Makefile.am): Likewise.
3554
3555 2006-10-12  Bruno Haible  <bruno@clisp.org>
3556
3557         * modules/acl (Makefile.am): Distribute all files in lib/ through
3558         EXTRA_DIST.
3559         * modules/arcfour (Makefile.am): Likewise.
3560         * modules/arctwo (Makefile.am): Likewise.
3561         * modules/argmatch (Makefile.am): Likewise.
3562         * modules/argz (Makefile.am): Likewise.
3563         * modules/atexit (Makefile.am): Likewise.
3564         * modules/backupfile (Makefile.am): Likewise.
3565         * modules/c-strtod (Makefile.am): Likewise.
3566         * modules/c-strtold (Makefile.am): Likewise.
3567         * modules/calloc (Makefile.am): Likewise.
3568         * modules/canon-host (Makefile.am): Likewise.
3569         * modules/canonicalize (Makefile.am): Likewise.
3570         * modules/chdir-long (Makefile.am): Likewise.
3571         * modules/chdir-safer (Makefile.am): Likewise.
3572         * modules/check-version (Makefile.am): Likewise.
3573         * modules/chown (Makefile.am): Likewise.
3574         * modules/cloexec (Makefile.am): Likewise.
3575         * modules/close-stream (Makefile.am): Likewise.
3576         * modules/closeout (Makefile.am): Likewise.
3577         * modules/crc (Makefile.am): Likewise.
3578         * modules/cycle-check (Makefile.am): Likewise.
3579         * modules/des (Makefile.am): Likewise.
3580         * modules/dirfd (Makefile.am): Likewise.
3581         * modules/dirname (Makefile.am): Likewise.
3582         * modules/dup2 (Makefile.am): Likewise.
3583         * modules/euidaccess (Makefile.am): Likewise.
3584         * modules/exclude (Makefile.am): Likewise.
3585         * modules/exitfail (Makefile.am): Likewise.
3586         * modules/fcntl-safer (Makefile.am): Likewise.
3587         * modules/file-type (Makefile.am): Likewise.
3588         * modules/fileblocks (Makefile.am): Likewise.
3589         * modules/filemode (Makefile.am): Likewise.
3590         * modules/filenamecat (Makefile.am): Likewise.
3591         * modules/fnmatch (Makefile.am): Likewise.
3592         * modules/fopen-safer (Makefile.am): Likewise.
3593         * modules/fpending (Makefile.am): Likewise.
3594         * modules/fprintftime (Makefile.am): Likewise.
3595         * modules/free (Makefile.am): Likewise.
3596         * modules/fsusage (Makefile.am): Likewise.
3597         * modules/ftruncate (Makefile.am): Likewise.
3598         * modules/fts (Makefile.am): Likewise.
3599         * modules/gc (Makefile.am): Likewise.
3600         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3601         * modules/getaddrinfo (Makefile.am): Likewise.
3602         * modules/getcwd (Makefile.am): Likewise.
3603         * modules/getdelim (Makefile.am): Likewise.
3604         * modules/getdomainname (Makefile.am): Likewise.
3605         * modules/getgroups (Makefile.am): Likewise.
3606         * modules/gethostname (Makefile.am): Likewise.
3607         * modules/gethrxtime (Makefile.am): Likewise.
3608         * modules/getline (Makefile.am): Likewise.
3609         * modules/getloadavg (Makefile.am): Likewise.
3610         * modules/getlogin_r (Makefile.am): Likewise.
3611         * modules/getopt (Makefile.am): Likewise.
3612         * modules/getpass (Makefile.am): Likewise.
3613         * modules/getpass-gnu (Makefile.am): Likewise.
3614         * modules/getsubopt (Makefile.am): Likewise.
3615         * modules/gettime (Makefile.am): Likewise.
3616         * modules/gettimeofday (Makefile.am): Likewise.
3617         * modules/getugroups (Makefile.am): Likewise.
3618         * modules/getusershell (Makefile.am): Likewise.
3619         * modules/glob (Makefile.am): Likewise.
3620         * modules/group-member (Makefile.am): Likewise.
3621         * modules/hard-locale (Makefile.am): Likewise.
3622         * modules/hash (Makefile.am): Likewise.
3623         * modules/hmac-md5 (Makefile.am): Likewise.
3624         * modules/hmac-sha1 (Makefile.am): Likewise.
3625         * modules/human (Makefile.am): Likewise.
3626         * modules/idcache (Makefile.am): Likewise.
3627         * modules/imaxabs (Makefile.am): Likewise.
3628         * modules/imaxdiv (Makefile.am): Likewise.
3629         * modules/inet_ntop (Makefile.am): Likewise.
3630         * modules/inet_pton (Makefile.am): Likewise.
3631         * modules/inttostr (Makefile.am): Likewise.
3632         * modules/isapipe (Makefile.am): Likewise.
3633         * modules/lchown (Makefile.am): Likewise.
3634         * modules/long-options (Makefile.am): Likewise.
3635         * modules/lstat (Makefile.am): Likewise.
3636         * modules/malloc (Makefile.am): Likewise.
3637         * modules/mathl (Makefile.am): Likewise.
3638         * modules/mbchar (Makefile.am): Likewise.
3639         * modules/md2 (Makefile.am): Likewise.
3640         * modules/md4 (Makefile.am): Likewise.
3641         * modules/md5 (Makefile.am): Likewise.
3642         * modules/memcasecmp (Makefile.am): Likewise.
3643         * modules/memchr (Makefile.am): Likewise.
3644         * modules/memcmp (Makefile.am): Likewise.
3645         * modules/memcoll (Makefile.am): Likewise.
3646         * modules/memcpy (Makefile.am): Likewise.
3647         * modules/memmem (Makefile.am): Likewise.
3648         * modules/memmove (Makefile.am): Likewise.
3649         * modules/mempcpy (Makefile.am): Likewise.
3650         * modules/memrchr (Makefile.am): Likewise.
3651         * modules/memset (Makefile.am): Likewise.
3652         * modules/memxor (Makefile.am): Likewise.
3653         * modules/mkancesdirs (Makefile.am): Likewise.
3654         * modules/mkdir (Makefile.am): Likewise.
3655         * modules/mkdir-p (Makefile.am): Likewise.
3656         * modules/mkdtemp (Makefile.am): Likewise.
3657         * modules/mkstemp (Makefile.am): Likewise.
3658         * modules/mktime (Makefile.am): Likewise.
3659         * modules/modechange (Makefile.am): Likewise.
3660         * modules/mountlist (Makefile.am): Likewise.
3661         * modules/nanosleep (Makefile.am): Likewise.
3662         * modules/openat (Makefile.am): Likewise.
3663         * modules/pagealign_alloc (Makefile.am): Likewise.
3664         * modules/physmem (Makefile.am): Likewise.
3665         * modules/poll (Makefile.am): Likewise.
3666         * modules/posixtm (Makefile.am): Likewise.
3667         * modules/posixver (Makefile.am): Likewise.
3668         * modules/putenv (Makefile.am): Likewise.
3669         * modules/quote (Makefile.am): Likewise.
3670         * modules/quotearg (Makefile.am): Likewise.
3671         * modules/raise (Makefile.am): Likewise.
3672         * modules/read-file (Makefile.am): Likewise.
3673         * modules/readline (Makefile.am): Likewise.
3674         * modules/readlink (Makefile.am): Likewise.
3675         * modules/readtokens (Makefile.am): Likewise.
3676         * modules/readutmp (Makefile.am): Likewise.
3677         * modules/realloc (Makefile.am): Likewise.
3678         * modules/regex (Makefile.am): Likewise.
3679         * modules/rename (Makefile.am): Likewise.
3680         * modules/rename-dest-slash (Makefile.am): Likewise.
3681         * modules/rijndael (Makefile.am): Likewise.
3682         * modules/rmdir (Makefile.am): Likewise.
3683         * modules/rpmatch (Makefile.am): Likewise.
3684         * modules/safe-read (Makefile.am): Likewise.
3685         * modules/safe-write (Makefile.am): Likewise.
3686         * modules/same (Makefile.am): Likewise.
3687         * modules/save-cwd (Makefile.am): Likewise.
3688         * modules/savedir (Makefile.am): Likewise.
3689         * modules/setenv (Makefile.am): Likewise.
3690         * modules/settime (Makefile.am): Likewise.
3691         * modules/sha1 (Makefile.am): Likewise.
3692         * modules/sig2str (Makefile.am): Likewise.
3693         * modules/snprintf (Makefile.am): Likewise.
3694         * modules/stdlib-safer (Makefile.am): Likewise.
3695         * modules/stpcpy (Makefile.am): Likewise.
3696         * modules/stpncpy (Makefile.am): Likewise.
3697         * modules/strcase (Makefile.am): Likewise.
3698         * modules/strcasestr (Makefile.am): Likewise.
3699         * modules/strchrnul (Makefile.am): Likewise.
3700         * modules/strcspn (Makefile.am): Likewise.
3701         * modules/strdup (Makefile.am): Likewise.
3702         * modules/strerror (Makefile.am): Likewise.
3703         * modules/strftime (Makefile.am): Likewise.
3704         * modules/strndup (Makefile.am): Likewise.
3705         * modules/strnlen (Makefile.am): Likewise.
3706         * modules/strpbrk (Makefile.am): Likewise.
3707         * modules/strsep (Makefile.am): Likewise.
3708         * modules/strstr (Makefile.am): Likewise.
3709         * modules/strtod (Makefile.am): Likewise.
3710         * modules/strtoimax (Makefile.am): Likewise.
3711         * modules/strtok_r (Makefile.am): Likewise.
3712         * modules/strtol (Makefile.am): Likewise.
3713         * modules/strtoll (Makefile.am): Likewise.
3714         * modules/strtoul (Makefile.am): Likewise.
3715         * modules/strtoull (Makefile.am): Likewise.
3716         * modules/strtoumax (Makefile.am): Likewise.
3717         * modules/strverscmp (Makefile.am): Likewise.
3718         * modules/time_r (Makefile.am): Likewise.
3719         * modules/timegm (Makefile.am): Likewise.
3720         * modules/tmpfile-safer (Makefile.am): Likewise.
3721         * modules/unistd-safer (Makefile.am): Likewise.
3722         * modules/unlinkdir (Makefile.am): Likewise.
3723         * modules/userspec (Makefile.am): Likewise.
3724         * modules/utime (Makefile.am): Likewise.
3725         * modules/utimecmp (Makefile.am): Likewise.
3726         * modules/utimens (Makefile.am): Likewise.
3727         * modules/vasnprintf (Makefile.am): Likewise.
3728         * modules/vasprintf (Makefile.am): Likewise.
3729         * modules/vsnprintf (Makefile.am): Likewise.
3730         * modules/xalloc (Makefile.am): Likewise.
3731         * modules/xgetcwd (Makefile.am): Likewise.
3732         * modules/xnanosleep (Makefile.am): Likewise.
3733         * modules/xreadlink (Makefile.am): Likewise.
3734         * modules/xstrtod (Makefile.am): Likewise.
3735         * modules/xstrtol (Makefile.am): Likewise.
3736         * modules/xstrtold (Makefile.am): Likewise.
3737         * modules/yesno (Makefile.am): Likewise.
3738
3739 2006-10-12  Jim Meyering  <jim@meyering.net>
3740
3741         * m4/getloadavg.m4: Revert the change below.
3742
3743         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3744         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3745         fail with a symlink, which is what coreutils' ./bootstrap now
3746         creates by default.
3747
3748 2006-10-12  Bruno Haible  <bruno@clisp.org>
3749
3750         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3751         mingw.
3752         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3753         MSVC and mingw explicitly.
3754
3755 2006-10-11  Simon Josefsson  <jas@extundo.com>
3756             Bruno Haible  <bruno@clisp.org>
3757
3758         Add support for multiple gnulib-tool invocations in the scope of a
3759         single configure.ac file.
3760         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3761         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3762         with the same contents as the _LIBADD variable.
3763         (func_emit_initmacro_start, func_emit_initmacro_end,
3764         func_emit_initmacro_done): New functions.
3765         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3766         gl_LIBOBJS and gl_LTLIBOBJS.
3767
3768 2006-10-11  Bruno Haible  <bruno@clisp.org>
3769
3770         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3771         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3772         autoreconf. Instead, invoke autopoint explicitly but move back the
3773         *.m4 files from gnulib.
3774
3775 2006-10-11  Bruno Haible  <bruno@clisp.org>
3776
3777         * gnulib-tool (func_usage): Make module names after --create-testdir
3778         optional.
3779         (func_create_testdir): If no module was specified, use nearly all
3780         modules.
3781
3782 2006-10-12  Jim Meyering  <jim@meyering.net>
3783
3784         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3785         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3786         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3787         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3788         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3789         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3790         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3791         (fts_set_stat_required): New function.
3792         (fts_open): Defer the calls to fts_stat, if possible or requested.
3793         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3794         into fts_stat itself.
3795         (fts_read): Perform any required (deferred) fts_stat call.
3796         (fts_build): Likewise, for the directory we're about to open and read.
3797         In the readdir loop, carefully decide whether each entry will require
3798         an eventual call to fts_stat, using dirent.d_type info if available.
3799         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3800         a command line argument into this function.  Update all callers.
3801         Map a return value of FTS_DOT to FTS_D for a command line argument.
3802         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3803         Thanks to Miklos Szeredi for his tenacity and for the initial
3804         bug report about "find" failing on a FUSE-based file system.
3805
3806         * lib/fts.c (fts_open): Use consistent indentation.
3807
3808 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3809
3810         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3811         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3812         reported by Jim Meyering.  All uses of cache variables renamed
3813         to match Autoconf's.
3814         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3815         the other one.
3816
3817         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3818         Fix misspelling in diagnostic.
3819
3820 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3821
3822         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3823         defined.  Problem reported by Matthew Woehlke.
3824
3825         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3826         Add support for Tandem NonStop R series.
3827         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3828         Use new macro.
3829
3830         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3831         (has_trailing_slash): Omit size arg; all callers changed.
3832         Omit 'inline', since it doesn't help performance and we'd
3833         need to configure it.
3834         Don't count //, ///, etc. as having a trailing slash.
3835         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3836         (rpl_rename_dest_slash): On failure, use rename's errno rather
3837         than (in some cases) an incorrect or junk errno.
3838         Simplify code by removing need to compute length; this does
3839         cause it to make two passes instead of one over the file name,
3840         but it's worth it.
3841
3842         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3843         change, since Autoconf's version may no longer be appropriate now
3844         that we are using CVS Autoconf's version.  Add support for Tandem.
3845
3846 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3847             Bruno Haible  <bruno@clisp.org>
3848
3849         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3850         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3851         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3852         gl_AC_TYPE_LONG_LONG.
3853
3854         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3855         instead of HAVE_LONG_LONG.
3856         * lib/printf-args.c (printf_fetchargs): Likewise.
3857         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3858         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3859         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3860         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3861         gl_AC_TYPE_LONG_LONG.
3862
3863 2006-10-11  Bruno Haible  <bruno@clisp.org>
3864
3865         * m4/longlong.m4: Add comments.
3866         * m4/ulonglong.m4: Likewise.
3867
3868 2006-10-10  Bruno Haible  <bruno@clisp.org>
3869
3870         Make it possible to #define stpcpy, strdup to aliases.
3871         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3872         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3873
3874 2006-10-10  Bruno Haible  <bruno@clisp.org>
3875
3876         Make it possible to #define gcd to an alias.
3877         * lib/gcd.c: Include config.h.
3878
3879 2006-10-10  Bruno Haible  <bruno@clisp.org>
3880
3881         Make it possible to #define c_isascii to an alias.
3882         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3883         defined. Undefine the macros before defining them, to avoid gcc
3884         warnings.
3885         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3886         define NO_C_CTYPE_MACROS early.
3887
3888 2006-10-10  Bruno Haible  <bruno@clisp.org>
3889
3890         Make it possible to #define set_program_name to an alias.
3891         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3892         ENABLE_RELOCATABLE early.
3893
3894 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3895
3896         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3897         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3898         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3899         More generally, don't assume that 64-bit signed int is available
3900         if unsigned int is, and vice versa.
3901         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3902         unsigned symbols, not on their signed counterparts.
3903         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3904         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3905         (UINT64_C, UINTMAX_C):
3906         Likewise.
3907         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3908         unsigned counterparts.
3909         (Have_long_long, Unsigned): New macros.
3910         (Int): Renamed from INT.
3911         (strtoimax): Use the new macros.
3912         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3913         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3914         * modules/inttypes (inttypes.h): Substitute
3915         HAVE_UNSIGNED_LONG_LONG_INT.
3916         * modules/stdint (stdint.h): Likewise.
3917         (Files): Add m4/ulonglong.m4.
3918
3919 2006-10-10  Bruno Haible  <bruno@clisp.org>
3920
3921         Fix a gcc -Wshadow warning.
3922         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3923         to 'bucket'.
3924         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3925         gl_linked_indexof_from_to): Likewise.
3926         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3927         Likewise.
3928         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3929         Likewise.
3930         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3931         Reported by Eric Blake.
3932
3933 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3934
3935         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3936         for NetBSD.  Problem reported by Bruno Haible.
3937
3938 2006-10-09  Jim Meyering  <jim@meyering.net>
3939
3940         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3941         Patch from Bruno Haible.
3942
3943 2006-10-09  Jim Meyering  <jim@meyering.net>
3944
3945         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3946         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3947         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
3948
3949 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
3950
3951         Don't include <config.h> twice; this doesn't work in some cases,
3952         e.g., when config.h has "#define intmax_t long long int" and
3953         we include <config.h>, <inttypes.h>, <config.h> in that order.
3954         Problem reported by Matthew Woehlke in:
3955         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
3956         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
3957         * lib/fts-cycle.c: Don't include config.h.
3958         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
3959         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
3960         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
3961         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
3962         inttypes.h.
3963         * lib/xstrtoumax.c: Likewise.
3964         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
3965         __strtol and the like, so that this module is more like its siblings.
3966         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
3967         Remove; no longer needed now that we assume gnulib inttypes.h.
3968
3969 2006-10-08  Bruno Haible  <bruno@clisp.org>
3970
3971         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
3972         option.
3973
3974 2006-10-07  Jim Meyering  <jim@meyering.net>
3975
3976         * modules/inttypes (inttypes.h): Revert what seems to have been
3977         an inadvertent part of today's change: use "|", not "/" in the
3978         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
3979
3980 2006-10-07  Bruno Haible  <bruno@clisp.org>
3981
3982         * modules/sublist: New file.
3983
3984 2006-10-07  Bruno Haible  <bruno@clisp.org>
3985
3986         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
3987         * modules/argz (argz.h): Likewise.
3988         * modules/arpa_inet (arpa/inet.h): Likewise.
3989         * modules/byteswap (byteswap.h): Likewise.
3990         * modules/configmake (configmake.h): Likewise.
3991         * modules/fcntl (fcntl.h): Likewise.
3992         * modules/fnmatch (fnmatch.h): Likewise.
3993         * modules/getopt (getopt.h): Likewise.
3994         * modules/glob (glob.h): Likewise.
3995         * modules/inttypes (inttypes.h): Likewise.
3996         * modules/netinet_in (netinet/in.h): Likewise.
3997         * modules/poll (poll.h): Likewise.
3998         * modules/stdbool (stdbool.h): Likewise.
3999         * modules/stdint (stdint.h): Likewise.
4000         * modules/sys_select (sys/select.h): Likewise.
4001         * modules/sys_socket (sys/socket.h): Likewise.
4002         * modules/sys_stat (sys/stat.h): Likewise.
4003         * modules/sysexits (sysexits.h): Likewise.
4004         * modules/unistd (unistd.h): Likewise.
4005         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4006         Add a "DO NOT EDIT" comment to the generated file.
4007         (func_import): Likewise for gnulib-comp.m4.
4008
4009 2006-10-07  Bruno Haible  <bruno@clisp.org>
4010
4011         * lib/gl_sublist.h: New file.
4012         * lib/gl_sublist.c: New file.
4013
4014 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4015
4016         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4017         name (relative to the original working directory) and the file
4018         name component (relative to the temporary working directory).  All
4019         callers changed.
4020         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4021         * lib/mkdir-p.c (make_dir_parents): Likewise.
4022         * lib/mkdir-p.h (make_dir_parents): Likewise.
4023
4024 2006-10-06  Eric Blake  <ebb9@byu.net>
4025
4026         Define several macros for use by the clean-temp module.
4027         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4028         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4029         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4030
4031         * lib/clean-temp.h (close_stream_temp): New declaration.
4032         * lib/clean-temp.c (includes): Pull in headers according to what
4033         other modules are in use.
4034         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4035
4036 2006-10-06  Bruno Haible  <bruno@clisp.org>
4037
4038         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4039         instead of fopen, fwriteerror.
4040
4041 2006-10-06  Bruno Haible  <bruno@clisp.org>
4042
4043         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4044         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4045         int.
4046         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4047         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4048         Return an error indicator.
4049         Suggested by Eric Blake.
4050
4051 2006-10-06  Bruno Haible  <bruno@clisp.org>
4052
4053         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4054         Reported by Eric Blake.
4055
4056 2006-10-06  Bruno Haible  <bruno@clisp.org>
4057
4058         * modules/closeout (Description): Mention stderr too.
4059
4060 2006-10-06  Bruno Haible  <bruno@clisp.org>
4061         and Paul Eggert  <eggert@cs.ucla.edu>
4062
4063         * lib/closeout.c (close_stdout): Also close stderr.
4064         * lib/closeout.h: Update comment.
4065
4066 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4067
4068         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4069         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4070         * lib/dirchownmod.c: Include lchown.h.
4071         * lib/lchown.c: Don't include files that lchown.h now includes.
4072         Don't declare chown, since lchown.h now does that.
4073         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4074         (lchown): Define to rpl_chown if lchown is declared but
4075         does not exist.  Declare using a prototype if lchown is not
4076         declared.  Add a copyright notice.
4077         * lib/mkstemp.h: Include <unistd.h>.
4078         * lib/openat.c: Include lchown.h.
4079
4080         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4081         we now test for that separately.
4082         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4083         rather than O_NOFOLLOW, when testing whether it's possible to
4084         avoid a race condition reliably.
4085         * lib/savewd.c (savewd_chdir): Likewise.
4086
4087         Remove macros that are no longer needed now that stdint.h is
4088         reliable.
4089         * lib/fsusage.c (UINTMAX_MAX): Remove.
4090         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4091         * lib/utimecmp.c (SIZE_MAX): Remove.
4092
4093         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4094
4095         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4096         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4097         O_NOATIME works.
4098
4099 2006-10-05  Bruno Haible  <bruno@clisp.org>
4100
4101         * lib/gl_list.h (gl_sortedlist_search_from_to,
4102         gl_sortedlist_indexof_from_to): New declarations.
4103         (gl_list_implementation): New fields sortedlist_search_from_to,
4104         sortedlist_indexof_from_to.
4105         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4106         inline functions.
4107         * lib/gl_list.c (gl_sortedlist_search_from_to,
4108         gl_sortedlist_indexof_from_to): New functions.
4109         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4110         function.
4111         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4112         (gl_array_sortedlist_search_from_to): New function.
4113         (gl_array_list_implementation): Update.
4114         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4115         function.
4116         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4117         (gl_carray_sortedlist_search_from_to): New function.
4118         (gl_carray_list_implementation): Update.
4119         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4120         gl_linked_sortedlist_indexof_from_to): New functions.
4121         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4122         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4123         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4124         gl_tree_sortedlist_indexof_from_to): New functions.
4125         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4126         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4127         Update.
4128         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4129         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4130         Update.
4131
4132 2006-10-05  Bruno Haible  <bruno@clisp.org>
4133
4134         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4135         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4136         (struct gl_list_implementation): Add fields search_from_to,
4137         indexof_from_to. Remove fields search, indexof.
4138         (gl_list_search): Use the search_from_to method.
4139         (gl_list_search_from, gl_list_search_from_to): New functions.
4140         (gl_list_indexof): Use the indexof_from_to method.
4141         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4142         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4143         (gl_list_search_from, gl_list_search_from_to): New functions.
4144         (gl_list_indexof): Use the indexof_from_to method.
4145         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4146         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4147         gl_array_indexof. Add start_index, end_index arguments.
4148         (gl_array_search_from_to): Renamed from gl_array_search. Add
4149         start_index, end_index arguments.
4150         (gl_array_remove, gl_array_list_implementation): Update.
4151         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4152         gl_carray_indexof. Add start_index, end_index arguments.
4153         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4154         start_index, end_index arguments.
4155         (gl_carray_remove, gl_carray_list_implementation): Update.
4156         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4157         gl_linked_search. Add start_index, end_index arguments.
4158         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4159         start_index, end_index arguments.
4160         (gl_linked_remove): Update.
4161         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4162         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4163         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4164         field to 'size_t'.
4165         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4166         gl_tree_search. Add start_index, end_index arguments.
4167         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4168         start_index, end_index arguments.
4169         (gl_tree_remove): Update.
4170         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4171         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4172         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4173         function.
4174         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4175         gl_tree_search. Add start_index, end_index arguments.
4176         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4177         start_index, end_index arguments.
4178         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4179         Update.
4180         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4181
4182 2006-10-05  Bruno Haible  <bruno@clisp.org>
4183
4184         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4185
4186         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4187         fwriteerror_temp): New declarations.
4188         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4189         (descriptors): New variable.
4190         (cleanup): First, close the descriptors.
4191         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4192         fclose_temp, fwriteerror_temp): New functions.
4193
4194 2006-10-04  Jim Meyering  <jim@meyering.net>
4195
4196         * lib/fts.c (fts_open): Tiny comment change.
4197
4198 2006-10-04  Bruno Haible  <bruno@clisp.org>
4199
4200         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4201         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4202         gl_LOCK_BODY.
4203         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4204         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4205         gl_LOCK_EARLY_BODY.
4206         (gl_LOCK): Require gl_LOCK_BODY.
4207
4208 2006-10-04  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4211         (gl_oset_search_atleast): New declaration.
4212         (struct gl_oset_implementation): Add field 'search_atleast'.
4213         (gl_oset_search_atleast): New inline function.
4214         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4215         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4216         (gl_array_oset_implementation): Update.
4217         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4218         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4219         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4220
4221 2006-10-04  Bruno Haible  <bruno@clisp.org>
4222
4223         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4224
4225 2006-10-03  Bruno Haible  <bruno@clisp.org>
4226
4227         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4228         from gl_avltreehash_list_implementation.
4229
4230 2006-10-03  Bruno Haible  <bruno@clisp.org>
4231
4232         * lib/gl_oset.c (gl_oset_add): Fix return type.
4233
4234 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4235
4236         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4237
4238 2006-10-02  Eric Blake  <ebb9@byu.net>
4239
4240         * modules/strnlen (Depends-on): Add extensions.
4241
4242 2006-10-02  Eric Blake  <ebb9@byu.net>
4243
4244         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4245         definition in 2.60+.
4246
4247 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4248
4249         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4250         checks.
4251
4252 2006-10-02  Bruno Haible  <bruno@clisp.org>
4253
4254         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4255         to the AUTOMAKE_OPTIONS.
4256         Reported by Jim Meyering.
4257
4258 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4259
4260         Work around bug in Solaris 10 /proc file system:
4261         /proc/self/fd/NNN/.. isn't the parent directory of
4262         the directory whose file descriptor is NNN.  This needs to
4263         be worked around at run time, not compile time, since a
4264         program might be built on Solaris 8, where things work, and
4265         run on Solaris 10.
4266         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4267         to use the following interface instead:
4268         (OPENAT_BUFFER_SIZE): New macro.
4269         (openat_proc_name): New function.
4270         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4271         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4272         Likewise.
4273         * lib/openat-proc.c: New file.
4274         * modules/openat (Files): Add lib/openat-proc.c.
4275         (Depends-on): Add same-inode, stdbool.
4276         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4277
4278 2006-09-29  Bruno Haible  <bruno@clisp.org>
4279
4280         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4281         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4282         argument. Set stdout_closed before testing for ferror, not after.
4283         (fwriteerror, fwriteerror_no_ebadf): New functions.
4284
4285 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4286
4287         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4288
4289 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4290
4291         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4292         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4293
4294 2006-09-28  Jim Meyering  <jim@meyering.net>
4295
4296         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4297         Include <unistd.h>.
4298
4299 2006-09-28  Bruno Haible  <bruno@clisp.org>
4300
4301         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4302         * modules/linkedhash-list (Depends-on): Likewise.
4303         * modules/rbtreehash-list (Depends-on): Likewise.
4304
4305 2006-09-28  Bruno Haible  <bruno@clisp.org>
4306
4307         * lib/strndup.h: Simplify the redefinition of strndup.
4308         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4309         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4310
4311 2006-09-28  Bruno Haible  <bruno@clisp.org>
4312
4313         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4314         * lib/gl_linkedhash_list.c: Likewise.
4315         * lib/gl_rbtreehash_list.c: Likewise.
4316
4317 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4318
4319         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4320         getaddrinfo.
4321
4322         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4323         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4324         it causes <stdio_ext.h> to cause a compile-time error.
4325         Problem reported by Nelson H. F. Beebe.
4326         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4327         of HAVE_DECL___PENDING.
4328
4329         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4330         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4331         declaration.
4332
4333 2006-09-27  Jim Meyering  <jim@meyering.net>
4334
4335         This file could end up with a definition for a function
4336         named __strndup, rather than rpl_strndup on a system with
4337         incomplete weak_alias support.
4338         * lib/strndup.c (strndup): Rename from __strndup.
4339         Remove #defines that used to map __strndup to strndup.
4340         Don't use K&R prototypes.
4341         Remove LIBC-related code, since this file is not sync'd with glibc.
4342         * lib/strndup.h: Revamp, accordingly.
4343         * m4/strndup.m4: Modernize.
4344
4345 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4346
4347         * modules/savewd (Depends-on): Add 'raise'.
4348         * lib/savewd.c: Include <signal.h>, for 'raise'.
4349
4350 2006-09-26  Jim Meyering  <jim@meyering.net>
4351
4352         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4353         when we detect Darwin 8.7.0's acl_get_file bug.
4354         Rearrange to perform the new (below) run-test while $LIBS
4355         contains any acl-related library.  Set USE_ACL at the end.
4356         (gl_ACL_GET_FILE): New function.
4357
4358 2006-09-26  Eric Blake  <ebb9@byu.net>
4359
4360         * lib/verror.c: Include <config.h> unconditionally.
4361
4362 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4363
4364         * modules/clock-time (Maintainer): Add self.
4365         * modules/getlogin_r (Depends-on): Add extensions.
4366
4367 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4368
4369         * modules/clock-time: New module.
4370         * modules/nanosleep (Depends-on): Add clock-time.
4371         * modules/gethrxtime (Depends-on): Likewise.
4372         * modules/gettime (Depends-on): Likewise.
4373         * modules/settime (Depends-on): Likewise.
4374
4375         * modules/fts-lgpl: Depend on openat.
4376         * modules/mkancesdirs: Depend on savewd.
4377         * modules/mkdir-p: Likewise.
4378
4379 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4380
4381         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4382
4383         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4384         `gl_have_arbitrary_file_name_length_limit' to
4385         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4386         actually works between configure runs.
4387
4388 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4389             Bruno Haible  <bruno@clisp.org>
4390
4391         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4392
4393 2006-09-25  Jim Meyering  <jim@meyering.net>
4394
4395         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4396         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4397
4398 2006-09-25  Eric Blake  <ebb9@byu.net>
4399
4400         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4401         exec's in 2006-09-18 patch when shuffling fds.
4402
4403 2006-09-25  Bruno Haible  <bruno@clisp.org>
4404
4405         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4406         Reported by Jim Meyering.
4407
4408 2006-09-24  Jim Meyering  <jim@meyering.net>
4409
4410         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4411         compare a pointer against a literal "0".  That caused failures with
4412         at least HP-UX's hpcc.
4413
4414 2006-09-22  Simon Josefsson  <jas@extundo.com>
4415
4416         * modules/gc-sha1:
4417         * modules/gc-md4:
4418         * modules/gc-hmac-sha1:
4419         * modules/gc-hmac-md5:
4420         * modules/gc-des:
4421         * modules/gc-arcfour: Distribute more files.
4422
4423 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4424
4425         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4426         (gl_linked_iterator_from_to): Initialize struct completely.
4427         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4428         (gl_tree_iterator_from_to): Likewise
4429         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4430         * lib/gl_array_list.c [lint] (gl_array_iterator)
4431         (gl_array_iterator_from_to): Likewise.
4432         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4433         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4434         (gl_carray_iterator_from_to): Likewise.
4435
4436         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4437         * lib/md4.c (md4_process_block): Remove unused variable.
4438         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4439         parentheses for clarity.
4440
4441 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4442
4443         * modules/bison-i18n (Depends-on): Add gettext.
4444
4445 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4446
4447         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4448         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4449         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4450         also add missing comma that caused broken test.
4451         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4452         stdlib.h, for `abort'.
4453         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4454         variables.
4455         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4456         include unistd.h if present, for `rmdir'.
4457         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4458         variables.
4459         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4460         in the process include standard headers for prototypes.
4461         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4462         gets declared on GNU/Linux.
4463         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4464         unistd.h, for `rmdir'.
4465         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4466
4467         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4468         always true.
4469         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4470
4471         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4472
4473 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4474
4475         * gnulib-tool (func_version): Create output all at once.  This
4476         may help avoid triggering unnecessary SIGPIPEs, and at any
4477         rate it doesn't hurt.
4478
4479 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4480             Bruno Haible  <bruno@clisp.org>
4481
4482         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4483         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4484         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4485
4486         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4487         (gl_FUNC_VASPRINTF): Invoke it.
4488
4489 2006-09-22  Bruno Haible  <bruno@clisp.org>
4490
4491         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4492         getloadavg.c as first argument.
4493
4494 2006-09-22  Bruno Haible  <bruno@clisp.org>
4495
4496         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4497         at the beginning of the gl_INIT macro.
4498         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4499         gl_GETLOADAVG.
4500
4501 2006-09-22  Bruno Haible  <bruno@clisp.org>
4502
4503         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4504         module.
4505         Suggested by Ralf Wildenhues.
4506
4507 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4508
4509         Import this patch from libc:
4510
4511         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4512
4513         * lib/regex_internal.c (re_string_reconstruct): Handle
4514         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4515         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4516         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4517         re_string_context_at.
4518
4519         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4520         now requires it.
4521         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4522         gl_REGEX now does it for us.
4523         (gl_REGEX): Add test taken from
4524         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4525
4526         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4527         Check that large offsets work.  Modernize Autoconf usages.
4528         Prefer "yes" to mean a good thing rather than a bad.
4529         Don't put "#define mkstemp" in config.h, as this might interfere
4530         with standard system headers that "#define mkstemp mkstemp64".
4531
4532         * modules/mkstemp (Depends-on): Add extensions, so that
4533         mkstemp is visible on some platforms.
4534         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4535         (Include): Change to "mkstemp.h" from <stdlib.h>.
4536         (Files): Add mkstemp.h.
4537
4538         * lib/mkstemp.h: New file, since some standard headers
4539         #define mkstemp.
4540         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4541         Include "mkstemp.h".
4542         Make the _LIBC code resemble glibc original more,
4543         e.g., use K&R style.
4544         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4545         (mkstemp): Remove, since mkstemp.h does this for us.
4546         * lib/stdlib--.h: Include mkstemp.h.
4547
4548         Import this patch from libc:
4549
4550         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4551
4552         * lib/tempname.c (__gen_tempname): Change attempts_min
4553         into a macro.  Use preprocessor to decide how to initialize
4554         attempts [Coverity CID 67].
4555
4556 2006-09-20  Bruno Haible  <bruno@clisp.org>
4557
4558         * lib/mkdtemp.c: Import from libc.
4559         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4560                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4561                 attempts_min into a macro.  Use preprocessor to decide how to
4562                 initialize attempts [Coverity CID 67].
4563         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4564                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4565                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4566
4567 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4568
4569         * gnulib-tool (func_exit): New function, to allow to pass the
4570         exit status portably through the trap.  Use everywhere.
4571         (--help, --version): Signal a write error.
4572         (trap): catch SIGPIPE, for write errors.
4573         Exit at the end of the trap, with the correct exit status.
4574
4575 2006-09-19  Karl Berry  <karl@gnu.org>
4576
4577         * doc/gnulib.texi: note about the license texinfo files.
4578
4579 2006-09-19  Eric Blake  <ebb9@byu.net>
4580
4581         * gnulib-tool: Avoid space-tab.
4582
4583 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4584
4585         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4586         that prevented coreutils 6.1 from building.  Problem reported
4587         by Petter Reinholdtsen.
4588
4589 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4590
4591         * gnulib-tool (avoidlist): Fix typo that broke options like
4592         --avoid=lock that are used by coreutils bootstrap.
4593
4594 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4595
4596         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4597         more systematically.
4598
4599 2006-09-18  Jim Meyering  <jim@meyering.net>
4600
4601         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4602
4603 2006-09-18  Bruno Haible  <bruno@clisp.org>
4604
4605         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4606
4607 2006-09-18  Bruno Haible  <bruno@clisp.org>
4608
4609         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4610         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4611         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4612         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4613         * m4/gettext.m4: Require autoconf >= 2.52.
4614         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4615         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4616         of gl_cv_header_inttypes_h.
4617
4618 2006-09-18  Bruno Haible  <bruno@clisp.org>
4619
4620         * lib/javaversion.c: Include configmake.h.
4621
4622 2006-09-18  Bruno Haible  <bruno@clisp.org>
4623
4624         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4625         avoid that the while loops be executed in a subshell.
4626
4627 2006-09-18  Bruno Haible  <bruno@clisp.org>
4628
4629         * MODULES.html.sh (func_module): Break long lines.
4630         Suggested by Bruce Korb <bkorb@gnu.org>.
4631
4632 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4633
4634         Speed up by a factor of 1.12.
4635         * gnulib-tool (nl): New variable.
4636         (func_import): Rewrite include directive extraction to only read each
4637         directive once.
4638
4639 2006-09-17  Bruno Haible  <bruno@clisp.org>
4640
4641         * modules/javaversion (Makefile.am): Remove DEFS setting.
4642         (Depends-on): Add configmake, for PKGDATADIR definition.
4643
4644 2006-09-17  Bruno Haible  <bruno@clisp.org>
4645
4646         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4647
4648 2006-09-17  Bruno Haible  <bruno@clisp.org>
4649
4650         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4651         (func_modules_transitive_closure, func_modules_add_dummy,
4652         func_modules_to_filelist, func_import, func_create_testdir,
4653         func_create_megatestdir, ...): Use it wherever possible.
4654         Suggested by Ralf Wildenhues.
4655
4656 2006-09-16  Karl Berry  <karl@gnu.org>
4657
4658         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4659         to avoid sectioning errors.
4660         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4661         [ifinfo]: blank line after @center-ed titles.
4662         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4663         Spell FSF address consistently with others.
4664         (These changes approved by rms.)
4665
4666 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4667
4668         Speed up by a factor of 1.61.
4669         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4670         already checked module names again.
4671
4672 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4673
4674         Speed up by a factor of 1.13.
4675         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4676         for new_files, and the input to func_add_or_update.
4677
4678 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4679
4680         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4681         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4682
4683 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4684
4685         * modules/mkancesdirs (Depends-on): Add fcntl.
4686         * modules/savewd: New file.
4687         * MODULES.html.sh (File system functions): Add savewd.
4688
4689         * modules/configmake (Makefile.am): Add support for the
4690         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4691
4692 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4693
4694         * m4/savewd.m4: New file.
4695
4696 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4697
4698         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4699         (dirchownmod): New arg FD.  All callers changed.
4700         Use FD rather than opening the directory ourself, as opening is
4701         now the caller's responsibility.
4702         * lib/dirchownmod.h: Likewise.
4703         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4704         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4705         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4706         (test_dir): Remove.
4707         (mkancesdirs): Return length of prefix of FILE that has already
4708         been made, or -2 if there is a child doing the work.  Redo
4709         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4710         ".", and treat ".." specially since it might stray back into
4711         already-created areas.  Use a subprocess if necessary.  New arg
4712         WD; all users changed.  MAKE_DIR function should now return 1
4713         if it creates a directory that is not readable.  Return -2 if
4714         a child process is spun off.
4715         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4716         Adjust signature to match code.
4717         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4718         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4719         all users changed.
4720         * lib/savewd.c, lib/savewd.h: New files.
4721
4722 2006-09-15  Jim Meyering  <jim@meyering.net>
4723
4724         * modules/rename-dest-slash: New module.
4725         * MODULES.html.sh (posix_compat): Add it here.
4726
4727         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4728
4729 2006-09-15  Jim Meyering  <jim@meyering.net>
4730
4731         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4732         file.
4733
4734         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4735
4736 2006-09-15  Jim Meyering  <jim@meyering.net>
4737
4738         * lib/rename-dest-slash.c (has_trailing_slash): Use
4739         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4740         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4741         test before testing whether SRC is a directory.
4742         Suggestions from Bruno Haible.
4743
4744         Avoid a warning about an unused variable.
4745         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4746         into the #ifdef block where it's used.
4747
4748         * lib/rename-dest-slash.c: New file.
4749
4750 2006-09-14  Bruno Haible  <bruno@clisp.org>
4751
4752         * lib/allocsa.c: Include <config.h> unconditionally.
4753         * lib/asnprintf.c: Likewise.
4754         * lib/asprintf.c: Likewise.
4755         * lib/c-strcasecmp.c: Likewise.
4756         * lib/c-strcasestr.c: Likewise.
4757         * lib/c-strncasecmp.c: Likewise.
4758         * lib/c-strstr.c: Likewise.
4759         * lib/classpath.c: Likewise.
4760         * lib/clean-temp.c: Likewise.
4761         * lib/concatpath.c: Likewise.
4762         * lib/copy-file.c: Likewise.
4763         * lib/csharpcomp.c: Likewise.
4764         * lib/csharpexec.c: Likewise.
4765         * lib/execute.c: Likewise.
4766         * lib/fatal-signal.c: Likewise.
4767         * lib/findprog.c: Likewise.
4768         * lib/fwriteerror.c: Likewise.
4769         * lib/gl_array_list.c: Likewise.
4770         * lib/gl_array_oset.c: Likewise.
4771         * lib/gl_avltree_list.c: Likewise.
4772         * lib/gl_avltree_oset.c: Likewise.
4773         * lib/gl_avltreehash_list.c: Likewise.
4774         * lib/gl_carray_list.c: Likewise.
4775         * lib/gl_linked_list.c: Likewise.
4776         * lib/gl_linkedhash_list.c: Likewise.
4777         * lib/gl_list.c: Likewise.
4778         * lib/gl_oset.c: Likewise.
4779         * lib/gl_rbtree_list.c: Likewise.
4780         * lib/gl_rbtree_oset.c: Likewise.
4781         * lib/gl_rbtreehash_list.c: Likewise.
4782         * lib/imaxabs.c: Likewise.
4783         * lib/imaxdiv.c: Likewise.
4784         * lib/javacomp.c: Likewise.
4785         * lib/javaexec.c: Likewise.
4786         * lib/javaversion.c: Likewise.
4787         * lib/linebreak.c: Likewise.
4788         * lib/localcharset.c: Likewise.
4789         * lib/lock.c: Likewise.
4790         * lib/mbchar.c: Likewise.
4791         * lib/mbswidth.c: Likewise.
4792         * lib/mkdtemp.c: Likewise.
4793         * lib/pipe.c: Likewise.
4794         * lib/printf-args.c: Likewise.
4795         * lib/printf-parse.c: Likewise.
4796         * lib/progname.c: Likewise.
4797         * lib/progreloc.c: Likewise.
4798         * lib/readlink.c: Likewise.
4799         * lib/sh-quote.c: Likewise.
4800         * lib/stpcpy.c: Likewise.
4801         * lib/stpncpy.c: Likewise.
4802         * lib/strcasecmp.c: Likewise.
4803         * lib/strcasestr.c: Likewise.
4804         * lib/strcspn.c: Likewise.
4805         * lib/striconv.c: Likewise.
4806         * lib/strncasecmp.c: Likewise.
4807         * lib/strnlen1.c: Likewise.
4808         * lib/strstr.c: Likewise.
4809         * lib/strtok_r.c: Likewise.
4810         * lib/tls.c: Likewise.
4811         * lib/tmpdir.c: Likewise.
4812         * lib/unicodeio.c: Likewise.
4813         * lib/unsetenv.c: Likewise.
4814         * lib/vasnprintf.c: Likewise.
4815         * lib/vasprintf.c: Likewise.
4816         * lib/wait-process.c: Likewise.
4817         * lib/xallocsa.c: Likewise.
4818         * lib/xsetenv.c: Likewise.
4819         * lib/xstriconv.c: Likewise.
4820
4821 2006-09-13  Simon Josefsson  <jas@extundo.com>
4822
4823         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4824         that internally, suggested by Ralf Wildenhues
4825         <Ralf.Wildenhues@gmx.de>.
4826
4827 2006-09-13  Simon Josefsson  <jas@extundo.com>
4828
4829         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4830         @LIBOBJS@.
4831         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4832
4833 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4834
4835         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4836         longer worry about uses that don't define HAVE_CONFIG_H.
4837         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4838         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4839         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4840         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4841         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4842         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4843         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4844         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4845         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4846         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4847         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4848         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4849         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4850         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4851         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4852         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4853         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4854         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4855         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4856         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4857         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4858         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4859         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4860         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4861         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4862         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4863         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4864         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4865         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4866         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4867         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4868         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4869         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4870         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4871         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4872         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4873         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4874         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4875         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4876         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4877         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4878         Likewise.
4879
4880 2006-09-13  Eric Blake  <ebb9@byu.net>
4881
4882         * lib/getopt.c: Fix typo in last commit.
4883
4884 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4885
4886         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4887         dgettext.
4888
4889 2006-09-12  Jim Meyering  <jim@meyering.net>
4890
4891         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4892         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4893         Reported by Nelson H. F. Beebe.
4894
4895 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4896
4897         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4898         program_invocation_name and program_invocation_short_name are
4899         initialized.
4900         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4901         and program_invocation_short_name to argp.h, so they are visible
4902         to user programs.
4903         * lib/argp.h: Likewise
4904
4905 2006-09-10  Bruno Haible  <bruno@clisp.org>
4906
4907         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4908         m4/inttypes_h.m4, m4/uintmax_t.m4.
4909
4910 2006-09-10  Bruno Haible  <bruno@clisp.org>
4911
4912         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4913         gl_AC_TYPE_UINTMAX_T.
4914
4915 2006-09-10  Bruno Haible  <bruno@clisp.org>
4916
4917         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4918
4919 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4920
4921         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4922         convention.  Text proposed by Bruno Haible.
4923         (struct argp_option): Document the use of N_() wrappers.
4924
4925         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4926         '\v', and translate the two parts separately, instead of feeding
4927         the whole string to gettext.  This allows to exclude
4928         '\v' from the strings visible to the translator by writing doc
4929         strings as N_("..") "\v" N_("..").
4930
4931 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4932
4933         * config/srclist.txt: Undo latest change; the bug was fixed.
4934
4935 2006-09-09  Bruno Haible  <bruno@clisp.org>
4936
4937         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4938         assignments if building a library without libtool.
4939         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4940         in func_emit_lib_Makefile_am.
4941         (func_import): When building a static library libfoo.a, arrange to
4942         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4943         (func_create_testdir): Likewise.
4944         * modules/gc (configure.ac, Makefile.am): If building statically,
4945         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4946         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4947         * modules/striconv (configure.ac, Makefile.am): Likewise.
4948         Based on a suggestion by Ralf Wildenhues.
4949
4950 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4951
4952         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
4953         Check for unistd.h too, since Autoconf doesn't assume POSIX.
4954         Also:
4955
4956         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4957         Add year_2050_test to catch glibc bug 2821
4958         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4959
4960         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4961         Prefer #ifdef to #if.
4962
4963         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
4964         Return from 'main' instead of calling 'exit'.
4965
4966 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4967
4968         * lib/mktime.c (guess_time_tm): Fix bug where mktime
4969         returned the maximum time_t value rather than (time_t) -1.
4970         Problem originally reported by William Bardwell
4971         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
4972
4973         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4974         Moved to here ...
4975         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
4976         ... from here.
4977
4978 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
4979
4980         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
4981         2821 is fixed.
4982
4983 2006-09-08  Jim Meyering  <jim@meyering.net>
4984
4985         Don't make generated files read-only.  That would bother too many
4986         people.  However, do retain the ability to work when targets are
4987         read-only: remove the destination and temporary files before writing
4988         them (when generated via sed or echo), or by using the -f option for
4989         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
4990         * modules/alloca-opt, modules/argz, modules/arpa_inet:
4991         * modules/byteswap, modules/configmake, modules/fcntl:
4992         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
4993         * modules/localcharset, modules/netinet_in, modules/poll:
4994         * modules/stdbool, modules/stdint, modules/sys_select:
4995         * modules/sys_socket, modules/sys_stat, modules/sysexits:
4996
4997 2006-09-08  Jim Meyering  <jim@meyering.net>
4998
4999         Avoid new build failure on FreeBSD 6.0.
5000         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5001         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5002         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5003
5004 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5005
5006         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5007
5008 2006-09-07  Jim Meyering  <jim@meyering.net>
5009
5010         Fix global typo in last change: use chmod u-w, not chmod u-x.
5011         Spotted by Paul Eggert and Bruce Korb.
5012         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5013         * modules/byteswap, modules/configmake, modules/fcntl:
5014         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5015         * modules/localcharset, modules/netinet_in, modules/poll:
5016         * modules/stdbool, modules/stdint, modules/sys_select:
5017         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5018
5019 2006-09-06  Jim Meyering  <jim@meyering.net>
5020
5021         Make generated files be read-only.
5022         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5023         Ensure that each generated file is now read-only.
5024         * modules/argz: Likewise.
5025         * modules/arpa_inet: Likewise.
5026         * modules/byteswap: Likewise.
5027         * modules/configmake: Likewise.
5028         * modules/fcntl: Likewise.
5029         * modules/fnmatch: Likewise.
5030         * modules/getopt: Likewise.
5031         * modules/glob: Likewise.
5032         * modules/inttypes: Likewise.
5033         * modules/netinet_in: Likewise.
5034         * modules/poll: Likewise.
5035         * modules/stdbool: Likewise.
5036         * modules/stdint: Likewise.
5037         * modules/sys_select: Likewise.
5038         * modules/sys_socket: Likewise.
5039         * modules/sys_stat: Likewise.
5040         * modules/sysexits: Likewise.
5041         * modules/localcharset: Same as above, but continue using temporary
5042         file named "t-$@" (why different?) rather than the "$@-t" used
5043         everywhere else.
5044
5045         * modules/sysexits (Makefile.am): Replace literal occurrences
5046         of "sysexit.h" more readable, and more consistent, "$@".
5047
5048 2006-09-06  Bruno Haible  <bruno@clisp.org>
5049
5050         * modules/striconv: New file.
5051         * modules/xstriconv: New file.
5052         * MODULES.html.sh (Internationalization functions): Add striconv,
5053         xstriconv.
5054
5055 2006-09-06  Bruno Haible  <bruno@clisp.org>
5056
5057         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5058         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5059         not using libtool correctly.
5060
5061 2006-09-06  Bruno Haible  <bruno@clisp.org>
5062
5063         * lib/striconv.h: New file.
5064         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5065         iconvstring.c.
5066         * lib/xstriconv.h: New file.
5067         * lib/xstriconv.c: New file.
5068
5069 2006-09-06  Bruno Haible  <bruno@clisp.org>
5070
5071         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5072         lib_..._LDFLAGS.
5073
5074 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5075
5076         * lib/argz_.h: Sync from Libtool.
5077
5078         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5079                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5080
5081         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5082
5083 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5084
5085         * modules/trim: New file.
5086
5087 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5088
5089         * lib/trim.h: New file.
5090         * lib/trim.c: New file.
5091
5092 2006-09-05  Bruno Haible  <bruno@clisp.org>
5093
5094         * MODULES.html.sh (String handling): Add trim.
5095
5096 2006-09-04  Karl Berry  <karl@gnu.org>
5097
5098         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5099         until next release.
5100
5101 2006-09-03  Bruno Haible  <bruno@clisp.org>
5102
5103         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5104         correctly.
5105
5106 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5107
5108         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5109         not gl_GETLOADAVG.  Omit unneeded semicolons.
5110         Problems reported by Ralf Wildenhues in
5111         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5112         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5113         at the end, which is the usual gnulib style.
5114
5115         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5116         of doing all the work ourselves.
5117         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5118         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5119
5120 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5121
5122         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5123         Problem reported by Ralf Wildenhues in
5124         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5125
5126         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5127         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5128
5129 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5130
5131         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5132         yesterday's patch by changing test -n to test -z.
5133
5134 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5135
5136         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5137         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5138         the former is now obsolescent.
5139
5140         * modules/chdir-long (Depends-on): Add fcntl.
5141
5142 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5143
5144         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5145         obsolescent, and programs should use gnulib instead.
5146         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5147         but with prefixes changed.
5148
5149 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5150
5151         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5152         or stdbool.h, because they might not exist while configuring.
5153
5154         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5155         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5156         does that for us.
5157         (O_DIRECTORY): Remove.
5158
5159 2006-08-31  Eric Blake  <ebb9@byu.net>
5160
5161         * gnulib-tool: Don't let emacs change spaces to TAB.
5162
5163 2006-08-31  Bruno Haible  <bruno@clisp.org>
5164
5165         * gnulib-tool: When calling func_import more than once, do it in a
5166         subshell.
5167         Reported by Eric Blake <ebb9@byu.net>.
5168
5169 2006-08-31  Bruno Haible  <bruno@clisp.org>
5170
5171         * gnulib-tool (nl): Remove variable.
5172         (sed_transform_lib_file): Use more robust test for config-h module.
5173         (func_import): Fix typo in 2006-08-25 patch.
5174
5175 2006-08-31  Bruno Haible  <bruno@clisp.org>
5176
5177         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5178         specified, augment Makefile.am variables instead of assigning them.
5179
5180 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5181
5182         Work around a bug in both the Linux and SunOS 64-bit kernels:
5183         nanosleep mishandles sleeps for longer than 2**31 seconds.
5184         Problem reported by Frank v Waveren in
5185         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5186         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5187         Check for nanosleep bug.
5188         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5189
5190 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5191
5192         Work around a bug in both the Linux and SunOS 64-bit kernels:
5193         nanosleep mishandles sleeps for longer than 2**31 seconds.
5194         Problem reported by Frank v Waveren in
5195         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5196         * lib/nanosleep.c (BILLION): New constant.
5197         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5198         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5199         implementation.
5200
5201 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * modules/nanosleep (Depends-on): Add gettime.
5204
5205 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5206         and Simon Josefsson  <jas@extundo.com>
5207         and Oskar Liljeblad  <oskar@osk.mine.nu>
5208
5209         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5210         * gnulib-tool (func_import): New license type 'unmodifiable license
5211         text'.
5212         * modules/fdl: Use it.  Longer description.
5213         * module/gpl, module/lgpl: New files.
5214
5215 2006-08-30  Jim Meyering  <jim@meyering.net>
5216
5217         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5218         shadowing the parameter.
5219
5220 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5221
5222         Sync from Libtool:
5223
5224         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5225
5226         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5227         sharing with gnulib.  Report by Eric Blake.
5228
5229 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5230
5231         * modules/isapipe: New file.
5232         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5233
5234 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5235
5236         * modules/configmake (Makefile.am): Add a comment, and omit
5237         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5238         by Bruno Haible.
5239
5240 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5241
5242         * m4/isapipe.m4: New file.
5243
5244 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5245
5246         * lib/isapipe.c, lib/isapipe.h: New files.
5247
5248 2006-08-29  Jim Meyering  <jim@meyering.net>
5249
5250         * modules/configmake (Makefile.am): Make configmake.h depend on
5251         Makefile.  Otherwise, a stale configmake.h could hang around.
5252
5253 2006-08-29  Eric Blake  <ebb9@byu.net>
5254
5255         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5256         resolution of upstream bug 3044.
5257
5258 2006-08-29  Bruno Haible  <bruno@clisp.org>
5259
5260         * modules/localcharset (Depends-on): Add configmake.
5261         (Makefile.am): Remove setting of LIBDIR through DEFS.
5262
5263 2006-08-29  Bruno Haible  <bruno@clisp.org>
5264
5265         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5266         defined.
5267
5268 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5269
5270         * modules/fcntl: New file.
5271         * modules/chdir-safer (Depends-on): Add fcntl.
5272         * modules/fts: Likewise.
5273         * modules/mkdir-p: Likewise.
5274
5275         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5276         This undoes the most recent change, since we're now addressing the
5277         problem in a different way.
5278
5279         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5280         into output, since the output might be called Makefile.am even
5281         if $makefile_name is something different.
5282         (func_import): Use $makefile_am rather than
5283         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5284         empty.
5285
5286         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5287
5288 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5289
5290         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5291         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5292         recent change to stdint.m4, since we're now addressing the problem in a
5293         different way.
5294
5295 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5296
5297         * m4/fcntl_h.m4: New file.
5298
5299 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5300
5301         * lib/fcntl_.h: New file.
5302         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5303         the fcntl module.
5304         * lib/dirchownmod.c: Likewise.
5305         * lib/fts.c: Likewise.
5306
5307         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5308         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5309         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5310         just before including <inttypes.h>, to avoid circular inclusion.
5311
5312 2006-08-28  Jim Meyering  <jim@meyering.net>
5313
5314         * doc/visibility.texi: Actually read and correct the grammar of the
5315         sentence affected by yesterday's change.
5316
5317 2006-08-28  Eric Blake  <ebb9@byu.net>
5318
5319         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5320         needs wrapper.
5321
5322 2006-08-28  Eric Blake  <ebb9@byu.net>
5323
5324         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5325
5326 2006-08-28  Eric Blake  <ebb9@byu.net>
5327
5328         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5329
5330 2006-08-28  Bruno Haible  <bruno@clisp.org>
5331
5332         * modules/c-strstr: New file, from GNU gettext.
5333         * MODULES.html.sh (String handling): Add c-strstr.
5334
5335 2006-08-28  Bruno Haible  <bruno@clisp.org>
5336
5337         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5338         macros.
5339         Reported by Eric Blake.
5340
5341 2006-08-28  Bruno Haible  <bruno@clisp.org>
5342
5343         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5344         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5345         * lib/vasprintf.c: Include errno.h, limits.h.
5346         (EOVERFLOW): New fallback definition.
5347         (vasprintf): Test here whether the string length is > INT_MAX.
5348         * lib/vsnprintf.c: Include errno.h, limits.h.
5349         (EOVERFLOW): New fallback definition.
5350         (vsnprintf): Fix bug when generated string was too long for the buffer.
5351         Test here whether the string length is > INT_MAX.
5352
5353 2006-08-28  Bruno Haible  <bruno@clisp.org>
5354
5355         * lib/inttypes_.h (SCNX*): Remove definitions.
5356         Reported by Eric Blake.
5357
5358 2006-08-28  Bruno Haible  <bruno@clisp.org>
5359
5360         * lib/c-strstr.h: New file, from GNU gettext.
5361         * lib/c-strstr.c: New file, from GNU gettext.
5362
5363 2006-08-28  Bruno Haible  <bruno@clisp.org>
5364
5365         * gnulib-tool: Reorder some statements.
5366
5367 2006-08-28  Bruno Haible  <bruno@clisp.org>
5368
5369         * gnulib-tool: New option --makefile-name.
5370         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5371         $makefile_name.
5372         (func_import): Write $makefile_name to the cache file, and read it from
5373         there unless explicitly specified. Use $makefile_name as file name
5374         instead of Makefile.am. Adjust the recommendations accordingly.
5375
5376 2006-08-28  Bruno Haible  <bruno@clisp.org>
5377
5378         * gnulib-tool (func_verify_module): Check against misapplying patch.
5379
5380 2006-08-28  Bruno Haible  <bruno@clisp.org>
5381
5382         * gnulib-tool (func_relativize, func_relconcat): New functions.
5383         Give an error if --local-dir is given with --update.
5384         Remove trailing slashes from $local_gnulib_dir.
5385         (func_import): Store the relativized $local_gnulib_dir in
5386         gnulib-cache.m4, and read it from there if not specified explicitly.
5387
5388 2006-08-28  Bruno Haible  <bruno@clisp.org>
5389
5390         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5391         is the current directory. Respect also $local_gnulib_dir.
5392
5393 2006-08-28  Bruno Haible  <bruno@clisp.org>
5394             Simon Josefsson  <jas@extundo.com>
5395
5396         BeOS portability.
5397         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5398
5399 2006-08-27  Jim Meyering  <jim@meyering.net>
5400
5401         * doc/visibility.texi: Remove duplicate word: "pointer".
5402
5403 2006-08-26  Bruno Haible  <bruno@clisp.org>
5404
5405         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5406         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5407         (Makefile.am): Create inttypes.h from inttypes_.h.
5408         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5409
5410         * modules/imaxabs: New file.
5411
5412         * modules/imaxdiv: New file.
5413
5414 2006-08-26  Bruno Haible  <bruno@clisp.org>
5415
5416         * m4/inttypes.m4: New file.
5417         * m4/_inttypes_h.m4: Remove file.
5418         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5419         PRI_MACROS_BROKEN.
5420         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5421
5422         * m4/imaxabs.m4: New file.
5423
5424         * m4/imaxdiv.m4: New file.
5425
5426 2006-08-26  Bruno Haible  <bruno@clisp.org>
5427
5428         * lib/inttypes_.h: New file.
5429         * lib/inttypes.h: Remove file.
5430         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5431
5432         * lib/imaxabs.c: New file.
5433
5434         * lib/imaxdiv.c: New file.
5435
5436 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5437
5438         New config-h module, so that "make" output needn't be cluttered
5439         by -DHAVE_CONFIG_H.
5440         * MODULES.html.sh (Support for building libraries and executables):
5441         Add config-h.
5442         * modules/config-h: New file.
5443         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5444         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5445         the config-h module is used.
5446
5447         New configmake module, so that "make" output needn't be cluttered
5448         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5449         * MODULES.html.sh (Support for building libraries and executables):
5450         Add configmake.
5451         * modules/configmake: New file.
5452
5453 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5454
5455         * m4/config-h.m4: New file.
5456
5457 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5458
5459         * config/srclist.txt: Add elisp-comp.
5460
5461 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5462
5463         * MODULES.html.sh (Support for building libraries and executables):
5464         Add elisp-comp.
5465         * build-aux/elisp-comp: New file.
5466         * modules/elisp-comp: New file.
5467
5468 2006-08-24  Bruno Haible  <bruno@clisp.org>
5469
5470         * gnulib-tool (func_create_testdir): Use non-default values of
5471         sourcebase and m4base.
5472
5473 2006-08-24  Bruno Haible  <bruno@clisp.org>
5474
5475         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5476         HTML structure.
5477
5478 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5479
5480         * modules/openat (Depends-on): Add lchown.
5481
5482 2006-08-23  Bruno Haible  <bruno@clisp.org>
5483
5484         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5485         of gl_LOCK_EARLY instead of gl_LOCK.
5486
5487 2006-08-23  Bruno Haible  <bruno@clisp.org>
5488
5489         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5490         on OSF/1 to no.
5491         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5492
5493 2006-08-23  Bruno Haible  <bruno@clisp.org>
5494
5495         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5496         as unusable.
5497
5498         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5499         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5500         (gl_LOCK): New macro.
5501
5502 2006-08-22  Simon Josefsson  <jas@extundo.com>
5503
5504         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5505         to md5 module.
5506
5507 2006-08-22  Simon Josefsson  <jas@extundo.com>
5508
5509         * MODULES.html.sh: Add "Support for maintaining and release
5510         projects".
5511
5512         * build-aux/gnupload: New file, from coreutils.
5513
5514 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5515
5516         Avoid the need for AC_LIBSOURCES in m4 macros.
5517         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5518         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5519         * modules/check-version (EXTRA_DIST): Add check-version.h.
5520         * modules/crc (EXTRA_DIST): Add crc.h.
5521         * modules/des (EXTRA_DIST): Add des.h.
5522         * modules/gc (EXTRA_DIST): Add gc.h.
5523         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5524         * modules/getline (EXTRA_DIST): Add getline.h.
5525         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5526         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5527         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5528         * modules/md2 (EXTRA_DIST): Add md2.h.
5529         * modules/md4 (EXTRA_DIST): Add md4.h.
5530         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5531         * modules/read-file (EXTRA_DIST): Add read-file.h.
5532         * modules/readline (EXTRA_DIST): Add readline.h.
5533         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5534         rijndael-api-fst.h.
5535
5536 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5537
5538         * m4/rijndael.m4 (gl_ARCFOUR):
5539         * m4/arctwo.m4 (gl_ARCTWO):
5540         * m4/check-version.m4 (gl_CHECK_VERSION):
5541         * m4/crc.m4 (gl_CRC):
5542         * m4/des.m4 (gl_DES):
5543         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5544         * m4/gc.m4 (gl_GC):
5545         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5546         * m4/getline.m4 (gl_FUNC_GETLINE):
5547         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5548         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5549         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5550         * m4/md2.m4 (gl_MD2):
5551         * m4/md4.m4 (gl_MD4):
5552         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5553         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5554         * m4/readline.m4 (gl_FUNC_READLINE):
5555         * m4/rijndael.m4 (gl_RIJNDAEL):
5556         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5557         to get the necessary .h files and whatnot.
5558
5559 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5560
5561         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5562         gnulib rather than the other way around.
5563         * config/srclistvars.sh (COREUTILS): Remove.
5564
5565 2006-08-22  Jim Meyering  <jim@meyering.net>
5566
5567         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5568
5569         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5570
5571 2006-08-22  Eric Blake  <ebb9@byu.net>
5572
5573         * modules/regexprops-generic: New file.
5574         * MODULES.html.sh (Support for building documentation): List it.
5575
5576 2006-08-22  Eric Blake  <ebb9@byu.net>
5577
5578         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5579         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5580         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5581         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5582
5583 2006-08-22  Bruno Haible  <bruno@clisp.org>
5584
5585         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5586         and lib_LTLIBRARIES like the other lib_* variables.
5587
5588 2006-08-22  Bruno Haible  <bruno@clisp.org>
5589
5590         * build-aux/x-to-1.in: New file, from GNU gettext.
5591
5592 2006-08-22  Bruno Haible  <bruno@clisp.org>
5593
5594         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5595         <utmpx.h> exists.
5596
5597 2006-08-22  Bruno Haible  <bruno@clisp.org>
5598
5599         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5600         <utmpx.h> exists.
5601
5602 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5603
5604         BeOS portability.
5605         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5606         exist.
5607         Problem reported by Bruno Haible.
5608
5609 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5610
5611         Avoid the need for AC_LIBSOURCES in m4 macros.
5612         * modules/acl (EXTRA_DIST): Add acl.h.
5613         * modules/argmatch (Files): Add m4/argmatch.m4.
5614         (configure.ac): Add gl_ARGMATCH.
5615         (EXTRA_DIST): Renamed from lib_SOURCES, for
5616         consistency with the other modules.  Remove argmatch.c.
5617         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5618         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5619         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5620         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5621         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5622         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5623         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5624         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5625         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5626         * modules/closeout (EXTRA_DIST): Add closeout.h.
5627         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5628         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5629         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5630         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5631         dirname.h; remove basename.c and stripslash.c.
5632         * modules/exclude (EXTRA_DIST): Add exclude.h.
5633         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5634         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5635         * modules/file-type (EXTRA_DIST): Add file-type.h.
5636         * modules/filemode (EXTRA_DIST): Add filemode.h.
5637         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5638         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5639         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5640         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5641         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5642         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5643         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5644         * modules/getdate (EXTRA_DIST): Add getdate.c.
5645         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5646         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5647         * modules/getpass (EXTRA_DIST): Add getpass.h.
5648         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5649         * modules/group-member (EXTRA_DIST): Add group-member.h.
5650         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5651         * modules/hash (EXTRA_DIST): Add hash.h.
5652         * modules/human (EXTRA_DIST): Add human.h.
5653         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5654         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5655         * modules/lchown (EXTRA_DIST): Add lchown.h.
5656         * modules/long-options (EXTRA_DIST): Add long-options.h.
5657         * modules/lstat (EXTRA_DIST): Add lstat.h.
5658         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5659         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5660         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5661         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5662         * modules/memxor (EXTRA_DIST): Add memxor.h.
5663         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5664         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5665         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5666         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5667         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5668         * modules/physmem (EXTRA_DIST): Add physmem.h.
5669         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5670         * modules/posixver (EXTRA_DIST): Add posixver.h.
5671         * modules/quote (EXTRA_DIST): Add quote.h.
5672         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5673         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5674         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5675         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5676         regex_internal.h regexec.c.
5677         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5678         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5679         * modules/same (EXTRA_DIST): Add same.h.
5680         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5681         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5682         * modules/savedir (EXTRA_DIST): Add savedir.h.
5683         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5684         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5685         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5686         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5687         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5688         * modules/strdup (EXTRA_DIST): Add strdup.h.
5689         * modules/strftime (EXTRA_DIST): Add strftime.h.
5690         * modules/strndup (EXTRA_DIST): Add strndup.h.
5691         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5692         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5693         * modules/time_r (EXTRA_DIST): Add time_r.h.
5694         * modules/timespec (EXTRA_DIST): Add timespec.h.
5695         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5696         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5697         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5698         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5699         * modules/userspec (EXTRA_DIST): Add userspec.h.
5700         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5701         * modules/utimens (EXTRA_DIST): Add utimens.h.
5702         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5703         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5704         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5705         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5706         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5707         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5708         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5709         * modules/yesno (EXTRA_DIST): Add yesno.h.
5710
5711 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5712
5713         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5714
5715         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5716         * m4/dev-ino.m4, same-inode.m4: Remove.
5717
5718         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5719         * m4/acl.m4 (AC_FUNC_ACL):
5720         * m4/backupfile.m4 (gl_BACKUPFILE):
5721         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5722         * m4/canon-host.m4 (gl_CANON_HOST):
5723         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5724         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5725         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5726         * m4/cloexec.m4 (gl_CLOEXEC):
5727         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5728         * m4/closeout.m4 (gl_CLOSEOUT):
5729         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5730         * m4/dirname.m4 (gl_DIRNAME):
5731         * m4/exclude.m4 (gl_EXCLUDE):
5732         * m4/exitfail.m4 (gl_EXITFAIL):
5733         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5734         * m4/file-type.m4 (gl_FILE_TYPE):
5735         * m4/filemode.m4 (gl_FILEMODE):
5736         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5737         * m4/fpending.m4 (gl_FUNC_FPENDING):
5738         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5739         * m4/fts.m4 (gl_FUNC_FTS):
5740         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5741         * m4/getdate.m4 (gl_GETDATE):
5742         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5743         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5744         * m4/getpass.m4 (gl_FUNC_GETPASS):
5745         * m4/gettime.m4 (gl_GETTIME):
5746         * m4/getugroups.m4 (gl_GETUGROUPS):
5747         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5748         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5749         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5750         * m4/hash.m4 (gl_HASH):
5751         * m4/idcache.m4 (gl_IDCACHE):
5752         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5753         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5754         * m4/long-options.m4 (gl_LONG_OPTIONS):
5755         * m4/lstat.m4 (gl_FUNC_LSTAT):
5756         * m4/md5.m4 (gl_MD5):
5757         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5758         * m4/memcoll.m4 (gl_MEMCOLL):
5759         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5760         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5761         * m4/memxor.m4 (gl_MEMXOR):
5762         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5763         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5764         * m4/modechange.m4 (gl_MODECHANGE):
5765         * m4/mountlist.m4 (gl_MOUNTLIST):
5766         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5767         * m4/openat.m4 (gl_FUNC_OPENAT):
5768         * m4/pathmax.m4 (gl_PATHMAX):
5769         * m4/physmem.m4 (gl_PHYSMEM):
5770         * m4/posixtm.m4 (gl_POSIXTM):
5771         * m4/posixver.m4 (gl_POSIXVER):
5772         * m4/quote.m4 (gl_QUOTE):
5773         * m4/quotearg.m4 (gl_QUOTEARG):
5774         * m4/readtokens.m4 (gl_READTOKENS):
5775         * m4/readutmp.m4 (gl_READUTMP):
5776         * m4/regex.m4 (gl_REGEX):
5777         * m4/safe-read.m4 (gl_SAFE_READ):
5778         * m4/safe-write.m4 (gl_SAFE_WRITE):
5779         * m4/same.m4 (gl_SAME):
5780         * m4/save-cwd.m4 (gl_SAVE_CWD):
5781         * m4/savedir.m4 (gl_SAVEDIR):
5782         * m4/settime.m4 (gl_SETTIME):
5783         * m4/sha1.m4 (gl_SHA1):
5784         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5785         * m4/stat-macros.m4 (gl_STAT_MACROS):
5786         * m4/stat-time.m4 (gl_STAT_TIME):
5787         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5788         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5789         * m4/strdup.m4 (gl_FUNC_STRDUP):
5790         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5791         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5792         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5793         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5794         * m4/time_r.m4 (gl_TIME_R):
5795         * m4/timespec.m4 (gl_TIMESPEC):
5796         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5797         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5798         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5799         * m4/userspec.m4 (gl_USERSPEC):
5800         * m4/utimecmp.m4 (gl_UTIMECMP):
5801         * m4/utimens.m4 (gl_UTIMENS):
5802         * m4/xalloc.m4 (gl_XALLOC):
5803         * m4/xgetcwd.m4 (gl_XGETCWD):
5804         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5805         * m4/xreadlink.m4 (gl_XREADLINK):
5806         * m4/xstrtod.m4 (gl_XSTRTOD):
5807         * m4/yesno.m4 (gl_YESNO):
5808         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5809         to get the necessary .h files and whatnot.
5810
5811 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5812             Bruno Haible  <bruno@clisp.org>
5813
5814         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5815         /bin/sh understanding of '!' conditional negation.
5816
5817 2006-08-21  Jim Meyering  <jim@meyering.net>
5818
5819         * modules/openat (Depends-on): Really alphabetize.
5820
5821         * modules/acl (Depends-on): Add error and quote.
5822
5823         * check-module (find_included_lib_files): Add at-func.c to the
5824         ok-to-include-more-than-once white list.
5825
5826         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5827
5828 2006-08-21  Bruno Haible  <bruno@clisp.org>
5829
5830         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5831         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5832         Reported by Martin Lambers <marlam@marlam.de>.
5833
5834 2006-08-21  Bruno Haible  <bruno@clisp.org>
5835
5836         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5837         specify an installation location, don't emit a noinst_LIBRARIES or
5838         noinst_LTLIBRARIES assignment.
5839
5840 2006-08-21  Bruno Haible  <bruno@clisp.org>
5841
5842         BeOS portability.
5843         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5844         BeOS has mbrtowc() but no <wctype.h>.
5845
5846 2006-08-21  Bruno Haible  <bruno@clisp.org>
5847
5848         BeOS portability.
5849         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5850         exist.
5851
5852 2006-08-21  Bruno Haible  <bruno@clisp.org>
5853
5854         BeOS portability.
5855         * lib/mbchar.h: Include <wctype.h> only if it exists.
5856
5857 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5858
5859         Remove files that are no longer needed by their respective modules.
5860         * m4/obstack.m4: Remove.
5861         * m4/strerror_r.m4: Remove.
5862         * m4/uint32_t.m4: Remove.
5863         * m4/uintptr_t.m4: Remove.
5864         * m4/ullong_max.m4: Remove.
5865         * m4/xstrtoimax.m4: Remove.
5866         * m4/xstrtoumax.m4: Remove.
5867
5868         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5869         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5870         dependencies now capture this.
5871
5872         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5873         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5874         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5875         * m4/human.m4 (gl_HUMAN): Likewise.
5876         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5877         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5878
5879         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5880
5881         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5882         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5883         stdint.
5884         * m4/human.m4 (gl_HUMAN): Likewise.
5885         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5886         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5887         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5888         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5889         * m4/xstrtol (gl_XSTRTOL): Likewise.
5890
5891         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5892         AC_TYPE_LONG_LONG_INT.
5893         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5894         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5895         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5896         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5897
5898         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5899         on stdbool.
5900
5901         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5902         (gl_PREREQ_XSTRTOUL): Remove.
5903
5904         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5905
5906         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5907         mode.
5908
5909 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5910
5911         Add and change modules to make it easier for coreutils to use
5912         gnulib-tool.
5913         * modules/backupfile (Files): Remove m4/d-ino.m4.
5914         (Depends-on): Add d-ino.
5915         * modules/cycle-check (Depends-on): Add stdint.
5916         (lib_SOURCES): Add cycle-check.h.
5917         * modules/d-ino: New module.
5918         * modules/d-type: New module.
5919         * modules/error (Files): Remove m4/strerror_r.m4.
5920         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5921         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5922         m4/inttypes_h.m4, m4/uintmax_t.m4.
5923         (Depends-on): Add stdint.
5924         (lib_SOURCES): Add fsusage.h.
5925         * modules/getcwd (Files): Remove d-ino.m4.
5926         (Depends-on): Add d-ino.
5927         * modules/getndelim2 (Depends-on): Add stdint.
5928         * modules/glob (Files): Remove m4/d-type.m4.
5929         (Depends-on): Add d-type.
5930         * modules/host-os: New module.
5931         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5932         m4/inttypes_h.m4, m4/uintmax_t.m4.
5933         * Depends-on: Add stdint.
5934         (lib_SOURCES): Add human.h.
5935         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5936         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5937         m4/uintmax_t.m4, m4/ulonglong.m4.
5938         (Depends-on): Add stdint.
5939         (EXTRA_DIST): Add inttostr.h.
5940         * modules/lchmod: New module.
5941         * modules/link-follow: New module.
5942         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5943         (Depends-on): Add lchmod.
5944         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5945         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5946         (Depends-on): Add stdint.
5947         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
5948         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
5949         (Depends-on): Add stdint.
5950         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
5951         * modules/perl: New module.
5952         * modules/regex (Depends-on): Add stdint.
5953         * modules/rmdir-errno: New module.
5954         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5955         m4/intmax_t.m4.
5956         (Depends-on): Add stdint.
5957         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
5958         m4/uintmax_t.m4.
5959         (Depends-on): Add stdint.
5960         * modules/unlink-busy: New module.
5961         * modules/utimecmp (Depends-on): Add stdint.
5962         * modules/uptime: New module.
5963         * modules/winsz-ioctl: New module.
5964         * modules/winsz-termios: New module.
5965         * modules/xnanosleep (Depends-on): Add nanosleep.
5966         * modules/ullong_max: Remove.
5967         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
5968         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
5969         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
5970         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
5971         (Depends-on): Add inttypes.
5972         (lib_SOURCES): Add xstrtol.h.
5973         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
5974         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
5975         * MODULES.html.sh: Move 'assert' into the assert section.
5976         Move 'dummy' into the linking section.
5977         Remove ullong_max.
5978         Add section for compatibility checks for POSIX:2001 functions,
5979         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
5980         winsz-ioctl, and winsz-termios into it.
5981         Add lchmod.
5982         Add top-level Misc section and put host-os, perl, and uptime
5983         into it.
5984
5985 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5986
5987         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
5988         now assume the stdint module.  Do not include inttypes.h.
5989         * lib/fsusage.h: Likewise.
5990         * lib/getndelim2.c: Likewise.
5991         * lib/human.h: Likewise.
5992         * lib/inttostr.h: Likewise.
5993         * lib/obstack.c: Likewise.
5994         * lib/regex_internal.h: Likewise.
5995         * lib/tempname.c: Likewise.
5996         * lib/utimecmp.c: Likewise.
5997         * lib/xstrtol.h: Likewise.
5998
5999         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6000
6001         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6002         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6003         * lib/xtime.h: Likewise.
6004
6005 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6006
6007         * modules/openat (Files): Add lib/fchmodat.c.
6008         Fixes problem reported by Jay Youngman.
6009
6010 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6011
6012         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6013         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6014
6015 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6016             Bruno Haible  <bruno@clisp.org>
6017
6018         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6019         and is a script that invokes bison. Tighten the code. Add comments.
6020
6021 2006-08-18  Jim Meyering  <jim@meyering.net>
6022
6023         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6024         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6025         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6026         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6027
6028 2006-08-18  Bruno Haible  <bruno@clisp.org>
6029
6030         * modules/bison-i18n: New file.
6031         * MODULES.html.sh (Internationalization functions): Add it.
6032
6033 2006-08-18  Bruno Haible  <bruno@clisp.org>
6034
6035         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6036         sys/statvfs.h. When getmntinfo was found, check its declaration and
6037         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6038
6039 2006-08-18  Bruno Haible  <bruno@clisp.org>
6040
6041         * m4/bison-i18n.m4: New file, from bison.
6042
6043 2006-08-18  Bruno Haible  <bruno@clisp.org>
6044
6045         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6046         (ME_DUMMY): Treat "kernfs" as a dummy.
6047         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6048
6049 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6050
6051         Update from coreutils.
6052
6053         2006-08-15  Jim Meyering  <jim@meyering.net>
6054
6055         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6056
6057         2006-01-17  Jim Meyering  <jim@meyering.net>
6058
6059         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6060
6061         2006-01-11  Jim Meyering  <jim@meyering.net>
6062
6063         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6064         Check for the lchmod function.
6065
6066 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6067
6068         Update from coreutils.
6069
6070         * lib/__fpending.h: Add copyright notice.
6071         * lib/fprintftime.h: Likewise.
6072         * lib/savedir.c: Use (C) in copyright notice.
6073         * lib/savedir.h: Likewise.
6074
6075         2006-08-15  Jim Meyering  <jim@meyering.net>
6076
6077         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6078         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6079         in support of the EXPECTED_ERRNO macro.
6080         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6081         definitions.  Instead, define the appropriate symbols and include
6082         "at-func.c".
6083         * lib/mkdirat.c (mkdirat): Likewise.
6084         * lib/fchmodat.c (fchmodat): Likewise.
6085         (ENOSYS): Remove definition.
6086         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6087         it.  Don't include "unistd--.h" -- it wasn't ever used.
6088
6089         2006-01-17  Jim Meyering  <jim@meyering.net>
6090
6091         Rewrite fts.c not to change the current working directory,
6092         by using openat, fstatat, fdopendir, etc..
6093
6094         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6095         (HAVE_OPENAT_SUPPORT): Define.
6096         [_LIBC] (fchdir): Don't undef or define; no longer used.
6097         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6098         Now, this `function' always succeeds, and consumes its file descriptor
6099         parameter -- so callers must not close such FDs.  Update callers.
6100         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6101         (diropen): Add parameter, SP.  Adjust all callers.
6102         Implement using diropen_fd, rather than open.
6103         (fts_open): Initialize new member, fts_cwd_fd.
6104         Remove fts_rft-setting code.
6105         (fts_close): Close fts_cwd_fd, if necessary.
6106         (__opendir2): Define in terms of opendir or opendirat,
6107         depending on whether the FST_NOCHDIR flag is set.
6108         (fts_build): Since fts_safe_changedir consumes its FD, and since
6109         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6110         and close the dup'd file descriptor upon failure.
6111         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6112         (fts_safe_changedir): Tweak semantics to reflect that this function
6113         now calls cwd_advance_fd and hence consumes its FD argument.
6114         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6115         [struct FTS] (fts_rft): Remove now-unused member.
6116         [struct FTS] (fts_cycle.state): Improve comment.
6117
6118         * lib/openat.c (openat_needs_fchdir): New function.
6119         * lib/openat.h (openat_needs_fchdir): Declare it.
6120
6121 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6122
6123         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6124         Problem and fix reported by Pádraig Brady in
6125         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6126
6127 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6128
6129         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6130
6131 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6132
6133         * lib/memcoll.c (memcoll): Optimize for the common case where the
6134         arguments are bytewise equal.
6135
6136 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6137
6138         * doc/regexprops-generic.texi: Add a copyright notice.
6139
6140 2006-08-15  Bruno Haible  <bruno@clisp.org>
6141
6142         * modules/tmpdir (License): Change to LGPL.
6143
6144 2006-08-15  Bruno Haible  <bruno@clisp.org>
6145
6146         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6147         module.
6148
6149 2006-08-14  Simon Josefsson  <jas@extundo.com>
6150
6151         * config/srclist.txt: Add gnupload.
6152
6153 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6154
6155         Change copyright notice from LGPL 2 to GPL 2, since that's the
6156         standard form used in the gnulib repository.
6157         * tests/test-lock.c: Likewise.
6158         * tests/test-stdint.c: Likewise.
6159         * tests/test-tls.c: Likewise.
6160
6161         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6162         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6163         Add copyright notice.
6164
6165         * check-module: Add copyright notice.  Output a copyright
6166         notice if "--version" is specified.
6167         * modules/COPYING: New file.
6168         * tests/test-getaddrinfo.c: Add copyright notice.
6169         * tests/test-verify.c: Likewise.
6170
6171 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6172
6173         Change copyright notice from LGPL 2 to GPL 2, since that's the
6174         standard form used in the gnulib repository.
6175         * lib/lock.c: LGPL -> GPL.
6176         * lib/lock.h: Likewise.
6177         * lib/strnlen1.c: Likewise.
6178         * lib/strnlen1.h: Likewise.
6179         * lib/tls.c: Likewise.
6180         * lib/tls.h: Likewise.
6181         * lib/tmpdir.c: Likewise.
6182
6183         * lib/TODO: Remove; this belongs only in coreutils.
6184
6185 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6186
6187         Add copyright notices to long-enough files that lack them, since
6188         otherwise the files aren't clearly free.  Use the same notice that
6189         getdate.texi already uses.
6190         * doc/alloca-opt.texi: Add copyright notice.
6191         * doc/alloca.texi: Likewise.
6192         * doc/ctime.texi: Likewise.
6193         * doc/functions.texi: Likewise.
6194         * doc/gcd.texi: Likewise.
6195         * doc/gnulib-tool.texi: Likewise.
6196         * doc/inet_ntoa.texi: Likewise.
6197         * doc/visibility.texi: Likewise.
6198
6199         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6200         * doc/quote.texi: Add copyright notice.
6201
6202         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6203         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6204         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6205         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6206         is now obsolete, and give a pointer to the Sun list.
6207         Add copyright notice.
6208
6209 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6210
6211         * config/srclistvars.sh: Add copyright notice.
6212
6213 2006-08-14  Eric Blake  <ebb9@byu.net>
6214
6215         Import the following change from libc:
6216
6217         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6218
6219         Upstream bug 2997.
6220         * lib/misc/error.c: Add space between program name and message if file
6221         name is missing.
6222
6223 2006-08-12  Karl Berry  <karl@gnu.org>
6224
6225         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6226         remove, these originate in gnulib now.
6227
6228 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6229
6230         * doc/Makefile (standards.info standards.html standards.dvi):
6231         Also depend on make-stds.texi.
6232
6233 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6234
6235         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6236         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6237
6238         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6239         in wchar_t.  Problem reported by Eric Blake.
6240
6241         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6242         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6243         Also, help the compiler to keep LEN in a register.
6244
6245 2006-08-11  Eric Blake  <ebb9@byu.net>
6246
6247         * users.txt: Sort.  Add tar.
6248
6249 2006-08-11  Bruno Haible  <bruno@clisp.org>
6250
6251         * users.txt: New file.
6252
6253 2006-08-11  Bruno Haible  <bruno@clisp.org>
6254
6255         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6256         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6257
6258 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6259
6260         * modules/snprintf (Depends-on): Remove minmax.
6261         (Maintainer): Add self and Bruno.
6262
6263 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6264
6265         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6266         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6267         (EOVERFLOW): Define if the system does not.
6268         Do not include "minmax.h"; it wasn't used.
6269         (snprintf): Don't assume size_t promotes to an unsigned type.
6270         Fix bug when generated string was too long for the buffer: the
6271         buffer's contents are supposed to be the initial prefix of the
6272         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6273         exceeds INT_MAX; do the check ourselves.
6274
6275         Import the following changes from libc:
6276
6277         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6278
6279         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6280         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6281         set wc to the byte which couldn't be converted.
6282         (re_string_reconstruct): Don't clear valid_raw_len before calling
6283         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6284         tip_context using re_string_context_at.
6285
6286         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6287
6288         * lib/posix/regex.h: g++ still cannot handled [restrict].
6289
6290         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6291
6292         * lib/posix/regex.h: Remove special handling for VMS.
6293
6294 2006-08-10  Jim Meyering  <jim@meyering.net>
6295
6296         * modules/same-inode: New module.
6297         * modules/dev-ino: New module.
6298         * modules/cycle-check: Depend on these modules, rather than simply
6299         including their .h files.
6300         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6301         required via m4/cycle-check.m4.
6302         * modules/same: Depend on new same-inode module, rather than
6303         including same-inode.h.
6304         * modules/chdir-safer: New file.
6305
6306         * modules/chown (Depends-on): Add stat-macros.
6307
6308 2006-08-10  Jim Meyering  <jim@meyering.net>
6309
6310         * m4/cycle-check.m4: New file.
6311         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6312         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6313
6314 2006-08-10  Eric Blake  <ebb9@byu.net>
6315
6316         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6317         in from original proposal.
6318
6319 2006-08-10  Eric Blake  <ebb9@byu.net>
6320         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6321
6322         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6323         namespace.
6324
6325 2006-08-10  Bruno Haible  <bruno@clisp.org>
6326
6327         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6328         as well.
6329
6330 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6331
6332         Sync from coreutils.
6333
6334         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6335
6336         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6337         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6338
6339 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6340
6341         * modules/restrict: Remove; no longer needed now that we assume
6342         Autoconf 2.59 or later.
6343         * MODULES.html.sh: Remove 'restrict'.
6344         * modules/argp (Depends-on): Remove 'restrict'.
6345         * modules/base64 (Depends-on): Likewise.
6346         * modules/gc (Depends-on): Likewise.
6347         * modules/getaddrinfo (Depends-on): Likewise.
6348         * modules/glob (Depends-on): Likewise.
6349         * modules/inet_ntop (Depends-on): Likewise.
6350         * modules/inet_pton (Depends-on): Likewise.
6351         * modules/memxor (Depends-on): Likewise.
6352         * modules/regex (Depends-on): Likewise.
6353         * modules/strtok_r (Depends-on): Likewise.
6354         * modules/time_r (Depends-on): Likewise.
6355
6356 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6357
6358         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6359         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6360         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6361         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6362         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6363         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6364         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6365         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6366
6367         Merge from coreutils.
6368         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6369         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6370         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6371         * m4/time_r.m4 (gl_TIME_R): Likewise.
6372
6373 2006-08-09  Karl Berry  <karl@gnu.org>
6374
6375         * config/srclist.txt: no more gettext-tools, per Bruno.
6376
6377 2006-08-08  Eric Blake  <ebb9@byu.net>
6378
6379         * modules/verror: New module.
6380         * MODULES.html.sh: Document it.
6381
6382 2006-08-08  Eric Blake  <ebb9@byu.net>
6383
6384         * lib/verror.h, lib/verror.c: New files.
6385
6386 2006-08-08  Eric Blake  <ebb9@byu.net>
6387
6388         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6389         verror_at_line output complies with GNU Coding Standards even when
6390         file is NULL.
6391
6392 2006-08-07  Bruno Haible  <bruno@clisp.org>
6393
6394         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6395         versions of AIX.
6396         Reported by Ralf Wildenhues.
6397
6398 2006-08-07  Bruno Haible  <bruno@clisp.org>
6399
6400         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6401         in an AC_DEFUN. Needed so that the autoconf snippets can use
6402         AC_REQUIRE.
6403
6404 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6405
6406         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6407         Initialize pkgdata_DATA.
6408         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6409         overriding it.
6410
6411 2006-08-06  Eric Blake  <ebb9@byu.net>
6412
6413         * lib/error.h: Fold in some upstream changes from glibc.
6414         * lib/error.c: Likewise.
6415
6416 2006-08-04  Bruno Haible  <bruno@clisp.org>
6417
6418         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6419         Make the mostlyclean-local rule depend on mostlyclean-generic.
6420         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6421
6422 2006-07-31  Bruno Haible  <bruno@clisp.org>
6423
6424         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6425         <stdlib.h>, <string.h>.
6426
6427 2006-07-30  Bruno Haible  <bruno@clisp.org>
6428
6429         * modules/readlink (License): Change to LGPL.
6430
6431 2006-07-30  Bruno Haible  <bruno@clisp.org>
6432
6433         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6434         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6435         set PKGDATADIR to point to it.
6436
6437 2006-07-30  Bruno Haible  <bruno@clisp.org>
6438
6439         * modules/csharpexec (configure.ac): Comment out macro invocation.
6440         * modules/javaexec (configure.ac): Likewise.
6441         * modules/javacomp-script (configure.ac): Likewise.
6442
6443         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6444
6445 2006-07-30  Bruno Haible  <bruno@clisp.org>
6446
6447         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6448         linked-list.
6449
6450 2006-07-30  Bruno Haible  <bruno@clisp.org>
6451
6452         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6453
6454 2006-07-30  Bruno Haible  <bruno@clisp.org>
6455
6456         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6457         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6458         get removed.
6459
6460 2006-07-29  Bruno Haible  <bruno@clisp.org>
6461
6462         Make it possible for gnulib-tool to work with locally modified or
6463         augmented gnulib repositories.
6464         * gnulib-tool (func_usage): Document --local-dir option.
6465         (local_gnulib_dir): New variable.
6466         Handle --local-dir option.
6467         (func_lookup_file): New function.
6468         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6469         (func_get_description, func_get_filelist, func_get_description,
6470         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6471         func_get_automake_snippet, func_get_include_directive,
6472         func_get_license, func_get_maintainer): Use func_lookup_file.
6473         (func_import, func_create_testdir): Use func_lookup_file.
6474
6475 2006-07-29  Bruno Haible  <bruno@clisp.org>
6476
6477         * modules/setenv (Depends-on): Add unistd.
6478
6479 2006-07-29  Bruno Haible  <bruno@clisp.org>
6480
6481         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6482
6483 2006-07-29  Bruno Haible  <bruno@clisp.org>
6484
6485         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6486
6487 2006-07-29  Bruno Haible  <bruno@clisp.org>
6488
6489         * gnulib-tool (import, update): If there is no Makefile.am, look at
6490         aclocal.m4, instead of bailing out.
6491
6492 2006-07-29  Bruno Haible  <bruno@clisp.org>
6493
6494         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6495         Categorize the options by when they are useful.
6496
6497 2006-07-29  Bruno Haible  <bruno@clisp.org>
6498
6499         * gnulib-tool (func_usage): Document option --no-libtool.
6500         Handle option --no-libtool.
6501         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6502         for changed semantics of $libtool variable.
6503         (func_import): Likewise. If libtool is not used, show this through
6504         an option --no-libtool.
6505         (func_create_testdir): Update.
6506
6507 2006-07-29  Bruno Haible  <bruno@clisp.org>
6508
6509         * gnulib-tool (func_import): Extend error message about missing
6510         --doc-base.
6511
6512 2006-07-29  Bruno Haible  <bruno@clisp.org>
6513
6514         * gnulib-tool (func_import): Don't create the $docbase directory if
6515         there is no file to store there.
6516
6517 2006-07-29  Bruno Haible  <bruno@clisp.org>
6518
6519         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6520         relevant, look for configure.ac there, not in the current directory.
6521         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6522
6523 2006-07-29  Bruno Haible  <bruno@clisp.org>
6524
6525         * gnulib-tool (SORT): New variable.
6526         (func_usage): Undocument --assume-autoconf option.
6527         Remove --assume-autoconf option handling.
6528         (autoconf_minversion): Determine from the contents of configure.ac.
6529         (func_import): Remove autoconf_minversion handling.
6530         Suggested by Eric Blake.
6531
6532 2006-07-29  Bruno Haible  <bruno@clisp.org>
6533
6534         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6535
6536 2006-07-29  Bruno Haible  <bruno@clisp.org>
6537
6538         * config/srclist.txt (*setenv.[ch]): Remove rules.
6539
6540 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6541
6542         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6543
6544 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6545
6546         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6547         arpa/inet.h.
6548
6549 2006-07-28  Simon Josefsson  <jas@extundo.com>
6550
6551         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6552         * modules/inet_pton (Depends-on): Likewise.
6553
6554 2006-07-28  Simon Josefsson  <jas@extundo.com>
6555
6556         * m4/netinet_in_h.m4: New file.
6557
6558 2006-07-28  Simon Josefsson  <jas@extundo.com>
6559
6560         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6561         #include's.
6562
6563 2006-07-28  Simon Josefsson  <jas@extundo.com>
6564
6565         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6566         #include's.
6567
6568 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6569
6570         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6571         setgid on directories only if they set these bits.
6572         * lib/modechange.h: Remove obsolete comment about masks.
6573
6574 2006-07-28  Eric Blake  <ebb9@byu.net>
6575
6576         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6577         macro expansion.
6578
6579 2006-07-28  Bruno Haible  <bruno@clisp.org>
6580
6581         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6582
6583 2006-07-28  Bruno Haible  <bruno@clisp.org>
6584
6585         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6586
6587 2006-07-28  Bruno Haible  <bruno@clisp.org>
6588
6589         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6590         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6591         Define fallbacks.
6592         Avoids link error on FreeBSD 4.x.
6593         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6594
6595         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6596         encoding.
6597         * lib/mbswidth.c (iswcntrl): Likewise.
6598
6599 2006-07-27  Bruno Haible  <bruno@clisp.org>
6600
6601         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6602         test.
6603
6604 2006-07-27  Bruno Haible  <bruno@clisp.org>
6605
6606         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6607         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6608         defined.
6609
6610 2006-07-26  Eric Blake  <ebb9@byu.net>
6611
6612         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6613
6614 2006-07-26  Eric Blake  <ebb9@byu.net>
6615
6616         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6617         like mingw that lack mkstemp.
6618         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6619         avoid compilation warning on mingw.
6620
6621 2006-07-26  Bruno Haible  <bruno@clisp.org>
6622
6623         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6624         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6625         INT_FAST*_MIN, INTPTR_MIN.
6626
6627 2006-07-25  Bruno Haible  <bruno@clisp.org>
6628
6629         * modules/version-etc (Depends-on): Add stdarg.
6630
6631 2006-07-25  Bruno Haible  <bruno@clisp.org>
6632
6633         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6634         complex commands.
6635
6636 2006-07-25  Bruno Haible  <bruno@clisp.org>
6637
6638         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6639         defined in <stdarg.h> or config.h.
6640
6641 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6642
6643         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6644         (gl_STDIO_SAFER): Remove.
6645
6646 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6647
6648         * MODULES.html.sh (File stream based Input/Output):
6649         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6650         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6651         * modules/fopen-safer, modules/tmpfile-safer: New files.
6652         * modules/stdio-safer: Remove.
6653
6654 2006-07-24  Bruno Haible  <bruno@clisp.org>
6655
6656         * modules/tmpdir: New file.
6657         * MODULES.html.sh (File system functions): Add it.
6658
6659 2006-07-24  Bruno Haible  <bruno@clisp.org>
6660
6661         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6662         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6663
6664 2006-07-24  Bruno Haible  <bruno@clisp.org>
6665
6666         * modules/clean-temp: New file.
6667
6668 2006-07-24  Bruno Haible  <bruno@clisp.org>
6669
6670         * m4/tmpdir.m4: New file, from GNU gettext.
6671
6672 2006-07-24  Bruno Haible  <bruno@clisp.org>
6673
6674         * lib/tmpdir.h: New file, from GNU gettext.
6675         * lib/tmpdir.c: New file, from GNU gettext.
6676
6677 2006-07-24  Bruno Haible  <bruno@clisp.org>
6678
6679         * lib/clean-temp.h: New file, from GNU gettext.
6680         * lib/clean-temp.c: New file, from GNU gettext.
6681
6682 2006-07-23  Eric Blake  <ebb9@byu.net>
6683
6684         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6685         (Depends-on): Add binary-io.
6686
6687 2006-07-23  Eric Blake  <ebb9@byu.net>
6688
6689         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6690
6691 2006-07-23  Eric Blake  <ebb9@byu.net>
6692
6693         * lib/tmpfile-safer.c: New file.
6694         * lib/stdio-safer.h (fopen_safer): Add prototype.
6695         * lib/stdio--.h (tmpfile): Make safer.
6696
6697 2006-07-23  Bruno Haible  <bruno@clisp.org>
6698
6699         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6700         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6701         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6702         gl_linked_remove_at): Use it.
6703
6704 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6705         and Simon Josefsson <jas@extundo.com>
6706
6707         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6708
6709         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6710
6711 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6712
6713         * modules/close-stream: New file.
6714         * modules/closeout (Description): Make it clear that it exits
6715         with a diagnostic on error.
6716         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6717         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6718
6719 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6720
6721         * m4/close-stream.m4: New file.
6722
6723 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6724
6725         * lib/close-stream.c, lib/close-stream.h: New files.
6726
6727 2006-07-22  Bruno Haible  <bruno@clisp.org>
6728
6729         Merge from GNU gettext 0.15.
6730
6731         2006-05-01  Bruno Haible  <bruno@clisp.org>
6732
6733                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6734
6735         2006-07-22  Bruno Haible  <bruno@clisp.org>
6736
6737                 * modules/javaversion: New file.
6738                 * MODULES.html.sh (Java): Add javaversion.
6739
6740         2006-03-12  Bruno Haible  <bruno@clisp.org>
6741
6742                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6743
6744         2005-12-04  Bruno Haible  <bruno@clisp.org>
6745
6746                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6747                 (untested).
6748
6749         2006-06-21  Bruno Haible  <bruno@clisp.org>
6750
6751                 Avoid warnings from recent versions of mcs.
6752                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6753                 -o, -L, -r any more. Use options documented since mcs-1.0
6754                 instead. Similarly for -g.
6755
6756         2005-12-04  Bruno Haible  <bruno@clisp.org>
6757
6758                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6759                 .resources, not .resource.
6760
6761         2005-07-09  Bruno Haible  <bruno@clisp.org>
6762
6763                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6764                 add a .dll suffix.
6765                 Reported by Mark Junker <mjscod@gmx.de>.
6766
6767         2006-07-22  Bruno Haible  <bruno@clisp.org>
6768
6769                 * modules/gettext: Upgrade to gettext-0.15.
6770                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6771                 m4/visibility.m4.
6772                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6773
6774 2006-07-22  Bruno Haible  <bruno@clisp.org>
6775
6776         Merge from GNU gettext 0.15.
6777
6778         2006-03-25  Bruno Haible  <bruno@clisp.org>
6779
6780                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6781
6782         2006-07-21  Bruno Haible  <bruno@clisp.org>
6783
6784                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6785                 "1.1".
6786
6787         2006-05-09  Bruno Haible  <bruno@clisp.org>
6788
6789                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6790                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6791                 for the conftestver execution.
6792
6793         2006-05-01  Bruno Haible  <bruno@clisp.org>
6794
6795                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6796                 optional target-version argument. Verify that the compiler
6797                 groks source of the specified source-version, or add -source
6798                 option as necessary. Verify that the compiler produces
6799                 bytecode in the specified target-version, or add -target and
6800                 -source options as necessary. Make the result of the test
6801                 available as variable CONF_JAVAC. Also log error output in
6802                 config.log.
6803
6804         2006-03-11  Bruno Haible  <bruno@clisp.org>
6805
6806                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6807
6808         2006-05-09  Bruno Haible  <bruno@clisp.org>
6809
6810                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6811                 CLASSPATH_SEPARATOR to a semicolon.
6812
6813         2006-03-12  Bruno Haible  <bruno@clisp.org>
6814
6815                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6816                 available as variable CONF_JAVA, for subsequent autoconf
6817                 tests. Also log error output in config.log.
6818
6819         2006-07-19  Bruno Haible  <bruno@clisp.org>
6820
6821                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6822                 that getline works on glibc2 systems. Needed to avoid trouble
6823                 in relocatable.c.
6824                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6825
6826         2005-12-04  Bruno Haible  <bruno@clisp.org>
6827
6828                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6829                 launcher (untested).
6830
6831         2005-12-04  Bruno Haible  <bruno@clisp.org>
6832
6833                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6834
6835         2006-07-22  Bruno Haible  <bruno@clisp.org>
6836
6837                 * gettext.m4: Update from GNU gettext-0.15.
6838                 * nls.m4: Likewise.
6839                 * po.m4: Likewise.
6840                 * inttypes-pri.m4: Likewise.
6841                 * inttypes-h.m4: Renamed from inttypes.m4.
6842                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6843
6844 2006-07-22  Bruno Haible  <bruno@clisp.org>
6845
6846         Merge from GNU gettext 0.15.
6847
6848         2005-07-05  Bruno Haible  <bruno@clisp.org>
6849
6850                 * printf-args.c (printf_fetchargs): Work around broken
6851                 definition of wint_t on mingw.
6852
6853         2005-02-12  Bruno Haible  <bruno@clisp.org>
6854
6855                 * xallocsa.h: Add extern "C" for C++.
6856
6857         2006-05-17  Bruno Haible  <bruno@clisp.org>
6858
6859                 Cygwin portability.
6860                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6861
6862         2006-04-30  Bruno Haible  <bruno@clisp.org>
6863
6864                 * progreloc.c: Include <mach-o/dyld.h> if available.
6865                 (find_executable): Use _NSGetExecutablePath when possible.
6866
6867         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6868
6869                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6870                 function.
6871
6872         2005-12-29  Bruno Haible  <bruno@clisp.org>
6873
6874                 * progreloc.c (set_program_name_and_installdir): Fix
6875                 compilation error.
6876
6877         2005-12-04  Bruno Haible  <bruno@clisp.org>
6878
6879                 Cygwin portability.
6880                 * progreloc.c: Include <windows.h> also on Cygwin.
6881                 (find_executable): Add support for Cygwin.
6882                 (set_program_name_and_installdir): Handle also platforms with
6883                 nonempty EXEEXT.
6884
6885         2006-07-11  Bruno Haible  <bruno@clisp.org>
6886
6887                 * javacomp.c: Fix a comment.
6888                 Reported by Jim Meyering.
6889
6890         2006-04-30  Bruno Haible  <bruno@clisp.org>
6891
6892                 * javacomp.h (compile_java_class): Add source_version,
6893                 target_version arguments.
6894                 * javacomp.c: Rewritten to choose only a compiler that
6895                 respects the specified source_version and target_version.
6896
6897         2006-06-27  Bruno Haible  <bruno@clisp.org>
6898
6899                 Assume correct S_ISDIR macro.
6900                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6901
6902         2006-07-22  Bruno Haible  <bruno@clisp.org>
6903
6904                 * javaversion.h: New file, from GNU gettext.
6905                 * javaversion.c: New file, from GNU gettext.
6906                 * javaversion.java: New file, from GNU gettext.
6907                 * javaversion.class: New file, from GNU gettext.
6908
6909         2006-05-17  Bruno Haible  <bruno@clisp.org>
6910
6911                 Cygwin portability.
6912                 * javaexec.c (execute_java_class): Test for jview program
6913                 also on Cygwin.
6914
6915         2006-04-09  Bruno Haible  <bruno@clisp.org>
6916
6917                 * fatal-signal.c: Don't include string.h.
6918                 (at_fatal_signal): Use a copying loop instead of memcpy.
6919
6920         2005-12-04  Bruno Haible  <bruno@clisp.org>
6921
6922                 * csharpexec.c: Add support for 'clix' launcher (untested).
6923                 (execute_csharp_using_sscli): New function.
6924                 (execute_csharp_program): Call it.
6925
6926         2006-06-21  Bruno Haible  <bruno@clisp.org>
6927
6928                 Avoid warnings from recent versions of mcs.
6929                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6930                 -o, -L, -r any more. Use options documented since mcs-1.0
6931                 instead. Similarly for -g.
6932
6933         2005-07-09  Bruno Haible  <bruno@clisp.org>
6934
6935                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6936                 add a .dll suffix.
6937                 Reported by Mark Junker <mjscod@gmx.de>.
6938
6939         2006-06-17  Bruno Haible  <bruno@clisp.org>
6940
6941                 * config.charset: Update for NetBSD 3.0.
6942
6943         2006-05-17  Bruno Haible  <bruno@clisp.org>
6944
6945                 Cygwin portability.
6946                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6947
6948         2006-05-16  Bruno Haible  <bruno@clisp.org>
6949
6950                 * localcharset.c [CYGWIN]: Include <windows.h>.
6951                 (get_charset_aliases): For Cygwin, return the same CPxxx
6952                 aliases list as under WIN32.
6953                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
6954                 the environment variables. Fall back to GetACP().
6955
6956         2006-04-05  Bruno Haible  <bruno@clisp.org>
6957
6958                 * config.charset: Update Juan Manuel Guerrero's address.
6959
6960         2005-02-12  Bruno Haible  <bruno@clisp.org>
6961
6962                 * allocsa.h: Add extern "C" for C++.
6963
6964         2005-02-10  Bruno Haible  <bruno@clisp.org>
6965
6966                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
6967                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
6968
6969         2006-07-22  Bruno Haible  <bruno@clisp.org>
6970
6971                 * gettext.h: Update to GNU gettext-0.15.
6972
6973 2006-07-22  Bruno Haible  <bruno@clisp.org>
6974
6975         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
6976         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
6977         lib-prefix.m4, longdouble.m4, ssize_t.m4.
6978
6979 2006-07-21  Eric Blake  <ebb9@byu.net>
6980
6981         * modules/stdlib-safer: New file.
6982         * MODULES.html.sh (File stream based Input/Output): Add
6983         stdlib-safer.
6984
6985 2006-07-21  Eric Blake  <ebb9@byu.net>
6986
6987         * lib/stdlib-safer.h: New file from coreutils, required by
6988         stdlib--.h.
6989
6990 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
6991
6992         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
6993
6994 2006-07-20  Bruno Haible  <bruno@clisp.org>
6995
6996         * gnulib-tool: Recognize new option --assume-autoconf.
6997         (autoconf_minversion): New variable.
6998         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
6999
7000 2006-07-20  Bruno Haible  <bruno@clisp.org>
7001
7002         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7003
7004 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7005
7006         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7007         Reindent and repaginate.
7008
7009 2006-07-19  Derek Price  <derek@ximbiot.com>
7010
7011         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7012         Correct grammar.
7013
7014 2006-07-17  Bruno Haible  <bruno@clisp.org>
7015
7016         * modules/list: New file.
7017         * modules/array-list: New file.
7018         * modules/carray-list, modules/carray-list-tests: New files.
7019         * modules/linked-list, modules/linked-list-tests: New files.
7020         * modules/avltree-list, modules/avltree-list-tests: New files.
7021         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7022         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7023         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7024         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7025         * modules/oset: New file.
7026         * modules/array-oset: New file.
7027         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7028         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7029         * tests/test-carray_list.c: New file.
7030         * tests/test-linked_list.c: New file.
7031         * tests/test-avltree_list.c: New file.
7032         * tests/test-rbtree_list.c: New file.
7033         * tests/test-linkedhash_list.c: New file.
7034         * tests/test-avltreehash_list.c: New file.
7035         * tests/test-rbtreehash_list.c: New file.
7036         * tests/test-avltree_oset.c: New file.
7037         * tests/test-rbtree_oset.c: New file.
7038         * MODULES.html.sh (Container data structures): New section.
7039
7040 2006-07-17  Bruno Haible  <bruno@clisp.org>
7041
7042         * m4/gl_list.m4: New file.
7043
7044 2006-07-17  Bruno Haible  <bruno@clisp.org>
7045
7046         * lib/gl_list.h: New file.
7047         * lib/gl_list.c: New file.
7048         * lib/gl_array_list.h: New file.
7049         * lib/gl_array_list.c: New file.
7050         * lib/gl_carray_list.h: New file.
7051         * lib/gl_carray_list.c: New file.
7052         * lib/gl_linked_list.h: New file.
7053         * lib/gl_linked_list.c: New file.
7054         * lib/gl_anylinked_list1.h: New file.
7055         * lib/gl_anylinked_list2.h: New file.
7056         * lib/gl_avltree_list.h: New file.
7057         * lib/gl_avltree_list.c: New file.
7058         * lib/gl_anyavltree_list1.h: New file.
7059         * lib/gl_anyavltree_list2.h: New file.
7060         * lib/gl_rbtree_list.h: New file.
7061         * lib/gl_rbtree_list.c: New file.
7062         * lib/gl_anyrbtree_list1.h: New file.
7063         * lib/gl_anyrbtree_list2.h: New file.
7064         * lib/gl_anytree_list1.h: New file.
7065         * lib/gl_anytree_list2.h: New file.
7066         * lib/gl_linkedhash_list.h: New file.
7067         * lib/gl_linkedhash_list.c: New file.
7068         * lib/gl_anyhash_list1.h: New file.
7069         * lib/gl_anyhash_list2.h: New file.
7070         * lib/gl_avltreehash_list.h: New file.
7071         * lib/gl_avltreehash_list.c: New file.
7072         * lib/gl_rbtreehash_list.h: New file.
7073         * lib/gl_rbtreehash_list.c: New file.
7074         * lib/gl_anytreehash_list1.h: New file.
7075         * lib/gl_anytreehash_list2.h: New file.
7076
7077         * lib/gl_oset.h: New file.
7078         * lib/gl_oset.c: New file.
7079         * lib/gl_array_oset.h: New file.
7080         * lib/gl_array_oset.c: New file.
7081         * lib/gl_avltree_oset.h: New file.
7082         * lib/gl_avltree_oset.c: New file.
7083         * lib/gl_rbtree_oset.h: New file.
7084         * lib/gl_rbtree_oset.c: New file.
7085         * lib/gl_anytree_oset.h: New file.
7086
7087 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7088
7089         * m4/mkancesdirs.m4: New file.
7090         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7091         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7092         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7093         it.
7094
7095 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7096
7097         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7098         * lib/mkancesdirs.h: New files.
7099         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7100         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7101         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7102         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7103         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7104         callers changed.  Revamp internals significantly, by not
7105         attempting to create directories that are temporarily more
7106         permissive than the final results.  Do not attempt to use
7107         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7108         This removes some race conditions, fixes some bugs, and simplifies
7109         things.  Use new dirchownmod function to do owner and mode changes.
7110         * lib/mkdir-p.h: Likewise.
7111         * lib/modechange.c (octal_to_mode): New function.
7112         (struct mode_change): New member mentioned.
7113         (make_node_op_equals): New arg mentioned.  All callers changed.
7114         (mode_compile): Keep track of which mode bits the user has explicitly
7115         mentioned.
7116         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7117         New arg PMODE_BITS, to keep track of which mode bits the user
7118         mentioned; it treats S_ISUID and S_ISGID speciall.
7119         All callers changed.
7120         * lib/modechange.h: Likewise.
7121
7122 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7123
7124         * MODULES.html.sh: Add mkancestors.
7125         * modules/mkancesdirs: New module.
7126         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7127         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7128         The chdir-safer and afs files are now orphans; I'll remove them
7129         unless someone speaks up.
7130         Add lib/dirchownmod.c, lib/dirchownmod.h.
7131         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7132         Add lchown, mkancesdirs.
7133         (Maintainer): Add self.
7134
7135 2006-07-15  Karl Berry  <karl@gnu.org>
7136
7137         * gnulib-tool: help message wording/arrangement.
7138
7139 2006-07-14  Simon Josefsson  <jas@extundo.com>
7140
7141         * doc/gnulib.texi (Libtool and Windows): New section.
7142
7143 2006-07-12  Simon Josefsson  <jas@extundo.com>
7144
7145         * modules/gendocs (License): Fix license, approved by Karl.
7146
7147 2006-07-12  Eric Blake  <ebb9@byu.net>
7148
7149         * MODULES.html.sh: Add gendocs.
7150
7151 2006-07-11  Eric Blake  <ebb9@byu.net>
7152
7153         * modules/fdl: New module, to install doc/fdl.texi.
7154         * MODULES.html.sh: Add new section for documentation modules.
7155         * gnulib-tool: Avoid space-tab.
7156         (--doc-base): New option, to manage files from doc.
7157
7158 2006-07-11  Eric Blake  <ebb9@byu.net>
7159
7160         * m4/absolute-header.m4: Fix comments to match recent change.
7161
7162 2006-07-11  Eric Blake  <ebb9@byu.net>
7163
7164         * gnulib-tool: List --doc-base before --tests-base.
7165
7166 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7167
7168         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7169
7170 2006-07-11  Bruno Haible  <bruno@clisp.org>
7171
7172         * README: Mention where to put documentation.
7173
7174 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7175
7176         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7177
7178 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7179
7180         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7181         to stdint.m4.
7182
7183 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7184
7185         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7186         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7187         "no/such/file/stdint.h" when there is no such file, so that
7188         the resulting C code can be parsed by dodgy compilers.
7189         Problems reported by Bob Proulx.
7190
7191 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7192
7193         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7194         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7195         macros into the GNU _D_EXACT_NAMLEN.
7196         * lib/savedir.c:  Likewise.
7197         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7198
7199 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7200         and Paul Eggert  <eggert@cs.ucla.edu>
7201
7202         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7203         * m4/savedir.m4:
7204         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7205         macros into the GNU _D_EXACT_NAMLEN.
7206
7207 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7208
7209         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7210         around the absolute name, to work around a problem with the HP-UX
7211         11.23 native C compiler, reported by Bob Proulx.
7212
7213 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7214
7215         * doc/maintain.texi, make-stds.texi: Sync from
7216         <http://savannah.gnu.org/projects/gnustandards>.
7217
7218 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7219
7220         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7221
7222 2006-07-09  Jim Meyering  <jim@meyering.net>
7223
7224         * m4/glob.m4: Remove a doubled word in a comment.
7225
7226 2006-07-09  Jim Meyering  <jim@meyering.net>
7227
7228         * lib/argp-pv.c: Remove a doubled word in a comment.
7229         * lib/check-version.c (check_version): Likewise.
7230         * lib/javacomp.c (compile_java_class): Likewise.
7231
7232 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7233
7234         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7235         for the benefit of people using Autoconf 2.60.  If you want to
7236         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7237         (or m4/onceonly.m4, if pre-2.57) manually.
7238
7239 2006-07-08  Jim Meyering  <jim@meyering.net>
7240
7241         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7242         comment.
7243         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7244         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7245         comment.
7246
7247 2006-07-08  Jim Meyering  <jim@meyering.net>
7248
7249         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7250
7251 2006-07-07  Simon Josefsson  <jas@extundo.com>
7252
7253         * tests/test-crc.c: Change expected crc value, the test vector
7254         were probably computed using the old broken crc.c?
7255
7256 2006-07-06  Simon Josefsson  <jas@extundo.com>
7257
7258         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7259         now the canonical place for the M4 file).
7260
7261         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7262         from the sys_socket dependency now.
7263
7264         * modules/inet_pton (Files): Ditto.
7265
7266         * modules/inet_ntop (Files): Ditto.
7267
7268 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7269
7270         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7271         not gl_PREREQ_GETUSERSHELL.
7272
7273 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7274
7275         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7276         with only one argument, for Autoconf 2.60.
7277         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7278         expand to nothing, so add a shell command to avoid syntax error.
7279         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7280
7281 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7282
7283         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7284
7285 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7286
7287         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7288         no longer needed.  Check for isblank decl.
7289         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7290         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7291         of existence.
7292
7293 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7294
7295         * lib/getloadavg.c: Use __VMS, not VMS.
7296         * lib/getopt.c: Likewise.
7297         * lib/getpagesize.h: Likewise.
7298         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7299         and probably does not work.
7300
7301 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7302
7303         * lib/.cppi-disable: Add wcwidth.
7304         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7305         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7306         (ISGRAPH): Remove.  All uses changed to isgraph.
7307         (FOLD) [!defined _LIBC]: Remove special case.
7308         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7309         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7310         HAVE_ISBLANK.
7311         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7312         case.
7313
7314 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7315
7316         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7317         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7318         brackets.  Other minor changes to suppress some compiler
7319         warnings.
7320
7321 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7322         and Paul Eggert  <eggert@cs.ucla.edu>
7323
7324         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7325         of invoking obsolescent AC_HEADER_DIRENT macro.
7326         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7327         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7328         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7329         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7330         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7331         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7332         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7333         * m4/readdir.m4: Remove; no longer needed.
7334
7335 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7336         and Paul Eggert  <eggert@cs.ucla.edu>
7337
7338         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7339         Don't worry about this obsolete case any more.
7340         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7341         directories.
7342         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7343         worry about this obsolete case any more.
7344         * lib/fts.c: Likewise.
7345         * lib/getcwd.c: Likewise.
7346         * lib/glob.h: Likewise.
7347         * lib/savedir.c: Likewise.
7348
7349 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7350
7351         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7352         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7353         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7354         needed.
7355         All uses removed.
7356         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7357         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7358         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7359         needed.
7360         * m4/getdate.m4 (gl_GETDATE): Likewise.
7361         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7362         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7363         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7364         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7365         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7366         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7367         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7368         needed.
7369
7370 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7371
7372         * lib/memcasecmp.c: Include <limits.h>.
7373         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7374         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7375         Don't assume isdigit succeeds only on '0' through '9'.
7376
7377 2006-07-05  Eric Blake  <ebb9@byu.net>
7378
7379         * modules/getaddrinfo (Depends-on): Add snprintf.
7380
7381 2006-07-05  Eric Blake  <ebb9@byu.net>
7382
7383         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7384         to avoid 'header present but could not be compiled' on cygwin.
7385
7386 2006-07-05  Eric Blake  <ebb9@byu.net>
7387
7388         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7389         missing from netdb.h.
7390         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7391
7392 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7393
7394         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7395         no longer needed.
7396         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7397         * m4/getdate.m4 (gl_GETDATE): Likewise.
7398         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7399         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7400         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7401         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7402         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7403
7404 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7405
7406         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7407         All uses of is_space replaced by isspace.
7408         * lib/exit.h: Don't talk about STDC_HEADERS.
7409         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7410         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7411         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7412         replaced by isprint etc.
7413         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7414         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7415         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7416         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7417         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7418         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7419
7420 2006-07-05  Bruno Haible  <bruno@clisp.org>
7421
7422         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7423         the function exists, before testing against AIX.
7424         Reported by Martin Lambers <marlam@marlam.de>.
7425
7426 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7427
7428         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7429         From Mark D. Baushke.
7430
7431 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7432
7433         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7434         to the absolute name, not just one, to bypass Sun C 5.8's
7435         "warning: #include of /usr/include/... may be non-portable".
7436
7437 2006-07-04  Eric Blake  <ebb9@byu.net>
7438
7439         * modules/dirname-tests: New test module.
7440         * tests/test-dirname.c: New file, replacing dirname.c
7441         TEST_DIRNAME section that was recently deleted.
7442
7443 2006-07-04  Bruno Haible  <bruno@clisp.org>
7444
7445         Assume ANSI C header files and <ctype.h> functions.
7446         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7447         (mbsnwidth): Use isprint, iscntrl instead.
7448
7449 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7450
7451         Merge from coreutils.
7452         * MODULES.html.sh: Add xstrtold.
7453         * modules/xstrtold: New file.
7454         * modules/cycle-check (Files): Add lib/same-inode.h.
7455         * modules/dirname (Files): Add m4/double-slash-root.m4.
7456         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7457         * modules/mkdir-p (Files): Add lib/same-inode.h.
7458         * modules/same (Files): Add lib/same-inode.h.
7459
7460 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7461
7462         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7463         This is to keep the terminology clean; POSIX talks about
7464         "absolute pathnames", not "full pathnames", but the GNU
7465         Coding Standards say to use "path" for something else;
7466         so use "absolute" to keep both sides happy.
7467         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7468         Set gl_absolute_header, not gl_full_header_path.
7469         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7470         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7471         All uses changed.
7472
7473         Merge from coreutils.
7474
7475         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7476
7477         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7478         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7479         want to require the building of c-strtod.o.
7480         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7481         needs -lm directly.
7482         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7483
7484         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7485
7486         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7487         --as-needed option if available.  Problem reported by Albert Chin in
7488         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7489         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7490         cc merely issues a bunch of annoying warnings for --as-needed
7491         (this problem was reported by Bob Proulx).  Also, try linking with
7492         -lm to detect a bug in binutils 2.16 (this problem was reported
7493         by Ralf Wildenhues).
7494
7495         2006-06-18  Jim Meyering  <jim@meyering.net>
7496
7497         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7498         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7499         macro.
7500         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7501         also check for glibc-2.4's abort-inducing bug.
7502
7503         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7504         Low-probability clean-up should be to use rmdir to get rid of
7505         the just-created directory, not unlink.
7506
7507         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7508         configure fail, and request a bug report to inform us about it.
7509         Add a comment that, barring reports to the contrary, in 2007 we'll
7510         assume ftruncate is universally available.
7511
7512         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7513
7514         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7515
7516         2006-03-12  Jim Meyering  <jim@meyering.net>
7517
7518         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7519         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7520         * m4/same.m4 (gl_SAME): Likewise.
7521         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7522
7523         2006-03-11  Eric Blake  <ebb9@byu.net>
7524
7525         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7526         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7527         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7528         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7529
7530 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7531
7532         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7533         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7534         reported by Mark D. Baushke, one in
7535         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7536
7537         Merge from coreutils.
7538
7539         * lib/.cppi-disable: Add stdint_.h.
7540         * lib/.cvsignore: Add stdint.h.
7541
7542         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7543
7544         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7545         both double and long double versions.
7546         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7547         * lib/xstrtold.c: New file.
7548         * lib/xstrtod.h (xstrtold): New decl.
7549
7550         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7551
7552         * lib/filemode.c (setst): Remove.
7553         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7554         (arguably) clearer, and the generated code is a bit smaller on my
7555         Debian GNU/Linux stable x86 host.
7556
7557         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7558
7559         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7560         Assume that filemode.h includes sys/types.h and sys/stat.h.
7561         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7562         (ftypelet): Reorder to put common cases first, for efficiency.
7563         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7564         to do 'M'.
7565         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7566         of 10, for compatibility with FreeBSD.  All callers changed.
7567         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7568         types that can't be deduced solely from st_mode.  First arg is now a
7569         const pointer.
7570         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7571         (strmode): Renamed from mode_string.
7572         (filemodestring): New decl.
7573         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7574         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7575         needed.
7576         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7577
7578         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7579
7580         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7581         fsusage.h now does that.  Include fsusage.h first, to test interface.
7582         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7583         at most one method (the old code could have generated decls that
7584         didn't conform to C89, not that this was ever exercised).
7585         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7586
7587         2006-03-19  Jim Meyering  <jim@meyering.net>
7588
7589         Work even in a chroot where d_ino values for entries in "/"
7590         don't match the stat.st_ino values for the same names.
7591         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7592         number, iterate through all entries again, using lstat instead.
7593         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7594         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7595
7596         * lib/getcwd.c (__getcwd): Clarify a comment.
7597         Use memcpy in place of a call to strcpy.
7598
7599         2006-03-12  Jim Meyering  <jim@meyering.net>
7600
7601         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7602         matches that of the current directory (which we're about to chdir ".."
7603         out of), then save the dev-ino of the parent, instead.
7604
7605         * lib/same-inode.h (SAME_INODE): New file/macro.
7606         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7607         Include "same-inode.h", instead.
7608         * lib/same.c: Likewise.
7609         * lib/cycle-check.h: Include "same-inode.h".
7610         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7611         * lib/cycle-check.c (SAME_INODE): Remove definition.
7612         * lib/root-dev-ino.h: Include "same-inode.h".
7613
7614         2006-03-11  Eric Blake  <ebb9@byu.net>
7615
7616         * lib/same.c (same_name): s/base_name/last_component/
7617         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7618         * lib/filenamecat.c (file_name_concat): Likewise.
7619
7620         2006-03-11  Eric Blake  <ebb9@byu.net>,
7621                     Paul Eggert  <eggert@cs.ucla.edu>
7622
7623         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7624         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7625         drive prefix.
7626         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7627         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7628         (last_component): New method.
7629         * lib/dirname.c (dir_len): Determine when drive letters need a
7630         subsequent slash.  Preserve // when it is special.
7631         (dir_name): Don't append dot when drive letter is absolute.
7632         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7633         * lib/basename.c (base_name): New semantics - malloc the result.
7634         Preserve // when it is special.  Preserve relative files that look
7635         like drive letters.
7636         (base_len): Preserve // when it is special.
7637         (last_component): New method, similar to old base_name semantics.
7638         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7639         base_name.  Strip redundant slashes from ///.
7640
7641 2006-07-03  Jim Meyering  <jim@meyering.net>
7642
7643         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7644         macro is used before the first cycle_check call.
7645
7646 2006-07-03  Eric Blake  <ebb9@byu.net>
7647
7648         * modules/dirname (Depends-on): Add xstrndup.
7649
7650 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7651
7652         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7653         test cases, so that config.log is a bit easier to follow.
7654
7655 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7656
7657         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7658         both are 64 bits, since this seems to be the tradition, and this
7659         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7660         we ever run into a host that prefers long long to long in this
7661         case, we'll need another configure-time test.  Problem reported by
7662         Jim Meyering.
7663
7664 2006-07-02  Eric Blake  <ebb9@byu.net>
7665
7666         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7667
7668 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7669
7670         * modules/inttypes (Depends-on): No longer depends on stdint.
7671         * modules/stdint (Description): Say more about assumptions.
7672         Say that the fast types might differ.  Say macros are used.
7673         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7674         (Makefile.am): Revise list of substituted symbols to match
7675         new stdint.m4.
7676         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7677         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7678         * tests/test-stdint.c (verify_same_types)
7679         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7680         the code conforms to C99/C89.
7681         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7682         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7683
7684 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7685
7686         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7687         but fix a bug, by requiring at least 64 bits.
7688         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7689         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7690         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7691         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7692
7693         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7694         changes.  Make 2.59 a prerequisite.  Check and substitute for
7695         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7696         inttypes.h.  Do not use special include files; just use the
7697         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7698         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7699         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7700         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7701         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7702         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7703         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7704         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7705         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7706         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7707         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7708         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7709         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7710         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7711         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7712         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7713         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7714         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7715         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7716         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7717         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7718         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7719         not check for things that C99 does not require, e.g., int8_t.  If
7720         a test isn't needed unless <stdint.h> isn't working, and is
7721         unlikely to be needed for any other reason, then don't do it
7722         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7723         size_t, since we assume C89 freestanding at least.  Do not check
7724         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7725         the right thing even if the types are not defined.  Instead use:
7726         (gl_STDINT_TYPE_PROPERTIES): New macro.
7727         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7728         testing whether <sys/types.h> clashes, as Autoconf does this for
7729         us now.  All uses removed.
7730         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7731         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7732         (gl_CHECK_TYPE_SAME):
7733         Remove; no longer needed.
7734         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7735         exists, since we'll return 0 anyway in that case.
7736         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7737
7738 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7739
7740         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7741         possible collision with system files.
7742         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7743         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7744         WCHAR_MIN and WCHAR_MAX in this case.
7745         (<stddef.h>): Do not include; no longer needed.
7746         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7747         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7748         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7749         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7750         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7751         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7752         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7753         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7754         !defined(__c99))]: Include in this case too, since it's harmless
7755         now.
7756         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7757         dangerous to do so.
7758         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7759         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7760         (_STDINT_MIN, _STDINT_MAX): New macros.
7761         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7762         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7763         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7764         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7765         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7766         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7767         macros, not typedefs; this simplifies things quite a bit.
7768         Use long int for all types narrower than int64_t.
7769         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7770         Define in terms of long long int or int64_t or long int,
7771         not int64_t or int32_t.  This saves some compile-time testing.
7772         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7773         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7774         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7775         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7776         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7777         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7778         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7779         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7780         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7781         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7782         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7783         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7784         undef any previous version and define our own version, for
7785         simplicity and consistency with the new macros for types.
7786         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7787         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7788         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7789         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7790         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7791         @WINT_T_SUFFIX@ to keep things simple here.
7792         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7793         Simplify by assuming typical 8/16/32/64 host, since we're
7794         already doing that elsewhere anyway.
7795         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7796         and assume long long int is 64 bits if available.  This
7797         speeds up 'configure'.
7798
7799 2006-07-01  Eric Blake  <ebb9@byu.net>
7800
7801         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7802         Reported by Andreas Buening.
7803
7804 2006-07-01  Eric Blake  <ebb9@byu.net>
7805
7806         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7807
7808 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7809
7810         * lib/getaddrinfo.c: fixed typo
7811
7812 2006-06-29  Jim Meyering  <jim@meyering.net>
7813
7814         * modules/strftime (Maintainer): Add my name, since with the
7815         FPRINTFTIME changes strftime.c has forked from glibc.
7816
7817 2006-06-29  Eric Blake  <ebb9@byu.net>
7818
7819         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7820
7821 2006-06-29  Eric Blake  <ebb9@byu.net>
7822
7823         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7824
7825 2006-06-29  Eric Blake  <ebb9@byu.net>
7826
7827         * lib/stat_.h: New file.
7828
7829 2006-06-29  Eric Blake  <ebb9@byu.net>
7830
7831         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7832         unused static function.
7833
7834 2006-06-29  Eric Blake  <ebb9@byu.net>
7835
7836         * doc/functions.texi (Function Portability): Document missing lstat
7837         on mingw.
7838
7839 2006-06-29  Eric Blake  <ebb9@byu.net>
7840
7841         * MODULES.html.sh: Add sys_stat.
7842         * modules/sys_stat: New module.
7843         * modules/mkstemp (Depends-on): Add sys_stat.
7844
7845 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7846
7847         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7848
7849 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7850
7851         * m4/c-bs-a.m4: Removed.
7852
7853 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7854
7855         * lib/strftime.c: Assume strftime() exists.
7856
7857 2006-06-29  Derek Price  <derek@ximbiot.com>
7858
7859         * modules/c-bs-a: Removed - \a is C89.
7860         * MODULES.html.sh: Remove c-bs-a.
7861
7862 2006-06-29  Bruno Haible  <bruno@clisp.org>
7863
7864         * modules/wcwidth (License): Change to LGPL.
7865
7866 2006-06-28  Simon Josefsson  <jas@extundo.com>
7867
7868         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7869         on _WIN32.
7870
7871         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7872         getnameinfo.
7873
7874 2006-06-28  Simon Josefsson  <jas@extundo.com>
7875
7876         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7877
7878 2006-06-28  Simon Josefsson  <jas@extundo.com>
7879
7880         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7881         functions there.  It will succeed on Windows XP, but on Windows
7882         2000 and (presumably) earlier, it will fail, and use the internal
7883         re-implementation.
7884         (use_win32_p): New function.
7885         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7886         Support AI_NUMERICSERV to disable getservbyname.
7887         (getnameinfo): New function, only supports
7888         NI_NUMERICHOST|NI_NUMERICSERV for now.
7889
7890         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7891         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7892         getnameinfo.
7893
7894 2006-06-28  Eric Blake  <ebb9@byu.net>
7895
7896         * modules/wcwidth: New file.
7897         * modules/mbchar (Depends-on): Add wcwidth.
7898         * modules/mbswidth (Depends-on): Add wcwidth.
7899         * MODULES.html.sh: Add wcwidth.
7900
7901 2006-06-28  Eric Blake  <ebb9@byu.net>
7902
7903         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7904         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7905
7906 2006-06-28  Eric Blake  <ebb9@byu.net>
7907
7908         * lib/xvasprintf.h: Fix comments.
7909
7910 2006-06-28  Eric Blake  <ebb9@byu.net>
7911
7912         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7913         * lib/mbswidth.c (wcwidth): Move from here...
7914         * lib/wcwidth.h: ...to this new file.
7915
7916 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7917
7918         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7919
7920         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7921         it's obsolete.
7922         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7923
7924 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7925
7926         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7927         Autoconf 2.60 says this stuff was obsolete.
7928
7929 2006-06-28  Bruno Haible  <bruno@clisp.org>
7930
7931         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7932
7933 2006-06-28  Bruno Haible  <bruno@clisp.org>
7934
7935         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7936         gt_TYPE_WCHAR_T.
7937
7938 2006-06-28  Bruno Haible  <bruno@clisp.org>
7939
7940         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7941         declaration for wcwidth.
7942         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7943
7944 2006-06-28  Bruno Haible  <bruno@clisp.org>
7945
7946         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7947         (mkdir): Define using _mkdir.
7948
7949 2006-06-28  Bruno Haible  <bruno@clisp.org>
7950
7951         * lib/getaddrinfo.h: Fix POSIX URL.
7952         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
7953         _WIN32.
7954         (use_win32_p): Make static.
7955         (getaddrinfo): Reject service name if it is empty or does not consist
7956         solely of decimal digits, or if its value is > 65535.
7957         (getnameinfo): Remove useless casts.
7958
7959 2006-06-27  Simon Josefsson  <jas@extundo.com>
7960
7961         * modules/sys_select: New file, suggested by Bruno Haible, Paul
7962         Eggert and Martin Lambers.
7963
7964 2006-06-27  Simon Josefsson  <jas@extundo.com>
7965
7966         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
7967         Eggert and Martin Lambers.
7968
7969 2006-06-27  Bruno Haible  <bruno@clisp.org>
7970
7971         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
7972         result to 0, not to empty.
7973         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
7974
7975 2006-06-27  Bruno Haible  <bruno@clisp.org>
7976
7977         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
7978
7979 2006-06-26  Simon Josefsson  <jas@extundo.com>
7980
7981         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
7982         present.
7983
7984 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
7985
7986         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
7987         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
7988         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
7989
7990 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
7991
7992         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
7993
7994 2006-06-26  Bruno Haible  <bruno@clisp.org>
7995
7996         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
7997
7998 2006-06-26  Bruno Haible  <bruno@clisp.org>
7999
8000         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8001
8002 2006-06-26  Bruno Haible  <bruno@clisp.org>
8003
8004         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8005         SGI C compiler in pre-C99 mode.
8006         Suggested by Mark D. Baushke and Larry Jones.
8007
8008 2006-06-26  Bruno Haible  <bruno@clisp.org>
8009
8010         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8011         WCHAR_MAX.
8012         Reported by Mark D. Baushke and Larry Jones.
8013
8014 2006-06-26  Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8017         in pre-C99 mode.
8018         Suggested by Mark D. Baushke and Larry Jones.
8019
8020 2006-06-23  Simon Josefsson  <jas@extundo.com>
8021             Bruno Haible  <bruno@clisp.org>
8022
8023         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8024         Emit mostlyclean-local rule.
8025         (func_emit_tests_Makefile_am): Likewise.
8026         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8027
8028 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8029
8030         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8031
8032 2006-06-23  Bruno Haible  <bruno@clisp.org>
8033
8034         * tests/test-stdint.c: Update to match ISO C 99 Technical
8035         Corrigendum 1.
8036
8037 2006-06-23  Bruno Haible  <bruno@clisp.org>
8038
8039         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8040
8041 2006-06-23  Bruno Haible  <bruno@clisp.org>
8042
8043         * lib/stdint_.h: Treat IRIX like OpenBSD.
8044
8045 2006-06-23  Bruno Haible  <bruno@clisp.org>
8046
8047         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8048         ISO C 99 Technical Corrigendum 1.
8049
8050 2006-06-22  Simon Josefsson  <jas@extundo.com>
8051
8052         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8053         MinGW.
8054
8055 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8056
8057         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8058         needed.  Some compiler complained about some of them.  Problem reported
8059         by Larry Jones in
8060         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8061
8062 2006-06-21  Simon Josefsson  <jas@extundo.com>
8063
8064         * tests/test-getaddrinfo.c: New file.
8065
8066         * modules/getaddrinfo-tests: New file.
8067
8068         * MODULES.html.sh: Add inet_pton.
8069
8070         * modules/inet_pton: New file.
8071
8072 2006-06-21  Simon Josefsson  <jas@extundo.com>
8073
8074         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8075         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8076         of using the (limited) gnulib implementation on Windows XP.
8077
8078         * m4/inet_pton.m4: New file.
8079
8080 2006-06-21  Simon Josefsson  <jas@extundo.com>
8081
8082         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8083         variable.
8084
8085         * lib/socket_.h: Don't define WINVER.
8086
8087         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8088         slightly modified to work in gnulib.
8089
8090 2006-06-21  Simon Josefsson  <jas@extundo.com>
8091
8092         * doc/gnulib.texi (Windows sockets): Add.
8093
8094 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8095
8096         * lib/read-file.c (fread_file): Start with buffer allocation of
8097         0 bytes rather than 1 byte; this simplifies the code.
8098         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8099         code to free buffer and save/restore errno.
8100         (internal_read_file): Remove unused local.
8101
8102 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8103
8104         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8105         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8106         Problem reported by Denis Excoffier in
8107         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8108
8109 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8110
8111         * modules/sys_socket, modules/socklen: Include sys/types since
8112         FreeBSD 4.x's sys/socket.h needs it.
8113
8114 2006-06-19  Simon Josefsson  <jas@extundo.com>
8115
8116         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8117
8118 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8119
8120         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8121
8122 2006-06-19  Bruno Haible  <bruno@clisp.org>
8123
8124         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8125         and FULL_PATH_INTTYPES_H in angle brackets.
8126         Reported by Mark D. Baushke <mdb@gnu.org>.
8127
8128 2006-06-17  Eric Blake  <ebb9@byu.net>
8129
8130         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8131         errno.
8132
8133 2006-06-17  Bruno Haible  <bruno@clisp.org>
8134
8135         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8136         <sys/inttypes.h>.
8137
8138 2006-06-17  Bruno Haible  <bruno@clisp.org>
8139
8140         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8141         whether errno is declared. Assume <errno.h> declares errno.
8142
8143 2006-06-17  Bruno Haible  <bruno@clisp.org>
8144
8145         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8146
8147 2006-06-17  Bruno Haible  <bruno@clisp.org>
8148
8149         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8150         problem on Solaris 2.5.1.
8151
8152 2006-06-16  Eric Blake  <ebb9@byu.net>
8153
8154         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8155         * lib/unicodeio.c [!defined errno]: Likewise.
8156         * lib/strtol.c [!defined errno]: Likewise.
8157         * lib/strtod.c [!defined errno]: Likewise.
8158
8159 2006-06-15  Eric Blake  <ebb9@byu.net>
8160
8161         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8162
8163 2006-06-15  Eric Blake  <ebb9@byu.net>
8164
8165         * config/srclist.txt (ssize_t.m4): Lose sync.
8166
8167 2006-06-15  Bruno Haible  <bruno@clisp.org>
8168
8169         * modules/stdint (Files): Include m4/full-header-path.m4,
8170         m4/size_max.m4, m4/wchar_t.m4.
8171         (Makefile.am): Many more substitutions.
8172         * modules/stdint-tests: New file.
8173         * tests/test-stdint.c: New file.
8174
8175 2006-06-15  Bruno Haible  <bruno@clisp.org>
8176
8177         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8178         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8179         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8180         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8181         gl_CHECK_TYPE_SAME): New macros.
8182
8183 2006-06-15  Bruno Haible  <bruno@clisp.org>
8184
8185         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8186
8187 2006-06-15  Bruno Haible  <bruno@clisp.org>
8188
8189         * lib/stdint_.h: Rewritten to be fully auto-configured.
8190         Fixes bug on HP-UX/IA64.
8191
8192 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8193
8194         * lib/getdate.y (__attribute__): Don't define if already defined.
8195         Problem reported by Larry Jones.
8196         * lib/utimens.c (__attribute__): Likewise.
8197
8198 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8199
8200         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8201         reported by Andreas Schwab.
8202
8203 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8204             Bruno Haible  <bruno@clisp.org>
8205
8206         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8207         check for the declaration of strnlen and a run test that exposes the
8208         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8209         rpl_strndup.
8210
8211 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8212             Bruno Haible  <bruno@clisp.org>
8213
8214         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8215
8216 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8217
8218         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8219         compile test, for Tru64 4.0D.
8220
8221 2006-05-28  Karl Berry  <karl@gnu.org>
8222
8223         * config/srclist.txt (printf-args.c): lose sync.
8224
8225 2006-05-26  Martin Lambers  <marlam@marlam.de>
8226
8227         * lib/getpass.c: Updates the test for the native W32 API, and adds
8228         missing includes, thus fixing compilation warnings.
8229
8230 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8231
8232         * lib/exclude.c (exclude_fnmatch): New function.
8233         (excluded_file_name): Call exclude_fnmatch.
8234         * lib/exclude.h (excluded_file_name): New prototype
8235
8236 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8237
8238         * lib/tempname.c (small_open, large_open): New macros.
8239         (__open, __open64) [!_LIBC]: Remove.
8240         (__gen_tempname): Use small_open and large_open instead of __open
8241         and __open64.  This fixes a portability bug on HP-UX 11.11i
8242         reported by Simon Wing-Tang in
8243         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8244
8245 2006-05-24  Bruno Haible  <bruno@clisp.org>
8246
8247         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8248         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8249         Reported by Thorsten Maerz <torte@netztorte.de> via
8250         Aaron Stone <aaron@serendipity.cx>.
8251
8252 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8253
8254         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8255         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8256         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8257         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8258         not really conditional on the cache.
8259         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8260
8261 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8262
8263         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8264         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8265         (my_usleep): Don't mishandle maximum value.
8266
8267 2006-05-19  Jim Meyering  <jim@meyering.net>
8268
8269         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8270
8271 2006-05-17  Bruno Haible  <bruno@clisp.org>
8272
8273         Cygwin portability.
8274         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8275
8276 2006-05-17  Bruno Haible  <bruno@clisp.org>
8277
8278         * lib/stdint_.h: Fix recognition of Cygwin.
8279
8280 2006-05-15  Bruno Haible  <bruno@clisp.org>
8281
8282         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8283         on libtool patch by Ralf Wildenhues.
8284
8285 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8286
8287         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8288         test for C99 conformance; (bool) 0.5 is an integer constant
8289         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8290         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8291
8292 2006-05-11  Simon Josefsson  <jas@extundo.com>
8293
8294         * m4/xvasprintf.m4: Fix obvious typo.
8295
8296 2006-05-11  Jim Meyering  <jim@meyering.net>
8297
8298         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8299         James Lemley.
8300
8301 2006-05-10  Simon Josefsson  <jas@extundo.com>
8302
8303         * lib/md4.c: Typo fix, update copyright years.
8304         (K1, K2): Don't use L because it turn computations into 64-bit on
8305         64-bit platforms.
8306
8307 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8308
8309         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8310         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8311         unwanted sign propagation, e.g., on hosts with 64-bit int.
8312         There still are some problems with reeelly weird theoretical hosts
8313         (e.g., 33-bit int) but it's not worth worrying about now.
8314         * lib/sha1.c (rol): Likewise.
8315         (K1, K2, K3, K4): Remove unnecessary L suffix.
8316
8317 2006-05-10  Bruno Haible  <bruno@clisp.org>
8318
8319         * lib/des.c: Cast to avoid warnings.
8320
8321 2006-05-09  Bruno Haible  <bruno@clisp.org>
8322
8323         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8324         (Depends-on): Depend also on xsize, stdarg.
8325         (configure.ac): Add gl_XVASPRINTF.
8326
8327 2006-05-09  Bruno Haible  <bruno@clisp.org>
8328
8329         * m4/xvasprintf.m4: New file.
8330
8331 2006-05-09  Bruno Haible  <bruno@clisp.org>
8332
8333         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8334         (EOVERFLOW): Define fallback value.
8335         (xstrcat): New function.
8336         (xvasprintf): Recognize the special case of a string concatenation.
8337
8338 2006-05-08  Eric Blake  <ebb9@byu.net>
8339
8340         * gnulib-tool (func_version): Base copyright year on CVS date.
8341         (func_emit_copyright_notice): New function.
8342         (func_emit_lib_Makefile_am): Use it.
8343         (func_emit_tests_Makefile_am): Likewise.
8344         (func_import): Likewise.
8345
8346 2006-05-08  Bruno Haible  <bruno@clisp.org>
8347
8348         * modules/stdarg: New file.
8349         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8350
8351 2006-05-08  Bruno Haible  <bruno@clisp.org>
8352
8353         * m4/stdarg.m4: New file, from GNU gettext.
8354
8355 2006-05-08  Bruno Haible  <bruno@clisp.org>
8356
8357         * config/srclist.txt (build-aux/config.rpath): different from latest
8358         release.
8359
8360 2006-05-08  Bruno Haible  <bruno@clisp.org>
8361
8362         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8363
8364 2006-05-05  Jim Meyering  <jim@meyering.net>
8365
8366         * m4/warning.m4: New file, derived from bison's file by the same name.
8367
8368 2006-05-03  Bruno Haible  <bruno@clisp.org>
8369
8370         * lib/stdint_.h: Shorter URL.
8371         * lib/inttypes.h: Likewise.
8372
8373 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8374
8375         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8376
8377 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8378
8379         * lib/verify.h: Document the internals better.  Most of this change
8380         was written by Bruno Haible.
8381
8382 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8383
8384         * doc/verify.texi: New file, partly based on a proposal by
8385         Bruno Haible.
8386
8387 2006-05-02  Bruno Haible  <bruno@clisp.org>
8388
8389         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8390         test from here...
8391         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8392
8393 2006-04-29  Bruno Haible  <bruno@clisp.org>
8394
8395         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8396         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8397
8398 2006-04-29  Bruno Haible  <bruno@clisp.org>
8399
8400         * gnulib-tool: Make --update option actually work.
8401
8402 2006-04-29  Bruno Haible  <bruno@clisp.org>
8403
8404         * doc/gcd.texi: New file.
8405         * doc/gnulib.texi: Include it.
8406
8407 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8408
8409         * lib/getdate.y (get_date): When adding relative date, start with the
8410         initial time, not with the result of the first mktime call.
8411
8412 2006-04-25  Bruno Haible  <bruno@clisp.org>
8413
8414         * gnulib-tool (func_import): Output the include directives in three
8415         blocks, sorted separately.
8416         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8417
8418 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8419
8420         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8421         to define main with arguments, for C++.  Reported by Eric Blake.
8422         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8423         Prefer 'int main ()' to 'int main (void)', for C++.
8424         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8425         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8426         for 'main', for C99 and C++.
8427
8428 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8429
8430         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8431         Don't assume that exit status -1 is valid.
8432         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8433         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8434         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8435         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8436         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8437         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8438         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8439         functions can be used without declaring them, or that you can
8440         exit with status -1.
8441         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8442
8443 2006-04-24  Karl Berry  <karl@gnu.org>
8444
8445         * config/srclist.txt (longdouble.m4): sync lost.
8446
8447 2006-04-24  Eric Blake  <ebb9@byu.net>
8448
8449         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8450
8451 2006-04-24  Bruno Haible  <bruno@clisp.org>
8452
8453         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8454         poll() implementation in AIX.
8455         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8456
8457 2006-04-24  Bruno Haible  <bruno@clisp.org>
8458
8459         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8460         assigned exactly once.
8461
8462 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8463             Bruno Haible  <bruno@clisp.org>
8464
8465         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8466         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8467         for AM_CPPFLAGS.
8468
8469 2006-04-23  Bruno Haible  <bruno@clisp.org>
8470
8471         * modules/copy-file: Depend on unistd.
8472         * modules/execute: Likewise.
8473         * modules/fatal-signal: Likewise.
8474         * modules/findprog: Likewise.
8475         * modules/mkdtemp : Likewise.
8476         * modules/pipe: Likewise.
8477         * modules/wait-process: Likewise.
8478
8479 2006-04-23  Bruno Haible  <bruno@clisp.org>
8480
8481         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8482         condition was already detected.
8483         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8484
8485 2006-04-23  Bruno Haible  <bruno@clisp.org>
8486
8487         * lib/copy-file.c: Include <unistd.h> unconditionally.
8488         * lib/execute.c: Likewise.
8489         * lib/fatal-signal.c: Likewise.
8490         * lib/findprog.c: Likewise.
8491         * lib/mkdtemp.c: Likewise.
8492         * lib/pipe.h: Likewise.
8493         * lib/pipe.c: Likewise.
8494         * lib/wait-process.h: Likewise.
8495
8496 2006-04-23  Bruno Haible  <bruno@clisp.org>
8497
8498         * gnulib-tool (func_usage): Fix --import description. Document
8499         --update.
8500         (func_import): Create temporary file in a temporary directory, if
8501         --dry-run is specified. Silence errors from 'grep' when there are no
8502         m4 files in $m4dir.
8503         (func_create_testdir): Silence errors from 'grep' when there are no
8504         m4 files in $m4dir.
8505         Reported by Karl Berry <karl@freefriends.org>.
8506
8507 2006-04-20  Bruno Haible  <bruno@clisp.org>
8508
8509         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8510         one argument, so that the code will be portable to Autoconf 2.60.
8511         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8512         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8513         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8514
8515 2006-04-19  Derek Price  <derek@ximbiot.com>
8516             Eric Blake  <ebb9@byu.net>
8517
8518         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8519         rather than "/full/path.h".  Update comment to match.  Shorten &
8520         generalize m4_translit call via AS_TR_CPP.
8521
8522 2006-04-19  Derek Price  <derek@ximbiot.com>
8523             Eric Blake  <ebb9@byu.net>
8524
8525         * lib/inttypes.h: Correct grammar in comment.
8526
8527 2006-04-18  Derek Price  <derek@ximbiot.com>
8528             Paul Eggert  <eggert@cs.ucla.edu>
8529
8530         * modules/inttypes: New file.
8531         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8532
8533 2006-04-18  Derek Price  <derek@ximbiot.com>
8534             Paul Eggert  <eggert@cs.ucla.edu>
8535
8536         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8537         New files.
8538
8539 2006-04-18  Derek Price  <derek@ximbiot.com>
8540             Paul Eggert  <eggert@cs.ucla.edu>
8541
8542         * lib/inttypes.h: New file.
8543         * lib/strtoimax.c: Assume <inttypes.h>.
8544
8545 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8546
8547         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8548         isn't mounted.  Problem reported by Kir Kolyshkin.
8549
8550 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8551
8552         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8553         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8554         Derek R. Price.
8555         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8556         implementation.
8557
8558 2006-04-12  Eric Blake  <ebb9@byu.net>
8559
8560         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8561         is now done automatically by the corresponding Autoconf macro.
8562
8563 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8564
8565         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8566         time_r.h.
8567
8568 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8569
8570         Merge regex changes from libc, removing some of our
8571         POSIX-conformance changes that were rejected and redoing them in a
8572         less-intrusive way.
8573
8574         * lib/regcomp.c (re_compile_internal, init_dfa):
8575         Length arg is now size_t, not Idx.  All uses changed.
8576         (peek_token): Forward decl now says internal_function.
8577         (__re_error_msgid, __re_error_msgid_idx):
8578         Now static rather than extern with attribute_hidden.
8579         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8580         For some reason libc prefers K&R style defns for external functions.
8581         (regerror) [!defined _LIBC]: Likewise.
8582         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8583         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8584         (build_range_exp, build_collating_symbol):
8585         Use K&R-style defn.
8586         (re_compile_fastmap): Use '\0' to memset, not 0.
8587         (utf8_sb_map): Make the calculations more obvious.
8588         (init_dfa, parse_bracket_exp, build_charclass_op):
8589         Call calloc and cast result, as glibc does.
8590         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8591         (build_range_exp, build_collating_symbol):
8592         Now internal functions.
8593
8594         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8595
8596         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8597         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8598         Don't depend on VMS; depend on __VMS instead, for POSIX
8599         namespace cleanness.
8600         (regoff_t): Define to ssize_t, not long int.
8601
8602         Remove the REG_ macros named below.  Instead, make the old names
8603         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8604         __USE_GNU_REGEX.
8605         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8606         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8607         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8608         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8609         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8610         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8611         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8612         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8613         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8614         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8615         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8616         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8617         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8618         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8619         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8620         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8621         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8622         (REG_NREGS):
8623         Remove.  All uses replaced by the old RE_* names.
8624         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8625         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8626         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8627         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8628         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8629         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8630         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8631         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8632         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8633         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8634         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8635         Don't bother having these macros be independent of each others'
8636         values, since they no longer exist in the POSIX name space.
8637
8638         Rename the following member names back to their old names,
8639         unless !__USE_GNU_REGEX.  All uses changed back.
8640         (buffer): Renamed from re_buffer.
8641         (allocated): Renamed from re_allocated.
8642         (used): Renamed from re_used.
8643         (syntax): Renamed from re_syntax.
8644         (fastmap): Renamed from re_fastmap.
8645         (translate): Renamed from re_translate.
8646         (can_be_null): Renamed from re_can_be_null.
8647         (regs_allocated): Renamed from re_regs_allocated.
8648         (fastmap_accurate): Renamed from re_fastmap_accurate.
8649         (no_sub): Renamed from re_no_sub.
8650         (not_bol): Renamed from re_not_bol.
8651         (not_eol): Renamed from re_not_eol.
8652         (newline_anchor): Renamed from re_newline_anchor.
8653         (num_regs): Renamed from rm_num_regs.
8654         (start): Renamed from rm_start.
8655         (end): Renamed from rm_end.
8656
8657         (free_state): Move up a bit.
8658
8659         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8660         #define to be empty.
8661         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8662         when that is what is intended.
8663         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8664         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8665         (MAX): New macro.
8666         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8667         All uses changed back to re_malloc, etc.  It's now the caller's
8668         responsibility to check for overflow; all callers changed.
8669         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8670         (re_x2nrealloc): Remove.
8671         (free_state): Remove decl.
8672
8673         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8674         (re_set_registers, re_exec):
8675         Use K&R-style defn.
8676
8677         2006-01-31  Roland McGrath  <roland@redhat.com>
8678
8679         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8680         Reported by Mike Frysinger <vapier@gentoo.org>.
8681
8682         2006-01-15  Andreas Jaeger  <aj@suse.de>
8683
8684         [BZ #1950]
8685         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8686         build_wcs_upper_buffer change.
8687         (build_wcs_upper_buffer): Change return type.
8688
8689         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8690
8691         * lib/regex_internal.h: Include <stdint.h> if available.
8692
8693         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8694
8695         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8696
8697         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8698
8699         * lib/regcomp.c: Adjust for changed secondary hash function.
8700
8701         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8702
8703         * lib/regex.h: Pretty printing.
8704         Clean up namespace a bit.
8705
8706         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8707
8708         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8709         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8710
8711         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8712                     Ulrich Drepper  <drepper@redhat.com>
8713
8714         [BZ #1302]
8715         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8716         changed.
8717         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8718
8719         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8720
8721         [BZ #281]
8722         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8723         * lib/regcomp.c: Remove unnecessary uses of
8724         unsigned RE_TRANSLATE_TYPE.
8725         * lib/regex_internal.h: Likewise.
8726         * lib/regex_internal.c: Likewise.
8727         * lib/regexec.c: Likewise.
8728         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8729
8730         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8731
8732         * lib/regexec.c (find_recover_state): Remove unnecessary
8733         initialization.
8734         (transit_state_bkref): Make DFA a const pointer.
8735         (get_subexp): Likewise.
8736         (check_arrival): Likewise.
8737         (update_cur_sifted_state): Likewise.
8738         (re_search_internal): Likewise.
8739         (prune_impossible_nodes): Likewise.
8740         (acquire_init_state_context): Likewise.
8741         (proceed_next_node): Likewise.
8742         (set_regs): Likewise.
8743         (free_fail_stack_return): Likewise.
8744         (check_arrival_expand_ecl): Mark DFA parameter as const.
8745         (check_arrival_expand_ecl_sub): Likewise.
8746         (check_subexp_limits): Likewise.
8747         (sub_epsilon_src_nodes):  Likewise.
8748         (add_epsilon_src_nodes):  Likewise.
8749         (merge_state_array): Likewise.
8750         (update_regs): Likewise.
8751         (build_trtable): Likewise.
8752         (sift_states_backward): Mark MCTX parameter as const.
8753         (build_sifted_states): Likewise.
8754         (update_cur_sifted_state): Likewise.
8755         (sift_states_mkref): Likewise.
8756         (check_arrival_expand_ecl): Mark eclosure as const.
8757         (check_dst_limits_calc_pos_1): Likewise.
8758         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8759         pointer.
8760
8761         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8762
8763         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8764         (transit_state_sb): Likewise.
8765         (transit_state_mb): Likewise.
8766         (sift_states_iter_mb): Likewise.
8767         (check_arrival_add_next_nodes): Likewise.
8768         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8769         [_LIBC] (re_search_2_stub): Use mempcpy.
8770
8771         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8772         mbrtowc for very simple UTF-8 case.
8773
8774         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8775         a pointer-to-const.
8776         (re_acquire_state_context): Likewise.
8777         * lib/regex_internal.h: Adjust prototypes.
8778
8779         * lib/regex.c: Prevent using C++ compilers.
8780
8781         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8782         (re_acquire_state_context): Likewise.
8783
8784 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8785
8786         * modules/regex (Depends-on): Add ssize_t.
8787
8788 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8789
8790         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8791         translation table.
8792
8793 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8794
8795         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8796
8797 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8798             Bruno Haible  <bruno@clisp.org>
8799
8800         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8801         <sys/types.h> and <inttypes.h>.
8802
8803 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8804
8805         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8806         `__error_t_defined', so argp.h will not typedef the former.
8807
8808 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8809
8810         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8811         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8812         glibc names.  Even if glibc is changed to conform to POSIX, the
8813         traditional names will be available anyway, since regex depends on
8814         the extensions module.  Also, fix a longstanding typo in the
8815         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8816         reported by Emanuele Giaquinta.  Also, change sense of cached
8817         variable, so that the message makes sense.
8818
8819 2006-03-24  Simon Josefsson  <jas@extundo.com>
8820
8821         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8822         including some doc fixes.
8823         (base64_encode_alloc): Fix +1 bug on allocation failures.
8824
8825 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8826
8827         * lib/base64.c (base64_encode): Do not read past end of array with
8828         unsanitized input on systems with CHAR_BIT > 8.
8829
8830 2006-03-24  Eric Blake  <ebb9@byu.net>
8831
8832         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8833
8834 2006-03-22  Karl Berry  <karl@gnu.org>
8835
8836         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8837         * config/srclistvars.sh (COREUTILS): new var.
8838
8839 2006-03-17  Jim Meyering  <jim@meyering.net>
8840
8841         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8842         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8843
8844 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8845
8846         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8847         no longer needs it.  Instead, check that regoff_t is as least
8848         as wide as ptrdiff_t.
8849
8850         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8851         so that our regex.h stays compatible with the installed regex.
8852         This is helpful for installers who configure --without-included-regex.
8853         Problem reported by Emanuele Giaquinta.
8854
8855 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8856
8857         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8858         Typedef to long int, not to off_, as POSIX will likely change
8859         in that direction.
8860
8861 2006-03-15  Eric Blake  <ebb9@byu.net>
8862
8863         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8864
8865 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8866
8867         * lib/argp-help.c (validate_uparams): Fix typo
8868         * lib/argp-parse.c (argp_default_options): Consistently begin help
8869         messages with a lowercase letter.
8870
8871 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8872
8873         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8874         overrun buffers and shouldn't be used (much as gets shouldn't be
8875         used).
8876         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8877
8878 2006-03-08  Simon Josefsson  <jas@extundo.com>
8879
8880         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8881         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8882
8883 2006-03-08  Simon Josefsson  <jas@extundo.com>
8884
8885         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8886         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8887
8888 2006-03-08  Simon Josefsson  <jas@extundo.com>
8889
8890         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8891         signal that configure disabled the device.
8892
8893 2006-03-08  Simon Josefsson  <jas@extundo.com>
8894
8895         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8896         languages.
8897
8898 2006-03-07  Simon Josefsson  <jas@extundo.com>
8899
8900         * modules/getopt (Depends-on): Add unistd.
8901
8902         * modules/unistd: New file.
8903
8904 2006-03-07  Simon Josefsson  <jas@extundo.com>
8905
8906         * modules/gc-random: New file.
8907
8908 2006-03-07  Simon Josefsson  <jas@extundo.com>
8909
8910         * m4/unistd_h.m4: New file.
8911
8912 2006-03-07  Simon Josefsson  <jas@extundo.com>
8913
8914         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8915         test to be side-effect free by storing the result in the cache
8916         variable gl_cv_lib_readline, and moving the assignment of
8917         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8918         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8919
8920 2006-03-07  Simon Josefsson  <jas@extundo.com>
8921
8922         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8923         error on missing devices (the functions will return an error).
8924
8925         * m4/gc.m4: Move random stuff to gc-random.m4
8926
8927 2006-03-07  Simon Josefsson  <jas@extundo.com>
8928
8929         * lib/unistd_.h: New file.
8930
8931 2006-03-07  Simon Josefsson  <jas@extundo.com>
8932
8933         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8934
8935 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8936
8937         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8938         Problem reported by Juan Manuel Guerrero.
8939
8940 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8941
8942         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8943         the unistd module.
8944         * lib/getlogin_r.c: Likewise.
8945         * lib/getlogin_r.h: Likewise.
8946         * lib/glob.c: Likewise.
8947         * lib/pagealign_alloc.c: Likewise.
8948         * lib/unistd_.h: Remove; no longer needed.
8949
8950 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8951
8952         * MODULES.html.sh (Support for systems lacking POSIX:2001):
8953         Add unistd.
8954         * modules/c-stack (Depends-on): Add unistd.
8955         * modules/getlogin_r: Likewise.
8956         * modules/glob: Likewise.
8957         * modules/pagealign_alloc: Likewise.
8958         * modules/unistd (Files): Remove lib/unistd_.h.
8959         (EXTRA_DIST): Remove.
8960         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
8961         need unistd_.h.
8962         (MOSTLYCLEANFILES): Remove unistd.h-t.
8963
8964 2006-03-03  Simon Josefsson  <jas@extundo.com>
8965
8966         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
8967
8968 2006-03-03  Simon Josefsson  <jas@extundo.com>
8969
8970         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
8971         libidn and bison.
8972
8973 2006-03-03  Simon Josefsson  <jas@extundo.com>
8974
8975         * build-aux/maint.mk: Add indent target.
8976
8977 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
8978
8979         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
8980         our replacement poll.h in any case, to avoid a differing
8981         declaration from a system header.  Seen on AIX.
8982
8983 2006-03-01  Simon Josefsson  <jas@extundo.com>
8984
8985         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
8986         <kasal@ucw.cz>.
8987
8988 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8989
8990         * modules/gettime (Depends-on): Add extensions module.
8991         * modules/nanosleep (Depends-on): Likewise.
8992         * modules/settime (Depends-on): Likewise.
8993
8994 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
8995
8996         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
8997         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
8998         pedantically.
8999         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9000         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9001
9002         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9003         not "==".  Reported by Ralf Wildenhues.
9004
9005 2006-03-01  Karl Berry  <karl@gnu.org>
9006
9007         * doc/Copyright/request-*: new files, synced from gnuorg.
9008
9009 2006-03-01  Karl Berry  <karl@gnu.org>
9010
9011         * config/srclist.txt (Copyright/*): new entries.
9012
9013 2006-02-28  Simon Josefsson  <jas@extundo.com>
9014
9015         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9016
9017 2006-02-27  Simon Josefsson  <jas@extundo.com>
9018
9019         * lib/base64.h: Indent #define's.  From Jim Meyering
9020         <jim@meyering.net>.
9021
9022 2006-02-27  Jim Meyering  <jim@meyering.net>
9023
9024         Revert the change of 2006-02-24, so these files can continue
9025         to be sync'd from gettext.
9026         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9027         of `config.h'.
9028
9029 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9030
9031         * modules/intprops: New file.
9032         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9033         Add intprops.
9034         * modules/getloadavg (Files): Remove lib/intprops.h.
9035         (Depends-on): Add intprops.
9036         * modules/human: Likewise.
9037         * modules/inttostr: Likewise.
9038         * modules/openat: Likewise.
9039         * modules/sig2str: Likewise.
9040         * modules/userspec: Likewise.
9041         * modules/utimecmp: Likewise.
9042         * modules/xnanosleep: Likewise.
9043         * modules/xstrtol: Likewise.
9044
9045 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9046
9047         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9048         * modules/lock-tests (TESTS): Use $(EXEEXT).
9049         * modules/tls-tests: Likewise.
9050         * modules/argp-tests: Likewise.
9051         (check_PROGRAMS): New var, replacing...
9052         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9053
9054 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9055
9056         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9057         `config.h'.
9058
9059 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9060
9061         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9062
9063 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9064
9065         Sync from coreutils.
9066         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9067         gl_CHDIR_SAFER.
9068
9069 2006-02-22  Jim Meyering  <jim@meyering.net>
9070
9071         Sync from coreutils.
9072         * m4/chdir-safer.m4: New file.
9073
9074 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9075
9076         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9077         AT_FDCWD exceeds INT_MAX.
9078         * lib/openat.h (AT_FDCWD): Likewise.
9079
9080 2006-02-17  Eric Blake  <address@hidden>
9081
9082         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9083
9084 2006-02-16  Simon Josefsson  <jas@extundo.com>
9085
9086         * modules/getaddrinfo (Depends-on): Add sys_socket.
9087
9088 2006-02-15  Simon Josefsson  <jas@extundo.com>
9089
9090         * build-aux/maint.mk: Add dsyntax-check rule.
9091
9092 2006-02-15  Eric Blake  <ebb9@byu.net>
9093
9094         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9095         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9096         'present but cannot compile' warnings on cygwin.
9097         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9098         use ws2tcpip.h if sys/socket.h works.
9099         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9100         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9101
9102 2006-02-14  Simon Josefsson  <jas@extundo.com>
9103
9104         * modules/maintainer-makefile (Files): Rename.
9105
9106         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9107         and (the local) Makefile.cfg to maint-cfg.mk.
9108
9109         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9110         to the latter.
9111
9112         * modules/maintainer-makefile: New module.
9113
9114         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9115         severaly stripped to make it possible to build it up from scratch
9116         with reliable tests.
9117
9118         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9119         fixes to permit overriding the default actions when configure and
9120         makefile are not available.
9121
9122 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9123
9124         Sync from coreutils.
9125         * modules/lstat (Depends-on): Don't depend on xalloc.
9126         (License): Change from GPL to LGPL, since this is now simply a
9127         replacement for a libc function.
9128
9129 2006-02-14  Jim Meyering  <jim@meyering.net>
9130
9131         Sync from coreutils.
9132
9133         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9134         failure on deficient systems, and simplify gnulib lgpl dependencies.
9135         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9136         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9137
9138         * lib/xalloc-die.c: Remove unused definition of N_.
9139
9140 2006-02-14  Jim Meyering  <jim@meyering.net>
9141
9142         Sync from coreutils.
9143         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9144         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9145         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9146         double-quote uses of that variable, to accommodate the rare case in
9147         which getmntent is available in none of the libraries checked.  This
9148         happens at least on FreeBSD 5.0.
9149
9150 2006-02-13  Simon Josefsson  <jas@extundo.com>
9151
9152         * gnulib-tool (Usage): Fix --import, from
9153         karl@freefriends.org (Karl Berry).
9154
9155 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9156
9157         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9158
9159 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9160
9161         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9162         "autoupdate" on 2005-12-12.
9163
9164 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9165
9166         * modules/closeout (Depends-on): Remove atexit.
9167
9168 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9169
9170         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9171         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9172
9173 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9174
9175         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9176         __EXTENSIONS__ if this causes compilation to fail.  Problem
9177         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9178         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9179
9180 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9181
9182         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9183         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9184         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9185         All uses changed.
9186
9187 2006-01-26  Simon Josefsson  <jas@extundo.com>
9188
9189         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9190         prototype is visible on mingw32.
9191
9192         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9193         for mingw32.
9194
9195         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9196         mingw32).
9197
9198 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9199
9200         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9201         attempt to open for write; this always fails, at least on POSIX
9202         hosts.  This reinstates the 2006-01-09 change, which was
9203         inadvertently removed.
9204
9205 2006-01-26  Bruno Haible  <bruno@clisp.org>
9206
9207         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9208         Reported by Paul Eggert.
9209
9210 2006-01-26  Bruno Haible  <bruno@clisp.org>
9211             Paul Eggert  <eggert@cs.ucla.edu>
9212
9213         * lib/stdbool_.h (_Bool)
9214         [(! (defined __cplusplus || defined __BEOS__)
9215           && !defined __GNUC__
9216           && !(defined __HP_cc || defined __xlc__
9217                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9218                || defined __sgi))]:
9219         #define to signed char in these cases too; this simplifies
9220         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9221         etc., separately) and makes it more conservative.
9222
9223 2006-01-25  Simon Josefsson  <jas@extundo.com>
9224
9225         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9226         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9227         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9228
9229 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9230
9231         * lib/argp-namefrob.h: Bugfix. Remove stray #
9232
9233 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9234
9235         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9236         so that we test the test.
9237         Check for yet another HP-UX cc bug involving *bool |= bool.
9238
9239 2006-01-25  Karl Berry  <karl@gnu.org>
9240
9241         * config/srclist.txt (vasnprintf.c): sync lost.
9242
9243 2006-01-25  Jim Meyering  <jim@meyering.net>
9244
9245         Sync from the stable (b5) branch of coreutils:
9246
9247         * lib/fts.c (fts_children): Don't let close() clobber errno from
9248         failed fchdir().
9249
9250         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9251         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9252         a dangling symlink.  That can also happen at least for ELOOP.
9253         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9254         FYI, this bug predates the inclusion of fts.c in coreutils.
9255
9256         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9257         in their own block, so pre-c99 compilers don't object.
9258
9259         Avoid the double-free (first in fts_read, second in fts_close) that
9260         would occur when an `active' directory is made inaccessible (e.g.,
9261         via chmod a-x) during a traversal.
9262         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9263         before returning.  Reproduce this failure by
9264         mkdir -p a/b; cd a; chmod a-x . b
9265         Reported by Stavros Passas.
9266
9267 2006-01-25  Jim Meyering  <jim@meyering.net>
9268
9269         * lib/fileblocks.c: Remove more useless parentheses.
9270         * lib/readutmp.h: Likewise.
9271
9272 2006-01-25  Bruno Haible  <bruno@clisp.org>
9273
9274         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9275         warnings.
9276         Reported by Paul Eggert.
9277
9278 2006-01-25  Bruno Haible  <bruno@clisp.org>
9279
9280         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9281         rid of a trap command. For Solaris sh.
9282         Reported by Mark D. Baushke <mdb@gnu.org>.
9283
9284 2006-01-24  Simon Josefsson  <jas@extundo.com>
9285
9286         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9287         Bruno.
9288
9289 2006-01-24  Karl Berry  <karl@gnu.org>
9290
9291         * config/srclist.txt (argp-namefrob.h): sync lost.
9292
9293 2006-01-24  Jim Meyering  <jim@meyering.net>
9294
9295         * modules/openat (Files): Add lib/intprops.h.
9296         From Mark D. Baushke.
9297
9298 2006-01-24  Jim Meyering  <jim@meyering.net>
9299
9300         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9301         Reported by Mark D. Baushke.
9302
9303 2006-01-24  Jim Meyering  <jim@meyering.net>
9304
9305         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9306
9307 2006-01-24  Bruno Haible  <bruno@clisp.org>
9308
9309         * modules/strnlen (Maintainer): Change from glibc to all.
9310
9311 2006-01-24  Bruno Haible  <bruno@clisp.org>
9312
9313         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9314         Patch by Paul Eggert.
9315
9316 2006-01-24  Bruno Haible  <bruno@clisp.org>
9317
9318         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9319         already has it.
9320         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9321         2005-11-26.
9322
9323         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9324         'signed char' to avoid problems with the built-in _Bool type.
9325         Reported by Paul Eggert on 2005-11-26.
9326
9327 2006-01-24  Bruno Haible  <bruno@clisp.org>
9328
9329         * gnulib-tool (func_import): Avoid constructing complicated sed
9330         expressions inside backquote.
9331         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9332
9333 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9334
9335         These changes imported from libc.
9336         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9337         test and two separate function calls.
9338         * lib/strndup.c (__strndup): Add libc_hidden_def.
9339
9340 2006-01-23  Simon Josefsson  <jas@extundo.com>
9341
9342         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9343         Remove the test_*_SOURCES variable: automake infers it by default.
9344         * modules/tls-tests: Likewise.
9345
9346 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9347
9348         Work around porting bugs reported by Dieter in
9349         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9350         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9351         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9352         Include "getopt.h" first, to check interface.
9353         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9354         !HAVE_DECL_GETENV.
9355         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9356         (__strndup): Revert to K&R-style function dfns, the glibc style.
9357         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9358         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9359         Include strnlen.h first, to get prototype properly.
9360         (strnlen): Renamed from __strnlen.
9361         Remove weak alias.
9362
9363 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9364
9365         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9366
9367 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9368
9369         * config/srclist.txt: Adjust to reflect glibc reorganization.
9370         This affects only comments.
9371
9372 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9373
9374          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9375          Reported by Bruce Korb <bkorb@gnu.org>.
9376
9377 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9378
9379         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9380         to pacify gcc -Wswitch-default.
9381
9382 2006-01-22  Bruno Haible  <bruno@clisp.org>
9383
9384         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9385         temporary buffer for sprintf, take into account the precision also
9386         for 'd', 'i', 'u', 'o', 'x', 'X'.
9387
9388 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9389
9390         * modules/argp-tests: New module
9391         * tests/test-argp.c: New file
9392         * tests/test-argp-2.sh: New file
9393
9394 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9395
9396         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9397         (__argp_base_name): Removed
9398         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9399         typo.
9400         (__argp_base_name): Provide macro definition or extern declaration
9401         depending on the configuration
9402
9403 2006-01-20  Simon Josefsson  <jas@extundo.com>
9404
9405         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9406
9407 2006-01-20  Simon Josefsson  <jas@extundo.com>
9408
9409         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9410
9411 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9412
9413         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9414         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9415         Suggested by Bruno Haible.
9416
9417 2006-01-20  Karl Berry  <karl@gnu.org>
9418
9419         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9420         until changes propagate, I guess.
9421
9422 2006-01-19  Simon Josefsson  <jas@extundo.com>
9423
9424         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9425
9426 2006-01-19  Simon Josefsson  <jas@extundo.com>
9427
9428         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9429
9430 2006-01-19  Simon Josefsson  <jas@extundo.com>
9431
9432         * gnulib-tool: Set check_PROGRAMS.
9433
9434         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9435         modules/des-tests, modules/gc-arcfour-tests,
9436         modules/gc-arctwo-tests, modules/gc-des-tests,
9437         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9438         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9439         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9440         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9441         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9442         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9443         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9444         test_*_SOURCES.
9445
9446 2006-01-18  Simon Josefsson  <jas@extundo.com>
9447
9448         * modules/socklen (Depends-on): Depend on sys_socket.
9449
9450 2006-01-18  Simon Josefsson  <jas@extundo.com>
9451
9452         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9453         modules/des-tests, modules/gc-arcfour-tests,
9454         modules/gc-arctwo-tests, modules/gc-des-tests,
9455         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9456         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9457         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9458         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9459         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9460         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9461         $(EXEEXT) to automake TESTS variable, for mingw32.
9462
9463 2006-01-17  Simon Josefsson  <jas@extundo.com>
9464
9465         * modules/socklen (Include): Need sys/socket.h.
9466
9467 2006-01-17  Bruno Haible  <bruno@clisp.org>
9468
9469         * modules/ssize_t (Include): Add <sys/types.h>.
9470
9471 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9472
9473         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9474         it's not portable and it doesn't work with cross-compiles.
9475         Problem reported by Bruno Haible.  Fix missing-$ typo in
9476         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9477         -zignore from being used with Sun's C compiler.
9478
9479 2006-01-12  Simon Josefsson  <jas@extundo.com>
9480
9481         * lib/base64.c: Fix warning, reported by Bruno Haible
9482         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9483
9484 2006-01-12  Bruno Haible  <bruno@clisp.org>
9485
9486         * modules/ldd: New file.
9487         * build-aux/ldd.sh.in: New file.
9488         * MODULES.html.sh (Support for building libraries and executables): Add
9489         ldd.
9490
9491 2006-01-12  Bruno Haible  <bruno@clisp.org>
9492
9493         * m4/ldd.m4: New file.
9494
9495 2006-01-12  Bruno Haible  <bruno@clisp.org>
9496
9497         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9498         endless loop while replacing $auxdir with build-aux.
9499
9500 2006-01-11  Simon Josefsson  <jas@extundo.com>
9501
9502         * lib/stdint_.h (SIZE_MAX): Add missing (.
9503
9504 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9505
9506         Sync from coreutils.
9507         * lib/md5.c: Fix commentary typos.
9508         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9509         * lib/md5.h (__attribute__): Remove; unused.
9510         * lib/sha1.c: Fix commentary to match md5 better.
9511         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9512         so that we don't need to worry about alignment.  All uses changed.
9513         This merges the 2005-10-28 md5 change into sha1.
9514
9515 2006-01-11  Jim Meyering  <jim@meyering.net>
9516
9517         Sync from coreutils.
9518         * lib/md5.c (OP): Fix spacing.
9519
9520 2006-01-11  Bruno Haible  <bruno@clisp.org>
9521
9522         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9523         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9524         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9525
9526 2006-01-11  Bruno Haible  <bruno@clisp.org>
9527
9528         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9529         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9530         the "early" section as well.
9531
9532 2006-01-11  Bruno Haible  <bruno@clisp.org>
9533
9534         Avoid "ar: no archive members specified" error on MacOS X.
9535         * gnulib-tool (func_modules_add_dummy): New function.
9536         (func_import, func_create_testdir): Invoke it.
9537
9538 2006-01-11  Bruno Haible  <bruno@clisp.org>
9539
9540         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9541         with $auxdir in AC_CONFIG_FILES statements.
9542
9543 2006-01-11  Bruno Haible  <bruno@clisp.org>
9544
9545         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9546         Initialize also noinst_HEADERS to empty.
9547
9548 2006-01-11  Bruno Haible  <bruno@clisp.org>
9549
9550         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9551         variables.
9552         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9553         autoreconf.
9554
9555 2006-01-11  Bruno Haible  <bruno@clisp.org>
9556
9557         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9558         overridable by the user.
9559         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9560
9561 2006-01-10  Simon Josefsson  <jas@extundo.com>
9562
9563         * modules/sys_socket: New file.
9564
9565 2006-01-10  Simon Josefsson  <jas@extundo.com>
9566
9567         * m4/sys_socket_h.m4: New file.
9568
9569 2006-01-10  Simon Josefsson  <jas@extundo.com>
9570
9571         * lib/socket_.h: New file.
9572
9573 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9574
9575         * modules/readutmp (Maintainer): Add myself.
9576
9577 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9578
9579         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9580         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9581         People who are still concerned with buggy memcmp implementations
9582         can invoke gl_FUNC_MEMCMP themselves.
9583
9584 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9585
9586         * lib/regex_internal.h (BITSET_WORD_BITS):
9587         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9588         preprocessor mishandles large unsigned values as if they were signed.
9589         Problem reported by Claudio Fontana in
9590         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9591
9592 2006-01-10  Jim Meyering  <jim@meyering.net>
9593
9594         Avoid the double-free (first in fts_read, second in fts_close) that
9595         would occur when an `active' directory is made inaccessible (e.g.,
9596         via chmod a-x) during a traversal.
9597         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9598         before returning.  Reproduce this failure by
9599         mkdir -p a/b; cd a; chmod a-x . b
9600         Reported by Stavros Passas.
9601
9602         Sync from coreutils.
9603         * lib/sha1.c: Tweak grammar in a comment.
9604
9605 2006-01-10  Jim Meyering  <jim@meyering.net>
9606
9607         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9608         Patch by Joerg Sonnenberger.
9609
9610 2006-01-10  Bruno Haible  <bruno@clisp.org>
9611
9612         * modules/readutmp: Depend on module free.
9613         * modules/strtok_r: Depend on module restrict.
9614
9615 2006-01-10  Bruno Haible  <bruno@clisp.org>
9616
9617         * modules/gettext (configure.ac): Add an invocation of
9618         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9619
9620 2006-01-10  Bruno Haible  <bruno@clisp.org>
9621
9622         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9623         Reported by Werner Lemberg <wl@gnu.org>.
9624
9625 2006-01-10  Bruno Haible  <bruno@clisp.org>
9626
9627         * lib/localcharset.c: Update from GNU gettext.
9628
9629 2006-01-10  Bruno Haible  <bruno@clisp.org>
9630
9631         * lib/argp.h (__const): Remove macro. Use const instead.
9632         * lib/argp-fmtstream.h (__const): Likewise.
9633         * lib/glob_.h (__const): Remove macro.
9634         * lib/glob-libc.h: Use const instead of __const.
9635
9636 2006-01-10  Bruno Haible  <bruno@clisp.org>
9637
9638         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9639         variable.
9640         Needed to avoid an automake error regarding the 'gettext' module.
9641
9642 2006-01-09  Simon Josefsson  <jas@extundo.com>
9643
9644         * modules/inet_ntop (Depends-on): Add restrict.
9645
9646 2006-01-09  Simon Josefsson  <jas@extundo.com>
9647
9648         * modules/gc-rijndael-tests (License): Put under LGPL.
9649
9650         * modules/gc-des-tests (License): Likewise.
9651
9652         * modules/gc-arcfour-tests (License): Likewise.
9653
9654         * modules/gc-arctwo-tests (License): Likewise.
9655
9656         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9657
9658         * modules/gc-hmac-sha1-tests (Files): Likewise.
9659
9660         * modules/gc-hmac-md5-tests (License): Likewise.
9661
9662         * modules/gc-sha1-tests (License): Likewise.
9663
9664         * modules/gc-md5-tests (License): Likewise.
9665
9666         * modules/gc-md4-tests (License): Likewise.
9667
9668         * modules/gc-md2-tests (License): Likewise.
9669
9670         * modules/gc-tests (License): Likewise.
9671
9672         * modules/des-tests (License): Likewise.
9673
9674         * modules/md4-tests (License): Likewise.
9675
9676         * modules/md2-tests (License): Likewise.
9677
9678 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9679
9680         Sync from coreutils:
9681
9682         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9683         * modules/lib-ignore: New file.
9684         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9685         chdir-safer.m4, lchmod.m4.
9686         * modules/openat: Add mkdirat.c, openat-priv.h.
9687
9688 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9689
9690         Sync from coreutils.
9691         * m4/lib-ignore.m4: New file.
9692         * m4/lchmod.m4: New file.
9693
9694 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9695
9696         Sync from coreutils.
9697         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9698         for write access: POSIX says that must fail.
9699         * lib/fts.c (diropen): Likewise.
9700         * lib/save-cwd.c (save_cwd): Likewise.
9701         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9702         well, for minor improvements on hosts that lack O_DIRECTORY.
9703         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9704         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9705         Fall back on chown if open failed with EACCES.
9706
9707         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9708         Report an error at compile-time if only a 1-second nominal clock
9709         resolution is found.
9710
9711         * lib/lchmod.h: New file.
9712         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9713         (make_dir_parents): Use lchown rather than chown, and
9714         lchmod rather than chmod.
9715
9716         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9717         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9718         "proc" reported by n0dalus.
9719
9720         * lib/mountlist.c: Include <limits.h>.
9721         (dev_from_mount_options)
9722         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9723         New function.  It no longer assumes "dev=" has the System V meaning
9724         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9725         (read_file_system_list)
9726         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9727         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9728         dev= in that case.
9729
9730         * lib/posixtm.h (PDS_PRE_2000): New macro.
9731         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9732         allow_century.  All usages changed.  Reject dates outside the range
9733         1969-1999 if PDS_PRE_2000 is used.
9734
9735 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9736
9737         Sync from coreutils.
9738         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9739         (Time of day items): Mention the possibility of leap seconds.
9740         Problem reported by Dr. David Alan Gilbert.
9741
9742 2006-01-09  Jim Meyering  <jim@meyering.net>
9743
9744         Sync from coreutils.
9745
9746         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9747
9748         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9749
9750         * lib/modechange.c (mode_compile): Reject an invalid mode string
9751         that starts with an octal digit.  From Andreas Gruenbacher.
9752
9753         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9754         and dup to open_safer and dup_safer, respectively.
9755         (openat_permissive): Fix typo in comment.
9756
9757         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9758         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9759         (_): Remove; no longer needed.
9760         (openat): Renamed from rpl_openat; no need for rpl_openat
9761         since openat.h renames openat for us.
9762         Replace most of the body with a call to openat_permissive,
9763         to avoid duplicate code.
9764         Port to (probably hypothetical) environments were mode_t is
9765         wider than int.
9766         (openat_permissive): Require mode arg, so that we can check
9767         types better.  Put it just after flags.  Change cwd failure
9768         indicator from pointer-to-bool to pointer-to-errno-value.
9769         All callers changed.
9770         Invoke openat_save_fail and/or openat_restore_fail if
9771         cwd_errno is null, so that openat can call us.
9772         (openat_permissive, fdopendir, fstatat, unlinkat):
9773         Simplify errno handling to avoid some duplicate code,
9774         as it's OK to set errno on success.
9775         * lib/openat.h: Revamp code so that function macros depend on
9776         __OPENAT_PREFIX only, not also on AT_FDCWD.
9777         (openat_ro): Remove.  Caller changed to use openat_permissive.
9778         (openat_permissive): Now a macro, if not a function.
9779         (openat_restore_fail, openat_save_fail): Now always functions,
9780         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9781
9782         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9783         and openat.c.
9784         * lib/mkdirat.c: Include openat-priv.h.
9785         Remove definitions of macros defined therein.
9786         * lib/openat.c: Likewise.
9787
9788         * lib/mkdirat.c (mkdirat): New file and function.
9789         * lib/openat.h (mkdirat): Declare.
9790
9791         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9792
9793         * lib/openat.h (openat_permissive): Declare.
9794         (openat_ro): Define.
9795
9796         * lib/openat.c (EXPECTED_ERRNO): New macro.
9797         (openat_permissive): New function -- used in remove.c rewrite.
9798         (all functions): Set errno just before returning, only if there
9799         was an actual failure.
9800         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9801
9802         Emulate openat-family functions using Linux's procfs, if possible.
9803         Idea and some code based on Ulrich Drepper's glibc changes.
9804
9805         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9806         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9807         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9808         before falling back on save_cwd and restore_cwd.
9809         (fdopendir, fstatat, unlinkat): Likewise.
9810
9811         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9812         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9813
9814         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9815         as second argument to va_arg.  Otherwise, some versions of gcc
9816         warn that `if this code is reached, the program will abort'.
9817
9818 2006-01-09  Jim Meyering  <jim@meyering.net>
9819
9820         Sync from coreutils.
9821         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9822         Require openat-priv.h.
9823
9824 2006-01-09  Bruno Haible  <bruno@clisp.org>
9825
9826         * modules/strnlen (Include): Use strnlen.h.
9827
9828 2006-01-09  Bruno Haible  <bruno@clisp.org>
9829
9830         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9831
9832 2006-01-09  Bruno Haible  <bruno@clisp.org>
9833
9834         * lib/sysexit_.h (EX_OK): New macro.
9835         Suggested by Martin Lambers <marlam@marlam.de>.
9836
9837 2006-01-09  Bruno Haible  <bruno@clisp.org>
9838
9839         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9840         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9841
9842 2006-01-09  Bruno Haible  <bruno@clisp.org>
9843
9844         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9845         numbers.
9846
9847 2006-01-09  Bruno Haible  <bruno@clisp.org>
9848
9849         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9850         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9851         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9852         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9853
9854 2006-01-09  Bruno Haible  <bruno@clisp.org>
9855
9856         * build-aux/javacomp.sh.in: New file, moved from lib/.
9857         * modules/javacomp-script (Files): Update.
9858         (configure.ac): Add AC_CONFIG_FILES invocation.
9859         (EXTRA_DIST): Remove variable.
9860
9861         * build-aux/javaexec.sh.in: New file, moved from lib/.
9862         * modules/javaexec (Files): Update.
9863         (configure.ac): Add AC_CONFIG_FILES invocation.
9864         (EXTRA_DIST): Remove javaexec.sh.in.
9865
9866         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9867         * modules/csharpcomp-script (Files): Update.
9868         (configure.ac): Add AC_CONFIG_FILES invocation.
9869         (EXTRA_DIST): Remove variable.
9870
9871         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9872         * modules/csharpexec (Files): Update.
9873         (configure.ac): Add AC_CONFIG_FILES invocation.
9874         (EXTRA_DIST): Remove csharpexec.sh.in.
9875
9876 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9877
9878         Sync from coreutils.
9879
9880         Add POSIX ACL support
9881         * lib/acl.h (copy_acl, set_acl): Add declarations.
9882         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9883         systems other than Linux.
9884         (chmod_or_fchmod): New function: use fchmod when possible,
9885         and chmod otherwise.
9886         (file_has_acl): Add a POSIX ACL implementation, with a
9887         Linux-specific subcase.
9888         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9889         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9890         acls are unsupported.
9891         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9892         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9893         are unsupported.
9894
9895 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9896
9897         Sync from coreutils.
9898         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9899
9900 2006-01-07  Bruno Haible  <bruno@clisp.org>
9901
9902         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9903         gl_EARLY.
9904
9905 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9906
9907         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9908         Problem reported for Mingw by Mark Junker.
9909
9910 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9911
9912         * README: Gnulib normally doesn't generate a tarball.
9913
9914 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9915
9916         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9917         long int, not int, for nanosecond counts, so that people who are
9918         used to POSIX struct timespec won't be surprised.  Reported by Jim
9919         Meyering.
9920
9921 2005-12-28  Bruno Haible  <bruno@clisp.org>
9922
9923         * build-aux/config.rpath: Update from GNU gettext.
9924
9925 2005-12-16  Jim Meyering  <jim@meyering.net>
9926
9927         * modules/fprintftime: New module.
9928         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9929
9930 2005-12-16  Jim Meyering  <jim@meyering.net>
9931
9932         * m4/fprintftime.m4: New file.
9933
9934 2005-12-16  Jim Meyering  <jim@meyering.net>
9935
9936         * lib/fprintftime.c, lib/fprintftime.h: New files.
9937
9938 2005-12-15  Simon Josefsson  <jas@extundo.com>
9939
9940         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9941         new m4/socklen.m4.
9942
9943 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9944
9945         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9946         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9947
9948 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9949
9950         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
9951         * lib/argp-help.c (fill_in_uparams): Check if the constructed
9952         struct uparams is valid. Fall back to the default values if it is
9953         not.
9954
9955 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9956
9957         * modules/argp (Files): Add argp-pin.c
9958         (Depends-on): dirname
9959         (lib_SOURCES): Add argp-pin.c
9960
9961 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9962
9963         * m4/argp.m4:  Check if program_invocation_name and
9964         program_invocation_short_name are declared and define appropriate
9965         macros if they are not.
9966
9967 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
9968
9969         * lib/argp-help.c (__argp_base_name): New function
9970         (__argp_short_program_name): Rewrite using __argp_base_name
9971         * lib/argp-namefrob.h: Define program_invocation_name and
9972         program_invocation_short_name if requested
9973         (__argp_base_name): Add prototype
9974         * lib/argp-parse.c (argp_def): Use gettext wrappers
9975         (argp_default_parser): Use __argp_base_name
9976         * lib/argp-pin.c: New file. Defines program_invocation_name and
9977         program_invocation_short_name on systems that lack them.
9978
9979 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9980
9981         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
9982         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9983         porting problem reported by Georg Schwarz in
9984         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9985
9986 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
9987
9988         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
9989         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
9990         porting problem reported by Georg Schwarz in
9991         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
9992
9993 2005-12-05  Bruno Haible  <bruno@clisp.org>
9994
9995         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
9996         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
9997         Reported by Mark Junker <mjscod@gmx.de>.
9998
9999 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10000
10001         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10002         Use implementation from Albert Chin, with some
10003         comments/corrections by Stepan Kasal and myself.
10004
10005 2005-12-02  Bruno Haible  <bruno@clisp.org>
10006
10007         * gnulib-tool (func_import): Accept GPLed build tool modules when
10008         --lgpl is given.
10009         * modules/csharpcomp-script: New file.
10010         * modules/csharpcomp: Depend on it.
10011         * modules/javacomp-script: New file.
10012         * modules/javacomp: Depend on it.
10013         Suggested by Simon Josefsson.
10014
10015 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10016
10017         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10018         statement, to work around an HP-UX 10.20 compiler bug reported by
10019         Peter O'Gorman.
10020
10021 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10022
10023         * modules/savedir (Depends-on): Add openat.
10024
10025 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10026
10027         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10028         (uintmax_t) [defined uintmax_t]: Do not declare.
10029         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10030         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10031         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10032         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10033         sake of portability to weird hosts that C allows (though we don't
10034         know of any practical examples).
10035
10036         * lib/savedir.h (fdsavedir): New decl.
10037         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10038         contains most of the former guts of savedir.
10039         (savedir): Use savedirstream.
10040         Include "openat.h".
10041
10042 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10043
10044         * modules/obstack (Files): Add m4/ulonglong.m4.
10045         Problem reported by Davide Angelocola.
10046
10047 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10048
10049         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10050         coreutils no longer futzes with rounding modes.
10051
10052 2005-11-14  Jim Meyering  <jim@meyering.net>
10053
10054         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10055         replacement of mkstemp.
10056
10057 2005-11-10  Simon Josefsson  <jas@extundo.com>
10058
10059         * lib/readline.c: Remove EOL.
10060
10061 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10062
10063         * modules/gethrxtime (Depends-on): Add gettime.
10064
10065 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10066
10067         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10068         or gettimeofday; no longer needed.
10069
10070 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10071
10072         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10073         time business.
10074         (gethrxtime) [! (HAVE_NANOUPTIME
10075         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10076         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10077         our own approximation.
10078
10079 2005-11-08  Eric Blake  <ebb9@byu.net>
10080
10081         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10082
10083 2005-11-08  Eric Blake  <ebb9@byu.net>
10084
10085         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10086
10087 2005-11-04  Bruno Haible  <bruno@clisp.org>
10088
10089         * gnulib-tool: Implement --update mode.
10090
10091 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10092
10093         Fix porting problem reported by Theodoros V. Kalamatianos.
10094         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10095         Don't assume that futimes failing means we must fail.
10096
10097 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10098
10099         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10100         variables to suggest the intended function of the PATH_MAX check.
10101
10102 2005-10-30  Kean Johnston  <jkj@sco.com>
10103
10104         Trivial changes to support SCO systems.
10105         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10106         as PATH_MAX.
10107         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10108         where __ptr is null when no I/O is pending.
10109
10110 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10111
10112         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10113         leave errno alone.  Problem reported by Dmitry V. Levin.
10114
10115 2005-10-28  Simon Josefsson  <jas@extundo.com>
10116
10117         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10118         Test more.
10119
10120         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10121
10122         * modules/md2, modules/md2-tests: New files.
10123
10124 2005-10-28  Simon Josefsson  <jas@extundo.com>
10125
10126         * m4/inet_ntop.m4: More tests.
10127
10128         * m4/gc-md2.m4, md2.m4: New file.
10129
10130 2005-10-28  Simon Josefsson  <jas@extundo.com>
10131
10132         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10133         "restrict" keywords, as per POSIX.  Protect the function
10134         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10135         Don't use K&R prototypes.  Check the sprintf return values.
10136         Re-define EAFNOSUPPORT if not present.  Indent.
10137
10138         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10139         suggested by Bruno Haible <bruno@clisp.org>.
10140
10141         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10142
10143         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10144
10145         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10146         libgcrypt).
10147
10148         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10149
10150         * lib/md2.h, lib/md2.c: New files.
10151
10152 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10153
10154         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10155         errno alone.  Problem reported by Frederic Jolliton.
10156
10157 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10158
10159         * modules/verify (License): Change from GPL to LGPL.  This is a
10160         tiny module and there are apparently near-equivalents that are
10161         under the BSD license.
10162
10163 2005-10-24  Simon Josefsson  <jas@extundo.com>
10164
10165         * modules/sha1: Relicense to LGPL.
10166
10167 2005-10-24  Simon Josefsson  <jas@extundo.com>
10168
10169         * lib/md4.h: Shrink buffer size, now that we changed the type.
10170
10171 2005-10-23  Simon Josefsson  <jas@extundo.com>
10172
10173         * gnulib-tool (func_import): Fix --tests-base.
10174
10175 2005-10-22  Simon Josefsson  <jas@extundo.com>
10176
10177         * modules/arcfour (Depends-on): Need stdint.
10178
10179 2005-10-22  Simon Josefsson  <jas@extundo.com>
10180
10181         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10182         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10183
10184 2005-10-22  Simon Josefsson  <jas@extundo.com>
10185
10186         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10187         suggested by Bruno Haible <bruno@clisp.org>.
10188
10189 2005-10-22  Simon Josefsson  <jas@extundo.com>
10190
10191         * lib/crc.h: Include stddef.h, for size_t.
10192
10193 2005-10-22  Simon Josefsson  <jas@extundo.com>
10194
10195         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10196         arcfour_context struct (simplify test vector testing in GNU
10197         Shishi).
10198
10199 2005-10-21  Simon Josefsson  <jas@extundo.com>
10200
10201         * modules/des, modules/des-tests: New files.
10202
10203         * modules/gc-des, modules/gc-des-tests: New files.
10204
10205         * tests/test-des.c, tests/test-gc-des.c: New file.
10206
10207 2005-10-21  Simon Josefsson  <jas@extundo.com>
10208
10209         * modules/arctwo, modules/arctwo-tests: New files.
10210
10211         * tests/test-arctwo.c: New file.
10212
10213         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10214
10215         * tests/test-gc-arctwo.c: New file.
10216
10217 2005-10-21  Simon Josefsson  <jas@extundo.com>
10218
10219         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10220         Bruno Haible <bruno@clisp.org>.
10221
10222         * m4/gc-des.m4: New file.
10223
10224 2005-10-21  Simon Josefsson  <jas@extundo.com>
10225
10226         * m4/arctwo.m4: New file.
10227
10228         * m4/gc-arctwo.m4: New file.
10229
10230 2005-10-21  Simon Josefsson  <jas@extundo.com>
10231
10232         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10233         block.
10234
10235 2005-10-21  Simon Josefsson  <jas@extundo.com>
10236
10237         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10238         <bruno@clisp.org>.
10239
10240         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10241
10242         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10243         Bruno Haible <bruno@clisp.org>.
10244
10245         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10246         <bruno@clisp.org>.
10247
10248 2005-10-21  Simon Josefsson  <jas@extundo.com>
10249
10250         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10251
10252 2005-10-21  Simon Josefsson  <jas@extundo.com>
10253
10254         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10255
10256 2005-10-21  Simon Josefsson  <jas@extundo.com>
10257
10258         * lib/des.h, lib/des.c: New files.
10259
10260         * lib/gc-gnulib.c: Support DES.c
10261
10262 2005-10-21  Simon Josefsson  <jas@extundo.com>
10263
10264         * lib/arctwo.h, lib/arctwo.c: New files.
10265
10266         * lib/gc-gnulib.c: Support ARCTWO.
10267
10268 2005-10-21  Simon Josefsson  <jas@extundo.com>
10269
10270         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10271         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10272
10273 2005-10-21  Simon Josefsson  <jas@extundo.com>
10274
10275         * gnulib-tool (func_import, func_create_testdir): Define automake
10276         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10277         Makefile.am snippet),
10278         suggested by Bruno Haible <bruno@clisp.org>.
10279
10280         * modules/gc (Makefile.am): Use it.
10281
10282 2005-10-21  Bruno Haible  <bruno@clisp.org>
10283
10284         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10285         patch.
10286
10287 2005-10-19  Simon Josefsson  <jas@extundo.com>
10288
10289         * tests/test-gc-rijndael.c: New file.
10290
10291         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10292
10293 2005-10-19  Simon Josefsson  <jas@extundo.com>
10294
10295         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10296         interface too.
10297
10298 2005-10-19  Simon Josefsson  <jas@extundo.com>
10299
10300         * tests/test-gc-arcfour.c: New file.
10301
10302         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10303
10304 2005-10-19  Simon Josefsson  <jas@extundo.com>
10305
10306         * modules/gc-md4, modules/gc-md4-tests: New file.
10307
10308         * tests/test-gc-md4.c: New file.
10309
10310 2005-10-19  Simon Josefsson  <jas@extundo.com>
10311
10312         * m4/gc-md4.m4: New file.
10313
10314 2005-10-19  Simon Josefsson  <jas@extundo.com>
10315
10316         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10317         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10318         <kasal@ucw.cz>.
10319
10320 2005-10-19  Simon Josefsson  <jas@extundo.com>
10321
10322         * m4/gc-arcfour.m4: New file.
10323
10324         * m4/gc-rijndael.m4: New file.
10325
10326 2005-10-19  Simon Josefsson  <jas@extundo.com>
10327
10328         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10329
10330 2005-10-19  Simon Josefsson  <jas@extundo.com>
10331
10332         * lib/gc-gnulib.c: Support ARCFOUR.
10333
10334 2005-10-19  Simon Josefsson  <jas@extundo.com>
10335
10336         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10337         support.
10338
10339         * lib/gc.h: Add ECB enum type.
10340
10341         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10342
10343 2005-10-18  Simon Josefsson  <jas@extundo.com>
10344
10345         * tests/test-md5.c: New file.
10346
10347         * modules/md5-tests: New file.
10348
10349 2005-10-18  Simon Josefsson  <jas@extundo.com>
10350
10351         * tests/test-md4.c: New file.
10352
10353         * modules/md4, modules/md4-tests: New files.
10354
10355 2005-10-18  Simon Josefsson  <jas@extundo.com>
10356
10357         * m4/md4.m4: New file.
10358
10359 2005-10-18  Simon Josefsson  <jas@extundo.com>
10360
10361         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10362
10363 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10364
10365         * gnulib-tool (func_create_testdir): Omit the second check whether
10366         BUILT_SOURCES in nonempty.
10367
10368 2005-10-17  Simon Josefsson  <jas@extundo.com>
10369
10370         * tests/test-rijndael.c: New file.
10371
10372 2005-10-17  Simon Josefsson  <jas@extundo.com>
10373
10374         * modules/sha1: Depend on stdint instead of md5.
10375
10376         * modules/md5: Depend on stdint, remove uint32_t.
10377
10378 2005-10-17  Simon Josefsson  <jas@extundo.com>
10379
10380         * modules/gc-sha1-tests: New file.
10381
10382         * tests/test-gc-sha1.c: New file.
10383
10384 2005-10-17  Simon Josefsson  <jas@extundo.com>
10385
10386         * m4/md5.m4: Remove call to uint32_t.m4.
10387
10388 2005-10-17  Simon Josefsson  <jas@extundo.com>
10389
10390         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10391
10392         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10393         md5.h.
10394
10395         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10396
10397         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10398
10399 2005-10-17  Simon Josefsson  <jas@extundo.com>
10400
10401         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10402
10403 2005-10-17  Simon Josefsson  <jas@extundo.com>
10404
10405         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10406
10407 2005-10-17  Simon Josefsson  <jas@extundo.com>
10408
10409         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10410
10411         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10412
10413 2005-10-17  Bruno Haible  <bruno@clisp.org>
10414
10415         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10416         that it can also be used in a test.
10417
10418 2005-10-16  Bruno Haible  <bruno@clisp.org>
10419
10420         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10421         TESTS_ENVIRONMENT, so that individual tests can augment it.
10422
10423         * gnulib-tool (func_create_testdir): Use an intermediate target for
10424         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10425         macros, like $(ALLOCA_H), which cannot be passed through the command
10426         line.
10427
10428 2005-10-15  Simon Josefsson  <jas@extundo.com>
10429
10430         * modules/rijndael-tests: New file.
10431
10432         * modules/rijndael: New file.
10433
10434 2005-10-15  Simon Josefsson  <jas@extundo.com>
10435
10436         * m4/rijndael.m4: New file.
10437
10438 2005-10-15  Simon Josefsson  <jas@extundo.com>
10439
10440         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10441
10442         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10443
10444 2005-10-14  Simon Josefsson  <jas@extundo.com>
10445
10446         * tests/test-arcfour.c: New file.
10447
10448         * modules/arcfour, modules/arcfour-tests: New files.
10449
10450 2005-10-14  Simon Josefsson  <jas@extundo.com>
10451
10452         * m4/arcfour.m4: New file.
10453
10454 2005-10-14  Simon Josefsson  <jas@extundo.com>
10455
10456         * lib/arcfour.h, lib/arcfour.c: New files.
10457
10458 2005-10-14  Roland McGrath  <roland@redhat.com>
10459
10460         Import from libc.  [BZ #1331]
10461         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10462         macro argument.
10463         Reported by Matej Vela <vela@debian.org>.
10464
10465 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10466
10467         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10468         include <wchar.h>; no longer needed.
10469
10470 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10471
10472         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10473
10474 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10475         and  Ulrich Drepper  <drepper@redhat.com>
10476
10477         Import from libc.
10478         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10479         instead of inline stream orientation test and two separate
10480         function calls.  Pay no attention to USE_IN_LIBIO.
10481
10482 2005-10-13  Simon Josefsson  <jas@extundo.com>
10483
10484         * modules/gc-hmac-md5-tests: New file.
10485
10486         * tests/test-gc-hmac-sha1.c: New file.
10487
10488         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10489
10490         * modules/gc-hmac-md5-tests: New file.
10491
10492         * tests/test-gc-md5.c: New file.
10493
10494         * modules/gc-md5-tests: New file.
10495
10496 2005-10-13  Simon Josefsson  <jas@extundo.com>
10497
10498         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10499         Move memory allocation outside of loop.
10500
10501 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10502
10503         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10504         intermediate directory is in a read-only file system.  Problem
10505         reported by Eric Blake.
10506
10507 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10508
10509         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10510
10511 2005-10-12  Simon Josefsson  <jas@extundo.com>
10512
10513         * tests/test-hmac-sha1.c: New file.
10514
10515         * modules/hmac-sha1-tests: New file.
10516
10517         * modules/hmac-sha1: New file.
10518
10519 2005-10-12  Simon Josefsson  <jas@extundo.com>
10520
10521         * modules/gc-sha1: New file.
10522
10523 2005-10-12  Simon Josefsson  <jas@extundo.com>
10524
10525         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10526
10527         * tests/test-gc-pbkdf2-sha1.c: New file.
10528
10529 2005-10-12  Simon Josefsson  <jas@extundo.com>
10530
10531         * modules/gc-md5, modules/gc-hmac-md5: New files.
10532
10533         * modules/gc (Files): Remove md5, memxor and hmac files.
10534
10535 2005-10-12  Simon Josefsson  <jas@extundo.com>
10536
10537         * m4/gc-pbkdf2-sha1.m4: New file.
10538
10539         * m4/gc-hmac-sha1.m4: New file.
10540
10541         * m4/gc-sha1: New file.
10542
10543         * m4/hmac-sha1.m4: New file.
10544
10545 2005-10-12  Simon Josefsson  <jas@extundo.com>
10546
10547         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10548
10549         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10550
10551 2005-10-12  Simon Josefsson  <jas@extundo.com>
10552
10553         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10554         suggested by Bruno Haible <bruno@clisp.org>.
10555
10556 2005-10-12  Simon Josefsson  <jas@extundo.com>
10557
10558         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10559
10560 2005-10-12  Simon Josefsson  <jas@extundo.com>
10561
10562         * lib/gc-pbkdf2-sha1.c: New file.
10563
10564         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10565
10566 2005-10-12  Simon Josefsson  <jas@extundo.com>
10567
10568         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10569
10570         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10571
10572 2005-10-12  Simon Josefsson  <jas@extundo.com>
10573
10574         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10575         GC_USE_HMAC_MD5, respectively.
10576
10577         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10578         (gc_md5): Fix typo.
10579
10580         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10581
10582         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10583
10584         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10585
10586 2005-10-12  Bruno Haible  <bruno@clisp.org>
10587
10588         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10589         Reported by Stepan Kasal <kasal@ucw.cz>.
10590
10591 2005-10-11  Simon Josefsson  <jas@extundo.com>
10592
10593         * tests/test-crc.c: New file.
10594
10595         * modules/crc, modules/crc-tests: New files.
10596
10597 2005-10-11  Simon Josefsson  <jas@extundo.com>
10598
10599         * m4/crc.m4: New file.
10600
10601 2005-10-11  Simon Josefsson  <jas@extundo.com>
10602
10603         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10604
10605         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10606
10607         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10608
10609 2005-10-11  Simon Josefsson  <jas@extundo.com>
10610
10611         * lib/crc.h, lib/crc.c: New files.
10612
10613         * lib/gc.h (gc_hash_buffer): Add doc.
10614
10615 2005-10-11  Bruno Haible  <bruno@clisp.org>
10616
10617         * modules/c-strcasestr: New file.
10618         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10619
10620 2005-10-11  Bruno Haible  <bruno@clisp.org>
10621
10622         * modules/c-strcase: New file.
10623         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10624
10625 2005-10-11  Bruno Haible  <bruno@clisp.org>
10626
10627         * lib/strcasecmp.c: Include limits.h.
10628         (strcasecmp): Avoid integer overflow on exotic platforms.
10629         * lib/strncasecmp.c: Include limits.h.
10630         (strncasecmp): Avoid integer overflow on exotic platforms.
10631         Reported by Paul Eggert.
10632
10633 2005-10-11  Bruno Haible  <bruno@clisp.org>
10634
10635         * lib/c-strcasestr.h: New file, from GNU gettext.
10636         * lib/c-strcasestr.c: New file, from GNU gettext.
10637
10638 2005-10-11  Bruno Haible  <bruno@clisp.org>
10639
10640         * lib/c-strcase.h: New file, from GNU gettext.
10641         * lib/c-strcasecmp.c: New file, from GNU gettext.
10642         * lib/c-strncasecmp.c: New file, from GNU gettext.
10643
10644 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10645
10646         * modules/mempcpy (License): GPL -> LGPL.
10647         * modules/strchrnul (License): Likewise.
10648         * modules/sysexits (License): Likewise.
10649
10650 2005-10-08  Simon Josefsson  <jas@extundo.com>
10651
10652         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10653
10654 2005-10-07  Simon Josefsson  <jas@extundo.com>
10655
10656         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10657
10658 2005-10-06  Simon Josefsson  <jas@extundo.com>
10659
10660         * tests/test-hmac-md5.c: New file.
10661
10662         * modules/hmac-md5-tests: New file.
10663
10664         * modules/hmac-md5: New file.
10665
10666 2005-10-06  Simon Josefsson  <jas@extundo.com>
10667
10668         * m4/hmac-md5.m4: New file.
10669
10670         * m4/memxor.m4: Require gl_C_RESTRICT.
10671
10672 2005-10-06  Simon Josefsson  <jas@extundo.com>
10673
10674         * lib/memxor.c (memxor): Avoid casts and warnings.
10675
10676 2005-10-06  Simon Josefsson  <jas@extundo.com>
10677
10678         * lib/hmac-md5.c: New file.
10679
10680         * lib/hmac.h: New file.
10681
10682 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10683
10684         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10685         promotes to int, not unsigned int, to catch the AIX 5.3
10686         compiler bug.
10687
10688 2005-10-05  Simon Josefsson  <jas@extundo.com>
10689
10690         * modules/memxor: New file.
10691
10692         * modules/iconv (Files): Move config.rpath to havelib, it is used
10693         there.
10694
10695         * modules/havelib (Files): Add config.rpath.
10696
10697 2005-10-05  Simon Josefsson  <jas@extundo.com>
10698
10699         * m4/memxor.m4: New file.
10700
10701 2005-10-05  Simon Josefsson  <jas@extundo.com>
10702
10703         * lib/memxor.c (memxor): Fix compiler error.
10704
10705         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10706         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10707
10708         * lib/memxor.h, lib/memxor.c: New files.
10709
10710         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10711         we assume all systems have it, suggested by Jim Meyering
10712         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10713         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10714         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10715         same reasons.
10716
10717 2005-10-05  Simon Josefsson  <jas@extundo.com>
10718
10719         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10720
10721 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10722
10723         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10724         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10725         needed, since the source code now assumes these .h files.
10726
10727 2005-10-05  Derek Price  <derek@ximbiot.com>
10728
10729         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10730
10731 2005-10-05  Bruno Haible  <bruno@clisp.org>
10732
10733         * modules/stdint (License): Change to LGPL.
10734
10735 2005-10-04  Simon Josefsson  <jas@extundo.com>
10736
10737         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10738         D. Baushke" <mdb@gnu.org>.
10739
10740 2005-10-04  Bruno Haible  <bruno@clisp.org>
10741
10742         * lib/verify.h (verify_true): Provide alternative definition for C++.
10743
10744 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10745
10746         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10747         (SSIZE_MAX): New macro, if not already defined.
10748         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10749         than 2 GiB.
10750
10751 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10752
10753         Sync from coreutils.
10754         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10755         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10756         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10757         ULLONG_MAX doesn't work with 2.7.2.1.
10758
10759 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10760
10761         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10762         From Ben Pfaff.
10763
10764         * modules/exclude (Depends-on): Depend on verify.
10765         * modules/strtoimax (Depends-on): Likewise.
10766         * modules/utimecmp (Depends-on): Likewise.
10767
10768 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10769
10770         * lib/exclude.c: Include verify.h.
10771         (verify): Remove.  All callers changed to use verify.h's version.
10772         * lib/strtoimax.c: Likewise.
10773         * lib/utimecmp.c: Likewis.e
10774
10775         Sync from coreutils.
10776         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10777         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10778         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10779         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10780         bother returning ENOSYS if settimeofday or stime fails; just let
10781         them return whatever errno they want to return.
10782         * lib/utimens.c: Include unistd.h, for dup2.
10783         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10784         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10785
10786 2005-10-02  Jim Meyering  <jim@meyering.net>
10787
10788         Sync from coreutils.
10789         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10790         from glibc-2.2.5 that fails for read-only files.
10791
10792 2005-10-02  Jim Meyering  <jim@meyering.net>
10793
10794         Sync from coreutils.
10795         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10796         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10797         `#if HAVE_CONFIG_H'.
10798         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10799         Remove AT_FDCWD test.
10800         Do not consume the fd unless successful.
10801         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10802         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10803         block, so that we don't even try to compile it if settimeofday is
10804         available.  This works around a compilation failure on OSF1 V5.1,
10805         due to stime requiring a `long int*' while tv_sec is `int'.
10806
10807 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10808
10809         Sync from coreutils.
10810         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10811         against `yes', rather than just testing for nonempty.
10812
10813 2005-10-01  Simon Josefsson  <jas@extundo.com>
10814
10815         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10816         and Darwin.
10817
10818         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10819         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10820         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10821         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10822         Check if struct addrinfo is declared.
10823
10824 2005-10-01  Simon Josefsson  <jas@extundo.com>
10825
10826         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10827         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10828         AI_* and EAI_* definitions.  Protect function declarations.
10829
10830 2005-10-01  Jim Meyering  <jim@meyering.net>
10831
10832         Sync from coreutils.
10833
10834         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10835         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10836         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10837         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10838         in the inet and nsl libraries.  Required on Solaris 5.7.
10839
10840 2005-10-01  Jim Meyering  <jim@meyering.net>
10841
10842         Sync from coreutils.
10843         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10844         in the inet and nsl libraries.  Required on Solaris 5.7.
10845
10846 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10847
10848         * lib/getdelim.c (getdelim): Remove unused variables.
10849
10850 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10851
10852         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10853         so that the code works even with ancient cpp.  Portability problem
10854         with GCC 2.7.2.1 reported by Thomas M.Ott.
10855
10856 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10857
10858         * modules/regex (Depends-on): Add strcase.
10859
10860         * modules/gethostname (Licence): Change from GPL to LGPL, since
10861         gethostname.c is a trivial implementation of a standard library
10862         function.
10863         * modules/poll (License): Change from GPL to LGPL, since it's
10864         derived from LGPL code.
10865
10866 2005-09-27  Jim Meyering  <jim@meyering.net>
10867
10868         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10869         HAVE_CONFIG_H.
10870
10871         * lib/intprops.h (signed_type_or_expr__): Define.
10872         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10873         for unsigned types.
10874
10875 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10876
10877         * lib/verify.h (verify_expr): Remove, replacing with:
10878         (verify_true): New macro that returns true instead of void.
10879         (verify_type__): Remove.
10880         (verify): Use verify_true rather than verify_type__.
10881
10882 2005-09-26  Bruno Haible  <bruno@clisp.org>
10883
10884         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10885         is necessary.
10886         (lib_SOURCES): Remove mbchar.c.
10887         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10888         (Files): Add m4/mbrtowc.m4.
10889         * modules/mbiter: Likewise.
10890         * modules/mbuiter: Likewise.
10891
10892 2005-09-26  Bruno Haible  <bruno@clisp.org>
10893
10894         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10895         compile mbchar.c if they are not both present.
10896         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10897         * m4/mbiter.m4 (gl_MBITER): Likewise.
10898         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10899         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10900         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10901
10902 2005-09-25  Jim Meyering  <jim@meyering.net>
10903
10904         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10905         also uses socklen_t.
10906
10907 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10908
10909         * lib/utimens.c (ENOSYS): Define if not already defined.
10910         (futimens): Support having a null PATH if the file descriptor
10911         is nonnegative.
10912
10913         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10914         Remove.
10915         (__attribute): Define to empty unless GCC 3.1 or later.
10916         This works around a core dump on OpenBSD 3.4, which has GCC
10917         2.95.3, which dumps core when given __attribute__(()).  It also
10918         simplifies other tests, since we really don't want to bother with
10919         worrying about which ancient version of GCC supported what.
10920         Original problem reported by Yoann Vandoorselaere, with part of
10921         the fix suggested by Derek Price.
10922
10923 2005-09-24  Jim Meyering  <jim@meyering.net>
10924
10925         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10926         so we can once again use a positive bitfield width of 1 -- now we
10927         don't have to explain why we were using a bitfield width of 2.
10928
10929 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10930
10931         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10932         and similarly for the other external symbols.  Problem reported
10933         by James Gallager.
10934
10935         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10936         bug reported by Jim Meyering.
10937
10938         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10939         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10940         not needed, since socklen is a prerequisite module.
10941
10942 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10943
10944         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10945         Problem reported by Eric Blake.
10946         (getaddrinfo): Initialize se so that it's not garbage.
10947         Redo internal storage allocation so that it doesn't make unportable
10948         assumptions about alignment.
10949         Fix a memory leak.
10950
10951         * lib/utimens.c (futimens): Use futimesat if available.
10952         Prefer it to futimes since it doesn't have the futimes bug.
10953
10954         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
10955         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
10956         Instead, declare a function that returns a pointer to an array,
10957         and use verify_type__ to declare the size of the array.
10958         Problem and germ of a solution reported by Bruno Haible.
10959         (verify_type__): Use 2, not 1, for bitfield size, to avoid
10960         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
10961
10962 2005-09-23  Jim Meyering  <jim@meyering.net>
10963
10964         Sync from coreutils.
10965         Correct build failure (socklen_t not defined) on at least
10966         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
10967         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
10968
10969 2005-09-23  Jim Meyering  <jim@meyering.net>
10970
10971         * modules/getaddrinfo (Depends-on): Add socklen.
10972
10973 2005-09-23  Bruno Haible  <bruno@clisp.org>
10974
10975         * tests/test-verify.c: New file.
10976
10977 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10978
10979         Sync from coreutils.
10980
10981         * modules/argmatch (Depends-on): Add verify.
10982         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
10983         unistd-safer.
10984         * modules/save-cwd (Depends-on): Likewise.
10985
10986         * modules/openat (Files): Add lib/openat-die.c.
10987         (Depends-on): Remove error, exitfail.
10988         Add dirname.
10989
10990         * modules/verify: New file.
10991         * MODULES.html.sh (Diagnostics <assert.h>): New section,
10992         with "verify" module.
10993
10994 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
10995
10996         Sync from coreutils.
10997
10998         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
10999         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11000         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11001         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11002         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11003         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11004         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11005         Don't bother checking for string.h, stdlib.h, unistd.h.
11006         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11007         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11008         module's job.
11009         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11010         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11011
11012         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11013         (gl_GETDATE): Use it.
11014
11015         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11016
11017 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11018
11019         Sync from coreutils.
11020
11021         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11022         stat-time.h.
11023         * lib/argmatch.h: Include verify.h
11024         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11025         (ARGMATCH_ASSERT): Remove; unused.
11026         * lib/canonicalize.c: Assume STDC_HEADERS.
11027         * lib/exclude.c: Include "strcase.h".
11028         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11029         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11030         and stdio-safer.h.
11031         (getusershell): Call fopen, not fopen_safer.
11032         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11033         Do not include unistd-safer.h.
11034         (save_cwd): Don't call fd_safer; no longer needed
11035         now that we include fcntl--.h.
11036
11037         * lib/getdate.y (relative_time): New type.
11038         (RELATIVE_TIME_0): New constant.
11039         (parser_control): Use relative_time instead of doing it ourselves.
11040         (%union): Add new relative_time rel member.
11041         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11042         Now typeless.
11043         (relunit, relunit_snumber): Now of type rel.
11044         (zone, rel, relunit, get_date): Adjust to above changes.
11045
11046         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11047         Do not include unistd-safer.h.
11048         (getloadavg): Don't call fd_safer; no longer needed
11049         now that we include fcntl--.h.
11050
11051         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11052         (make_dir_parents): Treat ENOSYS like EEXIST.
11053
11054         Improve quality of diagnostics on restore_cwd failure.
11055         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11056         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11057         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11058         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11059         each time through the loop.  Do not diagnose restore_cwd failure;
11060         that is the caller's job (and perhaps the caller does not care).
11061
11062         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11063         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11064         If the file already exists but is not a directory, don't bother
11065         to try to make its parents.
11066         Close potential file descriptor leak if we can't chdir("/") (!).
11067         Don't always return true if chdir($PWD) fails; return true only
11068         if the requested action was done successfully (except for the
11069         chdir($PWD)).
11070         Don't log final directory unless we actually made it.
11071         Refactor to avoid duplicate code to fix up permissions.
11072         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11073
11074         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11075         to make it a bit faster and (I hope) clearer.
11076         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11077         Fix bug in formats like %2N.
11078
11079         * lib/verify.h: New file.
11080
11081 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11082
11083         Sync from coreutils.
11084         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11085
11086 2005-09-22  Jim Meyering  <jim@meyering.net>
11087
11088         Sync from coreutils.
11089
11090         * m4/lstat.m4 (gl_FUNC_LSTAT):
11091         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11092         Remove obsolete comment.
11093         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11094         * m4/xstrtod.m4: Likewise.
11095
11096         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11097
11098 2005-09-22  Jim Meyering  <jim@meyering.net>
11099
11100         Sync from coreutils.
11101
11102         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11103
11104         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11105         the .tm_year member, since otherwise gcc-4.0 would now warn about
11106         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11107
11108         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11109         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11110
11111         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11112         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11113         when run in a time zone for which daylight savings time is in effect
11114         for the starting date.
11115
11116         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11117         stop us from restricting permissions of just-created absolute-named
11118         directories.
11119         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11120         to restore initial working directory.
11121         * lib/mkdir-p.c (make_dir_parents): New parameter:
11122         different_working_dir, to tell caller if/when we change the working
11123         directory and are unable to return to the initial one.
11124         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11125         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11126         `return false'.  This fixes a bug introduced on 2004-07-30.
11127
11128         * lib/openat.c (fdopendir): Be sure to close the supplied
11129         file descriptor before returning.  This makes our replacement
11130         implementation a little closer to Solaris's, where fdopendir
11131         ties the file descriptor to the returned DIR* pointer.
11132         * lib/openat.c (unlinkat): New function.
11133         * lib/openat.h (unlinkat): Add prototype.
11134         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11135         (openat_restore_fail): Rename from openat_restore_die.
11136         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11137
11138         Provide an alternative to exiting immediately upon save_cwd or
11139         restore_cwd failure.  Now, an application can arrange e.g.,
11140         to perform a longjump in that case.
11141         * lib/openat.c: Include dirname.h.
11142         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11143         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11144         and openat_restore_die rather than calling error directly.
11145         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11146
11147         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11148         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11149         define.
11150
11151         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11152         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11153                             int utc, int nanoseconds);
11154         Background:
11155         date should not have to allocate a megabyte of virtual memory to
11156         handle a format argument like +%1048575T.  When implemented with
11157         strftime, it must allocate such a buffer, use strftime to fill it
11158         in, print it, then free it.
11159         With fprintftime, it simply prints everything and exits.
11160         With no need for memory allocation, that's one fewer way to fail.
11161         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11162         optional field width, not before, so we accept %9:z, not %:9z.
11163         (my_strftime): Be sure to use L_('x') for literals.
11164
11165         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11166         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11167         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11168         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11169         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11170         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11171         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11172         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11173         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11174         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11175         * lib/xgethostname.c, lib/xreadlink.c:
11176         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11177
11178         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11179         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11180         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11181         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11182         and don't include <sys/file.h>).
11183
11184 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11185
11186         Sync from coreutils.
11187
11188         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11189         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11190         [!LDAV_DONE]: Avoid unused variable warning.
11191
11192 2005-09-21  Bruno Haible  <bruno@clisp.org>
11193
11194         * lib/unicodeio.h (unicode_to_mb): New declaration.
11195
11196 2005-09-20  Derek Price  <derek@ximbiot.com>
11197
11198         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11199         getaddrinfo.h.
11200
11201 2005-09-20  Bruno Haible  <bruno@clisp.org>
11202
11203         * gnulib-tool: Remove trailing slashes from the values specified for
11204         --source-base, --m4-base, --tests-base, --aux-dir.
11205         Suggested by Simon Josefsson <jas@extundo.com>.
11206
11207 2005-09-20  Bruno Haible  <bruno@clisp.org>
11208
11209         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11210         func_modules_to_filelist, func_import, func_create_testdir): Make all
11211         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11212         change when gnulib-tool is invoked in a different locale.
11213
11214 2005-09-19  Simon Josefsson  <jas@extundo.com>
11215
11216         * m4/socklen.m4: Fix typo.
11217
11218 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11219
11220         Use a consistent style for including <config.h>.
11221         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11222         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11223         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11224         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11225         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11226         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11227         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11228         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11229         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11230         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11231         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11232         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11233         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11234         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11235         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11236         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11237         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11238         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11239         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11240         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11241         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11242         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11243         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11244         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11245         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11246         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11247         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11248         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11249         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11250         lib/xstrtoumax.c, lib/yesno.c:
11251         Standardize inclusion of config.h.
11252         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11253         lib/inttostr.h:  Removed inclusion of config.h from header files.
11254         * lib/inttostr.c:  Adjusted in-tree users.
11255         * lib/timespec.h: Remove superfluous warning to include config.h.
11256         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11257         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11258         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11259         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11260         config.h with HAVE_CONFIG_H.
11261
11262 2005-09-19  Jim Meyering  <jim@meyering.net>
11263
11264         * modules/pathmax (License): Change to LGPL.
11265
11266 2005-09-19  Derek Price  <derek@ximbiot.com>
11267
11268         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11269
11270 2005-09-19  Bruno Haible  <bruno@clisp.org>
11271
11272         * gnulib-tool (import): Provide default for --tests-base.
11273
11274 2005-09-19  Bruno Haible  <bruno@clisp.org>
11275
11276         * doc/quote.texi: New file, extracted from gnulib.texi.
11277         * doc/ctime.texi: New file, extracted from gnulib.texi.
11278         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11279         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11280         * doc/gnulib.texi: Include them.
11281
11282 2005-09-18  Bruno Haible  <bruno@clisp.org>
11283
11284         Portability fix.
11285         * gnulib-tool (func_readlink): New function.
11286         (func_ln_if_changed): Use it.
11287
11288 2005-09-18  Bruno Haible  <bruno@clisp.org>
11289
11290         * gnulib-tool: Support --with-tests also with --import.
11291         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11292         (func_import): Use variables $testsbase and $inctests. Emit a
11293         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11294         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11295         SUBDIRS += $testsdir.
11296         (func_create_testdir): Update.
11297
11298 2005-09-18  Bruno Haible  <bruno@clisp.org>
11299
11300         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11301         instead of $dry_run.
11302         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11303         (func_ln_if_changed): Don't handle dry-run here.
11304         (func_import): In dry-run mode, detect more precisely which actions
11305         would be performed, and don't use "...ing" verbs.
11306
11307 2005-09-18  Bruno Haible  <bruno@clisp.org>
11308
11309         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11310         (func_import): Use join on two temporary files instead of three nested
11311         loops, in order to determine which files are new or old.
11312
11313 2005-09-18  Bruno Haible  <bruno@clisp.org>
11314
11315         * gnulib-tool (func_import): Comment out code that spits out the
11316         new files with --dry-run.
11317
11318 2005-09-18  Bruno Haible  <bruno@clisp.org>
11319
11320         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11321
11322 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11323
11324         * lib/stat-time.h: New file.
11325         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11326         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11327         in a different way.
11328         (timespec_cmp): New function.
11329         * lib/utimecmp.c: Include stat-time.h.
11330         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11331         members exist, not on the obsolescent ST_MTIM_NSEC.
11332         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11333
11334 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11335
11336         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11337
11338 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11339
11340         * MODULES.html.sh (File system functions): Add stat-time.
11341         * modules/stat-time: New file.
11342         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11343         is now done in a different way, by the stat-time module.
11344         * modules/utimecmp (Depends-on): Add stat-time.
11345
11346 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11347
11348         * m4/st_mtim.m4: Remove.  Superseded by...
11349         * m4/stat-time.m4: New file.
11350         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11351         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11352
11353 2005-09-15  Derek Price  <derek@ximbiot.com>
11354
11355         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11356
11357 2005-09-15  Derek Price  <derek@ximbiot.com>
11358
11359         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11360         * lib/regex_internal.c: Ditto, using this...
11361         (__GNUC_PREREQ): ...new macro.
11362         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11363         using...
11364         (__GNUC_PREREQ): ...this new macro.
11365
11366         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11367
11368 2005-09-15  Derek Price  <derek@ximbiot.com>
11369             Paul Eggert  <eggert@cs.ucla.edu>
11370
11371         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11372         changes, consolidating in...
11373         * lib/regex_internal.h: ...this file.
11374
11375 2005-09-13  Jim Meyering  <jim@meyering.net>
11376
11377         * lib/canon-host.c: Filter through gnu indent and reword comments
11378         slightly.
11379         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11380
11381 2005-09-13  Derek Price  <derek@ximbiot.com>
11382
11383         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11384         failure.
11385         Reported by Jim Meyering  <jim@meyering.net>.
11386
11387 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11388
11389         * lib/base64.c: Typo.
11390         (base64_encode): Put b64str in initialized data section.
11391
11392 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11393
11394         Merge glibc and coreutils changes into gnulib, plus a few
11395         extra fixes.
11396         * lib/md5.c: Use #error rather than a string.
11397         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11398         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11399         (__attribute__): Define to empty for non recent-GCC.
11400         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11401         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11402         Renamed from their non-__ counterparts, with new macros replacing
11403         them if not _LIBC.  Add __THROW attribute.
11404         (rol): Remove.
11405         (struct md5_ctx): Align buffer if using GCC.
11406         * lib/sha1.h (struct sha1_ctx): Likewise.
11407         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11408         The old name was backwards.
11409         (NOTSWAP): Remove; not used.
11410         (rol): New macro, moved here from md5.h.
11411         (sha1_process_block): Remove a FIXME that doesn't make sense.
11412
11413 2005-09-12  Derek Price  <derek@ximbiot.com>
11414
11415         Return usable errors from canon-host.
11416         * lib/canon-host.h: New file.
11417         * lib/canon-host.c (canon_host): Wrap...
11418         (canon_host_r): ...this new function, which now relies exclusively on
11419         getaddrinfo.
11420         (ch_strerror): New function.
11421         (last_cherror): New global.
11422         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11423         interface.
11424         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11425         void *.
11426         (freeaddrinfo): Free ai->ai_canonname when set.
11427
11428 2005-09-12  Derek Price  <derek@ximbiot.com>
11429
11430         Make canon-host require getaddrinfo.
11431         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11432         AC_LIBSOURCE canon-host.h.  Call...
11433         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11434         gl_GETADDRINFO.
11435         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11436
11437 2005-09-12  Derek Price  <derek@ximbiot.com>
11438
11439         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11440         LGPL.
11441         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11442
11443 2005-09-12  Derek Price  <derek@ximbiot.com>
11444
11445         * lib/gai_strerror.c: Include config.h when available.  Include
11446         getaddrinfo.h before other headers to test interface.
11447         Reported by Larry Jones <lawrence.jones@ugs.com>.
11448
11449 2005-09-12  Derek Price  <derek@ximbiot.com>
11450             Paul Eggert  <eggert@cs.ucla.edu>
11451
11452         * modules/glob (Files): Add glob-libc.h.
11453
11454 2005-09-12  Derek Price  <derek@ximbiot.com>
11455             Paul Eggert  <eggert@cs.ucla.edu>
11456
11457         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11458         glob_.h, glob-libc.h.
11459         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11460
11461 2005-09-12  Derek Price  <derek@ximbiot.com>
11462             Paul Eggert  <eggert@cs.ucla.edu>
11463
11464         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11465         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11466         protecting things that should be done only in gnulib contexts.
11467         * lib/glob_.h: New file, containing only the glob things needed for
11468         gnulib.
11469         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11470         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11471         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11472         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11473         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11474         and to respect the namespace rules better.
11475
11476 2005-09-08  Simon Josefsson  <jas@extundo.com>
11477
11478         * modules/socklen: New file.
11479
11480 2005-09-08  Simon Josefsson  <jas@extundo.com>
11481
11482         * m4/socklen.m4: New file.
11483
11484 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11485
11486         * modules/utimens (Files): Add m4/utimbuf.m4, since
11487         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11488         Reported by Sergey Poznyakoff.
11489
11490 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11491
11492         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11493         definitions, since that's the preferred style in glibc.
11494         Fix a minor spacing issue, and update copyright notice to match
11495         glibc's.
11496
11497 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11498
11499         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11500
11501 2005-09-06  Simon Josefsson  <jas@extundo.com>
11502
11503         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11504         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11505
11506 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11507
11508         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11509         warning.
11510
11511 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11512
11513         * config/srclist.txt: Add glibc bug 1302.
11514
11515 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11516
11517         Change bitset word type from unsigned int to unsigned long int,
11518         as this has better performance on typical 64-bit hosts.
11519         Port bitset code to hosts with unusual word sizes.
11520         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11521         (build_collating_symbol):
11522         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11523         argument is a bitset.  This is merely a style issue, but it makes
11524         it clearer that an entire array is expected.
11525         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11526         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11527         Port to the case where bitset_word is not the same as unsigned int.
11528         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11529         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11530         Likewise.
11531         * lib/regexec.c (check_dst_limits_calc_pos_1,
11532         check_subexp_matching_top):
11533         (build_trtable, group_nodes_into_DFAstates):
11534         Likewise.
11535         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11536         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11537         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11538         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11539         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11540         * lib/regcomp.c (optimize_subexps, lower_subexp):
11541         Work even if bitset_word has holes in its bitwise representation.
11542         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11543         * lib/regexec.c (check_dst_limits_calc_pos_1,
11544         check_subexp_matching_top):
11545         Likewise.
11546         * lib/regex_internal.c (re_string_reconstruct):
11547         Don't assume UCHAR_MAX == 255.
11548         * lib/regex_internal.h (bitset_set_all): Likewise.
11549         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11550         All uses changed.
11551         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11552         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11553         All uses changed.
11554         (BITSET_WORD_MAX): New macro.
11555         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11556         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11557         (bitset_empty, bitset_copy):
11558         Prefer sizeof (bitset) to multiplying it out ourselves.
11559         (bitset_not_merge): Remove; unused.
11560         (bitset_contain): Return bool, not unsigned int with one bit on.
11561         All callers changed.
11562         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11563         alignment than re_node_set; do this by defining a new internal
11564         type struct dests_alloc and using it to allocate memory.
11565
11566 2005-09-05  Bruno Haible  <bruno@clisp.org>
11567
11568         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11569         links.
11570
11571 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11572
11573         * modules/size_max (Makefile.am): Add size_max.h
11574
11575 2005-09-04  Derek Price  <derek@ximbiot.com>
11576
11577         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11578
11579 2005-09-03  Simon Josefsson  <jas@extundo.com>
11580
11581         * gnulib-tool: Fix typo.
11582
11583 2005-09-03  Simon Josefsson  <jas@extundo.com>
11584
11585         * config/srclist.txt: Add glibc bug 1293.
11586
11587 2005-09-03  Derek Price  <derek@ximbiot.com>
11588
11589         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11590         From Larry Jones <lawrence.jones@ugs.com>.
11591
11592 2005-09-02  Simon Josefsson  <jas@extundo.com>
11593
11594         * modules/socklen: New file.
11595
11596 2005-09-02  Simon Josefsson  <jas@extundo.com>
11597
11598         * modules/havelib: New module.
11599
11600         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11601         Use havelib.
11602
11603 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11604
11605         Check for arithmetic overflow when calculating sizes, to prevent
11606         some buffer-overflow issues.  These patches are conservative, in the
11607         sense that when I couldn't determine whether an overflow was possible,
11608         I inserted a run-time check.
11609         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11610         macros.
11611         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11612         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11613         (re_xnrealloc, re_x2nrealloc): New inline functions.
11614         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11615         parse_bracket_exp):
11616         (build_equiv_class, build_charclass): Check for arithmetic overflow
11617         in size expression calculations.
11618         * lib/regex_internal.c (re_string_realloc_buffers):
11619         (build_wcs_upper_buffer, re_node_set_add_intersect):
11620         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11621         (re_dfa_add_node, register_state): Likewise.
11622         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11623         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11624         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11625         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11626
11627 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11628
11629         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11630         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11631
11632 2005-09-02  Bruno Haible  <bruno@clisp.org>
11633
11634         Support for lib vs. lib64 distinction on biarch platforms.
11635         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11636         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11637         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11638
11639 2005-09-02  Bruno Haible  <bruno@clisp.org>
11640
11641         * gnulib-tool (import): In the other first-use case, provide defaults
11642         as well.
11643
11644 2005-09-02  Bruno Haible  <bruno@clisp.org>
11645
11646         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11647         patches not yet found in the latest gettext release.
11648
11649 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11650
11651         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11652         to avoid a collision with bits/local_lim.h in glibc.
11653         All uses changed.  Problem reported by Dmitry V. Levin in
11654         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11655
11656         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11657         bugs in int versus size_t comparisons.
11658         (re_string_context_at): Fix bug where the code assumed that
11659         Idx is signed.
11660
11661         Use bool where appropriate.
11662         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11663         All callers changed.
11664         (calc_eclosure_iter): Likewise, for ROOT arg.
11665         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11666         (build_charclass_op): Likewise, for NON_MATCH arg.
11667         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11668         (re_string_construct_common): Likewise, for ICASE arg.
11669         * lib/regexec.c (re_search_2_stub, re_search_stub):
11670         Likewise, for RET_LEN arg.
11671         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11672         (set_regs): Likewise, for FL_BACKTRACK arg.
11673         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11674         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11675         (calc_eclosure_iter, parse_bracket_exp):
11676         Use bool for internal variables that are booleans.
11677         * lib/regexec.c (re_search_internal, check_matching,
11678         proceed_next_node):
11679         (set_regs, build_sifted_states, sift_states_bkref):
11680         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11681         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11682         (find_collation_sequence_value):
11683         Likewise.
11684         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11685         (re_node_set_compare):
11686         Return bool, not int. All callers changed.
11687         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11688         (build_trtable, check_node_accept): Likewise.
11689         * lib/regex_internal.h: Include stdbool.h.
11690
11691         Fix bugs uncovered when converting to bool.
11692         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11693         failure instead of charging ahead blindly.
11694         * lib/regex_internal.c (register_state): Likewise.
11695         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11696         for freeing internal storage.
11697         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11698         bitset pieces used as boolean, to avoid undefined behavior
11699         on hosts that do int overflow checking.
11700
11701 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11702
11703         * config/srclist.txt: Add glibc bugs 1285-1287.
11704
11705 2005-09-01  Jim Meyering  <jim@meyering.net>
11706
11707         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11708         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11709         Require gl_STAT_MACROS, too.
11710
11711 2005-09-01  Bruno Haible  <bruno@clisp.org>
11712
11713         * gnulib-tool (import): In the first-use case, provide defaults.
11714
11715 2005-09-01  Bruno Haible  <bruno@clisp.org>
11716
11717         * gnulib-tool (func_import): Remove the .tmp files.
11718
11719 2005-09-01  Bruno Haible  <bruno@clisp.org>
11720
11721         * gnulib-tool (func_import): Fix handling of symbolic links.
11722
11723 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11724
11725         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11726         old glibc regex code mishandles strings longer than 2**31 bytes.
11727         This patch fixes this when the regex code is used in gnulib
11728         (i.e., outside glibc).
11729
11730         This patch should not affect the use of the regex code inside
11731         glibc.  No doubt this problem also needs to be handled for glibc
11732         as well, but the result will be an incompatible change to the
11733         glibc ABI, and the old ABI will have to be supported too.  That
11734         can be the the subject for another patch.
11735
11736         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11737         governing whether the rest of this patch is active.  By default,
11738         the macro is disabled and the patch has no effect.
11739         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11740         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11741         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11742         (re_match_2, re_set_registers): Use the new types.
11743         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11744         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11745         New macros.
11746         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11747         (re_string_context_at, bin_tree_t, re_dfastate_t):
11748         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11749         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11750         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11751         (re_string_char_size_at, re_string_wchar_at):
11752         (re_string_elem_size_at):
11753         Use the new types and macros to port to 64-bit hosts.
11754         Use unsigned types for internal values, so that the code
11755         mostly works even for arrays larger than SSIZE_MAX.
11756         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11757         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11758         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11759         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11760         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11761         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11762         (calc_inveclosure, parse_dup_op, build_range_exp):
11763         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11764         (fetch_number, create_token_tree, mark_opt_subexp):
11765         Likewise.
11766         * lib/regex_internal.c (re_string_construct_common,
11767         create_ci_newstate):
11768         (create_cd_newstate, re_string_allocate, re_string_construct):
11769         (re_string_realloc_buffers, build_wcs_upper_buffer):
11770         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11771         (re_string_reconstruct, re_string_peek_byte_case):
11772         (re_string_fetch_byte_case, re_string_context_at):
11773         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11774         (re_node_set_init_copy, re_node_set_add_intersect):
11775         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11776         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11777         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11778         (re_acquire_state, re_acquire_state_context, register_state):
11779         Likewise.
11780         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11781         search_cur_bkref_entry):
11782         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11783         (re_search_internal, re_search_2_stub, re_search_stub)
11784         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11785         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11786         (update_cur_sifted_state, check_dst_limits):
11787         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11788         (check_subexp_limits, sift_states_bkref, merge_state_array):
11789         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11790         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11791         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11792         (expand_bkref_cache, check_node_accept_bytes):
11793         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11794         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11795         (acquire_init_state_context, check_halt_node_context):
11796         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11797         (sift_states_backward, clean_state_log_if_needed):
11798         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11799         (find_recover_state, transit_state_sb, transit_state_mb):
11800         (transit_state_bkref, build_trtable, match_ctx_clean):
11801         Likewise.
11802         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11803         to work around an assumption that REG_MISSING is negative.
11804
11805         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11806         (seek_collating_symbol_entry) [defined _LIBC]:
11807         (lookup_collation_sequence_value) [defined _LIBC]:
11808         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11809         Use prototypes rather than old-style function definitions.
11810         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11811         (transit_state_sb) [0]:
11812         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11813
11814         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11815         rm_eo.
11816
11817         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11818         (optimize_subexps, lower_subexp):
11819         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11820         since the signed shift might overflow.  Use 1u<<31 instead.
11821         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11822         Likewise.
11823         * lib/regexec.c (check_dst_limits_calc_pos_1,
11824         check_subexp_matching_top): Likewise.
11825
11826         * lib/regcomp.c (optimize_subexps, lower_subexp):
11827         Use CHAR_BIT rather than 8, for clarity.
11828         * lib/regexec.c (check_dst_limits_calc_pos_1):
11829         (check_subexp_matching_top): Likewise.
11830         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11831         have to worry about portability issues when shifting it left.
11832         Remove no-longer-needed test for table_size > 0.
11833         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11834         in a word, as the resulting behavior is undefined.
11835         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11836         in one case, a <= should have been an <, and in another case the
11837         whole test was missing.
11838         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11839         the standard name CHAR_BIT.
11840         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11841         this is not true on one's complement and signed-magnitude hosts.
11842
11843         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11844         next_last_offset.
11845         (struct re_dfa_t): Remove unused member states_alloc.
11846         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11847
11848 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11849
11850         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11851         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11852         and large-file glibc and in 32-bit large-file Solaris.
11853
11854 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11855
11856         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11857         lengths fit in regoff_t; this isn't true if regoff_t is the same
11858         width as size_t.
11859         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11860         (= START + RANGE) instead of RANGE.  This avoids overflow
11861         problems when regoff_t is the same width as size_t.
11862         All callers changed.
11863         (re_search_2_stub): Check for overflow when adding the
11864         sizes of the two strings.
11865         (re_search_stub): Check for overflow when adding START
11866         to RANGE; if it occurs, substitute the extreme value.
11867
11868 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11869
11870         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11871
11872 2005-08-31  Jim Meyering  <jim@meyering.net>
11873
11874         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11875         a pointer-to-const.
11876         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11877         (register_state): Likewise.
11878         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11879         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11880         (group_nodes_into_DFAstates): Likewise.
11881
11882 2005-08-31  Jim Meyering  <jim@meyering.net>
11883
11884         * check-module: Add a FIXME comment.
11885
11886 2005-08-31  Eric Blake  <ebb9@byu.net>
11887
11888         * modules/unistd-safer (Files): Add unistd--.h.
11889         * modules/stdio-safer (Files): Add stdio--.h.
11890
11891 2005-08-31  Derek Price  <derek@ximbiot.com>
11892
11893         * lib/getdelim.c (getdelim): Return EOF on EOF.
11894         Reported by Larry Jones <lawrence.jones@ugs.com>.
11895
11896 2005-08-31  Bruno Haible  <bruno@clisp.org>
11897
11898         Avoid unnecessary diffs in the generated lib/Makefile.am.
11899         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11900         the generated files.
11901         (func_import): Don't set cmd.
11902
11903 2005-08-31  Bruno Haible  <bruno@clisp.org>
11904
11905         * lib/strstr.c: Include <stddef.h>, for NULL.
11906         * lib/strcasestr.c: Likewise.
11907         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11908
11909 2005-08-31  Bruno Haible  <bruno@clisp.org>
11910
11911         * gnulib-tool: New option --macro-prefix.
11912         (func_import): Use macro_prefix.
11913         (import): Handle option --macro-prefix.
11914
11915 2005-08-31  Bruno Haible  <bruno@clisp.org>
11916
11917         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11918         Also use new variables cached_lgpl, cached_libtool.
11919
11920 2005-08-31  Bruno Haible  <bruno@clisp.org>
11921
11922         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11923         always instantiating them.
11924
11925 2005-08-31  Bruno Haible  <bruno@clisp.org>
11926
11927         * gnulib-tool (func_import): Read the previous cached settings
11928         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11929         earlier added by gnulib but are now dropped. Warn when a gnulib file
11930         overwrites a non-gnulib file.
11931
11932 2005-08-31  Bruno Haible  <bruno@clisp.org>
11933
11934         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11935         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11936         projects that don't keep autogenerated files in CVS. Put into
11937         actioncmd only the specified modules, not the transitive closure.
11938
11939 2005-08-31  Bruno Haible  <bruno@clisp.org>
11940
11941         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11942         Create directories that shall be filled.
11943         (import): Don't look for gl_* macros in configure.ac. Recurse across
11944         all directories containing a gnulib-cache.m4 files, if meaningful.
11945
11946 2005-08-31  Bruno Haible  <bruno@clisp.org>
11947
11948         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
11949         (import): Set seen_libtool when we see gl_LIBTOOL.
11950
11951 2005-08-31  Bruno Haible  <bruno@clisp.org>
11952
11953         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
11954         declaration macro definitions from generated gnulib.m4.
11955
11956 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
11957
11958         * lib/iconvme.h: Add prototype for iconv_alloc.
11959
11960 2005-08-29  Simon Josefsson  <jas@extundo.com>
11961
11962         * lib/iconvme.c: Fix errno.
11963
11964 2005-08-29  Bruno Haible  <bruno@clisp.org>
11965
11966         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
11967         that it works when the directory contains spaces.
11968
11969 2005-08-29  Bruno Haible  <bruno@clisp.org>
11970
11971         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
11972
11973 2005-08-29  Bruno Haible  <bruno@clisp.org>
11974
11975         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
11976         Emit more advice.
11977
11978 2005-08-29  Bruno Haible  <bruno@clisp.org>
11979         and Stepan Kasal  <kasal@ucw.cz>
11980
11981         * check-module: If more parameters are given, check each of them
11982         separately; add more exceptions, as noted by Jim Meyering.
11983         (check_module): New procedure.
11984         (%exempt_header): Now contains all exceptions.
11985
11986 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
11987
11988         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
11989
11990 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
11991
11992         * lib/iconvme.c: Split iconv_string into iconv_alloc.
11993
11994 2005-08-28  Bruno Haible  <bruno@clisp.org>
11995
11996         * m4/gnulib-tool.m4: New file.
11997
11998 2005-08-27  Jim Meyering  <jim@meyering.net>
11999
12000         * modules/unistd-safer (Files): Add pipe-safer.c.
12001         * modules/fcntl-safer (Files): Add creat-safer.c.
12002
12003 2005-08-27  Jim Meyering  <jim@meyering.net>
12004
12005         * m4/stdlib-safer.m4: New file.  From coreutils.
12006         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12007         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12008         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12009         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12010         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12011
12012 2005-08-27  Jim Meyering  <jim@meyering.net>
12013
12014         * lib/fopen-safer.c: Merge minor changes from coreutils.
12015         * lib/dup-safer.c: Likewise.
12016         * lib/fd-safer.c: Likewise.
12017
12018         Merge from coreutils.
12019         * lib/stdio--.h: New file.
12020         * lib/stdlib--.h: New file.
12021         * lib/mkstemp-safer.c: New file.
12022
12023         GNU tar needs these.
12024         * lib/pipe-safer.c: New file.
12025         * lib/creat-safer.c: New file.
12026         * lib/fcntl--.h (creat): Define to creat_safer.
12027         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12028         * lib/unistd--.h (pipe): Define to pipe_safer.
12029         * lib/unistd-safer.h: Declare pipe_safer.
12030
12031 2005-08-26  Simon Josefsson  <jas@extundo.com>
12032
12033         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12034         Haible <bruno@clisp.org>.
12035
12036 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12037
12038         * lib/regex_internal.h: Remove all references to
12039         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12040         or better.
12041         (bitset_not, bitset_merge, bitset_not_merge):
12042         (bitset_mask, re_string_allocate, re_string_construct):
12043         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12044         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12045         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12046         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12047         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12048         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12049         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12050         (re_acquire_state_context):
12051         Remove unnecessary forward decls.
12052         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12053         Put __attribute at function definition,
12054         now that the function decl has been removed.
12055         * lib/regex_internal.c (re_string_peek_byte_case):
12056         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12057         Likewise.
12058
12059 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12060
12061         * m4/regex.m4: Add AC_PREREQ(2.50).
12062         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12063
12064 2005-08-25  Simon Josefsson  <jas@extundo.com>
12065
12066         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12067         __fsetlocking.
12068
12069 2005-08-25  Simon Josefsson  <jas@extundo.com>
12070
12071         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12072         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12073         GLIBC specific code.
12074
12075 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12076
12077         Make regex safe for g++.  This fixes one real bug (an "err"
12078         that should have been "*err").  g++ problem reported by
12079         Sam Steingold.
12080         * lib/regex_internal.h (re_calloc): New macro, consistent with
12081         re_malloc etc.  All callers of calloc changed to use re_calloc.
12082         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12083         not int.  All callers changed.
12084         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12085         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12086         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12087         (find_recover_state): Change "err" to "*err"; this fixes what
12088         appears to be a real bug.
12089         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12090         versus int.
12091
12092 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12093
12094         * modules/regex (Depends-on): Add malloc, since the code
12095         assumes that !malloc(0) means failure.
12096
12097 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12098
12099         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12100
12101         alloca modernization/simplification for regex.
12102         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12103         needs to be at the start of the file, and can be moved into
12104         regex_internal.h and simplified.
12105         * lib/regex_internal.h: Include <alloca.h>.
12106         (__libc_use_alloca) [!defined _LIBC]: New macro.
12107         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12108         now works outside glibc.
12109
12110 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12111
12112         * config/srclist.txt: Add glibc bugs 1241, 1245.
12113
12114 2005-08-25  Jim Meyering  <jim@meyering.net>
12115
12116         * lib/open-safer.c: Include <config.h>.
12117         Otherwise, we'd lose LARGEFILE support in any file using
12118         e.g. "fcntl--.h"
12119
12120 2005-08-25  Bruno Haible  <bruno@clisp.org>
12121
12122         * m4/minmax.m4: Require autoconf 2.52.
12123         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12124         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12125         alternatives of translit over the alphabet.
12126         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12127
12128 2005-08-24  Simon Josefsson  <jas@extundo.com>
12129
12130         * tests/test-getpass.c: New file.
12131
12132 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12133
12134         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12135         for GNU regex features.
12136
12137 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12138
12139         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12140         * lib/regex.h (regerror): Likewise.
12141
12142         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12143         requires this.  (The code never needed it.)
12144
12145         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12146         All uses of recently-renamed identifiers changed to use the new,
12147         POSIX-compliant names.  The code will build and run just fine
12148         without these changes, but it's better to eat our own dog food
12149         and use the standard-conforming names.
12150
12151         * lib/regex.h: Fix a multitude of POSIX name space violations.
12152         These changes have an effect only for programs that define
12153         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12154         do not change anything for programs compiled in the normal way.
12155         Also, there is no effect on the ABI.
12156
12157         (_REGEX_SOURCE): New macro.
12158         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12159         defined and _GNU_SOURCE is not; this fixes a name space violation.
12160
12161         Rename the following macros to obey POSIX requirements.
12162         The old names are still visible as macros if _REGEX_SOURCE is defined.
12163         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12164         RE_BACKSLASH_ESCAPE_IN_LISTS.
12165         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12166         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12167         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12168         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12169         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12170         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12171         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12172         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12173         (REG_INTERVALS): renamed from RE_INTERVALS.
12174         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12175         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12176         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12177         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12178         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12179         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12180         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12181         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12182         RE_UNMATCHED_RIGHT_PAREN_ORD.
12183         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12184         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12185         (REG_DEBUG): renamed from RE_DEBUG.
12186         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12187         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12188         unusual, since we can't clash with the POSIX REG_ICASE.
12189         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12190         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12191         (REG_NO_SUB): renamed from RE_NO_SUB.
12192         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12193         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12194         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12195         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12196         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12197         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12198         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12199         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12200         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12201         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12202         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12203         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12204         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12205         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12206         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12207         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12208         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12209         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12210         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12211         (REG_FIXED): Renamed from REGS_FIXED.
12212         (REG_NREGS): Renamed from RE_NREGS.
12213
12214         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12215         of other REG_* macros, since POSIX says the user is allowed to
12216         #undef these macros selectively.
12217
12218         (reg_errcode_t): Update comment stating what other tables need
12219         to be consistent.
12220
12221         Rename the following enum values to obey POSIX requirements.
12222         The old names are still visible as macros.
12223         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12224         is not defined, since GNU is supposed to be a superset of POSIX as
12225         much as possible, and since we want reg_errcode_t to be a signed
12226         type for implementation consistency.
12227         (_REG_NOERROR): Renamed from REG_NOERROR.
12228         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12229         (_REG_BADPAT): Renamed from REG_BADPAT.
12230         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12231         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12232         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12233         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12234         (_REG_EBRACK): Renamed from REG_EBRACK.
12235         (_REG_EPAREN): Renamed from REG_EPAREN.
12236         (_REG_EBRACE): Renamed from REG_EBRACE.
12237         (_REG_BADBR): Renamed from REG_BADBR.
12238         (_REG_ERANGE): Renamed from REG_ERANGE.
12239         (_REG_ESPACE): Renamed from REG_ESPACE.
12240         (_REG_BADRPT): Renamed from REG_BADRPT.
12241         (_REG_EEND): Renamed from REG_EEND.
12242         (_REG_ESIZE): Renamed from REG_ESIZE.
12243         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12244         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12245         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12246         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12247         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12248
12249         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12250         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12251         changed.  But support the old name if the new one is not defined
12252         and if _REGEX_SOURCE.
12253
12254         Change the following member names in struct re_pattern_buffer.
12255         The old names are still supported if !_REGEX_SOURCE.
12256         The new names are always supported, regardless of _REGEX_SOURCE.
12257         (re_buffer): Renamed from buffer.
12258         (re_allocated): Renamed from allocated.
12259         (re_used): Renamed from used.
12260         (re_syntax): Renamed from syntax.
12261         (re_fastmap): Renamed from fastmap.
12262         (re_translate): Renamed from translate.
12263         (re_can_be_null): Renamed from can_be_null.
12264         (re_regs_allocated): Renamed from regs_allocated.
12265         (re_fastmap_accurate): Renamed from fastmap_accurate.
12266         (re_no_sub): Renamed from no_sub.
12267         (re_not_bol): Renamed from not_bol.
12268         (re_not_eol): Renamed from not_eol.
12269         (re_newline_anchor): Renamed from newline_anchor.
12270
12271         Change the following member names in struct re_registers.
12272         The old names are still supported if !_REGEX_SOURCE.
12273         The new names are always supported, regardless of _REGEX_SOURCE.
12274         (rm_num_regs): Renamed from num_regs.
12275         (rm_start): Renamed from start.
12276         (rm_end): Renamed from end.
12277
12278         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12279         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12280         Prepend __ to parameter names.
12281
12282         Undo yesterday's changes.
12283
12284 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12285
12286         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12287         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12288         lib/regex.c.
12289
12290 2005-08-24  Jim Meyering  <jim@meyering.net>
12291
12292         Sync from coreutils.
12293         * m4/fcntl-safer.m4: New file.
12294
12295         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12296         and object files for this module.
12297
12298 2005-08-24  Jim Meyering  <jim@meyering.net>
12299
12300         Sync from coreutils.
12301         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12302
12303 2005-08-24  Jim Meyering  <jim@meyering.net>
12304
12305         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12306         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12307
12308 2005-08-24  Jim Meyering  <jim@meyering.net>
12309
12310         * modules/fcntl-safer: New module.
12311         * modules/fts (Depends-on): Add fcntl-safer.
12312         * MODULES.html.sh (File descriptor based Input/Output):
12313         Add fcntl-safer.
12314
12315 2005-08-24  Bruno Haible  <bruno@clisp.org>
12316
12317         Support for unit test modules.
12318         * modules/README: Mention tests modules.
12319         * modules/TEMPLATE-TESTS: New file.
12320         * gnulib-tool: New options --extract-tests-module, --with-tests and
12321         --tests-base (unused for the moment).
12322         (testsbase, inctests): New variables.
12323         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12324         (func_verify_module): Exclude TEMPLATE-TESTS.
12325         (func_verify_nontests_module, func_verify_tests_module): New functions.
12326         (func_get_dependencies): Add implicit dependency for tests modules.
12327         (func_get_tests_module): New function.
12328         (func_modules_transitive_closure): When --with-tests was specified,
12329         include the unit tests as well, unless explicitly avoided.
12330         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12331         (func_emit_tests_Makefile_am): New function.
12332         (func_create_testdir): When --with-tests was specified, emit a
12333         tests/ directory.
12334         * MODULES.html.sh (Future developments): Update.
12335
12336 2005-08-24  Bruno Haible  <bruno@clisp.org>
12337
12338         * modules/tls-tests: New file.
12339         * tests/test-tls.c: New file, from GNU gettext.
12340
12341 2005-08-24  Bruno Haible  <bruno@clisp.org>
12342
12343         * modules/lock-tests: New file.
12344         * tests/test-lock.c: New file, from GNU gettext.
12345
12346 2005-08-24  Bruno Haible  <bruno@clisp.org>
12347
12348         * lib/lock.h: Add multiple inclusion guard.
12349         * lib/tls.h: Add multiple inclusion guard.
12350
12351 2005-08-24  Bruno Haible  <bruno@clisp.org>
12352
12353         * gnulib-tool: Add support for the --aux-dir option to
12354         --create-testdir, --create-megatestdir, --test, --megatest.
12355         (func_create_testdir, func_create_megatestdir): Optionally emit a
12356         AC_CONFIG_AUX_DIR directive.
12357         (create-testdir, create-megatestdir, test, megatest): Provide a
12358         default value for $auxdir.
12359
12360 2005-08-24  Bruno Haible  <bruno@clisp.org>
12361
12362         * gnulib-tool (import): Use compound statement instead of subshell
12363         where possible.
12364
12365 2005-08-24  Bruno Haible  <bruno@clisp.org>
12366
12367         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12368
12369 2005-08-24  Bruno Haible  <bruno@clisp.org>
12370
12371         * gnulib-tool (func_version): Update.
12372
12373 2005-08-24  Bruno Haible  <bruno@clisp.org>
12374
12375         * gnulib-tool (func_import, func_create_testdir,
12376         func_create_megatestdir): Quote all autoconf macro arguments.
12377
12378 2005-08-24  Bruno Haible  <bruno@clisp.org>
12379
12380         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12381         option --force, because --force causes the aclocal.m4 of each
12382         subdirectory to be newer than the corresponding config.h.in.
12383
12384 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12385
12386         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12387         All contents moved to gl_REGEX.
12388         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12389         assume that it does.
12390
12391 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12392
12393         * lib/regex.h (REG_NOSYS)
12394         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12395         Define, since POSIX requires it as of 2001.
12396         (_REG_ENOSYS)
12397         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12398         New private symbol, used to keep the enum signed in all cases.
12399         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12400         Youngman in
12401         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12402
12403         * lib/regex_internal.c (re_string_skip_chars, register_state):
12404         (calc_state_hash):
12405         Remove forward decls; no longer needed now that we use prototypes.
12406         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12407         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12408         (clean_state_log_if_needed): Likewise.
12409
12410 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12411
12412         * config/srclist.txt: Add glibc bugs 1231-1233.
12413
12414 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12415
12416         Fix problems reported by Sam Steingold in
12417         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12418         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12419         assumed that reg_errcode_t is a signed type, which is not
12420         necessarily true if _XOPEN_SOURCE is not defined.
12421         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12422         since some compilers warn about it otherwise.
12423
12424 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12425
12426         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12427         (init_word_char, create_initial_state, duplicate_node_closure):
12428         (fetch_token, peek_token_bracket, build_range_exp):
12429         (build_collating_symbol): Remove forward decls; no longer needed
12430         now that we use prototypes.
12431
12432         * lib/regcomp.c:
12433         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12434         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12435         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12436         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12437         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12438         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12439         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12440         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12441         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12442         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12443         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12444         (build_charclass, build_charclass_op, fetch_number, create_tree):
12445         (create_token_tree, mark_opt_subexp, duplicate_tree):
12446         Use prototypes rather than old-style definitions.
12447
12448         * lib/regex_internal.c:
12449         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12450         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12451         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12452         (re_string_reconstruct, re_string_peek_byte_case):
12453         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12454         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12455         (re_node_set_init_copy, re_node_set_add_intersect):
12456         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12457         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12458         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12459         (re_acquire_state, re_acquire_state_context, register_state):
12460         (create_ci_newstate, create_cd_newstate, free_state):
12461         Likewise.
12462         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12463         re_search_2):
12464         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12465         (re_search_internal, prune_impossible_nodes):
12466         (acquire_init_state_context, check_matching, static):
12467         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12468         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12469         (update_regs, sift_states_backward, build_sifted_states):
12470         (clean_state_log_if_needed, merge_state_array):
12471         (update_cur_sifted_state, add_epsilon_src_nodes):
12472         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12473         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12474         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12475         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12476         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12477         (check_arrival, check_arrival_add_next_nodes):
12478         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12479         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12480         (check_node_accept_bytes, check_node_accept, extend_buffers):
12481         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12482         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12483         (sift_ctx_init):
12484         Likewise.
12485
12486         * lib/regex_internal.h:
12487         (re_string_allocate, re_string_construct, re_string_reconstruct):
12488         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12489         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12490         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12491         (re_string_context_at, re_string_peek_byte_case):
12492         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12493         is defined, since we now use prototypes always.
12494
12495         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12496         C89 or better.  All uses removed.
12497
12498 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12499
12500         * config/srclist.txt: Add glibc bugs 1220-1227.
12501
12502 2005-08-20  Jim Meyering  <jim@meyering.net>
12503
12504         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12505         of unused local, dfa.
12506
12507 2005-08-20  Bruno Haible  <bruno@clisp.org>
12508
12509         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12510
12511 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12512
12513         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12514         (re_node_set_insert_last, re_dfa_add_node):
12515         Rename local variables to avoid GCC shadowing warnings.
12516
12517 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12518
12519         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12520         [defined lint]: Suppress bogus uninitialized-variable warnings.
12521
12522         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12523         and let the caller return REG_ESPACE if out of space.  This
12524         removes an uninitialied-variable warning with GCC 4.0.1, and also
12525         avoids taking the address of a local variable.  All callers
12526         changed.
12527
12528 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12529
12530         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12531         $LIBCSRC/posix/regexec.c.
12532         Add glibc bug 1217 for regcomp.c.
12533
12534 2005-08-19  Jim Meyering  <jim@meyering.net>
12535
12536         * lib/regexec.c (proceed_next_node): Redo local variables to
12537         avoid GCC shadowing warnings.
12538
12539 2005-08-18  Bruno Haible  <bruno@clisp.org>
12540
12541         * lib/strstr.c (strstr): Fix return value in multibyte case.
12542         * lib/strcasestr.c (strcasestr): Likewise.
12543
12544 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12545
12546         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12547
12548 2005-08-17  Jim Meyering  <jim@meyering.net>
12549
12550         Make the %s format (seconds since the epoch) work for a negative
12551         number and when used with a zero-padded field width, e.g. %015s.
12552
12553         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12554         label so that it precedes the code to set `digits'.  Otherwise,
12555         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12556         print `00-22'.  Now, it prints `-0022', as it should.
12557
12558 2005-08-17  Bruno Haible  <bruno@clisp.org>
12559
12560         * modules/strstr (Files): Add m4/mbrtowc.m4.
12561         (Depends-on): Add mbuiter.
12562
12563 2005-08-17  Bruno Haible  <bruno@clisp.org>
12564
12565         * modules/strcasestr: New file.
12566         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12567         strcasestr.
12568
12569 2005-08-17  Bruno Haible  <bruno@clisp.org>
12570
12571         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12572
12573 2005-08-17  Bruno Haible  <bruno@clisp.org>
12574
12575         * modules/mbuiter: New file.
12576         * MODULES.html.sh (Extended multibyte and wide character utilities):
12577         Add mbuiter.
12578
12579 2005-08-17  Bruno Haible  <bruno@clisp.org>
12580
12581         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12582         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12583
12584 2005-08-17  Bruno Haible  <bruno@clisp.org>
12585
12586         * m4/strcasestr.m4: New file.
12587
12588 2005-08-17  Bruno Haible  <bruno@clisp.org>
12589
12590         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12591         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12592
12593 2005-08-17  Bruno Haible  <bruno@clisp.org>
12594
12595         * lib/strcasestr.h: New file.
12596         * lib/strcasestr.c: New file.
12597
12598 2005-08-17  Bruno Haible  <bruno@clisp.org>
12599
12600         * lib/strcasecmp.c: Use mbuiter.h.
12601
12602 2005-08-17  Bruno Haible  <bruno@clisp.org>
12603
12604         * lib/mbuiter.h: New file.
12605
12606 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12607
12608         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12609         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12610         and gl_GETOPT are both invoked via different paths (as happens
12611         with GNU tar CVS because it uses both argp and getopt), the former
12612         wins.
12613
12614 2005-08-16  Bruno Haible  <bruno@clisp.org>
12615
12616         * modules/tls: New file.
12617         * MODULES.html.sh (Multithreading): Add tls.
12618
12619 2005-08-16  Bruno Haible  <bruno@clisp.org>
12620
12621         * modules/strnlen1: New file.
12622         * MODULES.html.sh (String handling): Add strnlen1.
12623
12624 2005-08-16  Bruno Haible  <bruno@clisp.org>
12625
12626         * modules/strcase (Files): Add m4/mbrtowc.m4.
12627         (Depends-on): Add strnlen1, mbchar.
12628
12629 2005-08-16  Bruno Haible  <bruno@clisp.org>
12630
12631         * modules/mbiter: New file.
12632         * MODULES.html.sh (Extended multibyte and wide character utilities):
12633         Add mbiter.
12634
12635 2005-08-16  Bruno Haible  <bruno@clisp.org>
12636
12637         * modules/mbfile: New file.
12638         * MODULES.html.sh (Extended multibyte and wide character utilities):
12639         Add mbfile.
12640
12641 2005-08-16  Bruno Haible  <bruno@clisp.org>
12642
12643         * modules/mbchar: New file.
12644         * MODULES.html.sh (Extended multibyte and wide character utilities):
12645         New section.
12646
12647 2005-08-16  Bruno Haible  <bruno@clisp.org>
12648
12649         * m4/tls.m4: New file, from GNU gettext.
12650
12651 2005-08-16  Bruno Haible  <bruno@clisp.org>
12652
12653         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12654         always.
12655         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12656
12657 2005-08-16  Bruno Haible  <bruno@clisp.org>
12658
12659         * m4/mbiter.m4: New file.
12660
12661 2005-08-16  Bruno Haible  <bruno@clisp.org>
12662
12663         * m4/mbfile.m4: New file.
12664
12665 2005-08-16  Bruno Haible  <bruno@clisp.org>
12666
12667         * m4/mbchar.m4: New file.
12668
12669 2005-08-16  Bruno Haible  <bruno@clisp.org>
12670
12671         * lib/tls.h: New file, from GNU gettext.
12672         * lib/tls.c: New file, from GNU gettext.
12673
12674 2005-08-16  Bruno Haible  <bruno@clisp.org>
12675
12676         * lib/strnlen1.h: New file.
12677         * lib/strnlen1.c: New file.
12678
12679 2005-08-16  Bruno Haible  <bruno@clisp.org>
12680
12681         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12682         (mbi_init): Update.
12683         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12684         NUL byte, not after it.
12685
12686 2005-08-16  Bruno Haible  <bruno@clisp.org>
12687
12688         * lib/strcase.h (strcasecmp): Add note in comments.
12689         * lib/strncasecmp.c: Use code from strcasecmp.c.
12690         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12691         (strcasecmp): Work correctly in multibyte locales.
12692
12693 2005-08-16  Bruno Haible  <bruno@clisp.org>
12694
12695         * lib/mbiter.h: New file.
12696
12697 2005-08-16  Bruno Haible  <bruno@clisp.org>
12698
12699         * lib/mbfile.h: New file.
12700
12701 2005-08-16  Bruno Haible  <bruno@clisp.org>
12702
12703         * lib/mbchar.h: New file.
12704         * lib/mbchar.c: New file.
12705
12706 2005-08-16  Bruno Haible  <bruno@clisp.org>
12707
12708         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12709         the valid ones. Makes the comparison operations transitive:
12710         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12711         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12712
12713 2005-08-15  Simon Josefsson  <jas@extundo.com>
12714
12715         * modules/ssize_t (License): Change to 'unlimited'.
12716
12717         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12718
12719 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12720
12721         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12722         Add comments for each pending glibc patch.
12723
12724 2005-08-15  Bruno Haible  <bruno@clisp.org>
12725
12726         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12727         __cplusplus is defined.
12728
12729 2005-08-14  Jim Meyering  <jim@meyering.net>
12730
12731         Sync from coreutils.
12732
12733         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12734         Use the hash-table-based cycle-detection code not just when
12735         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12736         Reported by James Youngman in
12737         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12738         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12739         FTS_TIGHT_CYCLE_CHECK.
12740         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12741         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12742         once again.
12743         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12744         * lib/fts.c (fd_safer): Remove decl.
12745         Include fcntl--.h rather than unistd-safer.h
12746         (fts_safe_changedir): Don't call fd_safer; no longer needed
12747         now that we include fcntl--.h.
12748
12749 2005-08-12  Simon Josefsson  <jas@extundo.com>
12750
12751         * modules/getndelim2: Use ssize_t module.
12752         * modules/getnline: Likewise.
12753         * modules/safe-read: Likewise.
12754         * modules/xreadlink: Likewise.
12755
12756         * modules/ssize_t: New file.
12757
12758 2005-08-12  Simon Josefsson  <jas@extundo.com>
12759
12760         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12761
12762 2005-08-12  Simon Josefsson  <jas@extundo.com>
12763
12764         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12765         ssize_t.
12766
12767 2005-08-12  Simon Josefsson  <jas@extundo.com>
12768
12769         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12770         readline, getdelim and check_version.
12771         (Support for systems lacking ISO C 99: Sizes of integer types):
12772         Add size_max.
12773
12774 2005-08-12  Bruno Haible  <bruno@clisp.org>
12775
12776         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12777
12778 2005-08-11  Simon Josefsson  <jas@extundo.com>
12779
12780         * modules/readline: New file.
12781
12782         * modules/strnlen (Files): Add strnlen.h.
12783
12784 2005-08-11  Simon Josefsson  <jas@extundo.com>
12785
12786         * m4/readline.m4: New file.
12787
12788 2005-08-11  Simon Josefsson  <jas@extundo.com>
12789
12790         * lib/readline.h, readline.c: New file.
12791
12792 2005-08-11  Simon Josefsson  <jas@extundo.com>
12793
12794         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12795         gl_AVOID.
12796
12797 2005-08-11  Bruno Haible  <bruno@clisp.org>
12798
12799         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12800
12801 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12802
12803         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12804
12805 2005-08-10  Simon Josefsson  <jas@extundo.com>
12806
12807         * tests/test-iconvme.c: New file.
12808
12809 2005-08-10  Simon Josefsson  <jas@extundo.com>
12810
12811         * m4/strnlen.m4: New file.
12812
12813         * m4/strndup.m4: Don't check for strnlen declaration, done in
12814         strnlen.m4.
12815
12816 2005-08-10  Simon Josefsson  <jas@extundo.com>
12817
12818         * lib/strndup.c: Use strnlen.h.
12819
12820         * lib/strnlen.h: New file.
12821
12822 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12823
12824         * README: Typos.
12825
12826 2005-08-02  Simon Josefsson  <jas@extundo.com>
12827
12828         * modules/readline: New file.
12829
12830 2005-08-02  Simon Josefsson  <jas@extundo.com>
12831
12832         * modules/getdelim: New file.
12833
12834         * modules/getline: Rewrite, don't use getndelim2.
12835
12836 2005-08-02  Simon Josefsson  <jas@extundo.com>
12837
12838         * m4/getline.m4: Separate out getdelim stuff into separate module.
12839
12840         * m4/getdelim.m4: New file.
12841
12842 2005-08-02  Simon Josefsson  <jas@extundo.com>
12843
12844         * lib/getline.h, getline.c: Rewrite.
12845
12846         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12847
12848 2005-07-31  Bruno Haible  <bruno@clisp.org>
12849
12850         * lib/lock.h (gl_lock_initializer): New macro.
12851         (gl_lock_define_initialized): Use it.
12852         (gl_rwlock_initializer): New macro.
12853         (gl_rwlock_define_initialized): Use it.
12854         (gl_recursive_lock_initializer): New macro.
12855         (gl_recursive_lock_define_initialized): Use it.
12856
12857 2005-07-30  Karl Berry  <karl@gnu.org>
12858
12859         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12860         Report from Ben Pfaff, regarding getopt.
12861
12862 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12863
12864         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12865         normal way.
12866         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12867         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12868         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12869         (gl_GETOPT): Use the new macros.  Most of the implementation
12870         is moved to the new macros.  This is for programs like Emacs
12871         that don't want all the functionality of gl_GETOPT.
12872
12873 2005-07-26  Bruno Haible  <bruno@clisp.org>
12874
12875         * m4/lock.m4: Update from GNU gettext.
12876
12877 2005-07-26  Bruno Haible  <bruno@clisp.org>
12878
12879         * lib/lock.h: Update from GNU gettext.
12880         * lib/lock.c: Update from GNU gettext.
12881
12882 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12883
12884         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12885         obsolescent AC_TRY_RUN.  Include the default includes files, for
12886         'exit'.
12887
12888 2005-07-24  Bruno Haible  <bruno@clisp.org>
12889
12890         * modules/visibility: New file.
12891         * MODULES.html.sh (Misc): Add visibility.
12892
12893 2005-07-24  Bruno Haible  <bruno@clisp.org>
12894
12895         * m4/visibility.m4: New file.
12896
12897 2005-07-24  Bruno Haible  <bruno@clisp.org>
12898
12899         * doc/visibility.texi: New file.
12900
12901 2005-07-22  Bruno Haible  <bruno@clisp.org>
12902
12903         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12904         $(ALLOCA_H), redundant through BUILT_SOURCES.
12905         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12906         redundant through BUILT_SOURCES.
12907         * modules/byteswap (Makefile.am): Remove explicit dependency on
12908         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12909         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12910         $(FNMATCH_H), redundant through BUILT_SOURCES.
12911         * modules/getopt (Makefile.am): Remove explicit dependency on
12912         $(GETOPT_H), redundant through BUILT_SOURCES.
12913         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12914         redundant through BUILT_SOURCES.
12915         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12916         redundant through BUILT_SOURCES.
12917         * modules/stdbool (Makefile.am): Remove explicit dependency on
12918         $(STDBOOL_H), redundant through BUILT_SOURCES.
12919         * modules/stdint (Makefile.am): Remove explicit dependency on
12920         $(STDINT_H), redundant through BUILT_SOURCES.
12921         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12922         Remove explicit dependency on $(SYSEXITS_H).
12923         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12924
12925 2005-07-18  Simon Josefsson  <jas@extundo.com>
12926
12927         * lib/check-version.c (check_version): Accept identical versions too.
12928
12929 2005-07-18  Bruno Haible  <bruno@clisp.org>
12930
12931         * modules/lock: New file.
12932         * MODULES.html.sh (Multithreading): New section.
12933
12934 2005-07-18  Bruno Haible  <bruno@clisp.org>
12935
12936         * m4/lock.m4: New file, from GNU gettext.
12937
12938 2005-07-18  Bruno Haible  <bruno@clisp.org>
12939
12940         * lib/lock.h: New file, from GNU gettext.
12941         * lib/lock.c: New file, from GNU gettext.
12942
12943 2005-07-18  Bruno Haible  <bruno@clisp.org>
12944
12945         * lib/lock.h (gl_once_t): New type.
12946         (gl_once_define, gl_once): New macros.
12947         * lib/lock.c (fresh_once): New variable.
12948         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
12949         functions.
12950
12951 2005-07-16  Simon Josefsson  <jas@extundo.com>
12952
12953         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
12954         workaround, suggested by Bruno.
12955
12956 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12957
12958         * modules/xalloc (Depends-on): Add xalloc-die.
12959         * modules/xvasprintf (Depends-on): Add xalloc-die.
12960
12961 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
12962
12963         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
12964         with a minor change.
12965
12966 2005-07-15  Bruno Haible  <bruno@clisp.org>
12967
12968         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
12969         When using lib/poll.c, define poll as rpl_poll.
12970
12971 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
12972
12973         * modules/argp (Depends-on): Remove unlocked-io.
12974
12975 2005-07-14  Derek Price  <derek@ximbiot.com>
12976
12977         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
12978         for glob symlink bug.
12979
12980 2005-07-14  Bruno Haible  <bruno@clisp.org>
12981
12982         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
12983         Instead, test for *_unlocked function declarations directly.
12984
12985 2005-07-11  Simon Josefsson  <jas@extundo.com>
12986
12987         * modules/size_max: New file.
12988
12989         * modules/xsize: Depend on size_max module for size_max.m4.
12990
12991 2005-07-11  Simon Josefsson  <jas@extundo.com>
12992
12993         * lib/size_max.h: New file.
12994
12995 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
12996
12997         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
12998         copyright symbol and the year.
12999         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13000         (version_etc_va): Use parameterized copyright notice.
13001         Reword to conform to the current GNU coding standards.
13002
13003 2005-07-11  Karl Berry  <karl@gnu.org>
13004
13005         * doc/gnulib.texi (Quoting): new node.
13006         (Initial import): more info, from Patrice.
13007
13008 2005-07-11  Bruno Haible  <bruno@clisp.org>
13009
13010         * gnulib-tool (func_usage): Document option --avoid.
13011         (Command line options): Handle --avoid.
13012         (func_acceptable): New function.
13013         (func_modules_transitive_closure): Use it.
13014
13015 2005-07-11  Bruno Haible  <bruno@clisp.org>
13016
13017         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13018         Reported by Jim Meyering.
13019
13020 2005-07-10  Bruno Haible  <bruno@clisp.org>
13021
13022         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13023         Needed when size_t is smaller than 'unsigned int'.
13024         Reported by Paul Eggert.
13025
13026 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13027
13028         * modules/argp (Depends-on): Add unlocked-io
13029
13030 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13031
13032         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13033         block of defines.
13034
13035 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13036
13037         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13038         fix now.
13039
13040 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13041         and Paul Eggert  <eggert@cs.ucla.edu>
13042
13043         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13044         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13045
13046 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13047
13048         * modules/regex (Files): Add lib/regex_internal.c,
13049         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13050         (Depends-on): Add extensions.
13051         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13052
13053 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13054
13055         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13056         pathconf.
13057         * m4/same.m4 (gl_SAME): Likewise.
13058         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13059
13060         * m4/regex.m4: Adjust to new libc regex implementation.
13061         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13062         all the .c and .h parts of (the new) regex.
13063         Quote the m4 stuff better.
13064         Check for RE_ICASE bug of old gnulib.
13065         Check for REG_STARTEND of recent libc.
13066         Rename local variables from jm_* to gl_*.
13067         Quote operand of "test -f".
13068         Say "recent enough" version of libc, not "version 2".
13069         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13070         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13071         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13072         Remove check for btowc, isascii.
13073         Require AM_LANGINFO_CODESET.
13074
13075 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13076
13077         * lib/regex.c, regex.h: Sync from libc.
13078         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13079         * lib/regexec.c:
13080         New files, synced from libc, except that regex_internal.h
13081         currently has a small porting fix.
13082
13083 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13084
13085         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13086         regex_internal.c, regexec.c.
13087         Add regex_internal.h too, but as a comment, since the libc version
13088         is currently broken in gnulib mode.
13089
13090 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13091
13092         Support programs like Emacs that use gnulib but not gettext.
13093         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13094         * modules/gettext-h: New file.
13095         * modules/gettext (Files): Remove lib/gettext.h.
13096         (Depends-on): Add gettext-h.
13097         (Makefile.am): Remove lib_SOURCES.
13098         * modules/argmatch, modules/c-stack, modules/closeout:
13099         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13100         * modules/execute, modules/file-type, modules/getaddrinfo:
13101         * modules/getopt, modules/human, modules/javacomp:
13102         * modules/javaexec, modules/mkdir-p, modules/obstack:
13103         * modules/openat, modules/pagealign_alloc, modules/pipe:
13104         * modules/quotearg, modules/regex, modules/rpmatch:
13105         * modules/unicodeio, modules/userspec, modules/version-etc:
13106         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13107         * modules/xsetenv:
13108         Depend on gettext-h, not gettext.
13109
13110 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13111
13112         * gnulib-tool (func_import): Add support for 'public domain' license.
13113         * modules/alloca, modules/atexit, modules/memmove:
13114         Now public domain, not GPL.
13115         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13116         * modules/realloc, modules/strerror, modules/strtod:
13117         Now LGPL, not GPL.
13118
13119 2005-07-05  Bruno Haible  <bruno@clisp.org>
13120
13121         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13122         autoconf CVS. Needed for mingw.
13123
13124 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13125
13126         Remove the dependency of the strftime module on the tzset module.
13127         * modules/strftime (Depends-on): Remove dependency on tzset.
13128
13129 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         Remove the dependency of the strftime module on the tzset module.
13132         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13133         gl_FUNC_TZSET_CLOBBER.
13134
13135 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13136
13137         Remove the dependency of the strftime module on the tzset module.
13138         * lib/strftime.c (my_strftime)
13139         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13140         Copy the input structure, to work around some of the bug with
13141         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13142         Solaris releases, you should also use the tzset module, but we won't
13143         require it as a dependency any more since we don't want LGPLed code
13144         to depend on GPLed code.
13145
13146 2005-07-02  Jim Meyering  <jim@meyering.net>
13147
13148         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13149         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13150         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13151         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13152
13153 2005-07-02  Jim Meyering  <jim@meyering.net>
13154
13155         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13156
13157 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13158
13159         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13160         declares only 'struct timespec;' (!).
13161
13162 2005-07-01  Jim Meyering  <jim@meyering.net>
13163
13164         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13165         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13166         * lib/save-cwd.c, tempname.c:
13167         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13168         and don't include <sys/file.h>).
13169
13170 2005-06-29  Jim Meyering  <jim@meyering.net>
13171
13172         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13173         type name.  Use the variable name instead.
13174         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13175         Likewise.
13176
13177 2005-06-28  Simon Josefsson  <jas@extundo.com>
13178
13179         * modules/check-version (Files): Add check-version.m4.
13180
13181 2005-06-28  Simon Josefsson  <jas@extundo.com>
13182
13183         * m4/check-version.m4: New file, suggested by Jim Meyering
13184         <jim@meyering.net>.
13185
13186 2005-06-28  Simon Josefsson  <jas@extundo.com>
13187
13188         * lib/check-version.h, lib/check-version.c: New files.
13189
13190 2005-06-28  Simon Josefsson  <jas@extundo.com>
13191
13192         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13193         collision with global variable.  Better indentation.  Don't
13194         increment buffer pointer beyond buffer end.  Based on comments
13195         from Paul Eggert <eggert@cs.ucla.edu>.
13196
13197         * lib/base64.h: Indent.
13198
13199 2005-06-28  Simon Josefsson  <jas@extundo.com>
13200
13201         * doc/gnulib.texi (Library version handling): New section.
13202
13203 2005-06-28  Jim Meyering  <jim@meyering.net>
13204
13205         * check-module (find_included_lib_files): Hard-code another
13206         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13207         but modules/fts-lgpl (correctly) does not list those files.
13208
13209         * modules/canonicalize (Files): Add lib/pathmax.h.
13210
13211 2005-06-25  Simon Josefsson  <jas@extundo.com>
13212
13213         * modules/check-version: New file.
13214
13215 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13216
13217         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13218         initializer of struct addrinfo, as an indication that we don't
13219         care how many members the structure has.
13220
13221 2005-06-24  Derek Price  <derek@ximbiot.com>
13222         and Bruno Haible  <bruno@clisp.org>
13223
13224         Remove stat module & update lstat.
13225         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13226         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13227         * m4/stat.m4: Remove this file.
13228
13229 2005-06-24  Derek Price  <derek@ximbiot.com>
13230         and Bruno Haible  <bruno@clisp.org>
13231
13232         Remove stat module & update lstat.
13233         * lib/stat.c: Remove this file...
13234         (slash_aware_lstat): ...moving this content and its support...
13235         * lib/lstat.c (rpl_lstat): ...into here.
13236         * lib/lstat.h: New file.
13237
13238 2005-06-24  Derek Price  <derek@ximbiot.com>
13239         and Bruno Haible  <bruno@clisp.org>
13240
13241         Remove stat module & update lstat.
13242         * config/srclist.txt (libc sources): Remove stat.
13243
13244 2005-06-24  Derek Price  <derek@ximbiot.com>
13245         and Bruno Haible  <bruno@clisp.org>
13246
13247         Remove stat module & update lstat.
13248         * MODULES.html.sh (stat): Remove.
13249         * MODULES.html: Regenerated.
13250         * modules/lstat (Description): Correct function name.
13251         (Files): Add "lstat.h".
13252         (Depends-on): Remove stat, add xalloc, stat-macros.
13253         * modules/stat: Remove this file.
13254         (Include): Add "lstat.h", remove <sys/stat.h>.
13255
13256 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13257
13258         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13259         (ranged_convert): Don't save conversion in a temporary struct.
13260         This causes a warning with GCC 4.0.0, and anyway in the typical
13261         case it's not worth the extra 100 bytes or so of code.
13262         (ranged_convert, __mktime_internal): When calling a function via a
13263         pointer P, use P () rather than (*P) (), as we now assume C89 or
13264         better.
13265
13266 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13267
13268         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13269         "who -r" failed to give output.  Problem reported by Tim Waugh.
13270
13271         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13272         (xcalloc): Use it to avoid needless tests.
13273         Problem reported by Jim Meyering.
13274
13275 2005-06-20  Derek Price  <derek@ximbiot.com>
13276
13277         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13278         unnecessary for Autoconfs > 2.59c.
13279
13280 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13281
13282         * lib/argp.h (__option_is_short): Check upper limit of
13283         __key. Isprint() requires its argument to have the value
13284         of an unsigned char or EOF.
13285
13286 2005-06-16  Jim Meyering  <jim@meyering.net>
13287
13288         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13289         when either N or S is zero.
13290
13291 2005-06-16  Derek Price  <derek@ximbiot.com>
13292
13293         * m4/bison.m4: Declare YACC & YFLAGS precious.
13294
13295 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13296
13297         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13298         multibyte string or pattern, fall back on unibyte matching.
13299         Problem reported by James Youngman.
13300
13301 2005-06-08  Bruno Haible  <bruno@clisp.org>
13302
13303         * modules/csharpcomp: New file.
13304         * MODULES.html.sh (C#): Add csharpcomp.
13305
13306 2005-06-08  Bruno Haible  <bruno@clisp.org>
13307
13308         * m4/csharpcomp.m4: New file, from GNU gettext.
13309
13310 2005-06-08  Bruno Haible  <bruno@clisp.org>
13311
13312         * lib/csharpcomp.h: New file, from GNU gettext.
13313         * lib/csharpcomp.c: New file, from GNU gettext.
13314         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13315
13316 2005-06-08  Bruno Haible  <bruno@clisp.org>
13317
13318         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13319         warning on mingw.
13320
13321 2005-06-07  Derek Price  <derek@ximbiot.com>
13322
13323         Sync from CVS.
13324         * lib/glob_.h: Indent nested #ifdef.
13325
13326 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13327
13328         Sync from coreutils.
13329         Use "file name" when talking about file names, instead of "filename"
13330         or "path", as per the GNU coding standards.
13331         * lib/mkdir-p.c: Renamed from makepath.c.
13332         (make_dir_parents): Renamed from make_path.  All callers changed.
13333         * lib/mkdir-p.h: Likewise.  All includers changed.
13334         * lib/filenamecat.c: Renamed from path-concat.c.
13335         (file_name_concat): Renamed from path_concat.  All callers changed.
13336         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13337         * lib/filenamecat.h: Likewise.  All includers changed.
13338         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13339         in comments or local variable names.
13340         * lib/basename.c: Likewise.
13341         * lib/canonicalize.c, canonicalize.h: Likewise.
13342         * lib/dirname.c, dirname.h: Likewise.
13343         * lib/euidaccess.c: Likewise.
13344         * lib/exclude.c: Likewise
13345         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13346         * lib/fsusage.c, fsuage.h: Likewise.
13347         * lib/fts.c, fts_.h: Likewise.
13348         * lib/getcwd.c: Likewise.
13349         * lib/getloadavg.c: Likewise.
13350         * lib/mkstemp.c: Likewise.
13351         * lib/mountlist.c, mountlist.h: Likewise.
13352         * lib/openat.c, openat.h: Likewise.
13353         * lib/readlink-stub.c: Likewise.
13354         * lib/readutmp.c, readutmp.h: Likewise.
13355         * lib/rename.c: Likewise.
13356         * lib/rmdir.c: Likewise.
13357         * lib/same.c: Likewise.
13358         * lib/savedir.c: Likewise.
13359         * lib/stripslash.c: Likewise.
13360         * lib/tempname.c: Likewise.
13361         * lib/xreadlink.c: Likewise.
13362         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13363         All uses changed.
13364         * lib/exclude.h: Likewise.
13365
13366         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13367         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13368         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13369         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13370         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13371         files have been getting away with it for years (MORE/BSD 4.3
13372         is extinct now).
13373         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13374         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13375
13376         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13377         Define to 256, not 255, as per modern POSIX.
13378
13379 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13380
13381         Sync from coreutils.
13382         Use "file name" when talking about file names, instead of "filename"
13383         or "path", as per the GNU coding standards.
13384         * MODULES.html.sh: mkdir-p renamed from makepath.
13385         filenamecat renamed from path-concat.
13386         * modules/filenamecat: Renamed from modules/path-concat.
13387         (Files): filenamecat.h and filenamecat.c renamed from
13388         path-concat.h and path-concat.c.
13389         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13390         (Include): filenamecat.h, not path-concat.h.
13391         * modules/mkdir-p: Renamed from modules/makepath.
13392         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13393         makepath.c.
13394         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13395         (Include): mkdir-p.h, not makepath.h.
13396
13397 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13398
13399         Sync from coreutils.
13400         * m4/mkdir-p.m4: Renamed from makepath.m4.
13401         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13402         Rename files from makepath.c to mkdir-p.c, and from
13403         makepath.h to mkdir-p.h.
13404         * m4/filenamecat.m4: Renamed from path-concat.m4.
13405         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13406         Rename files from path-concat.c to filenamecat.c,
13407         and from path-concat.h to filenamecat.h.
13408         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13409         "file name" in local variables or comments.
13410         * m4/rename.m4: Likewise.
13411
13412 2005-06-01  Bruno Haible  <bruno@clisp.org>
13413
13414         * modules/csharpexec: New file.
13415         * MODULES.html.sh (C#): New section.
13416
13417 2005-06-01  Bruno Haible  <bruno@clisp.org>
13418
13419         * m4/csharp.m4: New file, from GNU gettext.
13420         * m4/csharpexec.m4: New file, from GNU gettext.
13421
13422 2005-06-01  Bruno Haible  <bruno@clisp.org>
13423
13424         * lib/csharpexec.h: New file, from GNU gettext.
13425         * lib/csharpexec.c: New file, from GNU gettext.
13426         * lib/csharpexec.sh.in: New file, from GNU gettext.
13427
13428 2005-05-31  Derek Price  <derek@ximbiot.com>
13429             Paul Eggert  <eggert@cs.ucla.edu>
13430
13431         Sync from cvs.
13432         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13433
13434 2005-05-31  Derek Price  <derek@ximbiot.com>
13435             Paul Eggert  <eggert@cs.ucla.edu>
13436
13437         Sync from cvs.
13438         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13439
13440 2005-05-29  Derek Price  <derek@ximbiot.com>
13441
13442         * config/srclist.txt (glob_.h, glob.c): Add these files.
13443
13444 2005-05-29  Derek Price  <derek@ximbiot.com>
13445
13446         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13447         * modules/glob: New file.
13448         * modules/getlogin_r: Add link to POSIX spec in description.
13449
13450 2005-05-29  Derek Price  <derek@ximbiot.com>
13451             Paul Eggert  <eggert@cs.ucla.edu>
13452
13453         * m4/glob.m4: New file.
13454
13455 2005-05-29  Derek Price  <derek@ximbiot.com>
13456             Paul Eggert  <eggert@cs.ucla.edu>
13457
13458         * lib/glob_.h, lib/glob.c: New files.
13459
13460 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13461
13462         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13463         * modules/fts-lgpl (Depends-on): Remove gettext.
13464
13465 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13466
13467         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13468         and don't require gt_INTTYPES_PRI.
13469
13470 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13471
13472         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13473
13474         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13475         the configuration hassle isn't worth it.
13476         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13477         (LONGEST_MODIFIER, PRIuMAX): Remove.
13478
13479 2005-05-27  Bruno Haible  <bruno@clisp.org>
13480
13481         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13482
13483 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13484
13485         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13486         _POSIX_PTHREAD_SEMANTICS for Solaris.
13487
13488 2005-05-25  Derek Price  <derek@ximbiot.com>
13489
13490         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13491
13492 2005-05-25  Derek Price  <derek@ximbiot.com>
13493             Paul Eggert  <eggert@cs.ucla.edu>
13494
13495         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13496         * lib/getlogin_r.c, getlogin_r.h: New files.
13497
13498 2005-05-25  Bruno Haible  <bruno@clisp.org>
13499             Derek Price  <derek@ximbiot.com>
13500
13501         * lib/getlogin_r.h: Simplify API documentation.
13502
13503 2005-05-23  Derek Price  <derek@ximbiot.com>
13504
13505         * modules/minmax (Files): Add m4/minmax.m4.
13506         (configure.ac): Add gl_MINMAX.
13507
13508 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13509
13510         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13511         so that unistd-safer.h (GPL'ed code) need not be included.
13512
13513 2005-05-22  Bruno Haible  <bruno@clisp.org>
13514
13515         * m4/minmax.m4: New file.
13516         Based on a patch by Derek Price <derek@ximbiot.com>.
13517
13518 2005-05-22  Bruno Haible  <bruno@clisp.org>
13519
13520         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13521         (INT64_MIN): Fix definition.
13522         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13523
13524         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13525         NEED_SIGNED_INT_TYPES.
13526
13527         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13528         HAVE_SYSTEM_INTTYPES.
13529
13530 2005-05-22  Bruno Haible  <bruno@clisp.org>
13531
13532         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13533         Also include <sys/param.h> if it defines MIN, MAX.
13534         Based on a patch by Derek Price <derek@ximbiot.com>.
13535
13536 2005-05-21  Jim Meyering  <jim@meyering.net>
13537
13538         * modules/fts (Files): Add m4/inttypes-pri.m4.
13539         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13540
13541 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         New fts module.
13544         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13545         (setup_dir, free_dir): New functions.
13546         (enter_dir, leave_dir): Define trivial
13547         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13548         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13549         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13550         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13551         Move to fts-cycle.c.
13552         (fts_open): Use setup_dir.
13553         (fts_close): Use free_dir.
13554         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13555         This adds a label and some gotos, but the alternatives were messier.
13556         Check for memory allocation failure when entering a dir.
13557         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13558         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13559         (FTS): New member fts_cycle, that is a union that contains the
13560         old active_dir_ht and cycle_state.  All uses changed to mention
13561         fts_cycle.ht and fts_cycle.state.
13562         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13563         fts.c, with the following changes:
13564         (setup_dir, free_dir): New functions.
13565         (enter_dir): Now returns bool.  Return true if successful, false
13566         if memory exhausted.  All callers changed.
13567         Do not bother partly cleaning up on
13568         memory allocation failure; that is free_dir's job.
13569         However, free ad if hash_insert fails, to avoid memory leak.
13570         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13571         fts->fts_options to see which union member to use.
13572
13573 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13574
13575         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13576         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13577
13578 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13579
13580         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13581
13582 2005-05-20  Jim Meyering  <jim@meyering.net>
13583
13584         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13585         Now a macro, to pacify GCC.
13586
13587 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13588
13589         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13590         of -1.
13591
13592 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13593
13594         * lib/chown.c (rpl_chown): Return -1 on failure.
13595
13596 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13597
13598         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13599         Don't check for stddef.h.
13600         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13601         don't use its results.
13602         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13603         since we include them unconditionally.  Don't require
13604         AM_STDBOOL_H, since stdbool is a prerequisite.
13605         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13606         since we assume C89 or better.
13607         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13608         as we don't use their results.
13609         Don't check for fchdir, memmove, memset, strrchr, as we use
13610         them unconditionally.
13611         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13612         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13613
13614 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13615
13616         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13617         Include <stddef.h> unconditionally, since we assume C89 now.
13618         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13619         * lib/fts.c: Include fts_.h first, to check interface.
13620         Do not include intprops.h; no longer needed.
13621         Include cycle-check.h and hash.h, since fts_.h no longer does.
13622         Remove unnecessary casts of closedir to void.
13623         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13624         decide whether to decrement nlinks.
13625         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13626         (FTS): Use struct hash_table * instead of Hash_table, so that
13627         we no longer need to include hash.h here.
13628
13629 2005-05-18  Jim Meyering  <jim@meyering.net>
13630
13631         * modules/dirfd (License): Change to LGPL.  Most of the code
13632         is already in the public domain.
13633
13634 2005-05-18  Jim Meyering  <jim@meyering.net>
13635
13636         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13637         Reported by Yoann Vandoorselaere.
13638
13639 2005-05-17  Jim Meyering  <jim@meyering.net>
13640
13641         * m4/fts.m4: New file, from coreutils.
13642
13643 2005-05-17  Jim Meyering  <jim@meyering.net>
13644
13645         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13646
13647 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13648
13649         Sync from coreutils.
13650         * m4/unlinkdir.m4: New file.
13651
13652 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13653
13654         Sync from coreutils.
13655         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13656         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13657         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13658         White space changes only.
13659         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13660         special.
13661         * lib/yesno.c: Include getline.h, not ctype.h.
13662         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13663         Use getline to remove arbitrary restriction on response length.
13664
13665 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         * config/srclist-update: Spell out "Street" in FSF postal
13668         mail address; this is the style the FSF seems to prefer.
13669
13670         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13671         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13672         this updates FSF postal mail address.
13673
13674         Sync from coreutils.
13675         * modules/unlinkdir: New file.
13676         * modules/yesno (Depends-on): Add getline.
13677         * MODULES.html.sh (File system functions): Add unlinkdir.
13678
13679 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13680
13681         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13682         lib/strsep.h:
13683         Change the initial comment to refer to GPL, not LGPL.
13684         gnulib-tool will change it to LGPL as needed.
13685
13686         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13687         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13688         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13689         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13690         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13691         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13692         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13693         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13694         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13695         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13696         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13697         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13698         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13699         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13700         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13701         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13702         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13703         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13704         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13705         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13706         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13707         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13708         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13709         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13710         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13711         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13712         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13713         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13714         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13715         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13716         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13717         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13718         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13719         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13720         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13721         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13722         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13723         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13724         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13725         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13726         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13727         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13728         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13729         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13730         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13731         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13732         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13733         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13734         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13735         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13736         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13737         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13738         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13739         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13740         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13741         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13742         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13743         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13744         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13745         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13746         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13747         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13748         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13749         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13750         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13751         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13752         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13753         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13754         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13755         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13756         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13757         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13758         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13759         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13760         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13761         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13762         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13763         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13764         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13765         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13766         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13767         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13768         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13769         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13770         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13771         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13772         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13773         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13774         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13775         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13776         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13777         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13778         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13779         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13780         lib/yesno.c, lib/yesno.h:
13781         Update FSF postal mail address.
13782
13783 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13784
13785         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13786         tests/test-memmem.c, tests/test-stpncpy.c:
13787         Update FSF postal mail address.
13788
13789 2005-05-13  Bruno Haible  <bruno@clisp.org>
13790
13791         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13792         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13793         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13794         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13795         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13796         Add support for 64-bit integers in the MSVC compiler.
13797
13798 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13799
13800         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13801
13802 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13803
13804         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13805
13806 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13807
13808         * doc/getdate.texi (General date syntax): Don't say that date
13809         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13810         Problem reported by Nic Ferrier.
13811
13812 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13813
13814         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13815         specified in ai_socktype. Fix invalid ai_protocol
13816         check. ai_protocol is usually set to 0 or depending on
13817         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13818         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13819         ai_socktype / ai_protocol in the returned addrinfo structure.
13820
13821 2005-05-10  Simon Josefsson  <jas@extundo.com>
13822
13823         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13824         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13825
13826 2005-05-10  Karl Berry  <karl@gnu.org>
13827
13828         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13829         (from http://www.gnu.org/licenses).
13830         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13831         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13832         fdl.texi suffices.
13833
13834 2005-05-10  Karl Berry  <karl@gnu.org>
13835
13836         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13837         (COPYING.DOC): remove.
13838
13839         * config/srclist-update: new FSF address.
13840
13841 2005-05-10  Derek Price  <derek@ximbiot.com>
13842
13843         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13844         possible.
13845
13846 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13847             Bruno Haible  <bruno@clisp.org>
13848
13849         * modules/inet_ntop: New file.
13850         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13851         inet_ntop.
13852
13853 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13854             Bruno Haible  <bruno@clisp.org>
13855
13856         * m4/inet_ntop.m4: New file.
13857
13858 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13859             Bruno Haible  <bruno@clisp.org>
13860
13861         * lib/inet_ntop.h: New file.
13862         * lib/inet_ntop.c: New file, from glibc with modifications.
13863
13864 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13865
13866         * modules/time_r (License): Change to LGPL.
13867         * modules/extensions (License): Change to LGPL.  Actually,
13868         the license is more permissive than that, but currently gnulib-tool
13869         doesn't know how to handle more-permissive licenses.
13870
13871         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13872         Problem reported by Dave Love.
13873
13874 2005-05-08  Jim Meyering  <jim@meyering.net>
13875
13876         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13877         blank.
13878
13879 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13880
13881         * modules/argmatch (Depends-on): Add stdbool.
13882         * modules/backupfile (Depends-on): Likewise.
13883         * modules/chdir-long (Depends-on): Likewise.
13884         * modules/closeout (Depends-on): Likewise.
13885         * modules/cycle-check (Depends-on): Likewise.
13886         * modules/dirname (Depends-on): Likewise.
13887         * modules/fnmatch (Depends-on): Likewise.
13888         * modules/fsusage (Depends-on): Likewise.
13889         * modules/fwriteerror (Depends-on): Likewise.
13890         * modules/getcwd (Depends-on): Likewise.
13891         * modules/getloadavg (Depends-on): Likewise.
13892         * modules/hard-locale (Depends-on): Likewise.
13893         * modules/makepath (Depends-on): Likewise.
13894         * modules/mountlist (Depends-on): Likewise.
13895         * modules/nanosleep (Depends-on): Likewise.
13896         * modules/posixtm (Depends-on): Likewise.
13897         * modules/quotearg (Depends-on): Likewise.
13898         * modules/readtokens (Depends-on): Likewise.
13899         * modules/readtokens0 (Depends-on): Likewise.
13900         * modules/readutmp (Depends-on): Likewise.
13901         * modules/save-cwd (Depends-on): Likewise.
13902         * modules/strftime (Depends-on): Likewise.
13903         * modules/userspec (Depends-on): Likewise.
13904         * modules/utimecmp (Depends-on): Likewise.
13905         * modules/xgetcwd (Depends-on): Likewise.
13906         * modules/xnanosleep (Depends-on): Likewise.
13907         * modules/xstrtod (Depends-on): Likewise.
13908         * modules/yesno (Depends-on): Likewise.
13909
13910 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13911
13912         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13913         needless checks.
13914
13915 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13916
13917         Merge from coreutils.  Among other things,
13918         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13919         * lib/fd-safer.c: New file.
13920         * lib/fcntl-safer.h, open-safer.c: Remove.
13921         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13922         * lib/dup-safer.c: Include unistd-safer.h first.
13923         Don't include errno.h.
13924         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13925         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13926         * lib/file-type.c: Rely on file-type.h change.
13927         * lib/getloadavg.c: Include unistd-safer.h.
13928         (getloadavg): Use safer open.
13929         * lib/getusershell.c: Include "stdio-safer.h".
13930         (getusershell): Use safer fopen.
13931         * lib/long-options.c (long_options): Use NULL rather than 0.
13932         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13933         'free'.
13934         * lib/modechange.c: Likewise.
13935         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13936         (MODE_DONE): New constant.
13937         (struct mode_change): Remove 'next' member.
13938         (make_node_op_equals): New function; like the old one of the
13939         same name, except it allocates an array.
13940         (mode_compile, mode_create_from_ref): Use it.
13941         (mode_compile): Allocate result as an array, not a linked list.
13942         Parse octal string ourself, so that we catch mistakes like "+0".
13943         (mode_adjust): Arg is an array, not a linked list.
13944         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13945         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13946         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13947         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
13948         Remove.  This is now stat-macros.h's job.
13949         (talloc): Remove.  All callers replaced by xalloc, so that
13950         our invokers don't have to worry about reporting memory failures.
13951         (make_node_op_equals): Remove.
13952         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13953         New constants.
13954         (struct mode_change): Moved here from modechange.h.
13955         (mode_append_entry): Remove.
13956         (mode_compile): Remove MASKED_OPS arg, since it encouraged
13957         apps to have incorrect behavior.  Use simpler algorithm for head
13958         and tail.  Don't futz with umask; that's now the job of mode_adjust.
13959         Detect more invalid usages rather than having somewhat-random behavior.
13960         Don't insert an "a=" action, as that leads to incorrect behavior.
13961         (mode_compile, mode_create_from_ref): Return NULL on error instead
13962         of an enum, since now there's only one way to have an error.  All
13963         callers changed.
13964         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
13965         at the correct time.  Simplify calculation of "+u" and its ilk.
13966         Don't mishandle "+X".
13967         (mode_free): Remove "register" and localize decls.
13968         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
13969         (struct mode_change): Move to modechange.c; callers don't
13970         need to see this stuff.
13971         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
13972         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
13973         (mode_change, mode_adjust): Reflect the new signatures noted above.
13974         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
13975         that might redefine system include files.
13976         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
13977         (my_usleep): Use NULL rather than (void *) 0.
13978         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
13979         Use siginterrupt to specify that system calls should be interrupted.
13980         (rpl_nanosleep): Move initialization of suspended closer to call of
13981         my_usleep.
13982         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
13983         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
13984         (desirable_utmp_entry): New function.
13985         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
13986         using x2nrealloc, to simplify logic.
13987         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
13988         size calculation.  Do not assume utmp file is a regular file.
13989         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
13990         (READ_UTMP_CHECK_PIDS): New constant.
13991         * lib/save-cwd.c: Include unistd-safer.h.
13992         (save_cwd): Use fd_safer.
13993         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
13994         [!_LIBC] Include "stat-macros.h" instead.
13995         * lib/unistd-safer.h (fd_safer): New decl.
13996
13997 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13998
13999         * modules/getloadavg (Depends-on): Add unistd-safer.
14000         * modules/getusershell (Depends-on): Add stdio-safer.
14001         * modules/lstat (Depends-on): Remove xalloc.
14002         * modules/mkstemp (Depends-on): Add stat-macros.
14003         * modules/modechange (Depends-on): Remove xstrtol.
14004         Add stat-macros, xalloc.
14005         * modules/save-cwd (Depends-on): Add unistd-safer.
14006         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14007         * modules/unistd-safer (Files): Add lib/fd-safer.c
14008         (Makefile.am): Remove lib_SOURCES.
14009
14010         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14011         Remove fcntl-safer; unistd-safer supersedes it.
14012
14013 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14014
14015         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14016         AC_HEADER_STAT.
14017         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14018         (gl_PREREQ_CHOWN): Remove.
14019         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14020         it.  Don't require AC_HEADER_STAT.
14021         (gl_PREREQ_LSTAT): Remove.
14022         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14023         Don't require AC_HEADER_STAT.
14024         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14025         (gl_PREREQ_RMDIR): Remove.
14026         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14027         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14028         the stat-macros module a prerequisite.
14029         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14030         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14031         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14032         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14033         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14034         variable names.
14035         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14036         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14037         variable prefixes.
14038         * m4/fcntl-safer.m4: Remove.
14039         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14040         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14041         Invoke gl_PREREQ_FD_SAFER.
14042         (gl_PREREQ_FD_SAFER): New macro.
14043         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14044         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14045         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14046         Remove duplicate call to AC_LIBOBJ(readutmp).
14047         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14048
14049         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14050         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14051
14052 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14053
14054         * MODULES.html.sh (Misc): Add byteswap.
14055
14056 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14057
14058         * modules/getcwd (Depends-on): Add extensions.
14059         * modules/openat (Depends-on): Likewise.
14060
14061 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14062
14063         * modules/byteswap: New file.
14064
14065 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14066
14067         * m4/byteswap.m4: New file.
14068
14069 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14070
14071         * lib/byteswap_.h: New file.
14072
14073 2005-04-25  Karl Berry  <karl@gnu.org>
14074
14075         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14076
14077 2005-04-25  Albert Chin  <china@thewrittenword.com>
14078
14079         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14080         Toolkit C bug.
14081
14082 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14083
14084         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14085         (func_ln_if_changed) Remove forcibly for no error message
14086         in case file does not exist.
14087
14088 2005-04-19  Simon Josefsson  <jas@extundo.com>
14089
14090         * gnulib-tool (Options): Make --symlink mean --symbolic.
14091
14092 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14093
14094         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14095
14096 2005-04-16  Simon Josefsson  <jas@extundo.com>
14097
14098         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14099
14100 2005-04-15  Simon Josefsson  <jas@extundo.com>
14101
14102         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14103
14104 2005-04-15  Simon Josefsson  <jas@extundo.com>
14105
14106         * gnulib-tool: Rename --symlink to --symbolic.
14107
14108 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14109
14110         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14111         symbolic links to files instead of copying/moving.  Add --aux-dir,
14112         specifying directory relative --dir where auxiliary build tools
14113         are placed.
14114
14115 2005-04-14  Bruno Haible  <bruno@clisp.org>
14116
14117         * modules/allocsa (License): Change to LGPL.
14118         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14119
14120 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14121
14122         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14123         that "UTC +1 second" continues to work.  Problem reported
14124         by Dmitry V. Levin.
14125         (relunit_snumber): New rule.
14126         (relunit): Use it.
14127
14128 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14129
14130         * lib/getdate.y (universal_time_zone_table): New constant.
14131         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14132         universal_time_zone_table.
14133         (lookup_zone): Prefer universal_time_zone_table to
14134         local_time_zone_table, so that "GMT" time stamps are allowed in
14135         London during the summer.  Problem reported by Ian Abbott.
14136
14137 2005-04-12  Jim Meyering  <jim@meyering.net>
14138
14139         * lib/human.c (humblock): Set *options even when returning due to
14140         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14141         warning from gcc-4.
14142
14143 2005-04-09  Jim Meyering  <jim@meyering.net>
14144
14145         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14146         -Wuninitialized: initialize tm0.tm_year.
14147
14148 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14149
14150         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14151         count, since there's no maximum.  All uses changed.
14152         Add member dsts_seen.
14153         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14154         not being INT_MAX.
14155         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14156         Use pc_rels_seen to decide whther a date is absolute.
14157
14158         * lib/getdate.y (number): Don't overwrite year.
14159         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14160         check.
14161
14162 2005-04-02  Simon Josefsson  <jas@extundo.com>
14163
14164         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14165         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14166
14167 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14168
14169         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14170         where no absolute path name can be longer than PATH_MAX.
14171
14172 2005-03-27  Jim Meyering  <jim@meyering.net>
14173
14174         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14175
14176 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14177
14178         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14179         "one's complement" -> "ones' complement" in comment, as per Knuth.
14180         "value of type" -> "type or expression" in comment.
14181         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14182
14183 2005-03-26  Jim Meyering  <jim@meyering.net>
14184
14185         Comment nits.
14186         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14187         Correct typos: s/or/of/.
14188
14189 2005-03-26  Jim Meyering  <jim@meyering.net>
14190
14191         * modules/check-include-files: Move to ../ and rename to...
14192         * check-module: ...this.
14193
14194 2005-03-25  Jim Meyering  <jim@meyering.net>
14195
14196         * modules/xvasprintf (Files): Add xalloc.h.
14197
14198 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14199
14200         * modules/gettext (Files): config/config.rpath ->
14201         build-aux/config.rpath
14202         * modules/iconv (Files): Likewise.
14203         Problem reported by Oskar Liljeblad.
14204
14205 2005-03-23  Jim Meyering  <jim@meyering.net>
14206
14207         * modules/check-include-files: New script to check for
14208         missing dependencies, multiple includes, etc.
14209
14210         * modules/c-strtold (Depends-on): Add xalloc.
14211         * modules/c-strtod (Depends-on): Add xalloc.
14212         * modules/hash (Depends-on): Add xalloc.
14213         (Files): Remove lib/xalloc.h.
14214
14215         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14216         * modules/userspec (Files): Add lib/inttostr.h.
14217
14218 2005-03-23  Jim Meyering  <jim@meyering.net>
14219
14220         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14221
14222 2005-03-22  Jim Meyering  <jim@meyering.net>
14223
14224         * modules/stat-macros: New module.
14225         * modules/canonicalize, modules/euidaccess, modules/file-type,
14226         * modules/filemode, modules/lchown, modules/makepath,
14227         * modules/rmdir, modules/stat: Depend on new stat-macros module
14228         rather than listing lib/stat-macros.h manually.
14229         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14230
14231 2005-03-22  Jim Meyering  <jim@meyering.net>
14232
14233         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14234
14235 2005-03-22  Bruno Haible  <bruno@clisp.org>
14236
14237         * config/srclist.txt: Replace target directory 'config' with
14238         'build-aux'.
14239         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14240         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14241         ../build-aux/.
14242
14243 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14244
14245         * modules/chdir-long (Depends-on): Add mempcpy.
14246
14247         * modules/acl, modules/backupfile, modules/c-strtod,
14248         modules/c-strtold, modules/canon-host, modules/canonicalize,
14249         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14250         modules/exclude, modules/exitfail, modules/file-type,
14251         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14252         modules/getdate, modules/getline, modules/getpagesize,
14253         modules/getpass, modules/getugroups, modules/group-member,
14254         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14255         modules/inttostr, modules/long-options, modules/makepath,
14256         modules/md5, modules/memcasecmp, modules/memcoll,
14257         modules/modechange, modules/mountlist, modules/path-concat,
14258         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14259         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14260         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14261         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14262         modules/strftime, modules/strndup, modules/strverscmp,
14263         modules/timespec, modules/unlocked-io, modules/userspec,
14264         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14265         modules/yesno:
14266         Remove lib_SOURCES line from Makefile.am section, as this is now
14267         done automatically by the corresponding Autoconf macro.
14268
14269 2005-03-21  Jim Meyering  <jim@meyering.net>
14270
14271         Changes imported from coreutils.
14272
14273         * lib/cycle-check.c: Don't include xalloc.h.
14274
14275         * lib/path-concat.c: Don't include assert.h.
14276         (path_concat): Remove assertion that would have triggered
14277         for ABASE starting with more than one slash.
14278         Reported by Andreas Schwab.
14279
14280         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14281         properly when ABASE is an absolute file name.
14282         Correct the description of this function.
14283         Include <assert.h>.
14284         Add an assertion and a test driver.
14285         This fixes a bug introduced on 2004-07-02.
14286         Andreas Schwab reported the resulting failure of cp --parents:
14287         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14288
14289 2005-03-21  Jim Meyering  <jim@meyering.net>
14290
14291         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14292         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14293
14294 2005-03-21  Jim Meyering  <jim@meyering.net>
14295         and  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14298         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14299         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14300         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14301         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14302         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14303         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14304         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14305         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14306         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14307         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14308         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14309         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14310         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14311         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14312         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14313         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14314         for these modules.
14315
14316 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14317
14318         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14319         (which shouldn't happen), generate nothing instead of returning 0
14320         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14321
14322 2005-03-16  Bruno Haible  <bruno@clisp.org>
14323
14324         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14325         HAVE_LONGLONG_64BIT.
14326
14327 2005-03-16  Bruno Haible  <bruno@clisp.org>
14328
14329         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14330         HAVE_LONGLONG_64BIT.
14331
14332 2005-03-16  Bruno Haible  <bruno@clisp.org>
14333
14334         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14335         HAVE_LONGLONG_64BIT.
14336
14337 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14338
14339         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14340         reliably distinguish strftime failure from empty output on POSIX
14341         hosts.
14342
14343 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14344
14345         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14346         (iconv_string): Don't guess a size-zero buffer, as that might cause
14347         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14348         result would be 'too large', where 'too large' is (heuristically)
14349         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14350         overflow concerns.  This will prevent some unwanted malloc failures
14351         when the inputs are very large.
14352
14353 2005-03-15  Karl Berry  <karl@gnu.org>
14354
14355         * config/srclist.txt (config.rpath): from gettext.
14356         * config/config.rpath: update.
14357
14358 2005-03-15  Bruno Haible  <bruno@clisp.org>
14359
14360         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14361         to 'negate'.
14362
14363         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14364         variable.
14365
14366         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14367         results.
14368
14369 2005-03-14  Simon Josefsson  <jas@extundo.com>
14370
14371         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14372         <fx@gnu.org>.
14373
14374 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14375
14376         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14377         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14378         intprops.h.
14379         * lib/strtol.c: Likewise.
14380
14381 2005-03-14  Jim Meyering  <jim@meyering.net>
14382
14383         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14384         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14385         to be nonzero so that we (and caller) can detect the difference
14386         between a valid zero-length expansion and an error return, even
14387         when the underlying strftime fails before writing anything into
14388         that location.
14389
14390 2005-03-14  Bruno Haible  <bruno@clisp.org>
14391
14392         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14393         Update from GNU gettext 0.14.3.
14394
14395 2005-03-10  Jim Meyering  <jim@meyering.net>
14396
14397         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14398
14399 2005-03-10  Jim Meyering  <jim@meyering.net>
14400
14401         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14402         so that this module works on systems without fchdir.
14403
14404 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14405
14406         Factor int-properties macros into a single file, except for
14407         glibc-related files.
14408         * lib/intprops.h: New file.
14409         * lib/getloadavg.c: Include it instead of limits.h.
14410         (INT_STRLEN_BOUND): Remove.
14411         * lib/human.c: Include intprops.h.
14412         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14413         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14414         302/1000.
14415         * lib/inttostr.h: Include intprops.h instead of limits.h.
14416         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14417         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14418         for consistency with intprops.h.
14419         (time_t_is_integer, twos_complement_arithmetic): Use them.
14420         * lib/sig2str.h: Include <signal.h>, intprops.h.
14421         (INT_STRLEN_BOUND): Remove.
14422         * lib/strftime.c (TYPE_SIGNED): Remove.
14423         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14424         * lib/strtol.c: Adjust comments to match intprops.h.
14425         * lib/userspec.c: Include intprops.h.
14426         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14427         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14428         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14429         instead of rolling our own expressions.
14430         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14431
14432         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14433         instead of int.
14434         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14435         the right thing even if adding 1900 would overflow.  Similarly
14436         for tm_mon + 1 and tm_yday + 1.
14437         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14438         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14439         (DO_SIGNED_NUMBER): New macro.
14440         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14441
14442 2005-03-07  Bruno Haible  <bruno@clisp.org>
14443
14444         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14445
14446 2005-03-07  Bruno Haible  <bruno@clisp.org>
14447
14448         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14449
14450 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14451
14452         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14453         (func_import): Only replace files via --import when they have actually
14454         changed.
14455
14456 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14457
14458         * m4/mmap-anon.m4: New file.
14459         * m4/pagealign_alloc.m4: New file.
14460
14461 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14462             Bruno Haible  <bruno@clisp.org>
14463
14464         * modules/pagealign_alloc: New file.
14465         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14466
14467 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14468             Bruno Haible  <bruno@clisp.org>
14469
14470         * lib/pagealign_alloc.h: New file.
14471         * lib/pagealign_alloc.c: New file.
14472
14473 2005-03-03  Bruno Haible  <bruno@clisp.org>
14474
14475         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14476         Use an all-permissive copyright notice, recommended by RMS.
14477
14478 2005-03-02  Bruno Haible  <bruno@clisp.org>
14479
14480         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14481         of AIX, the replacement has to be done only after <string.h> is
14482         included, therefore not in config.h. stpncpy.h does the replacement,
14483         and stpncpy.c uses it.
14484
14485 2005-03-02  Bruno Haible  <bruno@clisp.org>
14486
14487         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14488         stpncpy.c uses it.
14489
14490 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14491
14492         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14493         The workaround isn't strictly needed for POSIX conformance, and
14494         it's too much of a pain to configure and maintain.  We'll ask
14495         people to fix their kernels instead.
14496         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14497         (NANOSLEEP_BUG_WORKAROUND): Remove.
14498         (xnanosleep): Remove the workaround.
14499
14500 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14501
14502         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14503         Reported by Derek Price.
14504         (Include): Add "timespec.h".
14505
14506         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14507
14508 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14509
14510         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14511         to detect nanosleep bug.
14512
14513 2005-03-01  Bruno Haible  <bruno@clisp.org>
14514
14515         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14516
14517 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         * modules/gethrxtime: New file.
14520         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14521         (Depends-on): Add gethrxtime.
14522         (configure.ac): Add gl_XNANOSLEEP.
14523         (Makefile.am): Remove lib_SOURCES line.
14524
14525 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14526
14527         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14528         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14529
14530 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14531
14532         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14533         * lib/timespec.h (gettime): Return void, since it always
14534         succeeds now.  All uses changed.
14535         * lib/gettime.c (gettime) Likewise.
14536         [HAVE_NANOTIME]: Prefer nanotime.
14537         Assume gettimeofday succeeds, as POSIX requires.
14538         Assime time () succeeds, since other code already does.
14539         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14540         (timespec_subtract): Remove.
14541         (NANOSLEEP_BUG_WORKAROUND): New constant.
14542         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14543         things considerably.  Use it only on GNU/Linux hosts, since the
14544         workaround shouldn't be needed elsewhere.
14545
14546 2005-02-24  Bruno Haible  <bruno@clisp.org>
14547
14548         * modules/gettext (Files): Add m4/glibc2.m4.
14549
14550 2005-02-24  Bruno Haible  <bruno@clisp.org>
14551
14552         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14553         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14554         * m4/progtest.m4:
14555         Update from GNU gettext 0.14.2.
14556         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14557
14558 2005-02-24  Bruno Haible  <bruno@clisp.org>
14559
14560         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14561         * lib/config.charset: Update from GNU gettext 0.14.2.
14562
14563 2005-02-24  Bruno Haible  <bruno@clisp.org>
14564
14565         * lib/gettext.h: Update from GNU gettext 0.14.2.
14566
14567 2005-02-23  Simon Josefsson  <jas@extundo.com>
14568
14569         * m4/iconvme.m4: New file.
14570
14571 2005-02-23  Jim Meyering  <jim@meyering.net>
14572
14573         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14574         change.
14575         Thanks to Bruno Haible for catching it.
14576
14577 2005-02-22  Simon Josefsson  <jas@extundo.com>
14578
14579         * modules/iconvme: New file.
14580
14581         * MODULES.html.sh: Add iconvme.
14582
14583 2005-02-22  Simon Josefsson  <jas@extundo.com>
14584
14585         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14586
14587 2005-02-22  Simon Josefsson  <jas@extundo.com>
14588
14589         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14590
14591 2005-02-22  Jim Meyering  <jim@meyering.net>
14592
14593         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14594         s/ifndef/ifdef/.
14595
14596 2005-02-20  Neil Conway  <neilc@samurai.com>
14597
14598         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14599         returned by OSX/Darwin if the specified buffer is not large
14600         enough for the hostname.
14601
14602 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14603
14604         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14605         pass it to _help, otherwise the latter coredumps trying to
14606         dereference state.root_argp.
14607
14608 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14609
14610         * modules/chdir-long (Depends-on): Add memrchr.
14611         * modules/memrchr (Files): Add lib/memrchr.h.
14612         (Include): "memrchr.h".
14613
14614 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14615
14616         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14617
14618 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14619
14620         * lib/memrchr.h: New file.
14621         * lib/chdir-long.c: Include it.
14622         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14623         Don't bother including stddef.h.
14624
14625 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14626
14627         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14628         inclusion.
14629         Include <sys/types.h>, for dev_t.
14630         (ME_DUMMY, ME_REMOTE): Move from here....
14631         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14632         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14633         Dmitry V. Levin.
14634         Include mountlist.h first, to test the interface.
14635
14636 2005-01-29  Bruno Haible  <bruno@clisp.org>
14637
14638         * lib/progname.c (program_name): Initialize.
14639         Needed when linking statically on MacOS X.
14640
14641 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14642
14643         Sync from coreutils.
14644         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14645         (Depends-on): Add c-strtod.
14646         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14647
14648 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14649
14650         Sync from coreutils.
14651         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14652
14653         Remove files that are specific to coreutils.
14654         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14655
14656 2005-01-28  Bruno Haible  <bruno@clisp.org>
14657
14658         * modules/javacomp: New file.
14659         * MODULES.html.sh (Java): Add javacomp.
14660
14661 2005-01-28  Bruno Haible  <bruno@clisp.org>
14662
14663         * m4/javacomp.m4: New file, from GNU gettext.
14664
14665 2005-01-28  Bruno Haible  <bruno@clisp.org>
14666
14667         * lib/javacomp.sh.in: New file, from GNU gettext.
14668         * lib/javacomp.h: New file, from GNU gettext.
14669         * lib/javacomp.c: New file, from GNU gettext.
14670
14671 2005-01-26  Simon Josefsson  <jas@extundo.com>
14672
14673         * lib/gai_strerror.c: Use GPL in header.
14674
14675 2005-01-26  Bruno Haible  <bruno@clisp.org>
14676
14677         * modules/javaexec: New file.
14678         * MODULES.html.sh (Java): Add javaexec.
14679
14680 2005-01-26  Bruno Haible  <bruno@clisp.org>
14681
14682         * m4/javaexec.m4: New file, from GNU gettext.
14683
14684 2005-01-26  Bruno Haible  <bruno@clisp.org>
14685
14686         * lib/javaexec.sh.in: New file, from GNU gettext.
14687         * lib/javaexec.h: New file, from GNU gettext.
14688         * lib/javaexec.c: New file, from GNU gettext.
14689
14690 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14691
14692         * modules/lchown (Depends-on): Remove lchown.h
14693
14694 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14695
14696         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14697         must be defined if the header file was not found, in order
14698         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14699
14700 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14701
14702         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14703         initializers for struct pentry_state.
14704         (__argp_error): Check return value of __asprintf
14705         (__argp_failure): Translate error message
14706
14707         * lib/argp-parse.c: Removed braces around the expansion of N_()
14708
14709 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14710
14711         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14712         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14713         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14714         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14715         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14716         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14717         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14718         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14719         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14720         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14721         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14722         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14723         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14724         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14725         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14726         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14727         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14728         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14729         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14730         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14731         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14732         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14733         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14734         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14735         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14736         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14737         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14738         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14739         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14740         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14741         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14742         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14743         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14744         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14745         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14746         Use an all-permissive copyright notice, recommended by RMS.
14747
14748 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14749
14750         * modules/chdir-long (Depends-on): Remove mempcpy.
14751
14752 2005-01-21  Jim Meyering  <jim@meyering.net>
14753
14754         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14755         same value as for Solaris 9.
14756
14757         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14758         component length.  This included changing the parameter to be
14759         of type `char *' rather than `char const *'.
14760         * lib/chdir-long.h (chdir_long): Update prototype.
14761
14762         * lib/openat.c (fdopendir, fstatat): New functions.
14763         * lib/openat.h: Include headers required for use of DIR and struct
14764         stat.
14765         [AT_SYMLINK_NOFOLLOW]: Define.
14766         (fdopendir, fstatat): Add prototypes.
14767
14768 2005-01-21  Bruno Haible  <bruno@clisp.org>
14769
14770         * modules/classpath: New file.
14771         * MODULES.html.sh (Java): Add classpath.
14772
14773 2005-01-21  Bruno Haible  <bruno@clisp.org>
14774
14775         * lib/classpath.h: New file, from GNU gettext.
14776         * lib/classpath.c: New file, from GNU gettext.
14777
14778 2005-01-20  Simon Josefsson  <jas@extundo.com>
14779
14780         * modules/version-etc-fsf: New file.
14781
14782 2005-01-20  Simon Josefsson  <jas@extundo.com>
14783
14784         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14785         * lib/version-etc.c: Remove version_etc_copyright.
14786         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14787         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14788
14789 2005-01-20  Simon Josefsson  <jas@extundo.com>
14790
14791         * lib/base64.h (isbase64): Add.
14792
14793         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14794         using a unsigned prototype, don't inline.
14795         (base64_decode): Use it.
14796
14797 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14798
14799         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14800         it.
14801
14802 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14803
14804         * lib/save-cwd.c (save_cwd): Remove code to support the case
14805         where fchdir is missing or flaky.
14806
14807 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14808
14809         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14810
14811 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14812
14813         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14814         AC_LIBSOURCES now does this.
14815         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14816         with new ullong_max module.
14817
14818 2005-01-19  Bruno Haible  <bruno@clisp.org>
14819
14820         * modules/sh-quote: New file.
14821         * MODULES.html.sh (Executing programs): Add sh-quote.
14822
14823 2005-01-19  Bruno Haible  <bruno@clisp.org>
14824
14825         * lib/sh-quote.h: New file, from GNU gettext.
14826         * lib/sh-quote.c: New file, from GNU gettext.
14827
14828 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14829
14830         Merge from coreutils.
14831         * m4/ullong_max.m4: New file.
14832         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14833         (gl_MACROS): Assume localeconv exists.
14834
14835 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14836
14837         Merge changes from coreutils, as described below in several
14838         changelogs dated today.
14839
14840         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14841         (O_DIRECTORY): Remove; not needed here, since "." must be
14842         a directory.  All uses removed.
14843         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14844         universal on Suns, and we also need to test for IRIX.
14845         Revamp code to use 'if' rather than '#if'.
14846         Avoid unnecessary comparison of cwd->desc to 0.
14847
14848         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14849         for known valid error numbers rather than observed invalid ones.
14850
14851 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14852
14853         * modules/ullong_max: New file.
14854
14855         * modules/chdir-long, modules/openat: New files.
14856         * modules/save-cwd (Depends-on): Depend on chdir-long.
14857         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14858
14859 2005-01-18  Jim Meyering  <jim@meyering.net>
14860
14861         Merge from coreutils.
14862         * m4/chdir-long.m4, m4/openat.m4: New files.
14863         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14864         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14865         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14866         is sane and DOES follow symlinks.  Besides, testing 20 different
14867         systems found no broken chown implementations.
14868         Prompted by a change in rsync's copy of this macro.
14869         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14870
14871         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14872
14873         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14874         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14875         NULL-means-set-to-current-time semantics.
14876         Remove temporary file immediately, rather than waiting
14877         for configure's at-exit trap code to do it.
14878
14879 2005-01-18  Jim Meyering  <jim@meyering.net>
14880
14881         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14882
14883         * lib/utimens.c (futimens): Account for the fact that futimes
14884         can also fail with errno == ENOSYS or errno == ENOENT.
14885         Patch from Dmitry V. Levin.
14886
14887         Change the name of the robust chdir function from chdir to chdir_long.
14888         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14889         (restore_cwd): Use chdir_long, not chdir.
14890         * lib/chdir-long.c: Renamed from chdir.c.
14891         * lib/chdir-long.h: Renamed from chdir.h.
14892         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14893         Hurd.
14894
14895 2005-01-18  Bruno Haible  <bruno@clisp.org>
14896
14897         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14898         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14899         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14900         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14901         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14902         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14903         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14904         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14905         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14906         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14907         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14908         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14909         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14910         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14911         Use an all-permissive copyright notice, recommended by RMS.
14912
14913 2005-01-18  Bob Proulx  <bob@proulx.com>
14914
14915         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14916         simplify offsetof() macro construct to avoid compile failure with
14917         native HP-UX 11.0 ANSI C compiler.
14918
14919 2005-01-17  Bruno Haible  <bruno@clisp.org>
14920
14921         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14922         redundant because stpncpy.m4 takes care of it.
14923
14924 2005-01-17  Bruno Haible  <bruno@clisp.org>
14925
14926         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14927
14928 2005-01-17  Bruno Haible  <bruno@clisp.org>
14929
14930         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14931         used.
14932
14933 2005-01-17  Bruno Haible  <bruno@clisp.org>
14934
14935         * lib/fwriteerror.h (fwriteerror): Change specification to include
14936         fclose.
14937         * lib/fwriteerror.c: Include <stdbool.h>.
14938         (fwriteerror): At the end, close the file stream. Record whether
14939         stdout was already closed.
14940
14941 2005-01-17  Bruno Haible  <bruno@clisp.org>
14942
14943         * lib/execute.c (environ): Declare if needed.
14944         * lib/pipe.c (environ): Likewise.
14945         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14946
14947 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14948
14949         * modules/argp: Depend on vsnprintf
14950
14951 2005-01-10  Jim Meyering  <jim@meyering.net>
14952
14953         * modules/closeout (Depends-on): Add atexit.
14954
14955 2005-01-06  Bruno Haible  <bruno@clisp.org>
14956
14957         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
14958
14959 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
14960
14961         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
14962         definitions to be after all include files, to avoid collisions.
14963         Problem reported by Bob Proulx.
14964
14965 2005-01-04  Jim Meyering  <jim@meyering.net>
14966
14967         Changes imported from coreutils.
14968         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
14969         as the mkstemp template, use a temporary directory and an
14970         8.3-friendly template to avoid trouble on systems like DJGPP.
14971         Reported by Juan M. Guerrero via Stepan Kasal.
14972         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
14973         close. Remove the temporary directory right away, rather than waiting
14974         for configure's at-exit trap code to do it.
14975         Suggestion from Stepan Kasal.
14976
14977 2005-01-01  Simon Josefsson  <jas@extundo.com>
14978
14979         * gnulib-tool: Print #include directives when --import'ing.
14980
14981 2004-12-28  Simon Josefsson  <jas@extundo.com>
14982
14983         * tests/test-base64.c: Include required header files.  Remove
14984         unused variables.
14985
14986 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14987
14988         * modules/error (Depends-on): Remove gettext.
14989
14990 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
14991
14992         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
14993         not needed.  This removes a dependency on the gettext module.
14994         [defined _LIBC]: Do not include <libintl.h>; not needed.
14995
14996 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
14997
14998         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
14999         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15000
15001 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15002
15003         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15004         HAVE_DECL_STRTOLD.
15005
15006 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15007
15008         * modules/getdate (Depends-on): Remove alloca-opt.
15009
15010 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15011
15012         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15013
15014 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15015
15016         * lib/argp-parse.c: Include <stddef.h>.
15017         (alignof, alignto): New macros.
15018         (parser_init): Don't assume that void * is aligned sufficiently
15019         for struct option.
15020
15021         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15022         need to extend the stack.
15023         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15024         large.
15025
15026 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15027
15028         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15029
15030 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15031
15032         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15033         (2004-10-24) change.  Apparently this was a false alarm.
15034
15035         * modules/getdate: Depend on alloca-opt, not alloca.
15036
15037 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15038
15039         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15040         Remove now-obsolete comment about AIX.
15041         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15042         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15043         (YYMAXDEPTH): New macro.
15044
15045 2004-12-18  Simon Josefsson  <jas@extundo.com>
15046
15047         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15048
15049 2004-12-18  Bruno Haible  <bruno@clisp.org>
15050
15051         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15052
15053 2004-12-18  Bruno Haible  <bruno@clisp.org>
15054
15055         * lib/fatal-signal.c (fatal_signals): Make non-const.
15056         (init_fatal_signals): New function.
15057         (uninstall_handlers, install_handlers): Ignore signals that were set to
15058         SIG_IGN.
15059         (at_fatal_signal): Call init_fatal_signals.
15060         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15061         SIG_IGN.
15062         Reported by Paul Eggert.
15063
15064 2004-12-18  Bruno Haible  <bruno@clisp.org>
15065
15066         * doc/alloca.texi: New file.
15067         * doc/alloca-opt.texi: New file.
15068
15069 2004-12-17  Jim Meyering  <jim@meyering.net>
15070
15071         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15072         Otherwise, install-sh could exit with improper exit status when
15073         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15074
15075 2004-12-16  Simon Josefsson  <jas@extundo.com>
15076
15077         * tests/test-base64.c: Add license.
15078
15079 2004-12-15  Stepan Kasal  <address@hidden>
15080
15081         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15082
15083 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15084
15085         * modules/getcwd (Files): Add m4/d-ino.m4.
15086         Suggested by Mark D. Baushke.
15087
15088 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15089
15090         * lib/getdate.y (textint): New member "negative".
15091         (time_zone_hhmm): New function.
15092         Expect 14 shift-reduce conflicts, not 13.
15093         (o_colon_minutes): New rule.
15094         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15095         (yylex): Set the "negative" member of signed numbers.
15096
15097 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15098
15099         * doc/getdate.texi (Time of day items, Time zone items):
15100         Describe new formats +00:00, UTC+00:00.
15101
15102 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15103
15104         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15105         spurious "-l"s.  Problem reported by Stepan Kasal.
15106
15107 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15108
15109         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15110         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15111
15112 2004-12-04  Simon Josefsson  <jas@extundo.com>
15113
15114         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15115         Vandoorselaere <yoann@prelude-ids.org>.
15116
15117 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15118
15119         Changes imported from coreutils.
15120         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15121         exist.
15122         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15123
15124 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15125
15126         Changes imported from coreutils.
15127         * lib/hard-locale.c: Assume <locale.h> exists.
15128         Include "strdup.h".
15129         (GLIBC_VERSION): New macro.
15130         (hard_locale): Assume setlocale exists.
15131         Rewrite to avoid #ifdef.
15132         Use strdup rather than malloc + strcpy.
15133         * lib/human.c: Assume <locale.h> exists.
15134         (human_readable): Assume localeconv exists.
15135
15136 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15137
15138         * modules/hard-locale (Depends-on): Add strdup.
15139
15140 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15141
15142         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15143         convert T2, not T.  (Imported from libc.)
15144
15145 2004-11-30  Simon Josefsson  <jas@extundo.com>
15146
15147         * modules/restrict (License): Change to LGPL.
15148
15149 2004-11-30  Simon Josefsson  <jas@extundo.com>
15150
15151         * m4/restrict.m4: Add copyright and copying conditions.
15152
15153 2004-11-30  Simon Josefsson  <jas@extundo.com>
15154
15155         * m4/base64.m4: New file.
15156
15157 2004-11-30  Simon Josefsson  <jas@extundo.com>
15158
15159         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15160         base64.
15161
15162         * tests/test-base64.c: New file.
15163
15164         * modules/base64: New file.
15165
15166 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15167
15168         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15169         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15170
15171         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15172
15173 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15174
15175         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15176         (__getcwd.c): Don't restore errno; glibc doesn't.
15177         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15178         first, falling back to our code only if its results look suspicious.
15179         Ensure that the resulting buffer is only as large as necessary.
15180
15181         * lib/readutmp.c: Include readutmp.h first.
15182         Include <errno.h>, since readutmp.h no longer does that.
15183         * lib/readutmp.h: Don't include <errno.h>,
15184         <sys/param.h>, <time.h>; not needed to establish interface.
15185         (errno): Remove decl.
15186         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15187         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15188         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15189
15190 2004-11-28  Simon Josefsson  <jas@extundo.com>
15191
15192         * lib/base64.h, base64.c: New file.
15193
15194 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15195
15196         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15197
15198 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15199
15200         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15201         (Depends-on): Remove pathmax, same.  Add mempcpy.
15202         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15203         (Makefile.am): Append getcwd.h to lib_SOURCES.
15204         (Include): Add getcwd.h.
15205         (Maintainer): Change from Jim Meyering to "all, glibc",
15206         since getdate now uses intended-for-glibc code.
15207         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15208         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15209
15210 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15211
15212         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15213         HP's ANSI C compiler.
15214         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15215         Declaring int functions causes warnings on some modern systems and
15216         shouldn't be needed to compile on ancient ones.
15217         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15218         defined.
15219
15220         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15221         with the following changes.
15222         (__set_errno): Parenthesize properly.
15223         Include <stdbool.h>.
15224         (MIN, MAX, MATCHING_INO): New macros.
15225         (__getcwd): Define with prototype, not K&R form.
15226         Use heuristics to allocate default buffer on stack if possible.
15227         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15228         behavior, and to avoid the PATH_MAX limit when computing
15229         ../../../../...
15230         Use MATCHING_INO to compare inode number to file.
15231         Check for arithmetic overflow in size calculations.
15232         Fix bug in reallocation of dot array that caused getcwd to fail
15233         on directories nested deeper than 75.
15234         Be more careful about saving errno on error.
15235         Do not use realloc; use only free+malloc, as this is a bit
15236         more flexible and avoids a needless copy operation.
15237         Do not inspect st_dev and st_ino for symbolic links; POSIX
15238         doesn't specify the latter.
15239         Check for closedir errors.
15240         Avoid needless casts.
15241         Use "#ifdef weak_alias" around weak_alias, to be like other
15242         glibc code.
15243         The following changes to getcwd.c have effect only when used in
15244         gnulib; they have no effect inside glibc proper.
15245         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15246         as alloca isn't used.
15247         (alloca, __alloca): Likewise.
15248         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15249         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15250         unconditionally, as gnulib assumes C89 or better.
15251         Do not include <sys/param.h>.
15252         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15253         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15254         better.
15255         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15256         Include <dirent.h> in a way that is compatible with modern Autoconf.
15257         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15258         New macros, if not already defined.
15259         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15260         Use "_LIBC", not "defined _LIBC", for consistency.
15261         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15262         a mempcpy module.
15263         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15264         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15265         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15266         credit only to Jim Meyering and adjust the copyright dates.
15267         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15268         <stdlib.h>, <unistd.h>, "pathmax.h".
15269         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15270         (INITIAL_BUFFER_SIZE): Remove.
15271         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15272
15273 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15274
15275         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15276         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15277         Use the _ONCE methods, for efficiency.
15278         Check for fcntl.h.  In test program, include <errno.h>
15279         and <fcntl.h> if available.  Remove old K&R cruft from
15280         test program.  Check for common errors in GNU/Linux,
15281         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15282         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15283         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15284         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15285         name accordingly.
15286         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15287         accommodate new getcwd.c.
15288         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15289         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15290         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15291         that's all we need now.
15292
15293 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15294
15295         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15296         argp-parse.c depends on getopt internals, that means we should
15297         always use our getopt, to be on the safe side.
15298         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15299         order not to spoil the result of an eventual previous invocation
15300         of gl_GETOPT_SUBSTITUTE.
15301
15302 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15303
15304         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15305         redefinition warnings. To avoid them, include the defines
15306         in `#if !defined __need_getopt ... #endif'. The only place
15307         where __getopt_argv_const is used is in definitions
15308         of getopt_long and getopt_long_only below, which are as well
15309         protected by `#ifndef __need_getopt'.
15310         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15311         __need_getopt after including <stdio.h> and <unistd.h> These
15312         headers might have defined it.
15313
15314 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15315
15316         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15317
15318 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15319
15320         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15321         (futimens): New function, which uses futimes if available.
15322         (futimens, utimens): Support timespec==NULL, with same semantics
15323         as utime and utimens.
15324         * lib/utimens.h (futimens): New decl.
15325
15326 2004-11-23  Jim Meyering  <jim@meyering.net>
15327
15328         * lib/getopt_.h: Remove trailing blanks.
15329
15330 2004-11-23  Jim Meyering  <jim@meyering.net>
15331
15332         * lib/__fpending.c: Add comment.
15333
15334 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15335
15336         * modules/canonicalize (Depends-on): Add xreadlink.
15337         Problem reported by James Youngman.
15338
15339 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15340
15341         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15342         New macros.
15343         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15344         optopt): Use them instead of invoking ## directly; otherwise, the
15345         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15346
15347 2004-11-19  Bruno Haible  <bruno@clisp.org>
15348
15349         * lib/strtok_r.c: Move comments from here...
15350         * lib/strtok_r.h: ... to here.
15351
15352 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15353
15354         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15355         implementations that mishandle size_t overflow.
15356
15357 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15358
15359         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15360         might fail.  Problem reported by Yoann Vandoorselaere.
15361         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15362         implementations that mishandle size_t overflow.
15363
15364 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15365
15366         * modules/canon-host (Depends-on): Add strdup.
15367
15368 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15369
15370         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15371
15372 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15373
15374         * lib/canon-host.c: Include "strdup.h".
15375         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15376         Use strdup instead of malloc/strcpy to duplicate strings.
15377
15378         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15379         (human_space_before_unit): New constant.
15380         * lib/human.c (human_readable): Support it.
15381
15382         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15383         (xgetcwd): Set errno correctly when failing.
15384         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15385         the failure is actually due to a PATH_MAX problem.
15386
15387         Further getopt changes to make it more likely that glibc will
15388         buy the changes back.
15389         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15390         (getopt): Use it, so to preserve glibc semantic
15391         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15392         when compiling for libc.
15393         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15394         (getopt_long, getopt_long_only): Use it.
15395
15396         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15397         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15398         (getopt): Argv is now char * const *, as per standard.
15399         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15400         not char *__getopt_argv_const *.
15401         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15402         _getopt_long_only_r): Likewise.
15403         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15404         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15405         _getopt_long_r, _getopt_long_only_r): Likewise.
15406         * lib/getopt_.h (__getopt_argv_const): Remove.
15407         (getopt): Argv is now char * const *, as per standard.
15408
15409         * lib/getdate.y (tORDINAL): New token.
15410         (day, relunit): Allow it for relative times.
15411         (relative_time_table): Use tORDINAL for ordinals.
15412
15413 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15414
15415         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15416         Document that "second" isn't allowed as an ordinal number.
15417
15418 2004-11-16  Jim Meyering  <jim@meyering.net>
15419
15420         * modules/closeout (Depends-on): Add fpending.
15421
15422 2004-11-15  Jim Meyering  <jim@meyering.net>
15423
15424         * lib/closeout.c: Include "__fpending.h" once again.
15425         Include <stdbool.h>.
15426         (close_stdout): Don't fail just because stdout was closed initially,
15427         since some programs don't write to stdout in the normal course of
15428         operation (other than --version and --help), and we don't want this
15429         function to make e.g. `touch file >&-' fail.
15430         But do fail if it was closed and someone has tried to write to it.
15431         E.g., `printf foo >&-' must fail.
15432
15433 2004-11-13  Jim Meyering  <jim@meyering.net>
15434
15435         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15436
15437 2004-11-12  Simon Josefsson  <jas@extundo.com>
15438
15439         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15440         small doc fix is still pending.
15441
15442 2004-11-11  Simon Josefsson  <jas@extundo.com>
15443
15444         * modules/strtok_r: New file.
15445
15446         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15447         strtok_r.
15448
15449 2004-11-11  Simon Josefsson  <jas@extundo.com>
15450
15451         * m4/strtok_r.m4: New file.
15452
15453         * m4/getopt.m4: Replace opterr.
15454
15455 2004-11-11  Simon Josefsson  <jas@extundo.com>
15456
15457         * lib/strtok_r.h, strtok_r.c: New file.
15458
15459 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15460
15461         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15462         of replacing opterr, getopt, etc.  This should handle the
15463         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15464
15465 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15466
15467         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15468         we can stop lying to compilers about the constness of argv when we
15469         are compiled outside glibc.
15470         (getopt, getopt_long, getopt_long_only): Use it.
15471         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15472         _getopt_internal, getopt): Likewise.
15473         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15474         _getopt_long_only_r): Likewise.
15475         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15476         _getopt_long_r, _getopt_long_only_r): Likewise.
15477
15478         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15479         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15480         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15481         the other external symbols.
15482         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15483         declaration, since the above renaming now works around collisions.
15484
15485 2004-11-11  Jim Meyering  <jim@meyering.net>
15486
15487         * lib/linebreak.c: Remove trailing blanks.
15488         * lib/alloca_.h: Likewise.
15489         * lib/acosl.c: Likewise.
15490         * lib/euidaccess.c: Likewise.
15491         * lib/allocsa.h: Likewise.
15492
15493 2004-11-10  Simon Josefsson  <jas@extundo.com>
15494
15495         * m4/getaddrinfo.m4: New file.
15496
15497 2004-11-10  Simon Josefsson  <jas@extundo.com>
15498
15499         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15500
15501 2004-11-10  Simon Josefsson  <jas@extundo.com>
15502
15503         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15504         getaddrinfo.
15505
15506         * modules/getaddrinfo: New file.
15507
15508 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15509
15510         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15511
15512 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15513
15514         * lib/mktime.c (SHR): New macro, which is a portable
15515         substitute for >> that should work even on Crays.
15516         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15517         Problem reported by Mark D. Baushke in
15518         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15519         * lib/getdate.y (SHR): Likewise.
15520         (tm_diff): Use it.
15521         * lib/strftime.c (SHR): Likewise.
15522         (tm_diff): Use it.
15523         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15524         quote_these_too, so that right shifts are well defined.  All uses
15525         changed.
15526
15527 2004-11-10  Jim Meyering  <jim@meyering.net>
15528
15529         Ensure that no close failure goes unreported.
15530         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15531         return early when it seems there's nothing to flush.
15532         Don't include __fpending.h.
15533
15534 2004-11-10  Jim Meyering  <jim@meyering.net>
15535
15536         * modules/closeout (Depends-on): Remove fpending.
15537
15538 2004-11-10  Jim Meyering  <jim@meyering.net>
15539
15540         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15541
15542 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15543
15544         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15545         gl_FUNC_STRFTIME.
15546         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15547         and AC_REQUIRE when possible, to avoid duplicate checks.
15548         Check for <wchar.h>.
15549
15550 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15551
15552         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15553
15554 2004-11-09  Bruno Haible  <bruno@clisp.org>
15555
15556         * m4/sockpfaf.m4: New file.
15557
15558 2004-11-05  Bruno Haible  <bruno@clisp.org>
15559
15560         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15561         Reported by Mark D. Baushke <mdb@cvshome.org>.
15562
15563 2004-11-04  Bruno Haible  <bruno@clisp.org>
15564
15565         2004-09-11  Bruno Haible  <bruno@clisp.org>
15566                 * allocsa.valgrind: New file.
15567         2004-02-06  Bruno Haible  <bruno@clisp.org>
15568                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15569                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15570                 Reported by Christopher Seip <chris.seip@hp.com>.
15571
15572 2004-11-04  Bruno Haible  <bruno@clisp.org>
15573
15574         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15575         (Makefile.am): Distribute it.
15576
15577 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15578
15579         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15580         with errno == ERANGE if the buffer is too small.
15581         Problem reported by Mark D. Baushke.
15582
15583 2004-11-03  Albert Chin  <china@thewrittenword.com>
15584             Paul Eggert  <eggert@cs.ucla.edu>
15585
15586         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15587         equivalent, substitute $ac_type for equivalent type rather than
15588         blindly using uint32_t *always* which won't work if uint32_t is not
15589         available.  Define _UINT32_T to work around typedef of uint32_t if
15590         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15591         2.5.1.
15592
15593 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15594
15595         * m4/jm-macros.m4: Sync from coreutils.
15596         (gl_MACROS): Check for mbrlen, for pathchk.
15597         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15598
15599 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15600
15601         * lib/xreadlink.c (MAXSIZE): New macro.
15602         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15603         size does not exceed MAXSIZE.  Avoid cast.
15604         As suggested by Mark D. Baushke in
15605         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15606         if readlink fails with buffer size just under MAXSIZE, try again
15607         with MAXSIZE.
15608
15609 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15610
15611         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15612
15613 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15614         and  Paul Eggert  <eggert@cs.ucla.edu>
15615
15616         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15617         (get_date): Overparenthesize to avoid GCC warning.
15618
15619 2004-11-02  Bruno Haible  <bruno@clisp.org>
15620
15621         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15622         returns void.
15623
15624 2004-11-02  Bruno Haible  <bruno@clisp.org>
15625
15626         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15627         function returns void.
15628
15629 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15630
15631         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15632         fflush_unlocked, flockfile, funlockfile, funlockfile,
15633         fputs_unlocked, putc_unlocked.
15634
15635 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15636
15637         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15638         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15639         already declared.
15640
15641 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15642
15643         * modules/getdate (Files): Add doc/getdate.texi.
15644         (Depends-on): Add setenv, xalloc.
15645
15646 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15647
15648         * lib/getdate.y: Add support for TZ="foo" within a date string.
15649         Fix some bugs near time_t boundaries.  Reject dates with
15650         out-of-range components, e.g., "Sept 31".
15651         Include <stdlib.h>, "setenv.h", "xalloc.h".
15652         (ISDIGIT_LOCALE): Remove; unused.
15653         Note that the TZ and time functions used here are not reentrant.
15654         (mktime_ok, get_tz): New functions.
15655         (TZBUFSIZE): New constant.
15656         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15657         This requires that we sometimes generate our own TZ="XXX..." setting.
15658
15659 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15660
15661         * doc/getdate.texi: New file, from coreutils with modifications for
15662         the new TZ parsing.
15663
15664 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15665
15666         * lib/mktime.c (not_equal_tm): Remove redundant check.
15667
15668 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15669
15670         * modules/regex (lib_SOURCES): Add regex.c.
15671         Reported by James Youngman in
15672         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15673
15674 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15675
15676         * lib/getdate.y: Use Bison 1.875 features, and some minor
15677         code cleanups.  This change does not affect semantics.
15678         Don't include <stdlib.h>; no longer needed.
15679         Don't include unlocked-io.h; only the "#if TEST" code uses
15680         stdio, and performance isn't crucial there.
15681         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15682         Bison 1.875 features as described below.
15683         All uses of "PC." replaced by "pc->".
15684         (YYSTYPE): Add a forward declaration.
15685         (yylex, yyerror): Use full prototypes in forward decls.
15686         Use "%pure-parser" rather than obsolescent "%pure_parser".
15687         Use %parse-param and %lex-param instead of obsolescent
15688         YYPARSE_PARAM and YYLEX_PARAM.
15689         (meridian_table, month_and_day_table, time_units_table,
15690         relative_time_table, time_zone_table, military_table,
15691         lookup_zone, lookup_word, get_date):
15692         Use NULL instead of 0 where appropriate.
15693         (to_hour): Avoid abort (), to avoid a dependency on
15694         stdlib.h.
15695         (yyerror, yylex): Now accepts parser_control * arg.
15696         (main) [TEST]: Use '\0' rather than 0 for char.
15697
15698 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15701
15702 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15703
15704         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15705         It's now the caller's responsibility to handle the case where
15706         !HAVE_GETPAGESIZE && !defined getpagesize.
15707
15708         * lib/mktime.c (leapyear): Arg is long int, not int.
15709
15710 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15711
15712         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15713
15714 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15715
15716         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15717         missing.  Problem reported by James Youngman.
15718
15719 2004-10-16  Simon Josefsson  <jas@extundo.com>
15720
15721         * gnulib-tool: Fix comments.  Fix parse problem.
15722         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15723
15724 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15725
15726         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15727         implementation of getopt_long.  Problem reported by Alexander Taler in:
15728         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15729
15730 2004-10-15  Bruno Haible  <bruno@clisp.org>
15731
15732         * gnulib-tool: Untabify. Initialize supplied_libname.
15733         (func_usage): More homogenous output.
15734         (func_modules_transitive_closure, func_modules_to_filelist,
15735         func_emit_lib_Makefile_am): New functions.
15736         (func_import): New function, extracted from big case statement. Use
15737         func_get_license, func_modules_transitive_closure,
15738         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15739         opt_lgpl. Don't use test -a, as it's not portable.
15740         (func_create_testdir): Use func_modules_transitive_closure,
15741         func_modules_to_filelist, func_emit_lib_Makefile_am.
15742
15743 2004-10-15  Bruno Haible  <bruno@clisp.org>
15744
15745         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15746
15747 2004-10-15  Bruno Haible  <bruno@clisp.org>
15748
15749         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15750         the portions belonging to each module.
15751         Suggested by Derek Robert Price <derek@ximbiot.com>.
15752
15753 2004-10-12  Simon Josefsson  <jas@extundo.com>
15754
15755         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15756         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15757         to real functions.
15758
15759 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15760
15761         * modules/vsnprintf: New file.
15762
15763 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15764
15765         * m4/vsnprintf.m4: New file.
15766
15767 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15768
15769         * lib/vsnprintf.h: New file.
15770         * lib/vsnprintf.c: New file.
15771
15772 2004-10-11  Bruno Haible  <bruno@clisp.org>
15773
15774         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15775         vsnprintf.
15776
15777 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15778
15779         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15780
15781 2004-10-07  Bruno Haible  <bruno@clisp.org>
15782
15783         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15784         fits into the provided buffer.
15785
15786 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15787
15788         * lib/diacrit.c, diacrit.h: Add GPL notice.
15789
15790         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15791         notice.
15792         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15793         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15794         This avoids a potential constant-folding bug.
15795
15796 2004-10-05  Bruno Haible  <bruno@clisp.org>
15797
15798         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15799         for the declaration of strsep.
15800
15801 2004-10-05  Bruno Haible  <bruno@clisp.org>
15802
15803         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15804
15805 2004-10-04  Simon Josefsson  <jas@extundo.com>
15806
15807         * modules/memmem: New file.
15808         * tests/test-memmem.c: New file.
15809         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15810
15811 2004-10-04  Simon Josefsson  <jas@extundo.com>
15812
15813         * m4/memmem.m4: New file.
15814
15815 2004-10-04  Simon Josefsson  <jas@extundo.com>
15816
15817         * lib/memmem.h: New file.
15818         * lib/memmem.c: New file, taken from glibc.
15819
15820 2004-10-04  Simon Josefsson  <jas@extundo.com>
15821
15822         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15823         '#ifdef USE_UNLOCKED_IO'.
15824
15825 2004-10-04  Simon Josefsson  <jas@extundo.com>
15826
15827         * config/srclist.txt: Add memmem from glibc.
15828
15829 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15830
15831         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15832
15833         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15834         modules/exclude, modules/getdate, modules/getline,
15835         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15836         modules/getusershell, modules/linebuffer, modules/md5,
15837         modules/mountlist, modules/posixtm, modules/readtokens,
15838         modules/readutmp, modules/regex, modules/sha1,
15839         modules/version-etc, modules/yesno:
15840         Remove dependency on unlocked-io.
15841
15842 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15843
15844         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15845
15846         * m4/unlocked-io.m4: Add copyright notice.
15847         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15848
15849 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15850
15851         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15852         * lib/xmalloc.c (xmemdup): Likewise.
15853         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15854         XFREE): Remove these long-obsolescent macros.
15855         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15856         * lib/xstrdup.c: Remove.
15857
15858         * lib/regex.c (re_comp): Cast gettext return value to char *,
15859         Problem reported by Martin Neitzel via Mark D. Baushke.
15860
15861 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15862
15863         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15864         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15865         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15866         regex.c, sha1.c, version-etc.c, yesno.c:
15867         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15868         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15869         the includer's responsibility.
15870
15871         Sync from coreutils.
15872
15873         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15874         points to the start of a string, as the C Standard says the
15875         resulting behavior is undefined.
15876
15877         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15878         simple -> simple_backups, numbered_existing ->
15879         numbered_existing_backups, numbered -> numbered_backups
15880         to avoid shadowing problems.  All uses changed.
15881         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15882         * lib/backupfile.c (check_extension, numbered_backup):
15883         Rename locals to avoid shadowing 'basename'.
15884         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15885         once.
15886
15887         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15888         * lib/.cvsignore: Add getopt.h.
15889
15890 2004-10-04  Bruno Haible  <bruno@clisp.org>
15891
15892         * modules/README: New file.
15893         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15894         not a module.
15895
15896 2004-10-02  Jim Meyering  <jim@meyering.net>
15897
15898         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15899
15900 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15901
15902         * modules/strsep: New file.
15903
15904 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15905
15906         * m4/strsep.m4: New file.
15907
15908 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15909
15910         * lib/strsep.h: New file.
15911         * lib/strsep.c: New file.
15912
15913 2004-10-01  Simon Josefsson  <jas@extundo.com>
15914
15915         * lib/snprintf.c (snprintf): Handle size==0.
15916
15917 2004-10-01  Simon Josefsson  <jas@extundo.com>
15918             Bruno Haible  <bruno@clisp.org>
15919
15920         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15921         (snprintf): Declare 'args'.
15922
15923 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15924
15925         * lib/snprintf.c: Remove comments as to why each header is needed.
15926
15927 2004-10-01  Bruno Haible  <bruno@clisp.org>
15928
15929         * MODULES.html.sh: Add strsep.
15930
15931 2004-09-30  Simon Josefsson  <jas@extundo.com>
15932
15933         * modules/snprintf: New file.
15934
15935 2004-09-30  Simon Josefsson  <jas@extundo.com>
15936
15937         * m4/snprintf.m4: New file.
15938
15939 2004-09-30  Simon Josefsson  <jas@extundo.com>
15940
15941         * lib/snprintf.h, lib/snprintf.c: New files.
15942
15943 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15944
15945         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15946         (hol_entry_help): Never translate an empty string.
15947         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
15948         * lib/argp.h (OPTION_NO_TRANS): New option.
15949
15950 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15951
15952         * modules/argp (Maintainer): Replace Simon Josefsson
15953         by Sergey Poznyakoff.
15954
15955 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15956
15957         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
15958         changes merged back into glibc.
15959
15960 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
15961
15962         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
15963
15964 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
15965
15966         * lib/xvasprintf.c: Include xalloc.h.
15967         (xvasprintf): Use xalloc_die, not xmalloc_die.
15968
15969 2004-09-29  Bruno Haible  <bruno@clisp.org>
15970
15971         * modules/alloca-opt: New file, derived from modules/alloca.
15972         * modules/allocsa: Depend on alloca-opt instead of alloca.
15973         * modules/setenv: Likewise.
15974         * modules/vasnprintf: Likewise.
15975         * MODULES.html.sh: Add alloca-opt.
15976
15977 2004-09-28  Simon Josefsson  <jas@extundo.com>
15978
15979         * gnulib-tool: New parameter --lgpl, to asseert that modules are
15980         LGPL, and to replace license template from GPL to LGPL.
15981
15982 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15983
15984         * modules/dummy: Change license to LGPL.
15985
15986 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
15987
15988         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
15989
15990 2004-09-24  Simon Josefsson  <jas@extundo.com>
15991
15992         * modules/minmax (License): Change from GPL to LGPL.
15993
15994 2004-09-23  Simon Josefsson  <jas@extundo.com>
15995
15996         * gnulib-tool (--import): Typo.
15997
15998 2004-09-23  Simon Josefsson  <jas@extundo.com>
15999
16000         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16001
16002 2004-09-22  Bruno Haible  <bruno@clisp.org>
16003
16004         * modules/*: Add 'License' field.
16005         * gnulib-tool: Accept --extract-license option.
16006         (func_get_license): New function.
16007
16008 2004-09-21  Bruno Haible  <bruno@clisp.org>
16009
16010         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16011         Reported by Simon Josefsson.
16012
16013 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16014
16015         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16016         gl_AC_TYPE_LONG_LONG.
16017
16018 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16019
16020         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16021
16022 2004-09-18  Simon Josefsson  <jas@extundo.com>
16023         and  Paul Eggert  <eggert@cs.ucla.edu>
16024
16025         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16026         calls with autoreconf.  Define GL_LIB.
16027
16028 2004-09-14  Karl Berry  <karl@gnu.org>
16029
16030         * config/srclist.txt: unsync setenv.c, sigh.
16031
16032 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16033
16034         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16035         Problem reported by Bruno Haible in:
16036         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16037
16038 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16039
16040         * config/srclist.txt: Comment out argp-pvh.c.
16041
16042 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16043
16044         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16045         in case some system header has #define'd it.  Problem reported by
16046         Soeren D. Schulze in
16047         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16048
16049 2004-09-09  Karl Berry  <karl@gnu.org>
16050
16051         * regex.[ch]: delete from the root.  These were supposed to be
16052                 synced with emacs cvs, but this has not happened for about
16053                 a year, and anyway nothing else uses emacs regex.[ch].
16054                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16055                 lib/regex[.ch] is untouched.
16056
16057 2004-09-09  Bruno Haible  <bruno@clisp.org>
16058
16059         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16060
16061 2004-09-09  Bruno Haible  <bruno@clisp.org>
16062
16063         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16064         modifications.
16065         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16066
16067 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16068
16069         * modules/xvasprintf: New file.
16070         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16071
16072 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16073
16074         * lib/xvasprintf.h: New file.
16075         * lib/xvasprintf.c: New file.
16076         * lib/xasprintf.c: New file.
16077
16078 2004-09-08  Bruno Haible  <bruno@clisp.org>
16079
16080         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16081
16082 2004-09-08  Bruno Haible  <bruno@clisp.org>
16083
16084         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16085         length is > INT_MAX.
16086         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16087         more.
16088
16089 2004-09-08  Bruno Haible  <bruno@clisp.org>
16090
16091         * lib/stdint_.h: New file, taken from GNU clisp.
16092
16093 2004-09-08  Bruno Haible  <bruno@clisp.org>
16094             Oskar Liljeblad  <oskar@osk.mine.nu>
16095
16096         * modules/stdint: New file.
16097         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16098
16099 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         Import from coreutils.
16102         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16103         strings on unbounded length.  alloca's performance benefits aren't
16104         that important here.
16105         (V_STRDUP): Remove.
16106         (parse_with_separator): New function, with most of the internals
16107         of the old parse_user_spec.  Allow user to omit both user and group,
16108         for compatibility with FreeBSD.
16109         Clone only the user name, not the entire spec.
16110         Do not set *uid, *gid unless entirely successful.
16111         Avoid memory leak in some failing cases.
16112         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16113         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16114         (parse_user_spec): Rewrite to use parse_with_separator.
16115
16116 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16117
16118         * modules/userspec: Don't depend on alloca.
16119
16120 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16121
16122         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16123
16124 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16125
16126         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16127         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16128         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16129
16130 2004-08-16  Simon Josefsson  <jas@extundo.com>
16131
16132         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16133         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16134         Add --dry-run for --import.
16135         Let user provided command line parameters override configure.ac
16136         settings.
16137
16138 2004-08-12  Simon Josefsson  <jas@extundo.com>
16139
16140         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16141         as discussed with Paul Eggert in threads rooted at
16142         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16143         and
16144         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16145         Before, the test was empty, and relied on ELIDE_CODE in source
16146         code.)
16147         (gl_PREREQ_GETOPT): New macro.
16148         (gl_GETOPT): Use them.
16149
16150 2004-08-12  Simon Josefsson  <jas@extundo.com>
16151
16152         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16153         * lib/getopt_.h: Renamed from getopt.h.
16154
16155 2004-08-12  Simon Josefsson  <jas@extundo.com>
16156
16157         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16158         Change default library name from libfoo to libgnu.
16159         Now, if you have a configure.ac that says:
16160                 gl_SOURCE_BASE(gl)
16161                 gl_M4_BASE(gl/m4)
16162                 gl_MODULES(error getopt etcetera)
16163                 gl_INIT
16164         you can import all you need by running:
16165                 ../gnulib/gnulib-tool --import
16166
16167         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16168         (Makefile.am): Rewrite, use logic from argz.
16169         (Include): Use <getopt.h> instead of "getopt.h".
16170
16171 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16172
16173         * modules/argp (Files): Add m4/unlocked-io.m4.
16174         (Depends-on): Add extensions.
16175
16176 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16177
16178         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16179         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16180         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16181         Check for program_invocation_name, program_invocation_short_name,
16182         flockfile, funlockfile, features.h, _getopt_long_only_r.
16183
16184 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16185
16186         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16187         its complicated substitute.
16188         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16189         and program_invocation_name.
16190         (__argp_basename) [!_LIBC]: Remove; the only use was
16191         replaced by its body.
16192         (__argp_short_program_name): Change condition from
16193         !defined __argp_short_program_name to
16194         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16195         to match argp-namefrob.h.
16196         (__argp_failure): Don't assume strerror_r returns char *.
16197         * lib/argp-parse.c (N_): Define unconditionally.
16198         (argp_default_options): Fill out initializers with 0 to avoid
16199         gcc warnings.
16200
16201 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16202
16203         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16204         getopt1.c.
16205
16206 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16207
16208         Merge from coreutils.
16209
16210         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16211
16212         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16213         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16214
16215 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16216
16217         Merge from coreutils.
16218
16219         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16220         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16221         for Reliant Unix 5.43.
16222
16223         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16224         (union fooround): Use uintmax_t, not long int.
16225         The rest is a merge from libc:
16226         [defined _LIBC]: Include <shlib-compat.h>.
16227         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16228
16229         * lib/settime.c (settime): Recode to avoid warning with
16230         Sun Forte C 6U2.
16231
16232         * lib/strverscmp.c: Convert to UTF-8.
16233
16234 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16235
16236         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16237         m4/uintmax_t.m4.
16238
16239 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16240
16241         * modules/xalloc-die: New file.
16242         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16243
16244         * modules/md5 (Files): Add m4/uint32_t.m4.
16245         * modules/sha1: Renamed from modules/sha.
16246         (Files):
16247         Rename lib/sha.h to lib/sha1.h.
16248         Rename lib/sha.c to lib/sha1.c.
16249         Rename m4/sha.m4 to m4/sha1.m4.
16250         (lib_SOURCES): Likewise.
16251         (configure.ac): Rename gl_SHA to gl_SHA1.
16252         (Include): sha.h -> sha1.h.
16253
16254 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16255
16256         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16257         * m4/sha1.m4: Renamed from sha.m4.
16258         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16259
16260 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16261
16262         * lib/obstack.h (obstack_empty_p):
16263         Don't assume that chunk->contents is suitably aligned.
16264         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16265         Likewise. Problem reported by Benno in
16266         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16267
16268         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16269         readable.  This could be improved further but it'd take some work.
16270
16271 2004-08-08  Simon Josefsson  <jas@extundo.com>
16272
16273         * modules/xgethostname (Depends-on): Remove exit and error (not
16274         used).
16275
16276         * modules/getpass-gnu: Add getpass.h.
16277         (Depends-on): Add stdbool.
16278         * modules/getpass: Add getpass.h.
16279
16280 2004-08-08  Simon Josefsson  <jas@extundo.com>
16281
16282         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16283         Check getpass declaration.
16284
16285 2004-08-08  Simon Josefsson  <jas@extundo.com>
16286
16287         * lib/xgethostname.c: Don't include error.h (not used).
16288
16289         * lib/getpass.h: Add.
16290         * lib/getpass.c: Include getpass.h first.
16291
16292 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16293
16294         * lib/xalloc-die.c: New file.
16295         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16296         All uses removed.
16297         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16298         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16299         xalloc-die.c.
16300         (_, N_, xalloc_die): Move to xalloc-die.c.
16301         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16302         so that we needn't mess with xalloc_msg_memory_exhausted.
16303
16304         * lib/sha1.h: Renamed from sha.h.
16305         (SHA1_H): Renamed from _SHA_H.
16306         (sha1_ctx): Renamed from sha_ctx.
16307         (sha1_init_ctx): Renamed from sha_init_ctx.
16308         (sha1_process_block): Renamed from sha_process_block.
16309         (sha1_process_bytes): Renamed from sha_process_bytes.
16310         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16311         (sha1_read_ctx): Renamed from sha_read_ctx.
16312         (sha1_stream): Renamed from sha_stream.
16313         (sha1_buffer): Renamed from sha_buffer.
16314         * lib/sha1.c: Likewise; renamed from sha.c.
16315         Do not include <sys/types.h>.
16316         Include <stddef.h> rather than <stdlib.h>.
16317
16318 2004-08-08  Bruno Haible  <bruno@clisp.org>
16319
16320         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16321         FILESYSTEM_PREFIX_LEN.
16322         * lib/progreloc.c: Likewise.
16323         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16324
16325 2004-08-06  Simon Josefsson  <jas@extundo.com>
16326
16327         * modules/progname (Depends-on): Don't depend on stdbool.
16328
16329 2004-08-06  Simon Josefsson  <jas@extundo.com>
16330
16331         * modules/getsubopt: New file.
16332         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16333         getsubopt.
16334
16335 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16336
16337         More merge from coreutils.
16338
16339         * m4/utimens.m4, m4/utimecmp.m4: New files.
16340         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16341         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16342         prereq.m4, sha.m4: Import changes from coreutils.
16343
16344 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16345
16346         More merge from coreutils.
16347         * modules/raise, modules/readtokens0, modules/utimens:
16348         * modules/utimecmp, module/xnanosleep: New files.
16349         * modules/strftime: Add lib/strftime.h.
16350         Change include from <time.h> to "strftime.h".
16351         * modules/yesno: Add lib/yesno.h.
16352         * modules/backupfile: Remove lib/addext.c.
16353         * modules/euidaccess: Add stat-macros.h.
16354         * modules/canonicalize, modules/euidaccess,
16355         modules/filemode, modules/lchown, modules/makepath,
16356         modules/rmdir, modules/stat: Likewise.
16357
16358 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16359
16360         Merge from tar.
16361         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16362         SIZE_MAX is a valid preprocessor constant.
16363         (__argp_basename): Change from "#ifndef _LIBC"
16364         to "#ifndef __argp_short_program_name", so that
16365         we don't compile these functions for tar.
16366
16367         More merges from coreutils.
16368         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16369         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16370         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16371         * lib/addext.c: Remove; no longer needed.
16372         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16373         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16374         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16375         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16376         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16377         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16378         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16379         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16380         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16381         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16382         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16383         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16384         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16385         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16386         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16387         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16388         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16389         Import changes from coreutils.
16390
16391 2004-08-05  Simon Josefsson  <jas@extundo.com>
16392
16393         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16394
16395 2004-08-05  Simon Josefsson  <jas@extundo.com>
16396
16397         * m4/getsubopt.m4: New file.
16398
16399 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16400
16401         Merge from coreutils.
16402
16403         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16404         * m4/getcwd-path-max.m4: New files.
16405
16406         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16407         FILESYSTEM_PREFIX_LEN ->
16408         FILE_SYSTEM_PREFIX_LEN.
16409         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16410         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16411         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16412         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16413
16414         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16415         prerequisite modules now handle the DOS stuff.
16416         Don't check for unistd.h.
16417
16418 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16419
16420         Merge from coreutils.
16421
16422         * lib/.gdb-history: Remove; this doesn't belong here.
16423
16424         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16425         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16426         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16427         * lib/getcwd.c: New files.
16428
16429         * lib/dirname.h: Include <stdbool.h>.
16430         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16431         for consistency with POSIX terminology.  All uses changed.
16432         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16433         (strip_trailing_slashes): Use bool for booleans.
16434         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16435
16436         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16437         sometimes returns a positive errno value even when it succeeds.
16438         (print_errno_message) [!LIBC]: Fall back on strerror if
16439         __strerror_r fails.
16440
16441         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16442         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16443         (longest_relative_suffix): New function.
16444         (path_concat): Use it.  Assume first argument is not NULL.
16445         Port to DOS.  Omit redundant separators.
16446         Report an error instead of returning NULL.
16447         Use mempcpy instead of memcpy.
16448         (xpath_concat): Remove: not declared or used.
16449
16450         * lib/same.h: Include <stdbool.h>
16451         (same_name): Return bool, not int.
16452         * lib/same.c (same_name): Likewise.
16453         (errno): Don't declare; we assume C89 or better now.
16454
16455         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16456         if not already defined.
16457
16458         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16459         * lib/dup-safer.c (errno): Likewise.
16460
16461 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16462
16463         Merge from coreutils.
16464         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16465         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16466         * modules/path-concat: Don't depend on strdup.
16467
16468 2004-08-03  Simon Josefsson  <jas@extundo.com>
16469
16470         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16471         * lib/progname.h: Don't include stdbool.h.
16472
16473 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16474
16475         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16476         * MODULES.html.sh (func_all_modules): Remove fatal.
16477
16478 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16479
16480         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16481
16482 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16483
16484         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16485         working.
16486
16487 2004-08-02  Simon Josefsson  <jas@extundo.com>
16488
16489         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16490         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16491         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16492
16493 2004-08-01  Simon Josefsson  <jas@extundo.com>
16494
16495         * lib/xgetdomainname.c: Include stdlib.h, for free().
16496
16497 2004-07-19  Bruno Haible  <bruno@clisp.org>
16498
16499         * MODULES.html.sh (func_all_modules): Add dummy.
16500
16501 2004-07-16  Simon Josefsson  <jas@extundo.com>
16502
16503         * modules/dummy: New file.
16504
16505 2004-07-16  Simon Josefsson  <jas@extundo.com>
16506
16507         * lib/dummy.c: New file.
16508
16509 2004-07-16  Bruno Haible  <bruno@clisp.org>
16510
16511         * lib/backupfile.h: Add extern "C" for C++.
16512         * lib/closeout.h: Likewise.
16513         * lib/copy-file.h: Likewise.
16514         * lib/findprog.h: Likewise.
16515         * lib/full-write.h: Likewise.
16516         * lib/pathname.h: Likewise.
16517         * lib/progname.h: Likewise.
16518         * lib/stpcpy.h: Likewise.
16519         * lib/stpncpy.h: Likewise.
16520         * lib/strcase.h: Likewise.
16521         * lib/strstr.h: Likewise.
16522         * lib/xalloc.h: Likewise.
16523
16524         * lib/mbswidth.h: Add extern "C" for C++.
16525         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16526
16527 2004-07-13  Robert Millan  <robertmh@gnu.org>
16528
16529         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16530
16531 2004-07-09  Simon Josefsson  <jas@extundo.com>
16532
16533         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16534         failed without this.)
16535
16536 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16537
16538         * modules/chown (Files): Add lib/fchown-stub.c, since
16539         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16540
16541 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16542
16543         * lib/fchown-stub.c: New file.
16544
16545 2004-06-24  Jim Meyering  <jim@meyering.net>
16546
16547         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16548
16549 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16550
16551         * modules/argz: Omit "#include".
16552
16553         * MODULES.html.sh (func_all_modules): Add calloc, to match
16554         2004-06-01 addition of calloc module.
16555
16556 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16557
16558         * m4/argz.m4: New file, which is autoupdated from libtool.
16559
16560 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16561
16562         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16563         libtool.
16564
16565 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16566
16567         * config/srclist-update: Don't insist on "USA." before the
16568         close-comment, as libtool omits the period and puts the */ on a
16569         separate line.
16570         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16571         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16572
16573 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16574
16575         * modules/argz: New file.
16576         * MODULES.html.sh (func_all_modules): Add argz.
16577
16578 2004-06-12  Jim Meyering  <jim@meyering.net>
16579         and  Paul Eggert  <eggert@cs.ucla.edu>
16580
16581         * modules/hash (Files): Add lib/xalloc.h.
16582         * modules/pipe (Depends-on): Add wait-process.
16583         * modules/stat (Depends-on): Add xalloc.
16584         * modules/userspec (Files): Add lib/userspec.h.
16585         * modules/xstrto
16586
16587         Upgrade from gettext-0.13.
16588         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16589         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16590         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16591
16592 2004-06-10  Jim Meyering  <jim@meyering.net>
16593
16594         * lib/calloc.c: New file.
16595
16596 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16597
16598         * lib/getdate.y (yylex): Allow space between sign and number.
16599         Problem reported by Dan Jacobson.
16600
16601 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16602
16603         Merge from coreutils CVS.
16604
16605         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16606         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16607         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16608         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16609         xstrtol.m4: Fix copyright date and/or serial number.
16610
16611         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16612         See if we need an fchown replacement.
16613         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16614         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16615         and use the replacement function if we detect either defect.
16616
16617         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16618         gl_UTIMECMP.
16619
16620 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16621         and  Jim Meyering  <jim@meyering.net>
16622
16623         Merge from coreutils CVS.
16624
16625         * lib/stat-macros.h: New file, with contents from file-type.h
16626         and coreutils' system.h.
16627         * lib/file-type.c: Include "stat-macros.h".
16628         * lib/file-type.h (file_type): Move all macro definitions to new file,
16629         stat-macros.h.
16630
16631         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16632         Wrap old code with this conditional.
16633         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16634         function that does not dereference symlinks.
16635         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16636
16637         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16638         dependency problems.
16639         (xreadlink): Accept new arg SIZE, for efficiency.
16640         All decls and uses changed.
16641         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16642
16643         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16644         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16645
16646         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16647         sysexits.h.
16648
16649 2004-06-01  Jim Meyering  <jim@meyering.net>
16650
16651         * m4/calloc.m4: New file.
16652
16653 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16654
16655         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16656         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16657         Also, fix a typo in a diagnostic.
16658
16659 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16660
16661         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16662         or AC_FUNC_REALLOC.
16663
16664 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16665
16666         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16667         macros to be defined.
16668         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16669         the allocator returns NULL because the requested size is zero.
16670
16671 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16672
16673         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16674         var.  Add comment explaining why libc still defines it.  This
16675         merges the following patch from glibc:
16676         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16677
16678 2004-05-20  Andreas Schwab  <schwab@suse.de>
16679
16680         * m4/free.m4: Replace free if it not known to work, not the other
16681         way round.
16682
16683 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16684
16685         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16686         present in glibc since revision 1.1 of this file.
16687         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16688         obstack_alignment_mask, obstack_alloc, obstack_base,
16689         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16690         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16691         obstack_grow0, obstack_init, obstack_int_grow,
16692         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16693         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16694         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16695         nonexistent functions.
16696
16697 2004-05-18  Karl Berry  <karl@gnu.org>
16698
16699         * config/srclist.txt: break link for vasnprintf.c.
16700
16701 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16702
16703         Port obstack to the AS/400, where pointers are 16 bytes wide and
16704         you cannot cast an integer to a valid pointer.  This patch is
16705         currently waiting to be integrated into glibc; see
16706         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16707
16708         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16709         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16710         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16711         (struct obstack): temp member is now a union of a pointer and
16712         an integer, instead of an integer.  All integer uses changed.
16713         This does not affect the physical layout of struct obstack,
16714         except on hosts (like the AS/400) where the size or alignment of
16715         void * is greater than that of ptrdiff_t.
16716         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16717         __STDC__)]: Store temporary in pointer member of union, not
16718         integer member.
16719         * lib/obstack.c: Include <stddef.h>, for offsetof.
16720         (struct fooalign): Remove; it doesn't need a name.
16721         (union fooround): Change double to long double, and add void *.
16722         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16723         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16724         not a macro.  Hence the values are always int; so remove all
16725         casts-to-int in uses.
16726
16727 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16728
16729         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16730         we can get this patch merged into glibc.
16731
16732 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16733             Paul Eggert  <eggert@cs.ucla.edu>
16734
16735         * m4/argp: Depend on alloca.
16736
16737 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16738             Paul Eggert  <eggert@cs.ucla.edu>
16739
16740         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16741         freecoding.
16742
16743 2004-05-17  Bruno Haible  <bruno@clisp.org>
16744
16745         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16746         precision that consists of a '.' followed by an empty digit string.
16747         Patch by Tor Lillqvist <tml@iki.fi>.
16748
16749 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16750
16751         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16752         for backward compatibility with older code.  We need our own
16753         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16754         it under some other name, and our alloca.h will define it.
16755
16756 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16757             Derek Price  <derek@ximbiot.com>
16758
16759         * lib/alloca.c: Include <alloca.h>, to get our interface.
16760         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16761         include <alloca.h> first.  Use C89 prototype for alloca; this
16762         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16763         Use #elif for simplicity, since we can assume C89 now.
16764         Don't try to source the system alloca.h since it will not be found
16765         and to prevent recursively including its replacement.
16766         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16767         * lib/regex.c: Likewise.
16768
16769 2004-05-16  Derek Price  <derek@ximbiot.com>
16770             Paul Eggert  <eggert@cs.ucla.edu>
16771
16772         getline cleanup.  This changes the getndelim2 API: both order of
16773         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16774         no delimiter).
16775
16776         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16777         interface does that.
16778         (getline): Always use getdelim, so that we don't have two
16779         copies of this code.
16780         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16781         if available.
16782         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16783         (GETNDELIM2_MAXIMUM): New macro.
16784         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16785         instead of the old practice of delim2==0.  All callers changed.
16786         Return -1 on overflow, instead of returning junk.
16787         Do not set *linesize unless allocation succeeds.
16788         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16789         that we include sys/types.h.
16790         * lib/getnline.h: Likewise.
16791         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16792         (getndelim2): Reorder arguments.
16793         * lib/getnline.c (getnline, getndelim):
16794         Don't discard the NMAX argument.
16795         (getnline): Invoke getndelim, to avoid code duplication.
16796         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16797         of (size_t) -1 by callers of the getnline family.
16798
16799 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16800
16801         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16802         Check for gettimeofday.
16803         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16804         Check for settimeofday, stime.
16805
16806 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16807
16808         * lib/nanosleep.c (suspended): Change its type from int to
16809         sig_atomic_t volatile.
16810         (first_call): Make it private to rpl_nanosleep, and have it
16811         be zero initially as that's a bit faster.
16812         (my_usleep): Round up fractional times instead of truncating them,
16813         as this is the usual meaning for 'sleep'.
16814
16815         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16816         doesn't work.
16817         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16818         (ENOSYS): Define if not defined.
16819         (settime): Fall back on stime if it exists and settimeofday fails.
16820         But don't bother with fallbacks if a method fails with errno == EPERM.
16821
16822 2004-05-11  Jim Meyering  <jim@meyering.net>
16823
16824         Prior to this change, the save_cwd caller required read access to the
16825         current directory on most systems (ones with the fchdir function).
16826
16827         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16828         fails, try write-only, and finally, resort to using xgetcwd.
16829
16830 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16831
16832         * lib/obstack.c, obstack.h: Import changes from libc.
16833
16834 2004-04-28  Bruno Haible  <bruno@clisp.org>
16835
16836         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16837         also implicitly appends .exe to executables.
16838         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16839         accepts Windows pathnames.
16840         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16841         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16842         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16843         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16844         Reported by Derek Robert Price <derek@ximbiot.com>.
16845
16846 2004-04-21  Karl Berry  <karl@gnu.org>
16847
16848         * config/srclist.txt (localcharset.c): break sync.
16849
16850 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16851
16852         * m4/host-os.m4: Add a copyright notice.
16853
16854 2004-04-20  Jim Meyering  <jim@meyering.net>
16855
16856         Change UTILS_ to gl_ in AC_DEFINE'd names.
16857         Change utils_- and jm_-prefixed variables, too.
16858         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16859         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16860         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16861
16862         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16863         Don't emit trailing blanks.
16864         Also rename jm_-prefixed variables to have gl_ prefix.
16865
16866         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16867         Also rename jm_-prefixed variables to have gl_ prefix.
16868
16869         * m4/jm-macros.m4: Reflect the renamings.
16870         * m4/prereq.m4: Likewise.
16871
16872 2004-04-20  Jim Meyering  <jim@meyering.net>
16873
16874         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16875         memory.
16876
16877 2004-04-20  Jim Meyering  <jim@meyering.net>
16878             Bruno Haible  <bruno@clisp.org>
16879
16880         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16881         memory when realloc fails.
16882
16883 2004-04-19  Jim Meyering  <jim@meyering.net>
16884
16885         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16886         now that readutmp.c may call `free (0)'.
16887
16888 2004-04-19  Bruno Haible  <bruno@clisp.org>
16889
16890         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16891         * m4/inttypes_h.m4: Likewise.
16892         * m4/stdint_h.m4: Likewise.
16893         * m4/intmax_t.m4: Likewise.
16894         * m4/uintmax_t.m4: Likewise.
16895
16896 2004-04-18  Jim Meyering  <jim@meyering.net>
16897
16898         * m4/prereq.m4: Don't forbid jm_ prefix.
16899
16900         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16901         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16902         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16903         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16904         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16905         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16906         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16907         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16908         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16909         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16910         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16911         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16912         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16913         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16914         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16915         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16916         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16917         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16918         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16919
16920 2004-04-18  Jim Meyering  <jim@meyering.net>
16921
16922         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16923         failure, don't leak memory and do call END_UTMP_ENT.
16924
16925 2004-04-16  Jim Meyering  <jim@meyering.net>
16926
16927         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16928         coreutils' stat program.
16929         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16930
16931 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16932
16933         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16934         C89.
16935         (CHAR_BIT): Remove, since we assume C89.
16936         Include <stdint.h> if available, as per current Autoconf CVS advice.
16937
16938 2004-03-31  Jim Meyering  <jim@meyering.net>
16939
16940         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16941         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16942         * m4/xalloc.m4: Likewise.
16943
16944 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16945
16946         Merge from coreutils.
16947
16948         * m4/inttostr.m4: New file.
16949         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
16950         Require AM_STDBOOL_H and gl_TIMESPEC instead.
16951         Require gl_CLOCK_TIME.
16952         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
16953
16954 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16955
16956         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
16957         not bool, to be more consistent with Unix conventions.
16958         Suggested by Bruno Haible.
16959
16960         Merge from coreutils.
16961
16962         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
16963         * lib/umaxtostr.c: New files.
16964
16965         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
16966         the usual <time.h> dance.
16967         (get_date): Change signature to support fractional time stamps.
16968         All callers changed.
16969         * lib/getdate.y: Include "getdate.h" first, as we can now
16970         assume C89 and don't need to worry about 'const'.
16971         Similarly, include "unlocked-io.h" near start, not in middle.
16972         Include <limits.h>.
16973         (textint.value): Use long int rather than int.
16974         (textint.digits): Use size_t rather than int.
16975         (BILLION, LOG10_BILLION): New constants.
16976         (parser_control): New member rel_ns.  Members day_ordinal,
16977         time_zone, month, day, hour, minutes, rel_year, rel_month,
16978         rel_day, rel_hour, rel_minutes, rel_seconds
16979         are now long int, not int.  Member seconds is now struct timespec,
16980         not int.  New member timespec_seen.  Members dates_seen, days_seen,
16981         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
16982         not int.
16983         (%union.intval): Now long int, not int.
16984         New member timespec.
16985         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
16986         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
16987         (spec): Now is a timespec or an item list.
16988         (timespec, items): New nonterminals.
16989         (time, rel, relunit, number, get_date):
16990         Add support for fractional seconds.
16991         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
16992         (gmtime, localtime, mktime): Remove decls; not needed with C89.
16993         (to_hour): First arg is now long int, not int.
16994         (to_year): Returns long int, not int.
16995         Don't treat year -70 like 70.
16996         (tm_diff): Returns long int, not int.
16997         (lookup_word): Use bool instead of int when appropriate.
16998         (yylex): Use size_t for count, not int.
16999         Detect overflow when parsing large integer constants.
17000         Add support for fractions.
17001         (get_date): Make pointers 'const' if possible.
17002         Use more-portable code to detect integer overflow.
17003         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17004         Don't use ctime; it's not reliable if the year has >4 digits.
17005
17006         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17007         This is for compatibility with BSD.
17008
17009         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17010         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17011         From coreutils' system.h.
17012
17013         * lib/userspec.c: Don't include "posixver.h".
17014         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17015         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17016         compatible extension.  Simplify code by removing a boolean int
17017         that was always nonzero if a string was nonnull.
17018
17019 2004-03-30  Jim Meyering  <jim@meyering.net>
17020
17021         Merge from coreutils.
17022
17023         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17024         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17025         on some systems one must include <grp.h> before it.
17026         Reported by Christian Krackowizer.
17027
17028 2004-03-30  Jim Meyering  <jim@meyering.net>
17029
17030         Merge from coreutils.
17031
17032         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17033
17034         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17035         an empty input stream.
17036
17037         * lib/readtokens.c: Include <stdbool.h>.
17038         (readtoken): Use `size_t' rather than int/long.
17039         All callers adjusted.
17040         Use `bool' rather than `int' where appropriate.
17041         Use memset rather than an explicit loop.
17042         Use x2nrealloc rather than xrealloc.
17043         Allow the use of `\0' as a delimiter.
17044         (readtokens): Likewise.
17045         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17046
17047 2004-03-30  Jim Meyering  <jim@meyering.net>
17048
17049         * m4/realloc.m4: Remove file, since now it does no more than
17050         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17051         the `configure.ac' section of module/realloc.
17052         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17053
17054 2004-03-30  Bruno Haible  <bruno@clisp.org>
17055
17056         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17057         nonnull.
17058
17059 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17060
17061         Merge changes to getloadavg.c from coreutils and Emacs.
17062
17063         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17064         Define to an expression, not to the empty string.
17065         Include cloexec.h and xalloc.h.
17066         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17067         Use set_cloexec_flag rather than rolling our own.
17068         * lib/cloexec.c, lib/cloexec.h: New files.
17069
17070 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17071
17072         * m4/cloexec.m4: New file.
17073
17074 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17075
17076         * lib/getopt.h: Sync with libc CVS.
17077
17078 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17079             Bruno Haible  <bruno@clisp.org>
17080
17081         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17082         mbswidth.
17083
17084 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17085             Bruno Haible  <bruno@clisp.org>
17086
17087         * lib/mbswidth.h: Include <wchar.h> only if
17088         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17089         <wchar.h>.
17090         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17091
17092 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17093
17094         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17095         Sync with libc CVS.
17096         * lib/getopt_int.h: New file, also synced from libc.
17097
17098 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17099
17100         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17101         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17102         Bring back getopt.c, getopt.h, getopt1.c.
17103
17104 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17105
17106         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17107         All uses changed.  Check for sa_sigaction member; this fixes
17108         a bug first reported by Jason Andrade in
17109         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17110
17111 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17112
17113         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17114         '#if' expressions.  Unlike the code it replaces, it does not
17115         depend on (defined _SC_PAGESIZE).  However, it does depend on
17116         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17117         first reported by Jason Andrade in
17118         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17119
17120 2004-02-25  Simon Josefsson  <jas@extundo.com>
17121
17122         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17123
17124 2004-02-25  Simon Josefsson  <jas@extundo.com>
17125
17126         * lib/strdup.h: New file.
17127         * lib/strdup.c: Include it.
17128         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17129         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17130
17131 2004-02-23  Karl Berry  <karl@gnu.org>
17132
17133         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17134         (from fencepost.gnu.org:/gd/gnuorg).
17135
17136 2004-02-23  Karl Berry  <karl@gnu.org>
17137
17138         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17139         * config/srclist.txt: add maintain/standards documents.
17140
17141 2004-02-18  Bruno Haible  <bruno@clisp.org>
17142
17143         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17144         Reported by Derek Robert Price <derek@ximbiot.com>.
17145
17146 2004-02-16  Karl Berry  <karl@gnu.org>
17147
17148         * config/mkinstalldirs, install-sh: update from automake.
17149
17150 2004-02-06  Karl Berry  <karl@gnu.org>
17151
17152         * m4/po.m4: update from gettext 0.14.1.
17153
17154 2004-02-06  Karl Berry  <karl@gnu.org>
17155
17156         * lib/config.charset: update from gettext 0.14.1.
17157
17158 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17159
17160         Add comments and code, prompted by suggestions from Bruno Haible
17161         for sh-quote.
17162         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17163         describing the enum quoting_style values.
17164         * lib/quotearg.c (quotearg_alloc): New function.
17165         (quotearg_buffer_restyled): Treat lone { and } as special.
17166         Treat = as special.  Work around bug with older shells
17167         that "see" a '\' that is really the 2nd byte of a multibyte char.
17168         Quote empty string with shell_quoting_style.
17169
17170 2004-02-03  Bruno Haible  <bruno@clisp.org>
17171
17172         * m4/pipe.m4: New file, from GNU gettext.
17173
17174 2004-02-03  Bruno Haible  <bruno@clisp.org>
17175
17176         * lib/pipe.h: New file, from GNU gettext.
17177         * lib/pipe.c: New file, from GNU gettext.
17178
17179 2004-01-27  Bruno Haible  <bruno@clisp.org>
17180
17181         * m4/execute.m4: New file, from GNU gettext.
17182
17183 2004-01-27  Bruno Haible  <bruno@clisp.org>
17184
17185         * lib/execute.h: New file, from GNU gettext.
17186         * lib/execute.c: New file, from GNU gettext.
17187         * lib/w32spawn.h: New file, from GNU gettext.
17188
17189 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17190
17191         Merge from diffutils.
17192
17193         * lib/file-type.c (file_type): Add typed memory objects.
17194         * lib/file-type.h (S_TYPEISTMO): New macro.
17195
17196         * lib/c-stack.h (c_stack_action): Remove argv argument.
17197         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17198         (die): Don't calculate message unless segv_action returns.
17199         (get_stack_location, min_address_from_argv, max_address_from_argv,
17200         volatile stack_base, volatile_stack_size): Remove.
17201         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17202         that every segmentation violation is a stack overflow.  (Ouch!)
17203         See Debian bug 136249 (still outstanding) for more info about why
17204         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17205
17206 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17207
17208         Exit-status fix from coreutils.
17209
17210         Use exit_failure consistently in place of EXIT_FAILURE,
17211         so that program exit statuses are consistent on failure.
17212
17213         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17214         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17215         * lib/argmatch.h: Comment fix to match the above.
17216         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17217         Now a macro referring to exit_failure, instead of a separate
17218         variable.  Include "exitfail.h" to get it.
17219         * lib/xstrtol.h: Include "exitfail.h".
17220         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17221
17222         * lib/long-options.c (parse_long_options): Use prototype
17223         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17224         for clarity.
17225
17226 2004-01-21  Jim Meyering  <jim@meyering.net>
17227
17228         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17229         so as not to conflict with a different-sized __mktime_internal
17230         function in GNU libc.
17231         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17232         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17233
17234 2004-01-20  Karl Berry  <karl@gnu.org>
17235
17236         * config/config.guess: update from config.
17237
17238         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17239
17240 2004-01-20  Bruno Haible  <bruno@clisp.org>
17241
17242         Safer stack allocation.
17243         * lib/setenv.c: Include allocsa.h.
17244         (alloca): Remove fallback definition.
17245         (freea): Remove macro.
17246         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17247         instead of freea.
17248
17249 2004-01-20  Bruno Haible  <bruno@clisp.org>
17250
17251         * m4/eealloc.m4: New file, from GNU gettext.
17252
17253 2004-01-20  Bruno Haible  <bruno@clisp.org>
17254
17255         * m4/allocsa.m4: New file, from GNU gettext.
17256
17257 2004-01-20  Bruno Haible  <bruno@clisp.org>
17258
17259         * lib/xallocsa.h: New file, from GNU gettext.
17260         * lib/xallocsa.c: New file, from GNU gettext.
17261
17262 2004-01-20  Bruno Haible  <bruno@clisp.org>
17263
17264         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17265
17266 2004-01-20  Bruno Haible  <bruno@clisp.org>
17267
17268         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17269         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17270         specially.
17271
17272 2004-01-20  Bruno Haible  <bruno@clisp.org>
17273
17274         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17275         patch.
17276
17277 2004-01-20  Bruno Haible  <bruno@clisp.org>
17278
17279         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17280
17281 2004-01-20  Bruno Haible  <bruno@clisp.org>
17282
17283         * lib/eealloc.h: New file.
17284
17285 2004-01-20  Bruno Haible  <bruno@clisp.org>
17286
17287         * lib/binary-io.h: Avoid warnings on Cygwin.
17288
17289 2004-01-20  Bruno Haible  <bruno@clisp.org>
17290
17291         * lib/allocsa.h: New file, from GNU gettext.
17292         * lib/allocsa.c: New file, from GNU gettext.
17293
17294 2004-01-18  Karl Berry  <karl@gnu.org>
17295
17296         * doc/gpl.texi, doc/lgpl.texi: new files.
17297
17298 2004-01-18  Karl Berry  <karl@gnu.org>
17299
17300         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17301         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17302
17303 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17304
17305         Merge from coreutils.
17306
17307         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17308         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17309         (gl_DEFAULT_POSIX2_VERSION): Move
17310         the documentation from 'configure' into 'config.hin',
17311         so that 'configure --help' isn't burdened by it and
17312         we don't have to worry about its formatting there.
17313         Reword the documentation so that it's more succinct
17314         and can be run together into a single paragraph.
17315         * m4/same.m4 (gl_SAME): Check for pathconf.
17316
17317 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17318
17319         Merge from coreutils.
17320
17321         * lib/posixver.c: Include posixver.h.
17322
17323         * lib/same.c: Include <stdbool.h>, <limits.h>.
17324         (_POSIX_NAME_MAX): Define if not defined.
17325         (MIN): New macro.
17326         (same_name): If file names are silently truncated, report
17327         that the file names are the same if they are the same after
17328         the silent truncation.
17329
17330         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17331         conversion function.
17332         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17333         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17334         longer needed.
17335
17336 2004-01-15  Jim Meyering  <jim@meyering.net>
17337
17338         Merge from coreutils.
17339
17340         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17341         if no library is required.
17342         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17343         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17344         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17345         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17346         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17347         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17348         value, $ac_cv_search_crypt, if it's "none required".
17349         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17350         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17351         not gl_FUNC_GETLOADAVG.
17352         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17353         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17354
17355 2004-01-15  Jim Meyering  <jim@meyering.net>
17356
17357         Merge from coreutils.
17358
17359         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17360         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17361         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17362
17363         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17364         optional configure-time default.
17365
17366         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17367
17368         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17369
17370 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17371
17372         Merge from coreutils.
17373
17374         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17375         value, $ac_cv_search_nanosleep, if it's "none required".
17376
17377 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17378
17379         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17380         with like-named macro in fnmatch.c.
17381         (EXT): Use an internal constant instead.
17382
17383         Merge fnmatch patches from glibc.
17384         * lib/fnmatch.c (mbsinit): Remove define.
17385         Add libc_hidden_ver (__fnmatch, fnmatch).
17386         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17387         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17388
17389 2004-01-14  Karl Berry  <karl@gnu.org>
17390
17391         * config/install-sh: update from automake.
17392
17393 2004-01-13  Karl Berry  <karl@gnu.org>
17394
17395         * config/install-sh: update from automake.
17396
17397 2004-01-09  Karl Berry  <karl@gnu.org>
17398
17399         * config/install-sh: update from automake.
17400
17401 2004-01-05  Karl Berry  <karl@gnu.org>
17402
17403         * config/config.{sub,guess}: update from config.
17404
17405 2003-12-31  Karl Berry  <karl@gnu.org>
17406
17407         * config/depcomp: update from automake.
17408
17409 2003-12-14  Karl Berry  <karl@gnu.org>
17410
17411         * lib/config.charset: update from gettext-runtime.
17412
17413 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17414
17415         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17416         Bug reported by Alfred M. Szmidt.
17417
17418 2003-12-03  Bruno Haible  <bruno@clisp.org>
17419
17420         * m4/gettext.m4: Upgrade from gettext-0.13.
17421         * m4/po.m4: Upgrade from gettext-0.13.
17422         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17423         * m4/intmax.m4: New file, from gettext-0.13.
17424         * m4/printf-posix.m4: New file, from gettext-0.13.
17425
17426 2003-11-29  Karl Berry  <karl@gnu.org>
17427
17428         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17429
17430 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17431             Bruno Haible  <bruno@clisp.org>
17432
17433         * lib/printf-parse.h: Don't include sys/types.h.
17434         (ARG_NONE): New macro.
17435         (char_directive): Change type of *arg_index fields to size_t.
17436         * lib/printf-parse.c: Don't include sys/types.h.
17437         (SSIZE_MAX): Remove macro.
17438         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17439         Remove unnecessary overflow check.
17440         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17441         fields.
17442
17443 2003-11-25  Bruno Haible  <bruno@clisp.org>
17444
17445         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17446
17447 2003-11-25  Bruno Haible  <bruno@clisp.org>
17448
17449         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17450         gt_TYPE_SSIZE_T.
17451
17452 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17453
17454         * modules/alloca: Remove dependency on xalloc.
17455
17456 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17457
17458         * lib/alloca.c: Remove dependency on xalloc module.
17459         (xalloc_die): Remove.
17460         (memory_full) [!defined emacs]: New macro.
17461         [!defined emacs]: Don't include xalloc.h.
17462         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17463         address arithmetic overflows.  Change datatypes a bit to avoid
17464         unnecessary casts.
17465
17466 2003-11-22  Jim Meyering  <jim@meyering.net>
17467
17468         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17469         s/size/size_t/.
17470
17471 2003-11-21  Karl Berry  <karl@gnu.org>
17472
17473         * config/config.{sub,guess}: update from config.
17474
17475 2003-11-18  Karl Berry  <karl@gnu.org>
17476
17477         * config/config.{sub,guess}: update from config.
17478
17479         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17480
17481 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17482
17483         * README: Mention that S+T cannot overflow if S is the size of
17484         an existing object and T is sufficiently small.
17485
17486 2003-11-17  Jim Meyering  <jim@meyering.net>
17487
17488         On systems without utime and without a utimes function capable of
17489         dealing with a NULL struct utimbuf* argument, this utime replacement
17490         could -- in unusual circumstances -- leak a file descriptor.
17491         * lib/utime.c: Include <unistd.h> and <errno.h>.
17492         (utime_null): Be sure to close `fd' and to preserve errno.
17493         Reported by Geoff Collyer via Arnold Robbins.
17494
17495 2003-11-17  Bruno Haible  <bruno@clisp.org>
17496
17497         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17498         (Depends-on): Add xsize.
17499
17500 2003-11-17  Bruno Haible  <bruno@clisp.org>
17501
17502         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17503
17504 2003-11-17  Bruno Haible  <bruno@clisp.org>
17505
17506         * lib/vasnprintf.c (alloca): Remove fallback definition.
17507         (freea): Remove definition.
17508         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17509         Reported by Paul Eggert.
17510
17511 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17512             Bruno Haible  <bruno@clisp.org>
17513
17514         Protect against address arithmetic overflow.
17515         * lib/printf-args.h: Include stddef.h.
17516         (arguments): Change type of field 'count' to size_t.
17517         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17518         'unsigned int' where appropriate.
17519         * lib/printf-parse.h: Include sys/types.h.
17520         (char_directive): Change type of *arg_index fields to ssize_t.
17521         (char_directives): Change type of fields 'count', max_*_length to
17522         size_t.
17523         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17524         (SSIZE_MAX): Define fallback value.
17525         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17526         instead of 'int' where appropriate. Check a_allocated, d_allocated
17527         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17528         * lib/vasnprintf.c: Include xsize.h.
17529         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17530         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17531         overflow. Avoid wraparound when converting a width or precision from
17532         decimal to binary.
17533
17534 2003-11-16  Bruno Haible  <bruno@clisp.org>
17535
17536         Update from GNU gettext.
17537         * lib/printf-parse.c: Generalize to it can be compiled for wide
17538         strings.
17539         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17540         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17541         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17542         SNPRINTF): New macros.
17543         Don't include <alloca.h> if the file is used inside libintl.
17544         (local_wcslen): New function, for Solaris 2.5.1.
17545         (VASNPRINTF): Use it instead of wcslen.
17546
17547 2003-11-16  Bruno Haible  <bruno@clisp.org>
17548
17549         * lib/xsize.h (xmax): New function.
17550         (xsum, xsum3, xsum4): Declare as "pure" functions.
17551
17552 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17553
17554         * modules/xalloc (Files): Undo latest change, since xalloc.h
17555         no longer needs SIZE_MAX or PTRDIFF_MAX.
17556
17557 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17558
17559         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17560         gl_PTRDIFF_MAX.
17561
17562 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17563
17564         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17565         "return", to pacify some unknown compiler.  Problem reported
17566         by Joerg Schilling.
17567
17568 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17569
17570         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17571         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17572         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17573         heuristic is just as accurate as far as we know, and it removes a
17574         dependency on size_max.m4 and ptrdiff_max.m4.
17575
17576 2003-11-11  Bruno Haible  <bruno@clisp.org>
17577
17578         * modules/xsize (Files): Add m4/size_max.m4.
17579         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17580
17581 2003-11-11  Bruno Haible  <bruno@clisp.org>
17582
17583         * m4/size_max.m4: New file.
17584         * m4/ptrdiff_max.m4: New file.
17585         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17586         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17587         (gl_XALLOC): Invoke it.
17588
17589 2003-11-11  Bruno Haible  <bruno@clisp.org>
17590
17591         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17592         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17593         defined.
17594
17595 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17596
17597         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17598         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17599         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17600         From Bruno Haible.
17601         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17602         not (size_t) -1, since it's defined here.
17603
17604 2003-11-09  Karl Berry  <karl@gnu.org>
17605
17606         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17607
17608 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17609
17610         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17611         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17612         Reject sizes of exactly SIZE_MAX bytes.
17613         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17614         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17615
17616 2003-11-05  Bruno Haible  <bruno@clisp.org>
17617
17618         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17619         SIZE_MAX defined in <limits.h> on Solaris.
17620
17621 2003-11-04  Jim Meyering  <jim@meyering.net>
17622
17623         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17624         variable names, rather than @VAR@.
17625         * modules/poll: Likewise.
17626
17627 2003-11-04  Bruno Haible  <bruno@clisp.org>
17628
17629         * modules/xsize: New file.
17630         * modules/linebreak: Depend on xsize.
17631         * MODULES.html.sh (func_all_modules): Add xsize.
17632
17633 2003-11-04  Bruno Haible  <bruno@clisp.org>
17634
17635         * m4/xsize.m4: New file.
17636
17637 2003-11-04  Bruno Haible  <bruno@clisp.org>
17638
17639         * lib/xsize.h: New file.
17640         * lib/linebreak.c: Include xsize.h.
17641         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17642         argument for overflow.
17643         Suggested by Paul Eggert.
17644
17645 2003-11-03  Karl Berry  <karl@gnu.org>
17646
17647         * config/config.{guess,sub}: update from config.
17648
17649 2003-11-03  Jim Meyering  <jim@meyering.net>
17650
17651         * modules/userspec (lib_SOURCES): Add userspec.h.
17652         (Include): Add "userspec.h".
17653         Improve description.
17654
17655 2003-11-03  Jim Meyering  <jim@meyering.net>
17656
17657         * lib/userspec.c: Include "userspec.h".
17658         * lib/userspec.h: New file.
17659
17660 2003-11-03  Bruno Haible  <bruno@clisp.org>
17661
17662         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17663
17664 2003-11-03  Bruno Haible  <bruno@clisp.org>
17665
17666         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17667         available, to avoid (extremely rare) race condition.
17668         Suggested by Paul Eggert.
17669
17670 2003-11-02  Karl Berry  <karl@gnu.org>
17671
17672         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17673
17674 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17675
17676         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17677         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17678         (read_filesystem_list): Set and use me_type_malloced.
17679         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17680         whatever the type happens to be), for brevity and consistency.
17681         Check for size calculation overflow on Alphas running OSF/1.
17682
17683 2003-10-31  Jim Meyering  <jim@meyering.net>
17684
17685         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17686
17687         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17688
17689 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17690             Bruno Haible  <bruno@clisp.org>
17691
17692         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17693         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17694
17695 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17696
17697         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17698         netbsd*-gnu*.  Suggested by Robert Millan.
17699
17700 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17701
17702         * modules/group-member: Depend on stdbool.
17703
17704 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17705
17706         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17707
17708 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17709
17710         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17711         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17712         after the 'gnu' in these cases.  This fixes some bugs in the
17713         previous change, and is based on suggestions by Robert Millan.
17714
17715 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17716
17717         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17718         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17719         no longer needed.
17720         * lib/quotearg.c (quotearg_n_options): Use it.
17721         * lib/group-member.c: Include <stdbool.h>.
17722         (free_group_info): Arg is now const *; don't free arg.
17723         (get_group_info): Now returns bool and accepts struct group_info *,
17724         rather than returning a malloc'ed struct group_info *.
17725         All uses changed.  Check for overflow in internal size calculation.
17726
17727         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17728         rather than xmalloc/xrealloc.
17729         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17730         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17731         conformance bug: the old code used a pointer after freeing the
17732         storage that it addressed.
17733         * lib/hash.c (hash_initialize): Simplify the code by using
17734         xalloc_oversized rather than doing it by hand.
17735         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17736         the buffer preserved.  Use free and xmalloc instead.
17737         * lib/quotearg.c (quotearg_n_options): Likewise.
17738         Use a simpler test for size overflow.  Don't use xalloc_oversized
17739         because unsigned int might be wider than size_t (!); this suggests
17740         that we should switch from unsigned int to size_t for slot numbers.
17741
17742 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17743
17744         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17745         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17746         NetBSD kernels.  Requested by Richard Stallman.
17747
17748 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17749
17750         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17751         to allocate the returned structure.  Do not allocate a subarray,
17752         as x2nrealloc will do that.
17753         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17754         instead of xnrealloc.
17755         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17756
17757 2003-10-27  Bruno Haible  <bruno@clisp.org>
17758
17759         * lib/stdbool_.h: Better support for BeOS.
17760
17761 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17762
17763         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17764         now uses inline.
17765
17766 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17767
17768         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17769         callers that want to do their own size-overflow checking.  Include
17770         <stdbool.h>, since xalloc_oversized returns bool.
17771         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17772         to use xalloc_oversized.
17773
17774         Add two functions x2realloc, x2nrealloc, for programs that grow
17775         arrays dynamically by doubling their sizes.
17776         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17777         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17778         New functions.
17779
17780         Port to C99 semantics for 'inline' of external functions.
17781         Bug reported by Bruno Haible.
17782         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17783         with the old contents of xnmalloc.
17784         (xnmalloc, xmalloc): Use it.
17785         (xnrealloc_inline): New static inline function,
17786         with the old contents of xnrealloc.
17787         (xnrealloc, xrealloc): Use it.
17788
17789         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17790         that.
17791
17792 2003-10-26  Karl Berry  <karl@gnu.org>
17793
17794         * config/srclist.txt (COPYING.DOC): no longer available from
17795         /gd/gnuorg; don't know where the ultimate source is.
17796
17797 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17798
17799         Fix several address-calculation bugs in the hash modules,
17800         plus some minor code cleanup.
17801
17802         * lib/hash.h: Include <stdbool.h>, for bool.
17803         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17804         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17805         hash_get_n_entries, hash_get_max_bucket_length,
17806         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17807         hash_rehash): Use size_t rather than unsigned.
17808         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17809         hash_get_n_buckets_used, hash_get_n_entries,
17810         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17811         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17812         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17813         Likewise.
17814         (SIZE_MAX): Define if not defined.
17815         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17816         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17817         hash_print):
17818         Use const * when possible.
17819         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17820         (check_tuning): Fix bug: if tuning parameters were very close to
17821         0 or 1, rounding errors could have caused subscript violations.
17822         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17823         (hash_initialize): Add 'fail:' label
17824         to free table and return NULL, and use it to simplify code.
17825         Use calloc rather than clearing the storage ourself.
17826         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17827         buffer size calculations.
17828         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17829         Include <stddef.h>, for size_t.
17830         * lib/hash-pjw.c (hash_pjw): Likewise.
17831         Switch to method described by Bruno Haible.
17832         Include <limits.h>, for CHAR_BIT.
17833         (SIZE_BITS): New macro.
17834
17835 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17836
17837         * m4/getline.m4 (AM_FUNC_GETLINE):
17838         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17839         hosts.  Problem reported by Derek Robert Price in
17840         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17841         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17842         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17843
17844 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17845
17846         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17847         ceiling the allocation at NMAX bytes rather than silently
17848         discarding input bytes before NMAX is reached.  This makes
17849         a difference only if NMAX exceeds SIZE_MAX / 2.
17850
17851         * lib/obstack.c: Merge from glibc.
17852         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17853         Add libc_hidden_def (_obstack_newchunk).
17854         (_obstack_free) [! defined _LIBC]: Remove.
17855         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17856         a clone of the function body.
17857         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17858         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17859
17860         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17861         glibc.
17862         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17863         arg to memcpy.
17864
17865         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17866         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17867         Don't use lvalue casts, as GCC plans to remove support for them
17868         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17869         was also present in the non-GCC version, indicating that this
17870         code had always been buggy and had never been widely used.
17871         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17872         Use the fast variant of each macro, rather than copying the
17873         definiens of the fast variant; that way, we'll be more likely to
17874         catch future bugs in the fast variants.
17875
17876 2003-10-20  Bruno Haible  <bruno@clisp.org>
17877
17878         * modules/wait-process: New file.
17879         * MODULES.html.sh (func_all_modules): Add wait-process.
17880
17881 2003-10-20  Bruno Haible  <bruno@clisp.org>
17882
17883         * m4/wait-process.m4: New file.
17884
17885 2003-10-20  Bruno Haible  <bruno@clisp.org>
17886
17887         * lib/wait-process.h: New file, from GNU gettext.
17888         * lib/wait-process.c: New file, from GNU gettext.
17889
17890 2003-10-19  Jim Meyering  <jim@meyering.net>
17891
17892         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17893         HPUX 10.20.
17894
17895 2003-10-18  Karl Berry  <karl@gnu.org>
17896
17897         * config/config.guess: update from config.
17898
17899 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17900
17901         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17902         (getgroups): First arg is int, not size_t.
17903         Don't let 'free' mangle errno.
17904
17905 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17906
17907         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17908
17909 2003-10-16  Karl Berry  <karl@gnu.org>
17910
17911         * config/config.{guess,sub}: update from config.
17912
17913 2003-10-16  Jim Meyering  <jim@meyering.net>
17914
17915         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17916         memcpy.
17917
17918 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17919
17920         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17921         (SIZE_MAX): Remove.
17922         (new_exclude, add_exclude_file): Initial size no longer needs to
17923         be a power of 2.
17924         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17925         our own address arithmetic overflow checking.
17926
17927         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17928         (fnmatch): Do not alloca more than 2000 wide characters;
17929         instead, use malloc for large buffers.
17930         Check for address arithmetic overflow, and return -1
17931         with errno set to ENOMEM in that case.
17932         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17933         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17934         instead, return -1.  Check for address arithmetic overflow.
17935
17936 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17937
17938         Handle invalid suffixes and overflow independently, so that
17939         callers can treat them independently as needed.  Fix some bugs in
17940         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17941         suffix for a human-readable blocksize.  The major caller-visible
17942         change is the addition of a new
17943         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17944         that both overflow and suffix chars were found.
17945
17946         * lib/human.c (humblock): Don't check separately for invalid suffix
17947         char; that is xstrtoumax's job (now that its bug is fixed).
17948         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
17949         INTMAX_MAX]: New macros.
17950         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
17951         TYPE_MAXIMUM): New macros.
17952         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
17953         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
17954         if overflow occurs, as it's what __strtol does and it's more useful
17955         in practice.
17956         (__xstrtol): If __strtol reports some error other than ERANGE,
17957         reflect it to the caller as LONGINT_INVALID.  If it reports
17958         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
17959         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
17960         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
17961         value.
17962         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
17963         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
17964         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
17965         [defined UINTMAX_MAX]: New macros.
17966
17967 2003-10-14  Bruno Haible  <bruno@clisp.org>
17968
17969         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
17970
17971 2003-10-14  Bruno Haible  <bruno@clisp.org>
17972
17973         * m4/sig_atomic_t: New file, from GNU gettext.
17974         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
17975
17976 2003-10-14  Bruno Haible  <bruno@clisp.org>
17977
17978         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
17979         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
17980         Also use volatile where needed.
17981
17982 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17983
17984         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
17985         Change maintainer from Bruno Haible to 'all'.
17986
17987 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17988
17989         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
17990
17991 2003-10-12  Paul Eggert  <eggert@twinsun.com>
17992
17993         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
17994         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
17995         and define in terms of the other primitives.
17996         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
17997         (SIZE_MAX): Define if not already defined.
17998         (array_size_overflow): New function.
17999         (xalloc_die): Abort instead of exiting if 'error' returns.
18000         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18001         (xmalloc, xrealloc): Use them.
18002         (xcalloc): Check for address arithmetic overflow.
18003         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18004         a bit faster than strcpy.
18005
18006 2003-10-10  Simon Josefsson  <jas@extundo.com>
18007
18008         * modules/argp (Depends-on): Add restrict and strcase.
18009
18010 2003-10-10  Simon Josefsson  <jas@extundo.com>
18011
18012         * m4/argp.m4: Add AC_C_INLINE.
18013
18014 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18015
18016         Merge getpass from libc, plus a few fixes.
18017
18018         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18019         Include <stdbool.h>.
18020         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18021         __fsetlocking to empty.
18022         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18023         do include <bits/libc-lock.h>.
18024         Do not include <fcntl.h>; not needed.
18025         [_LIBC]: Include <wchar.h>.
18026         (NOTCANCEL_MODE): New macro.
18027         (flockfile, funlockfile) [_LIBC]: New macros.
18028         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18029         [!_LIBC]: New macros.
18030         (call_fclose): New function.
18031         (getpass): Use it.  Save tty stream separately; this simplifies the
18032         code and makes it more reliable if stdin happens to equal stdout.
18033         Invoke __fsetlocking on tty.
18034         Handle thread cancellation if needed.
18035         Namespace cleanup (use __tcgetattr, __getline).
18036         Use bool for Booleans.
18037         [USE_IN_LIBIO]: Handle wide streams.
18038         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18039         stream might go where.
18040
18041         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18042         doesn't have to include <stdio.h> before us.
18043         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18044         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18045         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18046         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18047         if not declared, so that we can use getpass.c code from libc without
18048         rewriting it.
18049         (flockfile, ftrylockfile, funlockfile): New macros.
18050
18051 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18052
18053         * modules/getpass: Depend on stdbool.
18054
18055 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18056
18057         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18058
18059 2003-10-07  Karl Berry  <karl@gnu.org>
18060
18061         * config/config.{guess,sub}: update from config.
18062
18063 2003-10-06  Jim Meyering  <jim@meyering.net>
18064             Bruno Haible  <bruno@clisp.org>
18065
18066         This lets translators provide better translations for the
18067         "Written by ..." part of --version output.
18068         * lib/version-etc.h: Include stdarg.h.
18069         (version_etc_copyright): Declare as readonly.
18070         (version_etc): Make this function variadic with a NULL-terminated list
18071         of author name strings.
18072         (version_etc_va): New declaration.
18073         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18074         (version_etc_copyright): Declare as readonly.
18075         (version_etc_va): New function. Provide a different translatable string
18076         for each possible number of authors < 10. Abbreviate when there are 10
18077         authors or more.
18078         (version_etc): Make this function variadic. Call version_etc_va.
18079         Suggestion from Gary V. Vaughan.
18080
18081         * lib/long-options.h (parse_long_options): Change prototype: the
18082         authors string is moved to the end and becomes variadic.
18083         * lib/long-options.c: Include stdarg.h.
18084         (parse_long_options): Make this function variadic, too.
18085         Call version_etc_va, not version_etc.
18086
18087 2003-10-06  Bruno Haible  <bruno@clisp.org>
18088
18089         * modules/version-etc-2: Remove file.
18090         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18091
18092 2003-10-06  Bruno Haible  <bruno@clisp.org>
18093
18094         * modules/fatal-signal: New file.
18095         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18096
18097 2003-10-06  Bruno Haible  <bruno@clisp.org>
18098
18099         * m4/fatal-signal.m4: New file.
18100         * m4/signalblocking.m4: New file, from GNU gettext.
18101
18102 2003-10-06  Bruno Haible  <bruno@clisp.org>
18103
18104         * lib/version-etc-2.h: Remove file.
18105         * lib/version-etc-2.c: Remove file.
18106
18107 2003-10-06  Bruno Haible  <bruno@clisp.org>
18108
18109         * lib/fatal-signal.h: New file, from GNU gettext.
18110         * lib/fatal-signal.c: New file, from GNU gettext.
18111
18112 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18113
18114         * README: Rework advice for preventing empty .o files.
18115         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18116         not <sys/types.h>.
18117
18118 2003-10-04  Karl Berry  <karl@gnu.org>
18119
18120         * lib/argp*: update from libc.
18121
18122 2003-10-04  Karl Berry  <karl@gnu.org>
18123
18124         * config/config.{guess,sub}: update from config.
18125
18126 2003-10-02  Bruno Haible  <bruno@clisp.org>
18127
18128         * modules/lchown (Include): Add lchown.h.
18129         * modules/time_r (Include): Use "..." syntax.
18130         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18131
18132 2003-10-01  Simon Josefsson  <jas@extundo.com>
18133
18134         * MODULES.html.sh (func_all_modules): Move gethostname from section
18135         'based on' to section 'lacking' POSIX:2001.
18136
18137 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18138
18139         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18140         to output mode on the same stream.
18141
18142 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18143
18144         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18145         Fix arg typo in previous patch.
18146
18147 2003-09-28  Jim Meyering  <jim@meyering.net>
18148
18149         * lib/error.c: Correct cpp indentation.
18150
18151 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18152
18153         * modules/free: New file.
18154
18155 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18156
18157         * m4/free.m4: New file.
18158
18159 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18160
18161         * lib/minmax.h (MIN, MAX)
18162         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18163         Omit the special code that used __typeof__, since we worry that
18164         it could be more trouble than it's worth.  See:
18165         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18166         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18167
18168         * lib/free.c: New file.
18169
18170 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18171
18172         Trivial fixes to Makefile.am parts of module listings.
18173         * modules/strstr: Append strstr.h to lib_SOURCES.
18174         * modules/strcase: Likewise, for strcase.h.
18175
18176 2003-09-27  Karl Berry  <karl@gnu.org>
18177
18178         * config/mkinstalldirs: update from automake.
18179
18180 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18181
18182         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18183         (error_tail): Do not loop, reallocating temporary buffer, since
18184         the output cannot contain more wide characters than the input
18185         contains bytes, the size must be big enough already.  This avoids
18186         one potential size overflow calculation.  Check for size overflow
18187         when calculating temporary buffer size.  Free temporary buffer
18188         when done, if it was allocated with malloc; this plugs a memory
18189         leak.  Remove casts from void * to pointers, that are no longer
18190         needed now that we're assuming C89 or better.
18191
18192         Merge error changes from glibc.
18193
18194         * lib/error.c, error.h: Update copyright notice header to match glibc.
18195         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18196         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18197         Disable cancellation while printing error.
18198         * lib/error.h: Prepend __ to parameter names.
18199
18200 2003-09-26  Jim Meyering  <jim@meyering.net>
18201
18202         * lib/error.c (error_tail): Move some declarations
18203         into inner scope where the local variables are used.
18204
18205 2003-09-26  Bruno Haible  <bruno@clisp.org>
18206
18207         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18208         stpncpy().
18209         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18210
18211 2003-09-26  Bruno Haible  <bruno@clisp.org>
18212
18213         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18214         (stpncpy): Define as alias for gnu_stpncpy.
18215         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18216
18217 2003-09-25  Simon Josefsson  <jas@extundo.com>
18218
18219         * lib/xgetdomainname.h: New file.
18220         * lib/xgetdomainname.c: New file.
18221
18222 2003-09-25  Simon Josefsson  <jas@extundo.com>
18223             Bruno Haible  <bruno@clisp.org>
18224
18225         * modules/getdomainname: New file.
18226         * modules/xgetdomainname: New file.
18227         * MODULES.html.sh (func_all_modules): Add getdomainname,
18228         xgetdomainname.
18229
18230 2003-09-25  Simon Josefsson  <jas@extundo.com>
18231             Bruno Haible  <bruno@clisp.org>
18232
18233         * m4/getdomainname.m4: New file.
18234
18235 2003-09-25  Simon Josefsson  <jas@extundo.com>
18236             Bruno Haible  <bruno@clisp.org>
18237
18238         * lib/getdomainname.h: New file.
18239         * lib/getdomainname.c: New file.
18240
18241 2003-09-25  Karl Berry  <karl@gnu.org>
18242
18243         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18244
18245 2003-09-25  Karl Berry  <karl@gnu.org>
18246
18247         * config/install-sh: update from automake.
18248
18249 2003-09-25  Bruno Haible  <bruno@clisp.org>
18250
18251         * modules/version-etc-2: New file, from modules/version-etc with
18252         modifications.
18253         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18254
18255 2003-09-25  Bruno Haible  <bruno@clisp.org>
18256
18257         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18258         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18259
18260 2003-09-24  Simon Josefsson  <jas@extundo.com>
18261
18262         * modules/xgethostname: Add xgethostname.h.
18263
18264 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18265
18266         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18267         the buffer associated with the argument.  Bug reported by
18268         Simon Josefsson.
18269
18270 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18271
18272         * README: Document assumptions that 'int' is at least 32 bits
18273         wide, that integer arithmetic is 2's complement without overflow,
18274         that there are no holes in integer values, that adding sizes of
18275         two nonoverlapping objects can't overflow, and that all-bits-zero
18276         yields scalar zero.  Fix spelling and capitalization typos.
18277
18278 2003-09-19  Karl Berry  <karl@gnu.org>
18279
18280         * lib/argp.h: update from libc.
18281
18282 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18283
18284         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18285         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18286         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18287
18288 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18289
18290         * gnulib-tool: Use "test -h", not "test -L", for portability
18291         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18292         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18293         (sed_extract_prog): Issue s commands one-by-one, rather than
18294         using \| in one s command.
18295
18296 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18297
18298         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18299         input error, instead of returning NULL the next time we are called
18300         (and therefore losing track of errno).
18301
18302 2003-09-16  Bruno Haible  <bruno@clisp.org>
18303
18304         * gnulib-tool (func_create_testdir): Warn about duplicated
18305         dependencies.
18306
18307 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18308
18309         * modules/argmatch, modules/fatal, modules/obstack,
18310         modules/xalloc, modules/xgethostname: Sort dependencies by
18311         importance, not alphabetically.
18312
18313 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18314
18315         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18316         fails, so that the caller gets the proper errno.
18317
18318         * lib/readutmp.c (read_utmp): Likewise.
18319         Check for fstat error.  Close stream and free storage
18320         when failing.
18321
18322 2003-09-14  Karl Berry  <karl@gnu.org>
18323
18324         * config/srclist.txt (strdup.c): disable for c89 changes.
18325
18326 2003-09-14  Jim Meyering  <jim@meyering.net>
18327
18328         * lib/getloadavg.c: Correct cpp indentation.
18329         * lib/strdup.c: Likewise.
18330         * lib/vasnprintf.c: Likewise.
18331
18332 2003-09-14  Bruno Haible  <bruno@clisp.org>
18333
18334         * modules/fwriteerror: New file.
18335         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18336
18337 2003-09-14  Bruno Haible  <bruno@clisp.org>
18338
18339         * lib/fwriteerror.h: New file.
18340         * lib/fwriteerror.c: New file.
18341
18342 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18343
18344         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18345         modules/xgethostname, modules/xalloc: Depend on exit.
18346
18347 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18348
18349         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18350
18351         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18352         and AC_MINIX, too, so that their extensions are available.
18353
18354         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18355         This macro has been superseded by gl_BACKUPFILE.
18356
18357         More patches to assume C89 or better.
18358
18359         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18360
18361         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18362         unconditionally.
18363         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18364         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18365         Include <string.h>, <stdlib.h> unconditionally.
18366         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18367         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18368         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18369         headers or for string.h.
18370         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18371         or strtoul.
18372
18373         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18374         headers.
18375         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18376         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18377         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18378         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18379         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18380         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18381         memcpy, memset.
18382         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18383         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18384         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18385         strtol.
18386         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18387         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18388         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18389         strtoul.
18390
18391 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18392
18393         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18394         * lib/obstack.c [!defined _LIBC]: Likewise.
18395         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18396         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18397         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18398
18399         More changes to assume C89 or better.
18400
18401         * lib/error.c (error_tail): Assume vprintf.
18402
18403         * lib/argmatch.c (getenv): Remove decl.
18404         * lib/progreloc.c (get_full_program_name): Define via prototype.
18405         * lib/setenv.c (clearenv): Likewise.
18406         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18407         needed.
18408         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18409         (malloc, memcpy): Remove decls.
18410         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18411         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18412         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18413         (memcpy): Remove macro.
18414         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18415         (__P): Remove.  All uses removed.
18416         (PTR): Remove.  All uses changed to void *.
18417         (CHAR_BIT, NULL): Remove.
18418         (spaces, zeros, memset_space, memset_zero)
18419         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18420         Remove.
18421         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18422         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18423         Define with prototype.
18424         Remove now-unnecessary prototype decl.
18425         (extra_args_spec): Assume ANSI C.  All uses changed.
18426         (extra_args_spec_iso): Remove.
18427         (my_strftime, emacs_strftimeu): Define via prototype.
18428         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18429         unconditionally.
18430         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18431         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18432         (strtoul, strtol): Remove decls.
18433         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18434         LONG_MAX): Remove.
18435         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18436         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18437         (LOCALE_PARAM_PROTO): New macro.
18438         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18439         (INTERNAL (strtol), strtol): Define with a prototype.
18440         (PARAMS): Remove.  All uses removed.
18441         * lib/tempname.c: Include <string.h> unconditionally.
18442         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18443         * lib/xgethostname.c (main): Define with a prototype.
18444         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18445         Include <stdlib.h> unconditionally.
18446         (calloc, malloc, realloc, free): Remove decls.
18447         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18448         Include <stdlib.h> unconditionally.  Sort include file names.
18449         (strtod): Remove.
18450         (xstrtod): Define with a prototype.
18451         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18452         (strtol, strtoul): Remove decls.
18453
18454 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18455
18456         More patches to assume C89 or better.
18457         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18458         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18459         string.h, memchr, STDC_HEADERS.
18460
18461 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18462
18463         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18464         Include <stdlib.h>, <string.h> unconditionally.
18465         Remove now-unnecessary cast to char *.
18466         * lib/strnlen.c: Include <string.h> unconditionally.
18467         * lib/yesno.c (yesno): Define with a prototype.
18468
18469 2003-09-11  Bruno Haible  <bruno@clisp.org>
18470
18471         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18472
18473 2003-09-10  Jim Meyering  <jim@meyering.net>
18474
18475         * lib/error.c: Correct indentation of cpp directives.
18476
18477 2003-09-10  Bruno Haible  <bruno@clisp.org>
18478
18479         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18480         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18481         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18482         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18483         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18484         <stdlib.h> and <string.h> checks.
18485         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18486         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18487
18488 2003-09-10  Bruno Haible  <bruno@clisp.org>
18489
18490         * lib/strcspn.c: Include <string.h> unconditionally.
18491         * lib/strpbrk.c: Include <string.h> unconditionally.
18492         * lib/strstr.c: Include <string.h> unconditionally.
18493         * lib/unicodeio.c: Include <string.h> unconditionally.
18494         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18495         * lib/unsetenv.c: Likewise.
18496         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18497         * lib/yesno.c: Include <stdlib.h> unconditionally.
18498         (rpmatch): Add prototype.
18499
18500 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18501
18502         More patches to assume C89 or better.
18503         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18504         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18505         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18506         or for string.h.
18507         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18508         stdlib.h.
18509         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18510         C headers.
18511         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18512         string.h.
18513         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18514         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18515         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18516         or for string.h.
18517         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18518         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18519         C headers.
18520         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18521         memcpy.
18522         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18523         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18524         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18525         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18526         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18527         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18528         string.h, free.
18529         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18530         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18531         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18532         C headers, or for string.h.
18533         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18534         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18535         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18536         headers, memory.h, stdlib.h, string.h, strings.h.
18537         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18538         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18539         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18540         strchr.
18541         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18542         headers, memory.h, string.h.
18543         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18544         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18545         free.
18546         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18547         headers.
18548         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18549         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18550         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18551         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18552         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18553
18554 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18555
18556         More K&R removal.
18557
18558         * lib/acosl.c (main): Use a prototype.
18559         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18560         tanl.c: Likewise.
18561
18562         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18563
18564         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18565         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18566         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18567         with a prototype.
18568         * lib/getopt.c (const): Remove macro.
18569         Include <string.h> unconditionally.
18570         (my_index): Remove; all uses changed to strchr.
18571         (strlen): Remove decl.
18572         (exchange): Remove forward decl; no longer needed.
18573         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18574         Define with prototype.
18575         * lib/getopt1.c (const): Remove macro.
18576         (getopt_long, getopt_long_only, main): Define with prototype.
18577
18578         * lib/getugroups.c: Include <string.h> unconditionally.
18579
18580         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18581         (getusershell, setusershell, endusershell, readname, main):
18582         Define with prototypes.
18583
18584         * lib/group-member.c: Include group-member.h first.
18585         Include <stdlib.h> unconditionally.
18586
18587         * lib/hard-locale.c: Include hard-locale.h first.
18588         Include <stdlib.h>, <string.h> unconditionally.
18589
18590         * lib/hash.c (free, malloc): Remove decls.
18591         Include <stdlib.h> unconditionally.
18592
18593         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18594         (getenv): Do not declare.
18595
18596         * lib/idcache.c: Include <string.h> unconditionally.
18597
18598         * lib/long-options.c: Include long-options.h first, to test interface.
18599         Include <stdlib.h> unconditionally.
18600
18601         * lib/makepath.c: Include makepath.h first, to test interface.
18602         Include <stdlib.h> and <string.h> unconditionally.
18603
18604         * lib/linebuffer.c: Include <stdlib.h>.
18605         (free): Remove decl.
18606
18607         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18608         stddef.h. rpl_malloc returns void *, not char *.
18609         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18610         prototype.
18611
18612         * lib/md5.h: Include <limits.h> unconditionally.
18613         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18614         (__P): Remove; all uses removed.
18615         * lib/md5.c: Include "md5.h" first.
18616         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18617         md5_buffer, md5_process_bytes, md5_process_block):
18618         Define with prototypes.
18619         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18620         * lib/sha.c: Include "sha.h" first.
18621         Include <stdlib.h>, <string.h> unconditionally.
18622
18623         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18624         * lib/memcmp.c (__ptr_t): Likewise.
18625         * lib/memrchr.c (__ptr_t): Likewise.
18626         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18627         Include <string.h> unconditionally.
18628         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18629         * lib/memchr.c: Include <stdlib.h> unconditionally.
18630         * lib/memchr.c (LONG_MAX): Remove.
18631         * lib/memrchr.c (LONG_MAX): Likewise.
18632         * lib/memchr.c (__memchr): Define via a prototype.
18633         * lib/memrchr.c (__memrchr): Likewise.
18634         * lib/memcmp.c (__P): Remove, and remove all uses.
18635         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18636         Remove forward decls; no longer needed.
18637         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18638         Use types required by C89 in prototype.
18639
18640         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18641         * lib/savedir.c: Likewise.
18642         * lib/mkdir.c (free): Remove decl.
18643         * lib/rmdir.c (rmdir): Define with a prototype.
18644         * lib/savedir.c: Include savedir.h first, to test interface.
18645
18646         * lib/mktime.c (STDC_HEADERS): Remove.
18647         Include <stdlib.h>, <string.h> unconditionally.
18648
18649         * lib/modechange.c: Include <stdlib.h> unconditionally.
18650         (malloc): Remove decl.
18651
18652         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18653         (free): Remove decl.
18654
18655         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18656         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18657         (This type really should be intptr_t, but that's a C99ism.)
18658         (_obstack_memcpy): Remove: all uses changed to memcpy.
18659         Include <string.h> unconditionally.
18660         (struct obstack): Assume __STDC__ for types of members
18661         chunkfun, freefun, extra_arg.
18662         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18663         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18664         obstack_begin, obstack_specify_allocation,
18665         obstack_specify_allocation_with_arg, obstack_chunkfun,
18666         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18667         Remove unprototyped decls and the macros that use them.
18668         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18669         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18670         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18671         (defined __STDC__ && __STDC__)]:
18672         Remove nonprototyped code.
18673         Include <stdlib.h> unconditionally.
18674         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18675         _obstack_allocated_p, _obstack_free, obstack_free,
18676         _obstack_memory_used, print_and_abort):
18677         Define using prototypes.
18678         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18679         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18680         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18681         obstack_next_free, obstack_object_size, obstack_room) [0]:
18682         Remove unused, unprototyped code.
18683
18684         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18685
18686         * lib/physmem.c (physmem_total, physmem_available, main): Define
18687         with prototypes.
18688
18689         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18690         (main): Define with a prototype.
18691
18692         * lib/posixver.c (getenv): Remove decl.
18693
18694         * lib/putenv.c (malloc): Returns void *, not char *.
18695         Include <string.h> unconditionally.
18696         (strchr, memcpy, NULL): Do not define.
18697
18698         * lib/readtokens.c: Include readtokens.h first, to test interface.
18699         Include <stdlib.h>, <string.h> unconditionally.
18700         (init_tokenbuffer): Define with a prototype.
18701
18702         * lib/regex.c (PARAMS): Remove.  All uses removed.
18703         All uses of _RE_ARGS removed, too.
18704         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18705         unconditionally.
18706         (bzero): Assume memset exists.
18707         (memcmp, memcpy, NULL): Remove.
18708         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18709         char, or assignments to local vars of type signed char.
18710         (init_syntax_once, PREFIX(extract_number_and_incr),
18711         PREFIX(print_partial_compiled_pattern),
18712         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18713         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18714         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18715         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18716         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18717         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18718         wcs_compile_range, byte_compile_range, truncate_wchar,
18719         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18720         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18721         count_mbs_length, wcs_re_match_2_internal,
18722         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18723         PREFIX(alt_match_null_string_p),
18724         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18725         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18726         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18727         now-unnecessary declaration, if any.
18728         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18729         regcomp, regexec):
18730         Remove now-unnecessary casts among pointer types.
18731         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18732
18733         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18734         (free): Remove decl.
18735
18736         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18737
18738         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18739         (free): Remove decl.
18740
18741         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18742         * lib/xgetcwd.c: Likewise.
18743
18744         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18745         (free): Remove decl.
18746
18747         * lib/strchrnul.c (strchrnul): Define with a prototype.
18748         Fix bug: c_in was not converted to char before searching.
18749
18750         The following changes are not K&R related:
18751
18752         * lib/group-member.h: Include <sys/types.h>, so that this file is
18753         self-contained.
18754         * lib/makepath.h: Likewise.
18755
18756         * lib/getusershell.c (readname, default_index, line_size, readname):
18757         Use size_t, not int, for sizes.
18758         (readname): If the size overflows, report an error instead of
18759         looping forever.
18760
18761 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18762
18763         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18764         libc.
18765
18766 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18767
18768         * README: New section: portability guidelines.
18769
18770 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18771
18772         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18773         C89 spec.
18774
18775 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18776
18777         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18778
18779 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18780
18781         Assume C89 or better; remove K&R cruft.
18782         A few of these changes were first proposed by Derek Robert Price
18783         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18784
18785         * lib/addext.c: Include <string.h> unconditionally.
18786         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18787         Don't declare getenv or malloc.
18788
18789         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18790         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18791         (NULL): Remove.
18792         (find_stack_direction, alloca): Use prototypes.
18793
18794         * lib/atexit.c (atexit): Define using a prototype.
18795
18796         * lib/basename.c, dirname.c, stripslash.c:
18797         Include <string.h> unconditionally.
18798
18799         * lib/bcopy.c: Include <stddef.h>.
18800         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18801
18802         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18803
18804         * lib/error.h (error, error_at_line, error_print_progname)
18805         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18806         * lib/error.c: Include error.h first, to check interface.
18807         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18808         (VA_START): Remove; all uses changeed to va_start.
18809         (exit, strerror): Remove decls.
18810         (error_print_progname): Prototype uncondionally.
18811         Don't include <errno.h>; no longer needed.
18812         (private_strerror): Remove.
18813         (error_tail): Always define.
18814         (error, error_at_line): Assume C89 or better; always use prototypes.
18815         * lib/fatal.c: Include "fatal.h" first, to test interface.
18816         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18817         (VA_START): Remove; all uses changed to va_start.
18818         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18819         this case.
18820         (exit): Remove decl.
18821         (fatal): Prototype unconditionally.  Assume va_start works.
18822         Abort at end, to pacify gcc.
18823
18824         * lib/euidaccess.c (main): Define with a prototype.
18825
18826         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18827
18828         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18829
18830         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18831         prototypes.
18832         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18833         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18834         (getenv): Remove decl.
18835         (fnmatch): Define using a prototype.
18836         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18837         (FCT): Define using a prototype.
18838
18839         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18840
18841         * lib/gethostname.c: Include <stddef.h>.
18842         (gethostname): Define with prototype.  Length is size_t, not int.
18843
18844 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18845
18846         Assume C89 or better; remove K&R cruft.
18847         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18848         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18849         string.h, getenv, malloc.
18850         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18851         headers.
18852         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18853         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18854         do not check for strerror.
18855         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18856         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18857         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18858         do not check for doprnt or vprintf.
18859         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18860         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18861
18862 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18863
18864         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18865         getversion.c should have been removed then, but was accidentally
18866         preserved.
18867
18868         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18869         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18870
18871 2003-09-08  Karl Berry  <karl@gnu.org>
18872
18873         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18874                 config, forget about prep.
18875
18876         * config/depcomp, missing: update from automake.
18877
18878 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18879
18880         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18881         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18882
18883 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18884
18885         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18886         copy_tm_result.  Bug reported by Simon Josefsson in
18887         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18888
18889 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18890
18891         * m4/time_r.m4: New file.
18892         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18893         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18894         is. Check for timegm declaration.
18895         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18896         Do not check for gmtime_r.
18897         Replace mktime if __mktime_internal does not exist and if mktime
18898         hasn't been replaced already.
18899
18900 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18901
18902         * lib/time_r.c, lib/time_r.h: New files.
18903
18904         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18905         __localtime_r.
18906         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18907         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18908
18909         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18910         __gmtime_r.
18911         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18912         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18913         Include <time_r.h>.
18914
18915         * lib/timegm.c: Switch to glibc implementation, with the following
18916         changes:
18917         [defined HAVE_CONFIG_H]: Include <config.h>.
18918         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18919         (__mktime_internal) [!defined _LIBC]: New decl.
18920         (__gmtime_r) [!defined _LIBC]: New macro and function.
18921         (timegm): Use a prototype, since gnulib assumes C89.
18922         Do not bother declaring tmp to be const, as it's not really usefu.
18923         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18924         (timegm): Declare only if HAVE_DECL_TIMEGM.
18925
18926 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18927
18928         * MODULES.html.sh (func_all_modules): Add time_r.
18929         * modules/time_r: New file.
18930         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18931         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18932
18933 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18934
18935         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18936         Bug reported by Lute Kamstra in
18937         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18938
18939         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18940         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18941         course with correspondingly smaller numbers for tomorrow and
18942         yesterday.  From Tadayoshi Funaba.  Originally installed into
18943         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18944         coreutils merge?).
18945
18946 2003-08-31  Simon Josefsson  <jas@extundo.com>
18947
18948         * modules/timegm: New file.
18949         * MODULES.html.sh (func_all_modules): Add timegm.
18950
18951 2003-08-31  Simon Josefsson  <jas@extundo.com>
18952
18953         * m4/timegm.m4: New file.
18954
18955 2003-08-31  Simon Josefsson  <jas@extundo.com>
18956
18957         * lib/timegm.h: New file.
18958         * lib/timegm.c: New file.  Based on
18959         wget-1.8.2/src/http.c:mktime_from_utc.
18960
18961 2003-08-31  Karl Berry  <karl@gnu.org>
18962
18963         * lib/argp.h: update from libc.
18964
18965 2003-08-28  Bruno Haible  <bruno@clisp.org>
18966
18967         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
18968         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
18969         followed by '#define fnmatch fnmatch_posix' gives an error.
18970
18971 2003-08-28  Bruno Haible  <bruno@clisp.org>
18972
18973         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
18974         warning on QNX, which defines O_BINARY to 000000.
18975
18976 2003-08-27  Jim Meyering  <jim@meyering.net>
18977
18978         * m4/mkstemp.m4: Require that the system mkstemp be able to create
18979         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
18980         would fail after 32.  Reported by Danny Levinson.  Details here:
18981         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
18982
18983 2003-08-24  Bruno Haible  <bruno@clisp.org>
18984
18985         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
18986         MSVC7 <stdio.h> is included later.
18987
18988 2003-08-22  Simon Josefsson  <jas@extundo.com>
18989
18990         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
18991
18992 2003-08-20  Karl Berry  <karl@gnu.org>
18993
18994         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
18995
18996 2003-08-20  Bruno Haible  <bruno@clisp.org>
18997
18998         * modules/progname: New file.
18999         * MODULES.html.sh (func_all_modules): Add progname.
19000
19001 2003-08-20  Bruno Haible  <bruno@clisp.org>
19002
19003         * lib/progname.h: New file, from GNU gettext.
19004         * lib/progname.c: New file, from GNU gettext.
19005         * lib/progreloc.c: New file, from GNU gettext.
19006
19007 2003-08-19  Jim Meyering  <jim@meyering.net>
19008
19009         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19010         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19011
19012 2003-08-19  Bruno Haible  <bruno@clisp.org>
19013
19014         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19015         more.
19016
19017 2003-08-19  Bruno Haible  <bruno@clisp.org>
19018
19019         * lib/xstrdup.c: Assume <string.h> exists.
19020
19021 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19022
19023         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19024         in makefile rules.
19025
19026 2003-08-18  Jim Meyering  <jim@meyering.net>
19027
19028         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19029         * m4/lib-ld.m4: Likewise.
19030
19031 2003-08-18  Jim Meyering  <jim@meyering.net>
19032
19033         * lib/setenv.h: Indent nested cpp directive.
19034         * lib/vasnprintf.c: Remove trailing blanks.
19035
19036 2003-08-17  Simon Josefsson  <jas@extundo.com>
19037
19038         * modules/xstrndup: New file.
19039         * MODULES.html.sh (func_all_modules): Add xstrndup.
19040
19041 2003-08-17  Simon Josefsson  <jas@extundo.com>
19042
19043         * modules/argp: Fix autoconf macro name. Add more dependencies.
19044
19045 2003-08-17  Simon Josefsson  <jas@extundo.com>
19046
19047         * m4/xstrndup.m4: New file.
19048
19049 2003-08-17  Simon Josefsson  <jas@extundo.com>
19050
19051         * m4/argp.m4: New file.
19052
19053 2003-08-17  Simon Josefsson  <jas@extundo.com>
19054             Bruno Haible  <bruno@clisp.org>
19055
19056         * lib/xstrndup.h: New file.
19057         * lib/xstrndup.c: New file.
19058
19059 2003-08-17  Bruno Haible  <bruno@clisp.org>
19060
19061         * modules/strndup (Files, Include): Add lib/strndup.h.
19062
19063 2003-08-17  Bruno Haible  <bruno@clisp.org>
19064
19065         * modules/euidaccess (Files): Add lib/euidaccess.h.
19066
19067 2003-08-17  Bruno Haible  <bruno@clisp.org>
19068
19069         * lib/strndup.h: New file.
19070
19071 2003-08-17  Bruno Haible  <bruno@clisp.org>
19072
19073         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19074         like AC_GNU_SOURCE.
19075         * modules/extensions (configure.ac): Comment out the invocation of
19076         gl_USE_SYSTEM_EXTENSIONS.
19077
19078 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19079
19080         Merges from coreutils, etc.
19081         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19082         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19083         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19084         fixing a typo.
19085         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19086         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19087
19088 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19089
19090         Document merge from coreutils.
19091         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19092         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19093         * modules/utime: Add m4/utimes-null.m4.
19094
19095 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19096
19097         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19098         space, undoing this 2003-08-12 change:
19099         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19100
19101 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19102
19103         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19104         strtoul.c from libc, undoing this 2003-08-12 change:
19105         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19106
19107 2003-08-16  Jim Meyering  <jim@meyering.net>
19108
19109         Merges from coreutils.
19110         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19111         prefix.  Adjust cache variables similarly.  Create 500 rather than
19112         just 300 files, to exercise bug on Darwin6.5, too.
19113         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19114         $missing_dir.
19115         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19116         AM_SYS_POSIX_TERMIOS.
19117         Reported by mkc@mathdogs.com.
19118         Also change use of $am_cv_sys_posix_termios
19119         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19120         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19121         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19122         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19123         in /proc/mounts until it finds one with matching device number.  This
19124         is unnecessary when the FILE argument *is* a mount point.  No stat call
19125         is necessary in that case.  So, disable the statvfs-testing code on
19126         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19127         as RedHat bug# 84846.
19128         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19129         to 1MB, so as not to render systems with no stack size limit (e.g.,
19130         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19131         Include <unistd.h>.  On some systems,
19132         it is required for the definition of _SC_PAGESIZE.
19133
19134 2003-08-16  Jim Meyering  <jim@meyering.net>
19135
19136         Merge from coreutils.
19137         * lib/xstrtoimax.c: #else #if -> #elif.
19138         * lib/xstrtoumax.c: Likewise.
19139
19140 2003-08-16  Jim Meyering  <jim@meyering.net>
19141
19142         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19143         * m4/utimes.m4: Removed.
19144         * m4/utimes-null.m4: Renamed from utimes.m4.
19145
19146         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19147         to 1MB, so as not to render systems with no stack size limit (e.g.,
19148         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19149         Include <unistd.h>.  On some systems,
19150         it is required for the definition of _SC_PAGESIZE.
19151
19152 2003-08-16  Jim Meyering  <jim@meyering.net>
19153         and Paul Eggert  <eggert@cs.ucla.edu>
19154
19155         Merges from coreutils, etc.
19156
19157         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19158         using the latest version from cvs.  This avoids problems with #line
19159         directives using a vendor (Sun) compiler.
19160         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19161         Don't set GETGROUPS_LIB here; now it's
19162         done via getgroups.m4's wrapper function.
19163         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19164         rather than just in sh-util/configure.in, so that the
19165         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19166         same.
19167         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19168         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19169         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19170         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19171         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19172         Remove code that is now done by the newly-required macros.
19173         Append $(EXEEXT) to DF_PROG.
19174         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19175         Do not invoke or require the following here,
19176         since prereq.m4 or some gnulib .m4 now does this for us:
19177         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19178         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19179         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19180         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19181         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19182         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19183         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19184         AC_FUNC_OBSTACK.
19185         Do not replace the following functions, as this is now the job
19186         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19187         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19188         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19189         atexit getpass, strdup, getpagesize.
19190         Replace 'raise'.
19191         Do not check for the following functions, as this is now the job
19192         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19193         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19194         setregid.
19195         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19196         Check for sys/sysctl.h.
19197         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19198         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19199         of checking for ssize_t ourselves.
19200
19201         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19202         Require every macro that gnulib/modules/* suggests for us.
19203         (jm_PREREQ_ADDEXT): New macro.
19204         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19205         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19206
19207         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19208         (gl_PHYSMEM): Use it.
19209         Also check for `table' function.
19210         Check for new headers and functions.
19211         Add check for sys/sysmp.h.
19212         With suggestions from Kaveh Ghazi.
19213         Ignore headers that are present but cannot be compiled.  This
19214         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19215         C 5.4.
19216
19217 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19218
19219         Document merge from coreutils.
19220         * modules/userspec: Depend on posixver.
19221         * modules/strftime: Depend on tzset.
19222
19223 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19224
19225         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19226         rather than tab, after '#' in shell-script copyright notices.
19227         Suggested by Bruno Haible.
19228
19229 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19230
19231         * config/srclist-update: Use three spaces, rather than tab, after '#'
19232         in shell-script copyright notices.  Suggested by Bruno Haible.
19233         Remove unnecessary parenthesization in regular expression.
19234
19235 2003-08-15  Jim Meyering  <jim@meyering.net>
19236
19237         Merge from coreutils.
19238         * lib/xgethostname.c: Include <stdlib.h>.
19239         (xghostname): Don't exit for anything other than memory-related
19240         failure; just return NULL.
19241         * lib/userspec.c: Include "posixver.h".
19242         (parse_user_spec): Accept `.' as a separator only
19243         in pre-POSIX-200112 mode.
19244         * lib/strtoimax.c: Use #elif rather than #else #if.
19245         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19246         Remove function, now that we can rely on a working tzset function.
19247         [!_LIBC]: Ensure that the required autoconf test has been run.
19248         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19249         Use underlying_strftime for %r.
19250         * lib/sha.c: Merge in some clean-up and optimization changes from
19251         glibc.
19252         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19253         Ensure that it is a multiple of 64.
19254         Rearrange loop exit tests so as to avoid performing an
19255         additional fread after encountering an error or EOF.
19256         * lib/realloc.c: Update copyright date.
19257
19258 2003-08-15  Jim Meyering  <jim@meyering.net>
19259         and Paul Eggert  <eggert@twinsun.com>
19260
19261         Merge from coreutils.
19262         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19263         member but strut utmpx does not.  Needed for AIX 4.3.3.
19264         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19265
19266 2003-08-15  Jim Meyering  <jim@meyering.net>
19267         and Paul Eggert  <eggert@cs.ucla.edu>
19268
19269         Merges from coreutils, etc.
19270         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19271         Require gl_FUNC_TZSET_CLOBBER.
19272         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19273         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19274         members.
19275
19276 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19277
19278         Help the merge from coreutils.
19279         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19280         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19281         * m4/tzset.m4: Use it too.
19282
19283 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19284
19285         * modules/tzset: New file.
19286
19287 2003-08-14  Jim Meyering  <jim@meyering.net>
19288
19289         Merges from coreutils.
19290         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19291         variable names, rather than @FNMATCH_H@.
19292         * modules/alloca: Likewise for $(ALLOCA_H).
19293
19294         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19295         the three copies of the literal target, `fnmatch.h'.
19296         * modules/alloca (alloca.h): Likewise.
19297
19298 2003-08-14  Jim Meyering  <jim@meyering.net>
19299
19300         Merge from coreutils.
19301         * m4/tzset.m4: New file.
19302         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19303         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19304         otherwise, AIX 5.1 systems would end up using the latter.
19305         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19306         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19307         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19308         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19309
19310 2003-08-14  Jim Meyering  <jim@meyering.net>
19311
19312         Merge from coreutils.
19313         * lib/obstack.h: Whitespace changes.
19314         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19315         and xcalloc return values.
19316         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19317         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19318         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19319         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19320         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19321         error from mntctl.
19322         Use mntctl's return value to drive the entry-processing loop, since
19323         we can't rely on the value of the vmt_length member in the last
19324         entry.  On some systems doing so could result in exhausting
19325         virtual memory.  Based in part on a patch from Mike Jetzer.
19326
19327 2003-08-14  Jim Meyering  <jim@meyering.net>
19328         and Paul Eggert  <eggert@twinsun.com>
19329
19330         Merges from coreutils, plus other fixes.
19331         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19332         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19333         for credits and details.  Thanks to Kaveh Ghazi for helping
19334         to keep these files in sync.
19335         (ARRAY_SIZE): Define it.
19336         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19337         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19338         (memcasecmp): Don't assume size_t fits in unsigned int.
19339         Remove casts and duplicate code.
19340         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19341         (memcpy): Remove definition.
19342         Merge in some clean-up and optimization changes from glibc.
19343         [BLOCKSIZE]: Move definition to top of file.
19344         Ensure that it is a multiple of 64.
19345         Rearrange loop exit tests so as to avoid performing an
19346         additional fread after encountering an error or EOF.
19347         * lib/md5.h (md5_uintptr): Define.
19348         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19349         return to the initial working directory.  Preserve errno
19350         for caller.
19351         * lib/idcache.c: Include "xalloc.h".
19352         (xmalloc, xrealloc): Remove decls.
19353         (getuser): Remove casts no longer required in C89.
19354         * lib/human.c: Include stdio.h, for sprintf.
19355         * lib/group-member.c: Include "xalloc.h".
19356         (xmalloc, xrealloc): Remove decls.
19357         (get_group_info): Remove casts no longer required in C89.
19358         * lib/getusershell.c (readname): Remove casts no longer required in
19359         C89.
19360         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19361         * lib/getline.c: Whitespace fix, from coreutils.
19362
19363 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19364
19365         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19366         Check for isascii.
19367
19368         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19369         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19370         Undo previous (whitespace-only) change.
19371
19372 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19373
19374         * lib/exclude.c: Include <ctype.h>
19375         (IN_CTYPE_DOMAIN): New macro.
19376         (is_space): New fn.
19377         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19378         and empty lines.
19379
19380         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19381         Undo previous (whitespace-only) change.
19382
19383 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19384
19385         * config/srclist-update: Change update back to the old behavior,
19386         leaving whitespace alone.  Use one 'sed' command rather than a
19387         pipeline.
19388         (fixlicense): Now a variable, not a function.
19389         (remove_trailing_blanks): Remove.
19390         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19391         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19392         Undo previous (whitespace-only) change.
19393
19394 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19395
19396         Merge from coreutils.
19397         * modules/euidaccess: Add lib_SOURCES, include for new
19398         file euidaccess.h
19399
19400 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19401
19402         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19403         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19404         Normalize leading white space and remove trailing white space.
19405
19406         Merge from coreutils
19407         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19408
19409         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19410         0.12.1.  These files are now being upgraded automatically by
19411         ../config/srclist-update.
19412
19413 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19414
19415         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19416         Normalize leading white space and remove trailing white space.
19417         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19418         notice, as per ../config/srclist-update.
19419
19420         Merge from coreutils.
19421         * lib/euidaccess.h: New file.
19422         * lib/euidaccess.c: Include it.
19423         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19424         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19425         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19426
19427 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19428
19429         * config/srclist-update: Add copyright notice.
19430         (remove_id_lines, remove_trailing_blanks): New constants.
19431         (fixfile): Use them to normalize spacing a bit in copied files.
19432         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19433         Normalize leading white space and remove trailing white space.
19434
19435         * config/texinfo.tex: Sync with texinfo.
19436
19437         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19438         strtoul.c from libc, to merge coreutils whitespace changes.
19439
19440         * config/srclist.txt: Get the following m4 files from gettext:
19441         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19442         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19443         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19444         wint_t.m4.
19445
19446 2003-08-12  Karl Berry  <karl@gnu.org>
19447
19448         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19449         been made.
19450
19451 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19452
19453         * modules/gnu-source, m4/gnu-source.m4:
19454         Remove; we're assuming Autoconf 2.54 or later now.
19455         Suggested by Bruno Haible.
19456         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19457
19458 2003-08-11  Bruno Haible  <bruno@clisp.org>
19459
19460         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19461
19462 2003-08-11  Bruno Haible  <bruno@clisp.org>
19463
19464         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19465         (vasnprintf): Use it instead of wcslen.
19466
19467 2003-08-11  Bruno Haible  <bruno@clisp.org>
19468
19469         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19470         value to ensure that _Bool promotes to int. Use #define for _Bool when
19471         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19472
19473 2003-08-10  Karl Berry  <karl@gnu.org>
19474
19475         * lib/regex.h: update from libc (whitespace fix).
19476
19477 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19478
19479         Merge some files from coreutils.  These changes were
19480         originally made by Jim Meyering.
19481         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19482         many older Unixes require this.
19483         * lib/alloca.c (alloca): Remove cast to argument of free;
19484         no longer needed in C89.
19485         * lib/alloca_.h, regex.h: Fix white space to match
19486         what GNU indent does.
19487
19488 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19489
19490         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19491         apparently Emacs's Unicode mode got confused before my 2003-08-05
19492         checkin.
19493
19494 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19495
19496         * m4/extensions.m4: New file.
19497         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19498         Require gl_USE_SYSTEM_EXTENSIONS.
19499         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19500         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19501
19502 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19503
19504         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19505         * modules/extensions, modules/gnu-source: New files.
19506         * modules/timespec, modules/unlocked-io: Depend on extensions.
19507
19508 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19509
19510         * modules/restrict: New file.
19511         * MODULES.html.sh (func_all_modules): Add restrict.
19512         * modules/regex: Depend on restrict.
19513
19514 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19515
19516         * m4/restrict.m4: New file.
19517         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19518
19519 2003-08-07  Bruno Haible  <bruno@clisp.org>
19520
19521         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19522         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19523
19524 2003-08-07  Bruno Haible  <bruno@clisp.org>
19525
19526         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19527         makes the module 'getndelim2' compatible with the module 'getline'.
19528
19529 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19530
19531         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19532         byte with "\201" to avoid glitches when editing that source file
19533         with multi-gnome-terminal.
19534
19535 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19536
19537         * lib/bumpalloc.h: Remove.
19538
19539 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19540
19541         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19542         * modules/bumpalloc: Remove.
19543
19544 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19545
19546         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19547         GNU coding style.
19548
19549         Merge from coreutils.
19550         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19551         1. From glibc.
19552         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19553         from Karl Berry, implemented by Jim Meyering.
19554         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19555         from Dmitry V. Levin.
19556         Remove anachronistic cast of xrealloc.
19557         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19558         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19559         type. Otherwise, it wouldn't compile with at least /bin/cc on
19560         ymp-cray-unicos9.0.2.X.
19561         Combine two mostly-identical uses of alloca into one.
19562         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19563
19564 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19565
19566         [From Emacs.]
19567
19568         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19569         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19570         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19571         obsolete NLIST_NAME_UNION.
19572         [__GNU__]: Undef BSD and FSCALE.
19573         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19574
19575 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19576
19577         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19578         an enum type, so that it's guaranteed to promote to int.  See:
19579         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19580
19581 2003-08-03  Karl Berry  <karl@gnu.org>
19582
19583         * config/depcomp: update from automake.
19584
19585 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19586
19587         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19588         (strerror): Don't assume that a printable int fits in 14 bytes.
19589
19590 2003-07-31  Bruno Haible  <bruno@clisp.org>
19591
19592         * modules/getpass-gnu: New file.
19593         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19594
19595 2003-07-31  Bruno Haible  <bruno@clisp.org>
19596
19597         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19598
19599 2003-07-24  Karl Berry  <karl@gnu.org>
19600
19601         * config/missing: update from automake.
19602
19603 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19604             Bruno Haible  <bruno@clisp.org>
19605
19606         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19607         * lib/getline.c (getline, getdelim): Likewise.
19608         Remove _GNU_SOURCE define; now it's defined in config.h through
19609         m4/getline.m4.
19610
19611 2003-07-23  Karl Berry  <karl@gnu.org>
19612
19613         * config/config.sub: update from prep.
19614
19615 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19616
19617         * modules/xalloc (Depends-on): Add exitfail.
19618         * modules/xmemcoll: Likewise.
19619
19620 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19621
19622         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19623         over-parenthesization in macros.
19624
19625         Sync with coreutils.
19626
19627         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19628         required by C99.
19629
19630         Use `exit_failure' for xalloc and xmemcoll instead of their own
19631         private exit-failure variables.
19632         * lib/xalloc.h (xalloc_exit_failure): Remove.
19633         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19634         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19635         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19636         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19637         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19638
19639 2003-07-20  Jim Meyering  <jim@meyering.net>
19640
19641         * modules/closeout (Depends-on): Add exitfail.
19642         Suggestion from Bruno Haible.
19643
19644 2003-07-19  Karl Berry  <karl@gnu.org>
19645
19646         * config/config.sub: update from prep.
19647
19648 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19649
19650         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19651         Remove.
19652         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19653         to test that it can stand by itself.  Include "exitfail.h".
19654         Clients should set exit_failure instead.
19655         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19656
19657 2003-07-18  Bruno Haible  <bruno@clisp.org>
19658
19659         * modules/getndelim2: New file.
19660         * modules/getline: Share files with module getndelim2.
19661         * modules/getnline: Depend on getndelim2 instead of sharing files with
19662         it. Add getnline.c to lib_SOURCES.
19663         * MODULES.html.sh (func_all_modules): Add getndelim2.
19664
19665 2003-07-18  Bruno Haible  <bruno@clisp.org>
19666
19667         * m4/getndelim2.m4: New file.
19668         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19669         invoke gl_PREREQ_GETNDELIM2.
19670         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19671         gl_PREREQ_GETNDELIM2.
19672         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19673         gl_GETNDELIM2.
19674
19675 2003-07-18  Bruno Haible  <bruno@clisp.org>
19676
19677         * lib/getndelim2.h: New file.
19678         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19679         getndelim2.h.
19680         (getndelim2): Make non-static. Change return type to ssize_t.
19681         * lib/getline.h: Change argument names.
19682         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19683         * lib/getnline.c: Include getndelim2.h.
19684
19685 2003-07-18  Andreas Schwab  <schwab@suse.de>
19686
19687         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19688
19689 2003-07-17  Karl Berry  <karl@gnu.org>
19690
19691         * config/config.sub: update from prep.
19692
19693 2003-07-17  Bruno Haible  <bruno@clisp.org>
19694
19695         * modules/getnline: New file.
19696         * modules/getline: Add lib/getndelim2.c to source file list.
19697         * MODULES.html.sh (func_all_modules): Add getnline.
19698
19699 2003-07-17  Bruno Haible  <bruno@clisp.org>
19700
19701         * m4/getnline.m4: New file.
19702
19703 2003-07-17  Bruno Haible  <bruno@clisp.org>
19704
19705         * m4/Makefile.am.in: Remove file.
19706         * m4/Makefile.am: Remove file.
19707         * m4/Makefile.in: Remove file.
19708
19709 2003-07-17  Bruno Haible  <bruno@clisp.org>
19710
19711         * lib/getnline.h: New file.
19712         * lib/getnline.c: New file.
19713         * lib/getndelim2.c: New file, extracted from getline.c.
19714         (getndelim2): Renamed from getdelim2, with added nmax argument.
19715         * lib/getline.c: Include getndelim2.c.
19716         (getdelim2): Moved out to getndelim2.c.
19717         (getline, getdelim): Update.
19718
19719 2003-07-17  Bruno Haible  <bruno@clisp.org>
19720
19721         * lib/Makefile.am: Remove file.
19722         * lib/Makefile.in: Remove file.
19723
19724 2003-07-17  Bruno Haible  <bruno@clisp.org>
19725
19726         * configure.in: Remove file.
19727         * Makefile.in: Remove file.
19728
19729 2003-07-17  Bruno Haible  <bruno@clisp.org>
19730
19731         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19732
19733 2003-07-16  Karl Berry  <karl@gnu.org>
19734
19735         * config/srclist-update: was running fixlicense twice, which caused
19736                 texinfo.tex to be nullified for some reason.  Simplify,
19737                 $gplsrc is no longer needed as far as I can see?
19738
19739 2003-07-16  Jim Meyering  <jim@meyering.net>
19740
19741         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19742
19743 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19744
19745         * config/srclist.txt: Get the following files from gettext-runtime/intl
19746         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19747         ref-del.sin.  From Bruno Haible.
19748         * config/srclist-update (fixfile): Change grep pattern again, since the
19749         previous fix didn't work (there was another trailing $).  Use
19750         '[$]' to escape the $s.
19751
19752 2003-07-15  Karl Berry  <karl@gnu.org>
19753
19754         * lib/vasnprintf.c: update from gettext.
19755
19756 2003-07-15  Karl Berry  <karl@gnu.org>
19757
19758         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19759         gets expanded when surrounded by '$'.
19760
19761 2003-07-15  Jim Meyering  <jim@meyering.net>
19762
19763         * modules/save-cwd: Don't depend on error.  From Derek Price.
19764
19765 2003-07-15  Jim Meyering  <jim@meyering.net>
19766
19767         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19768
19769 2003-07-14  Simon Josefsson  <jas@extundo.com>
19770
19771         * modules/mempcpy: New file.
19772         * MODULES.html.sh (func_all_modules): Add mempcpy.
19773
19774 2003-07-14  Simon Josefsson  <jas@extundo.com>
19775
19776         * m4/mempcpy.m4: New file.
19777
19778 2003-07-14  Simon Josefsson  <jas@extundo.com>
19779
19780         * lib/mempcpy.h: New file.
19781         * lib/mempcpy.c: New file.
19782
19783 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19784
19785         * modules/getdate, modules/posixtm: Depend on mktime.
19786
19787 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19788
19789         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19790         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19791         unicodeio.c, unicodeio.h, unlocked-io.h:
19792         Switch from LGPL to GPL.
19793
19794 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19795
19796         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19797         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19798         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19799         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19800         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19801         updated automatically by ../config/srclist-update.  This changes
19802         their license from LPGL to GPL.
19803
19804 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19805
19806         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19807         assumed to refer to the root of the most recent stable gettext version.
19808         * config/srclistvars.sh: Add defaults for eggert.
19809         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19810         Match "This program" as well as "The program".  This is needed
19811         for gettext.
19812
19813 2003-07-14  Jim Meyering  <jim@meyering.net>
19814
19815         Don't emit diagnostics.  Let callers do that.
19816         * lib/save-cwd.c: Don't include "error.h".
19817         (save_cwd): Don't call error.  Ensure that errno is valid
19818         when returning nonzero.
19819
19820         * lib/save-cwd.h (restore_cwd): Update prototype.
19821         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19822         Simplify.  Don't call error upon failure.  Let callers do that.
19823         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19824         when auditing is enabled.  But don't bother updating the #if.
19825
19826 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19827
19828         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19829         it breaks C++ compilation.
19830         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19831
19832 2003-07-10  Simon Josefsson  <jas@extundo.com>
19833
19834         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19835
19836 2003-07-10  Jim Meyering  <jim@meyering.net>
19837
19838         * m4/clock_time.m4: Remove trailing blank.
19839         * m4/intmax_t.m4: Likewise.
19840
19841 2003-07-10  Jim Meyering  <jim@meyering.net>
19842
19843         * lib/vasnprintf.c: Remove trailing blanks.
19844         Make cpp indentation consistent.
19845
19846 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19847
19848         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19849         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19850         Switch from LGPL to GPL.
19851
19852 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19853
19854         * config/srclist.txt: Sort sublists.  Add
19855         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19856         that differ from gnulib for one reason or another; we'd like this list
19857         to be smaller but for now let's document what we have.
19858
19859 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19860
19861         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19862         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19863         and sweeter "eval x=$x".
19864         * config/srclist.txt: Get lib/argp* from glibc.
19865
19866 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19867
19868         * lib/mktime.c: Fix some boundary cases and remove need for floating
19869         point.
19870
19871         Issue a compile-time diagnostic if time_t is floating point, or if
19872         two's complement arithmetic is not in effect, or if arithmetic
19873         right shift does not propagate the sign.  These assumptions were
19874         all in the original code but they weren't checked.
19875
19876         (TIME_T_MIDPOINT, verify): New macros.
19877         (__isleap): Remove; it has integer overflow problems.
19878         (leapyear): New function, without those problems.
19879         (ydhms_tm_diff): Remove; splitting into two parts.
19880         (ydhms_diff): New function, containing the arithmetic part of
19881         the old ydhms_tm_diff function.  Issue a compile-time
19882         diagnostic if we are not using C99 integer division.
19883         Avoid casts when possible.
19884         (guess_time_tm): New function, containing the checking part of
19885         the old ydhms_tm_diff function.  Return the new value, rather than
19886         the difference between it and the old.  Accept a new argument T
19887         so that *T specifies the old value.  Check for overflow in the result.
19888
19889         (__mktime_internal): Use a time_t offset, not a long int offset.
19890         This undoes the 2003-06-04 change, which is no longer needed now
19891         that we have better overflow checking.
19892         (localtime_offset): Likewise.
19893
19894         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19895         and long are 64-bit but int is only 32-bit.
19896         (ydhms_diff): Use long int to store year1 and yday1.
19897         Issue a compile-time diagnostic if long int is not wide enough.
19898
19899         (__mktime_internal): Use long int to store adjusted year and yday.
19900         Use plain C rather than preprocessor commands, if that doesn't
19901         affect efficiency.
19902         Check for overflow (and try to repair) after each probe
19903         rather than checking only at the very end.  This avoids some bugs
19904         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19905         does not equal GMT offset at maximum time).
19906         Use integer to check for overflow rather than floating point; this
19907         is more portable to non-IEEE hosts, and is a tad faster.
19908         When we detect that we are oscillating between two values,
19909         don't check whether tm_isdst has the requested value, since
19910         we already know the answer.  When tm_isdst has the wrong value,
19911         use a different heuristic to find the right one, based on the
19912         extreme values actually observed in practice in tz2003a,
19913         rather than the (overly optimistic) "previous 3 calendar quarters".
19914
19915         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19916         "T const" to accommodate glibc style.
19917         (check_result): Use less-confusing report format.  "long" -> "long int.
19918         (main): Likewise.
19919         Don't loop if the iteration overflows time_t.
19920         Allow a negative step in the iteration.
19921
19922 2003-07-06  Karl Berry  <karl@gnu.org>
19923
19924         * config/depcomp: update from automake.
19925         * config/config.sub: update from prep.
19926
19927 2003-07-03  Karl Berry  <karl@gnu.org>
19928
19929         * config/config.guess: update from prep.
19930
19931 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19932
19933         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19934         xreadlink.c now includes it unconditionally.
19935
19936 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19937
19938         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19939         having it depend on HAVE_SYS_TYPES_H.
19940
19941 2003-07-01  Bruno Haible  <bruno@clisp.org>
19942
19943         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19944         <sys/types.h> should be sufficient.
19945         Reported by Paul Eggert.
19946
19947 2003-06-26  Karl Berry  <karl@gnu.org>
19948
19949         * config/depcomp: update from automake.
19950
19951 2003-06-26  Bruno Haible  <bruno@clisp.org>
19952
19953         * modules/human: Depend on module stdbool.
19954
19955 2003-06-25  Bruno Haible  <bruno@clisp.org>
19956
19957         * modules/readlink: New file.
19958         * modules/xreadlink: Depend on it.
19959         * MODULES.html.sh (func_all_modules): Add readlink.
19960
19961 2003-06-25  Bruno Haible  <bruno@clisp.org>
19962
19963         * m4/readlink.m4: New file.
19964
19965 2003-06-25  Bruno Haible  <bruno@clisp.org>
19966
19967         * lib/readlink.c: New file.
19968
19969 2003-06-22  Karl Berry  <karl@gnu.org>
19970
19971         * config/srclist.txt: update mkinstalldirs from automake.
19972         * config/mkinstalldirs: update.
19973
19974 2003-06-22  Bruno Haible  <bruno@clisp.org>
19975
19976         Portability to mingw32.
19977         * m4/ssize_t.m4: New file, from GNU gettext.
19978         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
19979         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
19980
19981 2003-06-22  Bruno Haible  <bruno@clisp.org>
19982
19983         * modules/safe-read: Add m4/ssize_t.m4.
19984         * modules/xreadlink: Add m4/ssize_t.m4.
19985
19986 2003-06-20  Bruno Haible  <bruno@clisp.org>
19987
19988         Assume C89, so PARAMS isn't needed.
19989         * lib/unicodeio.h (PARAMS): Remove.
19990         * lib/unicodeio.c: Don't use PARAMS.
19991
19992 2003-06-18  Karl Berry  <karl@gnu.org>
19993
19994         * config/config.{guess,sub}: update from prep.
19995
19996 2003-06-18  Jim Meyering  <jim@meyering.net>
19997
19998         Merge changes from coreutils.
19999         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20000         Remove explicit declarations of xmalloc and realloc.
20001         Include xalloc.h.
20002         (read_utmp): Remove anachronistic cast of xmalloc.
20003
20004 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20005
20006         Assume C89, so PARAMS isn't needed.
20007         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20008         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20009         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20010         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20011         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20012         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20013         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20014         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20015         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20016         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20017         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20018         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20019         no longer needed. Anyway, config.h should always be included before any
20020         other file.
20021
20022 2003-06-11  Simon Josefsson  <jas@extundo.com>
20023
20024         * modules/sysexits: New file.
20025         * MODULES.html.sh (func_all_modules): Add sysexits.
20026
20027 2003-06-11  Simon Josefsson  <jas@extundo.com>
20028
20029         * lib/sysexit_.h: New file.
20030
20031 2003-06-11  Derek Price  <derek@ximbiot.com>
20032
20033         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20034         necessary.
20035
20036 2003-06-11  Bruno Haible  <bruno@clisp.org>
20037
20038         * m4/sysexits.m4: New file.
20039
20040 2003-06-10  Simon Josefsson  <jas@extundo.com>
20041
20042         * lib/argp.h: New file, from glibc.
20043         * lib/argp-ba.c: New file, from glibc.
20044         * lib/argp-eexst.c: New file, from glibc.
20045         * lib/argp-fmtstream.c: New file, from glibc.
20046         * lib/argp-fmtstream.h: New file, from glibc.
20047         * lib/argp-fs-xinl.c: New file, from glibc.
20048         * lib/argp-help.c: New file, from glibc.
20049         * lib/argp-namefrob.h: New file, from glibc.
20050         * lib/argp-parse.c: New file, from glibc.
20051         * lib/argp-pv.c: New file, from glibc.
20052         * lib/argp-pvh.c: New file, from glibc.
20053         * lib/argp-xinl.c: New file, from glibc.
20054
20055 2003-06-10  Simon Josefsson  <jas@extundo.com>
20056
20057         * modules/strchrnul: New file.
20058
20059 2003-06-10  Simon Josefsson  <jas@extundo.com>
20060
20061         * modules/argp: New file.
20062
20063 2003-06-10  Simon Josefsson  <jas@extundo.com>
20064
20065         * m4/strchrnul.m4: New file.
20066
20067 2003-06-10  Simon Josefsson  <jas@extundo.com>
20068
20069         * lib/strchrnul.h: New file.
20070         * lib/strchrnul.c: New file.
20071
20072 2003-06-10  Bruno Haible  <bruno@clisp.org>
20073
20074         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20075
20076 2003-06-07  Karl Berry  <karl@gnu.org>
20077
20078         * config/config.{guess,sub}: update from prep.
20079
20080 2003-06-07  Jim Meyering  <jim@meyering.net>
20081
20082         * modules/strtod: Use $(...) notation, not @...@ for
20083         AC_REPLACE'd variables.
20084         * modules/localcharset: Likewise.
20085
20086 2003-06-07  Jim Meyering  <jim@meyering.net>
20087
20088         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20089         in place of my name in the copyright comment.
20090         Remove definition and uses of __P.
20091
20092         From coreutils.
20093         * lib/stat.c: Don't declare xmalloc explicitly.
20094         Instead, include "xalloc.h".
20095         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20096         xrealloc, and xcalloc return values.
20097         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20098         Improve comment.
20099         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20100
20101 2003-06-07  Bruno Haible  <bruno@clisp.org>
20102
20103         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20104         avoid AC_CONFIG_LINKS.
20105         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20106         fnmatch.h, to avoid AC_CONFIG_LINKS.
20107         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20108
20109 2003-06-07  Bruno Haible  <bruno@clisp.org>
20110
20111         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20112         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20113         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20114         directory.
20115         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20116         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20117         directory.
20118
20119 2003-06-06  Jim Meyering  <jim@meyering.net>
20120
20121         Merge from coreutils.
20122         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20123         Consolidate declarations and initializations of *_base* locals.
20124
20125         Merge from coreutils.
20126         This avoids a core dump on systems without GNU putenv,
20127         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20128         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20129         (unsetenv): New static function, from GNU libc.
20130         (rpl_putenv): Use it.
20131
20132         * lib/modechange.c: Remove trailing blanks.
20133
20134         Merge from coreutils.
20135         * lib/fsusage.c: Remove declaration of statfs.
20136         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20137
20138         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20139
20140 2003-06-06  Jim Meyering  <jim@meyering.net>
20141
20142         * lib/stdbool_.h: Renamed from stdbool.h.in.
20143
20144 2003-06-06  Jim Meyering  <jim@meyering.net>
20145             Bruno Haible  <bruno@clisp.org>
20146
20147         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20148         Adjust Makefile.am snippet not to redirect directly to target.
20149         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20150
20151 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20152
20153         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20154         mismatch, look in future quarters as well as past.  This fixes a
20155         bug when processing fall-backwards gaps immediately after a long
20156         period of daylight-saving time.
20157
20158         * lib/mktime.c: Assume freestanding C89 or better.
20159         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20160         (__P): Remove; not used.
20161         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20162         (mktime, not_equal_tm, print_tm, check_result,
20163         main): Use prototypes.  Use const * where appropriate.
20164         (main): Fix typo in testing code that uncovered by above changes.
20165         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20166
20167 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20168
20169         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20170         locale.h, localeconv.  This merges changes from coreutils.
20171
20172         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20173         It can be removed after the next Autoconf is released.
20174         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20175         needed.
20176
20177 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20178
20179         * lib/mktime.c: Fix Debian bug 177940
20180         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20181         (localtime_offset): Now long int, not time_t, because we want it
20182         to be guaranteed to be signed.  All uses changed.
20183         (__mktime_internal): If overflow would occur when adding offset,
20184         don't add it.
20185
20186         Merge 'human' changes from coreutils.  Rewrite to support
20187         locale-specific notations like thousands separators.
20188         * lib/human.c: Simplify authorship notice.
20189         Include human.h immediately after config.h.
20190         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20191         <limits.h>: Do not include, since human.h does.
20192         (SIZE_MAX, UINTMAX_MAX): New macros.
20193         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20194         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20195         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20196         (power_letter): Renamed from suffixes.
20197         (generate_suffix_backwards): Remove.
20198         (adjust_value): Now takes int style (because of human.h changes)
20199         and long double value (for greater precision on some platforms).
20200         (group_number): New function.
20201         (human_readable): Use it.  Use integer options, not enum.
20202         Put the options before the sizes in the arg list.
20203         Support all the new options.
20204         The old human_readable function has been removed;
20205         use inttostr.h instead.
20206         (human_readable, default_block_size, humblock):
20207         Use uintmax_t, not int, for block sizes.
20208         (human_readable_inexact, block_size_types): Remove.
20209         (block_size_opts): New constant.
20210         (human_options): Renamed from human_block_size, with new signature
20211         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20212         * lib/human.h: Add copyright and authorship notice.
20213         Include <limits.h> and <stdbool.h> unconditionally.
20214         (PARAMS): Remove.  All uses removed.
20215         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20216         (enum human_inexact_style): Remove tag; now a nameless enum.
20217         (human_floor, human_ceiling, human_round_to_even): Now have
20218         values 2, 0, 1 rather than -1, 1, 0.
20219         (human_group_digits, human_suppress_point_zero, human_autoscale,
20220         human_base_1024, human_SI, human_B): New constants.
20221         (human_readable_inexact, human_block_size): Remove.
20222         (human_readable): Size args are now uintmax_t, not int.
20223         (human_options): New decl.
20224
20225         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20226         unnecessary now that we assume C89 or better.  This change
20227         imported from coreutils.
20228
20229         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20230         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20231         in the 2003-05-30 sync from glibc.
20232
20233         .h files should stand alone, but we shouldn't include <sys/types.h>
20234         if we can get away with just <stddef.h>.
20235
20236         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20237         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20238         rather than <sys/types.h>, as we merely need size_t.
20239         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20240         to get size_t.
20241         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20242         Include <stdio.h>, to get FILE.
20243         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20244         memcasecmp.h has included <stddef.h> and all we need is size_t.
20245         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20246         our interface, instead of including <sys/types.h>
20247
20248 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20249
20250         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20251         now, as glibc mktime is buggy on non-glibc systems.
20252
20253 2003-06-03  Karl Berry  <karl@gnu.org>
20254
20255         * config/config.sub: update from prep.
20256
20257 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20258
20259         [from coreutils]
20260         Fix some minor time-related bugs with POSIX time arguments.
20261         Some valid time stamps were being rejected (notably -1, and
20262         time stamps before 1900 on 64-bit hosts).  And some invalid
20263         time stamps were being accepted, e.g. September 31.
20264
20265         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20266         that we can return (time_t) -1 successfully.
20267         * lib/posixtm.c: Likewise.
20268         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20269         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20270         (t): Remove static var.
20271         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20272         of static var.  All uses changed.
20273         (year): Do not reject years before 1900; they can occur with
20274         64-bit time_t.
20275         (posix_time_parse): Do not check for out-of-range components;
20276         that is now the caller's responsibility, since our checks were
20277         only approximations.
20278         (posixtime): Use mktime to check for out-of-range components,
20279         since it knows them exactly.
20280         If mktime returns (time_t) -1, check whether an error actually occurred
20281         by invoking localtime on -1.
20282         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20283         posixtime failures better.
20284         Improve the test data (in comments only).
20285
20286 2003-06-02  Karl Berry  <karl@gnu.org>
20287
20288         * config/mkinstalldirs (version): new variable.
20289         (--version): new option.
20290         (usage): improve message.
20291
20292 2003-05-30  Karl Berry  <karl@gnu.org>
20293
20294         * lib/mktime.c: update from libc.
20295
20296 2003-05-30  Bruno Haible  <bruno@clisp.org>
20297
20298         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20299         * config/config.rpath: Upgrade to gettext-0.12.1.
20300
20301 2003-05-30  Bruno Haible  <bruno@clisp.org>
20302
20303         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20304         * m4/nls.m4: New file, from gettext-0.12.1.
20305         * m4/po.m4: New file, from gettext-0.12.1.
20306         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20307
20308 2003-05-30  Bruno Haible  <bruno@clisp.org>
20309
20310         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20311         * lib/localcharset.h: Likewise.
20312         * lib/localcharset.c: Likewise.
20313
20314 2003-05-29  Karl Berry  <karl@gnu.org>
20315
20316         * config/config.rpath: update from gettext.
20317
20318 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20319
20320         Assume the headers required for C89 freestanding compilers.
20321         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20322         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20323         * m4/human.m4 (gl_HUMAN): Likewise.
20324         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20325         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20326         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20327         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20328         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20329         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20330
20331 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20332
20333         Assume the headers required for C89 freestanding compilers.
20334         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20335         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20336         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20337         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20338         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20339         define, since <limits.h> is guaranteed to do that.
20340         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20341         * lib/exclude.c: Include <stdbool.h> unconditionally.
20342         * lib/tempname.c: Include <stddef.h> unconditionally.
20343         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20344         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20345         <stddef.h> does that.
20346         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20347         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20348         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20349         needed.
20350         * lib/xstrtol.c: Likewise.
20351         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20352         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20353
20354         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20355         warnings on some platforms.
20356
20357         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20358         arbitrarily.
20359
20360 2003-05-26  Jim Meyering  <jim@meyering.net>
20361
20362         Merge in a change from coreutils:
20363         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20364         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20365         that condition, rather than `-1' which is slightly misleading.
20366         Change the name of the cache variable to have the gl_ prefix.
20367         Prompted by a patch from Richard Dawe for DJGPP.
20368
20369 2003-05-24  Karl Berry  <karl@gnu.org>
20370
20371         * config/config.guess: update from prep.
20372
20373 2003-05-22  Karl Berry  <karl@gnu.org>
20374
20375         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20376
20377 2003-05-20  Karl Berry  <karl@gnu.org>
20378
20379         * config/config.guess: update from prep.
20380
20381 2003-05-18  Karl Berry  <karl@gnu.org>
20382
20383         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20384         might actually be set by the user.
20385
20386         * config/depcomp, install-sh, mdate-sh: update from automake.
20387
20388 2003-05-17  Bruno Haible  <bruno@clisp.org>
20389
20390         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20391         invalid expansion for AC_EGREP_CPP.
20392         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20393         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20394         Suggested by Akim Demaille <akim@epita.fr> in
20395         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20396
20397 2003-05-12  Jim Meyering  <jim@meyering.net>
20398
20399         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20400         the space-padded-by-default conversion specifiers, %e, %k, %l.
20401
20402 2003-05-12  Bruno Haible  <bruno@clisp.org>
20403
20404         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20405         the string is longer than 4 KB.
20406
20407 2003-05-11  Karl Berry  <karl@gnu.org>
20408
20409         * config/config.{guess,sub}: update from prep.
20410
20411 2003-05-09  Bruno Haible  <bruno@clisp.org>
20412
20413         * modules/error: Add m4/strerror_r.m4 to file list.
20414
20415 2003-05-03  Bruno Haible  <bruno@clisp.org>
20416
20417         Upgrade to Unicode-4.0.
20418         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20419         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20420         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20421         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20422         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20423         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20424         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20425         Change width of U+E0100..U+E01EF from 1 to 0.
20426
20427 2003-04-25  Jim Meyering  <jim@meyering.net>
20428
20429         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20430         of type size_t, not int.
20431
20432 2003-04-25  Bruno Haible  <bruno@clisp.org>
20433
20434         * lib/copy-file.c: Include <stddef.h>, for size_t.
20435
20436 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20437
20438         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20439         code which expansion is under static control.  Patch imported from
20440         Akim Demaille's patch to Bison; see
20441         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20442
20443 2003-04-14  Bruno Haible  <bruno@clisp.org>
20444
20445         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20446
20447 2003-04-11  Jim Meyering  <jim@meyering.net>
20448
20449         Merge changes from Coreutils.
20450
20451         2003-03-22  Jim Meyering  <jim@meyering.net>
20452
20453         * lib/strftime.c (widen): Cast alloca return value to proper type.
20454
20455         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20456
20457         From GNU libc.
20458         * lib/strftime.c (my_strftime): Handle very large width
20459         specifications for numeric values correctly.  Improve checks for
20460         overflow.
20461
20462         2003-01-19  Jim Meyering  <jim@meyering.net>
20463
20464         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20465         definitions.
20466         (nl_get_alt_digit) [! defined my_strftime]: Define.
20467         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20468         _nl_get_alt_digit and _nl_get_walt_digit.
20469
20470         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20471         libc. These changes have no effect outside of _LIBC.
20472
20473 2003-04-10  Bruno Haible  <bruno@clisp.org>
20474
20475         * modules/findprog: New file.
20476         * MODULES.html.sh (func_all_modules): Add it.
20477
20478 2003-04-10  Bruno Haible  <bruno@clisp.org>
20479
20480         * m4/findprog.m4: New file.
20481         * m4/eaccess.m4: New file.
20482
20483 2003-04-10  Bruno Haible  <bruno@clisp.org>
20484
20485         * lib/findprog.h: New file, from GNU gettext.
20486         * lib/findprog.c: New file, from GNU gettext.
20487
20488 2003-04-05  Jim Meyering  <jim@meyering.net>
20489
20490         Merge changes from Coreutils.
20491
20492         * lib/exclude.h (PARAMS): Remove definition and uses.
20493         * lib/exclude.c: Remove uses of `PARAMS'.
20494
20495         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20496         Add test-cases for DOS filenames. Declare program_name.
20497         (main): Set up program_name.  Patch by Rich Dawe.
20498
20499         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20500         error from mntctl.
20501         Use mntctl's return value to drive the entry-processing loop, since
20502         we can't rely on the value of the vmt_length member in the last
20503         entry.  On some systems doing so could result in exhausting
20504         virtual memory.  Based in part on a patch from Mike Jetzer.
20505
20506 2003-04-04  Bruno Haible  <bruno@clisp.org>
20507
20508         * modules/linebreak: New file.
20509         * MODULES.html.sh (func_all_modules): Add it.
20510
20511 2003-04-04  Bruno Haible  <bruno@clisp.org>
20512
20513         * m4/linebreak.m4: New file.
20514
20515 2003-04-04  Bruno Haible  <bruno@clisp.org>
20516
20517         * lib/linebreak.h: New file, from GNU gettext.
20518         * lib/linebreak.c: New file, from GNU gettext with slight
20519         modifications.
20520         * lib/lbrkprop.h: New file, from GNU gettext.
20521
20522 2003-04-03  Bruno Haible  <bruno@clisp.org>
20523
20524         * modules/utf8-ucs4: New file.
20525         * modules/utf16-ucs4: New file.
20526         * modules/ucs4-utf8: New file.
20527         * modules/ucs4-utf16: New file.
20528         * MODULES.html.sh (func_all_modules): Add them.
20529
20530 2003-04-03  Bruno Haible  <bruno@clisp.org>
20531
20532         * m4/utf-ucs4.m4: New file.
20533         * m4/ucs4-utf.m4: New file.
20534
20535 2003-04-03  Bruno Haible  <bruno@clisp.org>
20536
20537         * lib/utf8-ucs4.h: New file, from GNU gettext.
20538         * lib/utf16-ucs4.h: New file, from GNU gettext.
20539         * lib/ucs4-utf8.h: New file, from GNU gettext.
20540         * lib/ucs4-utf16.h: New file, from GNU gettext.
20541
20542 2003-04-02  Bruno Haible  <bruno@clisp.org>
20543
20544         * modules/binary-io: New file.
20545         * MODULES.html.sh (func_all_modules): Add it.
20546
20547 2003-04-02  Bruno Haible  <bruno@clisp.org>
20548
20549         * lib/binary-io.h: New file, from GNU gettext.
20550
20551 2003-04-01  Bruno Haible  <bruno@clisp.org>
20552
20553         * modules/pathname: New file.
20554         * MODULES.html.sh (func_all_modules): Add it.
20555
20556 2003-04-01  Bruno Haible  <bruno@clisp.org>
20557
20558         * lib/pathname.h: New file, from GNU gettext.
20559         * lib/concatpath.c: New file, from GNU gettext.
20560
20561 2003-03-30  Bruno Haible  <bruno@clisp.org>
20562
20563         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20564
20565 2003-03-30  Bruno Haible  <bruno@clisp.org>
20566
20567         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20568         function chown() doesn't exist.
20569
20570 2003-03-28  Bruno Haible  <bruno@clisp.org>
20571
20572         * modules/copy-file: New file.
20573         * MODULES.html.sh (func_all_modules): Add it.
20574
20575 2003-03-28  Bruno Haible  <bruno@clisp.org>
20576
20577         * m4/copy-file.m4: New file.
20578
20579 2003-03-28  Bruno Haible  <bruno@clisp.org>
20580
20581         * lib/copy-file.h: New file, from GNU gettext.
20582         * lib/copy-file.c: New file, from GNU gettext.
20583
20584 2003-03-18  Jim Meyering  <jim@meyering.net>
20585
20586         * lib/quote.c (quote_n): Fix typo in comment.
20587
20588 2003-03-18  Bruno Haible  <bruno@clisp.org>
20589
20590         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20591         checking.
20592         * m4/onceonly_2_57.m4: Likewise.
20593
20594 2003-03-17  Bruno Haible  <bruno@clisp.org>
20595
20596         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20597         (m4_quote): Remove macro.
20598         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20599
20600 2003-03-14  Jim Meyering  <jim@meyering.net>
20601
20602         Merge changes from Coreutils.
20603         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20604         to be const, in order to avoid warnings.
20605         (obstack_room): Likewise.
20606         (obstack_empty_p): Likewise.
20607
20608 2003-03-14  Bruno Haible  <bruno@clisp.org>
20609
20610         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20611         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20612
20613 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20614
20615         Merge changes from Bison.
20616         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20617         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20618         when compiling Bison 1.875's `bitset bset = obstack_alloc
20619         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20620         * lib/hash.c: Include <stdbool.h> unconditionally.
20621
20622 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20623
20624         * m4/onceonly.m4 (m4_quote): New macro.
20625         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20626         Quote AC_FOREACH variable-expansions properly.
20627
20628 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20629
20630         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20631
20632 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20633
20634         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20635         Reported by Bruce Becker; see:
20636         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20637
20638 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20639             Bruno Haible  <bruno@clisp.org>
20640
20641         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20642         Reported by John Hughes, see
20643         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20644
20645 2003-02-20  Bruno Haible  <bruno@clisp.org>
20646
20647         * MODULES.html.sh (func_all_modules): Add poll.
20648
20649 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20650
20651         * modules/poll: New file.
20652
20653 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20654
20655         * lib/poll_.h: New file.
20656         * lib/poll.c: New file.
20657
20658 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20659
20660         * m4/poll.m4: New file.
20661
20662 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20663
20664         * modules/mathl: New file.
20665
20666 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20667
20668         * lib/mathl.h: New file.
20669         * lib/acosl.c: New file.
20670         * lib/asinl.c: New file.
20671         * lib/atanl.c: New file.
20672         * lib/ceill.c: New file.
20673         * lib/cosl.c: New file.
20674         * lib/expl.c: New file.
20675         * lib/floorl.c: New file.
20676         * lib/frexpl.c: New file.
20677         * lib/ldexpl.c: New file.
20678         * lib/logl.c: New file.
20679         * lib/sincosl.c: New file.
20680         * lib/sinl.c: New file.
20681         * lib/sqrtl.c: New file.
20682         * lib/tanl.c: New file.
20683         * lib/trigl.c: New file.
20684         * lib/trigl.h: New file.
20685
20686 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20687
20688         * m4/mathl.m4: New file.
20689
20690 2003-02-18  Bruno Haible  <bruno@clisp.org>
20691
20692         * MODULES.html.sh (func_all_modules): Add mathl.
20693
20694 2003-02-17  Bruno Haible  <bruno@clisp.org>
20695
20696         * modules/mkdtemp: New module.
20697         * MODULES.html.sh (func_all_modules): Add it.
20698
20699 2003-02-17  Bruno Haible  <bruno@clisp.org>
20700
20701         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20702
20703 2003-02-17  Bruno Haible  <bruno@clisp.org>
20704
20705         * lib/mkdtemp.h: New file, from GNU gettext.
20706         * lib/mkdtemp.c: New file, from GNU gettext.
20707
20708 2003-02-02  Jim Meyering  <jim@meyering.net>
20709
20710         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20711         e.g. glibc-2.2.93.
20712
20713 2003-01-31  Bruno Haible  <bruno@clisp.org>
20714
20715         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20716         'rpl_rename'.
20717         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20718         'rpl_strnlen'.
20719         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20720         'rpl_strtod'.
20721         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20722         'rpl_utime'.
20723
20724 2003-01-31  Bruno Haible  <bruno@clisp.org>
20725
20726         * lib/rename.c: #undef rename before defining rpl_rename.
20727         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20728
20729 2003-01-30  Bruno Haible  <bruno@clisp.org>
20730
20731         * modules/vasnprintf, modules/vasprintf: New modules.
20732         * MODULES.html.sh (func_all_modules): Add them.
20733
20734 2003-01-30  Bruno Haible  <bruno@clisp.org>
20735
20736         * m4/signed.m4: New file, from GNU gettext.
20737         * m4/longdouble.m4: New file, from GNU gettext.
20738         * m4/wchar_t.m4: New file, from GNU gettext.
20739         * m4/wint_t.m4: New file, from GNU gettext.
20740         * m4/vasnprintf.m4: New file.
20741         * m4/vasprintf.m4: New file.
20742
20743 2003-01-30  Bruno Haible  <bruno@clisp.org>
20744
20745         * lib/printf-args.h: New file, from GNU gettext.
20746         * lib/printf-args.c: New file, from GNU gettext.
20747         * lib/printf-parse.h: New file, from GNU gettext.
20748         * lib/printf-parse.c: New file, from GNU gettext.
20749         * lib/vasnprintf.h: New file, from GNU gettext.
20750         * lib/vasnprintf.c: New file, from GNU gettext.
20751         * lib/asnprintf.c: New file, from GNU gettext.
20752         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20753         * lib/vasprintf.c: New file, from GNU gettext.
20754         * lib/asprintf.c: New file, from GNU gettext.
20755
20756 2003-01-29  Bruno Haible  <bruno@clisp.org>
20757
20758         * modules/stpncpy: New module.
20759         * MODULES.html.sh (func_all_modules): Add it.
20760
20761 2003-01-29  Bruno Haible  <bruno@clisp.org>
20762
20763         * m4/stpncpy.m4: New file.
20764
20765 2003-01-29  Bruno Haible  <bruno@clisp.org>
20766
20767         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20768         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20769
20770 2003-01-28  Bruno Haible  <bruno@clisp.org>
20771
20772         * modules/c-ctype: New module.
20773         * MODULES.html.sh (func_all_modules): Add it.
20774
20775 2003-01-28  Bruno Haible  <bruno@clisp.org>
20776
20777         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20778         Paul Eggert.
20779         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20780         Paul Eggert.
20781
20782 2003-01-27  Bruno Haible  <bruno@clisp.org>
20783
20784         * modules/xsetenv: New module.
20785         * MODULES.html.sh (func_all_modules): Add it.
20786
20787 2003-01-27  Bruno Haible  <bruno@clisp.org>
20788
20789         * lib/xsetenv.h: New file, from GNU gettext.
20790         * lib/xsetenv.c: New file, from GNU gettext.
20791
20792 2003-01-23  Jim Meyering  <jim@meyering.net>
20793
20794         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20795         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20796
20797 2003-01-23  Bruno Haible  <bruno@clisp.org>
20798
20799         * modules/minmax: New module.
20800         * MODULES.html.sh (func_all_modules): Add it.
20801
20802 2003-01-23  Bruno Haible  <bruno@clisp.org>
20803
20804         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20805         Eggert.
20806
20807 2003-01-22  Bruno Haible  <bruno@clisp.org>
20808
20809         * modules/exit: New module.
20810         * MODULES.html.sh (func_all_modules): Add it.
20811
20812 2003-01-22  Bruno Haible  <bruno@clisp.org>
20813
20814         * lib/exit.h: New file, from GNU gettext.
20815
20816 2003-01-19  Bruno Haible  <bruno@clisp.org>
20817
20818         * gnulib-tool: Recognize option --extract-maintainer.
20819         (func_get_maintainer): New function.
20820         * modules/*: Add Maintainer entry.
20821
20822 2003-01-16  Jim Meyering  <jim@meyering.net>
20823
20824         * m4/regex.m4: The `regex' struct is both input and output.
20825         Initialize it before each use.  Patch by Tim Waugh.
20826
20827 2003-01-16  Bruno Haible  <bruno@clisp.org>
20828
20829         * MODULES.html.sh: Add a table of contents. Add the module name as
20830         leftmost column. Add hyperlinks.
20831
20832 2003-01-15  Bruno Haible  <bruno@clisp.org>
20833
20834         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20835
20836 2003-01-15  Bruno Haible  <bruno@clisp.org>
20837
20838         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20839         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20840         suffix.
20841
20842 2003-01-15  Bruno Haible  <bruno@clisp.org>
20843
20844         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20845
20846 2003-01-15  Bruno Haible  <bruno@clisp.org>
20847
20848         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20849         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20850
20851 2003-01-14  Jim Meyering  <jim@meyering.net>
20852
20853         * lib/same.c (same_name): Tweak a comment.
20854
20855 2003-01-14  Bruno Haible  <bruno@clisp.org>
20856
20857         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20858         when a string comparison is sufficient.
20859
20860 2003-01-14  Bruno Haible  <bruno@clisp.org>
20861
20862         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20863         'unsigned int'.
20864
20865 2003-01-14  Bruno Haible  <bruno@clisp.org>
20866
20867         * lib/hash-pjw.c: Add comment about low quality of this function.
20868
20869 2003-01-13  Bruno Haible  <bruno@clisp.org>
20870
20871         * modules/stpcpy: Distribute lib/stpcpy.h.
20872         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20873
20874 2003-01-13  Bruno Haible  <bruno@clisp.org>
20875
20876         * modules/*: Add a description.
20877         * modules/strpbrk: Fix Makefile.am snippet.
20878         * modules/strtoimax: Fix dependencies.
20879         * modules/strtoumax: Likewise.
20880
20881 2003-01-13  Bruno Haible  <bruno@clisp.org>
20882
20883         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20884         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20885         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20886
20887 2003-01-13  Bruno Haible  <bruno@clisp.org>
20888
20889         * gnulib-tool (func_create_testdir): Store config/* files in the main
20890         directory.
20891         * config.rpath: Move to ...
20892         * config/config.rpath: ... here.
20893         * modules/gettext: Contains config/config.rpath, not config.rpath.
20894         * modules/iconv: Likewise.
20895
20896 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20897
20898         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20899         to avoid collisions with libcurses and libreadline.
20900
20901         * m4/getstr.m4: Remove.
20902         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20903
20904 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20905
20906         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20907         to avoid collisions with libcurses and libreadline.
20908
20909         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20910         * lib/getstr.h, getstr.c: Remove.
20911         * lib/getline.c: Include "getline.h", to check interface.
20912         Move body of old getstr.c here: this defines MIN_CHUNK and
20913         declares getdelim2, which is renamed from getstr.
20914         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20915
20916         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20917         All uses changed.
20918         * lib/linebuffer.h: Likewise.
20919         (readline): Remove backward-compatibility macro.
20920
20921 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20922
20923         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20924         to avoid collisions with libcurses and libreadline.
20925         * getstr: Remove.
20926         * MODULES.html.sh: Remove getstr.
20927         * modules/getline: Depend on unlocked-io, not getstr.
20928
20929 2003-01-12  Jim Meyering  <jim@meyering.net>
20930
20931         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20932
20933 2003-01-10  Bruno Haible  <bruno@clisp.org>
20934
20935         * modules/alloca: Change Makefile.am requirements. Simplify Include
20936         requirements. Add lib/alloca_.h to file list.
20937
20938 2003-01-10  Bruno Haible  <bruno@clisp.org>
20939
20940         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20941
20942 2003-01-10  Bruno Haible  <bruno@clisp.org>
20943
20944         * lib/alloca_.h: New file.
20945         * lib/getdate.y: Unconditionally include alloca.h.
20946         * lib/makepath.c: Likewise.
20947         * lib/setenv.c: Likewise.
20948         * lib/userspec.c: Likewise.
20949
20950 2003-01-09  Karl Berry  <karl@gnu.org>
20951
20952         * MODULES.html.sh: include `dirname $0` in PATH, to find
20953         gnulib-tool.
20954
20955 2003-01-09  Bruno Haible  <bruno@clisp.org>
20956
20957         * modules/stdbool: Change configure.ac, Makefile.am requirements.
20958         Simplify Include requirements. Add lib/stdbool.h.in to file list.
20959
20960 2003-01-09  Bruno Haible  <bruno@clisp.org>
20961
20962         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
20963
20964 2003-01-09  Bruno Haible  <bruno@clisp.org>
20965
20966         * lib/stdbool.h.in: New file.
20967
20968 2003-01-09  Bruno Haible  <bruno@clisp.org>
20969
20970         * gnulib-tool (func_all_modules): Ignore files ending in ~.
20971         * MODULES.html.sh: Likewise.
20972
20973 2003-01-08  Jim Meyering  <jim@meyering.net>
20974
20975         * lib/full-write.c: Undefine and define-away `const' after inclusion
20976         of errno.h, not before.  Suggestion from Bruno Haible.
20977
20978 2003-01-08  Bruno Haible  <bruno@clisp.org>
20979
20980         * modules/full-read: Depend on full-write.
20981
20982 2003-01-08  Bruno Haible  <bruno@clisp.org>
20983
20984         * lib/safe-read.c: Include specification header first, to ensure its
20985         selfcontainedness.
20986         * lib/full-write.c: Likewise.
20987
20988 2003-01-07  Jim Meyering  <jim@meyering.net>
20989
20990         * lib/full-write.c: Rework so that it may serve to define full_read,
20991         too.
20992         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
20993
20994 2003-01-07  Bruno Haible  <bruno@clisp.org>
20995
20996         * lib/strtoimax.c: Include <stdint.h> as an alternative to
20997         <inttypes.h>.
20998         * lib/xstrtol.h: Likewise.
20999         * lib/xstrtoimax.c: Likewise.
21000         * lib/xstrtoumax.c: Likewise.
21001         * lib/human.h: Likewise.
21002
21003         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21004         on systems that have <inttypes.h> but not <stdint.h>.
21005
21006 2003-01-07  Bruno Haible  <bruno@clisp.org>
21007
21008         * MODULES.html.sh: Add copyright notice.
21009         (missed_files): Omit CVS directory entries.
21010         (func_module): Make it work with sed-3.02.
21011         * MODULES.txt: Remove file.
21012
21013 2003-01-06  Jim Meyering  <jim@meyering.net>
21014
21015         * lib/version-etc.c: Update year in translatable copyright string.
21016
21017 2003-01-03  Karl Berry  <karl@gnu.org>
21018
21019         * config/config.{guess,sub}: update from prep.
21020
21021 2003-01-02  Karl Berry  <karl@gnu.org>
21022
21023         * doc/COPYING.DOC: belatedly updated to 1.2.
21024
21025 2003-01-01  Karl Berry  <karl@gnu.org>
21026
21027         * gnulib-tool (func_verify_module): report module name $module in
21028         error message, not $1.
21029         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21030         be created, only if it doesn't exist.
21031         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21032
21033 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21034
21035         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21036
21037 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21038
21039         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21040         memcmp if strcoll doesn't work.
21041
21042 2002-12-31  Bruno Haible  <bruno@clisp.org>
21043
21044         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21045         nonempty.
21046
21047 2002-12-31  Bruno Haible  <bruno@clisp.org>
21048
21049         * lib/memcoll.c (STRCOLL): New macro.
21050         (memcoll): Use it.
21051
21052 2002-12-31  Bruno Haible  <bruno@clisp.org>
21053
21054         * lib/localcharset.h: New file.
21055         * lib/localcharset.c: Include it.
21056         * lib/unicodeio.c: Likewise.
21057
21058 2002-12-31  Bruno Haible  <bruno@clisp.org>
21059
21060         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21061         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21062
21063 2002-12-31  Bruno Haible  <bruno@clisp.org>
21064
21065         * lib/getline.h: Include <stddef.h>, for size_t.
21066
21067         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21068         * lib/unicodeio.c: Don't include <stddef.h>.
21069
21070 2002-12-31  Bruno Haible  <bruno@clisp.org>
21071
21072         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21073         HAVE_TM_ZONE.
21074
21075 2002-12-24  Karl Berry  <karl@gnu.org>
21076
21077         * config/config.guess: update from prep.
21078
21079 2002-12-24  Bruno Haible  <bruno@clisp.org>
21080
21081         General infrasructure.
21082         * m4/README: Rewritten.
21083         * m4/onceonly.m4: New file.
21084         * m4/onceonly_2_57.m4: New file.
21085
21086         Module atexit.
21087         * m4/atexit.m4: New file.
21088
21089         Module strtod.
21090         * m4/strtod.m4: New file.
21091
21092         Module strtol.
21093         * m4/strtol.m4: New file.
21094
21095         Module strtoul.
21096         * m4/strtoul.m4: New file.
21097
21098         Module memchr.
21099         * m4/memchr.m4: New file.
21100
21101         Module memcmp.
21102         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21103         (jm_FUNC_MEMCMP): Invoke it.
21104
21105         Module memcpy.
21106         * m4/memcpy.m4: New file.
21107
21108         Module memmove.
21109         * m4/memmove.m4: New file.
21110
21111         Module memset.
21112         * m4/memset.m4: New file.
21113
21114         Module strcspn.
21115         * m4/strcspn.m4: New file.
21116
21117         Module strpbrk.
21118         * m4/strpbrk.m4: New file.
21119
21120         Module strstr.
21121         * m4/strstr.m4: New file.
21122
21123         Module strerror.
21124         * m4/strerror.m4: New file.
21125
21126         Module mktime.
21127         * m4/mktime.m4: Renamed from jm-mktime.m4.
21128         (gl_PREREQ_MKTIME): New macro.
21129         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21130
21131         Module malloc.
21132         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21133         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21134         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21135
21136         Module realloc.
21137         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21138         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21139         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21140
21141         Module strftime.
21142         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21143         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21144         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21145         gl_TM_GMTOFF.
21146         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21147
21148         Module xalloc.
21149         * m4/xalloc.m4: New file.
21150
21151         Module alloca.
21152         * m4/alloca.m4: New file.
21153
21154         Module putenv.
21155         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21156         (jm_FUNC_PUTENV): Invoke it.
21157
21158         Module setenv.
21159         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21160         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21161         when invoked twice.
21162         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21163         gt_FUNC_SETENV.
21164
21165         Module memrchr.
21166         * m4/memrchr.m4: New file.
21167
21168         Module stpcpy.
21169         * m4/stpcpy.m4: New file.
21170
21171         Module strcase.
21172         * m4/strcase.m4: New file.
21173
21174         Module strdup.
21175         * m4/strdup.m4: New file.
21176
21177         Module strnlen.
21178         * m4/strnlen.m4: New file.
21179
21180         Module strndup.
21181         * m4/strndup.m4: New file.
21182
21183         Module xstrtod.
21184         * m4/xstrtod.m4: New file.
21185
21186         Module xstrtol.
21187         * m4/xstrtol.m4: New file.
21188
21189         Module getdate.
21190         * m4/getdate.m4: New file.
21191
21192         Module unlocked-io.
21193         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21194         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21195         * m4/jm-glibc-io.m4n: Remove file.
21196
21197         Module long-options.
21198         * m4/long-options.m4: New file.
21199
21200         Module md5.
21201         * m4/md5.m4: New file.
21202
21203         Module sha.
21204         * m4/sha.m4: New file.
21205
21206         Module getstr.
21207         * m4/getstr.m4: New file.
21208
21209         Module getline.
21210         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21211         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21212         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21213         simply getline. Infoke gl_PREREQ_GETLINE.
21214
21215         Module obstack.
21216         * m4/obstack.m4: New file.
21217
21218         Module hash.
21219         * m4/hash.m4: New file.
21220
21221         Module readtokens.
21222         * m4/readtokens.m4: New file.
21223
21224         Module strverscmp.
21225         * m4/strverscmp.m4: New file.
21226
21227         Module stdbool.
21228         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21229         OSF/1.
21230
21231         Module strtoll.
21232         * m4/strtoll.m4: New file.
21233
21234         Module strtoull.
21235         * m4/strtoull.m4: New file.
21236
21237         Module strtoimax.
21238         * m4/strtoimax.m4: New file.
21239
21240         Module strtoumax.
21241         * m4/strtoumax.m4: New file.
21242
21243         Module xstrtoimax.
21244         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21245         jm_AC_PREREQ_XSTRTOIMAX.
21246         Moved the strtol prerequisites to strtol.m4.
21247         Moved the strtoll prerequisites to strtoll.m4.
21248         Moved the strtoimax prerequisites to strtoimax.m4.
21249
21250         Module xstrtoumax.
21251         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21252         jm_AC_PREREQ_XSTRTOUMAX.
21253         Moved the strtoul prerequisites to strtoul.m4.
21254         Moved the strtoull prerequisites to strtoull.m4.
21255         Moved the strtoumax prerequisites to strtoumax.m4.
21256
21257         Module chown.
21258         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21259         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21260
21261         Module dup2.
21262         * m4/dup2.m4: New file.
21263
21264         Module ftruncate.
21265         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21266         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21267
21268         Module getgroups.
21269         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21270         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21271
21272         Module gettimeofday.
21273         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21274         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21275         gl_PREREQ_GETTIMEOFDAY.
21276
21277         Module mkdir.
21278         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21279         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21280
21281         Module mkstemp.
21282         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21283         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21284         jm_AC_TYPE_UINTMAX_T.
21285         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21286
21287         Module stat.
21288         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21289         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21290
21291         Module lstat.
21292         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21293         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21294
21295         Module timespec.
21296         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21297         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21298         * m4/st_mtim.m4: Indentation.
21299
21300         Module nanosleep.
21301         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21302         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21303         gl_PREREQ_NANOSLEEP.
21304
21305         Module regex.
21306         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21307         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21308         (gl_REGEX): New macro.
21309
21310         Module rename.
21311         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21312         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21313
21314         Module rmdir.
21315         * m4/rmdir.m4: New file.
21316
21317         Module utime.
21318         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21319         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21320         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21321
21322         Module dirname.
21323         * m4/dirname.m4: New file.
21324
21325         Module getopt.
21326         * m4/getopt.m4: New file.
21327
21328         Module unistd-safer.
21329         * m4/unistd-safer.m4: New file.
21330
21331         Module fnmatch.
21332         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21333         declaration.
21334         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21335         (gl_FUNC_FNMATCH_POSIX): New macro.
21336         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21337         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21338         simply fnmatch.
21339
21340         Module exclude.
21341         * m4/exclude.m4: New file.
21342
21343         Module human.
21344         * m4/human.m4: New file.
21345
21346         Module acl.
21347         * m4/acl.m4: Nop.
21348
21349         Module backupfile.
21350         * m4/backupfile.m4: New file.
21351         * m4/d-ino.m4: Indentation.
21352
21353         Module fsusage.
21354         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21355         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21356         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21357
21358         Module dirfd.
21359         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21360         requirements.
21361
21362         Module euidaccess.
21363         * m4/euidaccess.m4: New file.
21364
21365         Module file-type.
21366         * m4/file-type.m4: New file.
21367
21368         Module fileblocks.
21369         * m4/fileblocks.m4: New file.
21370
21371         Module filemode.
21372         * m4/filemode.m4: New file.
21373
21374         Module isdir.
21375         * m4/isdir.m4: New file.
21376
21377         Module lchown.
21378         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21379         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21380
21381         Module makepath.
21382         * m4/makepath.m4: New file.
21383
21384         Module modechange.
21385         * m4/modechange.m4: New file.
21386
21387         Module mountlist.
21388         * m4/mountlist.m4: New file.
21389         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21390         Indentation.
21391
21392         Module path-concat.
21393         * m4/path-concat.m4: New file.
21394
21395         Module pathmax.
21396         * m4/pathmax.m4: New file.
21397
21398         Module same.
21399         * m4/same.m4: New file.
21400
21401         Module save-cwd.
21402         * m4/save-cwd.m4: New file.
21403
21404         Module savedir.
21405         * m4/savedir.m4: New file.
21406
21407         Module xgetcwd.
21408         * m4/xgetcwd.m4: New file.
21409         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21410
21411         Module xreadlink.
21412         * m4/xreadlink.m4: New file.
21413
21414         Module safe-read.
21415         * m4/safe-read.m4: New file.
21416
21417         Module safe-write.
21418         * m4/safe-write.m4: New file.
21419
21420         Module closeout.
21421         * m4/closeout.m4: New file.
21422
21423         Module stdio-safer.
21424         * m4/stdio-safer.m4: New file.
21425
21426         Module getpass.
21427         * m4/getpass.m4: New file.
21428
21429         Module getugroups.
21430         * m4/getugroups.m4: New file.
21431
21432         Module group-member.
21433         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21434         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21435
21436         Module idcache.
21437         * m4/idcache.m4: New file.
21438
21439         Module userspec.
21440         * m4/userspec.m4: New file.
21441
21442         Module gettime.
21443         * m4/clock_time.m4: New file.
21444         * m4/gettime.m4: New file.
21445
21446         Module settime.
21447         * m4/settime.m4: New file.
21448
21449         Module posixtm.
21450         * m4/posixtm.m4: New file.
21451
21452         Module gethostname.
21453         * m4/gethostname.m4: New file.
21454
21455         Module canon-host.
21456         * m4/canon-host.m4: New file.
21457
21458         Module gettext.
21459         * m4/codeset.m4: New file, from gettext-0.11.5.
21460         * m4/gettext.m4: New file, from gettext-0.11.5.
21461         * m4/glibc21.m4: New file, from gettext-0.11.5.
21462         * m4/iconv.m4: New file, from gettext-0.11.5.
21463         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21464         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21465         * m4/inttypes.m4: New file, from gettext-0.11.5.
21466         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21467         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21468         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21469         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21470         * m4/lib-link.m4: New file, from gettext-0.11.5.
21471         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21472         * m4/progtest.m4: New file, from gettext-0.11.5.
21473         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21474         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21475         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21476
21477         Module localcharset.
21478         * m4/localcharset.m4: New file.
21479
21480         Module hard-locale.
21481         * m4/hard-locale.m4: New file.
21482
21483         Module mbswidth.
21484         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21485         onceonly macros.
21486         * m4/mbrtowc.m4: Add comment.
21487
21488         Module memcasecmp.
21489         * m4/memcasecmp.m4: New file.
21490
21491         Module memcoll.
21492         * m4/memcoll.m4: New file.
21493
21494         Module unicodeio.
21495         * m4/unicodeio.m4: New file.
21496
21497         Module rpmatch.
21498         * m4/rpmatch.m4: New file.
21499
21500         Module yesno.
21501         * m4/yesno.m4: New file.
21502
21503         Module exitfail.
21504         * m4/exitfail.m4: New file.
21505
21506         Module c-stack.
21507         * m4/c-stack.m4 (gl_C_STACK): New macro.
21508         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21509
21510         Module error.
21511         * m4/error.m4 (gl_ERROR): New macro.
21512         (jm_PREREQ_ERROR): Use onceonly macros.
21513
21514         Module fatal.
21515         * m4/fatal.m4: New file.
21516
21517         Module getloadavg.
21518         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21519         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21520
21521         Module getpagesize.
21522         * m4/getpagesize.m4: New file.
21523
21524         Module getusershell.
21525         * m4/getusershell.m4: New file.
21526
21527         Module physmem.
21528         * m4/physmem.m4: New file.
21529
21530         Module posixver.
21531         * m4/posixver.m4: New file.
21532
21533         Module quotearg.
21534         * m4/quotearg.m4: New file.
21535
21536         Module quote.
21537         * m4/quote.m4: New file.
21538
21539         Module readutmp.
21540         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21541
21542         Module sig2str.
21543         * m4/sig2str.m4: New file.
21544
21545         Other.
21546         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21547         ulonglong.m4.
21548         * m4/intmax_t.m4: New file.
21549         * m4/d-type.m4: Indentation.
21550         * m4/jm-macros.m4: Update.
21551         * m4/prereq.m4 (jm_PREREQ): Update.
21552         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21553         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21554         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21555         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21556         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21557         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21558         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21559         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21560         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21561         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21562         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21563         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21564         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21565         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21566         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21567         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21568         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21569         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21570         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21571
21572 2002-12-24  Bruno Haible  <bruno@clisp.org>
21573
21574         * MODULES.txt: Update according to m4/ changes.
21575
21576         Module gettext.
21577         * config.rpath: New file, from gettext-0.11.5.
21578
21579         * modules/*: New module descriptions.
21580         * gnulib-tool: New file.
21581         * MODULES.html.sh: New file.
21582
21583 2002-12-21  Karl Berry  <karl@gnu.org>
21584
21585         * doc/fdl.texi: update to version 1.2.
21586
21587 2002-12-19  Karl Berry  <karl@gnu.org>
21588
21589         * config/config.guess: update from prep.
21590
21591 2002-12-18  Bruno Haible  <bruno@clisp.org>
21592
21593         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21594         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21595
21596 2002-12-17  Bruno Haible  <bruno@clisp.org>
21597
21598         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21599         stdlib.h, string.h.
21600
21601 2002-12-17  Bruno Haible  <bruno@clisp.org>
21602
21603         * lib/canon-host.c (strdup): Remove unused declaration.
21604
21605         * lib/fsusage.c: Include full_read.h.
21606         (get_fs_usage): Use full_read instead of safe_read.
21607
21608         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21609
21610 2002-12-12  Karl Berry  <karl@gnu.org>
21611
21612         * config/config.guess: update from prep.
21613
21614 2002-12-11  Bruno Haible  <bruno@clisp.org>
21615
21616         * m4/setenv.m4: New file, from gettext-0.11.5.
21617
21618 2002-12-11  Bruno Haible  <bruno@clisp.org>
21619
21620         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21621         not unsetenv().
21622         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21623         modifications:
21624
21625         2002-12-11  Bruno Haible  <bruno@clisp.org>
21626
21627                 * setenv.c (alloca): Fall back to malloc.
21628                 (freea): New macro.
21629                 (setenv): Use freea() to free memory allocated with alloca().
21630
21631         2002-11-13  Bruno Haible  <bruno@clisp.org>
21632
21633                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21634                 function declarations.
21635                 * unsetenv.c (unsetenv): Likewise.
21636
21637         2002-03-04  Bruno Haible  <bruno@clisp.org>
21638
21639                 Portability to AIX 4.3.3.
21640                 * unsetenv.c: New file, extracted from setenv.c.
21641                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21642
21643         2001-12-20  Bruno Haible  <bruno@clisp.org>
21644
21645                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21646                 use malloc instead. For SunOS 4.
21647
21648         2001-12-11  Bruno Haible  <bruno@clisp.org>
21649
21650                 * setenv.c: Declare alloca.
21651                 (compar_fn_t): New typedef.
21652                 (KNOWN_VALUE, STORE_VALUE): Use it.
21653
21654         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21655         setenv.h.
21656
21657 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21658
21659         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21660         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21661         Choose values that are less likely to collide with system fnmatch
21662         options.
21663         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21664         defined (e.g., a pure POSIX system).
21665         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21666         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21667
21668 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21669
21670         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21671         a pain in practice to deal with generated m4 files.  This change
21672         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21673
21674         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21675         and jm-glibc-io.m4, as they are no longer a special case.
21676         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21677         kludge and the auto-generation stuff.  Check only whether the
21678         functions are declared, not whether they exist, since older hosts
21679         that don't declare the functions can't use the optimization anyway.
21680
21681 2002-12-06  Jim Meyering  <jim@meyering.net>
21682
21683         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21684
21685         Merge in changes from libc's misc/error.c, in preparation
21686         for the merge of gnulib's changes back into libc.
21687
21688         * lib/error.c (_): Define only if not already defined.
21689         Move definition to follow all #include directives.
21690         Include unlocked-io.h only if !_LIBC.
21691         [_LIBC]: Include <libio/libioP.h>.
21692         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21693         (fflush): Tweak definition to use INTUSE.
21694         (putc): Define.
21695
21696 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21697
21698         * lib/alloca.c [defined emacs]: Include "lisp.h".
21699         (xalloc_die) [defined emacs]: New macro.
21700         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21701         [! defined emacs]: Include <xalloc.h>.
21702         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21703         (pointer): Typedef to POINTER_TYPE *.
21704         (malloc): Remove decl; we now always use xmalloc.
21705         (alloca): Use old-style definition, since Emacs needs this.
21706         Check for arithmetic overflow when computing combined size.
21707
21708 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21709
21710         Do not generate unlocked-io.h automatically, since it's easier to
21711         maintain it by hand.
21712
21713         * lib/unlocked-io.h: New file, from GNU diffutils,
21714         but with proper copyright notice and attribution.
21715         * lib/gen-uio: Remove.
21716         * lib/Makefile.am: Add copyright notice.
21717         (libfetish_a_SOURCES): Add unlocked-io.h.
21718         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21719         (DISTCLEANFILES, io_functions): Remove macros.
21720         (EXTRA_DIST): Remove gen_uio.
21721         (unlocked-io.h): Remove rule.
21722
21723 2002-12-04  Jim Meyering  <jim@meyering.net>
21724
21725         Reflect the fact that stat.c and lstat.c are no longer generated.
21726         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21727         (DISTCLEANFILES): Likewise.
21728         (EXTRA_DIST): Likewise.
21729         (all_local): Don't depend on stat.c or lstat.c.
21730         (stat.c, lstat.c): Remove rules.
21731         (EXTRA_DIST): Remove xstat.in.
21732
21733         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21734         * lib/stat.c: New file.  Contents mostly from xstat.in.
21735         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21736         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21737
21738         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21739         too.
21740         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21741
21742 2002-12-03  Jim Meyering  <jim@meyering.net>
21743
21744         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21745         but not semantics, to minimize the differences between these two files.
21746         (safe_read): Change comment to mention SAFE_READ_ERROR.
21747
21748         * lib/safe-read.c (IS_EINTR): Define.
21749         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21750
21751 2002-12-02  Jim Meyering  <jim@meyering.net>
21752
21753         * lib/safe-read.c (EINTR): Define.
21754         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21755         (INT_MAX): Provide fallback.
21756         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21757
21758         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21759
21760 2002-12-02  Bruno Haible  <bruno@clisp.org>
21761
21762         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21763         Define, taken from safe-read.c.
21764         (INT_MAX): Provide fallback.
21765         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21766         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21767
21768         * lib/safe-read.c (EINTR): Remove definition.
21769         (safe_read): Don't use EINTR if it is absent.
21770
21771 2002-12-01  Jim Meyering  <jim@meyering.net>
21772
21773         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21774         zero.
21775         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21776
21777 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21778
21779         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21780         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21781         with `if (! (value < limit)) abort ();', for readability.
21782
21783 2002-11-26  Karl Berry  <karl@gnu.org>
21784
21785         * lib/strdup.c: copy from libc again, with jim's ok.
21786         * lib/.cppi-disable: re-add strdup.c
21787
21788 2002-11-25  Karl Berry  <karl@gnu.org>
21789
21790         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21791         instead of "strtol.c".
21792
21793 2002-11-25  Karl Berry  <karl@gnu.org>
21794
21795         * config/install-sh: update from automake for variable quoting, $0 in
21796         error msgs, etc.
21797
21798         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21799         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21800         entry.
21801
21802 2002-11-25  Jim Meyering  <jim@meyering.net>
21803
21804         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21805
21806 2002-11-24  Karl Berry  <karl@gnu.org>
21807
21808         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21809         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21810
21811 2002-11-24  Jim Meyering  <jim@meyering.net>
21812
21813         Update from coreutils:
21814
21815         * lib/mktime.c: Merge in changes from libc.
21816
21817         Avoid a link-time failure on some Linux systems.
21818         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21819         (otherwise).
21820         (__mon_yday): Declare with the STATIC attribute.
21821         (__mktime_internal): Likewise.
21822         Based on a report from Greg Schafer.
21823
21824 2002-11-23  Jim Meyering  <jim@meyering.net>
21825
21826         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21827         Use `unsigned', not `int', as type of index.
21828
21829         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21830
21831         * lib/fsusage.c: Remove unneeded parentheses around operands of
21832         `defined'.
21833
21834 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21835
21836         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21837         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21838         so that we can be included first.
21839         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21840         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21841         No need to include stddef.h or sys/types.h any more.
21842         Surround local include files with "", not "<>".
21843         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21844         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21845         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21846         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21847         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21848         (ISPRINT): Remove; no longer needed now that we assume C89.
21849
21850         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21851         Preserve errno.
21852
21853         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21854         quotearg_char): Use SIZE_MAX rather than
21855         (size_t) -1 when we are talking about "infinity".
21856
21857         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21858
21859 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21860
21861         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21862         hint that one should use `if (! x) abort ();' rather than `assert
21863         (x);', and anyway it's one less thing to worry about configuring.
21864         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21865         hash_rehash, hash_insert): Use abort rather than assert.
21866
21867 2002-11-22  Bruno Haible  <bruno@clisp.org>
21868
21869         * lib/safe-read.h: Assume C89. Add comments.
21870         (safe_read): Change return type to size_t.
21871         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21872         byte counts > SSIZE_MAX correctly.
21873         * lib/safe-write.h: New file.
21874         * lib/safe-write.c: New file.
21875         * lib/full-read.h: New file.
21876         * lib/full-read.c: New file.
21877         * lib/full-write.h: Assume C89. Add comments.
21878         * lib/full-write.c: Include safe-write.h.
21879         (full_write): Rewritten to use safe_write.
21880         Suggested by Jim Meyering and Paul Eggert.
21881
21882 2002-11-21  Jim Meyering  <jim@meyering.net>
21883
21884         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21885
21886         Merge in changes from the coreutils.
21887
21888         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21889         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21890         <stdint.h>.
21891         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21892         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21893         int.  Work more efficiently if X is the same width as uintmax_t.
21894         Do not compare X to -1, to avoid bogus compiler warning.
21895         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21896         Don't assume that f_frsize and f_bsize are the same type.
21897
21898         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21899         warning on FreeBSD.
21900
21901         * lib/makepath.c (make_path): Restore umask *before* creating the final
21902         component.
21903         (make_path): Minor reformatting.
21904
21905         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21906         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21907         HAVE_MALLOC/HAVE_REALLOC.
21908
21909         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21910         dummy ones.  At least on GNU/Linux systems, `auto' means something
21911         else.
21912         From Michael Stone.
21913
21914 2002-11-21  Bruno Haible  <bruno@clisp.org>
21915
21916         Remove case insensitive option matching.
21917         * lib/argmatch.h (argcasematch): Remove declaration.
21918         (ARGCASEMATCH): Remove macro.
21919         (__xargmatch_internal): Remove case_sensitive argument.
21920         (XARGMATCH): Update.
21921         (XARGCASEMATCH): Remove macro.
21922         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21923         case_sensitive argument.
21924         (argcasematch): Remove function.
21925         (__xargmatch_internal): Remove case_sensitive argument.
21926         (main): Use XARGMATCH instead of XARGCASEMATCH.
21927
21928         * lib/xmalloc.c: Change compile-time error message. Add comment about
21929         required autoconf version.
21930
21931 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21932
21933         Merge argmatch cleanups from Bison.  Assume C89.
21934
21935         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21936         Include stdlib.h, for EXIT_FAILURE.
21937         Always include <string.h>, since we assume C89.
21938         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21939         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21940         Include <stddef.h> instead, since it's all we need for size_t.
21941         (PARAMS): Remove.  All uses removed.
21942         (ARRAY_CARDINALITY): Do not bother to #undef.
21943         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21944         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21945         Remove unnecessary parentheses.
21946         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21947         Insert necessary parentheses.
21948         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
21949         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
21950
21951 2002-11-19  Bruno Haible  <bruno@clisp.org>
21952
21953         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
21954         * lib/mbswidth.h: Include <stddef.h>, for size_t.
21955
21956         * lib/mbswidth.h (PARAMS): Remove macro.
21957         (mbswidth, mbsnwidth): Use ANSI C function declarations.
21958         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
21959
21960         * lib/gcd.h (PARAMS): Remove macro.
21961         (gcd): Use ANSI C function declarations.
21962         * lib/gcd.c (gcd): Likewise.
21963
21964 2002-11-15  Bruno Haible  <bruno@clisp.org>
21965
21966         * lib/strcspn.c: Include <stddef.h>.
21967         (strcspn): Use ANSI C function declaration. Change return type to
21968         size_t. Use NULL.
21969         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
21970         (strpbrk): Use NULL.
21971         * lib/strpbrk.h (PARAMS): Remove macro.
21972         (strpbrk): Use ANSI C function declaration.
21973         * lib/strstr.c: Don't include <sys/types.h>.
21974         * lib/strstr.h (PARAMS): Remove macro.
21975         (strstr): Use ANSI C function declarations.
21976
21977 2002-11-14  Karl Berry  <karl@gnu.org>
21978
21979         * config/mkinstalldirs: `do' on separate line, instead of
21980         `for var; do'.
21981
21982 2002-11-06  Bruno Haible  <bruno@clisp.org>
21983
21984         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
21985         * lib/gcd.c (gcd): Likewise.
21986
21987 2002-11-05  Bruno Haible  <bruno@clisp.org>
21988
21989         * lib/gcd.h: New file, from gettext-0.11.5.
21990         * lib/gcd.c: New file, from gettext-0.11.5.
21991
21992 2002-11-05  Bruno Haible  <bruno@clisp.org>
21993
21994         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21995         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21996         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21997         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
21998
21999         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22000         <libintl.h>.
22001         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22002         <libintl.h>.
22003
22004         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22005         * lib/human.c: Include gettext.h instead of <libintl.h>.
22006         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22007         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22008         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22009         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22010         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22011         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22012         (textdomain): Remove definition.
22013         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22014
22015         * lib/long-options.c: Remove include of <libintl.h> and definition of
22016         _.
22017         * lib/same.c: Remove include of <libintl.h> and definition of _.
22018
22019 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22020
22021         * lib/config.charset: A few additions for Solaris.
22022
22023 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22024
22025         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22026         * lib/localcharset.c (locale_charset): Declare as extern "C".
22027
22028 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22029
22030         * lib/config.charset: msdos in uk_UA uses CP1125.
22031
22032 2002-11-04  Bruno Haible  <bruno@clisp.org>
22033
22034         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22035         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22036         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22037         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22038         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22039
22040 2002-11-04  Bruno Haible  <bruno@clisp.org>
22041
22042         * lib/localcharset.c (locale_charset): Don't return an empty string.
22043
22044 2002-11-04  Bruno Haible  <bruno@clisp.org>
22045
22046         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22047         aliases.
22048
22049 2002-11-04  Bruno Haible  <bruno@clisp.org>
22050
22051         * lib/config.charset: Update for newest glibc. Add canonical names
22052         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22053
22054 2002-11-04  Bruno Haible  <bruno@clisp.org>
22055
22056         * lib/config.charset: Add support for NetBSD.
22057
22058 2002-11-04  Bruno Haible  <bruno@clisp.org>
22059
22060         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22061
22062 2002-11-01  Bruno Haible  <bruno@clisp.org>
22063
22064         * configure.in: Add AC_CONFIG_AUX_DIR call.
22065         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22066         test/Makefile.
22067         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22068
22069 2002-09-28  Karl Berry  <karl@gnu.org>
22070
22071         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22072         installed automake until the next release, since changes have been
22073         made.
22074
22075 2002-09-25  Karl Berry  <karl@gnu.org>
22076
22077         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22078         * lib/getopt*: copy from libc/posix.
22079         * lib/gettext.h: copy from gettext.
22080         * lib/.cppi-disable: add strdup.c, gettext.h.
22081
22082 2002-09-25  Karl Berry  <karl@gnu.org>
22083
22084         * config/srclist.txt: enable gettext.h check.
22085         * config/config.{guess,sub}: update from prep.
22086         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22087                 from automake 1.6.3.
22088         See srclist*.
22089
22090 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22091
22092         * regex.c (PATFETCH): Remove the translating fetch.
22093         (PATFETCH_RAW): Rename to PATFETCH.
22094         (set_image_of_range): New fun.
22095         (SET_RANGE_TABLE_WORK_AREA): Use it.
22096         (regex_compile): Don't translate the pattern chars so eagerly.
22097         Only do it when inserting an `exactn' bytecode or when handling
22098         a char-range.
22099         (mutually_exclusive_p): Avoid empty statement.
22100
22101 2002-07-06  Jim Meyering  <meyering@lucent.com>
22102
22103         * m4/README: Don't mention Makefile.am.in.
22104         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22105
22106 2002-07-01  Jim Meyering  <meyering@lucent.com>
22107
22108         * lib/c-stack.c: Include sys/time.h.
22109         From Volker Borchert.
22110
22111 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22112
22113         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22114
22115 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22116
22117         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22118         New macro.  Use it uniformly instead of
22119         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22120         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22121         reported by Vin Shelton.
22122
22123 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22124
22125         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22126         Do not assume SA_SIGINFO behavior.
22127         Bug reported by Jim Meyering on NetBSD 1.5.2.
22128
22129 2002-06-22  Jim Meyering  <meyering@lucent.com>
22130
22131         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22132         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22133
22134         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22135         now that configure.ac uses AC_GNU_SOURCE.
22136         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22137         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22138
22139         Update to latest tools.  Suggestions from Paul Eggert.
22140         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22141         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22142         * m4/fnmatch.m4: Likewise.
22143         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22144         to AC_HEADER_STDBOOL
22145
22146 2002-06-22  Jim Meyering  <meyering@lucent.com>
22147
22148         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22149         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22150
22151 2002-06-22  Jim Meyering  <meyering@lucent.com>
22152
22153         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22154
22155         * lib/exitfail.c, exitfail.h: Likewise.
22156         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22157
22158         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22159         of fnmatch.h.
22160         (EXTRA_DIST): Add fnmatch_loop.c.
22161         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22162
22163         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22164         * lib/fnmatch.c: Update from diffutils-2.8.2.
22165         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22166         * lib/fnmatch.h: Remove file.
22167
22168 2002-06-21  Jim Meyering  <meyering@lucent.com>
22169
22170         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22171         * m4/mbrtowc.m4: Likewise.
22172
22173         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22174         * m4/mbswidth.m4: Reflect name change:
22175         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22176         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22177
22178         * m4/lib-link.m4: Update from gettext-0.11.2.
22179         * m4/gettext.m4: Likewise.
22180
22181         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22182         From Alfred M. Szmidt.
22183
22184 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22185
22186         * lib/file-type.h: Report an error if neither S_ISREG nor
22187         S_IFREG is defined, instead of using a test specific to glibc
22188         2.2.  This should be safe, since POSIX requires S_ISREG and
22189         Unix Version 7 had S_IFREG.  We don't need to check for
22190         <sys/types.h> since we don't use any symbols that it defines.
22191
22192 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22193
22194         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22195         $@-t, so that each temporary file name is unique and valid in the first
22196         8 characters, for operation under DOS.
22197
22198 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22199
22200         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22201
22202 2002-06-15  Jim Meyering  <meyering@lucent.com>
22203
22204         Work even with DJGPP 2.03, which lacks support for symlinks.
22205         From Richard Dawe.
22206         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22207         is defined.
22208         * lib/lchown.c (S_ISLNK): Likewise.
22209
22210 2002-06-15  Jim Meyering  <meyering@lucent.com>
22211
22212         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22213         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22214         have been included before this file.
22215
22216 2002-06-14  Jim Meyering  <meyering@lucent.com>
22217
22218         * lib/file-type.h: Use the version from diffutils-2.8.2.
22219         * lib/file-type.c: Likewise.
22220
22221 2002-06-07  Jim Meyering  <meyering@lucent.com>
22222
22223         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22224         They're needed at least for NetBSD 1.5.2.
22225         ($statxfs_includes): Include those same headers.
22226         ($statxfs_includes): Include sys/vfs.h if available.
22227         ($statxfs_includes): Likewise for sys/statvfs.h.
22228         Check for the following members in both structs statfs and statvfs:
22229         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22230
22231 2002-06-01  Jim Meyering  <meyering@lucent.com>
22232
22233         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22234         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22235
22236 2002-05-28  Jim Meyering  <meyering@lucent.com>
22237
22238         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22239         Reported by Volker Borchert.
22240
22241 2002-05-27  Jim Meyering  <meyering@lucent.com>
22242
22243         Fix a problem seen only on nonconforming systems whereby ls.c's
22244         use of localtime, and then of gettimeofday would cause trouble:
22245         the localtime call used to initialize rpl_gettimeofday's save
22246         mechanism would clobber ls's current local time information so
22247         that in any long listing the first file would always be listed
22248         with date 1970-01-01.  Analysis by Volker Borchert.
22249
22250         * lib/gettimeofday.c (localtime): Undefine.
22251         (rpl_localtime): New function.
22252
22253 2002-05-27  Jim Meyering  <meyering@lucent.com>
22254
22255         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22256         localtime.
22257
22258         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22259         use the replacement function; it wouldn't resolve at link time.
22260         Reported by Volker Borchert.
22261
22262 2002-05-22  Jim Meyering  <meyering@lucent.com>
22263
22264         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22265         file-type.h.
22266         * lib/file-type.h: New file.
22267         * lib/file-type.c (file_type): New file/function.  Extracted from
22268         diffutils.
22269
22270 2002-04-30  Jim Meyering  <meyering@lucent.com>
22271
22272         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22273
22274 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22275
22276         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22277
22278 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22279
22280         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22281         Do not check for alloca.h (no longer used) or stdbool.h (was never
22282         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22283
22284 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22285
22286         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22287
22288 2002-04-29  Jim Meyering  <meyering@lucent.com>
22289
22290         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22291         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22292         Use AC_FUNC_STRNLEN here instead.
22293
22294         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22295         With autoconf-2.53a, it's part of AC_PROG_CC.
22296
22297 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22298
22299         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22300         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22301
22302 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22303
22304         * lib/sig2str.h, lib/sig2str.c: New files.
22305         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22306
22307 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22308
22309         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22310         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22311         of 127, since 64 is the largest conceivable number for ancient
22312         nonstandard hosts.
22313         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22314
22315 2002-04-28  Jim Meyering  <meyering@lucent.com>
22316
22317         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22318
22319 2002-04-24  Jim Meyering  <meyering@lucent.com>
22320
22321         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22322         (jm_PREREQ): Use it.
22323
22324         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22325         mach/mach.h fcntl.h.
22326         Check for this function: setlocale.
22327
22328 2002-04-24  Jim Meyering  <meyering@lucent.com>
22329
22330         * lib/gettext.h: New file, from Gettext.
22331         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22332         (libfetish_a_SOURCES): Add gettext.h.
22333
22334 2002-04-16  Jim Meyering  <meyering@lucent.com>
22335
22336         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22337         ut_pid, ut_id, ut_exit.
22338
22339 2002-04-16  Jim Meyering  <meyering@lucent.com>
22340
22341         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22342         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22343         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22344
22345 2002-04-12  Jim Meyering  <meyering@lucent.com>
22346
22347         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22348         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22349         existence of the getmntinfo function.  Needed for Darwin 5.3.
22350
22351         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22352         This is necessary at least on Darwin 5.3.
22353
22354         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22355         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22356         strnlen.o in the library, and that makes some versions of ranlib
22357         object.
22358
22359 2002-04-12  Jim Meyering  <meyering@lucent.com>
22360
22361         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22362
22363 2002-04-09  Jim Meyering  <meyering@lucent.com>
22364
22365         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22366         to be more precise.  Rather than saying we're checking whether the
22367         function `works', say what we're testing.
22368         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22369         Reported by Bruno Haible.
22370
22371 2002-03-10  Jim Meyering  <meyering@lucent.com>
22372
22373         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22374         Suggestion from Santiago Vila.
22375
22376 2002-03-08  Jim Meyering  <meyering@lucent.com>
22377
22378         * lib/rename.c: Mention that this wrapper is needed also on
22379         mips-dec-ultrix4.4 systems.
22380
22381 2002-03-02  Jim Meyering  <meyering@lucent.com>
22382
22383         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22384         not HAVE_CLOCK_SETTIME.
22385
22386 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22387
22388         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22389         Check for clock_settime.
22390
22391 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22392
22393         * lib/nanosleep.h: Rename to....
22394         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22395
22396         * lib/gettime.c: New file.
22397         * lib/settime.c: New file.
22398         * lib/stime.c: Remove.
22399
22400         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22401         timespec.h.  Remove nanosleep.h.
22402
22403 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22404
22405         * m4/acl.m4: New file.
22406         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22407         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22408
22409 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22410
22411         * lib/acl.c, lib/acl.h: New files.
22412         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22413
22414 2002-02-24  Jim Meyering  <meyering@lucent.com>
22415
22416         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22417         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22418         cause trouble.  Reported by Nelson Beebe.
22419
22420 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22421
22422         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22423         compilers that don't know that xalloc_die never returns.
22424
22425 2002-02-20  Jim Meyering  <meyering@lucent.com>
22426
22427         * lib/getdate.c: Regenerate using bison-1.33.
22428
22429 2002-02-17  Jim Meyering  <meyering@lucent.com>
22430
22431         * config/config.guess (main): Don't use `head -1'; it's no longer
22432         portable. Use `sed 1q' instead.
22433
22434 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22435
22436         * m4/codeset.m4: Upgrade to gettext-0.11.
22437         * m4/gettext.m4: Upgrade to gettext-0.11.
22438         * m4/glibc21.m4: Upgrade to gettext-0.11.
22439         * m4/iconv.m4: Upgrade to gettext-0.11.
22440         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22441         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22442         * m4/lib-ld.m4: New file, from gettext-0.11.
22443         * m4/lib-link.m4: New file, from gettext-0.11.
22444         * m4/lib-prefix.m4: New file, from gettext-0.11.
22445         * m4/progtest.m4: Upgrade to gettext-0.11.
22446
22447 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22448
22449         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22450         (jm_PREREQ): Use it.
22451
22452 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22453
22454         * lib/posixver.c, lib/posixver.h: New files.
22455         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22456
22457 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22458             Bruno Haible  <bruno@clisp.org>
22459
22460         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22461         (fwrite_success_callback): New declaration.
22462         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22463         print_unicode_char. Call failure callback instead of error.
22464         (fwrite_success_callback): New function.
22465         (exit_failure_callback): New function.
22466         (fallback_failure_callback): New function.
22467         (print_unicode_char): Call unicode_to_mb.
22468
22469 2002-01-26  Jim Meyering  <meyering@lucent.com>
22470
22471         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22472         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22473
22474 2002-01-26  Jim Meyering  <meyering@lucent.com>
22475
22476         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22477
22478 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22479
22480         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22481
22482 2002-01-22  Jim Meyering  <meyering@lucent.com>
22483
22484         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22485         Otherwise, some versions of automake would omit the rule that makes
22486         Makefile from Makefile.in.
22487
22488 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22489
22490         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22491         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22492         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22493         (memcoll): Set errno to zero if there is no error.
22494
22495         * lib/quotearg.c (quotearg_buffer_restyled):
22496         Fix bug with quoting buffers containing NUL when backslashing escapes.
22497         This bug was exposed by the other changes in this patch.
22498         (quotearg_n_options): New arg ARGSIZE.
22499         All callers changed.
22500         (quoting_options_from_style): New function.
22501         (quotearg_n_style): Use it.
22502         (quotearg_n_style_mem): New function.
22503
22504         * lib/quotearg.h (quotearg_n_style_mem): New function.
22505
22506 2002-01-19  Jim Meyering  <meyering@lucent.com>
22507
22508         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22509         Remove useless quotes: DF_PROG="df".
22510         * m4/strnlen.m4: New file.
22511
22512 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22513
22514         * lib/backupfile.c (ISDIGIT): Comment fix.
22515         * lib/getdate.y (ISDIGIT): Likewise.
22516         * lib/posixtm.c (ISDIGIT, year): Likewise.
22517         * lib/strverscmp.c (ISDIGIT): Likewise.
22518         * lib/userspec.c (ISDIGIT): Likewise.
22519
22520 2002-01-16  Jim Meyering  <meyering@lucent.com>
22521
22522         * lib/getdate.y: Add three semicolons, each just before a closing
22523         brace. Bison (as of version 1.31) no longer papers over that mistake.
22524
22525 2002-01-05  Jim Meyering  <meyering@lucent.com>
22526
22527         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22528
22529 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22530
22531         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22532         not silently exit merely because the output buffer happens to
22533         have nothing pending.
22534
22535 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22536
22537         See the big note in ../ChangeLog.
22538         * lib/human.c (suffixes): Prefer K to k for 1024.
22539         (generate_suffix_backwards): New function.
22540         (human_readable_inexact): Use it.
22541         * lib/xstrtol.c (__xstrtol): If there is no number but there
22542         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22543         Accept 'K' as well as 'k'.
22544
22545 2001-12-15  Jim Meyering  <meyering@lucent.com>
22546
22547         * lib/regex.h (__restrict_arr): Update from libc.
22548
22549         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22550         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22551         (STREQ): Define.
22552
22553 2001-12-14  Jim Meyering  <meyering@lucent.com>
22554
22555         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22556         Suggestion from Bruno Haible.
22557
22558 2001-12-10  Jim Meyering  <meyering@lucent.com>
22559
22560         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22561         xrealloc, Instead, include "xalloc.h".
22562         (initbuffer): Don't cast xmalloc return value to char*.
22563         (readline): Reword comment.
22564         Don't cast xrealloc return value to char*
22565         Return NULL, not 0.
22566
22567 2001-12-09  Jim Meyering  <meyering@lucent.com>
22568
22569         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22570         about `signed and unsigned type in conditional expression'.
22571         * lib/posixtm.c (posix_time_parse): Likewise.
22572
22573         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22574
22575         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22576         to avoid a pedantic warning.
22577
22578         * lib/getstr.c: Don't include assert.h.
22579         (getstr): Remove warning-evoking assertions.
22580         Return -1 if offset parameter is out of bounds.
22581         Change the type of a local from int to size_t.
22582
22583         * lib/strftime.c (my_strftime_localtime_r): Include this function
22584         definition in the `#if ! HAVE_TM_GMTOFF' block.
22585
22586         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22587         Include xalloc.h instead.
22588
22589 2001-12-02  Jim Meyering  <meyering@lucent.com>
22590
22591         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22592         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22593         included.
22594
22595         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22596         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22597
22598 2001-11-30  Akim Demaille  <akim@epita.fr>
22599
22600         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22601         before being defined.
22602
22603 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22604
22605         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22606         First arg is int, not unsigned.
22607         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22608         (SIZE_MAX, UINT_MAX): New macros.
22609         (quotearg_n_options): Abort if N is negative.
22610         Avoid overflow check on hosts where size_t is 64 bits and int
22611         is 32 bits, as overflow is impossible there.
22612         Fix off-by-one typo that caused unnecessary reallocation.
22613
22614 2001-11-27  Jim Meyering  <meyering@lucent.com>
22615
22616         * lib/tempname.c: Merge with version from libc.
22617         * lib/regex.c: Likewise.
22618
22619         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22620         systems for which STDC_HEADERS is 0, it was not included, resulting in
22621         a warning about an integer-to-pointer conversion problem with getenv.
22622         Reported by Volker Borchert.
22623
22624 2001-11-26  Jim Meyering  <meyering@lucent.com>
22625
22626         * lib/gtod.h: Remove file.
22627         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22628         * lib/gettimeofday.c: Don't include gtod.h.
22629         (GTOD_init): Remove function.
22630         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22631         Suggestion from Volker Borchert.
22632
22633 2001-11-23  Jim Meyering  <meyering@lucent.com>
22634
22635         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22636         it.
22637         * lib/hash.c (struct hash_table): Define it here instead.
22638
22639 2001-11-22  Jim Meyering  <meyering@lucent.com>
22640
22641         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22642
22643 2001-11-20  Jim Meyering  <meyering@lucent.com>
22644
22645         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22646         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22647
22648 2001-11-19  Jim Meyering  <meyering@lucent.com>
22649
22650         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22651         directory.  Use "conftestXXXXXX" as the template.
22652         Suggestion from Paul Eggert.
22653
22654         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22655         immediately, so the test doesn't mistakenly hit the max-open-files
22656         limit.
22657
22658 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22659
22660         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22661         (TEMPORARIES): New macro.
22662         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22663         removes an artificial limitation (e.g. HP-UX 10.20, where
22664         TMP_MAX is 17576).
22665
22666 2001-11-18  Jim Meyering  <meyering@lucent.com>
22667
22668         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22669
22670 2001-11-18  Jim Meyering  <meyering@lucent.com>
22671
22672         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22673         on SunOS 4.
22674
22675         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22676         files will be created before anything else.
22677
22678 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22679
22680         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22681         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22682
22683 2001-11-17  Jim Meyering  <meyering@lucent.com>
22684
22685         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22686         Prompted by a report from Bob Proulx.
22687
22688         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22689         Instead, require UTILS_FUNC_MKSTEMP.
22690
22691 2001-11-17  Jim Meyering  <meyering@lucent.com>
22692
22693         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22694         Now, that's done as part of AC_FUNC_STRTOD.
22695
22696 2001-11-17  Jim Meyering  <meyering@lucent.com>
22697
22698         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22699         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22700         rather than group writable.  Patch by Juan F. Codagnone.
22701
22702         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22703         xrealloc, Instead, include "xalloc.h".
22704
22705         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22706         Remove explicit declarations of xmalloc, xrealloc,
22707         and xstrdup.  Instead, include "xalloc.h".
22708
22709         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22710         unlocked-io.h.
22711         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22712         Likewise.
22713         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22714
22715         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22716         Reported by Padraig Brady.
22717
22718         * lib/mkstemp.c: #undef mkstemp.
22719         Include config.h.
22720         (rpl_mkstemp): Rename from mkstemp.
22721         Protoize.
22722
22723 2001-11-16  Jim Meyering  <meyering@lucent.com>
22724
22725         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22726         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22727         determine the amount of total physical memory, use pstat_getstatic.
22728         HPUX-11 doesn't define _SC_PHYS_PAGES.
22729         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22730         If sysconf couldn't be used to determine the amount of available
22731         physical memory, use both pstat_getstatic and pstat_getdynamic.
22732         Based on a patch from Bob Proulx.
22733
22734 2001-11-10  Jim Meyering  <meyering@lucent.com>
22735
22736         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22737         (jm_PREREQ): Use it.
22738
22739 2001-11-09  Jim Meyering  <meyering@lucent.com>
22740
22741         * m4/jm-macros.m4: Require autoconf-2.52f.
22742         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22743         Use these AC_-prefixed names, not the AM_-prefixed ones.
22744
22745         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22746
22747 2001-11-05  Jim Meyering  <meyering@lucent.com>
22748
22749         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22750
22751 2001-11-04  Jim Meyering  <meyering@lucent.com>
22752
22753         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22754         $DEFS.
22755
22756 2001-11-03  Jim Meyering  <meyering@lucent.com>
22757
22758         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22759         of AC_DEFUN.
22760
22761         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22762         know the name of the variable in the macro definition.
22763
22764 2001-11-03  Jim Meyering  <meyering@lucent.com>
22765
22766         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22767         in argmatch_to_argument call.
22768
22769         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22770         argument.
22771
22772         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22773         e.g., a fault due to an attempt to free a NULL pointer.
22774
22775 2001-11-01  Jim Meyering  <meyering@lucent.com>
22776
22777         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22778         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22779
22780 2001-11-01  Jim Meyering  <meyering@lucent.com>
22781
22782         * lib/dirfd.c, lib/dirfd.h: New files.
22783         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22784
22785         * lib/hash.c (hash_print) [TESTING]: Clean up.
22786
22787 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22788
22789         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22790         to avoid a warning if -Wall.
22791
22792 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22793
22794         * README: New file
22795         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22796         (per RMS's instructions, this is now the canonical source)
22797         * lgpl/, gpl/: New directories.
22798
22799 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22800
22801         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22802
22803 2001-10-21  Jim Meyering  <meyering@lucent.com>
22804
22805         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22806         this code would end up calling gettext even in packages built
22807         with --disable-nls.
22808         * lib/getopt.c (_): Likewise.
22809         * lib/regex.c (_): Likewise.
22810
22811 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22812
22813         * m4/error.m4 (jm_PREREQ_ERROR):
22814         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22815         AC_FUNC_STRERROR_R does that.
22816         Check for strerror declaration.
22817
22818         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22819         are supposed to have them these days.
22820         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22821         Merge changes from latest Autoconf CVS.
22822         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22823         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22824         POSIX decided to standardize on the int flavor of strerror_r.
22825
22826 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22827
22828         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22829         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22830         Use strerror_r that is only a macro, even if it is not a function.
22831         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22832         (private_strerror): Use prototypes, not old-style function definition.
22833         (print_errno_message): New function.
22834         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22835         char*-flavored one.
22836         (error_tail, error, error_at_line): Use it.
22837
22838 2001-10-11  Jim Meyering  <meyering@lucent.com>
22839
22840         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22841         and quote_n (1, ... to avoid clobbering a buffer.
22842
22843 2001-10-05  Jim Meyering  <meyering@lucent.com>
22844
22845         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22846         hash-pjw.h.
22847         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22848         * lib/hash-pjw.h: New file.
22849
22850 2001-09-30  Jim Meyering  <meyering@lucent.com>
22851
22852         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22853         `struct fsstat' has the `f_fstypename' member.
22854         Use that to define FS_TYPE, which is now used to make
22855         the getfsstat link test tighter.
22856
22857 2001-09-30  Jim Meyering  <meyering@lucent.com>
22858
22859         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22860         Include <sys/ucred.h>, for Apple Darwin.
22861         Include sys/mount.h and sys/fs_types.h only if available.
22862         (FS_TYPE): Define.
22863         (read_filesystem_list): Use FS_TYPE.
22864
22865 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22866
22867         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22868         a boolean context.
22869
22870 2001-09-29  Jim Meyering  <meyering@lucent.com>
22871
22872         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22873         [one-argument getmntent function]): Include stdio.h before mntent.h.
22874         SunOS 4.1.x needs it for the declaration of `FILE'.
22875         Patch by Volker Borchert.
22876
22877         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22878         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22879         sys/fs_types.h, and make the link-test for getfsstat guard #include
22880         directives with appropriate #if HAVE_*_H tests so that we can
22881         detect getfsstat on Apple Darwin1.3.7 systems.
22882         Reported by Nelson Beebe.
22883         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22884
22885 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22886
22887         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22888         #defines strtoimax.  Also treat the other strto* functions
22889         like strtoimax.
22890
22891         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22892         Check for strtoul and strtoumax,
22893         as those declarations are made even in the signed case.
22894         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22895         Likewise, for strtol and strtoimax.
22896
22897 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22898
22899         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22900         #defines strtoimax.  Also treat the other strto* functions
22901         like strtoimax.
22902
22903         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22904         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22905         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22906
22907 2001-09-26  Jim Meyering  <meyering@lucent.com>
22908
22909         Most macros in unlocked-io.h had the wrong number of arguments.
22910         * lib/gen-uio: New script.
22911         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22912         * lib/unlocked-io.hin: Remove file.
22913         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22914         rather than trying to embed it here.
22915         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22916         Reported by Padraig Brady.
22917
22918 2001-09-25  Volker Borchert  <bt@teknon.de>
22919
22920         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22921         `result'.
22922
22923 2001-09-24  Jim Meyering  <meyering@lucent.com>
22924
22925         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22926
22927 2001-09-23  Jim Meyering  <meyering@lucent.com>
22928
22929         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22930         instead of the mere test for existence of mntent.h.  The latter
22931         would get a false-positive on AIX 3.4 systems.
22932         In the outer getmntent if-block, don't die if neither of the getmntent
22933         tests succeeds.  Instead, just fall through and continue with the
22934         remaining tests.
22935
22936 2001-09-23  Jim Meyering  <meyering@lucent.com>
22937
22938         * lib/mountlist.c: Remove useless parentheses in #if directives.
22939         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22940         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22941
22942 2001-09-22  Jim Meyering  <meyering@lucent.com>
22943
22944         * m4/gettext.m4: New file.  From gettext.
22945         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22946         * m4/progtest.m4: Likewise
22947         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
22948         * m4/glibc21.m4: Likewise.
22949
22950         * m4/libintl.m4: Remove.  No longer used.
22951
22952 2001-09-22  Jim Meyering  <meyering@lucent.com>
22953
22954         * lib/localcharset.c: Update from latest gettext.
22955         * lib/config.charset: Likewise.
22956
22957 2001-09-20  Jim Meyering  <meyering@lucent.com>
22958
22959         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
22960         strtoimax.
22961         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
22962         strtoumax.
22963
22964 2001-09-20  Jim Meyering  <meyering@lucent.com>
22965
22966         * lib/xstrtol.c (strtoimax): Guard declaration with
22967         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
22968         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
22969         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
22970         (strtoumax): Likewise, for completeness (it wasn't necessary).
22971
22972 2001-09-17  Paul Eggert  <eggert@twinsun.com>
22973
22974         * lib/strtoimax.c (HAVE_LONG_LONG):
22975         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
22976         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
22977         to work around bug in IBM C compiler.
22978
22979 2001-09-17  Jim Meyering  <meyering@lucent.com>
22980
22981         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
22982         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
22983         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
22984         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
22985         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
22986         whenever the right hand side need not be expanded by the shell.
22987
22988 2001-09-16  Paul Eggert  <eggert@twinsun.com>
22989
22990         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
22991         library.  It's not correct, as some older glibcs are buggy.
22992         fnmatch wasn't fixed until glibc 2.2.
22993
22994         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
22995         special shell magic here.
22996
22997 2001-09-16  Jim Meyering  <meyering@lucent.com>
22998
22999         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23000         * m4/jm-macros.m4: Require it.
23001
23002 2001-09-16  Jim Meyering  <meyering@lucent.com>
23003
23004         * lib/mkdir.c: New file.
23005
23006 2001-09-15  Jim Meyering  <meyering@lucent.com>
23007
23008         * m4/jm-macros.m4: Check for help2man.
23009
23010 2001-09-11  Jim Meyering  <meyering@lucent.com>
23011
23012         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23013         The body, by Paul Eggert, was moved here from configure.in.
23014         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23015
23016 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23017
23018         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23019         (jm_PREREQ): Use it.
23020
23021 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23022
23023         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23024         Use ssize_t, not int, to store result of readlink.
23025         Check for ssize_t overflow as well as size_t overflow,
23026         as POSIX says the result of readlink is implementation-defined
23027         when ssize_t overflows.
23028         Remove unnecessary cast to char*.
23029         Use free+malloc instead of realloc, as the storage doesn't need
23030         to be preserved and it's clearer and can be more efficient that way.
23031         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23032         * lib/xreadlink.h (xreadlink): Update prototype.
23033
23034 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23035
23036         * lib/xgetcwd.c: Revert some of the previous change; intead,
23037         fix the HAVE_GETCWD_NULL code to behave more like the
23038         !HAVE_GETCWD_NULL code used to.
23039
23040         Include "xalloc.h".
23041         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23042         invoke xalloc_die.
23043
23044 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23045
23046         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23047         sys/param.h, as pathmax.h includes them.
23048
23049 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23050
23051         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23052         (jm_PREREQ_XGETCWD): New macro.
23053
23054         * m4/getcwd.m4: New file.
23055
23056 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23057
23058         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23059         like the HAVE_GETCWD_NULL code.
23060         Include pathmax.h if not HAVE_GETCWD.
23061         Do not include xalloc.h.
23062         (INITIAL_BUFFER_SIZE): New symbol.
23063         Do not use xmalloc / xrealloc, since the caller is responsible for
23064         handling errors.  Preserve errno around `free' during failure.
23065         Do not overrun buffer when using getwd.
23066
23067 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23068
23069         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23070         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23071         getcwd (NULL, 0).
23072
23073 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23074
23075         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23076         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23077         spotted by Jim Meyering.
23078
23079 2001-09-03  Jim Meyering  <meyering@lucent.com>
23080
23081         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23082         failure.
23083
23084 2001-09-02  Jim Meyering  <meyering@lucent.com>
23085
23086         * lib/error.c: Update from GNU libc.
23087
23088 2001-09-01  Jim Meyering  <meyering@lucent.com>
23089
23090         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23091         Used by df.
23092
23093 2001-09-01  Jim Meyering  <meyering@lucent.com>
23094
23095         * lib/xreadlink.c: New file.
23096         * lib/xreadlink.h: New file.
23097         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23098         xreadlink.h.
23099
23100         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23101         doesn't conflict with sparc Solaris 7's definition in
23102         /usr/include/sys/int_types.h.
23103
23104         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23105         files.
23106         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23107         and strncasecmp as r-values.  Unixware didn't have declarations.
23108
23109 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23110
23111         * lib/xstrtol.h: Add copyright notice.
23112         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23113         LONGINT_INVALID_SUFFIX_CHAR.
23114
23115 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23116
23117         * lib/xstrtol.c (strtoimax): New decl.
23118
23119 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23120
23121         * lib/xgetcwd.c: Don't include pathmax.h.
23122         Include stdlib.h and unistd.h if available.
23123         Include xalloc.h.
23124         (xmalloc, xstrdup, free): Remove decls.
23125         (xgetcwd): Don't assume sizes fit in unsigned.
23126         Check for overflow when computing sizes.
23127         Simplify reallocation code.
23128
23129 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23130
23131         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23132         a directory's st_size can have an arbitrary value, so the old
23133         usage could waste an arbitrary amount of memory.  All uses
23134         changed.
23135         * lib/savedir.h: Update prototype.
23136
23137 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23138
23139         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23140
23141         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23142         old strtoimax.c.
23143
23144         Also, make the following further changes to make this file's
23145         configuration more similar to that of strtol.c:
23146         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23147         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23148         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23149         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23150         changed to signed values.
23151
23152         And make the following changes as well:
23153         Fix copyright notice, as 1999 was missing.
23154         (verify): New macro.
23155         (strtoimax): Check sizes at compile-time, not run-time.
23156         Prefer strtol to strtoll if both work.
23157         (main): Remove; it was not that useful and was a pain to maintain.
23158
23159         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23160
23161 2001-08-31  Jim Meyering  <meyering@lucent.com>
23162
23163         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23164         Use an initial, malloc'd, buffer of length 128 rather than
23165         a statically allocated one of length 1024.
23166
23167 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23168
23169         Simplify code, partly by assuming autoconf 2.52 semantics.
23170
23171         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23172
23173         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23174         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23175         All uses removed.
23176         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23177         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23178         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23179         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23180         jm_AC_HEADER_INTTYPES_H.
23181         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23182
23183         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23184
23185         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23186         Quote first arg of AC_DEFUN.
23187         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23188         since they are needed to parse the include file even if we need
23189         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23190         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23191         but with opposite signedness.
23192
23193 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23194
23195         Merge 'exclude' changes from tar 1.13.22.
23196         This fixes one or two unlikely storage allocation overflow bugs,
23197         but doesn't change user-visible behavior otherwise.
23198
23199 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23200
23201         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23202         (jm_PREREQ_EXCLUDE): New macro.
23203
23204 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23205
23206         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23207         tm to be declared.
23208
23209 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23210
23211         * lib/hash.c: Remove '2001' from copyright notice.
23212
23213 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23214
23215         * lib/full-write.h: New file.
23216         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23217         * lib/full-write.c: Correct credits, as cccp.c no longer
23218         exists and anyway it was so heavily changed from the old cccp
23219         code as to be unrecognizable.  Include full-write.h.
23220         (full_write) Return size_t, with short writes meaning failure.
23221         All callers changed.  This fixes a bug with large buffers
23222         on 64-bit hosts.
23223         * lib/utime.c: Include full-write.h.
23224
23225 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23226
23227         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23228         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23229         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23230         Include if available.
23231         (<xalloc.h>): Include
23232         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23233         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23234         collide with FNM macros.
23235         (struct patopts): New struct.
23236         (struct exclude): Use it, as exclude patterns now come with options.
23237         (new_exclude): Support above changes.
23238         (new_exclude, add_exclude_file):
23239         Initial size must now be a power of two to simplify overflow checking.
23240         (free_exclude, fnmatch_no_wildcards): New function.
23241         (excluded_filename): No longer requires options arg, as the options
23242         are determined by add_exclude.  Now returns bool, not int.
23243         (excluded_filename, add_exclude):
23244         Add support for the fancy new exclusion options.
23245         (add_exclude, add_exclude_file): Now takes int options arg.
23246         Check for arithmetic overflow when computing sizes.
23247         (add_exclude_file): xrealloc might modify errno, so don't
23248         realloc until after errno might be used.
23249
23250         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23251         New macros.
23252         (free_exclude): New decl.
23253         (add_exclude, add_exclude_file): Now takes int options arg.
23254         (excluded_filename): No longer requires options arg, as the options
23255         are determined by add_exclude.  Now returns bool, not int.
23256
23257 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23258
23259         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23260
23261 2001-08-27  Jim Meyering  <meyering@lucent.com>
23262
23263         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23264
23265         * lib/version-etc.c (N_): Remove definition.
23266         Revert most of last change.
23267         Instead, simply don't mark the `Copyright...' string for translation.
23268         Based on advice from Paul Eggert.
23269
23270         * lib/strtoxmax.c: Tweak comment.
23271
23272 2001-08-26  Jim Meyering  <meyering@lucent.com>
23273
23274         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23275
23276         * m4/xstrtoimax.m4: New file.
23277         * m4/xstrtoumax.m4: Add comments explaining why we
23278         AC_REPLACE_FUNCS(strtol).
23279
23280 2001-08-26  Jim Meyering  <meyering@lucent.com>
23281
23282         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23283         of copyright with `%s' so translators don't get an untranslated
23284         message in 2002.
23285         (COPYRIGHT_YEAR): Define.
23286         (version_etc): Use fprintf rather than fputs.
23287         Suggestion from Ulrich Drepper.
23288
23289         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23290
23291         * lib/strtoll.c: New file, from GNU libc.
23292         * lib/xstrtoimax.c: New file.
23293
23294         * lib/xstrtol.h: Add xstrtoimax.
23295         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23296         * lib/strtoimax.c: New file.  Likewise, but first define
23297         STRTOUXMAX_SIGNED.
23298
23299         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23300         ...
23301         * lib/strtoxmax.c: ... then renamed to this.
23302
23303 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23304
23305         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23306         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23307         (jm_AC_TYPE_INTMAX_T): New macro.
23308         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23309
23310         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23311
23312         * m4/longlong.m4: Renamed from ulonglong.m4.
23313         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23314         * m4/uintmax_t.m4: Removed.
23315
23316 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23317
23318         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23319         Port to Solaris 8, where 'sed' requires a space after the 'r'
23320         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23321         Redirect output to $tmp just once.
23322
23323 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23324
23325         * lib/addext.c (<errno.h>): Include.
23326         (errno): Declare if not defined.
23327         (addext): Work correctly when pathconf returns -1 and leaves
23328         errno alone because there is no limit.  Also, work even if
23329         pathconf returns a value greater than SIZE_MAX.
23330
23331 2001-08-12  Jim Meyering  <meyering@lucent.com>
23332
23333         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23334         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23335         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23336         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23337         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23338         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23339         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23340         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23341         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23342         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23343         utime.m4, utimes.m4, xstrtoumax.m4:
23344         Quote the first argument in each use of AC_DEFUN.
23345
23346 2001-08-12  Jim Meyering  <meyering@lucent.com>
23347
23348         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23349         Simply `return getcwd (NULL, 0);'.
23350         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23351         Use 1300 as initial value for length, not PATH_MAX.
23352
23353         * lib/pathmax.h: Clean up cpp syntax.
23354
23355 2001-08-12  Jim Meyering  <meyering@lucent.com>
23356
23357         * lib/gettimeofday.c: New file.
23358         * lib/gtod.h: New file.
23359         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23360
23361 2001-08-05  Jim Meyering  <meyering@lucent.com>
23362
23363         * m4/jm-macros.m4: Require autoconf-2.52.
23364
23365 2001-08-04  Jim Meyering  <meyering@lucent.com>
23366
23367         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23368         stmt, to get in sync with glibc.
23369
23370 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23371
23372         The following changes are from gettext 0.10.39 as maintained by
23373         Bruno Haible.
23374
23375         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23376         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23377         with inverted sense.  All uses changed.
23378
23379         * lib/mbswidth.c: Don't include <limits.h>.
23380         Include <stdlib.h> and <string.h> unconditionally.
23381         (iswcntrl, mbsinit, ISCNTRL): New macros.
23382         (mbsnwidth): Use K&R style function declarations.
23383         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23384         can optimize it when MB_CUR_MAX == 1.
23385         The width of control characters is zero, not 1.
23386
23387 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23388
23389         The following changes are from gettext 0.10.39 as maintained by
23390         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23391
23392         * m4/codeset.m4: Upgrade to serial AM1.
23393         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23394         all uses changed.  Quote first arg of AC_DEFUN.
23395         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23396
23397         * m4/iconv.m4: Upgrade to serial AM2.
23398         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23399         Add --with-libconv-prefix.
23400         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23401         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23402         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23403         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23404         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23405
23406         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23407         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23408         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23409         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23410         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23411         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23412         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23413         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23414         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23415
23416         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23417         string.h any more.
23418
23419         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23420         not the default value.
23421
23422         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23423         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23424         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23425         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23426         Also check for iswcntrl, used for wcwidth fallback.
23427         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23428         to Autoconf 2.13.
23429
23430 2001-08-03  Jim Meyering  <meyering@lucent.com>
23431
23432         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23433         as it was in the original.  Reported by Paul Eggert.
23434
23435 2001-07-16  Jim Meyering  <meyering@lucent.com>
23436
23437         * m4/gettimeofday.m4: New file.
23438         Prompted by a report from Bernhard Baehr.
23439
23440 2001-07-15  Jim Meyering  <meyering@lucent.com>
23441
23442         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23443         stuff. Now it's in ../Makefile.cfg.
23444
23445 2001-07-15  Jim Meyering  <meyering@lucent.com>
23446
23447         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23448         (BUILT_SOURCES): Add unlocked-io.h.
23449         (io_functions): Define.
23450         (unlocked-io.h): New rule.
23451         (DISTCLEANFILES): Add unlocked-io.h.
23452         (all-local): Depend on unlocked-io.h, to ensure it is created.
23453
23454         * lib/unlocked-io.hin: New file
23455
23456         * lib/regex.c: Update from glibc.
23457
23458 2001-07-05  Jim Meyering  <meyering@lucent.com>
23459
23460         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23461         recommendation.
23462         (libfetish_a_SOURCES): Put all .h files here instead.
23463         Remove a thus-exposed (better checks in automake) duplicate and
23464         two unnecessary .h files.
23465
23466 2001-07-04  Jim Meyering  <meyering@lucent.com>
23467
23468         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23469         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23470         distcheck failure.
23471
23472 2001-07-02  Jim Meyering  <meyering@lucent.com>
23473
23474         The following changes were prompted by suggestions from Bruno Haible.
23475
23476         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23477         is now generated.
23478         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23479         definition of EXTRA_DIST.
23480         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23481         ensure that the generated file is created/updated whenever the list
23482         of $(unlocked_functions) is changed.
23483         (jm-glibc-io.m4): New rule.
23484         (unlocked-io.h): New rule -- currently unused.
23485
23486 2001-06-24  Jim Meyering  <meyering@lucent.com>
23487
23488         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23489         unmatched right bracket, rather than kludging it with an extra,
23490         falsely-matching quote in a comment.  Patch by Akim Demaille.
23491
23492 2001-06-11  Jim Meyering  <meyering@lucent.com>
23493
23494         * lib/regex.c: Update from GNU libc.
23495
23496 2001-05-27  Jim Meyering  <meyering@lucent.com>
23497
23498         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23499         Check for ut_type in struct utmp.
23500
23501 2001-05-27  Jim Meyering  <meyering@lucent.com>
23502
23503         * lib/readutmp.h (UT_TYPE): Define.
23504
23505 2001-05-24  Jim Meyering  <meyering@lucent.com>
23506
23507         * lib/argmatch.c: Include "quote.h".
23508         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23509         quote function.  Reported by Göran Uddeborg.
23510
23511 2001-05-22  Jim Meyering  <meyering@lucent.com>
23512
23513         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23514         now that we use the package-supplied version unconditionally.
23515         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23516
23517 2001-05-21  Jim Meyering  <meyering@lucent.com>
23518
23519         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23520         shell syntax errors.
23521
23522 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23523
23524         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23525
23526 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23527
23528         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23529         Don't bother to check library strftime, since
23530         we'll be using our own my_strftime function anyway.
23531         Define my_strftime instead of strftime.
23532
23533 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23534
23535         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23536         which is not yet declared.
23537
23538 2001-05-15  Jim Meyering  <meyering@lucent.com>
23539
23540         * m4/regex.m4: Use proper quoting so brackets appear in the test
23541         program.
23542         Reported by, and with help from, Bruno Haible.
23543
23544 2001-05-13  Jim Meyering  <meyering@lucent.com>
23545
23546         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23547         undefined.
23548
23549 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23550
23551         dirname code cleanup.  base_name now behaves more compatibly
23552         with POSIX basename when given file names that have trailing
23553         slashes, and similarly for dir_name.  Add new primitives
23554         base_len and dir_len.  Put the directory-name-related decls
23555         into dirname.h.
23556
23557         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23558         * lib/backupfile.c (base_name): Likewise.
23559         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23560         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23561         * lib/makepath.c (strip_trailing_slashes): Likewise.
23562         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23563         ISSLASH): Likewise.
23564         * lib/rename.c (strip_trailing_slashes): Likewise.
23565         * lib/same.c (base_name): Likewise.
23566         * lib/stripslash.c (ISSLASH): Likewise.
23567
23568         * lib/addext.c: Include <dirname.h> after size_t is defined.
23569         * lib/backupfile.c: Likewise.
23570
23571         * lib/addext.c (addext): Use base_len to trim redundant
23572         trailing slashes instead of doing it ourselves.
23573         But do not trim the last slash if it is not redundant.
23574
23575         * lib/backupfile.c (find_backup_file_name,
23576         max_backup_version): Use base_len instead of rolling it ourselves.
23577         Handle the case of "" and (on DOS) "C:" correctly.
23578
23579         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23580         needed. Include <string.h>, <dirname.h>.
23581         (base_name): Allow file names ending in slashes, other than names
23582         that are all slashes.  In this case, return the basename followed
23583         by the slashes.  This is more general, and can be used in places
23584         where the original base_name purposely had an assertion failure.
23585         (base_len): New function.
23586
23587         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23588         Do not include <assert.h>; no longer needed.
23589         Include xalloc.h.
23590         (memrchr): Remove decl.
23591         (dir_name_r): Remove.
23592         (dir_len): Renamed from dirlen.  All callers changed.
23593         Rewrite in terms of base_name, for simplicity and consistency.
23594         (dir_name): Never return NULL.  All callers changed.
23595         Do not include <stdlib.h> in test program; no longer needed.
23596         return 0; is fine for test program.
23597
23598         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23599         New macros.
23600         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23601
23602         * lib/path-concat.c (path_concat): Use base_len to compute
23603         base length, not strlen; this means we cannot rely on memcpy
23604         to null-terminate.
23605
23606         * lib/same.c (STREQ): Remove.
23607         (same_name): Handle the case where the basename ends in trailing '/'.
23608
23609         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23610         a slash was stripped.  Do not strip the last slash after a
23611         file system prefix.
23612
23613 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23614
23615         * lib/Makefile.am (libfetish_a_SOURCES):
23616         Add strftime.c, since we now compile it on all hosts.
23617
23618         * lib/strftime.c (my_strftime):
23619         Define to nstrftime if emacs, but only if my_strftime is not defined.
23620         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23621         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23622         Add one more extra argument: a nanoseconds value.
23623         All uses changed.
23624         (ns): New macro.
23625         (my_strftime function): Add %N format.
23626         (emacs_strftimeu): Renamed from emacs_strftime,
23627         with extra ut argument.
23628
23629 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23630
23631         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23632
23633 2001-04-21  Jim Meyering  <meyering@lucent.com>
23634
23635         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23636         doesn't interfere.
23637
23638 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23639
23640         * m4/ftruncate.m4: Check for chsize.
23641         Link with ftruncate.o unconditionally if ftruncate is missing.
23642         This was required when cross-compiling to i586-mingw32msvc.
23643
23644 2001-04-08  Jim Meyering  <meyering@lucent.com>
23645
23646         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23647         recomputed; that's necessary when the offset spans a DST transition.
23648         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23649
23650 2001-04-02  Jim Meyering  <meyering@lucent.com>
23651
23652         * lib/regex.h, regex.c: Update from GNU libc.
23653
23654 2001-03-24  Jim Meyering  <meyering@lucent.com>
23655
23656         * m4/jm-macros.m4: Require autoconf-2.49d.
23657
23658 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23659
23660         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23661
23662 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23663
23664         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23665
23666 2001-03-17  Jim Meyering  <meyering@lucent.com>
23667
23668         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23669         now that the version in autoconf is equivalent.
23670         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23671
23672         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23673         Suggestion from Akim Demaille.
23674
23675         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23676         (jm_PREREQ_TEMPNAME): New function.
23677
23678 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23679
23680         * lib/tempname.c (uint64_t): Define to uintmax_t if
23681         not defined, and if UINT64_MAX is not defined.
23682         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23683         Reported by John David Anglin.
23684
23685 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23686
23687         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23688         resolve alias if codeset is empty.
23689         * lib/config.charset (BeOS): Use wildcard syntax.
23690
23691 2001-03-13  Jim Meyering  <meyering@lucent.com>
23692
23693         * lib/path-concat.c (path_concat)
23694         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23695         concatenating e.g., `C:' and `foo'.
23696         From Bruno Haible.
23697
23698 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23699
23700         * lib/localcharset.c (locale_charset): Don't use
23701         setlocale(LC_CTYPE,NULL). Don't return NULL.
23702         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23703
23704 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23705
23706         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23707         support for DOS/DJGPP.
23708
23709 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23710
23711         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23712         lacks mkstemp.  Compile our own tempname.c if we compile our own
23713         mkstemp.c, as mkstemp relies on tempname.
23714
23715 2001-03-01  Jim Meyering  <meyering@lucent.com>
23716
23717         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23718         AH_VERBATIM really does output its argument verbatim.
23719
23720 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23721
23722         * lib/Makefile.am (libfetish_a_SOURCES):
23723         Add dup-safer.c, fopen-safer.c.
23724         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23725
23726         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23727         * lib/unistd-safer.h: New files.
23728
23729 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23730
23731         The mkstemp replacement is taken from glibc 2.2.2, with some
23732         portability fixes for use outside glibc, as follows:
23733
23734         * lib/tempname.c (struct_stat64): New macro.
23735         (direxists, __gen_tempname): Use it.
23736         This avoids a portability problem with Solaris 8.
23737
23738         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23739         (<stddef.h>, <stdint.h>, <string.h>):
23740         Include only if STDC_HEADERS || _LIBC.
23741         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23742         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23743         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23744         (__set_errno): Define this macro if <errno.h> doesn't.
23745         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23746         Define these macros if <stdio.h> doesn't.
23747         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23748         Define these macros if <sys/stat.h>
23749         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23750         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23751         __xstat64): Define if not _LIBC.
23752         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23753         (__gen_tempname): Invoke gettimeofday only if
23754         HAVE_GETTIMEOFDAY || _LIBC;
23755         otherwise, fall back on plain "time".
23756         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23757
23758         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23759
23760         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23761
23762 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23763
23764         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23765
23766 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23767
23768         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23769         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23770         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23771         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23772
23773 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23774
23775         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23776         Remove workaround macros for hosts that have mbrtowc but not
23777         mbstate_t, as we now insist on proper declarations for both
23778         before using mbrtowc.
23779
23780 2001-02-17  Jim Meyering  <meyering@lucent.com>
23781
23782         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23783         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23784         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23785         UnixWare 7.1.1.
23786
23787         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23788         rather than AC_CACHE_VAL.
23789
23790 2001-02-17  Jim Meyering  <meyering@lucent.com>
23791
23792         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23793         around included file name.
23794
23795         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23796
23797         * lib/strftime.c: Update from GNU libc (the only changes were to
23798         comments).
23799
23800 2001-02-17  Jim Meyering  <meyering@lucent.com>
23801
23802         * lib/regex.c: Update from libc.
23803
23804 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23805
23806         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23807         clash.
23808
23809 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23810
23811         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23812         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23813         Reported by Mark Hounschell via Paul Eggert.
23814
23815 2001-02-07  Jim Meyering  <meyering@lucent.com>
23816
23817         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23818
23819 2001-02-05  Jim Meyering  <meyering@lucent.com>
23820
23821         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23822         it includes the patch required for `large file' support with at least
23823         HP-UX's 10.20 /bin/cc.
23824
23825 2001-02-03  Jim Meyering  <meyering@lucent.com>
23826
23827         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23828         AS_IF, now that it works once again (mysteriously).
23829         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23830
23831 2001-01-30  Jim Meyering  <meyering@lucent.com>
23832
23833         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23834         * m4/chown.m4: Rename conftestchown to conftest.chown.
23835         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23836         s/conftestdir2/conftest.d2/.
23837         * m4/utimes.m4: s/conftestdata/conftest.data/
23838         Inspired by Pavel Roskin's change in autoconf.
23839
23840 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23841
23842         * lib/config.charset: Update for FreeBSD 4.2.
23843
23844 2001-01-27  Jim Meyering  <meyering@lucent.com>
23845
23846         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23847         a use of AS_IF.
23848         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23849
23850 2001-01-26  Jim Meyering  <meyering@lucent.com>
23851
23852         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23853         quotearg.c includes it.
23854
23855 2001-01-26  Jim Meyering  <meyering@lucent.com>
23856
23857         * lib/quotearg.c: Include stddef.h.
23858         * lib/quote.c: Include stddef.h.
23859         Reported by Axel Kittenberger.
23860
23861         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23862         line in double quotes so that it evokes a better diagnostic.
23863         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23864         Reported by Axel Kittenberger.
23865
23866 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23867
23868         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23869         as if it was a `charset'.
23870
23871 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23872
23873         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23874         has const.
23875
23876 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23877
23878         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23879         to avoid a warning.  Add back 'const' to inptr.
23880
23881 2001-01-20  Jim Meyering  <meyering@lucent.com>
23882
23883         Be sure that headers are checked before used in code compiled
23884         for the type checks.
23885         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23886         In place of that, invoke jm_CHECK_ALL_TYPES.
23887         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23888         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23889         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23890         The check for ssize_t was mistakenly run before the test for unistd.h.
23891
23892         The configure-time check for stdbool.h was missing.
23893         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23894         (jm_PREREQ_HASH): New function.
23895
23896 2001-01-17  Jim Meyering  <meyering@lucent.com>
23897
23898         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23899         for autoconf-2.49c.
23900         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23901
23902 2001-01-16  Jim Meyering  <meyering@lucent.com>
23903
23904         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23905         From Bruno Haible.
23906
23907 2001-01-14  Jim Meyering  <meyering@lucent.com>
23908
23909         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23910         foo and bar.  Create conftestdir/ in the script, not in the C code.
23911         Remove directories in the script, not in the C code.
23912         Remove conftestdir{,2} before trying to create the directory.
23913         Make the entire configure script fail if the mkdir fails.
23914
23915 2001-01-14  Jim Meyering  <meyering@lucent.com>
23916
23917         * lib/rename.c: New file.  From Volker Borchert.
23918         Include stdlib.h, string.h or strings.h, and xalloc.h.
23919         Use strip_trailing_slashes rather than open-coding it.
23920
23921 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23922
23923         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23924
23925 2001-01-03  Jim Meyering  <meyering@lucent.com>
23926
23927         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23928         of local `inptr' to avoid warning with some system declarations of
23929         iconv.
23930
23931 2001-01-02  Volker Borchert  <bt@teknon.de>
23932
23933         * m4/rename.m4: New file.
23934         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23935
23936 2001-01-01  Jim Meyering  <meyering@lucent.com>
23937
23938         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23939         even on systems with utmpx.h.  It's necessary for the declaration of
23940         utmp's ut_user member.  Reported by Andreas Jaeger.
23941
23942         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23943         available. They are required for the declarations of getgrgid and
23944         getpwuid resp.
23945         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23946         Reported by Andreas Jaeger.
23947
23948 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
23949
23950         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
23951         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
23952         so `make install' also works in VPATH builds.
23953
23954 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
23955
23956         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
23957         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
23958         can be used in subdirectories.
23959
23960 2000-12-29  Paul Eggert  <eggert@twinsun.com>
23961
23962         * lib/modechange.c: Do not assume that mode_t uses the
23963         traditional octal encoding.  E.g. "chmod 1 FOO" should set
23964         the other-execute bit of FOO even if S_IXOTH != 1.
23965
23966         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
23967         WOTH, XOTH, ALLM): New macros.
23968         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
23969          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
23970         Use them.
23971         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
23972         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
23973         (mode_compile):
23974         No need to use uintmax_t; unsigned long is long enough.
23975         Don't bother to get suffix since we don't use it.
23976
23977 2000-12-26  Jim Meyering  <meyering@lucent.com>
23978
23979         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
23980         better with autoheader.
23981
23982 2000-12-24  Jim Meyering  <meyering@lucent.com>
23983
23984         * lib/hash.c (is_prime): Return explicit boolean values.
23985         (hash_get_first): Return NULL to appease Irix5.6's 89.
23986         Reported by Nelson Beebe.
23987
23988 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
23989
23990         * lib/localcharset.c (locale_charset): Add support for Win32.
23991
23992 2000-12-18  Paul Eggert  <eggert@twinsun.com>
23993
23994         * lib/physmem.h, lib/physmem.c: New files.
23995
23996         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
23997         (noinst_HEADERS): Add physmem.h.
23998
23999         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24000         't' for compatibility with Solaris 8 sort.
24001
24002 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24003
24004         * lib/config.charset: Add support for BeOS.
24005
24006 2000-12-17  Jim Meyering  <meyering@lucent.com>
24007
24008         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24009         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24010
24011 2000-12-16  Jim Meyering  <meyering@lucent.com>
24012
24013         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24014         N and M) would have treated it like `chown N:N FILE'.
24015
24016         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24017
24018 2000-12-16  Jim Meyering  <meyering@lucent.com>
24019
24020         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24021         SHELLS_FILE to a file name that's useful on djgpp systems.
24022         Include stdlib.h.
24023         (ADDITIONAL_DEFAULT_SHELLS): Define.
24024         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24025         Based mostly on a patch from Prashant TR.
24026
24027 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24028
24029         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24030         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24031         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24032
24033 2000-12-08  Andreas Schwab  <schwab@suse.de>
24034
24035         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24036         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24037
24038 2000-12-07  Jim Meyering  <meyering@lucent.com>
24039
24040         * lib/stripslash.c (ISSLASH): Define.
24041         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24042         `/'.
24043         From Prashant TR.
24044
24045         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24046         (dir_name_r): Declare this function as static.
24047         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24048         manifest itself on a name containing a mix of slashes and
24049         backslashes.
24050         Make this function work with names starting with a DOS-style
24051         drive letter and colon prefix.
24052         (dir_name): Append `.' if necessary.
24053         Based mostly on patches from Prashant TR and Eli Zaretskii.
24054
24055         * lib/dirname.h (dir_name_r): Remove prototype.
24056
24057 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24058
24059         * m4/off_t-format.m4: Remove this file.
24060         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24061
24062 2000-12-06  Jim Meyering  <meyering@lucent.com>
24063
24064         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24065         replacement strtoull, we may well need the replacement strtoul, too.
24066         Check for declarations of strtoul and strtoull.
24067         Check for strtol.  Mainly as a cue to cause automake to include
24068         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24069         Check for limits.h -- strtol.c needs it.
24070
24071 2000-12-05  Jim Meyering  <meyering@lucent.com>
24072
24073         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24074
24075 2000-12-04  Jim Meyering  <meyering@lucent.com>
24076
24077         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24078         Also include memory.h, stdlib.h, unistd.h if appropriate.
24079         Reported by Andreas Jaeger (conflicting declaration of malloc).
24080
24081 2000-12-02  Jim Meyering  <meyering@lucent.com>
24082
24083         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24084         * m4/jm-macros.m4 (jm_MACROS): require it.
24085
24086 2000-12-02  Jim Meyering  <meyering@lucent.com>
24087
24088         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24089
24090 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24091
24092         * lib/memrchr.c: Include <config.h> before any system include file.
24093
24094 2000-11-30  Jim Meyering  <meyering@lucent.com>
24095
24096         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24097
24098 2000-11-30  Jim Meyering  <meyering@lucent.com>
24099
24100         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24101
24102 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24103
24104         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24105
24106 2000-11-26  Jim Meyering  <meyering@lucent.com>
24107
24108         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24109
24110 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24111
24112         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24113         size of (size_t) -1; it's not portable.
24114
24115 2000-11-17  Jim Meyering  <meyering@lucent.com>
24116
24117         * lib/strstr.c: Update from GNU libc.
24118
24119 2000-11-17  Akim Demaille  <akim@epita.fr>
24120
24121         * lib/obstack.h: Formatting changes.
24122         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24123         prevent type checking.
24124         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24125         cast the value to (void *): assigning a `foo *' to a `void *'
24126         variable is valid.
24127         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24128
24129 2000-11-16  Jim Meyering  <meyering@lucent.com>
24130
24131         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24132
24133 2000-11-11  Jim Meyering  <meyering@lucent.com>
24134
24135         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24136
24137 2000-11-10  Jim Meyering  <meyering@lucent.com>
24138
24139         * lib/obstack.h: Update from GNU libc.
24140         * lib/obstack.c: Likewise.
24141
24142 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24143
24144         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24145
24146 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24147
24148         * lib/getusershell.c (setusershell): Use rewind rather than
24149         fseek/fseeko, to avoid configuration hassles with fseeko.
24150         Don't bother opening SHELLS_FILE if shellstream is NULL;
24151         it's not necessary.
24152
24153 2000-11-05  Jim Meyering  <meyering@lucent.com>
24154
24155         * lib/makepath.h (make_dir): Declare.
24156         * lib/makepath.c (make_dir): Remove `static' attribute.
24157         Tweak a comment.
24158
24159 2000-11-04  Jim Meyering  <meyering@lucent.com>
24160
24161         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24162
24163 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24164
24165         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24166         last one in a bucket, advance to the next bucket.
24167
24168 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24169
24170         * lib/fnmatch.c: Do not comment out all the code if we are using
24171         the GNU C library, because in some cases we are replacing buggy
24172         code in the GNU C library itself.
24173
24174 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24175
24176         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24177         (regex_compile): Catch bogus \(\1\).
24178
24179 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24180
24181         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24182         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24183         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24184
24185 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24186
24187         * lib/error.h, getline.h, modechange.h:
24188         Remove "2000" from Copyright line, as the file hasn't been
24189         changed this year other than in the copyright notice.
24190
24191         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24192         was changed this year.
24193
24194 2000-10-29  Jim Meyering  <meyering@lucent.com>
24195
24196         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24197         renaming.
24198         * m4/ls-mntd-fs.m4: Likewise
24199
24200 2000-10-29  Jim Meyering  <meyering@lucent.com>
24201
24202         * lib/xstat.in: Fix grammar in comment.
24203
24204 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24205
24206         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24207         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24208         doesn't define __restrict_arr.
24209
24210 2000-10-28  Jim Meyering  <meyering@lucent.com>
24211
24212         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24213         (jm_PREREQ_MEMCHR): New function.
24214
24215 2000-10-28  Jim Meyering  <meyering@lucent.com>
24216
24217         * lib/memchr.c: Update from libc.
24218         Adjust for portability:
24219         [HAVE_STDLIB_H]: Include stdlib.h.
24220         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24221         Undef __memchr, too.
24222         [!weak_alias]: Define __memchr to memchr.
24223
24224         * lib/regex.c: Update from libc.
24225         * lib/regex.h: Likewise.
24226         * lib/getopt1.c: Likewise.
24227         * lib/memcmp.c: Likewise.
24228
24229         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24230         Avoid using fseek, when possible -- it's broken by design.
24231         Patch by Ulrich Drepper.
24232
24233 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24234
24235         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24236         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24237         Giving in to popular pressure to shut up the compiler with casts.
24238
24239 2000-10-26  Jim Meyering  <meyering@lucent.com>
24240
24241         * lib/strftime.c: Update from libc.
24242
24243 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24244
24245         * regex.c: More `unsigned char' -> `re_char' changes.
24246         Also change several `int' into `re_wchar_t'.
24247         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24248         (PUSH_FAILURE_POINTER): Don't cast any more.
24249         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24250         We want GCC to complain, since this piece of code makes
24251         re_match non-reentrant, which *should* be fixed.
24252         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24253         (EXTEND_BUFFER): Use RETALLOC.
24254         (SET_LIST_BIT): Don't cast.
24255         (re_wchar_t): New type.
24256         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24257         that those two functions will always properly return.
24258         (IMMEDIATE_QUIT_CHECK): Cast to void.
24259         (analyse_first): Use recursion rather than an explicit stack.
24260         (re_compile_fastmap): Can't fail anymore.
24261         (re_search_2): Don't check re_compile_fastmap for failure.
24262         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24263         Now also sets the new value (passed in a new argument).
24264         (re_match_2_internal): Use it.
24265         Also, use a new var `reg' of type size_t when looping through regs
24266         rather than reuse the inappropriate `mcnt'.
24267
24268 2000-10-25  Jim Meyering  <meyering@lucent.com>
24269
24270         * lib/obstack.c: Update from libc.
24271
24272 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24273
24274         * regex.c (regex_compile): Change the way of handling a range from
24275         a char less than 256 to a char not less than 256.
24276
24277 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24278
24279         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24280         NT-Emacs only.
24281         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24282         so that re_search functions only quit when callers expect them to.
24283
24284 2000-10-23  Jim Meyering  <meyering@lucent.com>
24285
24286         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24287         wrong.  That set_locale call must not have any side effects.
24288         From Paul Eggert.
24289
24290 2000-10-22  Jim Meyering  <meyering@lucent.com>
24291
24292         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24293         [CYCLIC]: Remove now-unused definition.
24294
24295         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24296         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24297         Suggestion from Ulrich Drepper.
24298
24299 2000-10-21  Jim Meyering  <meyering@lucent.com>
24300
24301         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24302         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24303         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24304
24305 2000-10-21  Jim Meyering  <meyering@lucent.com>
24306
24307         * lib/dirname.c (memrchr): Declare if necessary.
24308         (dir_name): Remove the restriction that there be no
24309         trailing slashes.  Now, this code skips past them, effectively
24310         ignoring them.
24311         [TEST_DIRNAME] (main): New unit tests.
24312
24313         * lib/memrchr.c: New file from GNU libc.
24314         Undef __memrchr, too.
24315         [!weak_alias]: Define __memrchr to memrchr.
24316         Guard weak_alias use with `#ifdef weak_alias'.
24317
24318 2000-10-21  Jim Meyering  <meyering@lucent.com>
24319
24320         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24321         (dir_name): Use dir_name_r.
24322         * lib/dirname.h (dir_name_r): Declare it.
24323
24324 2000-10-17  Jim Meyering  <meyering@lucent.com>
24325
24326         * lib/quote.h (PARAMS): Define and use.
24327         Reported by Akim Demaille.
24328
24329         * lib/getopt.c: Update from libc.
24330
24331 2000-10-16  Jim Meyering  <meyering@lucent.com>
24332
24333         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24334         setlocale.
24335         From Jan Fedak.
24336
24337 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24338
24339         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24340
24341 2000-09-25  Jim Meyering  <meyering@lucent.com>
24342
24343         * lib/md5.h (rol): Define (from GnuPG).
24344
24345         * lib/sha.c: Give credit (GnuPG) where due.
24346         (M): Use rol rather than open-coding it.
24347         Add a FIXME comment.
24348
24349 2000-09-21  Jim Meyering  <meyering@lucent.com>
24350
24351         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24352         Reported by Michael Stone.
24353
24354 2000-09-20  Jim Meyering  <meyering@lucent.com>
24355
24356         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24357         (noinst_HEADERS): Add sha.h.
24358         Based on code from Scott G. Miller and from GnuPG.
24359
24360 2000-09-18  Jim Meyering  <meyering@lucent.com>
24361
24362         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24363         LIBS. Otherwise, everyone ends up linking with -lelf for some
24364         configurations.
24365         Reported by Mike Stone.
24366
24367 2000-09-15  Jim Meyering  <meyering@lucent.com>
24368
24369         * lib/regex.c: Update from libc.
24370
24371 2000-09-10  Jim Meyering  <meyering@lucent.com>
24372
24373         * lib/getopt.c (_getopt_internal): Update from glibc.
24374
24375 2000-09-09  Jim Meyering  <meyering@lucent.com>
24376
24377         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24378         think it should be used as a general replacement for isascii.
24379         * lib/fnmatch.c: Likewise.
24380         * lib/mbswidth.c: Likewise
24381         * lib/regex.c: Likewise.
24382
24383         Don't use atoi.
24384         * lib/userspec.c: Include sys/param.h and limits.h.
24385         Include xstrtol.h.
24386         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24387         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24388         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24389         UID, GID.  Check range.
24390
24391 2000-09-06  Jim Meyering  <meyering@lucent.com>
24392
24393         * lib/getopt.c (_getopt_internal): Update from glibc.
24394
24395 2000-08-30  Jim Meyering  <meyering@lucent.com>
24396
24397         * lib/strftime.c: Merge in changes from GNU libc.
24398
24399 2000-08-26  Jim Meyering  <meyering@lucent.com>
24400
24401         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24402         * m4/fpending.m4: New file.
24403
24404 2000-08-26  Jim Meyering  <meyering@lucent.com>
24405
24406         * lib/closeout.c: Include "__fpending.h".
24407         (close_stdout_status): Return right away if there's nothing to flush.
24408
24409         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24410         * lib/__fpending.c: New file.
24411         * lib/__fpending.h: New file.
24412
24413 2000-08-20  Jim Meyering  <meyering@lucent.com>
24414
24415         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24416         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24417         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24418
24419 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24420
24421         Improve fileutils installation on systems where running
24422         programs (like install) can't be unlinked.
24423         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24424         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24425
24426 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24427
24428         Standardize on "memory exhausted" instead of "Memory exhausted"
24429         or "virtual memory exhausted".
24430         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24431         "virtual memory exhausted".
24432         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24433         our own message.
24434         * lib/userspec.c (parse_user_spec): Likewise.
24435         * lib/bumpalloc.h: comment fix
24436         * lib/same.c, userspec.c: Include xalloc.h.
24437
24438         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24439         not char *const and pointing to a constant array.
24440         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24441         (xrealloc): Comment fix.
24442
24443         * lib/userspec.c (parse_user_spec):
24444         Don't translate a message until just before returning,
24445         to avoid unnecessary translation.
24446
24447 2000-08-07  Jim Meyering  <meyering@lucent.com>
24448
24449         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24450         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24451         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24452         getgroups.c, gethostname.c, getopt.h, group-member.c,
24453         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24454         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24455         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24456         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24457         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24458         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24459         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24460         yesno.c: Back out Copyright date changes for each file with no change
24461         this year.  This eases coordination with other programs using the same
24462         source code modules.  From Paul Eggert.
24463
24464 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24465
24466         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24467         not char, for compatibility with glibc 2.1.3 strftime.c.
24468
24469 2000-08-03  Greg McGary  <greg@mcgary.org>
24470
24471         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24472         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24473         (EXTEND_BUFFER): Use them.
24474
24475 2000-08-01  Jim Meyering  <meyering@lucent.com>
24476
24477         * lib/dirname.c (ISSLASH): Define.
24478         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24479         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24480         both `\' and `/' may be use as path separators.
24481         Based on a patch from Prashant TR.
24482
24483 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24484
24485         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24486         slot vector a constant, since it might get modified.
24487
24488 2000-07-31  Jim Meyering  <meyering@lucent.com>
24489
24490         * lib/xmalloc.c: Use `virtual memory exhausted', not
24491         `Memory exhausted'.
24492         * lib/obstack.c (print_and_abort): Likewise.
24493
24494 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24495
24496         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24497         buffer, so that the caller can always quote one small
24498         component of a "memory exhausted" message in slot 0.
24499         From a suggestion by Jim Meyering.
24500
24501 2000-07-30  Jim Meyering  <meyering@lucent.com>
24502
24503         * lib/makepath.c (make_path): Quote the other instance, too.
24504
24505         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24506         (STATIC_BUF_SIZE): Define.
24507         (quotearg_n_options): Use only statically allocated storage when
24508         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24509         than STATIC_BUF_SIZE.
24510
24511 2000-07-29  Jim Meyering  <meyering@lucent.com>
24512
24513         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24514         * lib/dirname.c (dir_name): Likewise.
24515
24516         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24517         `/'.
24518
24519         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24520         (dir_name): Assert that there are no trailing slashes.
24521
24522 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24523
24524         * lib/mbswidth.h (mbswidth): Add a flags argument.
24525         (mbswidth): New declaration.
24526         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24527         * lib/mbswidth.c (mbswidth): Add a flags argument.
24528         (mbsnwidth): New function.
24529
24530 2000-07-24  Jim Meyering  <meyering@lucent.com>
24531
24532         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24533
24534 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24535
24536         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24537
24538 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24539
24540         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24541         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24542         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24543         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24544         invoke multibyte primitives.
24545
24546 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24547
24548         * lib/quotearg.c:
24549         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24550         so that mbstate_t is always defined.
24551
24552         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24553         be 1 in at least one GCC installation, and this configuration
24554         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24555         performance on hosts that have mbrtowc but have only unibyte
24556         locales, but I assume these hosts are rare.
24557
24558 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24559
24560         * lib/mbswidth.c (_XOPEN_SOURCE):
24561         Don't define; this causes problems on Solaris 7.
24562         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24563
24564 2000-07-23  Jim Meyering  <meyering@lucent.com>
24565
24566         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24567         too: getgrgid, getpwuid, getuid.
24568
24569 2000-07-23  Jim Meyering  <meyering@lucent.com>
24570
24571         * lib/basename.c (base_name): Add an assertion.
24572
24573 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24574
24575         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24576         shadow its mbsinit function.
24577
24578 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24579
24580         * lib/mbswidth.h: New file.
24581         * lib/mbswidth.c: New file.
24582         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24583         (noinst_HEADERS): Add mbswidth.h.
24584
24585 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24586
24587         * lib/config.charset: Add support for FreeBSD. Improve support for
24588         HP-UX and IRIX 6.
24589
24590 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24591
24592         * m4/mbswidth.m4: New file.
24593         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24594
24595 2000-07-15  Jim Meyering  <meyering@lucent.com>
24596
24597         * lib/makepath.c: Include quote.h.
24598         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24599         corresponding argument in a `quote (...)' call.
24600         Give better diagnostics.
24601
24602         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24603         (noinst_HEADERS): Add quote.h.
24604
24605         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24606         from tar's src/misc.c.
24607         * lib/quote.h: New file.  Prototypes for same.
24608
24609 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24610
24611         From a suggestion by Bruno Haible.
24612         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24613         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24614         to decide whether to define the BeOS workaround macro;
24615         this adjusts to the change to AC_MBSTATE_T.
24616
24617 2000-07-14  Jim Meyering  <meyering@lucent.com>
24618
24619         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24620         jm_AC_TYPE_UINTMAX_T.
24621
24622 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24623
24624         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24625
24626         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24627         quotearg_buffer_restyled): Add support for
24628         clocale_quoting_style.  Undo previous change to
24629         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24630         and "{RIGHT QUOTATION MARK}" msgids.
24631
24632 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24633
24634         From a suggestion by Bruno Haible.
24635         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24636         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24637         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24638         and mbstate_t, to a single-part test that simply defines mbstate_t.
24639         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24640         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24641
24642 2000-07-10  Jim Meyering  <meyering@lucent.com>
24643
24644         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24645
24646         * m4/gnu-source.m4: Output to confdefs.h directly.
24647         Suggestion from Akim Demaille.
24648
24649 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24650
24651         The old behavior of quoting `like this' doesn't look good with
24652         newer, ISO-style fonts.  See:
24653         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24654
24655         Instead, quote "like this" by default.  Let the translator
24656         tailor the locale-specific quoting behavior by providing
24657         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24658
24659         * lib/quotearg.c (N_): New macro.
24660         (gettext_default): New function.
24661         (quotearg_buffer_restyled): Use
24662         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24663         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24664
24665 2000-07-09  Jim Meyering  <meyering@lucent.com>
24666
24667         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24668         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24669
24670         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24671         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24672
24673 2000-07-09  Jim Meyering  <meyering@lucent.com>
24674
24675         * lib/Most files: Update copyright dates to include 2000.
24676
24677 2000-07-08  Jim Meyering  <meyering@lucent.com>
24678
24679         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24680         if not defined.
24681         (xgethostname): Remove now-unnecessary #ifdef.
24682         Move declaration of `err' into loop where it's used.
24683
24684 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24685         and Bruno Haible  <haible@clisp.cons.org>
24686
24687         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24688         only if the test for an object-type mbstate_t fails.  This
24689         prevents us from mistakenly reporting that mbstate_t is a
24690         system object type after we "#define mbstate_t int" to work
24691         around its lack.
24692
24693 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24694         and Bruno Haible  <haible@clisp.cons.org>
24695
24696         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24697
24698 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24699
24700         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24701         to strerror_r.
24702         Include <ctype.h> for use of isalpha.
24703
24704 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24705
24706         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24707         by allocating a larger buffer. Test the gethostname return value for
24708         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24709         returns an error and ENAMETOOLONG isn't defined.
24710
24711 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24712
24713         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24714         dimension.
24715
24716 2000-07-04  Jim Meyering  <meyering@lucent.com>
24717
24718         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24719         of the deprecated AC_CHECKING.
24720
24721 2000-07-04  Jim Meyering  <meyering@lucent.com>
24722
24723         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24724         Reported by Bruno Haible.
24725
24726 2000-07-04  Jim Meyering  <meyering@lucent.com>
24727
24728         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24729         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24730         lacks mbrtowc.
24731
24732 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24733
24734         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24735         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24736
24737 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24738         and Bruno Haible  <haible@clisp.cons.org>
24739
24740         * lib/quotearg.c (mbrtowc):
24741         Assign to *pwc, and return 1 only if result is nonzero.
24742         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24743
24744 2000-07-03  Jim Meyering  <meyering@lucent.com>
24745
24746         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24747
24748 2000-07-03  Jim Meyering  <meyering@lucent.com>
24749
24750         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24751         This is necessary to get a definition of e.g., UTMP_FILE on
24752         HP-UX 10.20.
24753         From Bob Proulx.
24754
24755 2000-07-02  Jim Meyering  <meyering@lucent.com>
24756
24757         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24758
24759         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24760         AC_LIBOBJ(function_name).
24761         * m4/chown.m4: Likewise.
24762         * m4/fnmatch.m4: Likewise.
24763         * m4/ftruncate.m4: Likewise.
24764         * m4/getgroups.m4: Likewise.
24765         * m4/getline.m4: Likewise.
24766         * m4/group-member.m4: Likewise.
24767         * m4/jm-macros.m4: Likewise.
24768         * m4/lstat.m4: Likewise.
24769         * m4/malloc.m4: Likewise.
24770         * m4/memcmp.m4: Likewise.
24771         * m4/nanosleep.m4: Likewise.
24772         * m4/putenv.m4: Likewise.
24773         * m4/realloc.m4: Likewise.
24774         * m4/regex.m4: Likewise.
24775         * m4/stat.m4: Likewise.
24776         * m4/strftime.m4: Likewise.
24777
24778 2000-07-02  Jim Meyering  <meyering@lucent.com>
24779
24780         * lib/quotearg.c (mbstate_t): Don't define here.
24781
24782 2000-07-02  Jim Meyering  <meyering@lucent.com>
24783
24784         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24785
24786 2000-07-01  Jim Meyering  <meyering@lucent.com>
24787
24788         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24789
24790 2000-07-01  Jim Meyering  <meyering@lucent.com>
24791
24792         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24793         problem.
24794
24795 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24796
24797         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24798         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24799
24800 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24801
24802         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24803         per change in ../m4/ls-mntd-fs.m4.
24804         (read_filesystem_list): Ignore symbolic links.
24805
24806 2000-06-29  Jim Meyering  <meyering@lucent.com>
24807
24808         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24809         for declaration of strcmp.
24810
24811         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24812
24813         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24814         Avoid warning by casting result to `char *' to remove `const'.
24815
24816 2000-06-28  Jim Meyering  <meyering@lucent.com>
24817
24818         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24819         included by quotearg.c, for which we perform this test.  From
24820         Bruno Haible.
24821
24822 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24823
24824         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24825         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24826         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24827
24828 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24829
24830         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24831
24832 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24833
24834         savedir now sets errno on failure and invokes xmalloc to get memory.
24835         Fix a couple of other minor bugs while we're at it.
24836
24837         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24838         (NAMLEN): Remove macro.
24839         (malloc, realloc): Remove decls.
24840         (stpcpy): Likewise.
24841         ("xalloc.h"): Include.
24842         (NAME_SIZE_DEFAULT): New macro.
24843         (savedir): Use xmalloc / xrealloc to allocate memory.
24844         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24845         Skip "" directory entries.
24846         Use strlen to calculate directory entry length, since the old method
24847         is rarely used these days and isn't worth supporting.
24848         Don't use a pointer after freeing it.
24849         Check for integer overflow when calculating allocation size.
24850         Use memcpy to copy entries, instead of stpcpy.
24851         Set errno properly when returning NULL.
24852         Check for readdir error.
24853
24854 2000-06-26  Jim Meyering  <meyering@lucent.com>
24855
24856         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24857
24858 2000-06-25  Jim Meyering  <meyering@lucent.com>
24859
24860         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24861         Linux header bug when _XOPEN_SOURCE is defined to 500.
24862
24863 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24864
24865         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24866         deficiency.
24867
24868 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24869
24870         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24871         Include xalloc.h.
24872         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24873
24874 2000-06-24  Jim Meyering  <meyering@lucent.com>
24875
24876         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24877         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24878         for which strerror does return char*, but which lacks a conveniently
24879         accessible declaration of the function.  If the compile-test says
24880         strerror_r doesn't work, then resort to a `run'-test that works on
24881         BeOS and segfaults on DEC Unix.
24882
24883 2000-06-24  Jim Meyering  <meyering@lucent.com>
24884
24885         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24886
24887 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24888
24889         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24890         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24891
24892 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24893
24894         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24895         (mbrtowc, mbstate_t): Define substitutes if
24896         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24897         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24898         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24899
24900 2000-06-23  Jim Meyering  <meyering@lucent.com>
24901
24902         * m4/afs.m4: Add missing AC_MSG_RESULT.
24903         Reported by Bruno Haible.
24904
24905         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24906         Suggestion from Bruno Haible.
24907
24908 2000-06-23  Jim Meyering  <meyering@lucent.com>
24909
24910         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24911
24912 2000-06-21  Jim Meyering  <meyering@lucent.com>
24913
24914         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24915
24916 2000-06-21  Jim Meyering  <meyering@lucent.com>
24917
24918         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24919         (noinst_HEADERS): Add getstr.h.
24920
24921         * lib/getline.c (getstr): Move into a separate file.
24922         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24923         the following changes: new parameter, delim2; both delim[12]
24924         parameters have type `int', not `char'.  The latter would lose
24925         with 8-bit delimiters.
24926         * lib/getstr.h: New file.
24927
24928 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24929
24930         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24931         than 1024, return a memory chunk of least possible size, instead
24932         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24933         Use free/xmalloc instead of xrealloc to avoid copying for very long
24934         paths.
24935
24936 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24937
24938         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24939         the empty string.
24940
24941 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24942
24943         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24944         address, not strdup.  Include <stdlib.h> and don't declare free().
24945
24946 2000-06-19  Jim Meyering  <meyering@lucent.com>
24947
24948         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
24949
24950 2000-06-18  Jim Meyering  <meyering@lucent.com>
24951
24952         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
24953
24954         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
24955         `checking whether...' message to be consistent with that of the
24956         lstat test.
24957
24958 2000-06-18  Jim Meyering  <meyering@lucent.com>
24959
24960         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
24961         Besides, these days every porting target provides a mkdir function.
24962
24963         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
24964         needed. (this snippet comes from src/system.h).
24965
24966 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
24967
24968         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
24969
24970 2000-06-15  Paul Eggert  <eggert@twinsun.com>
24971
24972         * lib/human.c (adjust_value): New function.
24973         (human_readable_inexact): Apply rounding style even when
24974         printing approximate values.
24975
24976 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24977
24978         * lib/human.c (human_readable_inexact): Allow an input block
24979         size that is not a multiple of the output block size, and vice versa.
24980         Reported by Piergiorgio Sartor.
24981
24982 2000-06-14  Paul Eggert  <eggert@twinsun.com>
24983
24984         * lib/getdate.y (get_date): Apply relative times after time
24985         zone indicator, not before.  Reported by Todd A. Jacobs.
24986
24987 2000-06-13  Jim Meyering  <meyering@lucent.com>
24988
24989         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
24990
24991         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
24992
24993 2000-06-12  Paul Eggert  <eggert@twinsun.com>
24994
24995         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
24996
24997 2000-06-12  Jim Meyering  <meyering@lucent.com>
24998
24999         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25000         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25001         optional argument.
25002         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25003         the optional argument, `lib'.
25004
25005 2000-06-08  Jim Meyering  <meyering@lucent.com>
25006
25007         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25008
25009 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25010
25011         Rewrite largefile configuration so that we don't need to run
25012         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
25013         AC_CANONICAL_HOST in configure.in -- jmm]
25014
25015         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
25016         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
25017         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
25018         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
25019         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
25020         All uses changed.
25021         Instead of inspecting the output of getconf, try to compile the
25022         test program without and with the macro definition.
25023         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
25024         for getconf.  Instead, check for the needed flags by compiling
25025         test programs.
25026
25027 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25028
25029         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
25030
25031 2000-06-04  Jim Meyering  <meyering@lucent.com>
25032
25033         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
25034         SunOS 4.1.4 for which gid_t is an unsigned type.
25035
25036 2000-06-03  Jim Meyering  <meyering@lucent.com>
25037
25038         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
25039         now that autoconf requires that.
25040
25041         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
25042         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
25043         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
25044
25045 2000-06-03  Jim Meyering  <meyering@lucent.com>
25046
25047         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
25048
25049 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25050
25051         * m4/glibc21.m4: New file.
25052         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
25053
25054 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25055
25056         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
25057         newer, don't install charset.alias.
25058         * lib/config.charset: Change the Linux/glibc rules so they become empty
25059         on glibc-2.1 or newer.
25060
25061 2000-06-02  Jim Meyering  <meyering@lucent.com>
25062
25063         * lib/mountlist.c: Back out last change.  Instead, do this...
25064         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
25065         me_dummy member using the same `ignore'-testing code.
25066         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
25067         fs_type strings.
25068         From Mark D. Roth.
25069
25070 2000-05-29  Jim Meyering  <meyering@lucent.com>
25071
25072         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
25073         mounts with the `ignore' attribute.  Based on a patch from
25074         Mark D. Roth.
25075
25076 2000-05-28  Jim Meyering  <meyering@lucent.com>
25077
25078         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
25079         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25080         * m4/stat.m4: Likewise.
25081         * m4/lstat.m4: Likewise.
25082         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
25083
25084         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
25085         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
25086
25087 2000-05-26  Jim Meyering  <meyering@lucent.com>
25088
25089         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
25090
25091 2000-05-24  Jim Meyering  <meyering@lucent.com>
25092
25093         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
25094         autoconf requires that.
25095         * m4/lib-check.m4: Likewise.
25096         * m4/jm-macros.m4: Likewise.
25097         * m4/strftime.m4: Likewise.
25098
25099         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
25100         AC_CHECK_DECLS, now that autoconf requires that.
25101
25102 2000-05-22  Jim Meyering  <meyering@lucent.com>
25103
25104         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25105         * m4/lstat.m4: Likewise.
25106
25107 2000-05-22  Jim Meyering  <meyering@lucent.com>
25108
25109         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
25110
25111 2000-05-20  Jim Meyering  <meyering@lucent.com>
25112
25113         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
25114         (jm_PREREQ): Use it.
25115
25116 2000-05-18  Jim Meyering  <meyering@lucent.com>
25117
25118         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
25119         back, too, since it may have been modified by allocate_entry.
25120         (hash_delete): Rewrite to use neither the assignment operator
25121         nor the comma operator in an if-expression.
25122
25123 2000-05-15  Paul Eggert  <eggert@twinsun.com>
25124
25125         * lib/closeout.c:
25126         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
25127         Remove; no longer needed.
25128         "quotearg.h": Add include.
25129         (file_name): Do not bother to explicitly initialize to NULL; it's less
25130         efficient on some hosts.
25131         (close_stdout_status): Remove test as to whether stdout was already
25132         closed; it breaks for the case "echo x | sort >&-".
25133         Quote file name colons.
25134         Do not assume that _("write error") lacks format strings.
25135
25136 2000-05-15  Jim Meyering  <meyering@lucent.com>
25137
25138         * lib/version-etc.c (version_etc_copyright): Update the copyright
25139         string used in all --version output.
25140
25141 2000-05-14  Jim Meyering  <meyering@lucent.com>
25142
25143         * lib/closeout.c (close_stdout_set_file_name): New function.
25144         (close_stdout_status): Use new file-scoped global.
25145         Return right away if fstat says the stdout file descriptor is invalid.
25146         * lib/closeout.h (close_stdout_set_file_name): Declare.
25147
25148 2000-05-10  Jim Meyering  <meyering@lucent.com>
25149
25150         * lib/closeout.c [default_exit_status]: New file-scoped variable.
25151         (close_stdout_set_status): New function.
25152         * lib/closeout.h (close_stdout_set_status): Declare.
25153
25154 2000-05-09  Jim Meyering  <meyering@lucent.com>
25155
25156         * m4/gettext.m4: Rename this...
25157         * m4/libintl.m4: ...to this.
25158
25159 2000-05-08  Jim Meyering  <meyering@lucent.com>
25160
25161         * lib/long-options.c: Don't include closeout.h.
25162         (parse_long_options): Don't call close_stdout for --version.
25163
25164 2000-05-06  Paul Eggert  <eggert@twinsun.com>
25165
25166         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
25167         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
25168         2.1.3 bug.  This avoids a clash when files like regex.c define
25169         _GNU_SOURCE.
25170
25171 2000-05-06  Jim Meyering  <meyering@lucent.com>
25172
25173         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25174         (AC_REPLACE_FUNCS): Add strnlen.
25175
25176         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25177         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25178
25179         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25180         AC_SEARCH_LIBS call for nanosleep.
25181         (LIB_NANOSLEEP): Set and AC_SUBST.
25182
25183 2000-05-06  Jim Meyering  <meyering@lucent.com>
25184
25185         * lib/strnlen.c: Undefine __strnlen and strnlen.
25186         [!weak_alias]: Define __strnlen to strnlen.
25187
25188         * lib/atexit.c: New file, from libiberty.
25189
25190 2000-05-06  Jim Meyering  <meyering@lucent.com>
25191
25192         * lib/closeout.c (close_stdout_status): Also check for errors on the
25193         stderr stream.
25194
25195 2000-05-05  Jim Meyering  <meyering@lucent.com>
25196
25197         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25198         AC_SEARCH_LIBS call for clock_gettime.
25199         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25200
25201         * m4/search-libs.m4: Update from autoconf.
25202
25203         su doesn't work on Solaris 2.6.
25204         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25205         <shadow.h>.  Reported by Dragos Harabor.
25206
25207 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25208
25209         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25210         memcpy instead of xmalloc, xrealloc, path_concat.
25211         (locale_charset): Treat empty environment variables as absent.
25212         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25213
25214 2000-05-04  Jim Meyering  <meyering@lucent.com>
25215
25216         * lib/getopt.c: Update from glibc.
25217         * lib/obstack.c: Likewise.
25218         * lib/obstack.h: Likewise.
25219         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25220         file
25221
25222         * lib/regex.h: Likewise.
25223         * lib/strndup.c: Likewise.
25224         * lib/strnlen.c: New file, from glibc.
25225
25226 2000-05-03  Jim Meyering  <meyering@lucent.com>
25227
25228         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25229
25230 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25231
25232         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25233         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25234         compile-time test, rather than inspecting host and OS, to
25235         decide whether to define _LARGEFILE_SOURCE.
25236
25237 2000-05-01  Jim Meyering  <meyering@lucent.com>
25238
25239         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25240
25241         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25242         Based on a patch from Bruno Haible.
25243
25244 2000-05-01  Jim Meyering  <meyering@lucent.com>
25245
25246         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25247
25248 2000-04-29  Jim Meyering  <meyering@lucent.com>
25249
25250         * lib/path-concat.c: Declare strdup only if it's not defined.
25251         * lib/canon-host.c: Likewise.
25252
25253 2000-04-28  Jim Meyering  <meyering@lucent.com>
25254
25255         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25256         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25257         is included first, then limits.h is included by locale.h by libintl.h.
25258         From John David Anglin.
25259
25260 2000-04-25  Jim Meyering  <meyering@lucent.com>
25261
25262         * lib/makepath.c (S_IRWXUGO): Define.
25263         (make_path): Always perform explicit chmod if MODE specifies any
25264         of the `special' permission bits.  Prompted by a bug report against
25265         install from Mate Wierdl and Joost van Baal.
25266
25267 2000-04-18  Jim Meyering  <meyering@lucent.com>
25268
25269         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25270         (jm_PREREQ): Use it.
25271
25272 2000-04-18  Jim Meyering  <meyering@lucent.com>
25273
25274         * lib/README: New file.
25275
25276         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25277         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25278
25279 2000-04-17  Jim Meyering  <meyering@lucent.com>
25280
25281         Get it right :-)
25282         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25283         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25284         Suggestion from Akim Demaille.
25285
25286 2000-04-17  Jim Meyering  <meyering@lucent.com>
25287
25288         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25289         the definition of it to rpl_strftime also defined-away the system's
25290         declaration.
25291
25292 2000-04-15  Jim Meyering  <meyering@lucent.com>
25293
25294         Use `C' to denote so-called `contiguous' files, the same way
25295         that tar does.
25296         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25297         (ftypelet): Use S_ISCTG.
25298         From Michael Deutschmann.
25299
25300 2000-04-14  Jim Meyering  <meyering@lucent.com>
25301
25302         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25303         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25304         clobbered.
25305
25306 2000-04-14  Jim Meyering  <meyering@lucent.com>
25307
25308         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25309
25310 2000-04-13  Jim Meyering  <meyering@lucent.com>
25311
25312         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25313         AH_VERBATIM to insert required #ifndef into config.h.in.
25314         Suggestion from Akim Demaille.
25315
25316 2000-04-12  Jim Meyering  <meyering@lucent.com>
25317
25318         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25319         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25320         Christian Krackowizer.
25321
25322         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25323         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25324         (AC_SYS_LARGEFILE): Require.
25325         (AM_C_PROTOTYPES): Require.
25326
25327 2000-04-08  Jim Meyering  <meyering@lucent.com>
25328
25329         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25330         names don't conflict.  Reported by Eli Zaretskii.
25331
25332 2000-04-07  Jim Meyering  <meyering@lucent.com>
25333
25334         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25335         sys/types.h, to work around system header problems on AIX 3.2.5.
25336         From Bruno Haible.
25337
25338 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25339
25340         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25341         bug.  Deal with the different error behavior of Irix iconv.
25342
25343 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25344
25345         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25346         IRIX if the installer said otherwise.
25347
25348 2000-04-05  Jim Meyering  <meyering@lucent.com>
25349
25350         Portability tweaks required for ultrix4.3.
25351         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25352         (jm_CHECK_DECLS): Add getutent to the list of functions.
25353         (_jm_DECL_HEADERS): Add utmpx.h.
25354         From John David Anglin.
25355
25356         * m4/strftime.m4: Back out the 2000-04-02 change.
25357         Instead of that change, simply undefine putenv in the test program.
25358
25359 2000-04-05  Jim Meyering  <meyering@lucent.com>
25360
25361         Portability tweaks required for ultrix4.3.
25362         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25363         getutent.
25364         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25365         * lib/canon-host.c: Declare strdup.
25366         * lib/path-concat.c: Likewise.
25367         From John David Anglin.
25368
25369 2000-04-04  Jim Meyering  <meyering@lucent.com>
25370
25371         Be more DOS 8.3-friendly.
25372         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25373         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25374         * lib/Makefile.am: Reflect renaming.
25375         Reported by Eli Zaretskii.
25376
25377         Use a temporary file name that won't clash with `charset.alias'
25378         in the DOS 8.3 name space.
25379         * lib/Makefile.am (charset_tmp): Define.
25380         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25381         (uninstall-local): Likewise.
25382         Reported by Eli Zaretskii.
25383
25384 2000-04-03  Jim Meyering  <meyering@lucent.com>
25385
25386         * m4/gettext.m4: Fix typo in comment.
25387
25388         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25389         textutils/configure.in).  Suggestion from Paul Eggert.
25390         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25391
25392 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25393
25394         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25395         variable in the shell rather than using putenv, which isn't
25396         portable.  This avoids the configure-time inter-test dependency
25397         on the potentially-renamed putenv function.
25398
25399 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25400
25401         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25402         before checking struct stat.st_blksize, so that
25403         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25404
25405 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25406
25407         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25408         since strftime.c uses HAVE_STRFTIME to decide whether to use
25409         the underlying strftime.
25410
25411 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25412
25413         * lib/time/strftime.c (my_strftime): Make sure we call the system
25414         strftime, not ourselves, when invoking the underlying strftime.
25415
25416 2000-03-24  Jim Meyering  <meyering@lucent.com>
25417
25418         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25419         (charset_alias): Define.
25420         (install-exec-local): Factor out common code.
25421         (uninstall-local): Split lines longer than 80.
25422         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25423         (SUFFIXES): Define.
25424         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25425         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25426
25427 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25428
25429         * lib/config.charset: Output a line containing "Packages using this
25430         file".
25431         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25432         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25433         ref-del.sed): New rules.
25434
25435 2000-03-17  Jim Meyering  <meyering@lucent.com>
25436
25437         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25438         Otherwise, include <strings.h>
25439
25440 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25441
25442         * lib/unicodeio.c (utf8_wctomb): New function.
25443         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25444         format instead of in UCS-4 with platform dependent endianness.
25445
25446 2000-03-10  Jim Meyering  <meyering@lucent.com>
25447
25448         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25449         From Marco Franzen.
25450
25451 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25452
25453         * lib/savedir.c (savedir): Work even if directory size is
25454         negative; this can happen with some screwy NFS configurations.
25455
25456 2000-03-06  Jim Meyering  <meyering@lucent.com>
25457
25458         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25459         if it's NULL (because we ran out of memory).  From Bruno Haible.
25460
25461 2000-03-05  Jim Meyering  <meyering@lucent.com>
25462
25463         * lib/localcharset.c ("path-concat.h"): Include.
25464         (get_charset_aliases): Use path_concat instead of ANSI string
25465         concatenation.
25466
25467         * lib/unicodeio.h (PARAMS): Define.
25468         Use it to guard prototype.
25469
25470 2000-03-04  Jim Meyering  <meyering@lucent.com>
25471
25472         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25473         for lib/localcharset.c.
25474
25475 2000-03-04  Jim Meyering  <meyering@lucent.com>
25476
25477         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25478         installing into it.
25479         (uninstall-local): Uncomment this rule so `make distcheck' works
25480         once again.
25481
25482         * lib/unicodeio.c (<errno.h>): Include it.
25483         (errno): Declare if not defined.
25484
25485         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25486
25487         * lib/config.charset: New version, incorporating remarks from a linux
25488         i18n mailing list.  From Bruno Haible.
25489
25490 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25491
25492         * m4/codeset.m4: New file.
25493         * m4/iconv.m4: New file.
25494         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25495
25496 2000-03-03  Jim Meyering  <meyering@lucent.com>
25497
25498         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25499
25500 2000-03-02  Jim Meyering  <meyering@lucent.com>
25501
25502         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25503         the messages come out on separate lines.
25504
25505         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25506         rather than jm_CHECK_DECLARATIONS.
25507         * m4/decl.m4: Remove now-unused file.
25508
25509         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25510         geteuid.
25511
25512 2000-03-02  Jim Meyering  <meyering@lucent.com>
25513
25514         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25515
25516 2000-03-01  Jim Meyering  <meyering@lucent.com>
25517
25518         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25519         * lib/unicodeio.c: Likewise.
25520
25521 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25522
25523         * lib/config.charset: New file.
25524         * lib/localcharset.c: New file.
25525         * lib/unicodeio.h, lib/unicodeio.c: New files.
25526         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25527         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25528         (noinst_HEADERS): Add unicodeio.h.
25529         (all-local, install-exec-local, charset.alias): New targets.
25530
25531 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25532
25533         * lib/quotearg.c (ALERT_CHAR): New macro.
25534         (quotearg_buffer_restyled): Use it.
25535
25536 2000-02-27  Jim Meyering  <meyering@lucent.com>
25537
25538         * m4/check-decl.m4: Add getenv to the list.
25539
25540 2000-02-27  Jim Meyering  <meyering@lucent.com>
25541
25542         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25543         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25544
25545         * lib/backupfile.c: Guard inclusion of stdlib.h with
25546         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25547         Declare malloc if needed.
25548
25549         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25550         `#ifndef HAVE_DECL..'
25551         now that autoconf always defines the HAVE_DECL_ symbols.
25552         * lib/human.c: Likewise.
25553         * lib/same.c: Likewise.
25554         * lib/strtoumax.c: Likewise.
25555
25556         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25557         declaration check was not run.
25558         * lib/hash.c: Likewise.
25559         * lib/human.c: Likewise.
25560         * lib/same.c: Likewise.
25561         * lib/strtoumax.c: Likewise.
25562
25563         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25564         `.', then first look up the entire `.'-containing string as a login
25565         name.
25566
25567 2000-02-23  Jim Meyering  <meyering@lucent.com>
25568
25569         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25570         in place of my hack.
25571
25572 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25573
25574         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25575         (textint): New typedef.
25576         (parser_control): Member year changed from int to textint.
25577         All uses changed.
25578         (YYSTYPE): Removed; replaced by %union with int and textint members.
25579         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25580         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25581         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25582         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25583         (date, number, to_year): Use width of number in digits, not its value,
25584         to determine whether it's a 2-digit year, or a 2-digit time.
25585         (yylex): Store number of digits of numeric tokens.
25586         Reported by John Kendall.
25587
25588         (parser_control): Changed from struct parser_control to typedef (for
25589         consistency).  All uses changed.
25590
25591         (tID): Removed; not used.
25592         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25593
25594 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25595
25596         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25597         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25598
25599 2000-02-12  Jim Meyering  <meyering@lucent.com>
25600
25601         * lib/userspec.c (ISDIGIT): Define it.
25602         (isdigit): Remove definition.
25603         (is_number): Use ISDIGIT, not isdigit.
25604         <libintl.h>: Include.
25605         (_ and N_): Define.
25606         (parse_user_spec): Mark translatable strings.
25607
25608 2000-02-10  Jim Meyering  <meyering@lucent.com>
25609
25610         With these changes, nanosleep.[ch] are finally enough like the other
25611         lib/* replacement files to compile on a few more losing systems.
25612
25613         * lib/nanosleep.h: Don't include config.h.
25614         Remove prototype from declaration of nanosleep.
25615         (PARAMS): Remove now-unneeded definition.
25616         * lib/nanosleep.c: #undef nanosleep.
25617         (rpl_nanosleep): Rename from nanosleep.
25618
25619 2000-02-10  Jim Meyering  <meyering@lucent.com>
25620
25621         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25622         gnu_nanosleep to rpl_nanosleep.
25623
25624 2000-02-09  Jim Meyering  <meyering@lucent.com>
25625
25626         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25627         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25628
25629 2000-02-08  Akim Demaille  <akim@epita.fr>
25630
25631         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25632         `[' and `]' and remove uses of `changequote'.
25633         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25634         (AC_SYS_LARGEFILE): Likewise.
25635         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25636         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25637         of changequote.
25638         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25639         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25640         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25641         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25642
25643 2000-02-05  Jim Meyering  <meyering@lucent.com>
25644
25645         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25646         Remove explicit use of AC_HEADER_TIME.  It is required by
25647         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25648         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25649         in autoconf whereby the expansion of the latter ended up preceding
25650         the expansion of its prerequisite, AC_HEADER_TIME.
25651         Reported by Volker Borchert.
25652
25653 2000-02-03  Jim Meyering  <meyering@lucent.com>
25654
25655         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25656
25657 2000-02-03  Jim Meyering  <meyering@lucent.com>
25658
25659         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25660         rather than with `#if HAVE_UTMPNAME'.
25661
25662 2000-02-02  Jim Meyering  <meyering@lucent.com>
25663
25664         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25665         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25666         Reported by Eli Zaretskii.
25667
25668 2000-02-01  Jim Meyering  <meyering@lucent.com>
25669
25670         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25671
25672 2000-01-31  Jim Meyering  <meyering@lucent.com>
25673
25674         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25675         functions.  Add the time.h and sys/time.h headers along with the
25676         AC_REQUIRE'ment of AC_HEADER_TIME.
25677
25678 2000-01-31  Jim Meyering  <meyering@lucent.com>
25679
25680         * lib/nanosleep.h (nanosleep): Guard declaration with
25681         `#if ! HAVE_DECL_NANOSLEEP'.
25682         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25683         the declaration in that vendor's sys/timers.h.
25684         Reported by Christian Krackowizer.
25685
25686         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25687         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25688         (ISPRINT): Likewise.
25689         Reported by Tom Tromey.
25690
25691 2000-01-30  Jim Meyering  <meyering@lucent.com>
25692
25693         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25694
25695         * m4/prereq.m4 (utmp_includes): Define.
25696         Check for ut_user and ut_name members in both struct utmpx
25697         and struct utmp.
25698
25699 2000-01-30  Jim Meyering  <meyering@lucent.com>
25700
25701         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25702         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25703         header files where only utmpx.ut_user is declared.
25704
25705         * lib/readutmp.h (UT_USER): Define.
25706
25707 2000-01-29  Jim Meyering  <meyering@lucent.com>
25708
25709         * m4/lib-check.m4: New file containing library-related checks from
25710         fileutils and sh-utils (textutils had none).
25711
25712 2000-01-28  Jim Meyering  <meyering@lucent.com>
25713
25714         * m4/perl.m4: Change format of warning message to look more like that
25715         from the missing script.  Suggestion from François Pinard.
25716
25717 2000-01-25  Jim Meyering  <meyering@lucent.com>
25718
25719         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25720         well as time.h in the compile check.
25721         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25722         Fix typo in cross-compiling case: s/yes/no/.
25723
25724 2000-01-23  Jim Meyering  <meyering@lucent.com>
25725
25726         * m4/jm-macros.m4: Move df-related tests here from
25727         fileutils/configure.in
25728
25729         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25730         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25731
25732         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25733         s/space/ac_fsusage_space/.
25734         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25735
25736         * m4/ftruncate.m4: New file (derived from part of
25737         fileutils/configure.in).
25738         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25739         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25740
25741         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25742         AC_SUBST these here, rather than just in sh-util/configure.in, so
25743         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25744         all the same.
25745         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25746         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25747         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25748         (AC_SUBST(POW_LIBM)): Likewise.
25749         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25750
25751 2000-01-23  Jim Meyering  <meyering@lucent.com>
25752
25753         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25754         obstack.c.
25755
25756 2000-01-22  Jim Meyering  <meyering@lucent.com>
25757
25758         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25759
25760         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25761
25762         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25763         configure.in
25764         (AC_CHECK_HEADERS): Likewise for sh-utils.
25765         (AC_CHECK_HEADERS): Likewise for textutils.
25766         Merge the three lists of headers.
25767
25768         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25769         from fileutils' configure.in.
25770
25771         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25772         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25773         check-decl.m4.
25774
25775         * m4/check-decl.m4: Use #if rather than #ifdef.
25776         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25777         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25778         (_jm_DECL_HEADERS): Define new function.
25779         (jm_CHECK_DECLARATIONS): Require it.
25780
25781 2000-01-22  Jim Meyering  <meyering@lucent.com>
25782
25783         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25784         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25785         Required for some AIX systems.  Reported by Christian Krackowizer.
25786         [TESTING] (main): New function.
25787
25788         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25789         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25790         letters.
25791
25792         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25793         iswprint.
25794
25795         * lib/strverscmp.c (ISDIGIT): Define.
25796         (strverscmp): Use ISDIGIT, not isdigit.
25797
25798 2000-01-19  Jim Meyering  <meyering@lucent.com>
25799
25800         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25801         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25802         defines `struct timespec' in <sys/time.h>
25803
25804         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25805         Thanks to Akim for explaining.
25806
25807 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25808
25809         * lib/nanosleep.c (nanosleep):
25810         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25811         POSIX.1 doesn't require SA_INTERRUPT and some systems
25812         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25813         it's been part of POSIX.1 since day 1 (in 1988).
25814
25815 2000-01-17  Jim Meyering  <meyering@lucent.com>
25816
25817         * lib/interlock: Remove unused file.  Reported by François Pinard.
25818
25819 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25820
25821         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25822         alert, backslash, formfeed, and vertical tab unnecessarily in
25823         shell quoting style.
25824
25825 2000-01-16  Jim Meyering  <meyering@lucent.com>
25826
25827         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25828         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25829         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25830         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25831
25832 2000-01-16  Jim Meyering  <meyering@lucent.com>
25833
25834         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25835         because the latter didn't work.
25836
25837 2000-01-15  Jim Meyering  <meyering@lucent.com>
25838
25839         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25840         (AC_REPLACE_FUNCS): Add memcpy and memset.
25841         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25842         Add strpbrk.
25843         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25844
25845 2000-01-12  Jim Meyering  <meyering@lucent.com>
25846
25847         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25848         (jm_PREREQ): Use it.
25849         (jm_PREREQ_READUTMP): New macro.
25850         (jm_PREREQ): Use it.
25851
25852 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25853
25854         Quote multibyte characters correctly.
25855         * m4/c-bs-a.m4: New file.
25856         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25857         (jm_PREREQ): Use it.
25858
25859 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25860
25861         * m4/uintmax_t.m4: Port to autoconf 2.13.
25862
25863 2000-01-08  Jim Meyering  <meyering@ascend.com>
25864
25865         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25866         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25867
25868 2000-01-04  Jim Meyering  <meyering@ascend.com>
25869
25870         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25871         jm_STRUCT_DIRENT_D_TYPE.
25872         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25873         jm_STRUCT_DIRENT_D_INO.
25874         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25875         jm_STRUCT_UTIMBUF.
25876         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25877         renamings.
25878         * m4/utime.m4: Likewise.
25879
25880         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25881         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25882
25883 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25884
25885         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25886         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25887
25888 2000-01-02  Jim Meyering  <meyering@ascend.com>
25889
25890         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25891         remember if this is necessary.
25892
25893 1999-12-26  Jim Meyering  <meyering@ascend.com>
25894
25895         * m4/jm-macros.m4: Use it here.
25896         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25897
25898 1999-12-23  Jim Meyering  <meyering@ascend.com>
25899
25900         * m4/jm-macros.m4: Check for clock_gettime (moved from
25901         fileutils/configure.in)
25902         Check for gettimeofday.
25903
25904 1999-12-20  Jim Meyering  <meyering@ascend.com>
25905
25906         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25907         autoconf-2.14a-1999-12-20.
25908
25909 1999-12-19  Jim Meyering  <meyering@ascend.com>
25910
25911         * m4/lstat-slash.m4: New file.
25912         * m4/jm-macros.m4: Use the new macro:
25913         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25914
25915 1999-12-07  Jim Meyering  <meyering@ascend.com>
25916
25917         * m4/perl.m4: Require that File::Compare be available, too.
25918         Too many systems seem to lack it.
25919
25920         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25921         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25922
25923 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25924
25925         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25926         problem with the QNX 4.25 shell, which doesn't propagate exit
25927         status of failed commands inside shell assignments.
25928
25929 1999-11-17  Jim Meyering  <meyering@ascend.com>
25930
25931         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25932
25933 1999-11-07  Jim Meyering  <meyering@ascend.com>
25934
25935         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25936
25937 1999-11-06  Jim Meyering  <meyering@ascend.com>
25938
25939         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25940         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25941
25942 1999-11-05  Jim Meyering  <meyering@ascend.com>
25943
25944         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25945         configure.in of textutils, fileutils, and sh-utils into this one
25946         (shared between those packages) file.
25947         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
25948         AC_STRUCT_ST_BLKSIZE.
25949
25950 1999-11-03  Jim Meyering  <meyering@ascend.com>
25951
25952         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
25953         of AC_CHECK_TYPE checks includes unistd.h.
25954         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
25955         Suggestion from Akim Demaille.
25956
25957 1999-10-30  Jim Meyering  <meyering@ascend.com>
25958
25959         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
25960         m4-quoted string.
25961         * m4/ls-mntd-fs.m4: Likewise.
25962         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
25963         * m4/jm-winsz1.m4: Likewise.
25964
25965         * m4/const.m4: Remove file, since the fix made it into the experimental
25966         version of autoconf.
25967         * m4/mktime.m4: Likewise.
25968
25969         * m4/check-type.m4: Remove file, now that the latest version of
25970         AC_CHECK_TYPE takes a third arg to specify additional #includes.
25971
25972         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
25973         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
25974         AC_CHECK_TYPE.
25975
25976 1999-10-04  Jim Meyering  <meyering@ascend.com>
25977
25978         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
25979
25980 1999-09-22  Paul Eggert  <eggert@twinsun.com>
25981
25982         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
25983         2.95.1 bug with HP-UX 10.20.
25984
25985 1999-09-17  Jim Meyering  <meyering@ascend.com>
25986
25987         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
25988         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
25989         due to missing strdup (against sh-utils-2.0).
25990
25991 1999-08-29  Jim Meyering  <meyering@ascend.com>
25992
25993         * m4/jm-macros.m4: Require jm_BISON.
25994         * m4/bison.m4: New file.
25995
25996 1999-08-17  Paul Eggert  <eggert@twinsun.com>
25997
25998         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
25999         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
26000
26001 1999-08-05  Jim Meyering  <meyering@ascend.com>
26002
26003         * m4/getline.m4: Rename test file from conftestdata to conftest.data
26004         to avoid conflicts with `conftest' on 8+3 filesystems.
26005         Suggestion from Eli Zaretskii.
26006
26007 1999-08-04  Jim Meyering  <meyering@ascend.com>
26008
26009         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
26010         fileutils and sh-utils (textutils's getline test was inadequate).
26011         (AM_FUNC_GETLINE): Run this test.
26012         (AC_CHECK_FUNCS): Check for getdelim.
26013         Reported by Bob Proulx.
26014
26015 1999-08-02  Jim Meyering  <meyering@ascend.com>
26016
26017         * m4/jm-macros.m4: Add a comment.
26018
26019 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26020
26021         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
26022         <inttypes.h> defines strtoumax as a macro (and not as a
26023         function).
26024
26025 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26026
26027         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
26028         that we can shift, multiply and divide unsigned long long
26029         values; Ultrix cc can't do it.
26030
26031 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26032
26033         * m4/mktime.m4: New file, which is a preview of what should appear
26034         in the next public autoconf release.
26035
26036 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26037
26038         * m4/lfs.m4: Remove this file.
26039         * m4/largefile.m4: New file.  It contains the old contents of
26040         lfs.m4, except that all names with prefix AC_LFS have been
26041         changed to use the prefix AC_SYS_LARGEFILE instead, to be
26042         compatible with future autoconf versions.  Also, some minor m4
26043         quoting problems have been fixed.
26044
26045 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26046
26047         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
26048         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
26049         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
26050         and simplify the shell code.
26051
26052 1999-08-01  Jim Meyering  <meyering@ascend.com>
26053
26054         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
26055         m4.
26056
26057 1999-07-20  Jim Meyering  <meyering@ascend.com>
26058
26059         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
26060
26061 1999-07-15  Jim Meyering  <meyering@ascend.com>
26062
26063         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
26064
26065 1999-05-22  Jim Meyering  <meyering@ascend.com>
26066
26067         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
26068
26069 1999-05-20  Jim Meyering  <meyering@ascend.com>
26070
26071         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
26072         Add a colon after each `then' in case $4 is empty.
26073
26074 1999-05-16  Jim Meyering  <meyering@ascend.com>
26075
26076         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
26077
26078 1999-05-10  Jim Meyering  <meyering@ascend.com>
26079
26080         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
26081
26082         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
26083         AC_FUNC_MKTIME.
26084
26085 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
26086
26087         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
26088
26089 1999-05-04  Paul Eggert  <eggert@twinsun.com>
26090
26091         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
26092         not CPPFLAGS, so that linking works correctly in IRIX.
26093
26094 1999-04-30  Paul Eggert  <eggert@twinsun.com>
26095
26096         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
26097
26098 1999-04-20  Paul Eggert  <eggert@twinsun.com>
26099
26100         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
26101         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
26102         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
26103         jm_AC_TYPE_UNSIGNED_LONG_LONG.
26104         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
26105
26106         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
26107
26108 1999-04-20  Jim Meyering  <meyering@ascend.com>
26109
26110         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
26111         AC_REPLACE xstroull if necessary.  From Paul Eggert.
26112         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
26113
26114 1999-04-18  Jim Meyering  <meyering@ascend.com>
26115
26116         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
26117         * m4/jm-macros.m4: Use it.
26118
26119 1999-04-06  Jim Meyering  <meyering@ascend.com>
26120
26121         * m4/strftime.m4: Remove test for %f.
26122
26123 1999-03-29  Jim Meyering  <meyering@ascend.com>
26124
26125         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
26126         superset of the AC_TYPE_* checks in the textutils, fileutils,
26127         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
26128         AC_TYPE_PID_T.
26129
26130 1999-03-28  Jim Meyering  <meyering@ascend.com>
26131
26132         * m4/jm-macros.m4: Define GNU_PACKAGE here.
26133         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
26134         replaced e.g., in the *.sh files of the sh-utils.
26135
26136 1999-03-20  Jim Meyering  <meyering@ascend.com>
26137
26138         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
26139         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
26140         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
26141
26142 1999-03-19  Jim Meyering  <meyering@ascend.com>
26143
26144         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
26145
26146 1999-03-12  Jim Meyering  <meyering@ascend.com>
26147
26148         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
26149
26150 1999-03-07  Jim Meyering  <meyering@ascend.com>
26151
26152         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
26153         declared.
26154
26155 1999-02-17  Jim Meyering  <meyering@ascend.com>
26156
26157         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
26158         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
26159
26160 1999-02-07  Jim Meyering  <meyering@ascend.com>
26161
26162         * m4/group-member.m4: New file -- extracted from sh-utils'
26163         configure.in.
26164
26165         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
26166         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
26167
26168 1999-02-06  Jim Meyering  <meyering@ascend.com>
26169
26170         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26171         * m4/fnmatch.m4: Likewise.
26172         * m4/getgroups.m4: Likewise.
26173         * m4/lstat.m4: Likewise.
26174         * m4/malloc.m4: Likewise.
26175         * m4/putenv.m4: Likewise.
26176         * m4/realloc.m4: Likewise.
26177         * m4/regex.m4: Likewise.
26178         * m4/stat.m4: Likewise.
26179         * m4/strftime.m4: Likewise.
26180         Suggestion from Alain Magloire.
26181
26182         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26183         * m4/fnmatch.m4: Likewise.
26184         * m4/getgroups.m4: Likewise.
26185         * m4/getline.m4: Likewise.
26186         * m4/lstat.m4: Likewise.
26187         * m4/malloc.m4: Likewise.
26188         * m4/memcmp.m4: Likewise.
26189         * m4/putenv.m4: Likewise.
26190         * m4/realloc.m4: Likewise.
26191         * m4/regex.m4: Likewise.
26192         * m4/stat.m4: Likewise.
26193         * m4/strftime.m4: Likewise.
26194         Suggestion from Alain Magloire.
26195
26196         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26197         an argument.
26198
26199         * m4/regex.m4: Add a run-time Test for proper operation of
26200         re_compile_pattern.
26201
26202 1999-01-31  Jim Meyering  <meyering@ascend.com>
26203
26204         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26205
26206 1999-01-30  Jim Meyering  <meyering@ascend.com>
26207
26208         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26209
26210         * m4/jm-mktime.m4: Make this a wrapper around the official
26211         AM_FUNC_MKTIME rather than my private copy, now that the official one
26212         is up to date.
26213         * m4/mktime.m4: Remove file.
26214
26215         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26216         * m4/uptime.m4: Likewise.
26217         * m4/uintmax_t.m4: Likewise.
26218
26219 1999-01-28  Jim Meyering  <meyering@ascend.com>
26220
26221         * m4/jm-macros.m4: Use jm_AFS.
26222         * m4/afs.m4: New file (from fileutils' configure.in).
26223
26224         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26225         * m4/chown.m4: Likewise.
26226         * m4/d-ino.m4: Likewise.
26227         * m4/d-type.m4: Likewise.
26228         * m4/fnmatch.m4: Likewise.
26229         * m4/getgroups.m4: Likewise.
26230         * m4/gettext.m4: Likewise.
26231         * m4/jm-mktime.m4: Likewise.
26232         * m4/jm-winsz2.m4: Likewise.
26233         * m4/lcmessage.m4: Likewise.
26234         * m4/ls-mntd-fs.m4: Likewise.
26235         * m4/malloc.m4: Likewise.
26236         * m4/memcmp.m4: Likewise.
26237         * m4/putenv.m4: Likewise.
26238         * m4/realloc.m4: Likewise.
26239         * m4/st_mtim.m4: Likewise.
26240         * m4/strftime.m4: Likewise.
26241
26242 1999-01-16  Jim Meyering  <meyering@ascend.com>
26243
26244         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26245         (ARGMATCH_DIE_DECL): Define.
26246
26247 1999-01-12  Jim Meyering  <meyering@ascend.com>
26248
26249         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26250         Reported by Lars Hecking.
26251
26252 1999-01-10  Jim Meyering  <meyering@ascend.com>
26253
26254         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26255         gross kludge.
26256         * m4/inttypes_h.m4: Likewise.
26257         * m4/lstat.m4: Likewise.
26258         * m4/malloc.m4: Likewise.
26259         * m4/readdir.m4: Likewise.
26260         * m4/realloc.m4: Likewise.
26261         * m4/st_dm_mode.m4: Likewise.
26262         * m4/stat.m4: Likewise.
26263         * m4/utimbuf.m4: Likewise.
26264         * m4/utimes.m4: Likewise.
26265
26266         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26267         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26268         comments in config.h.in are meaningful.
26269
26270         * m4/jm-macros.m4: Require autoconf-2.13 here.
26271
26272         * m4/regex.m4: By default, don't use the included regex.c on systems
26273         with glibc 2.  Suggestion from Uli Drepper.
26274
26275 1999-01-02  Jim Meyering  <meyering@ascend.com>
26276
26277         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26278
26279 1998-12-18  Jim Meyering  <meyering@ascend.com>
26280
26281         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26282         Based on a suggestion from Lars Hecking.
26283
26284 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26285
26286         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26287
26288 1998-11-16  Jim Meyering  <meyering@ascend.com>
26289
26290         * m4/lfs.m4: Double-quote the `uname...` expression.
26291
26292 1998-11-14  Jim Meyering  <meyering@ascend.com>
26293
26294         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26295         * m4/stat.m4: Likewise.
26296
26297 1998-11-03  Jim Meyering  <meyering@ascend.com>
26298
26299         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26300         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26301
26302 1998-10-18  Jim Meyering  <meyering@ascend.com>
26303
26304         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26305
26306 1998-10-17  Jim Meyering  <meyering@ascend.com>
26307
26308         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26309         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26310         calls for those previously hard-coded headers.  Instead, take a new
26311         parameter.
26312         (jm_CHECK_DECLARATIONS): Reflect interface change.
26313         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26314         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26315
26316         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26317
26318 1998-10-14  Jim Meyering  <meyering@ascend.com>
26319
26320         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26321         instead of "TZ=America/Vancouver".  From Paul Eggert.
26322
26323 1998-10-11  Jim Meyering  <meyering@ascend.com>
26324
26325         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26326         This adds a test for a recently added compatibility fix for mktime.c.
26327         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26328
26329 1998-09-27  Jim Meyering  <meyering@ascend.com>
26330
26331         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26332
26333         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26334         ../configure.in, including a change from Gordon Matzigkeit to allow
26335         cross-compiling for the Hurd.
26336
26337         * m4/glibc.m4: New file/macro to test for the GNU C Library
26338         versions 1 and 2.  From Gordon Matzigkeit.
26339         Indent.
26340
26341 1998-09-21  Jim Meyering  <meyering@ascend.com>
26342
26343         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26344
26345 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26346
26347         Port nanosecond-resolution times to UnixWare 2.1.2 and
26348         pedantic Solaris 2.6.
26349
26350         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26351         AC_STRUCT_ST_MTIM.
26352         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26353         Generate name of ns member, instead of just 1 or undef.
26354         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26355
26356 1998-08-15  Jim Meyering  <meyering@ascend.com>
26357
26358         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26359         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26360         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26361         instead of jm_TYPE_SSIZE_T.
26362
26363 1998-08-12  Jim Meyering  <meyering@ascend.com>
26364
26365         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26366
26367 1998-08-02  Jim Meyering  <meyering@ascend.com>
26368
26369         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26370         in acconfig.h manually.
26371
26372 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26373
26374         * m4/st_mtim.m4: New file.
26375
26376 1998-07-28  Jim Meyering  <meyering@ascend.com>
26377
26378         * m4/utimes.m4: Undef stat.
26379
26380 1998-07-25  Jim Meyering  <meyering@ascend.com>
26381
26382         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26383         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26384
26385 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26386
26387         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26388         uid and gid actually remain unchanged.
26389
26390 1998-07-07  Jim Meyering  <meyering@ascend.com>
26391
26392         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26393
26394 1998-07-04  Jim Meyering  <meyering@ascend.com>
26395
26396         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26397         to prove that this macro can be used in packages without regex.c.
26398
26399 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26400
26401         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26402         is to be used.
26403
26404 1998-07-03  Jim Meyering  <meyering@ascend.com>
26405
26406         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26407
26408         * m4/gettext.m4: New file -- from gettext-0.10.35.
26409         * m4/lcmessage.m4: Likewise.
26410         * m4/progtest.m4: Likewise.
26411
26412         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26413         * m4/jm-macros.m4: Require the new macro.
26414
26415 1998-06-29  Jim Meyering  <meyering@ascend.com>
26416
26417         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26418         for the definition of NGROUPS (used in a system header included
26419         by sys/mount.h).
26420
26421 1998-06-28  Jim Meyering  <meyering@ascend.com>
26422
26423         * m4/ls-mntd-fs.m4: New file.
26424         * m4/fstypename.m4: New file.
26425
26426         * m4/jm-macros.m4: Require the new macro.
26427         * m4/jm-glibc-io.m4: New file.
26428
26429 1998-05-19  Jim Meyering  <meyering@ascend.com>
26430
26431         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26432         * m4/lchown.m4: New file.
26433
26434         * m4/Makefile.am.in: New file.
26435         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26436
26437 1998-05-14  Jim Meyering  <meyering@ascend.com>
26438
26439         * m4/Makefile.am (EXTRA_DIST): Add them.
26440         * m4/jm-macros.m4: New file.
26441         * m4/utimbuf.m4: New file.
26442
26443 1998-05-12  Jim Meyering  <meyering@ascend.com>
26444
26445         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26446
26447 1998-05-11  Jim Meyering  <meyering@ascend.com>
26448
26449         * m4/isc-posix.m4: New file.
26450
26451 1998-05-10  Jim Meyering  <meyering@ascend.com>
26452
26453         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26454
26455 1998-05-09  Jim Meyering  <meyering@ascend.com>
26456
26457         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26458         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26459         with automake.
26460
26461         * m4/ssize_t.m4: New file.
26462         * m4/mktime.m4: Remove file -- the new automake has this now.
26463
26464 1998-04-26  Jim Meyering  <meyering@ascend.com>
26465
26466         * m4/assert.m4: New file.
26467         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26468
26469 1998-04-05  Jim Meyering  <meyering@ascend.com>
26470
26471         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26472         (jm_PREREQ): Use it here.
26473
26474 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26475
26476         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26477         in acconfig.h.
26478
26479 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26480
26481         * m4/prereq.m4: New file.
26482         * m4/error.m4: New file.
26483         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26484
26485 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26486
26487         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26488         cache-check for the same variable -- that defeated the purpose of
26489         the test; the test program was never run.  This was a problem only
26490         on systems with losing getline functions -- HP-UX 10.20 is one.
26491         Reported by Bjorn Helgaas.
26492
26493 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26494
26495         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26496
26497 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26498
26499         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26500
26501         * m4/const.m4: New file.  Use an initializer in this declaration
26502         typedef int charset[2]; const charset x;
26503         Reported by Bob Glickstein.
26504
26505 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26506
26507         * m4/chown.m4: Fix reversed types on -1 args to chown.
26508         From Kaveh Ghazi.
26509
26510 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26511
26512         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26513         Add lseek and memchr.
26514
26515         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26516         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26517         have a 20-character limit on names.
26518
26519 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26520
26521         * m4/inttypes_h.m4: New file.
26522         * m4/uintmax_t.m4: New file.
26523         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26524
26525 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26526   Free Software Foundation, Inc.
26527 Copying and distribution of this file, with or without modification,
26528 are permitted provided the copyright notice and this notice are preserved.