Ensure O(n) worst-case complexity.
[pspp] / ChangeLog
1 2007-02-11  Bruno Haible  <bruno@clisp.org>
2
3         Ensure O(n) worst-case complexity of c_strstr.
4         * lib/c-strstr.c: Include stdbool.h, string.h.
5         (knuth_morris_pratt): New function.
6         (c_strstr): Add some bookkeeping. Invoke knuth_morris_pratt when the
7         bookkeeping indicates that it's worth it.
8         * modules/c-strstr (Depends-on): Add stdbool, strnlen.
9
10         * lib/c-strstr.c: Complete rewrite for maintainability.
11
12         * modules/c-strstr-tests: New file.
13         * tests/test-c-strstr.c: New file.
14
15 2007-02-11  Bruno Haible  <bruno@clisp.org>
16
17         * m4/javacomp.m4 (gt_JAVACOMP): Work around a 'tr' bug in coreutils.
18         Reported by Joel E. Denny <jdenny@ces.clemson.edu>,
19
20 2007-02-08  Bruno Haible  <bruno@clisp.org>
21
22         * modules/regex (Depends-on): Add stdbool.
23         Reported by Dalibor Topic <robilad@kaffe.org>.
24
25 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
26
27         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
28         Prefer returning from main to exiting from it.
29         Remove unnecessary parens after sizeof.
30
31 2007-02-05  Bruno Haible  <bruno@clisp.org>
32
33         New module mbssep.
34         * modules/mbssep: New file.
35         * lib/mbssep.c: New file.
36         * lib/string_.h (strsep): Add a conditional link warning.
37         (mbssep): New declaration.
38         * m4/mbssep.m4: New file.
39         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
40         GNULIB_MBSSEP.
41         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
42         * MODULES.html.sh (Internationalization functions): Add mbssep.
43
44 2007-02-05  Bruno Haible  <bruno@clisp.org>
45
46         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
47         Optimize search in case of 1 delimiter.
48
49 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
50
51         * lib/acl.h: Include sys/types.h before sys/acl.h.
52
53 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
54
55         Merge upstream fix for glibc bugzilla #3957:
56
57         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
58
59         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
60         bit for RE_HAT_LISTS_NOT_NEWLINE.
61         (build_charclass_op): Remove bogus comment.
62
63 2007-02-05  Simon Josefsson  <simon@josefsson.org>
64
65         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
66
67 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
68
69         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
70         * lib/memmem.c [!defined _LIBC]: Include config.h.
71
72 2007-02-04  Bruno Haible  <bruno@clisp.org>
73
74         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
75         warning message.
76
77 2007-02-04  Bruno Haible  <bruno@clisp.org>
78
79         New module mbstok_r.
80         * modules/mbstok_r: New file.
81         * lib/mbstok_r.c: New file.
82         * lib/string_.h (strtok_r): Change argument names to match the
83         comments. Add a conditional link warning.
84         (mbstok_r): New declaration.
85         * m4/mbstok_r.m4: New file.
86         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
87         GNULIB_MBSTOK_R.
88         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
89         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
90
91 2007-02-04  Bruno Haible  <bruno@clisp.org>
92
93         New module mbsspn.
94         * modules/mbsspn: New file.
95         * lib/mbsspn.c: New file.
96         * lib/string_.h (strspn): Add a conditional link warning.
97         (mbsspn): New declaration.
98         * m4/mbsspn.m4: New file.
99         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
100         GNULIB_MBSSPN.
101         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
102         * MODULES.html.sh (Internationalization functions): Add mbsspn.
103
104 2007-02-04  Bruno Haible  <bruno@clisp.org>
105
106         New module mbspbrk.
107         * modules/mbspbrk: New file.
108         * lib/mbspbrk.c: New file.
109         * lib/string_.h (strpbrk): Add a conditional link warning.
110         (mbspbrk): New declaration.
111         * m4/mbspbrk.m4: New file.
112         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
113         GNULIB_MBSPBRK.
114         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
115         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
116
117 2007-02-04  Bruno Haible  <bruno@clisp.org>
118
119         New module mbscspn.
120         * modules/mbscspn: New file.
121         * lib/mbscspn.c: New file.
122         * lib/string_.h (strcspn): Add a conditional link warning.
123         (mbscspn): New declaration.
124         * m4/mbscspn.m4: New file.
125         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
126         GNULIB_MBSCSPN.
127         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
128         * MODULES.html.sh (Internationalization functions): Add mbscspn.
129
130 2007-02-04  Bruno Haible  <bruno@clisp.org>
131
132         New module mbscasestr, reduced goal of strcasestr.
133         * modules/mbscasestr: New file.
134         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
135         (mbscasestr): Renamed from strcasestr.
136         * lib/strcasestr.c: Don't include mbuiter.h.
137         (strcasestr): Remove support for multibyte locales.
138         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
139         Change the conditional link warning.
140         (mbscasestr): New declaration.
141         * m4/mbscasestr.m4: New file.
142         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
143         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
144         REPLACE_STRCASESTR.
145         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
146         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
147         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
148         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
149         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
150         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
151         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
152         (Depends-on): Remove mbuiter.
153         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
154
155 2007-02-04  Bruno Haible  <bruno@clisp.org>
156
157         Simplify handling of strncasecmp.
158         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
159         the conditional link warning.
160         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
161         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
162         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
163         * modules/strcase (configure.ac): Don't invoke
164         gl_STRING_MODULE_INDICATOR.
165         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
166
167 2007-02-04  Bruno Haible  <bruno@clisp.org>
168
169         New module mbscasecmp, reduced goal of strcasecmp.
170         * modules/mbscasecmp: New file.
171         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
172         (mbscasecmp): Renamed from strcasecmp.
173         * lib/strcasecmp.c: Don't include mbuiter.h.
174         (strcasecmp): Remove support for multibyte locales.
175         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
176         Change the conditional link warning.
177         (mbscasecmp): New declaration.
178         * m4/mbscasecmp.m4: New file.
179         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
180         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
181         REPLACE_STRCASECMP.
182         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
183         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
184         GNULIB_MBSCASECMP.
185         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
186         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
187         * modules/strcase (Files): Remove m4/mbrtowc.m4.
188         (Depends-on): Remove mbuiter.
189         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
190
191 2007-02-04  Bruno Haible  <bruno@clisp.org>
192
193         New module mbsstr. Remove module strstr.
194         * modules/mbsstr: New file.
195         * modules/strstr: Remove file.
196         * lib/mbsstr.c: Renamed from lib/strstr.c.
197         (mbsstr): Renamed from strstr.
198         * lib/string_.h (strstr): Remove declaration. Change the conditional
199         link warning.
200         (mbsstr): New declaration.
201         * m4/mbsstr.m4: New file.
202         * m4/strstr.m4: Remove file.
203         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
204         REPLACE_STRSTR.
205         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
206         Don't initialize GNULIB_STRSTR.
207         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
208         substitute GNULIB_STRSTR and REPLACE_STRSTR.
209         * MODULES.html.sh (Internationalization functions): Add mbsstr.
210         (Support for systems lacking ANSI C 89): Remove strstr.
211
212 2007-02-04  Bruno Haible  <bruno@clisp.org>
213
214         New module mbsrchr.
215         * modules/mbsrchr: New file.
216         * lib/mbsrchr.c: New file.
217         * lib/string_.h (strrchr): Add a conditional link warning.
218         (mbsrchr): New declaration.
219         * m4/mbsrchr.m4: New file.
220         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
221         GNULIB_MBSRCHR.
222         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
223         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
224
225 2007-02-04  Bruno Haible  <bruno@clisp.org>
226
227         New module mbschr.
228         * modules/mbschr: New file.
229         * lib/mbschr.c: New file.
230         * lib/string_.h (strchr): Add a conditional link warning.
231         (mbschr): New declaration.
232         * m4/mbschr.m4: New file.
233         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
234         GNULIB_MBSCHR.
235         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
236         * MODULES.html.sh (Internationalization functions): Add mbschr.
237
238 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
239
240         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
241
242         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
243
244 2007-02-04  Bruno Haible  <bruno@clisp.org>
245
246         New module description section 'configure.ac-early'.
247         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
248         (func_get_autoconf_early_snippet): New function.
249         (func_import, func_create_testdir): Use it. Remove special cases for
250         modules 'extensions' and 'lock'.
251         * modules/extensions (configure.ac-early): Require
252         gl_USE_SYSTEM_EXTENSIONS.
253         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
254
255 2007-02-04  Bruno Haible  <bruno@clisp.org>
256
257         Make use of gcj-4.3's -fsource and -ftarget option.
258         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
259         and if so try the options -fsource and -ftarget.
260         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
261         source_version, ftarget_option, target_version arguments.
262         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
263         (is_envjavac_oldgcj_14_14_usable): Renamed from
264         is_envjavac_gcj_14_14_usable.
265         (is_envjavac_oldgcj_14_13_usable): Renamed from
266         is_envjavac_gcj_14_13_usable.
267         (is_gcj_present): Update.
268         (is_gcj_43, is_gcj43_usable): New functions.
269         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
270         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
271         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
272         try the options -fsource and -ftarget.
273
274 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
275
276         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
277         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
278         larger value.
279
280 2007-02-03  Jim Meyering  <jim@meyering.net>
281
282         Give tools a better chance to allocate space for very large buffers.
283         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
284
285         Make pwd and readlink work also when run with an unreadable parent dir
286         on systems with openat support.
287         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
288         provided getcwd function, even when we have openat support.
289         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
290
291 2007-02-02  Bruno Haible  <bruno@clisp.org>
292
293         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
294         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
295         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
296         portability problems if one of these functions is only used on specific
297         platforms.
298         Reported by Paul Eggert.
299
300 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
301
302         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
303         is causing more trouble than it's curing.
304         * lib/regex_internal.h (__mempcpy): Remove.
305         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
306         (and make the code a tad smaller to boot).
307         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
308
309 2007-02-02  Jim Meyering  <jim@meyering.net>
310
311         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
312         section, not in the Makefile.am: one.
313
314 2007-02-02  Eric Blake  <ebb9@byu.net>
315
316         * lib/strchrnul.c: Always include config.h first.
317
318         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
319         gnulib strstr is not necessary here.
320
321 2007-02-02  Simon Josefsson  <simon@josefsson.org>
322
323         * m4/socklen.m4: Fix typo.
324
325 2007-02-02  Eric Blake  <ebb9@byu.net>
326
327         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
328         * modules/netinet_in (Makefile.am): Likewise.
329
330 2007-02-01  Bruno Haible  <bruno@clisp.org>
331
332         * lib/string_.h (GL_LINK_WARNING): New macro.
333         (strcasecmp, strstr, strcasestr): If provided by the system,
334         conditionally define as a macro that leads to a warning instead of to
335         an error.
336         (strncasecmp): Conditionally define as a macro that leads to a warning.
337
338 2007-02-01  Jim Meyering  <jim@meyering.net>
339
340         Give tools a better chance to allocate space for very large buffers.
341         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
342
343 2007-02-01  Karl Berry  <karl@gnu.org>
344
345         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
346
347 2007-02-01  Bruno Haible  <bruno@clisp.org>
348
349         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
350         renamings.
351
352 2007-02-01  Eric Blake  <ebb9@byu.net>
353
354         * modules/regex (Depends-on): Revert dependence on mempcpy.
355         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
356         module's definition of mempcpy.
357         Reported by Paul Eggert.
358
359 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
360
361         * lib/string_.h: If the gnulib module XYZ is not present, undefine
362         the symbol XYZ before redefining it.  This fixes a problem with
363         programs that don't use XYZ, when compiled on systems that define
364         XYZ to something else.
365
366 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
367
368         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
369         occurs when "mkdir -m foo" creates a setgid directory that is (1)
370         writeable to group or other and (2) is intended to have a special
371         mode bit that is set or cleared.  In such a case, the directory
372         should be neither group- nor other-writeable until the special
373         mode bits are right.
374
375 2007-01-31  Eric Blake  <ebb9@byu.net>
376
377         * modules/mountlist (Depends-on): Add strstr.
378
379         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
380         bug.
381         * modules/string (Makefile.am): Remove redundant replacement.
382         * modules/regex (Depends-on): Add mempcpy.
383
384 2007-01-31  Bruno Haible  <bruno@clisp.org>
385
386         New module description field 'Link'.
387         * gnulib-tool (func_usage): Document --extract-link-directive.
388         (sed_extract_prog): Recognize 'Link' directive.
389         (func_get_link_directive): New function.
390         (func_import): Show summary of link directives.
391         Handle --extract-link-directive option.
392         * modules/acl (Link): New section.
393         * modules/clock-time (Link): New section.
394         * modules/euidaccess (Link): New section.
395         * modules/gettext (Link): New section.
396         * modules/iconv (Link): New section.
397         * modules/lock (Link): New section.
398         * modules/nanosleep (Link): New section.
399         * modules/readline (Link): New section.
400
401 2007-01-27  Bruno Haible  <bruno@clisp.org>
402
403         Enforce the use of gnulib modules for unportable <string.h> functions.
404         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
405         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
406         (gl_HEADER_STRING_H_BODY): Require it.
407         * lib/string_.h: If the gnulib module XYZ is not present, redefine
408         the symbol XYZ to one that gives a link error.
409         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
410         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
411         * modules/mempcpy (configure.ac): Likewise.
412         * modules/memrchr (configure.ac): Likewise.
413         * modules/stpcpy (configure.ac): Likewise.
414         * modules/stpncpy (configure.ac): Likewise.
415         * modules/strcase (configure.ac): Likewise.
416         * modules/strcasestr (configure.ac): Likewise.
417         * modules/strchrnul (configure.ac): Likewise.
418         * modules/strdup (configure.ac): Likewise.
419         * modules/strndup (configure.ac): Likewise.
420         * modules/strnlen (configure.ac): Likewise.
421         * modules/strpbrk (configure.ac): Likewise.
422         * modules/strsep (configure.ac): Likewise.
423         * modules/strstr (configure.ac): Likewise.
424         * modules/strtok_r (configure.ac): Likewise.
425
426 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
427
428         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
429
430 2007-01-30  Jim Meyering  <jim@meyering.net>
431
432         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
433
434 2007-01-29  Bruno Haible  <bruno@clisp.org>
435
436         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
437         * lib/execute.c: Likewise.
438         * lib/pipe.c: Likewise.
439         * lib/printf-args.h: Likewise.
440         * lib/printf-args.c: Likewise.
441         * lib/printf-parse.c: Likewise.
442         * lib/vasnprintf.c: Likewise.
443
444 2007-01-29  Eric Blake  <ebb9@byu.net>
445
446         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
447         declaration.
448
449 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
450
451         * lib/strptime.h (strptime): Use 'restrict' for args where
452         POSIX requires this.
453         * lib/strptime.c (strptime): Likewise.
454         Change license notice from LGPL to GPL, since gnulib-tool will
455         change this as needed.
456         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
457         defined.
458         Include "strptime.h" first, to check interface.
459         Do not #undef _LIBC and _NL_CURRENT.
460         Do not include <stdlib.h>; no longer needed.
461         Include "time_r.h" and declare ptime_locale_status
462         only if _LIBC is not defined.
463         (__P): Remove unused macro.
464         (match_string): Bring back glibc version, but use it only if _LIBC
465         is defined.
466         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
467         Remove unnecessary assertion and abort() call.
468         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
469         * m4/strptime.m4: Fix serial number comment.
470         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
471         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
472         (Depends-on): Add time_r.
473
474 2007-01-29  Bruno Haible  <bruno@clisp.org>
475
476         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
477         strptime.
478         * modules/strptime (Depends-on): Add stdbool.
479         * lib/strptime.h: Include <time.h> always. Add comments.
480
481 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
482
483         * modules/strptime: New file.
484         * lib/strptime.h: New file.
485         * lib/strptime.c: New file.
486         * m4/strptime.m4: New file.
487
488 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
489
490         * MODULES.html.sh: New module mpsort.
491         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
492
493         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
494         a circularity problem with HP-UX ia64 reported by Bob Proulx in
495         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
496         All uses changed.
497         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
498         All uses changed.
499         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
500         to _Restrict_.
501         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
502         the parameter matches the prototype.
503
504 2007-01-28  Jim Meyering  <jim@meyering.net>
505
506         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
507         sys/time.h here, reverting that part of the previous patch:
508         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
509
510 2007-01-28  Bruno Haible  <bruno@clisp.org>
511
512         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
513         value of $(SYS_TIME_H).
514         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
515         remove it conditionally, too. [added by Jim Meyering]
516         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
517         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
518         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
519         GETTIMEOFDAY_REPLACEMENT to 1.
520
521 2007-01-28  Bruno Haible  <bruno@clisp.org>
522
523         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
524         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
525         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
526         Set UNISTD_H instead of UNISTD_H2.
527         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
528
529 2007-01-28  Bruno Haible  <bruno@clisp.org>
530
531         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
532         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
533
534 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
535
536         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
537         (func_create_testdir): Ensure C locale for `grep' and `tr'
538         character ranges.
539         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
540         ACLOCAL_AMFLAGS parsing state machine.
541
542 2007-01-27  Bruno Haible  <bruno@clisp.org>
543
544         * modules/unistr/base: Update.
545
546 2007-01-27  Bruno Haible  <bruno@clisp.org>
547
548         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
549         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
550         * modules/unistr/u32-mbtouc-unsafe: Renamed from
551         modules/unistr/u32-mbtouc.
552         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
553         * lib/unistr.h: Update.
554         * lib/linebreak.c: Update.
555         * modules/unistr/u32-mbtouc: Renamed from
556         modules/unistr/u32-mbtouc-safe.
557         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
558         * lib/unistr.h: Update.
559         * lib/unistr/u32-to-u8.c: Update.
560         * lib/unistr/u32-to-u16.c: Update.
561
562 2007-01-27  Bruno Haible  <bruno@clisp.org>
563
564         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
565         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
566         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
567         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
568         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
569         * modules/unistr/u16-mbtouc-unsafe: Renamed from
570         modules/unistr/u16-mbtouc.
571         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
572         * lib/unistr.h: Update.
573         * lib/linebreak.c: Update.
574         * modules/linebreak: Update.
575         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
576         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
577         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
578         * modules/unistr/u16-mbtouc: Renamed from
579         modules/unistr/u16-mbtouc-safe.
580         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
581         * lib/unistr.h: Update.
582         * lib/unistr/u16-to-u8.c: Update.
583         * modules/unistr/u16-to-u8: Update.
584         * lib/unistr/u16-to-u32.c: Update.
585         * modules/unistr/u16-to-u32: Update.
586
587 2007-01-27  Bruno Haible  <bruno@clisp.org>
588
589         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
590         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
591         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
592         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
593         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
594         * modules/unistr/u8-mbtouc-unsafe: Renamed from
595         modules/unistr/u8-mbtouc.
596         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
597         * lib/unistr.h: Update.
598         * lib/striconveh.c: Update.
599         * modules/striconveh: Update.
600         * lib/linebreak.c: Update.
601         * modules/linebreak: Update.
602         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
603         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
604         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
605         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
606         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
607         * lib/unistr.h: Update.
608         * lib/striconveh.c: Update.
609         * modules/striconveh: Update.
610         * lib/unistr/u8-to-u16.c: Update.
611         * modules/unistr/u8-to-u16: Update.
612         * lib/unistr/u8-to-u32.c: Update.
613         * modules/unistr/u8-to-u32: Update.
614
615 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
616
617         Sync from Libtool.
618         * lib/argz.c: Do not include strings.h nor memory.h, include
619         string.h unconditionally.  Patch by Simon Josefsson.
620
621 2007-01-27  Bruno Haible  <bruno@clisp.org>
622
623         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
624         from gl_HEADER_STRING_H_BODY.
625         (gl_HEADER_STRING_H_BODY): Require it.
626         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
627         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
628         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
629         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
630         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
631         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
632         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
633         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
634         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
635         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
636         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
637         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
638         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
639         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
640         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
641
642 2007-01-27  Bruno Haible  <bruno@clisp.org>
643
644         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
645         check_PROGRAMS into noinst_PROGRAMS.
646         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
647         check_PROGRAMS in this case.
648         (func_import): Set for_test to false.
649         (func_create_testdir): Set for_test to true.
650
651 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
652             Bruno Haible  <bruno@clisp.org>
653
654         * modules/strcasestr (Files): Remove lib/strcasestr.h.
655         (Depends-on): Add string.
656         (Includes): Use <string.h> instead of strcasestr.h.
657         * modules/string (Makefile.am): Also substitute the value of
658         REPLACE_STRCASESTR.
659         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
660         assume strcasestr is declared in <string.h> not <strings.h>. Also
661         set REPLACE_STRCASESTR.
662         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
663         REPLACE_STRCASESTR.
664         * lib/strcasestr.h: Remove file.
665         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
666         * lib/string_.h (strcasestr): New declaration.
667
668 2007-01-27  Bruno Haible  <bruno@clisp.org>
669
670         * lib/string_.h: Use 'extern'.
671
672 2007-01-27  Jim Meyering  <jim@meyering.net>
673
674         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
675         of set-but-not-used local, "q".
676
677         * lib/mempcpy.c: Include <config.h> before <string.h>.
678         This fixes a compilation error on HP-UX, due to the system's
679         "restrict"-using mempcpy prototype.
680
681 2007-01-26  Bruno Haible  <bruno@clisp.org>
682
683         Small optimization.
684         * lib/javacomp.c: Include c-strstr.h.
685          (is_envjavac_gcj): Use c_strstr instead of strstr.
686         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
687
688 2007-01-26  Bruno Haible  <bruno@clisp.org>
689
690         * MODULES.html.sh (Unicode string functions): Add the new modules.
691
692         * modules/uniconv/u32-strconv-to-locale: New file.
693         * lib/uniconv/u32-strconv-to-locale.c: New file.
694
695         * modules/uniconv/u16-strconv-to-locale: New file.
696         * lib/uniconv/u16-strconv-to-locale.c: New file.
697
698         * modules/uniconv/u8-strconv-to-locale: New file.
699         * lib/uniconv/u8-strconv-to-locale.c: New file.
700
701         * modules/uniconv/u32-strconv-from-locale: New file.
702         * lib/uniconv/u32-strconv-from-locale.c: New file.
703
704         * modules/uniconv/u16-strconv-from-locale: New file.
705         * lib/uniconv/u16-strconv-from-locale.c: New file.
706
707         * modules/uniconv/u8-strconv-from-locale: New file.
708         * lib/uniconv/u8-strconv-from-locale.c: New file.
709
710         * modules/uniconv/u32-strconv-to-enc: New file.
711         * lib/uniconv/u32-strconv-to-enc.c: New file.
712         * modules/uniconv/u32-strconv-to-enc-tests: New file.
713         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
714
715         * modules/uniconv/u16-strconv-to-enc: New file.
716         * lib/uniconv/u16-strconv-to-enc.c: New file.
717         * lib/uniconv/u-strconv-to-enc.h: New file.
718         * modules/uniconv/u16-strconv-to-enc-tests: New file.
719         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
720
721         * modules/uniconv/u8-strconv-to-enc: New file.
722         * lib/uniconv/u8-strconv-to-enc.c: New file.
723         * modules/uniconv/u8-strconv-to-enc-tests: New file.
724         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
725
726         * modules/uniconv/u32-strconv-from-enc: New file.
727         * lib/uniconv/u32-strconv-from-enc.c: New file.
728         * modules/uniconv/u32-strconv-from-enc-tests: New file.
729         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
730
731         * modules/uniconv/u16-strconv-from-enc: New file.
732         * lib/uniconv/u16-strconv-from-enc.c: New file.
733         * modules/uniconv/u16-strconv-from-enc-tests: New file.
734         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
735
736         * modules/uniconv/u8-strconv-from-enc: New file.
737         * lib/uniconv/u8-strconv-from-enc.c: New file.
738         * lib/uniconv/u-strconv-from-enc.h: New file.
739         * modules/uniconv/u8-strconv-from-enc-tests: New file.
740         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
741
742         * modules/uniconv/u32-conv-from-enc: New file.
743         * lib/uniconv/u32-conv-from-enc.c: New file.
744         * modules/uniconv/u32-conv-from-enc-tests: New file.
745         * tests/uniconv/test-u32-conv-from-enc.c: New file.
746
747         * modules/uniconv/u16-conv-from-enc: New file.
748         * lib/uniconv/u16-conv-from-enc.c: New file.
749         * lib/uniconv/u-conv-from-enc.h: New file.
750         * modules/uniconv/u16-conv-from-enc-tests: New file.
751         * tests/uniconv/test-u16-conv-from-enc.c: New file.
752
753         * modules/uniconv/u8-conv-from-enc: New file.
754         * lib/uniconv/u8-conv-from-enc.c: New file.
755         * modules/uniconv/u8-conv-from-enc-tests: New file.
756         * tests/uniconv/test-u8-conv-from-enc.c: New file.
757
758         * modules/uniconv/base: New file.
759         * lib/uniconv.h: New file.
760
761 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
762
763         * doc/gnulib-tool.texi (Initial import): Update to match current
764         behavior with strdup module.
765         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
766         * lib/memmem.h: Remove; all uses removed.  This is now done
767         by <string.h>.
768         * lib/mempcpy.h: Likewise.
769         * lib/memrchr.h: Likewise.
770         * lib/stpcpy.h: Likewise.
771         * lib/stpncpy.h: Likewise.
772         * lib/strcase.h: Likewise.
773         * lib/strchrnul.h: Likewise.
774         * lib/strdup.h: Likewise.
775         * lib/strndup.h: Likewise.
776         * lib/strnlen.h: Likewise.
777         * lib/strpbrk.h: Likewise.
778         * lib/strsep.h: Likewise.
779         * lib/strstr.h: Likewise.
780         * lib/strtok_r.h: Likewise.
781         * lib/string_.h: New file.
782         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
783         Rely on <string.h> instead.
784         * lib/canon-host.c: Likewise.
785         * lib/chdir-long.c: Likewise.
786         * lib/concatpath.c: Likewise.
787         * lib/exclude.c: Likewise.
788         * lib/fchdir.c: Likewise.
789         * lib/getaddrinfo.c: Likewise.
790         * lib/getcwd.c: Likewise.
791         * lib/getsubopt.c: Likewise.
792         * lib/glob.c: Likewise.
793         * lib/hard-locale.c: Likewise.
794         * lib/iconvme.c: Likewise.
795         * lib/javacomp.c: Likewise.
796         * lib/mempcpy.c: Likewise.
797         * lib/memrchr.c: Likewise.
798         * lib/regex_internal.h: Likewise.
799         * lib/stpncpy.c: Likewise.
800         * lib/strcasecmp.c: Likewise.
801         * lib/strchrnul.c: Likewise.
802         * lib/strdup.c: Likewise.
803         * lib/striconv.c: Likewise.
804         * lib/striconveh.c: Likewise.
805         * lib/striconveha.c: Likewise.
806         * lib/strncasecmp.c: Likewise.
807         * lib/strndup.c: Likewise.
808         * lib/strnlen.c: Likewise.
809         * lib/strsep.c: Likewise.
810         * lib/strstr.c: Likewise.
811         * lib/strtok_r.c: Likewise.
812         * lib/userspec.c: Likewise.
813         * lib/w32spawn.h: Likewise.
814         * lib/xstrndup.c: Likewise.
815         * lib/mountlist.c (strstr): Remove decl.
816         * m4/string_h.m4: New file.
817         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
818         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
819         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
820         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
821         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
822         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
823         Set REPLACE_STRCASECMP if necessary.
824         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
825         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
826         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
827         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
828         HAVE_DECL_STRDUP if necessary.
829         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
830         since gl_FUNC_STRNDUP does that now.
831         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
832         Check for decl here...
833         (gl_PREREQ_STRNLEN): ... not here.
834         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
835         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
836         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
837         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
838         necessary.
839         * modules/string: New file.
840         * modules/memmem (Files): Remove special-purpose include file.
841         (Depends-on): Add string.
842         (Include): Include <string.h>, not the removed file.
843         * modules/mempcpy: Likewise.
844         * modules/memrchr: Likewise.
845         * modules/stpcpy: Likewise.
846         * modules/stpncpy: Likewise.
847         * modules/strcase: Likewise.
848         * modules/strchrnul: Likewise.
849         * modules/strdup: Likewise.
850         * modules/strndup: Likewise.
851         * modules/strnlen: Likewise.
852         * modules/strpbrk: Likewise.
853         * modules/strsep: Likewise.
854         * modules/strstr: Likewise.
855         * modules/strtok_r: Likewise.
856         * tests/test-dirname.c: Don't include "strdup.h", since
857         <string.h> now suffices.
858         * tests/test-memmem.c: Don't include "memmem.h", since
859         <string.h> now suffices.
860
861 2007-01-25  Bruno Haible  <bruno@clisp.org>
862
863         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
864         *resultp is 0.
865
866         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
867         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
868         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
869         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
870
871         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
872         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
873         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
874         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
875         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
876         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
877
878 2007-01-24  Bruno Haible  <bruno@clisp.org>
879
880         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
881         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
882         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
883         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
884         gl_FUNC_FTS_CORE.
885         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
886         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
887         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
888         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
889         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
890         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
891         gl_FUNC_FCHOWNAT.
892         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
893         gl_FUNC_STRFTIME.
894         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
895         Reported by Ralf Wildenhues.
896
897 2007-01-24  Bruno Haible  <bruno@clisp.org>
898
899         Drop AC_REQUIRE calls that are redundant with the module dependencies.
900         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
901         gl_GETADDRINFO.
902         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
903         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
904         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
905
906 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
907
908         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
909         Don't use 'exit'; just return from 'main'.
910         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
911
912         * lib/fnmatch_.h: Readjust white space and comments to match
913         glibc, to avoid spurious diffs.
914
915 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
916
917         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
918         2004-12-01 change by Jakub Jelinek, since this code won't compile
919         if !LIBC.  Problem reported by Bob Proulx.
920
921 2007-01-23  Bruno Haible  <bruno@clisp.org>
922
923         * lib/striconveh.c: Include c-strcaseeq.h.
924         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
925         * modules/striconveh (Depends-on): Add c-strcaseeq.
926
927 2007-01-23  Bruno Haible  <bruno@clisp.org>
928
929         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
930
931         * modules/c-strcaseeq: New file.
932         * lib/c-strcaseeq.h: New file.
933
934         * modules/streq: New file.
935         * lib/streq.h: New file.
936
937 2007-01-23  Bruno Haible  <bruno@clisp.org>
938
939         * modules/striconveha-tests: New file.
940         * tests/test-striconveha.c: New file.
941
942         * lib/striconveha.h: Include <stdbool.h>.
943         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
944         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
945         (mem_iconveha_notranslit): Renamed from mem_iconveha.
946         (mem_iconveha): New function.
947         (str_iconveha_notranslit): Renamed from str_iconveha.
948         (str_iconveha): New function.
949         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
950         c-strcase.
951
952 2007-01-23  Bruno Haible  <bruno@clisp.org>
953
954         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
955         encodings without forgiving before trying any encoding with handler.
956         (str_iconveha): Try all encodings without forgiving before trying any
957         encoding with handler.
958
959 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
960
961         Import the following changes from libc.
962
963         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
964
965         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
966
967         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
968
969         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
970         normal_bracket label.
971
972         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
973
974         [BZ #361]
975         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
976         to normal_bracket after fetching the next character.
977
978 2007-01-22  Bruno Haible  <bruno@clisp.org>
979
980         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
981         argument.
982         * lib/striconveh.c (iconv_carefully_1): New function.
983         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
984         argument.
985         (str_cd_iconveh): Update.
986         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
987         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
988         * tests/test-striconveh.c (MAGIC): New macro.
989         (new_offsets): New function.
990         (main): Test call with and without offsets.
991
992 2007-01-22  Bruno Haible  <bruno@clisp.org>
993
994         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
995         * modules/sys_select (Makefile.am): Likewise.
996         * modules/sys_socket (Makefile.am): Likewise.
997         * modules/sys_time (Makefile.am): Likewise.
998
999 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
1000
1001         * modules/gettimeofday (License): Change from GPL to LGPL, since
1002         gettimeofday is a library function.
1003
1004 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1005
1006         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
1007
1008 2007-01-21  Bruno Haible  <bruno@clisp.org>
1009
1010         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
1011
1012 2007-01-21  Bruno Haible  <bruno@clisp.org>
1013
1014         * modules/striconveha: New file.
1015         * lib/striconveha.h: New file.
1016         * lib/striconveha.c: New file.
1017         * MODULES.html.sh (Internationalization functions): Add striconveha.
1018         * lib/striconv.c (str_iconv): Optimize the case of an empty input
1019         string.
1020         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
1021
1022 2007-01-21  Bruno Haible  <bruno@clisp.org>
1023
1024         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1025         * lib/striconveh.c (str_iconveh): Likewise.
1026
1027 2007-01-21  Bruno Haible  <bruno@clisp.org>
1028
1029         * lib/striconveh.h (mem_iconveh): New declaration.
1030         * lib/striconveh.c (mem_iconveh): New function.
1031         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1032
1033 2007-01-21  Bruno Haible  <bruno@clisp.org>
1034
1035         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1036
1037         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1038         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1039         original result buffer.
1040         (str_cd_iconveh): Update.
1041         * tests/test-striconveh.c (main): Update.
1042
1043         * lib/striconv.h (mem_cd_iconv): Change specification.
1044         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1045         result buffer.
1046         (str_cd_iconv): Update.
1047         * tests/test-striconv.c (main): Update.
1048
1049 2007-01-21  Bruno Haible  <bruno@clisp.org>
1050
1051         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1052
1053 2007-01-20  Jim Meyering  <jim@meyering.net>
1054
1055         * lib/userspec.c (parse_with_separator): If a user or group string
1056         starts with "+", skip the corresponding name-to-ID look-up, since
1057         such a look-up must fail: user and group names may not include "+".
1058
1059 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1060
1061         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1062         since we now assume the sys_time module.
1063         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1064         check for sys/time.h; no longer needed.
1065         * modules/poll (Depends-on): Depend on sys_time.
1066
1067 2007-01-18  Bruno Haible  <bruno@clisp.org>
1068
1069         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1070         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1071
1072         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1073         gettimeofday.
1074
1075         * tests/test-gettimeofday.c: Include <time.h>.
1076         (dummy): Remove variable.
1077
1078         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1079         gl_HEADER_SYS_TIME_H.
1080         (gl_HEADER_SYS_TIME_H): New macro.
1081
1082         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1083         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1084         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1085         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1086         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1087         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1088         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1089         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1090         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1091         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1092         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1093
1094         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1095         last change; it caused a compilation error when cross-compiling to
1096         Cygwin.
1097
1098 2007-01-18  Jim Meyering  <jim@meyering.net>
1099
1100         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1101         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1102         than the race-prone "test -d sys || mkdir sys".
1103         (configure.ac): Use AC_PROG_MKDIR_P.
1104         * modules/sys_select: Likewise.
1105         * modules/sys_socket: Likewise.
1106         * modules/sys_time: Likewise.
1107
1108 2007-01-18  Eric Blake  <ebb9@byu.net>
1109
1110         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1111         replace gettimeofday.
1112         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1113         name, to avoid infinite recursion.
1114
1115 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1116
1117         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1118         module sys_time.
1119         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1120         assume timespec.h defines struct timeval.
1121         * lib/settime.c: Likewise.
1122         * lib/utimens.c: Likewise.
1123         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1124         since we now assume the gettimeofday module.
1125         * lib/tempname.c (__gen_tempname): Likewise.
1126         * lib/gettimeofday.h: Remove.
1127         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1128         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1129         Include <time.h>, for 'time()'.
1130         (localtime_buffer_addr): Also use this workaround if
1131         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1132         to simplify the uses.  All uses changed.
1133         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1134         that #undef is inside {}, and 'const' follows type name consistently.
1135         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1136         (gettimeofday): Do not use the maximum possible value for
1137         tv->tv_usec, since that might break usages other than ls.c.
1138         Instead, we'll leave ls.c alone.  This undoes today's patch
1139         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1140         we've never observed the problem but might as well keep the
1141         canary.
1142         * lib/nanosleep.c: Include timespec.h first, for interface check.
1143         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1144         now assume the sys_time module.
1145         * lib/tempname.c: Likewise.
1146         * lib/timespec.h: Likewise.
1147         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1148         needed.
1149         * lib/strftime.c: Likewise.
1150         * lib/timespec.h: Likewise.
1151         * lib/posixtm.c: Include posixtm.h first, for interface check.
1152         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1153         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1154         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1155         * lib/sys_time_.h: New file.
1156         * lib/timespec.h (struct timespec): Use long int, not long.
1157         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1158         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1159         Remove obsolescent call to AC_HEADER_TIME.
1160         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1161         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1162         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1163         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1164         Likewise.
1165         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1166         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1167         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1168         into the sys_time module.  Check for gettimeofday just once.
1169         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1170         for gettimeofday signature to just check the signature.  Merely
1171         compile it, since linking doesn't test signature.  Improve test for
1172         whether gettimeofday.o is actually needed.
1173         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1174         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1175         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1176         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1177         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1178         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1179         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1180         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1181         than worrying about sys/time.h.
1182         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1183         Don't bother worrying about TIME_WITH_SYS_TIME.
1184         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1185         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1186         * m4/sys_time_h.m4: New file.
1187         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1188         Don't include sys/time.h.  Return from main rather than exiting.
1189         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1190         all uses changed.
1191         * modules/gethrxtime (Depends-on): Add sys_time.
1192         * modules/gettime (Depends-on): Likewise.
1193         * modules/gettimeofday (Depends-on): Likewise.
1194         * modules/nanosleep (Depends-on): Likewise.
1195         * modules/settime (Depends-on): Likewise.
1196         * modules/tempname (Depends-on): Likewise.
1197         * modules/utimens (Depends-on): Likewise.
1198         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1199         (Include:) Change back to <sys/time.h>.
1200         (Maintainer:) Add self.
1201         * modules/sys_time: New file.
1202         * modules/tempname (Depends-on): Add gettimeofday.
1203         * tests/test-gettimeofday.c: Include <sys/time.h>
1204         rather than gettimeofday.h.
1205
1206 2007-01-17  Bruno Haible  <bruno@clisp.org>
1207
1208         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1209         the license default to GPL.
1210         (func_create_testdir): Don't complain if a module is LGPL and its
1211         tests module depends on GPLed modules.
1212
1213 2007-01-17  Bruno Haible  <bruno@clisp.org>
1214
1215         * lib/gettimeofday.c (gettimeofday): Add code for the case
1216         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1217         maximum possible value for tv->tv_usec, rather than the minimum one.
1218
1219 2005-10-08  Martin Lambers  <marlam@marlam.de>
1220 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1221 2007-01-16  Bruno Haible  <bruno@clisp.org>
1222
1223         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1224         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1225         gl_FUNC_GETTIMEOFDAY.
1226         (Include): Add gettimeofday.h.
1227         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1228         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1229         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1230         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1231         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1232         * lib/gettimeofday.h: New file.
1233         * lib/gettimeofday.c: Include <sys/timeb.h>.
1234         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1235         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1236         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1237         fall back on time().
1238
1239         * tests/test-gettimeofday.c: New file.
1240         * modules/gettimeofday-tests: New file.
1241
1242 2007-01-16  Eric Blake  <ebb9@byu.net>
1243
1244         * modules/fnmatch (Depends-on): Depend on wchar.
1245         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1246         * m4/fnmatch.m4: Likewise.
1247         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1248         * m4/mbchar.m4: Likewise.
1249         * modules/mbswidth (Depends-on): Depend on wchar.
1250         * lib/mbswidth.c: Assume <wchar.h>.
1251         * m4/mbswidth.m4: Likewise.
1252         * modules/quotearg (Depends-on): Depend on wchar.
1253         * lib/quotearg.c: Assume <wchar.h>.
1254         * m4/quotearg.m4: Likewise.
1255         * modules/regex (Depends-on): Depend on wchar.
1256         * lib/regex_internal.h: Assume <wchar.h>.
1257         * m4/regex.m4: Likewise.
1258         * modules/stdint (Depends-on): Depend on wchar.
1259         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1260         * m4/stdint.m4: Likewise.
1261         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1262         * modules/strftime (Depends-on): Depend on wchar.
1263         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1264         * modules/strtol (Depends-on): Depend on wchar.
1265         * lib/strtol.c: Assume <wchar.h>.
1266         * modules/wcwidth (Depends-on): Depend on wchar.
1267         * lib/wcwidth.h: Assume <wchar.h>.
1268         * m4/wcwidth.m4: Likewise.
1269
1270 2007-01-16  Bruno Haible  <bruno@clisp.org>
1271
1272         * modules/csharpexec-script: New, created from...
1273         * modules/csharpexec: ... this.
1274
1275 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1276
1277         * modules/javaexec-script: New, created from...
1278         * modules/javaexec: ... this.
1279
1280 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1281
1282         * modules/poll (Dependencies): Add sys_select.
1283
1284 2007-01-15  Jim Meyering  <jim@meyering.net>
1285
1286         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1287         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1288         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1289         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1290
1291 2007-01-15  Bruno Haible  <bruno@clisp.org>
1292
1293         * modules/striconveh: New file.
1294         * lib/striconveh.h: New file.
1295         * lib/striconveh.c: New file.
1296         * MODULES.html.sh (Internationalization functions): Add striconveh.
1297
1298         * modules/striconveh-tests: New file.
1299         * tests/test-striconveh.c: New file.
1300
1301 2007-01-15  Bruno Haible  <bruno@clisp.org>
1302
1303         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1304         not from GNU libiconv or GNU libc.
1305
1306 2007-01-15  Bruno Haible  <bruno@clisp.org>
1307
1308         * doc/gnulib-intro.texi (Copyright): Explain the different license
1309         terms for module descriptions, autoconf macros, tests, documentation.
1310
1311 2007-01-14  Bruno Haible  <bruno@clisp.org>
1312
1313         * modules/striconv-tests: New file.
1314         * tests/test-striconv.c: New file.
1315
1316 2007-01-14  Bruno Haible  <bruno@clisp.org>
1317
1318         * modules/iconv-tests: New file.
1319         * tests/test-iconv.c: New file.
1320
1321 2007-01-14  Bruno Haible  <bruno@clisp.org>
1322
1323         * gnulib-tool (func_get_license): For test modules, use the license of
1324         the main module.
1325
1326 2007-01-14  Bruno Haible  <bruno@clisp.org>
1327
1328         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1329         if iconv is found to exist.
1330
1331 2007-01-14  Bruno Haible  <bruno@clisp.org>
1332
1333         * modules/c-ctype-tests: New file.
1334         * tests/test-c-ctype.c: New file.
1335
1336 2007-01-14  Bruno Haible  <bruno@clisp.org>
1337
1338         * modules/binary-io-tests: New file.
1339         * tests/test-binary-io.sh: New file.
1340         * tests/test-binary-io.c: New file.
1341
1342 2007-01-14  Bruno Haible  <bruno@clisp.org>
1343
1344         * modules/array-oset-tests: New file.
1345         * tests/test-array_oset.c: New file.
1346
1347 2007-01-14  Bruno Haible  <bruno@clisp.org>
1348
1349         * modules/array-list-tests: New file.
1350         * tests/test-array_list.c: New file.
1351
1352 2007-01-14  Bruno Haible  <bruno@clisp.org>
1353
1354         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1355         and make.
1356         Reported by Simon Josefsson in
1357         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1358
1359 2007-01-14  Bruno Haible  <bruno@clisp.org>
1360
1361         * modules/allocsa-tests: New file.
1362         * tests/test-allocsa.c: New file.
1363
1364 2007-01-14  Bruno Haible  <bruno@clisp.org>
1365
1366         * modules/fchdir (Depends-on): Add absolute-header.
1367         * modules/unistd (Depends-on): Likewise.
1368
1369 2006-12-30  Bruno Haible  <bruno@clisp.org>
1370
1371         * modules/fchdir: New file.
1372         * modules/unistd (Files): Add lib/unistd_.h.
1373         (Makefile.am): Generate unistd.h from unistd_.h.
1374         * lib/fchdir.c: New file.
1375         * lib/dirent_.h: New file.
1376         * lib/unistd_.h: New file.
1377         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1378         * m4/fchdir.m4: New file.
1379         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1380         (gl_HEADER_UNISTD): Invoke it.
1381         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1382         function.
1383         * lib/backupfile.c (opendir, closedir): Undefine.
1384         * lib/chown.c (open, close): Undefine.
1385         * lib/clean-temp.c (open, close): Undefine.
1386         * lib/copy-file.c (open, close): Undefine.
1387         * lib/execute.c (open, close): Undefine.
1388         * lib/fsusage.c (open, close): Undefine.
1389         * lib/gc-gnulib.c (open, close): Undefine.
1390         * lib/getcwd.c (opendir, closedir): Undefine.
1391         * lib/glob.c (opendir, closedir): Undefine.
1392         * lib/javacomp.c (open, close): Undefine.
1393         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1394         * lib/openat-proc.c (open, close): Undefine.
1395         * lib/pagealign_alloc.c (open, close): Undefine.
1396         * lib/pipe.c (open, close): Undefine.
1397         * lib/progreloc.c (open, close): Undefine.
1398         * lib/savedir.c (opendir, closedir): Undefine.
1399         * lib/utime.c (open, close): Undefine.
1400         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1401
1402 2007-01-10  Bruno Haible  <bruno@clisp.org>
1403
1404         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1405
1406 2007-01-12  Eric Blake  <ebb9@byu.net>
1407
1408         Provide a robust <wchar.h>.  Further simplifications are now
1409         possible in other modules, but not included here.
1410         * modules/wchar: New module.
1411         * m4/wchar.m4: New file.
1412         * lib/wchar_.h: Likewise.
1413         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1414         of the new module.
1415         * MODULES.html.sh (Extended multibyte and wide character utilities):
1416         New section.
1417
1418 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1419
1420         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1421         to a reasonable default for memory allocation.
1422         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1423         file system that reports garbage st_size values for symlinks.
1424         Problem reported by Liyang Hu.
1425
1426 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1427
1428         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1429         Emacs .#* auto-save files).
1430
1431 2007-01-11  Bruno Haible  <bruno@clisp.org>
1432
1433         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1434         directory.
1435
1436 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1437
1438         Use @...@ consistently in lib/wctype_.h.
1439         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1440         on it being set to 1 or 0.
1441         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1442         go back to AC_SUBSTing it.
1443         * modules/wctype (Makefile.am): Undo previous change.
1444
1445 2007-01-10  Eric Blake  <ebb9@byu.net>
1446
1447         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1448         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1449         * modules/wctype (Makefile.am): Likewise.
1450         Reported by Chris McGuire.
1451
1452 2007-01-10  Jim Meyering  <jim@meyering.net>
1453
1454         fts.c: a small readability/maintainability improvement
1455         * lib/fts.c (fts_read): Make this code slightly more readable and
1456         maintainable by hoisting the "sp->fts_cur = p" assignments to
1457         immediately follow the statements that set P.  Derived from
1458         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1459
1460 2007-01-10  Eric Blake  <ebb9@byu.net>
1461
1462         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1463         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1464         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1465         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1466         Reported by Chris McGuire.
1467
1468 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1469
1470         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1471         in sed script.
1472
1473 2007-01-09  Bruno Haible  <bruno@clisp.org>
1474
1475         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1476         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1477         variables.
1478         (func_module): Use them.
1479
1480 2007-01-09  Bruno Haible  <bruno@clisp.org>
1481
1482         * modules/unistr/base: New file.
1483         * lib/unistr.h: New file.
1484
1485         * modules/unistr/u8-to-u16: New file.
1486         * lib/unistr/u8-to-u16.c: New file.
1487
1488         * modules/unistr/u8-to-u32: New file.
1489         * lib/unistr/u8-to-u32.c: New file.
1490
1491         * modules/unistr/u16-to-u8: New file.
1492         * lib/unistr/u16-to-u8.c: New file.
1493
1494         * modules/unistr/u16-to-u32: New file.
1495         * lib/unistr/u16-to-u32.c: New file.
1496
1497         * modules/unistr/u32-to-u8: New file.
1498         * lib/unistr/u32-to-u8.c: New file.
1499
1500         * modules/unistr/u32-to-u16: New file.
1501         * lib/unistr/u32-to-u16.c: New file.
1502
1503         * modules/unistr/u8-check: New file.
1504         * modules/unistr/u16-check: New file.
1505         * modules/unistr/u32-check: New file.
1506         * lib/unistr/u8-check.c: New file.
1507         * lib/unistr/u16-check.c: New file.
1508         * lib/unistr/u32-check.c: New file.
1509
1510         * modules/unistr/u8-chr: New file.
1511         * modules/unistr/u16-chr: New file.
1512         * modules/unistr/u32-chr: New file.
1513         * lib/unistr/u8-chr.c: New file.
1514         * lib/unistr/u16-chr.c: New file.
1515         * lib/unistr/u32-chr.c: New file.
1516
1517         * modules/unistr/u8-cmp: New file.
1518         * modules/unistr/u16-cmp: New file.
1519         * modules/unistr/u32-cmp: New file.
1520         * lib/unistr/u8-cmp.c: New file.
1521         * lib/unistr/u16-cmp.c: New file.
1522         * lib/unistr/u32-cmp.c: New file.
1523
1524         * modules/unistr/u8-cpy: New file.
1525         * modules/unistr/u16-cpy: New file.
1526         * modules/unistr/u32-cpy: New file.
1527         * lib/unistr/u8-cpy.c: New file.
1528         * lib/unistr/u16-cpy.c: New file.
1529         * lib/unistr/u32-cpy.c: New file.
1530         * lib/unistr/u-cpy.h: New file.
1531
1532         * modules/unistr/u8-cpy-alloc: New file.
1533         * modules/unistr/u16-cpy-alloc: New file.
1534         * modules/unistr/u32-cpy-alloc: New file.
1535         * lib/unistr/u8-cpy-alloc.c: New file.
1536         * lib/unistr/u16-cpy-alloc.c: New file.
1537         * lib/unistr/u32-cpy-alloc.c: New file.
1538         * lib/unistr/u-cpy-alloc.h: New file.
1539
1540         * modules/unistr/u8-endswith: New file.
1541         * modules/unistr/u16-endswith: New file.
1542         * modules/unistr/u32-endswith: New file.
1543         * lib/unistr/u8-endswith.c: New file.
1544         * lib/unistr/u16-endswith.c: New file.
1545         * lib/unistr/u32-endswith.c: New file.
1546         * lib/unistr/u-endswith.h: New file.
1547
1548         * modules/unistr/u8-mblen: New file.
1549         * modules/unistr/u16-mblen: New file.
1550         * modules/unistr/u32-mblen: New file.
1551         * lib/unistr/u8-mblen.c: New file.
1552         * lib/unistr/u16-mblen.c: New file.
1553         * lib/unistr/u32-mblen.c: New file.
1554
1555         * modules/unistr/u8-mbtouc: New file.
1556         * modules/unistr/u16-mbtouc: New file.
1557         * modules/unistr/u32-mbtouc: New file.
1558         * lib/unistr/u8-mbtouc.c: New file.
1559         * lib/unistr/u16-mbtouc.c: New file.
1560         * lib/unistr/u32-mbtouc.c: New file.
1561
1562         * modules/unistr/u8-mbtouc-safe: New file.
1563         * modules/unistr/u16-mbtouc-safe: New file.
1564         * modules/unistr/u32-mbtouc-safe: New file.
1565         * lib/unistr/u8-mbtouc-safe.c: New file.
1566         * lib/unistr/u16-mbtouc-safe.c: New file.
1567         * lib/unistr/u32-mbtouc-safe.c: New file.
1568
1569         * modules/unistr/u8-move: New file.
1570         * modules/unistr/u16-move: New file.
1571         * modules/unistr/u32-move: New file.
1572         * lib/unistr/u8-move.c: New file.
1573         * lib/unistr/u16-move.c: New file.
1574         * lib/unistr/u32-move.c: New file.
1575         * lib/unistr/u-move.h: New file.
1576
1577         * modules/unistr/u8-next: New file.
1578         * modules/unistr/u16-next: New file.
1579         * modules/unistr/u32-next: New file.
1580         * lib/unistr/u8-next.c: New file.
1581         * lib/unistr/u16-next.c: New file.
1582         * lib/unistr/u32-next.c: New file.
1583
1584         * modules/unistr/u8-prev: New file.
1585         * modules/unistr/u16-prev: New file.
1586         * modules/unistr/u32-prev: New file.
1587         * lib/unistr/u8-prev.c: New file.
1588         * lib/unistr/u16-prev.c: New file.
1589         * lib/unistr/u32-prev.c: New file.
1590
1591         * modules/unistr/u8-set: New file.
1592         * modules/unistr/u16-set: New file.
1593         * modules/unistr/u32-set: New file.
1594         * lib/unistr/u8-set.c: New file.
1595         * lib/unistr/u16-set.c: New file.
1596         * lib/unistr/u32-set.c: New file.
1597         * lib/unistr/u-set.h: New file.
1598
1599         * modules/unistr/u8-startswith: New file.
1600         * modules/unistr/u16-startswith: New file.
1601         * modules/unistr/u32-startswith: New file.
1602         * lib/unistr/u8-startswith.c: New file.
1603         * lib/unistr/u16-startswith.c: New file.
1604         * lib/unistr/u32-startswith.c: New file.
1605         * lib/unistr/u-startswith.h: New file.
1606
1607         * modules/unistr/u8-stpcpy: New file.
1608         * modules/unistr/u16-stpcpy: New file.
1609         * modules/unistr/u32-stpcpy: New file.
1610         * lib/unistr/u8-stpcpy.c: New file.
1611         * lib/unistr/u16-stpcpy.c: New file.
1612         * lib/unistr/u32-stpcpy.c: New file.
1613         * lib/unistr/u-stpcpy.h: New file.
1614
1615         * modules/unistr/u8-stpncpy: New file.
1616         * modules/unistr/u16-stpncpy: New file.
1617         * modules/unistr/u32-stpncpy: New file.
1618         * lib/unistr/u8-stpncpy.c: New file.
1619         * lib/unistr/u16-stpncpy.c: New file.
1620         * lib/unistr/u32-stpncpy.c: New file.
1621         * lib/unistr/u-stpncpy.h: New file.
1622
1623         * modules/unistr/u8-strcat: New file.
1624         * modules/unistr/u16-strcat: New file.
1625         * modules/unistr/u32-strcat: New file.
1626         * lib/unistr/u8-strcat.c: New file.
1627         * lib/unistr/u16-strcat.c: New file.
1628         * lib/unistr/u32-strcat.c: New file.
1629         * lib/unistr/u-strcat.h: New file.
1630
1631         * modules/unistr/u8-strchr: New file.
1632         * modules/unistr/u16-strchr: New file.
1633         * modules/unistr/u32-strchr: New file.
1634         * lib/unistr/u8-strchr.c: New file.
1635         * lib/unistr/u16-strchr.c: New file.
1636         * lib/unistr/u32-strchr.c: New file.
1637
1638         * modules/unistr/u8-strcmp: New file.
1639         * modules/unistr/u16-strcmp: New file.
1640         * modules/unistr/u32-strcmp: New file.
1641         * lib/unistr/u8-strcmp.c: New file.
1642         * lib/unistr/u16-strcmp.c: New file.
1643         * lib/unistr/u32-strcmp.c: New file.
1644
1645         * modules/unistr/u8-strcpy: New file.
1646         * modules/unistr/u16-strcpy: New file.
1647         * modules/unistr/u32-strcpy: New file.
1648         * lib/unistr/u8-strcpy.c: New file.
1649         * lib/unistr/u16-strcpy.c: New file.
1650         * lib/unistr/u32-strcpy.c: New file.
1651         * lib/unistr/u-strcpy.h: New file.
1652
1653         * modules/unistr/u8-strcspn: New file.
1654         * modules/unistr/u16-strcspn: New file.
1655         * modules/unistr/u32-strcspn: New file.
1656         * lib/unistr/u8-strcspn.c: New file.
1657         * lib/unistr/u16-strcspn.c: New file.
1658         * lib/unistr/u32-strcspn.c: New file.
1659         * lib/unistr/u-strcspn.h: New file.
1660
1661         * modules/unistr/u8-strdup: New file.
1662         * modules/unistr/u16-strdup: New file.
1663         * modules/unistr/u32-strdup: New file.
1664         * lib/unistr/u8-strdup.c: New file.
1665         * lib/unistr/u16-strdup.c: New file.
1666         * lib/unistr/u32-strdup.c: New file.
1667         * lib/unistr/u-strdup.h: New file.
1668
1669         * modules/unistr/u8-strlen: New file.
1670         * modules/unistr/u16-strlen: New file.
1671         * modules/unistr/u32-strlen: New file.
1672         * lib/unistr/u8-strlen.c: New file.
1673         * lib/unistr/u16-strlen.c: New file.
1674         * lib/unistr/u32-strlen.c: New file.
1675         * lib/unistr/u-strlen.h: New file.
1676
1677         * modules/unistr/u8-strmblen: New file.
1678         * modules/unistr/u16-strmblen: New file.
1679         * modules/unistr/u32-strmblen: New file.
1680         * lib/unistr/u8-strmblen.c: New file.
1681         * lib/unistr/u16-strmblen.c: New file.
1682         * lib/unistr/u32-strmblen.c: New file.
1683
1684         * modules/unistr/u8-strmbtouc: New file.
1685         * modules/unistr/u16-strmbtouc: New file.
1686         * modules/unistr/u32-strmbtouc: New file.
1687         * lib/unistr/u8-strmbtouc.c: New file.
1688         * lib/unistr/u16-strmbtouc.c: New file.
1689         * lib/unistr/u32-strmbtouc.c: New file.
1690
1691         * modules/unistr/u8-strncat: New file.
1692         * modules/unistr/u16-strncat: New file.
1693         * modules/unistr/u32-strncat: New file.
1694         * lib/unistr/u8-strncat.c: New file.
1695         * lib/unistr/u16-strncat.c: New file.
1696         * lib/unistr/u32-strncat.c: New file.
1697         * lib/unistr/u-strncat.h: New file.
1698
1699         * modules/unistr/u8-strncmp: New file.
1700         * modules/unistr/u16-strncmp: New file.
1701         * modules/unistr/u32-strncmp: New file.
1702         * lib/unistr/u8-strncmp.c: New file.
1703         * lib/unistr/u16-strncmp.c: New file.
1704         * lib/unistr/u32-strncmp.c: New file.
1705
1706         * modules/unistr/u8-strncpy: New file.
1707         * modules/unistr/u16-strncpy: New file.
1708         * modules/unistr/u32-strncpy: New file.
1709         * lib/unistr/u8-strncpy.c: New file.
1710         * lib/unistr/u16-strncpy.c: New file.
1711         * lib/unistr/u32-strncpy.c: New file.
1712         * lib/unistr/u-strncpy.h: New file.
1713
1714         * modules/unistr/u8-strnlen: New file.
1715         * modules/unistr/u16-strnlen: New file.
1716         * modules/unistr/u32-strnlen: New file.
1717         * lib/unistr/u8-strnlen.c: New file.
1718         * lib/unistr/u16-strnlen.c: New file.
1719         * lib/unistr/u32-strnlen.c: New file.
1720         * lib/unistr/u-strnlen.h: New file.
1721
1722         * modules/unistr/u8-strpbrk: New file.
1723         * modules/unistr/u16-strpbrk: New file.
1724         * modules/unistr/u32-strpbrk: New file.
1725         * lib/unistr/u8-strpbrk.c: New file.
1726         * lib/unistr/u16-strpbrk.c: New file.
1727         * lib/unistr/u32-strpbrk.c: New file.
1728         * lib/unistr/u-strpbrk.h: New file.
1729
1730         * modules/unistr/u8-strrchr: New file.
1731         * modules/unistr/u16-strrchr: New file.
1732         * modules/unistr/u32-strrchr: New file.
1733         * lib/unistr/u8-strrchr.c: New file.
1734         * lib/unistr/u16-strrchr.c: New file.
1735         * lib/unistr/u32-strrchr.c: New file.
1736
1737         * modules/unistr/u8-strspn: New file.
1738         * modules/unistr/u16-strspn: New file.
1739         * modules/unistr/u32-strspn: New file.
1740         * lib/unistr/u8-strspn.c: New file.
1741         * lib/unistr/u16-strspn.c: New file.
1742         * lib/unistr/u32-strspn.c: New file.
1743         * lib/unistr/u-strspn.h: New file.
1744
1745         * modules/unistr/u8-strstr: New file.
1746         * modules/unistr/u16-strstr: New file.
1747         * modules/unistr/u32-strstr: New file.
1748         * lib/unistr/u8-strstr.c: New file.
1749         * lib/unistr/u16-strstr.c: New file.
1750         * lib/unistr/u32-strstr.c: New file.
1751         * lib/unistr/u-strstr.h: New file.
1752
1753         * modules/unistr/u8-strtok: New file.
1754         * modules/unistr/u16-strtok: New file.
1755         * modules/unistr/u32-strtok: New file.
1756         * lib/unistr/u8-strtok.c: New file.
1757         * lib/unistr/u16-strtok.c: New file.
1758         * lib/unistr/u32-strtok.c: New file.
1759         * lib/unistr/u-strtok.h: New file.
1760
1761         * modules/unistr/u8-uctomb: New file.
1762         * modules/unistr/u16-uctomb: New file.
1763         * modules/unistr/u32-uctomb: New file.
1764         * lib/unistr/u8-uctomb.c: New file.
1765         * lib/unistr/u16-uctomb.c: New file.
1766         * lib/unistr/u32-uctomb.c: New file.
1767
1768         * MODULES.html.sh (Unicode string functions): Add the new modules.
1769
1770 2007-01-08  Bruno Haible  <bruno@clisp.org>
1771
1772         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1773         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1774         subdirectories.
1775
1776 2007-01-08  Karl Berry  <karl@gnu.org>
1777
1778         * doc/error.texi: mention that main() fns must set program_name
1779         when progname is used.
1780
1781 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1782
1783         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1784         WCTYPE_H is empty, for the benefit of builds from non-distclean
1785         directories.  Problem reported by Eric Blake in
1786         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1787
1788 2007-01-08  Bruno Haible  <bruno@clisp.org>
1789
1790         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1791         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1792         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1793         PROVIDE_CANONICALIZE_FILENAME_MODE.
1794         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1795
1796 2007-01-08  Bruno Haible  <bruno@clisp.org>
1797
1798         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1799         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1800         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1801         * lib/fts.c: Likewise.
1802         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1803
1804 2006-12-25  Bruno Haible  <bruno@clisp.org>
1805
1806         * modules/utf8-ucs4-safe: New file.
1807         * lib/utf8-ucs4-safe.h: New file.
1808         * lib/unistr/utf8-ucs4-safe.c: New file.
1809
1810         * modules/utf16-ucs4-safe: New file.
1811         * lib/utf16-ucs4-safe.h: New file.
1812         * lib/unistr/utf16-ucs4-safe.c: New file.
1813
1814         * MODULES.html.sh (Unicode string functions): Add the new modules.
1815
1816 2007-01-08  Bruno Haible  <bruno@clisp.org>
1817
1818         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1819         (Depends-on): Add unitypes.
1820         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1821         (u8_mbtouc_aux): Move out to separate file.
1822         (u8_mbtouc): Use ucs4_t, uint8_t types.
1823         * lib/unistr/utf8-ucs4.c: New file.
1824
1825         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1826         (Depends-on): Add unitypes.
1827         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1828         (u16_mbtouc_aux): Move out to separate file.
1829         (u16_mbtouc): Use ucs4_t, uint16_t types.
1830         * lib/unistr/utf16-ucs4.c: New file.
1831
1832         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1833         (Depends-on): Add unitypes.
1834         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1835         (u8_uctomb_aux): Move out to separate file.
1836         (u8_uctomb): Use ucs4_t, uint8_t types.
1837         * lib/unistr/ucs4-utf8.c: New file.
1838
1839         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1840         (Depends-on): Add unitypes.
1841         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1842         (u16_uctomb_aux): Move out to separate file.
1843         (u16_uctomb): Use ucs4_t, uint16_t types.
1844         * lib/unistr/ucs4-utf16.c: New file.
1845
1846 2006-12-25  Bruno Haible  <bruno@clisp.org>
1847
1848         * modules/unitypes: New file.
1849         * lib/unitypes.h: New file.
1850         * MODULES.html.sh (func_all_modules): New section "Unicode string
1851         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1852         this section. Add unitypes.
1853
1854 2007-01-08  Bruno Haible  <bruno@clisp.org>
1855
1856         Avoid variable names that conflict with those from libtool.
1857         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1858         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1859         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1860         library_names_spec to acl_library_names_spec, hardcode_* to
1861         acl_hardcode_*.
1862         Reported by Ralf Wildenhues.
1863
1864 2007-01-08  Bruno Haible  <bruno@clisp.org>
1865
1866         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1867         definition.
1868         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1869         definition.
1870         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1871         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1872         definition.
1873         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1874         definition.
1875         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1876         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1877         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1878         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1879         definition.
1880         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1881         definition.
1882         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1883         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1884         GC_USE_<algorithm>.
1885         * lib/gc-libgcrypt.c: Likewise.
1886         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1887         * modules/gc-arctwo (configure.ac): Likewise.
1888         * modules/gc-des (configure.ac): Likewise.
1889         * modules/gc-hmac-md5 (configure.ac): Likewise.
1890         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1891         * modules/gc-md2 (configure.ac): Likewise.
1892         * modules/gc-md4 (configure.ac): Likewise.
1893         * modules/gc-md5 (configure.ac): Likewise.
1894         * modules/gc-random (configure.ac): Likewise.
1895         * modules/gc-rijndael (configure.ac): Likewise.
1896         * modules/gc-sha1 (configure.ac): Likewise.
1897
1898 2007-01-08  Bruno Haible  <bruno@clisp.org>
1899
1900         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1901         macro definition.
1902         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1903         definition.
1904         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1905         definition.
1906         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1907         * modules/fcntl-safer (configure.ac): Likewise.
1908         * modules/fopen-safer (configure.ac): Likewise.
1909         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1910         GNULIB_FWRITEERROR macro definition.
1911
1912 2007-01-08  Bruno Haible  <bruno@clisp.org>
1913
1914         * m4/gnulib-common.m4: New file.
1915         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1916         (func_get_filelist): Add m4/gnulib-common.m4.
1917
1918 2007-01-08  Bruno Haible  <bruno@clisp.org>
1919
1920         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1921         command.
1922
1923 2007-01-08  Jim Meyering  <jim@meyering.net>
1924
1925         Use a more robust test for a "can't happen" condition.
1926         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1927         narrowed the st_size value.  Presuming the "can't happen" condition
1928         is true, that narrowing could conceivably convert an invalid st_size
1929         value into a valid one.  Instead, use a change based on Matthew
1930         Woehlke's original patch.
1931
1932         Slight readability improvement: use an assert-like macro
1933         in place of literal "abort ()" uses.
1934         * lib/fts.c (fts_assert): Define.
1935         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1936         Use this macro instead of a bare 'abort'.
1937
1938 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1939
1940         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1941         simply work around them.
1942         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1943         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1944         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1945         Don't bother to define as macros, since the standard doesn't require it.
1946         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1947         longer worry about IRIX 5.3.
1948         (HAVE_WCTYPE_CTMP_BUG): Remove.
1949
1950 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1951
1952         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1953         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1954         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1955         Problems reported by Georg Schwarz for IRIX 5.3.
1956
1957         * gnulib-tool (autoconf_minversion): Take the maximum version number
1958         found, not the minimum.  Problem reported by James Youngman.
1959
1960 2007-01-03  Karl Berry  <karl@gnu.org>
1961
1962         * doc/error.texi: new file, explaining interaction with progname.
1963         * doc/gnulib.texi: include it.  Update copyright.
1964
1965 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1966
1967         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1968         AC_CANONICAL_HOST, to improve autobuild outputs.
1969
1970 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1971             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1972
1973         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1974         sockets, server sockets, and other file descriptors.  Count errors
1975         to compute the return value.  Reorder the code a bit to be easier
1976         to follow.  Don't set event bits that were not requested (except
1977         POLLERR and POLLHUP).
1978
1979 2007-01-01  Bruno Haible  <bruno@clisp.org>
1980
1981         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1982
1983 2007-01-03  Jim Meyering  <jim@meyering.net>
1984
1985         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1986
1987 2007-01-02  Bruno Haible  <bruno@clisp.org>
1988
1989         * modules/settime (Include): Require timespec.h.
1990         * modules/nanosleep (Include): Likewise.
1991
1992 2007-01-01  Bruno Haible  <bruno@clisp.org>
1993
1994         * gnulib-tool (func_emit_copyright_notice): Bump year.
1995         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1996
1997 2007-01-01  Bruno Haible  <bruno@clisp.org>
1998
1999         Improve support for OpenBSD.
2000         * build-aux/config.rpath (libname_spec): Export.
2001         (library_names_spec): New variable. Export.
2002         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
2003         library_names_spec from the config.rpath output. Locate shared library
2004         through the name pattern in library_names_spec.
2005
2006 2007-01-01  Eric Blake  <ebb9@byu.net>
2007
2008         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
2009
2010 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
2011
2012         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
2013         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
2014         assume the C locale, and avoid an "eval" that could cause trouble.
2015         Problem with SORT reported by Bob Proulx.
2016
2017         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
2018         Define.  Trivial patch from Henning Nielsen Lund, originally
2019         sent to bug-grep@gnu.org today.
2020
2021 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2022
2023         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2024         struct stat.  Problem reported by Henning Nielsen Lund.
2025         * lib/acl.c: Include acl.h first, to check interface.  Don't
2026         bother to include sys/types.h and sys/stat.h again.
2027
2028 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2029
2030         Import the following change from libc; problem reported by
2031         Sven Verdoolaege.
2032
2033         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2034
2035         [BZ #1373]
2036         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2037
2038 2006-12-28  Jim Meyering  <jim@meyering.net>
2039
2040         * build-aux/announce-gen: Do not assume that the package
2041         builds any of tar.gz, tar.bz2, and .xdelta files.
2042         Suggestion from Simon Josefsson.
2043
2044 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2045
2046         * modules/announce-gen: New file.
2047
2048 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2049
2050         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2051         handles its gotchas now.
2052         * lib/mbswidth.c: Likewise.
2053         * lib/wcwidth.h: Likewise.
2054         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2055         and iswcntrl; the wctype module does this stuff now.
2056         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2057         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2058         * modules/mbchar (Depends-on): Add wctype.
2059         * modules/mbswidth (Depends-on): Likewise.
2060         * modules/wcwidth (Depends-on): Likewise.
2061
2062 2006-12-27  Eric Blake  <ebb9@byu.net>
2063
2064         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2065         module uses more than what <wctype.h> is required to provide.
2066
2067 2006-12-26  Eric Blake  <ebb9@byu.net>
2068
2069         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2070
2071 2006-12-26  Eric Blake  <ebb9@byu.net>
2072
2073         * modules/absolute-header: New module.
2074         * modules/fcntl (Depends-on): Depend on it.
2075         * modules/inttypes (Depends-on): Likewise.
2076         * modules/stdint (Depends-on): Likewise.
2077         * modules/sys_stat (Depends-on): Likewise.
2078         * modules/wctype (Depends-on): Likewise.
2079         * MODULES.html.sh (Support for building libraries and
2080         executables): Document it.
2081
2082 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2083
2084         * gnulib-tool (SED): Remove, undoing previous change.
2085         The problem was that it broke coreutils on Solaris, because
2086         "sed --posix" leaked into a makefile.
2087         (sed): New alias, if 'alias' and GNU sed.
2088
2089 2006-12-24  Jim Meyering  <jim@meyering.net>
2090
2091         Work around an fchownat bug in glibc-2.4:
2092         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2093         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2094         in spite of the -P option.
2095         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2096         New macros.
2097         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2098         * modules/openat (Files): Add lib/fchownat.c.
2099         * lib/openat.c (fchownat): Don't define here.  Move to...
2100         * lib/fchownat.c: ...this new file.
2101
2102 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2103
2104         Fix bug reported by Bruno Haible in
2105         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2106         where quotearg.c didn't compile on Mac OS X 10.2 because it
2107         lacks <wchar.h> and wint_t.
2108         * lib/wctype_.h (__wctype_wint_t): New type.
2109         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2110         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2111         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2112         Arg is now of type __wctype_wint_t, not wint_t.
2113         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2114         substitute HAVE_WINT_T.
2115         * modules/wctype (Files): Add m4/wint_t.m4.
2116         (wctype.h): Substitute HAVE_WINT_T.
2117
2118 2006-12-23  Bruno Haible  <bruno@clisp.org>
2119
2120         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2121
2122 2006-12-23  Bruno Haible  <bruno@clisp.org>
2123
2124         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2125         S_ISLNK.
2126         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2127         mingw.
2128
2129 2006-12-22  Bruno Haible  <bruno@clisp.org>
2130
2131         * lib/copy-file.c: Include acl.h.
2132         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2133         Close the file descriptors only after being done with copy_acl.
2134         * modules/copy-file (Depends-on): Add acl.
2135
2136 2006-12-22  Bruno Haible  <bruno@clisp.org>
2137
2138         * gnulib-tool (SED): New variable.
2139         Use $SED instead of sed everywhere.
2140
2141 2006-12-22  Bruno Haible  <bruno@clisp.org>
2142
2143         * modules/no-c++: New file.
2144         * m4/no-c++.m4: New file.
2145         * MODULES.html.sh (Support for building libraries and executables):
2146         Add no-c++.
2147
2148 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2149
2150         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2151         Include <limits.h>, and use its INT_MAX to rewrite the
2152         j loop so that it does not overflow 'int'.  Problem reported by
2153         Ralf Wildenhues in
2154         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2155         Play it safe by shifting left by 1 rather than multiplying by 2,
2156         as GCC is less likely to optimize this away when the value
2157         is signed (when it assumes overflow leads to undefined behavior).
2158         Also, don't assume time_t uses two's complement.
2159
2160 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2161
2162         * MODULES.html.sh: New module wctype.
2163         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2164         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2165         <wctype.h>, since the new wctype module should fix this.
2166         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2167         the wctype module should arrange for it.
2168         * lib/regex_internal.h: Likewise.
2169         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2170         since the wctype module should handle this now.
2171         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2172         * modules/fnmatch (Depends-on): Add wctype.
2173         * modules/quotearg (Depends-on): Likewise.
2174         * modules/regex (Depends-on): Likewise.
2175
2176 2006-12-19  Bruno Haible  <bruno@clisp.org>
2177
2178         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2179         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2180
2181 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2182
2183         * modules/savewd (Depends-on): Fix dependency on fcntl.
2184
2185 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2186
2187         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2188         conforms to C99, rather than relying on the user's environment
2189         setting of STDINT_H.
2190
2191 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2192         and Eric Blake  <ebb9@byu.net>
2193
2194         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2195         This is more consistent with the other defines here.
2196         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2197         Port to z/OS.  Problem reported by Paul Gilmartin.
2198         Change local vars to use gl_ prefix rather than ac_.
2199         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2200         with other defines.
2201         * modules/double-slash-root: New module.
2202         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2203         (Depends-on): Add double-slash-root.
2204         * MODULES.html.sh (File system functions): Mention new module.
2205
2206 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2207
2208         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2209         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2210         This is for the benefit of gzip, which doesn't do i18n.
2211
2212 2006-12-12  Jim Meyering  <jim@meyering.net>
2213
2214         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2215         Reported by Andreas Schwab <schwab@suse.de>.
2216
2217 2006-12-12  Bruno Haible  <bruno@clisp.org>
2218
2219         Merge these changes.
2220         2006-09-05  Bruno Haible  <bruno@clisp.org>
2221         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2222         iconv_alloc succeeded.
2223         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2224         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2225         test for " && dest " at the end - dest is always != NULL there. Call
2226         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2227         with 2xNULL arguments, also to flush the state storage. Handle the
2228         IRIX iconv behaviour. Realloc the final result, to throw away unused
2229         memory.
2230
2231 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2232
2233         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2234         and fchmodat unconditionally, since glibc 2.4 has them.
2235         Problem reported by Arkadiusz Miskiewicz.
2236
2237 2006-12-10  Bruno Haible  <bruno@clisp.org>
2238
2239         * gnulib-tool (func_import): Show the include files only for those
2240         modules that are copied and specified.
2241         Reported by Karl Berry.
2242
2243 2006-12-08  Jim Meyering  <jim@meyering.net>
2244
2245         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2246         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2247
2248         * build-aux/announce-gen: Add two new options, both optional:
2249         --bootstrap-tools=TOOL_LIST
2250               a comma-separated list of tools, e.g.,
2251               autoconf,automake,bison,gnulib
2252         --gnulib-snapshot-date=DATE
2253               if gnulib is in the bootstrap tool list,
2254               then report this as the snapshot date.
2255               If not specified, use the current date/time.
2256               If you specify a date here, be sure it's UTC.
2257
2258 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2259
2260         * tests/test-argp-2.sh: Fix test to match actual output.
2261         (func_compare): Fix sed script to be portable.
2262
2263 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2264
2265         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2266         workaround for this case.  It is not autoconfigured now; offhand
2267         it's hard to see how to autoconfigure it.
2268
2269 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2270
2271         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2272         a directory that is about to be chowned.  Such a directory's
2273         initial file permissions should permit the owner only and this
2274         should not be changed until after the chown, since the group and
2275         other bits would be incorrect if they granted permission before
2276         the chown.
2277
2278         Fix porting problem for iswctype reported by Georg Schwarz in:
2279         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2280         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2281         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2282         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2283         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2284
2285 2006-12-03  Jim Meyering  <jim@meyering.net>
2286
2287         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2288         p->fts_statp may not yet be defined.
2289         (fts_read): Instead, set it in the caller, once p->fts_statp is
2290         sure to be defined, and corresponds to a top-level directory.
2291         This bug made du -x fail.  Here's the coreutils test case:
2292         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2293         Reported by Mike Frysinger.
2294
2295 2006-12-01  Jim Meyering  <jim@meyering.net>
2296
2297         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2298         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2299         Reported by Simon Josefsson.
2300
2301 2006-11-30  Jim Meyering  <jim@meyering.net>
2302
2303         * m4/warning.m4: Use the all-permissive copyright notice
2304         recommended by RMS (rather than LGPL).
2305         * m4/vararrays.m4: Likewise.
2306         * m4/flexmember.m4: Likewise.
2307
2308 2006-11-29  Bruno Haible  <bruno@clisp.org>
2309
2310         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2311         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2312         using +=.
2313         Reported by Simon Josefsson <simon@josefsson.org>.
2314
2315 2006-11-28  James Youngman <jay@gnu.org>
2316
2317         * README: Advise users that they might find the bug-gnulib@gnu.org
2318         and autotools-announce@gnu.org mailing lists useful.
2319
2320 2006-11-28  Bruno Haible  <bruno@clisp.org>
2321
2322         * m4/ptrdiff_max.m4: Remove file.
2323
2324 2006-11-21  Bruno Haible  <bruno@clisp.org>
2325
2326         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2327         _AC_COMPUTE_INT.
2328         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2329         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2330         _AC_COMPUTE_INT.
2331         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2332         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2333         _AC_COMPUTE_INT.
2334         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2335
2336 2006-11-28  Jim Meyering  <jim@meyering.net>
2337
2338         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2339         warning from "gcc -Wshadow" about shadowing the builtin.
2340
2341 2006-11-27  Bruno Haible  <bruno@clisp.org>
2342
2343         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2344         _AC_COMPUTE_INT.
2345         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2346
2347 2006-11-27  Bruno Haible  <bruno@clisp.org>
2348             Paul Eggert  <eggert@cs.ucla.edu>
2349
2350         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2351
2352 2006-11-26  Bruno Haible  <bruno@clisp.org>
2353
2354         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2355         noinst_LTLIBRARIES.
2356
2357 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2358             Bruno Haible  <bruno@clisp.org>
2359
2360         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2361         if compiling with "gcc -ansi".
2362
2363 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2364
2365         Fix some incompatibilities with gcc -ansi -pedantic.
2366         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2367         if compiling pedantically with GCC, unless it's C99 or later.
2368         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2369         it mishandles gcc -ansi -pedantic as well.
2370         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2371         if gcc -pedantic.
2372         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2373         initializers for struct if -pedantic, unless it's C99 or later.
2374
2375 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2376
2377         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2378         Don't close an fd more than once. Identical atimes indicate
2379         success, not failure.
2380
2381 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2382
2383         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2384
2385 2006-11-23  Jim Meyering  <jim@meyering.net>
2386
2387         * build-aux/announce-gen: New file.  From coreutils.
2388
2389 2006-11-22  Jim Meyering  <jim@meyering.net>
2390
2391         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2392         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2393         (fts_read): Use a temporary to narrow the overused st_size member
2394         before using it in a switch statement.  Reported by Matthew Woehlke.
2395
2396         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2397         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2398
2399 2006-11-20  Bruno Haible  <bruno@clisp.org>
2400
2401         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2402         changequote instead of pairs of brackets.
2403         Reported by Andreas Schwab <schwab@suse.de>.
2404
2405 2006-11-21  Jim Meyering  <jim@meyering.net>
2406
2407         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2408         so as to remain compatible with older compilers.
2409         Patch from Michael Deutschmann.
2410
2411 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2412
2413         * MODULES.html.sh (File system functions): Add openat.
2414
2415         * lib/openat.h (rpl_fstatat): New macro, if
2416         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2417         (fstatat): Define to rpl_fstatat under the same conditions,
2418         unless COMPILING_FSTATAT.
2419         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2420         seems to have the bug.
2421         * lib/fstatat.c: New file.
2422         * modules/openat (Files): Add it.
2423
2424 2006-11-20  Bruno Haible  <bruno@clisp.org>
2425
2426         * Makefile: New file.
2427
2428 2006-11-20  Jim Meyering  <jim@meyering.net>
2429
2430         The beginnings of syntax-related checks for gnulib.
2431         * lib/Makefile: New file.
2432         * lib/t-idcache: New script.  Ensure that the two halves of
2433         idcache.c stay in sync.
2434
2435         * lib/idcache.c: Adjust comments in user- and group- portions to
2436         be more accurate, and to be consistent with one another.
2437
2438 2006-11-20  Jim Meyering  <jim@meyering.net>
2439
2440         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2441         continue using the flexible array member (thus, this module performs
2442         half as many malloc calls), with the addition that...
2443         (getgroup, getuser): Consistently record a non-match via an empty
2444         "name" string, and map an empty string match to a NULL return value.
2445         * modules/idcache (Depends-on): Re-add flexmember.
2446
2447         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2448         (getuidbyname, getgroup, getgidbyname): Likewise.
2449
2450         Use cleaner syntax: NULL rather than 0.
2451         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2452
2453 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2454
2455         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2456         It mishandled the case where the group was missing.
2457         Problem reported by Greg Schafer.
2458         * modules/idcache: Likewise.
2459
2460 2006-11-18  Jim Meyering  <jim@meyering.net>
2461
2462         * check-module (%exempt_header): Add exception for some
2463         conditionally-included headers.
2464
2465         * modules/i-ring (Depends-on): Add verify.
2466         (License): Change to LGPL.
2467
2468 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2469
2470         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2471         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2472         and inttostr.h.  Use snprintf rather than uinttostr, so that
2473         LGPLed code doesn't depend on GPLed.
2474
2475 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2476
2477         * modules/inline (License): Change from GPL to LGPL.
2478
2479 2006-11-17  Jim Meyering  <jim@meyering.net>
2480
2481         * modules/d-type (License): Switch to LGPL.
2482
2483 2006-11-15  Bruno Haible  <bruno@clisp.org>
2484
2485         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2486
2487 2006-11-15  Eric Blake  <ebb9@byu.net>
2488
2489         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2490         the module dependency.
2491
2492 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2493             Bruno Haible  <bruno@clisp.org>
2494
2495         * gnulib-tool (func_create_testdir): Add license consistency check.
2496
2497 2006-11-15  Eric Blake  <ebb9@byu.net>
2498
2499         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2500         random "(cached)" in configure output.
2501
2502 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2503
2504         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2505         test for conforming inttypes.h is both announced and cached.
2506
2507         * MODULES.html.sh (seen_modules, seen_files): New variables.
2508         (func_module): Rewrite to use a few less gnulib-tool and sed
2509         invocations.  Avoid a couple of quadratic algorithms for ...
2510         (missed_modules, missed_files): ... these, with ...
2511         (func_append, func_tmpdir): ... these new functions, from
2512         gnulib-tool.  Analogously, install traps for cleanup.
2513
2514         * tests/test-gc.c (main): Remove unused variables.
2515         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2516
2517 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2518
2519         * modules/inttostr (License): Change to LGPL.
2520
2521 2006-11-14  Eric Blake  <ebb9@byu.net>
2522
2523         * modules/tempname (License): Change to LGPL.
2524
2525 2006-11-14  Eric Blake  <ebb9@byu.net>
2526
2527         * doc/functions.texi (Function Portability): *printf functions on
2528         Cygwin now understand all POSIX size specifiers.
2529
2530 2006-11-14  Bruno Haible  <bruno@clisp.org>
2531
2532         * modules/c-ctype (License): Change to LGPL.
2533
2534 2006-11-12  Bruno Haible  <bruno@clisp.org>
2535
2536         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2537         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2538         for GNOME libraries, for which the include files are installed in
2539         subdirectories of $prefix/include.
2540
2541 2006-11-12  Bruno Haible  <bruno@clisp.org>
2542
2543         * m4/lib-link.m4: Require at least autoconf-2.54.
2544         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2545         name to underscores for the --with option.
2546
2547 2006-11-13  Bruno Haible  <bruno@clisp.org>
2548
2549         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2550         the tests directory.
2551         Reported by Ralf Wildenhues.
2552
2553 2006-11-13  Bruno Haible  <bruno@clisp.org>
2554
2555         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2556         (func_emit_initmacro_end): Undo the override here.
2557         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2558         Works around the famous automake error in coreutils.
2559
2560 2006-11-13  Eric Blake  <ebb9@byu.net>
2561
2562         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2563         element, not its node.
2564
2565 2006-11-12  Bruno Haible  <bruno@clisp.org>
2566
2567         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2568         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2569
2570 2006-11-12  Bruno Haible  <bruno@clisp.org>
2571
2572         * gnulib-tool: New option --local-symlink.
2573         (func_usage): Document it.
2574         (lsymbolic): New variable.
2575         (func_import, func_create_testdir): If --symlink was not specified,
2576         test whether --local-symlink was specified and the file comes from
2577         the local_gnulib_dir.
2578
2579 2006-11-12  Bruno Haible  <bruno@clisp.org>
2580
2581         * gnulib-tool (func_ln): New function.
2582         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2583
2584 2006-11-12  Bruno Haible  <bruno@clisp.org>
2585
2586         Finish support for source files in subdirectories.
2587         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2588         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2589         AUTOMAKE_OPTIONS.
2590         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2591
2592 2006-11-12  Bruno Haible  <bruno@clisp.org>
2593
2594         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2595         EXTRA_lib_SOURCES augmentation.
2596         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2597
2598 2006-11-12  Jim Meyering  <jim@meyering.net>
2599
2600         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2601         file descriptors.  This also averts a failure on systems with
2602         native openat support when a traversed directory lacks "x" access.
2603         * lib/fts_.h: Include "i-ring.h"
2604         (struct FTS) [fts_fd_ring]: New member.
2605         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2606         (FCHDIR): Add parentheses.
2607         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2608         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2609         When descending, rather than simply closing the previous
2610         fts_cwd_fd value, push that file descriptor onto the ring.
2611         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2612         (fts_open): Initialize the new fd_ring member.
2613         (fts_close): Clear the ring.
2614         (fts_safe_changedir): When possible, use our new fd_ring to skip
2615         the diropen and fstat and dev/ino comparison that would normally
2616         accompany a virtual `chdir ("..")'.
2617
2618         * modules/fts (Depends-on): Add i-ring.
2619         * modules/i-ring: New module.
2620         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2621         * m4/i-ring.m4: New file.
2622
2623 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2624
2625         * gnulib-tool (func_create_testdir): Fix replacement of
2626         `build-aux' in configure.ac.  Run autotools in gltests
2627         subdirectory.
2628         (func_create_testdir, func_create_megatestdir, test): There is
2629         no need for '--force' in most autotool invocations in a new
2630         tree.  Actually fail the whole test if any of the tools, or the
2631         configure or make stages fail.
2632
2633         Sync from Automake.
2634         * build-aux/gnupload: Revert last change.  Add pointer to upload
2635         instructions of the GNU Maintenance Instructions.
2636         Suggestion by Karl Berry.
2637
2638 2006-11-10  Jim Meyering  <jim@meyering.net>
2639
2640         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2641
2642 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2643
2644         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2645         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2646         (bind_textdomain_codeset) [! ENABLE_NLS]:
2647         Evaluate all the arguments.  That way, callers get compatible behavior
2648         if the arguments have side effects.  Also, it avoids some GCC
2649         diagnostics in some cases; Joel E. Denny reported problems when Bison
2650         was configured with --enable-gcc-warnigs.
2651
2652 2006-11-10  Jim Meyering  <jim@meyering.net>
2653
2654         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2655         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2656         account.
2657
2658 2006-11-10  Jim Meyering  <jim@meyering.net>
2659
2660         * modules/inline: New file/module.
2661         * modules/xalloc (Files): Remove m4/inline.m4.
2662         (Depends-on): Add inline, instead.
2663         * modules/oset: Likewise.
2664         * modules/list: Likewise.
2665
2666 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2667
2668         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2669         Problem reported by Matthew Woehlke.
2670
2671 2006-11-09  Bruno Haible  <bruno@clisp.org>
2672
2673         * lib/tempname.c (gen_tempname): Remove variant that invokes
2674         __gen_tempname.
2675         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2676         __gen_tempname.
2677
2678 2006-11-08  Bruno Haible  <bruno@clisp.org>
2679
2680         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2681         to 'yes' instead of 'cross-compiling'.
2682
2683 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2684
2685         * lib/quotearg.h (quotearg_free): New decl.
2686         * lib/quotearg.c (quotearg_free): New function.
2687         (slot0, nslots, slotvec0, slotvec):
2688         Now file-scope so that quotearg_free can get at them.
2689
2690 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2691
2692         Sync from Automake.
2693         * build-aux/gnupload: Add missing 'gnu' to example URL.
2694         Report by Karl Berry.
2695
2696 2006-11-08  Bruno Haible  <bruno@clisp.org>
2697
2698         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2699         Suggested by Paul Eggert.
2700
2701 2006-11-08  Jim Meyering  <jim@meyering.net>
2702
2703         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2704         It's already included if !_LIBC.
2705         (fts_safe_changedir): Add a comment.
2706
2707 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2708
2709         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2710         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2711         Matthew Woehlke.
2712
2713         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2714         definitions up, to avoid colliding with change below.
2715         (static_inline) [HAVE_INLINE]: New macro.
2716         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2717         Provide extern decls when !HAVE_INLINE.  Do not define unless
2718         static_inline is defined, either by us or by xmalloc.c.  Use
2719         static_inline rather than static inline.
2720         (XCALLOC): Optimize sizeof(T) = 1 case.
2721         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2722
2723 2006-11-07  Bruno Haible  <bruno@clisp.org>
2724
2725         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2726         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2727         AC_C_INLINE.
2728         * modules/xalloc (Files): Add m4/inline.m4.
2729
2730 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2731
2732         * README: Fix typo.
2733         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2734         (Miscellanous Notes): ...from this.
2735
2736 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2737
2738         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2739         Mention that offsetof should be used instead of sizeof.
2740         From Bruno Haible.
2741
2742 2006-11-07  Bruno Haible  <bruno@clisp.org>
2743
2744         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2745
2746 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2747
2748         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2749         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2750         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2751         (gl_tree_add_before, gl_tree_add_after):
2752         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2753         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2754         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2755         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2756         (gl_linked_add_after, gl_linked_add_at): Likewise.
2757         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2758         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2759         (gl_tree_add_before, gl_tree_add_after): Likewise.
2760         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2761         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2762         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2763
2764 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2765
2766         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2767
2768 2006-11-06  Bruno Haible  <bruno@clisp.org>
2769
2770         * m4/inline.m4: New file.
2771         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2772         * modules/list (Files): Add m4/inline.m4.
2773         * modules/oset (Files): Likewise.
2774
2775 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2776
2777         * lib/idcache.c: Include <stddef.h>, for offsetof.
2778         (struct userid.name): Change from char * to a flexible array member.
2779         All uses changed.
2780         * modules/idcache (Depends-on): Add flexmember.
2781
2782         * MODULES.html.sh (Core language properties): New module flexmember.
2783         * modules/flexmember, m4/flexmember.m4: New files.
2784
2785         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2786         inline functions that are identical with the old xnmalloc_inline,
2787         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2788         that we can avoid some unnecessary integer multiplications and
2789         divisions in the common case where the element size is known at
2790         compile time.
2791         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2792         needed.
2793         (xnboundedmalloc): Remove.
2794         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2795         arguments, for consistency with rest of this header.
2796         (xcharalloc): Rewrite using XNMALLOC.
2797         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2798         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2799         versions have been moved to lib/xalloc.h and renamed to be the
2800         non-*_inline versions.
2801         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2802         and xnrealloc functions, since those functions are now inline and
2803         now call us.
2804         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2805         renaming described above.
2806         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2807         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2808         captures the dependency in AC_C_INLINE.
2809
2810         New module canonicalize-lgpl, proposed by Charles Wilson in
2811         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2812         with a few small changes afterwards.
2813         * MODULES.html.sh (File system functions): New module
2814         canonicalize-lgpl.
2815         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2816         and canonicalize_file_name.
2817         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2818         * modules/canonicalize-lgpl: New files.
2819
2820 2006-11-05  Bruno Haible  <bruno@clisp.org>
2821
2822         * gnulib-tool (func_import, func_create_testdir): Create directories
2823         also for files in subdirectories of lib/.
2824
2825 2006-11-05  Bruno Haible  <bruno@clisp.org>
2826
2827         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2828         ANSI C compliant.
2829
2830 2006-11-03  Bruno Haible  <bruno@clisp.org>
2831
2832         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2833         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2834         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2835         (xnboundedmalloc): New inline function.
2836         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2837         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2838         xmalloc.
2839         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2840         xmalloc.
2841         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2842         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2843         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2844         xmalloc.
2845         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2846         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2847         xmalloc.
2848         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2849         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2850         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2851         xmalloc.
2852         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2853         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2854         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2855         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2856         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2857         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2858         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2859
2860 2006-11-03  Bruno Haible  <bruno@clisp.org>
2861
2862         * lib/c-ctype.h [C++]: Define functions without name mangling.
2863         * lib/fwriteerror.h [C++]: Likewise.
2864         * lib/gcd.h [C++]: Likewise.
2865         * lib/linebreak.h [C++]: Likewise.
2866
2867 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2868
2869         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2870         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2871         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2872         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2873         Check for functions and headers just once.
2874         Check for declaration of canonicalize_file_name.
2875         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2876
2877 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2878
2879         * gnulib-tool (func_import): Fix typo in actioncmd.
2880
2881 2006-11-02  Bruno Haible  <bruno@clisp.org>
2882
2883         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2884         newline sequence in the Makefile.am snippet as a space, like "make"
2885         does.
2886         Reported by Roger Persson <perrog@gmail.com>.
2887
2888 2006-11-01  Bruno Haible  <bruno@clisp.org>
2889
2890         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2891         already declared in <string.h>.
2892         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2893
2894 2006-11-01  Bruno Haible  <bruno@clisp.org>
2895
2896         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2897         * lib/strcase.h: Include <string.h>.
2898         (strcasecmp): Define to rpl_strcasecmp here.
2899
2900 2006-11-01  Bruno Haible  <bruno@clisp.org>
2901
2902         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2903
2904 2006-11-01  Eric Blake  <ebb9@byu.net>
2905
2906         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2907
2908         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2909
2910 2006-10-29  Bruno Haible  <bruno@clisp.org>
2911
2912         Make it compile in C++ mode.
2913         * lib/full-write.c (full_rw): Add a cast.
2914
2915 2006-11-01  Bruno Haible  <bruno@clisp.org>
2916
2917         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2918         be POSIX compliant.
2919         Reported by Roger Persson <perrog@gmail.com>.
2920
2921 2006-11-01  Eric Blake  <ebb9@byu.net>
2922
2923         * lib/getopt_.h: Fix comments.
2924
2925 2006-10-31  Eric Blake  <ebb9@byu.net>
2926
2927         * modules/tmpdir (Depends-on): Add sys_stat.
2928         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2929         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2930         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2931         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2932         tempname.
2933
2934 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2935
2936         Avoid some C++ diagnostics reported by Bruno Haible.
2937         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2938         xmalloc.
2939         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2940         (struct slotvec): Move to top level.
2941         (quotearg_n_options): Rewrite to avoid xmalloc.
2942         * lib/xalloc.h (xcharalloc): New function.
2943         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2944         [defined __cplusplus]: Add function template that provides result
2945         type propagation.  This part of the change is from Bruno Haible.
2946
2947 2006-10-29  Bruno Haible  <bruno@clisp.org>
2948
2949         Make it compile in C++ mode.
2950         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2951         * lib/strnlen1.c (strnlen1): Cast memchr result.
2952         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2953         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2954         (create_temp_dir): Rename local variable 'template'.
2955         (compile_csharp_using_sscli): Add cast.
2956         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2957         * lib/findprog.c (find_in_path): Likewise.
2958         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2959         * lib/wait-process.c (register_slave_subprocess): Likewise.
2960
2961 2006-10-22  Bruno Haible  <bruno@clisp.org>
2962
2963         * modules/tsearch: New file.
2964         * lib/tsearch.h: New file.
2965         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2966         * m4/tsearch.m4: New file.
2967         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2968
2969 2006-10-29  Eric Blake  <ebb9@byu.net>
2970
2971         * lib/arcfour.c: Assume config.h.
2972         * lib/arctwo.c: Likewise.
2973         * lib/base64.c: Likewise.
2974         * lib/check-version.c: Likewise.
2975         * lib/crc.c: Likewise.
2976         * lib/des.c: Likewise.
2977         * lib/gc-gnulib.c: Likewise.
2978         * lib/gc-libgcrypt.c: Likewise.
2979         * lib/gc-pbkdf2-sha1.c: Likewise.
2980         * lib/getaddrinfo.c: Likewise.
2981         * lib/getdelim.c: Likewise.
2982         * lib/getline.c: Likewise.
2983         * lib/hmac-md5.c: Likewise.
2984         * lib/hmac-sha1.c: Likewise.
2985         * lib/iconvme.c: Likewise.
2986         * lib/md2.c: Likewise.
2987         * lib/md4.c: Likewise.
2988         * lib/memxor.c: Likewise.
2989         * lib/read-file.c: Likewise.
2990         * lib/readline.c: Likewise.
2991         * lib/rijndael-alg-fst.c: Likewise.
2992         * lib/rijndael-api-fst.c: Likewise.
2993         * lib/xgetdomainname.c: Likewise.
2994
2995 2006-10-28  Eric Blake  <ebb9@byu.net>
2996
2997         * lib/xstrndup.c: Assume config.h.
2998
2999 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
3000
3001         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
3002         stat-macros.h is now for our own macros, whereas stat_h is for
3003         macros in the <sys/stat.h> name space.
3004         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
3005         (STAT_MACROS_H): Remove.
3006         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
3007         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
3008         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
3009         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
3010         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
3011         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
3012         Move these macros to ...
3013         * lib/stat_.h: here.  Don't include stat-macros.h.
3014         * lib/canonicalize.c: Don't include stat-macros.h.
3015         * lib/chown.c: Likewise.
3016         * lib/euidaccess.c: Likewise.
3017         * lib/file-type.c: Likewise.
3018         * lib/filemode.c: Likewise.
3019         * lib/glob.c: Likewise.
3020         * lib/isapipe.c: Likewise.
3021         * lib/lchown.c: Likewise.
3022         * lib/lstat.c: Likewise.
3023         * lib/mkdir-p.c: Likewise.
3024         * lib/rmdir.c: Likewise.
3025         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3026         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3027         unless mkdir isn't declared, to speed up 'configure'.
3028         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3029         would define all the S_* symbols.
3030         * modules/canonicalize (Depends-on):
3031         Depend on sys_stat, not stat-macros.
3032         * modules/chown: Likewise.
3033         * modules/euidaccess: Likewise.
3034         * modules/filemode: Likewise.
3035         * modules/file-type: Likewise.
3036         * modules/glob: Likewise.
3037         * modules/isapipe: Likewise.
3038         * modules/lchown: Likewise.
3039         * modules/lstat: Likewise.
3040         * modules/mkancesdirs: Likewise.
3041         * modules/rmdir: Likewise.
3042         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3043         * modules/modechange: Likewise.
3044         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3045         (configure.ac): Remove gl_STAT_MACROS.
3046         * modules/sys_stat (Depends-on): Remove stat-macros.
3047
3048 2006-10-27  Bruno Haible  <bruno@clisp.org>
3049
3050         * m4/signed.m4: Remove file.
3051         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3052         invocation.
3053         * modules/vasnprintf (Files): Remove m4/signed.m4.
3054
3055 2006-10-27  Bruno Haible  <bruno@clisp.org>
3056
3057         Update to GNU gettext 0.16.
3058         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3059         m4/inttypes-h.m4, m4/signed.m4.
3060         * m4/gettext.m4: Update to GNU gettext 0.16.
3061         * m4/intl.m4: New file, from GNU gettext.
3062         * m4/intldir.m4: New file, from GNU gettext.
3063         * config/srclist.txt: Update
3064
3065 2006-10-27  Eric Blake  <ebb9@byu.net>
3066
3067         * MODULES.html.sh: Document tempname.
3068         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3069         dependencies.
3070         (Files): Move lib/tempname.c...
3071         * modules/tempname: ...to this new module.
3072         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3073         (gl_PREREQ_TEMPNAME): Move...
3074         * m4/tempname.m4: ...to this new file.
3075         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3076         * modules/sys_stat (Depends-on): Add stat-macros.
3077         * lib/stat_.h (includes): Pick up stat macros.
3078         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3079         if stat macros are broken.
3080         * lib/tempname.c (includes): No need to include "stat-macros.h".
3081         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3082         (direxists, __path_search) [!_LIBC]: Don't compile these in
3083         gnulib; the tmpdir module covers that.
3084         * lib/tempname.h: New file.
3085
3086 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3087
3088         * COPYING: Explain how gnulib-tool converts licence headers.
3089         Almost all wording by Eric Blake.
3090
3091 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3092
3093         * lib/mbchar.h (is_basic_table): Make read-only.
3094         * lib/mbchar.c (is_basic_table): Likewise.
3095         Reported by John Darrington.
3096
3097 2006-10-25  Bruno Haible  <bruno@clisp.org>
3098
3099         * lib/progname.h (set_program_name): Undefine before defining.
3100
3101 2006-10-25  Bruno Haible  <bruno@clisp.org>
3102
3103         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3104         false for non-gcc C++ compilers.
3105         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3106
3107 2006-10-24  Bruno Haible  <bruno@clisp.org>
3108
3109         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3110         iconv implementations like Irix iconv.
3111
3112 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3113
3114         * modules/vararrays: New file.
3115         * m4/vararrays.m4: New file, taken from diffutils.
3116         * MODULES.html.sh: New module vararrays.
3117
3118 2006-10-24  Karl Berry  <karl@gnu.org>
3119
3120         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3121         Don't call GNU Unix.
3122
3123 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3124
3125         * users.txt: Add Libtool.
3126
3127         Sync from Libtool:
3128
3129         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3130
3131         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3132         to gnulib's policy of including config.h unconditionally.
3133
3134 2006-10-24  Bruno Haible  <bruno@clisp.org>
3135
3136         * modules/wcwidth (Files): Add m4/wint_t.m4.
3137         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3138         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3139
3140 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3141
3142         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3143         to pacify GCC with some -W flags enabled.  Problem reported by
3144         Bruno Haible.
3145
3146 2006-10-24  Jim Meyering  <jim@meyering.net>
3147
3148         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3149         Reported by Karl Berry.
3150
3151 2006-10-23  Bruno Haible  <bruno@clisp.org>
3152
3153         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3154
3155 2006-10-24  Bruno Haible  <bruno@clisp.org>
3156
3157         * lib/gl_list.h: Use C comment style, not C++ comment style.
3158
3159 2006-10-23  Eric Blake  <ebb9@byu.net>
3160
3161         * lib/getaddrinfo.c (includes): Add missing include.
3162
3163 2006-10-23  Bruno Haible  <bruno@clisp.org>
3164             Paul Eggert  <eggert@cs.ucla.edu>
3165
3166         Ability to rename obstack_free.
3167         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3168         obstack_free.
3169         (obstack_free): Invoke the __obstack_free macro.
3170         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3171
3172 2006-10-23  Bruno Haible  <bruno@clisp.org>
3173             Paul Eggert  <eggert@cs.ucla.edu>
3174
3175         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3176         __argc, __argv from the declaration. (They are defined as macros on
3177         mingw.)
3178
3179 2006-10-22  Bruno Haible  <bruno@clisp.org>
3180
3181         * doc/gnulib-intro.texi: New file.
3182         * doc/gnulib.texi: Include it.
3183
3184 2006-10-21  Bruno Haible  <bruno@clisp.org>
3185
3186         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3187         "Introduction", "Miscellanous Notes", "Particular Modules".
3188
3189 2006-10-21  Bruno Haible  <bruno@clisp.org>
3190
3191         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3192         Change mostlyclean-local rule to avoid sh syntax error from bash
3193         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3194
3195 2006-10-23  Jim Meyering  <jim@meyering.net>
3196
3197         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3198         in place of snprintf.
3199
3200         * modules/inttostr (Files): Add lib/uinttostr.c.
3201         * lib/uinttostr.c (inttostr): New file/function.
3202         * lib/inttostr.h (uinttostr): Declare.
3203         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3204         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3205         Add uinttostr.
3206         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3207
3208 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3209
3210         * lib/canonicalize.c (ELOOP): Define if not already defined.
3211         Problem reported by Bruno Haible in
3212         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3213
3214 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3215
3216         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3217         Problem reported by Perry Smith and Ville Laurikari.
3218
3219         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3220         uses.
3221
3222 2006-10-19  Bruno Haible  <bruno@clisp.org>
3223
3224         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3225         for mingw.
3226
3227 2006-10-19  Bruno Haible  <bruno@clisp.org>
3228
3229         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3230         Needed for mingw.
3231
3232 2006-10-19  Bruno Haible  <bruno@clisp.org>
3233
3234         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3235
3236 2006-10-19  Bruno Haible  <bruno@clisp.org>
3237
3238         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3239         it.
3240
3241 2006-10-19  Bruno Haible  <bruno@clisp.org>
3242
3243         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3244         invocation.
3245
3246 2006-10-19  Bruno Haible  <bruno@clisp.org>
3247
3248         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3249         mountlist by default.
3250
3251 2006-10-16  Bruno Haible  <bruno@clisp.org>
3252
3253         * lib/c-strstr.c: Include c-strstr.h.
3254
3255 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3256
3257         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3258         in a slash.
3259
3260 2006-10-18  Bruno Haible  <bruno@clisp.org>
3261
3262         * lib/lock.h [C++]: Wrap definitions in extern "C".
3263
3264 2006-10-18  Bruno Haible  <bruno@clisp.org>
3265
3266         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3267         gl_LIBOBJS list.
3268
3269 2006-10-18  Bruno Haible  <bruno@clisp.org>
3270
3271         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3272
3273 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3274
3275         * lib/xstrtol.h: Include gettext.h.
3276         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3277         Problem reported by Eric Blake.
3278         * modules/xstrtol (Depends-on): Add gettext-h.
3279
3280 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3281
3282         * lib/strftime.c (advance): New macro.
3283         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3284         incomplete type, so you can't add 0 to it.  Problem and patch
3285         reported by Eelco Dolstra for dietlibc.
3286
3287 2006-10-18  Jim Meyering  <jim@meyering.net>
3288
3289         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3290         type for a local, and rename it: s/up/user_proc/.
3291
3292 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3293
3294         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3295         READ_UTMP_USER_PROCESS.
3296         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3297
3298 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3299
3300         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3301         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3302
3303 2006-10-17  Eric Blake  <ebb9@byu.net>
3304
3305         * lib/sigprocmask.c (sigprocmask): Fix typo.
3306
3307         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3308
3309         * modules/clean-temp (Makefile.am): Don't add to make output...
3310         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3311         config.h.
3312
3313 2006-10-17  Bruno Haible  <bruno@clisp.org>
3314
3315         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3316         differently if DEFAULT_TEXT_DOMAIN is set.
3317
3318 2006-10-16  Bruno Haible  <bruno@clisp.org>
3319
3320         * lib/clean-temp.c: Include fwriteerror.h.
3321
3322 2006-10-16  Bruno Haible  <bruno@clisp.org>
3323
3324         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3325
3326 2006-10-16  Bruno Haible  <bruno@clisp.org>
3327
3328         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3329         * lib/sigprocmask.h: Include <sys/types.h>.
3330         (sigset_t): Use the system's definition if present.
3331
3332 2006-10-17  Eric Blake  <ebb9@byu.net>
3333
3334         * lib/xvasprintf.c (includes): Assume config.h.
3335         * lib/xasprintf.c (includes): Likewise.
3336
3337 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3338
3339         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3340         at least as wide as intmax_t.
3341
3342 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3343
3344         (Imported from Automake.)
3345         * build-aux/gnupload: Update to version 1.1 of directive file.
3346
3347 2006-10-16  Eric Blake  <ebb9@byu.net>
3348
3349         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3350         match Automake 1.10a.
3351
3352 2006-10-14  Bruno Haible  <bruno@clisp.org>
3353
3354         * modules/sigprocmask: New file.
3355         * lib/sigprocmask.h: New file.
3356         * lib/sigprocmask.c: New file.
3357         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3358         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3359         request sigprocmask.o.
3360         (gl_PREREQ_SIGPROCMASK): New macro.
3361         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3362         (Depends-on): Add sigprocmask.
3363         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3364         gt_SIGNALBLOCKING. Test for 'raise' only once.
3365         * lib/fatal-signal.c: Include sigprocmask.h.
3366         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3367         unblock_fatal_signals): Define always.
3368         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3369         sigprocmask.
3370
3371 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3372
3373         Sync from Automake.
3374         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3375         which incorrectly sets the mode of an existing destination
3376         directory.  In some cases the unpatched install-sh could do the
3377         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3378         system.  We hope this is rare in practice, but it's clearly worth
3379         fixing.  Problem reported by Alex Unleashed in
3380         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3381         Also, don't bother to check for -m bugs unless we're using -m;
3382         suggested by Stepan Kasal.
3383
3384 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3385
3386         Sync from Automake.
3387         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3388         `-c' flag, so they appear at the same position as in %FASTDEP%
3389         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3390         which ignores unknown options only after the first non-option.
3391         Bug report against M4 by Nelson H. F. Beebe.
3392
3393 2006-10-13  Jim Meyering  <jim@meyering.net>
3394
3395         Fix a bug in yesterday's change.
3396         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3397         p->fts_statp->st_dev would be used uninitialized.
3398         Ensures that we always call fts_stat on the very first entry.
3399         Miklos Szeredi reported that find -xdev stopped working.
3400
3401 2006-10-12  Bruno Haible  <bruno@clisp.org>
3402
3403         * gnulib-tool (func_get_automake_snippet): Append an automatically
3404         computed EXTRA_DIST augmentation.
3405         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3406         * modules/alloca-opt (Makefile.am): Likewise.
3407         * modules/allocsa (Makefile.am): Likewise.
3408         * modules/arcfour (Makefile.am): Likewise.
3409         * modules/arctwo (Makefile.am): Likewise.
3410         * modules/argmatch (Makefile.am): Likewise.
3411         * modules/argz (Makefile.am): Likewise.
3412         * modules/atexit (Makefile.am): Likewise.
3413         * modules/backupfile (Makefile.am): Likewise.
3414         * modules/byteswap (Makefile.am): Likewise.
3415         * modules/c-strtod (Makefile.am): Likewise.
3416         * modules/c-strtold (Makefile.am): Likewise.
3417         * modules/calloc (Makefile.am): Likewise.
3418         * modules/canon-host (Makefile.am): Likewise.
3419         * modules/canonicalize (Makefile.am): Likewise.
3420         * modules/chdir-long (Makefile.am): Likewise.
3421         * modules/chdir-safer (Makefile.am): Likewise.
3422         * modules/check-version (Makefile.am): Likewise.
3423         * modules/chown (Makefile.am): Likewise.
3424         * modules/cloexec (Makefile.am): Likewise.
3425         * modules/close-stream (Makefile.am): Likewise.
3426         * modules/closeout (Makefile.am): Likewise.
3427         * modules/crc (Makefile.am): Likewise.
3428         * modules/csharpexec (Makefile.am): Likewise.
3429         * modules/cycle-check (Makefile.am): Likewise.
3430         * modules/des (Makefile.am): Likewise.
3431         * modules/dev-ino (Makefile.am): Likewise.
3432         * modules/dirfd (Makefile.am): Likewise.
3433         * modules/dirname (Makefile.am): Likewise.
3434         * modules/dup2 (Makefile.am): Likewise.
3435         * modules/eealloc (Makefile.am): Likewise.
3436         * modules/error (Makefile.am): Likewise.
3437         * modules/euidaccess (Makefile.am): Likewise.
3438         * modules/exclude (Makefile.am): Likewise.
3439         * modules/exitfail (Makefile.am): Likewise.
3440         * modules/fcntl-safer (Makefile.am): Likewise.
3441         * modules/fcntl (Makefile.am): Likewise.
3442         * modules/file-type (Makefile.am): Likewise.
3443         * modules/fileblocks (Makefile.am): Likewise.
3444         * modules/filemode (Makefile.am): Likewise.
3445         * modules/filenamecat (Makefile.am): Likewise.
3446         * modules/fnmatch (Makefile.am): Likewise.
3447         * modules/fopen-safer (Makefile.am): Likewise.
3448         * modules/fpending (Makefile.am): Likewise.
3449         * modules/fprintftime (Makefile.am): Likewise.
3450         * modules/free (Makefile.am): Likewise.
3451         * modules/fsusage (Makefile.am): Likewise.
3452         * modules/ftruncate (Makefile.am): Likewise.
3453         * modules/fts (Makefile.am): Likewise.
3454         * modules/gc-arcfour (Makefile.am): Likewise.
3455         * modules/gc-des (Makefile.am): Likewise.
3456         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3457         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3458         * modules/gc-md4 (Makefile.am): Likewise.
3459         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3460         * modules/gc-sha1 (Makefile.am): Likewise.
3461         * modules/gc (Makefile.am): Likewise.
3462         * modules/getaddrinfo (Makefile.am): Likewise.
3463         * modules/getcwd (Makefile.am): Likewise.
3464         * modules/getdelim (Makefile.am): Likewise.
3465         * modules/getdomainname (Makefile.am): Likewise.
3466         * modules/getgroups (Makefile.am): Likewise.
3467         * modules/gethostname (Makefile.am): Likewise.
3468         * modules/gethrxtime (Makefile.am): Likewise.
3469         * modules/getline (Makefile.am): Likewise.
3470         * modules/getloadavg (Makefile.am): Likewise.
3471         * modules/getlogin_r (Makefile.am): Likewise.
3472         * modules/getndelim2 (Makefile.am): Likewise.
3473         * modules/getopt (Makefile.am): Likewise.
3474         * modules/getpagesize (Makefile.am): Likewise.
3475         * modules/getpass-gnu (Makefile.am): Likewise.
3476         * modules/getpass (Makefile.am): Likewise.
3477         * modules/getsubopt (Makefile.am): Likewise.
3478         * modules/gettime (Makefile.am): Likewise.
3479         * modules/gettimeofday (Makefile.am): Likewise.
3480         * modules/getugroups (Makefile.am): Likewise.
3481         * modules/getusershell (Makefile.am): Likewise.
3482         * modules/glob (Makefile.am): Likewise.
3483         * modules/group-member (Makefile.am): Likewise.
3484         * modules/hard-locale (Makefile.am): Likewise.
3485         * modules/hash (Makefile.am): Likewise.
3486         * modules/hmac-md5 (Makefile.am): Likewise.
3487         * modules/hmac-sha1 (Makefile.am): Likewise.
3488         * modules/human (Makefile.am): Likewise.
3489         * modules/idcache (Makefile.am): Likewise.
3490         * modules/imaxabs (Makefile.am): Likewise.
3491         * modules/imaxdiv (Makefile.am): Likewise.
3492         * modules/inet_ntop (Makefile.am): Likewise.
3493         * modules/inet_pton (Makefile.am): Likewise.
3494         * modules/intprops (Makefile.am): Likewise.
3495         * modules/inttostr (Makefile.am): Likewise.
3496         * modules/inttypes (Makefile.am): Likewise.
3497         * modules/isapipe (Makefile.am): Likewise.
3498         * modules/javaversion (Makefile.am): Likewise.
3499         * modules/lchmod (Makefile.am): Likewise.
3500         * modules/lchown (Makefile.am): Likewise.
3501         * modules/localcharset (Makefile.am): Likewise.
3502         * modules/long-options (Makefile.am): Likewise.
3503         * modules/lstat (Makefile.am): Likewise.
3504         * modules/malloc (Makefile.am): Likewise.
3505         * modules/mathl (Makefile.am): Likewise.
3506         * modules/mbchar (Makefile.am): Likewise.
3507         * modules/md2 (Makefile.am): Likewise.
3508         * modules/md4 (Makefile.am): Likewise.
3509         * modules/md5 (Makefile.am): Likewise.
3510         * modules/memcasecmp (Makefile.am): Likewise.
3511         * modules/memchr (Makefile.am): Likewise.
3512         * modules/memcmp (Makefile.am): Likewise.
3513         * modules/memcoll (Makefile.am): Likewise.
3514         * modules/memcpy (Makefile.am): Likewise.
3515         * modules/memmem (Makefile.am): Likewise.
3516         * modules/memmove (Makefile.am): Likewise.
3517         * modules/mempcpy (Makefile.am): Likewise.
3518         * modules/memrchr (Makefile.am): Likewise.
3519         * modules/memset (Makefile.am): Likewise.
3520         * modules/memxor (Makefile.am): Likewise.
3521         * modules/mkancesdirs (Makefile.am): Likewise.
3522         * modules/mkdir-p (Makefile.am): Likewise.
3523         * modules/mkdir (Makefile.am): Likewise.
3524         * modules/mkdtemp (Makefile.am): Likewise.
3525         * modules/mkstemp (Makefile.am): Likewise.
3526         * modules/mktime (Makefile.am): Likewise.
3527         * modules/modechange (Makefile.am): Likewise.
3528         * modules/mountlist (Makefile.am): Likewise.
3529         * modules/nanosleep (Makefile.am): Likewise.
3530         * modules/obstack (Makefile.am): Likewise.
3531         * modules/openat (Makefile.am): Likewise.
3532         * modules/pagealign_alloc (Makefile.am): Likewise.
3533         * modules/pathmax (Makefile.am): Likewise.
3534         * modules/physmem (Makefile.am): Likewise.
3535         * modules/poll (Makefile.am): Likewise.
3536         * modules/posixtm (Makefile.am): Likewise.
3537         * modules/posixver (Makefile.am): Likewise.
3538         * modules/putenv (Makefile.am): Likewise.
3539         * modules/quote (Makefile.am): Likewise.
3540         * modules/quotearg (Makefile.am): Likewise.
3541         * modules/raise (Makefile.am): Likewise.
3542         * modules/read-file (Makefile.am): Likewise.
3543         * modules/readline (Makefile.am): Likewise.
3544         * modules/readlink (Makefile.am): Likewise.
3545         * modules/readtokens (Makefile.am): Likewise.
3546         * modules/readutmp (Makefile.am): Likewise.
3547         * modules/realloc (Makefile.am): Likewise.
3548         * modules/regex (Makefile.am): Likewise.
3549         * modules/rename-dest-slash (Makefile.am): Likewise.
3550         * modules/rename (Makefile.am): Likewise.
3551         * modules/rijndael (Makefile.am): Likewise.
3552         * modules/rmdir (Makefile.am): Likewise.
3553         * modules/rpmatch (Makefile.am): Likewise.
3554         * modules/safe-read (Makefile.am): Likewise.
3555         * modules/safe-write (Makefile.am): Likewise.
3556         * modules/same-inode (Makefile.am): Likewise.
3557         * modules/same (Makefile.am): Likewise.
3558         * modules/save-cwd (Makefile.am): Likewise.
3559         * modules/savedir (Makefile.am): Likewise.
3560         * modules/setenv (Makefile.am): Likewise.
3561         * modules/settime (Makefile.am): Likewise.
3562         * modules/sha1 (Makefile.am): Likewise.
3563         * modules/sig2str (Makefile.am): Likewise.
3564         * modules/snprintf (Makefile.am): Likewise.
3565         * modules/stat-macros (Makefile.am): Likewise.
3566         * modules/stat-time (Makefile.am): Likewise.
3567         * modules/stdbool (Makefile.am): Likewise.
3568         * modules/stdint (Makefile.am): Likewise.
3569         * modules/stdlib-safer (Makefile.am): Likewise.
3570         * modules/stpcpy (Makefile.am): Likewise.
3571         * modules/stpncpy (Makefile.am): Likewise.
3572         * modules/strcase (Makefile.am): Likewise.
3573         * modules/strcasestr (Makefile.am): Likewise.
3574         * modules/strchrnul (Makefile.am): Likewise.
3575         * modules/strcspn (Makefile.am): Likewise.
3576         * modules/strdup (Makefile.am): Likewise.
3577         * modules/strerror (Makefile.am): Likewise.
3578         * modules/strftime (Makefile.am): Likewise.
3579         * modules/strndup (Makefile.am): Likewise.
3580         * modules/strnlen (Makefile.am): Likewise.
3581         * modules/strpbrk (Makefile.am): Likewise.
3582         * modules/strsep (Makefile.am): Likewise.
3583         * modules/strstr (Makefile.am): Likewise.
3584         * modules/strtod (Makefile.am): Likewise.
3585         * modules/strtoimax (Makefile.am): Likewise.
3586         * modules/strtok_r (Makefile.am): Likewise.
3587         * modules/strtol (Makefile.am): Likewise.
3588         * modules/strtoll (Makefile.am): Likewise.
3589         * modules/strtoul (Makefile.am): Likewise.
3590         * modules/strtoull (Makefile.am): Likewise.
3591         * modules/strtoumax (Makefile.am): Likewise.
3592         * modules/strverscmp (Makefile.am): Likewise.
3593         * modules/sys_socket (Makefile.am): Likewise.
3594         * modules/sys_stat (Makefile.am): Likewise.
3595         * modules/sysexits (Makefile.am): Likewise.
3596         * modules/time_r (Makefile.am): Likewise.
3597         * modules/timegm (Makefile.am): Likewise.
3598         * modules/timespec (Makefile.am): Likewise.
3599         * modules/tmpfile-safer (Makefile.am): Likewise.
3600         * modules/trim (Makefile.am): Likewise.
3601         * modules/unistd-safer (Makefile.am): Likewise.
3602         * modules/unlinkdir (Makefile.am): Likewise.
3603         * modules/unlocked-io (Makefile.am): Likewise.
3604         * modules/userspec (Makefile.am): Likewise.
3605         * modules/utime (Makefile.am): Likewise.
3606         * modules/utimecmp (Makefile.am): Likewise.
3607         * modules/utimens (Makefile.am): Likewise.
3608         * modules/vasnprintf (Makefile.am): Likewise.
3609         * modules/vasprintf (Makefile.am): Likewise.
3610         * modules/vsnprintf (Makefile.am): Likewise.
3611         * modules/xalloc (Makefile.am): Likewise.
3612         * modules/xgetcwd (Makefile.am): Likewise.
3613         * modules/xnanosleep (Makefile.am): Likewise.
3614         * modules/xreadlink (Makefile.am): Likewise.
3615         * modules/xstrtod (Makefile.am): Likewise.
3616         * modules/xstrtol (Makefile.am): Likewise.
3617         * modules/xstrtold (Makefile.am): Likewise.
3618         * modules/yesno (Makefile.am): Likewise.
3619         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3620
3621 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3622
3623         * modules/error (Makefile.am): Distribute files through
3624         EXTRA_DIST, not lib_SOURCES.
3625
3626 2006-10-12  Eric Blake  <ebb9@byu.net>
3627
3628         * modules/error (Makefile.am): Distribute files in /lib.
3629         * modules/obstack (Makefile.am): Likewise.
3630
3631 2006-10-12  Bruno Haible  <bruno@clisp.org>
3632
3633         * modules/acl (Makefile.am): Distribute all files in lib/ through
3634         EXTRA_DIST.
3635         * modules/arcfour (Makefile.am): Likewise.
3636         * modules/arctwo (Makefile.am): Likewise.
3637         * modules/argmatch (Makefile.am): Likewise.
3638         * modules/argz (Makefile.am): Likewise.
3639         * modules/atexit (Makefile.am): Likewise.
3640         * modules/backupfile (Makefile.am): Likewise.
3641         * modules/c-strtod (Makefile.am): Likewise.
3642         * modules/c-strtold (Makefile.am): Likewise.
3643         * modules/calloc (Makefile.am): Likewise.
3644         * modules/canon-host (Makefile.am): Likewise.
3645         * modules/canonicalize (Makefile.am): Likewise.
3646         * modules/chdir-long (Makefile.am): Likewise.
3647         * modules/chdir-safer (Makefile.am): Likewise.
3648         * modules/check-version (Makefile.am): Likewise.
3649         * modules/chown (Makefile.am): Likewise.
3650         * modules/cloexec (Makefile.am): Likewise.
3651         * modules/close-stream (Makefile.am): Likewise.
3652         * modules/closeout (Makefile.am): Likewise.
3653         * modules/crc (Makefile.am): Likewise.
3654         * modules/cycle-check (Makefile.am): Likewise.
3655         * modules/des (Makefile.am): Likewise.
3656         * modules/dirfd (Makefile.am): Likewise.
3657         * modules/dirname (Makefile.am): Likewise.
3658         * modules/dup2 (Makefile.am): Likewise.
3659         * modules/euidaccess (Makefile.am): Likewise.
3660         * modules/exclude (Makefile.am): Likewise.
3661         * modules/exitfail (Makefile.am): Likewise.
3662         * modules/fcntl-safer (Makefile.am): Likewise.
3663         * modules/file-type (Makefile.am): Likewise.
3664         * modules/fileblocks (Makefile.am): Likewise.
3665         * modules/filemode (Makefile.am): Likewise.
3666         * modules/filenamecat (Makefile.am): Likewise.
3667         * modules/fnmatch (Makefile.am): Likewise.
3668         * modules/fopen-safer (Makefile.am): Likewise.
3669         * modules/fpending (Makefile.am): Likewise.
3670         * modules/fprintftime (Makefile.am): Likewise.
3671         * modules/free (Makefile.am): Likewise.
3672         * modules/fsusage (Makefile.am): Likewise.
3673         * modules/ftruncate (Makefile.am): Likewise.
3674         * modules/fts (Makefile.am): Likewise.
3675         * modules/gc (Makefile.am): Likewise.
3676         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3677         * modules/getaddrinfo (Makefile.am): Likewise.
3678         * modules/getcwd (Makefile.am): Likewise.
3679         * modules/getdelim (Makefile.am): Likewise.
3680         * modules/getdomainname (Makefile.am): Likewise.
3681         * modules/getgroups (Makefile.am): Likewise.
3682         * modules/gethostname (Makefile.am): Likewise.
3683         * modules/gethrxtime (Makefile.am): Likewise.
3684         * modules/getline (Makefile.am): Likewise.
3685         * modules/getloadavg (Makefile.am): Likewise.
3686         * modules/getlogin_r (Makefile.am): Likewise.
3687         * modules/getopt (Makefile.am): Likewise.
3688         * modules/getpass (Makefile.am): Likewise.
3689         * modules/getpass-gnu (Makefile.am): Likewise.
3690         * modules/getsubopt (Makefile.am): Likewise.
3691         * modules/gettime (Makefile.am): Likewise.
3692         * modules/gettimeofday (Makefile.am): Likewise.
3693         * modules/getugroups (Makefile.am): Likewise.
3694         * modules/getusershell (Makefile.am): Likewise.
3695         * modules/glob (Makefile.am): Likewise.
3696         * modules/group-member (Makefile.am): Likewise.
3697         * modules/hard-locale (Makefile.am): Likewise.
3698         * modules/hash (Makefile.am): Likewise.
3699         * modules/hmac-md5 (Makefile.am): Likewise.
3700         * modules/hmac-sha1 (Makefile.am): Likewise.
3701         * modules/human (Makefile.am): Likewise.
3702         * modules/idcache (Makefile.am): Likewise.
3703         * modules/imaxabs (Makefile.am): Likewise.
3704         * modules/imaxdiv (Makefile.am): Likewise.
3705         * modules/inet_ntop (Makefile.am): Likewise.
3706         * modules/inet_pton (Makefile.am): Likewise.
3707         * modules/inttostr (Makefile.am): Likewise.
3708         * modules/isapipe (Makefile.am): Likewise.
3709         * modules/lchown (Makefile.am): Likewise.
3710         * modules/long-options (Makefile.am): Likewise.
3711         * modules/lstat (Makefile.am): Likewise.
3712         * modules/malloc (Makefile.am): Likewise.
3713         * modules/mathl (Makefile.am): Likewise.
3714         * modules/mbchar (Makefile.am): Likewise.
3715         * modules/md2 (Makefile.am): Likewise.
3716         * modules/md4 (Makefile.am): Likewise.
3717         * modules/md5 (Makefile.am): Likewise.
3718         * modules/memcasecmp (Makefile.am): Likewise.
3719         * modules/memchr (Makefile.am): Likewise.
3720         * modules/memcmp (Makefile.am): Likewise.
3721         * modules/memcoll (Makefile.am): Likewise.
3722         * modules/memcpy (Makefile.am): Likewise.
3723         * modules/memmem (Makefile.am): Likewise.
3724         * modules/memmove (Makefile.am): Likewise.
3725         * modules/mempcpy (Makefile.am): Likewise.
3726         * modules/memrchr (Makefile.am): Likewise.
3727         * modules/memset (Makefile.am): Likewise.
3728         * modules/memxor (Makefile.am): Likewise.
3729         * modules/mkancesdirs (Makefile.am): Likewise.
3730         * modules/mkdir (Makefile.am): Likewise.
3731         * modules/mkdir-p (Makefile.am): Likewise.
3732         * modules/mkdtemp (Makefile.am): Likewise.
3733         * modules/mkstemp (Makefile.am): Likewise.
3734         * modules/mktime (Makefile.am): Likewise.
3735         * modules/modechange (Makefile.am): Likewise.
3736         * modules/mountlist (Makefile.am): Likewise.
3737         * modules/nanosleep (Makefile.am): Likewise.
3738         * modules/openat (Makefile.am): Likewise.
3739         * modules/pagealign_alloc (Makefile.am): Likewise.
3740         * modules/physmem (Makefile.am): Likewise.
3741         * modules/poll (Makefile.am): Likewise.
3742         * modules/posixtm (Makefile.am): Likewise.
3743         * modules/posixver (Makefile.am): Likewise.
3744         * modules/putenv (Makefile.am): Likewise.
3745         * modules/quote (Makefile.am): Likewise.
3746         * modules/quotearg (Makefile.am): Likewise.
3747         * modules/raise (Makefile.am): Likewise.
3748         * modules/read-file (Makefile.am): Likewise.
3749         * modules/readline (Makefile.am): Likewise.
3750         * modules/readlink (Makefile.am): Likewise.
3751         * modules/readtokens (Makefile.am): Likewise.
3752         * modules/readutmp (Makefile.am): Likewise.
3753         * modules/realloc (Makefile.am): Likewise.
3754         * modules/regex (Makefile.am): Likewise.
3755         * modules/rename (Makefile.am): Likewise.
3756         * modules/rename-dest-slash (Makefile.am): Likewise.
3757         * modules/rijndael (Makefile.am): Likewise.
3758         * modules/rmdir (Makefile.am): Likewise.
3759         * modules/rpmatch (Makefile.am): Likewise.
3760         * modules/safe-read (Makefile.am): Likewise.
3761         * modules/safe-write (Makefile.am): Likewise.
3762         * modules/same (Makefile.am): Likewise.
3763         * modules/save-cwd (Makefile.am): Likewise.
3764         * modules/savedir (Makefile.am): Likewise.
3765         * modules/setenv (Makefile.am): Likewise.
3766         * modules/settime (Makefile.am): Likewise.
3767         * modules/sha1 (Makefile.am): Likewise.
3768         * modules/sig2str (Makefile.am): Likewise.
3769         * modules/snprintf (Makefile.am): Likewise.
3770         * modules/stdlib-safer (Makefile.am): Likewise.
3771         * modules/stpcpy (Makefile.am): Likewise.
3772         * modules/stpncpy (Makefile.am): Likewise.
3773         * modules/strcase (Makefile.am): Likewise.
3774         * modules/strcasestr (Makefile.am): Likewise.
3775         * modules/strchrnul (Makefile.am): Likewise.
3776         * modules/strcspn (Makefile.am): Likewise.
3777         * modules/strdup (Makefile.am): Likewise.
3778         * modules/strerror (Makefile.am): Likewise.
3779         * modules/strftime (Makefile.am): Likewise.
3780         * modules/strndup (Makefile.am): Likewise.
3781         * modules/strnlen (Makefile.am): Likewise.
3782         * modules/strpbrk (Makefile.am): Likewise.
3783         * modules/strsep (Makefile.am): Likewise.
3784         * modules/strstr (Makefile.am): Likewise.
3785         * modules/strtod (Makefile.am): Likewise.
3786         * modules/strtoimax (Makefile.am): Likewise.
3787         * modules/strtok_r (Makefile.am): Likewise.
3788         * modules/strtol (Makefile.am): Likewise.
3789         * modules/strtoll (Makefile.am): Likewise.
3790         * modules/strtoul (Makefile.am): Likewise.
3791         * modules/strtoull (Makefile.am): Likewise.
3792         * modules/strtoumax (Makefile.am): Likewise.
3793         * modules/strverscmp (Makefile.am): Likewise.
3794         * modules/time_r (Makefile.am): Likewise.
3795         * modules/timegm (Makefile.am): Likewise.
3796         * modules/tmpfile-safer (Makefile.am): Likewise.
3797         * modules/unistd-safer (Makefile.am): Likewise.
3798         * modules/unlinkdir (Makefile.am): Likewise.
3799         * modules/userspec (Makefile.am): Likewise.
3800         * modules/utime (Makefile.am): Likewise.
3801         * modules/utimecmp (Makefile.am): Likewise.
3802         * modules/utimens (Makefile.am): Likewise.
3803         * modules/vasnprintf (Makefile.am): Likewise.
3804         * modules/vasprintf (Makefile.am): Likewise.
3805         * modules/vsnprintf (Makefile.am): Likewise.
3806         * modules/xalloc (Makefile.am): Likewise.
3807         * modules/xgetcwd (Makefile.am): Likewise.
3808         * modules/xnanosleep (Makefile.am): Likewise.
3809         * modules/xreadlink (Makefile.am): Likewise.
3810         * modules/xstrtod (Makefile.am): Likewise.
3811         * modules/xstrtol (Makefile.am): Likewise.
3812         * modules/xstrtold (Makefile.am): Likewise.
3813         * modules/yesno (Makefile.am): Likewise.
3814
3815 2006-10-12  Jim Meyering  <jim@meyering.net>
3816
3817         * m4/getloadavg.m4: Revert the change below.
3818
3819         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3820         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3821         fail with a symlink, which is what coreutils' ./bootstrap now
3822         creates by default.
3823
3824 2006-10-12  Bruno Haible  <bruno@clisp.org>
3825
3826         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3827         mingw.
3828         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3829         MSVC and mingw explicitly.
3830
3831 2006-10-11  Simon Josefsson  <jas@extundo.com>
3832             Bruno Haible  <bruno@clisp.org>
3833
3834         Add support for multiple gnulib-tool invocations in the scope of a
3835         single configure.ac file.
3836         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3837         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3838         with the same contents as the _LIBADD variable.
3839         (func_emit_initmacro_start, func_emit_initmacro_end,
3840         func_emit_initmacro_done): New functions.
3841         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3842         gl_LIBOBJS and gl_LTLIBOBJS.
3843
3844 2006-10-11  Bruno Haible  <bruno@clisp.org>
3845
3846         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3847         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3848         autoreconf. Instead, invoke autopoint explicitly but move back the
3849         *.m4 files from gnulib.
3850
3851 2006-10-11  Bruno Haible  <bruno@clisp.org>
3852
3853         * gnulib-tool (func_usage): Make module names after --create-testdir
3854         optional.
3855         (func_create_testdir): If no module was specified, use nearly all
3856         modules.
3857
3858 2006-10-12  Jim Meyering  <jim@meyering.net>
3859
3860         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3861         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3862         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3863         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3864         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3865         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3866         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3867         (fts_set_stat_required): New function.
3868         (fts_open): Defer the calls to fts_stat, if possible or requested.
3869         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3870         into fts_stat itself.
3871         (fts_read): Perform any required (deferred) fts_stat call.
3872         (fts_build): Likewise, for the directory we're about to open and read.
3873         In the readdir loop, carefully decide whether each entry will require
3874         an eventual call to fts_stat, using dirent.d_type info if available.
3875         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3876         a command line argument into this function.  Update all callers.
3877         Map a return value of FTS_DOT to FTS_D for a command line argument.
3878         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3879         Thanks to Miklos Szeredi for his tenacity and for the initial
3880         bug report about "find" failing on a FUSE-based file system.
3881
3882         * lib/fts.c (fts_open): Use consistent indentation.
3883
3884 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3885
3886         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3887         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3888         reported by Jim Meyering.  All uses of cache variables renamed
3889         to match Autoconf's.
3890         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3891         the other one.
3892
3893         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3894         Fix misspelling in diagnostic.
3895
3896 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3897
3898         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3899         defined.  Problem reported by Matthew Woehlke.
3900
3901         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3902         Add support for Tandem NonStop R series.
3903         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3904         Use new macro.
3905
3906         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3907         (has_trailing_slash): Omit size arg; all callers changed.
3908         Omit 'inline', since it doesn't help performance and we'd
3909         need to configure it.
3910         Don't count //, ///, etc. as having a trailing slash.
3911         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3912         (rpl_rename_dest_slash): On failure, use rename's errno rather
3913         than (in some cases) an incorrect or junk errno.
3914         Simplify code by removing need to compute length; this does
3915         cause it to make two passes instead of one over the file name,
3916         but it's worth it.
3917
3918         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3919         change, since Autoconf's version may no longer be appropriate now
3920         that we are using CVS Autoconf's version.  Add support for Tandem.
3921
3922 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3923             Bruno Haible  <bruno@clisp.org>
3924
3925         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3926         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3927         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3928         gl_AC_TYPE_LONG_LONG.
3929
3930         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3931         instead of HAVE_LONG_LONG.
3932         * lib/printf-args.c (printf_fetchargs): Likewise.
3933         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3934         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3935         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3936         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3937         gl_AC_TYPE_LONG_LONG.
3938
3939 2006-10-11  Bruno Haible  <bruno@clisp.org>
3940
3941         * m4/longlong.m4: Add comments.
3942         * m4/ulonglong.m4: Likewise.
3943
3944 2006-10-10  Bruno Haible  <bruno@clisp.org>
3945
3946         Make it possible to #define stpcpy, strdup to aliases.
3947         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3948         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3949
3950 2006-10-10  Bruno Haible  <bruno@clisp.org>
3951
3952         Make it possible to #define gcd to an alias.
3953         * lib/gcd.c: Include config.h.
3954
3955 2006-10-10  Bruno Haible  <bruno@clisp.org>
3956
3957         Make it possible to #define c_isascii to an alias.
3958         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3959         defined. Undefine the macros before defining them, to avoid gcc
3960         warnings.
3961         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3962         define NO_C_CTYPE_MACROS early.
3963
3964 2006-10-10  Bruno Haible  <bruno@clisp.org>
3965
3966         Make it possible to #define set_program_name to an alias.
3967         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3968         ENABLE_RELOCATABLE early.
3969
3970 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3971
3972         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3973         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3974         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3975         More generally, don't assume that 64-bit signed int is available
3976         if unsigned int is, and vice versa.
3977         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3978         unsigned symbols, not on their signed counterparts.
3979         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3980         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3981         (UINT64_C, UINTMAX_C):
3982         Likewise.
3983         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3984         unsigned counterparts.
3985         (Have_long_long, Unsigned): New macros.
3986         (Int): Renamed from INT.
3987         (strtoimax): Use the new macros.
3988         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3989         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3990         * modules/inttypes (inttypes.h): Substitute
3991         HAVE_UNSIGNED_LONG_LONG_INT.
3992         * modules/stdint (stdint.h): Likewise.
3993         (Files): Add m4/ulonglong.m4.
3994
3995 2006-10-10  Bruno Haible  <bruno@clisp.org>
3996
3997         Fix a gcc -Wshadow warning.
3998         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3999         to 'bucket'.
4000         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
4001         gl_linked_indexof_from_to): Likewise.
4002         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
4003         Likewise.
4004         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
4005         Likewise.
4006         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
4007         Reported by Eric Blake.
4008
4009 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
4010
4011         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
4012         for NetBSD.  Problem reported by Bruno Haible.
4013
4014 2006-10-09  Jim Meyering  <jim@meyering.net>
4015
4016         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
4017         Patch from Bruno Haible.
4018
4019 2006-10-09  Jim Meyering  <jim@meyering.net>
4020
4021         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
4022         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
4023         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4024
4025 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4026
4027         Don't include <config.h> twice; this doesn't work in some cases,
4028         e.g., when config.h has "#define intmax_t long long int" and
4029         we include <config.h>, <inttypes.h>, <config.h> in that order.
4030         Problem reported by Matthew Woehlke in:
4031         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4032         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4033         * lib/fts-cycle.c: Don't include config.h.
4034         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4035         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4036         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4037         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4038         inttypes.h.
4039         * lib/xstrtoumax.c: Likewise.
4040         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4041         __strtol and the like, so that this module is more like its siblings.
4042         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4043         Remove; no longer needed now that we assume gnulib inttypes.h.
4044
4045 2006-10-08  Bruno Haible  <bruno@clisp.org>
4046
4047         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4048         option.
4049
4050 2006-10-07  Jim Meyering  <jim@meyering.net>
4051
4052         * modules/inttypes (inttypes.h): Revert what seems to have been
4053         an inadvertent part of today's change: use "|", not "/" in the
4054         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4055
4056 2006-10-07  Bruno Haible  <bruno@clisp.org>
4057
4058         * modules/sublist: New file.
4059
4060 2006-10-07  Bruno Haible  <bruno@clisp.org>
4061
4062         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4063         * modules/argz (argz.h): Likewise.
4064         * modules/arpa_inet (arpa/inet.h): Likewise.
4065         * modules/byteswap (byteswap.h): Likewise.
4066         * modules/configmake (configmake.h): Likewise.
4067         * modules/fcntl (fcntl.h): Likewise.
4068         * modules/fnmatch (fnmatch.h): Likewise.
4069         * modules/getopt (getopt.h): Likewise.
4070         * modules/glob (glob.h): Likewise.
4071         * modules/inttypes (inttypes.h): Likewise.
4072         * modules/netinet_in (netinet/in.h): Likewise.
4073         * modules/poll (poll.h): Likewise.
4074         * modules/stdbool (stdbool.h): Likewise.
4075         * modules/stdint (stdint.h): Likewise.
4076         * modules/sys_select (sys/select.h): Likewise.
4077         * modules/sys_socket (sys/socket.h): Likewise.
4078         * modules/sys_stat (sys/stat.h): Likewise.
4079         * modules/sysexits (sysexits.h): Likewise.
4080         * modules/unistd (unistd.h): Likewise.
4081         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4082         Add a "DO NOT EDIT" comment to the generated file.
4083         (func_import): Likewise for gnulib-comp.m4.
4084
4085 2006-10-07  Bruno Haible  <bruno@clisp.org>
4086
4087         * lib/gl_sublist.h: New file.
4088         * lib/gl_sublist.c: New file.
4089
4090 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4091
4092         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4093         name (relative to the original working directory) and the file
4094         name component (relative to the temporary working directory).  All
4095         callers changed.
4096         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4097         * lib/mkdir-p.c (make_dir_parents): Likewise.
4098         * lib/mkdir-p.h (make_dir_parents): Likewise.
4099
4100 2006-10-06  Eric Blake  <ebb9@byu.net>
4101
4102         Define several macros for use by the clean-temp module.
4103         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4104         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4105         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4106
4107         * lib/clean-temp.h (close_stream_temp): New declaration.
4108         * lib/clean-temp.c (includes): Pull in headers according to what
4109         other modules are in use.
4110         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4111
4112 2006-10-06  Bruno Haible  <bruno@clisp.org>
4113
4114         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4115         instead of fopen, fwriteerror.
4116
4117 2006-10-06  Bruno Haible  <bruno@clisp.org>
4118
4119         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4120         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4121         int.
4122         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4123         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4124         Return an error indicator.
4125         Suggested by Eric Blake.
4126
4127 2006-10-06  Bruno Haible  <bruno@clisp.org>
4128
4129         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4130         Reported by Eric Blake.
4131
4132 2006-10-06  Bruno Haible  <bruno@clisp.org>
4133
4134         * modules/closeout (Description): Mention stderr too.
4135
4136 2006-10-06  Bruno Haible  <bruno@clisp.org>
4137         and Paul Eggert  <eggert@cs.ucla.edu>
4138
4139         * lib/closeout.c (close_stdout): Also close stderr.
4140         * lib/closeout.h: Update comment.
4141
4142 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4143
4144         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4145         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4146         * lib/dirchownmod.c: Include lchown.h.
4147         * lib/lchown.c: Don't include files that lchown.h now includes.
4148         Don't declare chown, since lchown.h now does that.
4149         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4150         (lchown): Define to rpl_chown if lchown is declared but
4151         does not exist.  Declare using a prototype if lchown is not
4152         declared.  Add a copyright notice.
4153         * lib/mkstemp.h: Include <unistd.h>.
4154         * lib/openat.c: Include lchown.h.
4155
4156         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4157         we now test for that separately.
4158         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4159         rather than O_NOFOLLOW, when testing whether it's possible to
4160         avoid a race condition reliably.
4161         * lib/savewd.c (savewd_chdir): Likewise.
4162
4163         Remove macros that are no longer needed now that stdint.h is
4164         reliable.
4165         * lib/fsusage.c (UINTMAX_MAX): Remove.
4166         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4167         * lib/utimecmp.c (SIZE_MAX): Remove.
4168
4169         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4170
4171         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4172         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4173         O_NOATIME works.
4174
4175 2006-10-05  Bruno Haible  <bruno@clisp.org>
4176
4177         * lib/gl_list.h (gl_sortedlist_search_from_to,
4178         gl_sortedlist_indexof_from_to): New declarations.
4179         (gl_list_implementation): New fields sortedlist_search_from_to,
4180         sortedlist_indexof_from_to.
4181         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4182         inline functions.
4183         * lib/gl_list.c (gl_sortedlist_search_from_to,
4184         gl_sortedlist_indexof_from_to): New functions.
4185         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4186         function.
4187         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4188         (gl_array_sortedlist_search_from_to): New function.
4189         (gl_array_list_implementation): Update.
4190         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4191         function.
4192         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4193         (gl_carray_sortedlist_search_from_to): New function.
4194         (gl_carray_list_implementation): Update.
4195         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4196         gl_linked_sortedlist_indexof_from_to): New functions.
4197         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4198         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4199         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4200         gl_tree_sortedlist_indexof_from_to): New functions.
4201         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4202         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4203         Update.
4204         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4205         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4206         Update.
4207
4208 2006-10-05  Bruno Haible  <bruno@clisp.org>
4209
4210         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4211         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4212         (struct gl_list_implementation): Add fields search_from_to,
4213         indexof_from_to. Remove fields search, indexof.
4214         (gl_list_search): Use the search_from_to method.
4215         (gl_list_search_from, gl_list_search_from_to): New functions.
4216         (gl_list_indexof): Use the indexof_from_to method.
4217         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4218         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4219         (gl_list_search_from, gl_list_search_from_to): New functions.
4220         (gl_list_indexof): Use the indexof_from_to method.
4221         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4222         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4223         gl_array_indexof. Add start_index, end_index arguments.
4224         (gl_array_search_from_to): Renamed from gl_array_search. Add
4225         start_index, end_index arguments.
4226         (gl_array_remove, gl_array_list_implementation): Update.
4227         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4228         gl_carray_indexof. Add start_index, end_index arguments.
4229         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4230         start_index, end_index arguments.
4231         (gl_carray_remove, gl_carray_list_implementation): Update.
4232         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4233         gl_linked_search. Add start_index, end_index arguments.
4234         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4235         start_index, end_index arguments.
4236         (gl_linked_remove): Update.
4237         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4238         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4239         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4240         field to 'size_t'.
4241         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4242         gl_tree_search. Add start_index, end_index arguments.
4243         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4244         start_index, end_index arguments.
4245         (gl_tree_remove): Update.
4246         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4247         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4248         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4249         function.
4250         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4251         gl_tree_search. Add start_index, end_index arguments.
4252         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4253         start_index, end_index arguments.
4254         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4255         Update.
4256         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4257
4258 2006-10-05  Bruno Haible  <bruno@clisp.org>
4259
4260         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4261
4262         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4263         fwriteerror_temp): New declarations.
4264         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4265         (descriptors): New variable.
4266         (cleanup): First, close the descriptors.
4267         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4268         fclose_temp, fwriteerror_temp): New functions.
4269
4270 2006-10-04  Jim Meyering  <jim@meyering.net>
4271
4272         * lib/fts.c (fts_open): Tiny comment change.
4273
4274 2006-10-04  Bruno Haible  <bruno@clisp.org>
4275
4276         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4277         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4278         gl_LOCK_BODY.
4279         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4280         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4281         gl_LOCK_EARLY_BODY.
4282         (gl_LOCK): Require gl_LOCK_BODY.
4283
4284 2006-10-04  Bruno Haible  <bruno@clisp.org>
4285
4286         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4287         (gl_oset_search_atleast): New declaration.
4288         (struct gl_oset_implementation): Add field 'search_atleast'.
4289         (gl_oset_search_atleast): New inline function.
4290         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4291         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4292         (gl_array_oset_implementation): Update.
4293         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4294         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4295         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4296
4297 2006-10-04  Bruno Haible  <bruno@clisp.org>
4298
4299         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4300
4301 2006-10-03  Bruno Haible  <bruno@clisp.org>
4302
4303         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4304         from gl_avltreehash_list_implementation.
4305
4306 2006-10-03  Bruno Haible  <bruno@clisp.org>
4307
4308         * lib/gl_oset.c (gl_oset_add): Fix return type.
4309
4310 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4311
4312         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4313
4314 2006-10-02  Eric Blake  <ebb9@byu.net>
4315
4316         * modules/strnlen (Depends-on): Add extensions.
4317
4318 2006-10-02  Eric Blake  <ebb9@byu.net>
4319
4320         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4321         definition in 2.60+.
4322
4323 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4324
4325         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4326         checks.
4327
4328 2006-10-02  Bruno Haible  <bruno@clisp.org>
4329
4330         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4331         to the AUTOMAKE_OPTIONS.
4332         Reported by Jim Meyering.
4333
4334 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4335
4336         Work around bug in Solaris 10 /proc file system:
4337         /proc/self/fd/NNN/.. isn't the parent directory of
4338         the directory whose file descriptor is NNN.  This needs to
4339         be worked around at run time, not compile time, since a
4340         program might be built on Solaris 8, where things work, and
4341         run on Solaris 10.
4342         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4343         to use the following interface instead:
4344         (OPENAT_BUFFER_SIZE): New macro.
4345         (openat_proc_name): New function.
4346         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4347         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4348         Likewise.
4349         * lib/openat-proc.c: New file.
4350         * modules/openat (Files): Add lib/openat-proc.c.
4351         (Depends-on): Add same-inode, stdbool.
4352         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4353
4354 2006-09-29  Bruno Haible  <bruno@clisp.org>
4355
4356         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4357         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4358         argument. Set stdout_closed before testing for ferror, not after.
4359         (fwriteerror, fwriteerror_no_ebadf): New functions.
4360
4361 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4362
4363         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4364
4365 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4366
4367         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4368         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4369
4370 2006-09-28  Jim Meyering  <jim@meyering.net>
4371
4372         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4373         Include <unistd.h>.
4374
4375 2006-09-28  Bruno Haible  <bruno@clisp.org>
4376
4377         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4378         * modules/linkedhash-list (Depends-on): Likewise.
4379         * modules/rbtreehash-list (Depends-on): Likewise.
4380
4381 2006-09-28  Bruno Haible  <bruno@clisp.org>
4382
4383         * lib/strndup.h: Simplify the redefinition of strndup.
4384         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4385         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4386
4387 2006-09-28  Bruno Haible  <bruno@clisp.org>
4388
4389         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4390         * lib/gl_linkedhash_list.c: Likewise.
4391         * lib/gl_rbtreehash_list.c: Likewise.
4392
4393 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4394
4395         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4396         getaddrinfo.
4397
4398         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4399         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4400         it causes <stdio_ext.h> to cause a compile-time error.
4401         Problem reported by Nelson H. F. Beebe.
4402         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4403         of HAVE_DECL___PENDING.
4404
4405         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4406         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4407         declaration.
4408
4409 2006-09-27  Jim Meyering  <jim@meyering.net>
4410
4411         This file could end up with a definition for a function
4412         named __strndup, rather than rpl_strndup on a system with
4413         incomplete weak_alias support.
4414         * lib/strndup.c (strndup): Rename from __strndup.
4415         Remove #defines that used to map __strndup to strndup.
4416         Don't use K&R prototypes.
4417         Remove LIBC-related code, since this file is not sync'd with glibc.
4418         * lib/strndup.h: Revamp, accordingly.
4419         * m4/strndup.m4: Modernize.
4420
4421 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4422
4423         * modules/savewd (Depends-on): Add 'raise'.
4424         * lib/savewd.c: Include <signal.h>, for 'raise'.
4425
4426 2006-09-26  Jim Meyering  <jim@meyering.net>
4427
4428         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4429         when we detect Darwin 8.7.0's acl_get_file bug.
4430         Rearrange to perform the new (below) run-test while $LIBS
4431         contains any acl-related library.  Set USE_ACL at the end.
4432         (gl_ACL_GET_FILE): New function.
4433
4434 2006-09-26  Eric Blake  <ebb9@byu.net>
4435
4436         * lib/verror.c: Include <config.h> unconditionally.
4437
4438 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4439
4440         * modules/clock-time (Maintainer): Add self.
4441         * modules/getlogin_r (Depends-on): Add extensions.
4442
4443 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4444
4445         * modules/clock-time: New module.
4446         * modules/nanosleep (Depends-on): Add clock-time.
4447         * modules/gethrxtime (Depends-on): Likewise.
4448         * modules/gettime (Depends-on): Likewise.
4449         * modules/settime (Depends-on): Likewise.
4450
4451         * modules/fts-lgpl: Depend on openat.
4452         * modules/mkancesdirs: Depend on savewd.
4453         * modules/mkdir-p: Likewise.
4454
4455 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4456
4457         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4458
4459         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4460         `gl_have_arbitrary_file_name_length_limit' to
4461         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4462         actually works between configure runs.
4463
4464 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4465             Bruno Haible  <bruno@clisp.org>
4466
4467         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4468
4469 2006-09-25  Jim Meyering  <jim@meyering.net>
4470
4471         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4472         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4473
4474 2006-09-25  Eric Blake  <ebb9@byu.net>
4475
4476         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4477         exec's in 2006-09-18 patch when shuffling fds.
4478
4479 2006-09-25  Bruno Haible  <bruno@clisp.org>
4480
4481         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4482         Reported by Jim Meyering.
4483
4484 2006-09-24  Jim Meyering  <jim@meyering.net>
4485
4486         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4487         compare a pointer against a literal "0".  That caused failures with
4488         at least HP-UX's hpcc.
4489
4490 2006-09-22  Simon Josefsson  <jas@extundo.com>
4491
4492         * modules/gc-sha1:
4493         * modules/gc-md4:
4494         * modules/gc-hmac-sha1:
4495         * modules/gc-hmac-md5:
4496         * modules/gc-des:
4497         * modules/gc-arcfour: Distribute more files.
4498
4499 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4500
4501         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4502         (gl_linked_iterator_from_to): Initialize struct completely.
4503         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4504         (gl_tree_iterator_from_to): Likewise
4505         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4506         * lib/gl_array_list.c [lint] (gl_array_iterator)
4507         (gl_array_iterator_from_to): Likewise.
4508         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4509         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4510         (gl_carray_iterator_from_to): Likewise.
4511
4512         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4513         * lib/md4.c (md4_process_block): Remove unused variable.
4514         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4515         parentheses for clarity.
4516
4517 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4518
4519         * modules/bison-i18n (Depends-on): Add gettext.
4520
4521 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4522
4523         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4524         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4525         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4526         also add missing comma that caused broken test.
4527         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4528         stdlib.h, for `abort'.
4529         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4530         variables.
4531         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4532         include unistd.h if present, for `rmdir'.
4533         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4534         variables.
4535         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4536         in the process include standard headers for prototypes.
4537         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4538         gets declared on GNU/Linux.
4539         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4540         unistd.h, for `rmdir'.
4541         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4542
4543         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4544         always true.
4545         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4546
4547         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4548
4549 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4550
4551         * gnulib-tool (func_version): Create output all at once.  This
4552         may help avoid triggering unnecessary SIGPIPEs, and at any
4553         rate it doesn't hurt.
4554
4555 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4556             Bruno Haible  <bruno@clisp.org>
4557
4558         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4559         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4560         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4561
4562         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4563         (gl_FUNC_VASPRINTF): Invoke it.
4564
4565 2006-09-22  Bruno Haible  <bruno@clisp.org>
4566
4567         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4568         getloadavg.c as first argument.
4569
4570 2006-09-22  Bruno Haible  <bruno@clisp.org>
4571
4572         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4573         at the beginning of the gl_INIT macro.
4574         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4575         gl_GETLOADAVG.
4576
4577 2006-09-22  Bruno Haible  <bruno@clisp.org>
4578
4579         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4580         module.
4581         Suggested by Ralf Wildenhues.
4582
4583 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4584
4585         Import this patch from libc:
4586
4587         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4588
4589         * lib/regex_internal.c (re_string_reconstruct): Handle
4590         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4591         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4592         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4593         re_string_context_at.
4594
4595         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4596         now requires it.
4597         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4598         gl_REGEX now does it for us.
4599         (gl_REGEX): Add test taken from
4600         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4601
4602         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4603         Check that large offsets work.  Modernize Autoconf usages.
4604         Prefer "yes" to mean a good thing rather than a bad.
4605         Don't put "#define mkstemp" in config.h, as this might interfere
4606         with standard system headers that "#define mkstemp mkstemp64".
4607
4608         * modules/mkstemp (Depends-on): Add extensions, so that
4609         mkstemp is visible on some platforms.
4610         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4611         (Include): Change to "mkstemp.h" from <stdlib.h>.
4612         (Files): Add mkstemp.h.
4613
4614         * lib/mkstemp.h: New file, since some standard headers
4615         #define mkstemp.
4616         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4617         Include "mkstemp.h".
4618         Make the _LIBC code resemble glibc original more,
4619         e.g., use K&R style.
4620         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4621         (mkstemp): Remove, since mkstemp.h does this for us.
4622         * lib/stdlib--.h: Include mkstemp.h.
4623
4624         Import this patch from libc:
4625
4626         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4627
4628         * lib/tempname.c (__gen_tempname): Change attempts_min
4629         into a macro.  Use preprocessor to decide how to initialize
4630         attempts [Coverity CID 67].
4631
4632 2006-09-20  Bruno Haible  <bruno@clisp.org>
4633
4634         * lib/mkdtemp.c: Import from libc.
4635         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4636                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4637                 attempts_min into a macro.  Use preprocessor to decide how to
4638                 initialize attempts [Coverity CID 67].
4639         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4640                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4641                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4642
4643 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4644
4645         * gnulib-tool (func_exit): New function, to allow to pass the
4646         exit status portably through the trap.  Use everywhere.
4647         (--help, --version): Signal a write error.
4648         (trap): catch SIGPIPE, for write errors.
4649         Exit at the end of the trap, with the correct exit status.
4650
4651 2006-09-19  Karl Berry  <karl@gnu.org>
4652
4653         * doc/gnulib.texi: note about the license texinfo files.
4654
4655 2006-09-19  Eric Blake  <ebb9@byu.net>
4656
4657         * gnulib-tool: Avoid space-tab.
4658
4659 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4660
4661         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4662         that prevented coreutils 6.1 from building.  Problem reported
4663         by Petter Reinholdtsen.
4664
4665 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4666
4667         * gnulib-tool (avoidlist): Fix typo that broke options like
4668         --avoid=lock that are used by coreutils bootstrap.
4669
4670 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4671
4672         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4673         more systematically.
4674
4675 2006-09-18  Jim Meyering  <jim@meyering.net>
4676
4677         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4678
4679 2006-09-18  Bruno Haible  <bruno@clisp.org>
4680
4681         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4682
4683 2006-09-18  Bruno Haible  <bruno@clisp.org>
4684
4685         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4686         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4687         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4688         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4689         * m4/gettext.m4: Require autoconf >= 2.52.
4690         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4691         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4692         of gl_cv_header_inttypes_h.
4693
4694 2006-09-18  Bruno Haible  <bruno@clisp.org>
4695
4696         * lib/javaversion.c: Include configmake.h.
4697
4698 2006-09-18  Bruno Haible  <bruno@clisp.org>
4699
4700         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4701         avoid that the while loops be executed in a subshell.
4702
4703 2006-09-18  Bruno Haible  <bruno@clisp.org>
4704
4705         * MODULES.html.sh (func_module): Break long lines.
4706         Suggested by Bruce Korb <bkorb@gnu.org>.
4707
4708 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4709
4710         Speed up by a factor of 1.12.
4711         * gnulib-tool (nl): New variable.
4712         (func_import): Rewrite include directive extraction to only read each
4713         directive once.
4714
4715 2006-09-17  Bruno Haible  <bruno@clisp.org>
4716
4717         * modules/javaversion (Makefile.am): Remove DEFS setting.
4718         (Depends-on): Add configmake, for PKGDATADIR definition.
4719
4720 2006-09-17  Bruno Haible  <bruno@clisp.org>
4721
4722         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4723
4724 2006-09-17  Bruno Haible  <bruno@clisp.org>
4725
4726         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4727         (func_modules_transitive_closure, func_modules_add_dummy,
4728         func_modules_to_filelist, func_import, func_create_testdir,
4729         func_create_megatestdir, ...): Use it wherever possible.
4730         Suggested by Ralf Wildenhues.
4731
4732 2006-09-16  Karl Berry  <karl@gnu.org>
4733
4734         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4735         to avoid sectioning errors.
4736         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4737         [ifinfo]: blank line after @center-ed titles.
4738         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4739         Spell FSF address consistently with others.
4740         (These changes approved by rms.)
4741
4742 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4743
4744         Speed up by a factor of 1.61.
4745         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4746         already checked module names again.
4747
4748 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4749
4750         Speed up by a factor of 1.13.
4751         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4752         for new_files, and the input to func_add_or_update.
4753
4754 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4755
4756         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4757         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4758
4759 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4760
4761         * modules/mkancesdirs (Depends-on): Add fcntl.
4762         * modules/savewd: New file.
4763         * MODULES.html.sh (File system functions): Add savewd.
4764
4765         * modules/configmake (Makefile.am): Add support for the
4766         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4767
4768 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4769
4770         * m4/savewd.m4: New file.
4771
4772 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4773
4774         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4775         (dirchownmod): New arg FD.  All callers changed.
4776         Use FD rather than opening the directory ourself, as opening is
4777         now the caller's responsibility.
4778         * lib/dirchownmod.h: Likewise.
4779         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4780         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4781         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4782         (test_dir): Remove.
4783         (mkancesdirs): Return length of prefix of FILE that has already
4784         been made, or -2 if there is a child doing the work.  Redo
4785         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4786         ".", and treat ".." specially since it might stray back into
4787         already-created areas.  Use a subprocess if necessary.  New arg
4788         WD; all users changed.  MAKE_DIR function should now return 1
4789         if it creates a directory that is not readable.  Return -2 if
4790         a child process is spun off.
4791         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4792         Adjust signature to match code.
4793         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4794         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4795         all users changed.
4796         * lib/savewd.c, lib/savewd.h: New files.
4797
4798 2006-09-15  Jim Meyering  <jim@meyering.net>
4799
4800         * modules/rename-dest-slash: New module.
4801         * MODULES.html.sh (posix_compat): Add it here.
4802
4803         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4804
4805 2006-09-15  Jim Meyering  <jim@meyering.net>
4806
4807         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4808         file.
4809
4810         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4811
4812 2006-09-15  Jim Meyering  <jim@meyering.net>
4813
4814         * lib/rename-dest-slash.c (has_trailing_slash): Use
4815         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4816         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4817         test before testing whether SRC is a directory.
4818         Suggestions from Bruno Haible.
4819
4820         Avoid a warning about an unused variable.
4821         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4822         into the #ifdef block where it's used.
4823
4824         * lib/rename-dest-slash.c: New file.
4825
4826 2006-09-14  Bruno Haible  <bruno@clisp.org>
4827
4828         * lib/allocsa.c: Include <config.h> unconditionally.
4829         * lib/asnprintf.c: Likewise.
4830         * lib/asprintf.c: Likewise.
4831         * lib/c-strcasecmp.c: Likewise.
4832         * lib/c-strcasestr.c: Likewise.
4833         * lib/c-strncasecmp.c: Likewise.
4834         * lib/c-strstr.c: Likewise.
4835         * lib/classpath.c: Likewise.
4836         * lib/clean-temp.c: Likewise.
4837         * lib/concatpath.c: Likewise.
4838         * lib/copy-file.c: Likewise.
4839         * lib/csharpcomp.c: Likewise.
4840         * lib/csharpexec.c: Likewise.
4841         * lib/execute.c: Likewise.
4842         * lib/fatal-signal.c: Likewise.
4843         * lib/findprog.c: Likewise.
4844         * lib/fwriteerror.c: Likewise.
4845         * lib/gl_array_list.c: Likewise.
4846         * lib/gl_array_oset.c: Likewise.
4847         * lib/gl_avltree_list.c: Likewise.
4848         * lib/gl_avltree_oset.c: Likewise.
4849         * lib/gl_avltreehash_list.c: Likewise.
4850         * lib/gl_carray_list.c: Likewise.
4851         * lib/gl_linked_list.c: Likewise.
4852         * lib/gl_linkedhash_list.c: Likewise.
4853         * lib/gl_list.c: Likewise.
4854         * lib/gl_oset.c: Likewise.
4855         * lib/gl_rbtree_list.c: Likewise.
4856         * lib/gl_rbtree_oset.c: Likewise.
4857         * lib/gl_rbtreehash_list.c: Likewise.
4858         * lib/imaxabs.c: Likewise.
4859         * lib/imaxdiv.c: Likewise.
4860         * lib/javacomp.c: Likewise.
4861         * lib/javaexec.c: Likewise.
4862         * lib/javaversion.c: Likewise.
4863         * lib/linebreak.c: Likewise.
4864         * lib/localcharset.c: Likewise.
4865         * lib/lock.c: Likewise.
4866         * lib/mbchar.c: Likewise.
4867         * lib/mbswidth.c: Likewise.
4868         * lib/mkdtemp.c: Likewise.
4869         * lib/pipe.c: Likewise.
4870         * lib/printf-args.c: Likewise.
4871         * lib/printf-parse.c: Likewise.
4872         * lib/progname.c: Likewise.
4873         * lib/progreloc.c: Likewise.
4874         * lib/readlink.c: Likewise.
4875         * lib/sh-quote.c: Likewise.
4876         * lib/stpcpy.c: Likewise.
4877         * lib/stpncpy.c: Likewise.
4878         * lib/strcasecmp.c: Likewise.
4879         * lib/strcasestr.c: Likewise.
4880         * lib/strcspn.c: Likewise.
4881         * lib/striconv.c: Likewise.
4882         * lib/strncasecmp.c: Likewise.
4883         * lib/strnlen1.c: Likewise.
4884         * lib/strstr.c: Likewise.
4885         * lib/strtok_r.c: Likewise.
4886         * lib/tls.c: Likewise.
4887         * lib/tmpdir.c: Likewise.
4888         * lib/unicodeio.c: Likewise.
4889         * lib/unsetenv.c: Likewise.
4890         * lib/vasnprintf.c: Likewise.
4891         * lib/vasprintf.c: Likewise.
4892         * lib/wait-process.c: Likewise.
4893         * lib/xallocsa.c: Likewise.
4894         * lib/xsetenv.c: Likewise.
4895         * lib/xstriconv.c: Likewise.
4896
4897 2006-09-13  Simon Josefsson  <jas@extundo.com>
4898
4899         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4900         that internally, suggested by Ralf Wildenhues
4901         <Ralf.Wildenhues@gmx.de>.
4902
4903 2006-09-13  Simon Josefsson  <jas@extundo.com>
4904
4905         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4906         @LIBOBJS@.
4907         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4908
4909 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4910
4911         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4912         longer worry about uses that don't define HAVE_CONFIG_H.
4913         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4914         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4915         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4916         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4917         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4918         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4919         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4920         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4921         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4922         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4923         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4924         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4925         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4926         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4927         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4928         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4929         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4930         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4931         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4932         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4933         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4934         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4935         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4936         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4937         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4938         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4939         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4940         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4941         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4942         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4943         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4944         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4945         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4946         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4947         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4948         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4949         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4950         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4951         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4952         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4953         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4954         Likewise.
4955
4956 2006-09-13  Eric Blake  <ebb9@byu.net>
4957
4958         * lib/getopt.c: Fix typo in last commit.
4959
4960 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4961
4962         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4963         dgettext.
4964
4965 2006-09-12  Jim Meyering  <jim@meyering.net>
4966
4967         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4968         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4969         Reported by Nelson H. F. Beebe.
4970
4971 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4972
4973         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4974         program_invocation_name and program_invocation_short_name are
4975         initialized.
4976         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4977         and program_invocation_short_name to argp.h, so they are visible
4978         to user programs.
4979         * lib/argp.h: Likewise
4980
4981 2006-09-10  Bruno Haible  <bruno@clisp.org>
4982
4983         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4984         m4/inttypes_h.m4, m4/uintmax_t.m4.
4985
4986 2006-09-10  Bruno Haible  <bruno@clisp.org>
4987
4988         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4989         gl_AC_TYPE_UINTMAX_T.
4990
4991 2006-09-10  Bruno Haible  <bruno@clisp.org>
4992
4993         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4994
4995 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4996
4997         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4998         convention.  Text proposed by Bruno Haible.
4999         (struct argp_option): Document the use of N_() wrappers.
5000
5001         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
5002         '\v', and translate the two parts separately, instead of feeding
5003         the whole string to gettext.  This allows to exclude
5004         '\v' from the strings visible to the translator by writing doc
5005         strings as N_("..") "\v" N_("..").
5006
5007 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
5008
5009         * config/srclist.txt: Undo latest change; the bug was fixed.
5010
5011 2006-09-09  Bruno Haible  <bruno@clisp.org>
5012
5013         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
5014         assignments if building a library without libtool.
5015         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
5016         in func_emit_lib_Makefile_am.
5017         (func_import): When building a static library libfoo.a, arrange to
5018         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
5019         (func_create_testdir): Likewise.
5020         * modules/gc (configure.ac, Makefile.am): If building statically,
5021         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
5022         * modules/iconvme (configure.ac, Makefile.am): Likewise.
5023         * modules/striconv (configure.ac, Makefile.am): Likewise.
5024         Based on a suggestion by Ralf Wildenhues.
5025
5026 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5027
5028         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5029         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5030         Also:
5031
5032         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5033         Add year_2050_test to catch glibc bug 2821
5034         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5035
5036         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5037         Prefer #ifdef to #if.
5038
5039         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5040         Return from 'main' instead of calling 'exit'.
5041
5042 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5043
5044         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5045         returned the maximum time_t value rather than (time_t) -1.
5046         Problem originally reported by William Bardwell
5047         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5048
5049         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5050         Moved to here ...
5051         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5052         ... from here.
5053
5054 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5055
5056         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5057         2821 is fixed.
5058
5059 2006-09-08  Jim Meyering  <jim@meyering.net>
5060
5061         Don't make generated files read-only.  That would bother too many
5062         people.  However, do retain the ability to work when targets are
5063         read-only: remove the destination and temporary files before writing
5064         them (when generated via sed or echo), or by using the -f option for
5065         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5066         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5067         * modules/byteswap, modules/configmake, modules/fcntl:
5068         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5069         * modules/localcharset, modules/netinet_in, modules/poll:
5070         * modules/stdbool, modules/stdint, modules/sys_select:
5071         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5072
5073 2006-09-08  Jim Meyering  <jim@meyering.net>
5074
5075         Avoid new build failure on FreeBSD 6.0.
5076         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5077         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5078         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5079
5080 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5081
5082         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5083
5084 2006-09-07  Jim Meyering  <jim@meyering.net>
5085
5086         Fix global typo in last change: use chmod u-w, not chmod u-x.
5087         Spotted by Paul Eggert and Bruce Korb.
5088         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5089         * modules/byteswap, modules/configmake, modules/fcntl:
5090         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5091         * modules/localcharset, modules/netinet_in, modules/poll:
5092         * modules/stdbool, modules/stdint, modules/sys_select:
5093         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5094
5095 2006-09-06  Jim Meyering  <jim@meyering.net>
5096
5097         Make generated files be read-only.
5098         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5099         Ensure that each generated file is now read-only.
5100         * modules/argz: Likewise.
5101         * modules/arpa_inet: Likewise.
5102         * modules/byteswap: Likewise.
5103         * modules/configmake: Likewise.
5104         * modules/fcntl: Likewise.
5105         * modules/fnmatch: Likewise.
5106         * modules/getopt: Likewise.
5107         * modules/glob: Likewise.
5108         * modules/inttypes: Likewise.
5109         * modules/netinet_in: Likewise.
5110         * modules/poll: Likewise.
5111         * modules/stdbool: Likewise.
5112         * modules/stdint: Likewise.
5113         * modules/sys_select: Likewise.
5114         * modules/sys_socket: Likewise.
5115         * modules/sys_stat: Likewise.
5116         * modules/sysexits: Likewise.
5117         * modules/localcharset: Same as above, but continue using temporary
5118         file named "t-$@" (why different?) rather than the "$@-t" used
5119         everywhere else.
5120
5121         * modules/sysexits (Makefile.am): Replace literal occurrences
5122         of "sysexit.h" more readable, and more consistent, "$@".
5123
5124 2006-09-06  Bruno Haible  <bruno@clisp.org>
5125
5126         * modules/striconv: New file.
5127         * modules/xstriconv: New file.
5128         * MODULES.html.sh (Internationalization functions): Add striconv,
5129         xstriconv.
5130
5131 2006-09-06  Bruno Haible  <bruno@clisp.org>
5132
5133         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5134         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5135         not using libtool correctly.
5136
5137 2006-09-06  Bruno Haible  <bruno@clisp.org>
5138
5139         * lib/striconv.h: New file.
5140         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5141         iconvstring.c.
5142         * lib/xstriconv.h: New file.
5143         * lib/xstriconv.c: New file.
5144
5145 2006-09-06  Bruno Haible  <bruno@clisp.org>
5146
5147         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5148         lib_..._LDFLAGS.
5149
5150 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5151
5152         * lib/argz_.h: Sync from Libtool.
5153
5154         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5155                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5156
5157         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5158
5159 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5160
5161         * modules/trim: New file.
5162
5163 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5164
5165         * lib/trim.h: New file.
5166         * lib/trim.c: New file.
5167
5168 2006-09-05  Bruno Haible  <bruno@clisp.org>
5169
5170         * MODULES.html.sh (String handling): Add trim.
5171
5172 2006-09-04  Karl Berry  <karl@gnu.org>
5173
5174         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5175         until next release.
5176
5177 2006-09-03  Bruno Haible  <bruno@clisp.org>
5178
5179         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5180         correctly.
5181
5182 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5183
5184         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5185         not gl_GETLOADAVG.  Omit unneeded semicolons.
5186         Problems reported by Ralf Wildenhues in
5187         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5188         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5189         at the end, which is the usual gnulib style.
5190
5191         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5192         of doing all the work ourselves.
5193         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5194         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5195
5196 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5197
5198         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5199         Problem reported by Ralf Wildenhues in
5200         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5201
5202         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5203         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5204
5205 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5206
5207         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5208         yesterday's patch by changing test -n to test -z.
5209
5210 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5211
5212         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5213         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5214         the former is now obsolescent.
5215
5216         * modules/chdir-long (Depends-on): Add fcntl.
5217
5218 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5219
5220         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5221         obsolescent, and programs should use gnulib instead.
5222         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5223         but with prefixes changed.
5224
5225 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5226
5227         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5228         or stdbool.h, because they might not exist while configuring.
5229
5230         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5231         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5232         does that for us.
5233         (O_DIRECTORY): Remove.
5234
5235 2006-08-31  Eric Blake  <ebb9@byu.net>
5236
5237         * gnulib-tool: Don't let emacs change spaces to TAB.
5238
5239 2006-08-31  Bruno Haible  <bruno@clisp.org>
5240
5241         * gnulib-tool: When calling func_import more than once, do it in a
5242         subshell.
5243         Reported by Eric Blake <ebb9@byu.net>.
5244
5245 2006-08-31  Bruno Haible  <bruno@clisp.org>
5246
5247         * gnulib-tool (nl): Remove variable.
5248         (sed_transform_lib_file): Use more robust test for config-h module.
5249         (func_import): Fix typo in 2006-08-25 patch.
5250
5251 2006-08-31  Bruno Haible  <bruno@clisp.org>
5252
5253         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5254         specified, augment Makefile.am variables instead of assigning them.
5255
5256 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5257
5258         Work around a bug in both the Linux and SunOS 64-bit kernels:
5259         nanosleep mishandles sleeps for longer than 2**31 seconds.
5260         Problem reported by Frank v Waveren in
5261         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5262         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5263         Check for nanosleep bug.
5264         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5265
5266 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5267
5268         Work around a bug in both the Linux and SunOS 64-bit kernels:
5269         nanosleep mishandles sleeps for longer than 2**31 seconds.
5270         Problem reported by Frank v Waveren in
5271         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5272         * lib/nanosleep.c (BILLION): New constant.
5273         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5274         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5275         implementation.
5276
5277 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5278
5279         * modules/nanosleep (Depends-on): Add gettime.
5280
5281 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5282         and Simon Josefsson  <jas@extundo.com>
5283         and Oskar Liljeblad  <oskar@osk.mine.nu>
5284
5285         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5286         * gnulib-tool (func_import): New license type 'unmodifiable license
5287         text'.
5288         * modules/fdl: Use it.  Longer description.
5289         * module/gpl, module/lgpl: New files.
5290
5291 2006-08-30  Jim Meyering  <jim@meyering.net>
5292
5293         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5294         shadowing the parameter.
5295
5296 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5297
5298         Sync from Libtool:
5299
5300         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5301
5302         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5303         sharing with gnulib.  Report by Eric Blake.
5304
5305 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5306
5307         * modules/isapipe: New file.
5308         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5309
5310 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5311
5312         * modules/configmake (Makefile.am): Add a comment, and omit
5313         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5314         by Bruno Haible.
5315
5316 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5317
5318         * m4/isapipe.m4: New file.
5319
5320 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5321
5322         * lib/isapipe.c, lib/isapipe.h: New files.
5323
5324 2006-08-29  Jim Meyering  <jim@meyering.net>
5325
5326         * modules/configmake (Makefile.am): Make configmake.h depend on
5327         Makefile.  Otherwise, a stale configmake.h could hang around.
5328
5329 2006-08-29  Eric Blake  <ebb9@byu.net>
5330
5331         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5332         resolution of upstream bug 3044.
5333
5334 2006-08-29  Bruno Haible  <bruno@clisp.org>
5335
5336         * modules/localcharset (Depends-on): Add configmake.
5337         (Makefile.am): Remove setting of LIBDIR through DEFS.
5338
5339 2006-08-29  Bruno Haible  <bruno@clisp.org>
5340
5341         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5342         defined.
5343
5344 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5345
5346         * modules/fcntl: New file.
5347         * modules/chdir-safer (Depends-on): Add fcntl.
5348         * modules/fts: Likewise.
5349         * modules/mkdir-p: Likewise.
5350
5351         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5352         This undoes the most recent change, since we're now addressing the
5353         problem in a different way.
5354
5355         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5356         into output, since the output might be called Makefile.am even
5357         if $makefile_name is something different.
5358         (func_import): Use $makefile_am rather than
5359         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5360         empty.
5361
5362         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5363
5364 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5365
5366         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5367         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5368         recent change to stdint.m4, since we're now addressing the problem in a
5369         different way.
5370
5371 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5372
5373         * m4/fcntl_h.m4: New file.
5374
5375 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5376
5377         * lib/fcntl_.h: New file.
5378         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5379         the fcntl module.
5380         * lib/dirchownmod.c: Likewise.
5381         * lib/fts.c: Likewise.
5382
5383         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5384         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5385         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5386         just before including <inttypes.h>, to avoid circular inclusion.
5387
5388 2006-08-28  Jim Meyering  <jim@meyering.net>
5389
5390         * doc/visibility.texi: Actually read and correct the grammar of the
5391         sentence affected by yesterday's change.
5392
5393 2006-08-28  Eric Blake  <ebb9@byu.net>
5394
5395         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5396         needs wrapper.
5397
5398 2006-08-28  Eric Blake  <ebb9@byu.net>
5399
5400         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5401
5402 2006-08-28  Eric Blake  <ebb9@byu.net>
5403
5404         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5405
5406 2006-08-28  Bruno Haible  <bruno@clisp.org>
5407
5408         * modules/c-strstr: New file, from GNU gettext.
5409         * MODULES.html.sh (String handling): Add c-strstr.
5410
5411 2006-08-28  Bruno Haible  <bruno@clisp.org>
5412
5413         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5414         macros.
5415         Reported by Eric Blake.
5416
5417 2006-08-28  Bruno Haible  <bruno@clisp.org>
5418
5419         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5420         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5421         * lib/vasprintf.c: Include errno.h, limits.h.
5422         (EOVERFLOW): New fallback definition.
5423         (vasprintf): Test here whether the string length is > INT_MAX.
5424         * lib/vsnprintf.c: Include errno.h, limits.h.
5425         (EOVERFLOW): New fallback definition.
5426         (vsnprintf): Fix bug when generated string was too long for the buffer.
5427         Test here whether the string length is > INT_MAX.
5428
5429 2006-08-28  Bruno Haible  <bruno@clisp.org>
5430
5431         * lib/inttypes_.h (SCNX*): Remove definitions.
5432         Reported by Eric Blake.
5433
5434 2006-08-28  Bruno Haible  <bruno@clisp.org>
5435
5436         * lib/c-strstr.h: New file, from GNU gettext.
5437         * lib/c-strstr.c: New file, from GNU gettext.
5438
5439 2006-08-28  Bruno Haible  <bruno@clisp.org>
5440
5441         * gnulib-tool: Reorder some statements.
5442
5443 2006-08-28  Bruno Haible  <bruno@clisp.org>
5444
5445         * gnulib-tool: New option --makefile-name.
5446         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5447         $makefile_name.
5448         (func_import): Write $makefile_name to the cache file, and read it from
5449         there unless explicitly specified. Use $makefile_name as file name
5450         instead of Makefile.am. Adjust the recommendations accordingly.
5451
5452 2006-08-28  Bruno Haible  <bruno@clisp.org>
5453
5454         * gnulib-tool (func_verify_module): Check against misapplying patch.
5455
5456 2006-08-28  Bruno Haible  <bruno@clisp.org>
5457
5458         * gnulib-tool (func_relativize, func_relconcat): New functions.
5459         Give an error if --local-dir is given with --update.
5460         Remove trailing slashes from $local_gnulib_dir.
5461         (func_import): Store the relativized $local_gnulib_dir in
5462         gnulib-cache.m4, and read it from there if not specified explicitly.
5463
5464 2006-08-28  Bruno Haible  <bruno@clisp.org>
5465
5466         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5467         is the current directory. Respect also $local_gnulib_dir.
5468
5469 2006-08-28  Bruno Haible  <bruno@clisp.org>
5470             Simon Josefsson  <jas@extundo.com>
5471
5472         BeOS portability.
5473         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5474
5475 2006-08-27  Jim Meyering  <jim@meyering.net>
5476
5477         * doc/visibility.texi: Remove duplicate word: "pointer".
5478
5479 2006-08-26  Bruno Haible  <bruno@clisp.org>
5480
5481         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5482         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5483         (Makefile.am): Create inttypes.h from inttypes_.h.
5484         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5485
5486         * modules/imaxabs: New file.
5487
5488         * modules/imaxdiv: New file.
5489
5490 2006-08-26  Bruno Haible  <bruno@clisp.org>
5491
5492         * m4/inttypes.m4: New file.
5493         * m4/_inttypes_h.m4: Remove file.
5494         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5495         PRI_MACROS_BROKEN.
5496         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5497
5498         * m4/imaxabs.m4: New file.
5499
5500         * m4/imaxdiv.m4: New file.
5501
5502 2006-08-26  Bruno Haible  <bruno@clisp.org>
5503
5504         * lib/inttypes_.h: New file.
5505         * lib/inttypes.h: Remove file.
5506         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5507
5508         * lib/imaxabs.c: New file.
5509
5510         * lib/imaxdiv.c: New file.
5511
5512 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5513
5514         New config-h module, so that "make" output needn't be cluttered
5515         by -DHAVE_CONFIG_H.
5516         * MODULES.html.sh (Support for building libraries and executables):
5517         Add config-h.
5518         * modules/config-h: New file.
5519         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5520         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5521         the config-h module is used.
5522
5523         New configmake module, so that "make" output needn't be cluttered
5524         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5525         * MODULES.html.sh (Support for building libraries and executables):
5526         Add configmake.
5527         * modules/configmake: New file.
5528
5529 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5530
5531         * m4/config-h.m4: New file.
5532
5533 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5534
5535         * config/srclist.txt: Add elisp-comp.
5536
5537 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5538
5539         * MODULES.html.sh (Support for building libraries and executables):
5540         Add elisp-comp.
5541         * build-aux/elisp-comp: New file.
5542         * modules/elisp-comp: New file.
5543
5544 2006-08-24  Bruno Haible  <bruno@clisp.org>
5545
5546         * gnulib-tool (func_create_testdir): Use non-default values of
5547         sourcebase and m4base.
5548
5549 2006-08-24  Bruno Haible  <bruno@clisp.org>
5550
5551         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5552         HTML structure.
5553
5554 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5555
5556         * modules/openat (Depends-on): Add lchown.
5557
5558 2006-08-23  Bruno Haible  <bruno@clisp.org>
5559
5560         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5561         of gl_LOCK_EARLY instead of gl_LOCK.
5562
5563 2006-08-23  Bruno Haible  <bruno@clisp.org>
5564
5565         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5566         on OSF/1 to no.
5567         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5568
5569 2006-08-23  Bruno Haible  <bruno@clisp.org>
5570
5571         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5572         as unusable.
5573
5574         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5575         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5576         (gl_LOCK): New macro.
5577
5578 2006-08-22  Simon Josefsson  <jas@extundo.com>
5579
5580         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5581         to md5 module.
5582
5583 2006-08-22  Simon Josefsson  <jas@extundo.com>
5584
5585         * MODULES.html.sh: Add "Support for maintaining and release
5586         projects".
5587
5588         * build-aux/gnupload: New file, from coreutils.
5589
5590 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5591
5592         Avoid the need for AC_LIBSOURCES in m4 macros.
5593         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5594         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5595         * modules/check-version (EXTRA_DIST): Add check-version.h.
5596         * modules/crc (EXTRA_DIST): Add crc.h.
5597         * modules/des (EXTRA_DIST): Add des.h.
5598         * modules/gc (EXTRA_DIST): Add gc.h.
5599         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5600         * modules/getline (EXTRA_DIST): Add getline.h.
5601         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5602         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5603         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5604         * modules/md2 (EXTRA_DIST): Add md2.h.
5605         * modules/md4 (EXTRA_DIST): Add md4.h.
5606         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5607         * modules/read-file (EXTRA_DIST): Add read-file.h.
5608         * modules/readline (EXTRA_DIST): Add readline.h.
5609         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5610         rijndael-api-fst.h.
5611
5612 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5613
5614         * m4/rijndael.m4 (gl_ARCFOUR):
5615         * m4/arctwo.m4 (gl_ARCTWO):
5616         * m4/check-version.m4 (gl_CHECK_VERSION):
5617         * m4/crc.m4 (gl_CRC):
5618         * m4/des.m4 (gl_DES):
5619         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5620         * m4/gc.m4 (gl_GC):
5621         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5622         * m4/getline.m4 (gl_FUNC_GETLINE):
5623         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5624         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5625         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5626         * m4/md2.m4 (gl_MD2):
5627         * m4/md4.m4 (gl_MD4):
5628         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5629         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5630         * m4/readline.m4 (gl_FUNC_READLINE):
5631         * m4/rijndael.m4 (gl_RIJNDAEL):
5632         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5633         to get the necessary .h files and whatnot.
5634
5635 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5636
5637         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5638         gnulib rather than the other way around.
5639         * config/srclistvars.sh (COREUTILS): Remove.
5640
5641 2006-08-22  Jim Meyering  <jim@meyering.net>
5642
5643         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5644
5645         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5646
5647 2006-08-22  Eric Blake  <ebb9@byu.net>
5648
5649         * modules/regexprops-generic: New file.
5650         * MODULES.html.sh (Support for building documentation): List it.
5651
5652 2006-08-22  Eric Blake  <ebb9@byu.net>
5653
5654         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5655         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5656         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5657         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5658
5659 2006-08-22  Bruno Haible  <bruno@clisp.org>
5660
5661         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5662         and lib_LTLIBRARIES like the other lib_* variables.
5663
5664 2006-08-22  Bruno Haible  <bruno@clisp.org>
5665
5666         * build-aux/x-to-1.in: New file, from GNU gettext.
5667
5668 2006-08-22  Bruno Haible  <bruno@clisp.org>
5669
5670         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5671         <utmpx.h> exists.
5672
5673 2006-08-22  Bruno Haible  <bruno@clisp.org>
5674
5675         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5676         <utmpx.h> exists.
5677
5678 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5679
5680         BeOS portability.
5681         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5682         exist.
5683         Problem reported by Bruno Haible.
5684
5685 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5686
5687         Avoid the need for AC_LIBSOURCES in m4 macros.
5688         * modules/acl (EXTRA_DIST): Add acl.h.
5689         * modules/argmatch (Files): Add m4/argmatch.m4.
5690         (configure.ac): Add gl_ARGMATCH.
5691         (EXTRA_DIST): Renamed from lib_SOURCES, for
5692         consistency with the other modules.  Remove argmatch.c.
5693         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5694         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5695         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5696         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5697         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5698         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5699         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5700         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5701         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5702         * modules/closeout (EXTRA_DIST): Add closeout.h.
5703         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5704         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5705         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5706         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5707         dirname.h; remove basename.c and stripslash.c.
5708         * modules/exclude (EXTRA_DIST): Add exclude.h.
5709         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5710         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5711         * modules/file-type (EXTRA_DIST): Add file-type.h.
5712         * modules/filemode (EXTRA_DIST): Add filemode.h.
5713         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5714         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5715         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5716         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5717         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5718         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5719         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5720         * modules/getdate (EXTRA_DIST): Add getdate.c.
5721         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5722         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5723         * modules/getpass (EXTRA_DIST): Add getpass.h.
5724         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5725         * modules/group-member (EXTRA_DIST): Add group-member.h.
5726         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5727         * modules/hash (EXTRA_DIST): Add hash.h.
5728         * modules/human (EXTRA_DIST): Add human.h.
5729         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5730         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5731         * modules/lchown (EXTRA_DIST): Add lchown.h.
5732         * modules/long-options (EXTRA_DIST): Add long-options.h.
5733         * modules/lstat (EXTRA_DIST): Add lstat.h.
5734         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5735         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5736         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5737         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5738         * modules/memxor (EXTRA_DIST): Add memxor.h.
5739         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5740         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5741         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5742         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5743         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5744         * modules/physmem (EXTRA_DIST): Add physmem.h.
5745         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5746         * modules/posixver (EXTRA_DIST): Add posixver.h.
5747         * modules/quote (EXTRA_DIST): Add quote.h.
5748         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5749         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5750         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5751         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5752         regex_internal.h regexec.c.
5753         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5754         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5755         * modules/same (EXTRA_DIST): Add same.h.
5756         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5757         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5758         * modules/savedir (EXTRA_DIST): Add savedir.h.
5759         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5760         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5761         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5762         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5763         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5764         * modules/strdup (EXTRA_DIST): Add strdup.h.
5765         * modules/strftime (EXTRA_DIST): Add strftime.h.
5766         * modules/strndup (EXTRA_DIST): Add strndup.h.
5767         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5768         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5769         * modules/time_r (EXTRA_DIST): Add time_r.h.
5770         * modules/timespec (EXTRA_DIST): Add timespec.h.
5771         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5772         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5773         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5774         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5775         * modules/userspec (EXTRA_DIST): Add userspec.h.
5776         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5777         * modules/utimens (EXTRA_DIST): Add utimens.h.
5778         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5779         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5780         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5781         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5782         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5783         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5784         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5785         * modules/yesno (EXTRA_DIST): Add yesno.h.
5786
5787 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5788
5789         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5790
5791         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5792         * m4/dev-ino.m4, same-inode.m4: Remove.
5793
5794         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5795         * m4/acl.m4 (AC_FUNC_ACL):
5796         * m4/backupfile.m4 (gl_BACKUPFILE):
5797         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5798         * m4/canon-host.m4 (gl_CANON_HOST):
5799         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5800         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5801         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5802         * m4/cloexec.m4 (gl_CLOEXEC):
5803         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5804         * m4/closeout.m4 (gl_CLOSEOUT):
5805         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5806         * m4/dirname.m4 (gl_DIRNAME):
5807         * m4/exclude.m4 (gl_EXCLUDE):
5808         * m4/exitfail.m4 (gl_EXITFAIL):
5809         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5810         * m4/file-type.m4 (gl_FILE_TYPE):
5811         * m4/filemode.m4 (gl_FILEMODE):
5812         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5813         * m4/fpending.m4 (gl_FUNC_FPENDING):
5814         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5815         * m4/fts.m4 (gl_FUNC_FTS):
5816         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5817         * m4/getdate.m4 (gl_GETDATE):
5818         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5819         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5820         * m4/getpass.m4 (gl_FUNC_GETPASS):
5821         * m4/gettime.m4 (gl_GETTIME):
5822         * m4/getugroups.m4 (gl_GETUGROUPS):
5823         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5824         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5825         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5826         * m4/hash.m4 (gl_HASH):
5827         * m4/idcache.m4 (gl_IDCACHE):
5828         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5829         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5830         * m4/long-options.m4 (gl_LONG_OPTIONS):
5831         * m4/lstat.m4 (gl_FUNC_LSTAT):
5832         * m4/md5.m4 (gl_MD5):
5833         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5834         * m4/memcoll.m4 (gl_MEMCOLL):
5835         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5836         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5837         * m4/memxor.m4 (gl_MEMXOR):
5838         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5839         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5840         * m4/modechange.m4 (gl_MODECHANGE):
5841         * m4/mountlist.m4 (gl_MOUNTLIST):
5842         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5843         * m4/openat.m4 (gl_FUNC_OPENAT):
5844         * m4/pathmax.m4 (gl_PATHMAX):
5845         * m4/physmem.m4 (gl_PHYSMEM):
5846         * m4/posixtm.m4 (gl_POSIXTM):
5847         * m4/posixver.m4 (gl_POSIXVER):
5848         * m4/quote.m4 (gl_QUOTE):
5849         * m4/quotearg.m4 (gl_QUOTEARG):
5850         * m4/readtokens.m4 (gl_READTOKENS):
5851         * m4/readutmp.m4 (gl_READUTMP):
5852         * m4/regex.m4 (gl_REGEX):
5853         * m4/safe-read.m4 (gl_SAFE_READ):
5854         * m4/safe-write.m4 (gl_SAFE_WRITE):
5855         * m4/same.m4 (gl_SAME):
5856         * m4/save-cwd.m4 (gl_SAVE_CWD):
5857         * m4/savedir.m4 (gl_SAVEDIR):
5858         * m4/settime.m4 (gl_SETTIME):
5859         * m4/sha1.m4 (gl_SHA1):
5860         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5861         * m4/stat-macros.m4 (gl_STAT_MACROS):
5862         * m4/stat-time.m4 (gl_STAT_TIME):
5863         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5864         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5865         * m4/strdup.m4 (gl_FUNC_STRDUP):
5866         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5867         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5868         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5869         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5870         * m4/time_r.m4 (gl_TIME_R):
5871         * m4/timespec.m4 (gl_TIMESPEC):
5872         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5873         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5874         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5875         * m4/userspec.m4 (gl_USERSPEC):
5876         * m4/utimecmp.m4 (gl_UTIMECMP):
5877         * m4/utimens.m4 (gl_UTIMENS):
5878         * m4/xalloc.m4 (gl_XALLOC):
5879         * m4/xgetcwd.m4 (gl_XGETCWD):
5880         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5881         * m4/xreadlink.m4 (gl_XREADLINK):
5882         * m4/xstrtod.m4 (gl_XSTRTOD):
5883         * m4/yesno.m4 (gl_YESNO):
5884         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5885         to get the necessary .h files and whatnot.
5886
5887 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5888             Bruno Haible  <bruno@clisp.org>
5889
5890         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5891         /bin/sh understanding of '!' conditional negation.
5892
5893 2006-08-21  Jim Meyering  <jim@meyering.net>
5894
5895         * modules/openat (Depends-on): Really alphabetize.
5896
5897         * modules/acl (Depends-on): Add error and quote.
5898
5899         * check-module (find_included_lib_files): Add at-func.c to the
5900         ok-to-include-more-than-once white list.
5901
5902         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5903
5904 2006-08-21  Bruno Haible  <bruno@clisp.org>
5905
5906         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5907         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5908         Reported by Martin Lambers <marlam@marlam.de>.
5909
5910 2006-08-21  Bruno Haible  <bruno@clisp.org>
5911
5912         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5913         specify an installation location, don't emit a noinst_LIBRARIES or
5914         noinst_LTLIBRARIES assignment.
5915
5916 2006-08-21  Bruno Haible  <bruno@clisp.org>
5917
5918         BeOS portability.
5919         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5920         BeOS has mbrtowc() but no <wctype.h>.
5921
5922 2006-08-21  Bruno Haible  <bruno@clisp.org>
5923
5924         BeOS portability.
5925         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5926         exist.
5927
5928 2006-08-21  Bruno Haible  <bruno@clisp.org>
5929
5930         BeOS portability.
5931         * lib/mbchar.h: Include <wctype.h> only if it exists.
5932
5933 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5934
5935         Remove files that are no longer needed by their respective modules.
5936         * m4/obstack.m4: Remove.
5937         * m4/strerror_r.m4: Remove.
5938         * m4/uint32_t.m4: Remove.
5939         * m4/uintptr_t.m4: Remove.
5940         * m4/ullong_max.m4: Remove.
5941         * m4/xstrtoimax.m4: Remove.
5942         * m4/xstrtoumax.m4: Remove.
5943
5944         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5945         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5946         dependencies now capture this.
5947
5948         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5949         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5950         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5951         * m4/human.m4 (gl_HUMAN): Likewise.
5952         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5953         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5954
5955         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5956
5957         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5958         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5959         stdint.
5960         * m4/human.m4 (gl_HUMAN): Likewise.
5961         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5962         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5963         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5964         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5965         * m4/xstrtol (gl_XSTRTOL): Likewise.
5966
5967         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5968         AC_TYPE_LONG_LONG_INT.
5969         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5970         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5971         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5972         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5973
5974         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5975         on stdbool.
5976
5977         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5978         (gl_PREREQ_XSTRTOUL): Remove.
5979
5980         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5981
5982         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5983         mode.
5984
5985 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5986
5987         Add and change modules to make it easier for coreutils to use
5988         gnulib-tool.
5989         * modules/backupfile (Files): Remove m4/d-ino.m4.
5990         (Depends-on): Add d-ino.
5991         * modules/cycle-check (Depends-on): Add stdint.
5992         (lib_SOURCES): Add cycle-check.h.
5993         * modules/d-ino: New module.
5994         * modules/d-type: New module.
5995         * modules/error (Files): Remove m4/strerror_r.m4.
5996         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5997         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5998         m4/inttypes_h.m4, m4/uintmax_t.m4.
5999         (Depends-on): Add stdint.
6000         (lib_SOURCES): Add fsusage.h.
6001         * modules/getcwd (Files): Remove d-ino.m4.
6002         (Depends-on): Add d-ino.
6003         * modules/getndelim2 (Depends-on): Add stdint.
6004         * modules/glob (Files): Remove m4/d-type.m4.
6005         (Depends-on): Add d-type.
6006         * modules/host-os: New module.
6007         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
6008         m4/inttypes_h.m4, m4/uintmax_t.m4.
6009         * Depends-on: Add stdint.
6010         (lib_SOURCES): Add human.h.
6011         * modules/inttostr (Files): Remove m4/intmax_t.m4,
6012         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
6013         m4/uintmax_t.m4, m4/ulonglong.m4.
6014         (Depends-on): Add stdint.
6015         (EXTRA_DIST): Add inttostr.h.
6016         * modules/lchmod: New module.
6017         * modules/link-follow: New module.
6018         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
6019         (Depends-on): Add lchmod.
6020         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
6021         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
6022         (Depends-on): Add stdint.
6023         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6024         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6025         (Depends-on): Add stdint.
6026         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6027         * modules/perl: New module.
6028         * modules/regex (Depends-on): Add stdint.
6029         * modules/rmdir-errno: New module.
6030         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6031         m4/intmax_t.m4.
6032         (Depends-on): Add stdint.
6033         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6034         m4/uintmax_t.m4.
6035         (Depends-on): Add stdint.
6036         * modules/unlink-busy: New module.
6037         * modules/utimecmp (Depends-on): Add stdint.
6038         * modules/uptime: New module.
6039         * modules/winsz-ioctl: New module.
6040         * modules/winsz-termios: New module.
6041         * modules/xnanosleep (Depends-on): Add nanosleep.
6042         * modules/ullong_max: Remove.
6043         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6044         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6045         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6046         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6047         (Depends-on): Add inttypes.
6048         (lib_SOURCES): Add xstrtol.h.
6049         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6050         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6051         * MODULES.html.sh: Move 'assert' into the assert section.
6052         Move 'dummy' into the linking section.
6053         Remove ullong_max.
6054         Add section for compatibility checks for POSIX:2001 functions,
6055         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6056         winsz-ioctl, and winsz-termios into it.
6057         Add lchmod.
6058         Add top-level Misc section and put host-os, perl, and uptime
6059         into it.
6060
6061 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6062
6063         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6064         now assume the stdint module.  Do not include inttypes.h.
6065         * lib/fsusage.h: Likewise.
6066         * lib/getndelim2.c: Likewise.
6067         * lib/human.h: Likewise.
6068         * lib/inttostr.h: Likewise.
6069         * lib/obstack.c: Likewise.
6070         * lib/regex_internal.h: Likewise.
6071         * lib/tempname.c: Likewise.
6072         * lib/utimecmp.c: Likewise.
6073         * lib/xstrtol.h: Likewise.
6074
6075         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6076
6077         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6078         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6079         * lib/xtime.h: Likewise.
6080
6081 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6082
6083         * modules/openat (Files): Add lib/fchmodat.c.
6084         Fixes problem reported by Jay Youngman.
6085
6086 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6087
6088         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6089         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6090
6091 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6092             Bruno Haible  <bruno@clisp.org>
6093
6094         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6095         and is a script that invokes bison. Tighten the code. Add comments.
6096
6097 2006-08-18  Jim Meyering  <jim@meyering.net>
6098
6099         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6100         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6101         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6102         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6103
6104 2006-08-18  Bruno Haible  <bruno@clisp.org>
6105
6106         * modules/bison-i18n: New file.
6107         * MODULES.html.sh (Internationalization functions): Add it.
6108
6109 2006-08-18  Bruno Haible  <bruno@clisp.org>
6110
6111         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6112         sys/statvfs.h. When getmntinfo was found, check its declaration and
6113         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6114
6115 2006-08-18  Bruno Haible  <bruno@clisp.org>
6116
6117         * m4/bison-i18n.m4: New file, from bison.
6118
6119 2006-08-18  Bruno Haible  <bruno@clisp.org>
6120
6121         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6122         (ME_DUMMY): Treat "kernfs" as a dummy.
6123         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6124
6125 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6126
6127         Update from coreutils.
6128
6129         2006-08-15  Jim Meyering  <jim@meyering.net>
6130
6131         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6132
6133         2006-01-17  Jim Meyering  <jim@meyering.net>
6134
6135         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6136
6137         2006-01-11  Jim Meyering  <jim@meyering.net>
6138
6139         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6140         Check for the lchmod function.
6141
6142 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6143
6144         Update from coreutils.
6145
6146         * lib/__fpending.h: Add copyright notice.
6147         * lib/fprintftime.h: Likewise.
6148         * lib/savedir.c: Use (C) in copyright notice.
6149         * lib/savedir.h: Likewise.
6150
6151         2006-08-15  Jim Meyering  <jim@meyering.net>
6152
6153         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6154         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6155         in support of the EXPECTED_ERRNO macro.
6156         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6157         definitions.  Instead, define the appropriate symbols and include
6158         "at-func.c".
6159         * lib/mkdirat.c (mkdirat): Likewise.
6160         * lib/fchmodat.c (fchmodat): Likewise.
6161         (ENOSYS): Remove definition.
6162         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6163         it.  Don't include "unistd--.h" -- it wasn't ever used.
6164
6165         2006-01-17  Jim Meyering  <jim@meyering.net>
6166
6167         Rewrite fts.c not to change the current working directory,
6168         by using openat, fstatat, fdopendir, etc..
6169
6170         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6171         (HAVE_OPENAT_SUPPORT): Define.
6172         [_LIBC] (fchdir): Don't undef or define; no longer used.
6173         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6174         Now, this `function' always succeeds, and consumes its file descriptor
6175         parameter -- so callers must not close such FDs.  Update callers.
6176         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6177         (diropen): Add parameter, SP.  Adjust all callers.
6178         Implement using diropen_fd, rather than open.
6179         (fts_open): Initialize new member, fts_cwd_fd.
6180         Remove fts_rft-setting code.
6181         (fts_close): Close fts_cwd_fd, if necessary.
6182         (__opendir2): Define in terms of opendir or opendirat,
6183         depending on whether the FST_NOCHDIR flag is set.
6184         (fts_build): Since fts_safe_changedir consumes its FD, and since
6185         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6186         and close the dup'd file descriptor upon failure.
6187         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6188         (fts_safe_changedir): Tweak semantics to reflect that this function
6189         now calls cwd_advance_fd and hence consumes its FD argument.
6190         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6191         [struct FTS] (fts_rft): Remove now-unused member.
6192         [struct FTS] (fts_cycle.state): Improve comment.
6193
6194         * lib/openat.c (openat_needs_fchdir): New function.
6195         * lib/openat.h (openat_needs_fchdir): Declare it.
6196
6197 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6198
6199         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6200         Problem and fix reported by Pádraig Brady in
6201         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6202
6203 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6204
6205         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6206
6207 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6208
6209         * lib/memcoll.c (memcoll): Optimize for the common case where the
6210         arguments are bytewise equal.
6211
6212 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6213
6214         * doc/regexprops-generic.texi: Add a copyright notice.
6215
6216 2006-08-15  Bruno Haible  <bruno@clisp.org>
6217
6218         * modules/tmpdir (License): Change to LGPL.
6219
6220 2006-08-15  Bruno Haible  <bruno@clisp.org>
6221
6222         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6223         module.
6224
6225 2006-08-14  Simon Josefsson  <jas@extundo.com>
6226
6227         * config/srclist.txt: Add gnupload.
6228
6229 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6230
6231         Change copyright notice from LGPL 2 to GPL 2, since that's the
6232         standard form used in the gnulib repository.
6233         * tests/test-lock.c: Likewise.
6234         * tests/test-stdint.c: Likewise.
6235         * tests/test-tls.c: Likewise.
6236
6237         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6238         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6239         Add copyright notice.
6240
6241         * check-module: Add copyright notice.  Output a copyright
6242         notice if "--version" is specified.
6243         * modules/COPYING: New file.
6244         * tests/test-getaddrinfo.c: Add copyright notice.
6245         * tests/test-verify.c: Likewise.
6246
6247 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6248
6249         Change copyright notice from LGPL 2 to GPL 2, since that's the
6250         standard form used in the gnulib repository.
6251         * lib/lock.c: LGPL -> GPL.
6252         * lib/lock.h: Likewise.
6253         * lib/strnlen1.c: Likewise.
6254         * lib/strnlen1.h: Likewise.
6255         * lib/tls.c: Likewise.
6256         * lib/tls.h: Likewise.
6257         * lib/tmpdir.c: Likewise.
6258
6259         * lib/TODO: Remove; this belongs only in coreutils.
6260
6261 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6262
6263         Add copyright notices to long-enough files that lack them, since
6264         otherwise the files aren't clearly free.  Use the same notice that
6265         getdate.texi already uses.
6266         * doc/alloca-opt.texi: Add copyright notice.
6267         * doc/alloca.texi: Likewise.
6268         * doc/ctime.texi: Likewise.
6269         * doc/functions.texi: Likewise.
6270         * doc/gcd.texi: Likewise.
6271         * doc/gnulib-tool.texi: Likewise.
6272         * doc/inet_ntoa.texi: Likewise.
6273         * doc/visibility.texi: Likewise.
6274
6275         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6276         * doc/quote.texi: Add copyright notice.
6277
6278         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6279         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6280         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6281         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6282         is now obsolete, and give a pointer to the Sun list.
6283         Add copyright notice.
6284
6285 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6286
6287         * config/srclistvars.sh: Add copyright notice.
6288
6289 2006-08-14  Eric Blake  <ebb9@byu.net>
6290
6291         Import the following change from libc:
6292
6293         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6294
6295         Upstream bug 2997.
6296         * lib/misc/error.c: Add space between program name and message if file
6297         name is missing.
6298
6299 2006-08-12  Karl Berry  <karl@gnu.org>
6300
6301         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6302         remove, these originate in gnulib now.
6303
6304 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6305
6306         * doc/Makefile (standards.info standards.html standards.dvi):
6307         Also depend on make-stds.texi.
6308
6309 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6310
6311         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6312         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6313
6314         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6315         in wchar_t.  Problem reported by Eric Blake.
6316
6317         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6318         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6319         Also, help the compiler to keep LEN in a register.
6320
6321 2006-08-11  Eric Blake  <ebb9@byu.net>
6322
6323         * users.txt: Sort.  Add tar.
6324
6325 2006-08-11  Bruno Haible  <bruno@clisp.org>
6326
6327         * users.txt: New file.
6328
6329 2006-08-11  Bruno Haible  <bruno@clisp.org>
6330
6331         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6332         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6333
6334 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6335
6336         * modules/snprintf (Depends-on): Remove minmax.
6337         (Maintainer): Add self and Bruno.
6338
6339 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6340
6341         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6342         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6343         (EOVERFLOW): Define if the system does not.
6344         Do not include "minmax.h"; it wasn't used.
6345         (snprintf): Don't assume size_t promotes to an unsigned type.
6346         Fix bug when generated string was too long for the buffer: the
6347         buffer's contents are supposed to be the initial prefix of the
6348         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6349         exceeds INT_MAX; do the check ourselves.
6350
6351         Import the following changes from libc:
6352
6353         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6354
6355         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6356         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6357         set wc to the byte which couldn't be converted.
6358         (re_string_reconstruct): Don't clear valid_raw_len before calling
6359         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6360         tip_context using re_string_context_at.
6361
6362         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6363
6364         * lib/posix/regex.h: g++ still cannot handled [restrict].
6365
6366         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6367
6368         * lib/posix/regex.h: Remove special handling for VMS.
6369
6370 2006-08-10  Jim Meyering  <jim@meyering.net>
6371
6372         * modules/same-inode: New module.
6373         * modules/dev-ino: New module.
6374         * modules/cycle-check: Depend on these modules, rather than simply
6375         including their .h files.
6376         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6377         required via m4/cycle-check.m4.
6378         * modules/same: Depend on new same-inode module, rather than
6379         including same-inode.h.
6380         * modules/chdir-safer: New file.
6381
6382         * modules/chown (Depends-on): Add stat-macros.
6383
6384 2006-08-10  Jim Meyering  <jim@meyering.net>
6385
6386         * m4/cycle-check.m4: New file.
6387         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6388         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6389
6390 2006-08-10  Eric Blake  <ebb9@byu.net>
6391
6392         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6393         in from original proposal.
6394
6395 2006-08-10  Eric Blake  <ebb9@byu.net>
6396         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6397
6398         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6399         namespace.
6400
6401 2006-08-10  Bruno Haible  <bruno@clisp.org>
6402
6403         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6404         as well.
6405
6406 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6407
6408         Sync from coreutils.
6409
6410         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6411
6412         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6413         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6414
6415 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6416
6417         * modules/restrict: Remove; no longer needed now that we assume
6418         Autoconf 2.59 or later.
6419         * MODULES.html.sh: Remove 'restrict'.
6420         * modules/argp (Depends-on): Remove 'restrict'.
6421         * modules/base64 (Depends-on): Likewise.
6422         * modules/gc (Depends-on): Likewise.
6423         * modules/getaddrinfo (Depends-on): Likewise.
6424         * modules/glob (Depends-on): Likewise.
6425         * modules/inet_ntop (Depends-on): Likewise.
6426         * modules/inet_pton (Depends-on): Likewise.
6427         * modules/memxor (Depends-on): Likewise.
6428         * modules/regex (Depends-on): Likewise.
6429         * modules/strtok_r (Depends-on): Likewise.
6430         * modules/time_r (Depends-on): Likewise.
6431
6432 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6433
6434         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6435         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6436         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6437         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6438         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6439         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6440         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6441         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6442
6443         Merge from coreutils.
6444         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6445         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6446         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6447         * m4/time_r.m4 (gl_TIME_R): Likewise.
6448
6449 2006-08-09  Karl Berry  <karl@gnu.org>
6450
6451         * config/srclist.txt: no more gettext-tools, per Bruno.
6452
6453 2006-08-08  Eric Blake  <ebb9@byu.net>
6454
6455         * modules/verror: New module.
6456         * MODULES.html.sh: Document it.
6457
6458 2006-08-08  Eric Blake  <ebb9@byu.net>
6459
6460         * lib/verror.h, lib/verror.c: New files.
6461
6462 2006-08-08  Eric Blake  <ebb9@byu.net>
6463
6464         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6465         verror_at_line output complies with GNU Coding Standards even when
6466         file is NULL.
6467
6468 2006-08-07  Bruno Haible  <bruno@clisp.org>
6469
6470         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6471         versions of AIX.
6472         Reported by Ralf Wildenhues.
6473
6474 2006-08-07  Bruno Haible  <bruno@clisp.org>
6475
6476         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6477         in an AC_DEFUN. Needed so that the autoconf snippets can use
6478         AC_REQUIRE.
6479
6480 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6481
6482         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6483         Initialize pkgdata_DATA.
6484         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6485         overriding it.
6486
6487 2006-08-06  Eric Blake  <ebb9@byu.net>
6488
6489         * lib/error.h: Fold in some upstream changes from glibc.
6490         * lib/error.c: Likewise.
6491
6492 2006-08-04  Bruno Haible  <bruno@clisp.org>
6493
6494         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6495         Make the mostlyclean-local rule depend on mostlyclean-generic.
6496         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6497
6498 2006-07-31  Bruno Haible  <bruno@clisp.org>
6499
6500         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6501         <stdlib.h>, <string.h>.
6502
6503 2006-07-30  Bruno Haible  <bruno@clisp.org>
6504
6505         * modules/readlink (License): Change to LGPL.
6506
6507 2006-07-30  Bruno Haible  <bruno@clisp.org>
6508
6509         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6510         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6511         set PKGDATADIR to point to it.
6512
6513 2006-07-30  Bruno Haible  <bruno@clisp.org>
6514
6515         * modules/csharpexec (configure.ac): Comment out macro invocation.
6516         * modules/javaexec (configure.ac): Likewise.
6517         * modules/javacomp-script (configure.ac): Likewise.
6518
6519         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6520
6521 2006-07-30  Bruno Haible  <bruno@clisp.org>
6522
6523         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6524         linked-list.
6525
6526 2006-07-30  Bruno Haible  <bruno@clisp.org>
6527
6528         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6529
6530 2006-07-30  Bruno Haible  <bruno@clisp.org>
6531
6532         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6533         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6534         get removed.
6535
6536 2006-07-29  Bruno Haible  <bruno@clisp.org>
6537
6538         Make it possible for gnulib-tool to work with locally modified or
6539         augmented gnulib repositories.
6540         * gnulib-tool (func_usage): Document --local-dir option.
6541         (local_gnulib_dir): New variable.
6542         Handle --local-dir option.
6543         (func_lookup_file): New function.
6544         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6545         (func_get_description, func_get_filelist, func_get_description,
6546         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6547         func_get_automake_snippet, func_get_include_directive,
6548         func_get_license, func_get_maintainer): Use func_lookup_file.
6549         (func_import, func_create_testdir): Use func_lookup_file.
6550
6551 2006-07-29  Bruno Haible  <bruno@clisp.org>
6552
6553         * modules/setenv (Depends-on): Add unistd.
6554
6555 2006-07-29  Bruno Haible  <bruno@clisp.org>
6556
6557         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6558
6559 2006-07-29  Bruno Haible  <bruno@clisp.org>
6560
6561         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6562
6563 2006-07-29  Bruno Haible  <bruno@clisp.org>
6564
6565         * gnulib-tool (import, update): If there is no Makefile.am, look at
6566         aclocal.m4, instead of bailing out.
6567
6568 2006-07-29  Bruno Haible  <bruno@clisp.org>
6569
6570         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6571         Categorize the options by when they are useful.
6572
6573 2006-07-29  Bruno Haible  <bruno@clisp.org>
6574
6575         * gnulib-tool (func_usage): Document option --no-libtool.
6576         Handle option --no-libtool.
6577         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6578         for changed semantics of $libtool variable.
6579         (func_import): Likewise. If libtool is not used, show this through
6580         an option --no-libtool.
6581         (func_create_testdir): Update.
6582
6583 2006-07-29  Bruno Haible  <bruno@clisp.org>
6584
6585         * gnulib-tool (func_import): Extend error message about missing
6586         --doc-base.
6587
6588 2006-07-29  Bruno Haible  <bruno@clisp.org>
6589
6590         * gnulib-tool (func_import): Don't create the $docbase directory if
6591         there is no file to store there.
6592
6593 2006-07-29  Bruno Haible  <bruno@clisp.org>
6594
6595         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6596         relevant, look for configure.ac there, not in the current directory.
6597         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6598
6599 2006-07-29  Bruno Haible  <bruno@clisp.org>
6600
6601         * gnulib-tool (SORT): New variable.
6602         (func_usage): Undocument --assume-autoconf option.
6603         Remove --assume-autoconf option handling.
6604         (autoconf_minversion): Determine from the contents of configure.ac.
6605         (func_import): Remove autoconf_minversion handling.
6606         Suggested by Eric Blake.
6607
6608 2006-07-29  Bruno Haible  <bruno@clisp.org>
6609
6610         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6611
6612 2006-07-29  Bruno Haible  <bruno@clisp.org>
6613
6614         * config/srclist.txt (*setenv.[ch]): Remove rules.
6615
6616 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6617
6618         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6619
6620 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6621
6622         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6623         arpa/inet.h.
6624
6625 2006-07-28  Simon Josefsson  <jas@extundo.com>
6626
6627         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6628         * modules/inet_pton (Depends-on): Likewise.
6629
6630 2006-07-28  Simon Josefsson  <jas@extundo.com>
6631
6632         * m4/netinet_in_h.m4: New file.
6633
6634 2006-07-28  Simon Josefsson  <jas@extundo.com>
6635
6636         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6637         #include's.
6638
6639 2006-07-28  Simon Josefsson  <jas@extundo.com>
6640
6641         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6642         #include's.
6643
6644 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6645
6646         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6647         setgid on directories only if they set these bits.
6648         * lib/modechange.h: Remove obsolete comment about masks.
6649
6650 2006-07-28  Eric Blake  <ebb9@byu.net>
6651
6652         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6653         macro expansion.
6654
6655 2006-07-28  Bruno Haible  <bruno@clisp.org>
6656
6657         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6658
6659 2006-07-28  Bruno Haible  <bruno@clisp.org>
6660
6661         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6662
6663 2006-07-28  Bruno Haible  <bruno@clisp.org>
6664
6665         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6666         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6667         Define fallbacks.
6668         Avoids link error on FreeBSD 4.x.
6669         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6670
6671         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6672         encoding.
6673         * lib/mbswidth.c (iswcntrl): Likewise.
6674
6675 2006-07-27  Bruno Haible  <bruno@clisp.org>
6676
6677         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6678         test.
6679
6680 2006-07-27  Bruno Haible  <bruno@clisp.org>
6681
6682         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6683         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6684         defined.
6685
6686 2006-07-26  Eric Blake  <ebb9@byu.net>
6687
6688         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6689
6690 2006-07-26  Eric Blake  <ebb9@byu.net>
6691
6692         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6693         like mingw that lack mkstemp.
6694         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6695         avoid compilation warning on mingw.
6696
6697 2006-07-26  Bruno Haible  <bruno@clisp.org>
6698
6699         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6700         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6701         INT_FAST*_MIN, INTPTR_MIN.
6702
6703 2006-07-25  Bruno Haible  <bruno@clisp.org>
6704
6705         * modules/version-etc (Depends-on): Add stdarg.
6706
6707 2006-07-25  Bruno Haible  <bruno@clisp.org>
6708
6709         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6710         complex commands.
6711
6712 2006-07-25  Bruno Haible  <bruno@clisp.org>
6713
6714         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6715         defined in <stdarg.h> or config.h.
6716
6717 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6718
6719         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6720         (gl_STDIO_SAFER): Remove.
6721
6722 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6723
6724         * MODULES.html.sh (File stream based Input/Output):
6725         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6726         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6727         * modules/fopen-safer, modules/tmpfile-safer: New files.
6728         * modules/stdio-safer: Remove.
6729
6730 2006-07-24  Bruno Haible  <bruno@clisp.org>
6731
6732         * modules/tmpdir: New file.
6733         * MODULES.html.sh (File system functions): Add it.
6734
6735 2006-07-24  Bruno Haible  <bruno@clisp.org>
6736
6737         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6738         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6739
6740 2006-07-24  Bruno Haible  <bruno@clisp.org>
6741
6742         * modules/clean-temp: New file.
6743
6744 2006-07-24  Bruno Haible  <bruno@clisp.org>
6745
6746         * m4/tmpdir.m4: New file, from GNU gettext.
6747
6748 2006-07-24  Bruno Haible  <bruno@clisp.org>
6749
6750         * lib/tmpdir.h: New file, from GNU gettext.
6751         * lib/tmpdir.c: New file, from GNU gettext.
6752
6753 2006-07-24  Bruno Haible  <bruno@clisp.org>
6754
6755         * lib/clean-temp.h: New file, from GNU gettext.
6756         * lib/clean-temp.c: New file, from GNU gettext.
6757
6758 2006-07-23  Eric Blake  <ebb9@byu.net>
6759
6760         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6761         (Depends-on): Add binary-io.
6762
6763 2006-07-23  Eric Blake  <ebb9@byu.net>
6764
6765         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6766
6767 2006-07-23  Eric Blake  <ebb9@byu.net>
6768
6769         * lib/tmpfile-safer.c: New file.
6770         * lib/stdio-safer.h (fopen_safer): Add prototype.
6771         * lib/stdio--.h (tmpfile): Make safer.
6772
6773 2006-07-23  Bruno Haible  <bruno@clisp.org>
6774
6775         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6776         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6777         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6778         gl_linked_remove_at): Use it.
6779
6780 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6781         and Simon Josefsson <jas@extundo.com>
6782
6783         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6784
6785         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6786
6787 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6788
6789         * modules/close-stream: New file.
6790         * modules/closeout (Description): Make it clear that it exits
6791         with a diagnostic on error.
6792         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6793         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6794
6795 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6796
6797         * m4/close-stream.m4: New file.
6798
6799 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6800
6801         * lib/close-stream.c, lib/close-stream.h: New files.
6802
6803 2006-07-22  Bruno Haible  <bruno@clisp.org>
6804
6805         Merge from GNU gettext 0.15.
6806
6807         2006-05-01  Bruno Haible  <bruno@clisp.org>
6808
6809                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6810
6811         2006-07-22  Bruno Haible  <bruno@clisp.org>
6812
6813                 * modules/javaversion: New file.
6814                 * MODULES.html.sh (Java): Add javaversion.
6815
6816         2006-03-12  Bruno Haible  <bruno@clisp.org>
6817
6818                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6819
6820         2005-12-04  Bruno Haible  <bruno@clisp.org>
6821
6822                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6823                 (untested).
6824
6825         2006-06-21  Bruno Haible  <bruno@clisp.org>
6826
6827                 Avoid warnings from recent versions of mcs.
6828                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6829                 -o, -L, -r any more. Use options documented since mcs-1.0
6830                 instead. Similarly for -g.
6831
6832         2005-12-04  Bruno Haible  <bruno@clisp.org>
6833
6834                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6835                 .resources, not .resource.
6836
6837         2005-07-09  Bruno Haible  <bruno@clisp.org>
6838
6839                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6840                 add a .dll suffix.
6841                 Reported by Mark Junker <mjscod@gmx.de>.
6842
6843         2006-07-22  Bruno Haible  <bruno@clisp.org>
6844
6845                 * modules/gettext: Upgrade to gettext-0.15.
6846                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6847                 m4/visibility.m4.
6848                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6849
6850 2006-07-22  Bruno Haible  <bruno@clisp.org>
6851
6852         Merge from GNU gettext 0.15.
6853
6854         2006-03-25  Bruno Haible  <bruno@clisp.org>
6855
6856                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6857
6858         2006-07-21  Bruno Haible  <bruno@clisp.org>
6859
6860                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6861                 "1.1".
6862
6863         2006-05-09  Bruno Haible  <bruno@clisp.org>
6864
6865                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6866                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6867                 for the conftestver execution.
6868
6869         2006-05-01  Bruno Haible  <bruno@clisp.org>
6870
6871                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6872                 optional target-version argument. Verify that the compiler
6873                 groks source of the specified source-version, or add -source
6874                 option as necessary. Verify that the compiler produces
6875                 bytecode in the specified target-version, or add -target and
6876                 -source options as necessary. Make the result of the test
6877                 available as variable CONF_JAVAC. Also log error output in
6878                 config.log.
6879
6880         2006-03-11  Bruno Haible  <bruno@clisp.org>
6881
6882                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6883
6884         2006-05-09  Bruno Haible  <bruno@clisp.org>
6885
6886                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6887                 CLASSPATH_SEPARATOR to a semicolon.
6888
6889         2006-03-12  Bruno Haible  <bruno@clisp.org>
6890
6891                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6892                 available as variable CONF_JAVA, for subsequent autoconf
6893                 tests. Also log error output in config.log.
6894
6895         2006-07-19  Bruno Haible  <bruno@clisp.org>
6896
6897                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6898                 that getline works on glibc2 systems. Needed to avoid trouble
6899                 in relocatable.c.
6900                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6901
6902         2005-12-04  Bruno Haible  <bruno@clisp.org>
6903
6904                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6905                 launcher (untested).
6906
6907         2005-12-04  Bruno Haible  <bruno@clisp.org>
6908
6909                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6910
6911         2006-07-22  Bruno Haible  <bruno@clisp.org>
6912
6913                 * gettext.m4: Update from GNU gettext-0.15.
6914                 * nls.m4: Likewise.
6915                 * po.m4: Likewise.
6916                 * inttypes-pri.m4: Likewise.
6917                 * inttypes-h.m4: Renamed from inttypes.m4.
6918                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6919
6920 2006-07-22  Bruno Haible  <bruno@clisp.org>
6921
6922         Merge from GNU gettext 0.15.
6923
6924         2005-07-05  Bruno Haible  <bruno@clisp.org>
6925
6926                 * printf-args.c (printf_fetchargs): Work around broken
6927                 definition of wint_t on mingw.
6928
6929         2005-02-12  Bruno Haible  <bruno@clisp.org>
6930
6931                 * xallocsa.h: Add extern "C" for C++.
6932
6933         2006-05-17  Bruno Haible  <bruno@clisp.org>
6934
6935                 Cygwin portability.
6936                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6937
6938         2006-04-30  Bruno Haible  <bruno@clisp.org>
6939
6940                 * progreloc.c: Include <mach-o/dyld.h> if available.
6941                 (find_executable): Use _NSGetExecutablePath when possible.
6942
6943         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6944
6945                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6946                 function.
6947
6948         2005-12-29  Bruno Haible  <bruno@clisp.org>
6949
6950                 * progreloc.c (set_program_name_and_installdir): Fix
6951                 compilation error.
6952
6953         2005-12-04  Bruno Haible  <bruno@clisp.org>
6954
6955                 Cygwin portability.
6956                 * progreloc.c: Include <windows.h> also on Cygwin.
6957                 (find_executable): Add support for Cygwin.
6958                 (set_program_name_and_installdir): Handle also platforms with
6959                 nonempty EXEEXT.
6960
6961         2006-07-11  Bruno Haible  <bruno@clisp.org>
6962
6963                 * javacomp.c: Fix a comment.
6964                 Reported by Jim Meyering.
6965
6966         2006-04-30  Bruno Haible  <bruno@clisp.org>
6967
6968                 * javacomp.h (compile_java_class): Add source_version,
6969                 target_version arguments.
6970                 * javacomp.c: Rewritten to choose only a compiler that
6971                 respects the specified source_version and target_version.
6972
6973         2006-06-27  Bruno Haible  <bruno@clisp.org>
6974
6975                 Assume correct S_ISDIR macro.
6976                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6977
6978         2006-07-22  Bruno Haible  <bruno@clisp.org>
6979
6980                 * javaversion.h: New file, from GNU gettext.
6981                 * javaversion.c: New file, from GNU gettext.
6982                 * javaversion.java: New file, from GNU gettext.
6983                 * javaversion.class: New file, from GNU gettext.
6984
6985         2006-05-17  Bruno Haible  <bruno@clisp.org>
6986
6987                 Cygwin portability.
6988                 * javaexec.c (execute_java_class): Test for jview program
6989                 also on Cygwin.
6990
6991         2006-04-09  Bruno Haible  <bruno@clisp.org>
6992
6993                 * fatal-signal.c: Don't include string.h.
6994                 (at_fatal_signal): Use a copying loop instead of memcpy.
6995
6996         2005-12-04  Bruno Haible  <bruno@clisp.org>
6997
6998                 * csharpexec.c: Add support for 'clix' launcher (untested).
6999                 (execute_csharp_using_sscli): New function.
7000                 (execute_csharp_program): Call it.
7001
7002         2006-06-21  Bruno Haible  <bruno@clisp.org>
7003
7004                 Avoid warnings from recent versions of mcs.
7005                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
7006                 -o, -L, -r any more. Use options documented since mcs-1.0
7007                 instead. Similarly for -g.
7008
7009         2005-07-09  Bruno Haible  <bruno@clisp.org>
7010
7011                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
7012                 add a .dll suffix.
7013                 Reported by Mark Junker <mjscod@gmx.de>.
7014
7015         2006-06-17  Bruno Haible  <bruno@clisp.org>
7016
7017                 * config.charset: Update for NetBSD 3.0.
7018
7019         2006-05-17  Bruno Haible  <bruno@clisp.org>
7020
7021                 Cygwin portability.
7022                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
7023
7024         2006-05-16  Bruno Haible  <bruno@clisp.org>
7025
7026                 * localcharset.c [CYGWIN]: Include <windows.h>.
7027                 (get_charset_aliases): For Cygwin, return the same CPxxx
7028                 aliases list as under WIN32.
7029                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7030                 the environment variables. Fall back to GetACP().
7031
7032         2006-04-05  Bruno Haible  <bruno@clisp.org>
7033
7034                 * config.charset: Update Juan Manuel Guerrero's address.
7035
7036         2005-02-12  Bruno Haible  <bruno@clisp.org>
7037
7038                 * allocsa.h: Add extern "C" for C++.
7039
7040         2005-02-10  Bruno Haible  <bruno@clisp.org>
7041
7042                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7043                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7044
7045         2006-07-22  Bruno Haible  <bruno@clisp.org>
7046
7047                 * gettext.h: Update to GNU gettext-0.15.
7048
7049 2006-07-22  Bruno Haible  <bruno@clisp.org>
7050
7051         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7052         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7053         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7054
7055 2006-07-21  Eric Blake  <ebb9@byu.net>
7056
7057         * modules/stdlib-safer: New file.
7058         * MODULES.html.sh (File stream based Input/Output): Add
7059         stdlib-safer.
7060
7061 2006-07-21  Eric Blake  <ebb9@byu.net>
7062
7063         * lib/stdlib-safer.h: New file from coreutils, required by
7064         stdlib--.h.
7065
7066 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7067
7068         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7069
7070 2006-07-20  Bruno Haible  <bruno@clisp.org>
7071
7072         * gnulib-tool: Recognize new option --assume-autoconf.
7073         (autoconf_minversion): New variable.
7074         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7075
7076 2006-07-20  Bruno Haible  <bruno@clisp.org>
7077
7078         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7079
7080 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7081
7082         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7083         Reindent and repaginate.
7084
7085 2006-07-19  Derek Price  <derek@ximbiot.com>
7086
7087         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7088         Correct grammar.
7089
7090 2006-07-17  Bruno Haible  <bruno@clisp.org>
7091
7092         * modules/list: New file.
7093         * modules/array-list: New file.
7094         * modules/carray-list, modules/carray-list-tests: New files.
7095         * modules/linked-list, modules/linked-list-tests: New files.
7096         * modules/avltree-list, modules/avltree-list-tests: New files.
7097         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7098         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7099         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7100         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7101         * modules/oset: New file.
7102         * modules/array-oset: New file.
7103         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7104         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7105         * tests/test-carray_list.c: New file.
7106         * tests/test-linked_list.c: New file.
7107         * tests/test-avltree_list.c: New file.
7108         * tests/test-rbtree_list.c: New file.
7109         * tests/test-linkedhash_list.c: New file.
7110         * tests/test-avltreehash_list.c: New file.
7111         * tests/test-rbtreehash_list.c: New file.
7112         * tests/test-avltree_oset.c: New file.
7113         * tests/test-rbtree_oset.c: New file.
7114         * MODULES.html.sh (Container data structures): New section.
7115
7116 2006-07-17  Bruno Haible  <bruno@clisp.org>
7117
7118         * m4/gl_list.m4: New file.
7119
7120 2006-07-17  Bruno Haible  <bruno@clisp.org>
7121
7122         * lib/gl_list.h: New file.
7123         * lib/gl_list.c: New file.
7124         * lib/gl_array_list.h: New file.
7125         * lib/gl_array_list.c: New file.
7126         * lib/gl_carray_list.h: New file.
7127         * lib/gl_carray_list.c: New file.
7128         * lib/gl_linked_list.h: New file.
7129         * lib/gl_linked_list.c: New file.
7130         * lib/gl_anylinked_list1.h: New file.
7131         * lib/gl_anylinked_list2.h: New file.
7132         * lib/gl_avltree_list.h: New file.
7133         * lib/gl_avltree_list.c: New file.
7134         * lib/gl_anyavltree_list1.h: New file.
7135         * lib/gl_anyavltree_list2.h: New file.
7136         * lib/gl_rbtree_list.h: New file.
7137         * lib/gl_rbtree_list.c: New file.
7138         * lib/gl_anyrbtree_list1.h: New file.
7139         * lib/gl_anyrbtree_list2.h: New file.
7140         * lib/gl_anytree_list1.h: New file.
7141         * lib/gl_anytree_list2.h: New file.
7142         * lib/gl_linkedhash_list.h: New file.
7143         * lib/gl_linkedhash_list.c: New file.
7144         * lib/gl_anyhash_list1.h: New file.
7145         * lib/gl_anyhash_list2.h: New file.
7146         * lib/gl_avltreehash_list.h: New file.
7147         * lib/gl_avltreehash_list.c: New file.
7148         * lib/gl_rbtreehash_list.h: New file.
7149         * lib/gl_rbtreehash_list.c: New file.
7150         * lib/gl_anytreehash_list1.h: New file.
7151         * lib/gl_anytreehash_list2.h: New file.
7152
7153         * lib/gl_oset.h: New file.
7154         * lib/gl_oset.c: New file.
7155         * lib/gl_array_oset.h: New file.
7156         * lib/gl_array_oset.c: New file.
7157         * lib/gl_avltree_oset.h: New file.
7158         * lib/gl_avltree_oset.c: New file.
7159         * lib/gl_rbtree_oset.h: New file.
7160         * lib/gl_rbtree_oset.c: New file.
7161         * lib/gl_anytree_oset.h: New file.
7162
7163 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7164
7165         * m4/mkancesdirs.m4: New file.
7166         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7167         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7168         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7169         it.
7170
7171 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7172
7173         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7174         * lib/mkancesdirs.h: New files.
7175         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7176         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7177         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7178         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7179         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7180         callers changed.  Revamp internals significantly, by not
7181         attempting to create directories that are temporarily more
7182         permissive than the final results.  Do not attempt to use
7183         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7184         This removes some race conditions, fixes some bugs, and simplifies
7185         things.  Use new dirchownmod function to do owner and mode changes.
7186         * lib/mkdir-p.h: Likewise.
7187         * lib/modechange.c (octal_to_mode): New function.
7188         (struct mode_change): New member mentioned.
7189         (make_node_op_equals): New arg mentioned.  All callers changed.
7190         (mode_compile): Keep track of which mode bits the user has explicitly
7191         mentioned.
7192         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7193         New arg PMODE_BITS, to keep track of which mode bits the user
7194         mentioned; it treats S_ISUID and S_ISGID speciall.
7195         All callers changed.
7196         * lib/modechange.h: Likewise.
7197
7198 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7199
7200         * MODULES.html.sh: Add mkancestors.
7201         * modules/mkancesdirs: New module.
7202         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7203         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7204         The chdir-safer and afs files are now orphans; I'll remove them
7205         unless someone speaks up.
7206         Add lib/dirchownmod.c, lib/dirchownmod.h.
7207         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7208         Add lchown, mkancesdirs.
7209         (Maintainer): Add self.
7210
7211 2006-07-15  Karl Berry  <karl@gnu.org>
7212
7213         * gnulib-tool: help message wording/arrangement.
7214
7215 2006-07-14  Simon Josefsson  <jas@extundo.com>
7216
7217         * doc/gnulib.texi (Libtool and Windows): New section.
7218
7219 2006-07-12  Simon Josefsson  <jas@extundo.com>
7220
7221         * modules/gendocs (License): Fix license, approved by Karl.
7222
7223 2006-07-12  Eric Blake  <ebb9@byu.net>
7224
7225         * MODULES.html.sh: Add gendocs.
7226
7227 2006-07-11  Eric Blake  <ebb9@byu.net>
7228
7229         * modules/fdl: New module, to install doc/fdl.texi.
7230         * MODULES.html.sh: Add new section for documentation modules.
7231         * gnulib-tool: Avoid space-tab.
7232         (--doc-base): New option, to manage files from doc.
7233
7234 2006-07-11  Eric Blake  <ebb9@byu.net>
7235
7236         * m4/absolute-header.m4: Fix comments to match recent change.
7237
7238 2006-07-11  Eric Blake  <ebb9@byu.net>
7239
7240         * gnulib-tool: List --doc-base before --tests-base.
7241
7242 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7243
7244         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7245
7246 2006-07-11  Bruno Haible  <bruno@clisp.org>
7247
7248         * README: Mention where to put documentation.
7249
7250 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7251
7252         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7253
7254 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7255
7256         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7257         to stdint.m4.
7258
7259 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7260
7261         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7262         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7263         "no/such/file/stdint.h" when there is no such file, so that
7264         the resulting C code can be parsed by dodgy compilers.
7265         Problems reported by Bob Proulx.
7266
7267 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7268
7269         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7270         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7271         macros into the GNU _D_EXACT_NAMLEN.
7272         * lib/savedir.c:  Likewise.
7273         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7274
7275 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7276         and Paul Eggert  <eggert@cs.ucla.edu>
7277
7278         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7279         * m4/savedir.m4:
7280         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7281         macros into the GNU _D_EXACT_NAMLEN.
7282
7283 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7284
7285         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7286         around the absolute name, to work around a problem with the HP-UX
7287         11.23 native C compiler, reported by Bob Proulx.
7288
7289 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7290
7291         * doc/maintain.texi, make-stds.texi: Sync from
7292         <http://savannah.gnu.org/projects/gnustandards>.
7293
7294 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7295
7296         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7297
7298 2006-07-09  Jim Meyering  <jim@meyering.net>
7299
7300         * m4/glob.m4: Remove a doubled word in a comment.
7301
7302 2006-07-09  Jim Meyering  <jim@meyering.net>
7303
7304         * lib/argp-pv.c: Remove a doubled word in a comment.
7305         * lib/check-version.c (check_version): Likewise.
7306         * lib/javacomp.c (compile_java_class): Likewise.
7307
7308 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7309
7310         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7311         for the benefit of people using Autoconf 2.60.  If you want to
7312         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7313         (or m4/onceonly.m4, if pre-2.57) manually.
7314
7315 2006-07-08  Jim Meyering  <jim@meyering.net>
7316
7317         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7318         comment.
7319         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7320         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7321         comment.
7322
7323 2006-07-08  Jim Meyering  <jim@meyering.net>
7324
7325         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7326
7327 2006-07-07  Simon Josefsson  <jas@extundo.com>
7328
7329         * tests/test-crc.c: Change expected crc value, the test vector
7330         were probably computed using the old broken crc.c?
7331
7332 2006-07-06  Simon Josefsson  <jas@extundo.com>
7333
7334         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7335         now the canonical place for the M4 file).
7336
7337         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7338         from the sys_socket dependency now.
7339
7340         * modules/inet_pton (Files): Ditto.
7341
7342         * modules/inet_ntop (Files): Ditto.
7343
7344 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7345
7346         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7347         not gl_PREREQ_GETUSERSHELL.
7348
7349 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7350
7351         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7352         with only one argument, for Autoconf 2.60.
7353         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7354         expand to nothing, so add a shell command to avoid syntax error.
7355         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7356
7357 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7358
7359         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7360
7361 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7362
7363         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7364         no longer needed.  Check for isblank decl.
7365         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7366         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7367         of existence.
7368
7369 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7370
7371         * lib/getloadavg.c: Use __VMS, not VMS.
7372         * lib/getopt.c: Likewise.
7373         * lib/getpagesize.h: Likewise.
7374         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7375         and probably does not work.
7376
7377 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7378
7379         * lib/.cppi-disable: Add wcwidth.
7380         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7381         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7382         (ISGRAPH): Remove.  All uses changed to isgraph.
7383         (FOLD) [!defined _LIBC]: Remove special case.
7384         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7385         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7386         HAVE_ISBLANK.
7387         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7388         case.
7389
7390 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7391
7392         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7393         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7394         brackets.  Other minor changes to suppress some compiler
7395         warnings.
7396
7397 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7398         and Paul Eggert  <eggert@cs.ucla.edu>
7399
7400         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7401         of invoking obsolescent AC_HEADER_DIRENT macro.
7402         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7403         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7404         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7405         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7406         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7407         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7408         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7409         * m4/readdir.m4: Remove; no longer needed.
7410
7411 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7412         and Paul Eggert  <eggert@cs.ucla.edu>
7413
7414         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7415         Don't worry about this obsolete case any more.
7416         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7417         directories.
7418         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7419         worry about this obsolete case any more.
7420         * lib/fts.c: Likewise.
7421         * lib/getcwd.c: Likewise.
7422         * lib/glob.h: Likewise.
7423         * lib/savedir.c: Likewise.
7424
7425 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7426
7427         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7428         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7429         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7430         needed.
7431         All uses removed.
7432         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7433         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7434         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7435         needed.
7436         * m4/getdate.m4 (gl_GETDATE): Likewise.
7437         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7438         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7439         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7440         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7441         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7442         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7443         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7444         needed.
7445
7446 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7447
7448         * lib/memcasecmp.c: Include <limits.h>.
7449         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7450         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7451         Don't assume isdigit succeeds only on '0' through '9'.
7452
7453 2006-07-05  Eric Blake  <ebb9@byu.net>
7454
7455         * modules/getaddrinfo (Depends-on): Add snprintf.
7456
7457 2006-07-05  Eric Blake  <ebb9@byu.net>
7458
7459         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7460         to avoid 'header present but could not be compiled' on cygwin.
7461
7462 2006-07-05  Eric Blake  <ebb9@byu.net>
7463
7464         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7465         missing from netdb.h.
7466         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7467
7468 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7469
7470         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7471         no longer needed.
7472         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7473         * m4/getdate.m4 (gl_GETDATE): Likewise.
7474         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7475         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7476         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7477         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7478         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7479
7480 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7481
7482         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7483         All uses of is_space replaced by isspace.
7484         * lib/exit.h: Don't talk about STDC_HEADERS.
7485         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7486         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7487         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7488         replaced by isprint etc.
7489         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7490         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7491         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7492         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7493         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7494         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7495
7496 2006-07-05  Bruno Haible  <bruno@clisp.org>
7497
7498         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7499         the function exists, before testing against AIX.
7500         Reported by Martin Lambers <marlam@marlam.de>.
7501
7502 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7503
7504         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7505         From Mark D. Baushke.
7506
7507 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7508
7509         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7510         to the absolute name, not just one, to bypass Sun C 5.8's
7511         "warning: #include of /usr/include/... may be non-portable".
7512
7513 2006-07-04  Eric Blake  <ebb9@byu.net>
7514
7515         * modules/dirname-tests: New test module.
7516         * tests/test-dirname.c: New file, replacing dirname.c
7517         TEST_DIRNAME section that was recently deleted.
7518
7519 2006-07-04  Bruno Haible  <bruno@clisp.org>
7520
7521         Assume ANSI C header files and <ctype.h> functions.
7522         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7523         (mbsnwidth): Use isprint, iscntrl instead.
7524
7525 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7526
7527         Merge from coreutils.
7528         * MODULES.html.sh: Add xstrtold.
7529         * modules/xstrtold: New file.
7530         * modules/cycle-check (Files): Add lib/same-inode.h.
7531         * modules/dirname (Files): Add m4/double-slash-root.m4.
7532         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7533         * modules/mkdir-p (Files): Add lib/same-inode.h.
7534         * modules/same (Files): Add lib/same-inode.h.
7535
7536 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7537
7538         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7539         This is to keep the terminology clean; POSIX talks about
7540         "absolute pathnames", not "full pathnames", but the GNU
7541         Coding Standards say to use "path" for something else;
7542         so use "absolute" to keep both sides happy.
7543         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7544         Set gl_absolute_header, not gl_full_header_path.
7545         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7546         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7547         All uses changed.
7548
7549         Merge from coreutils.
7550
7551         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7552
7553         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7554         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7555         want to require the building of c-strtod.o.
7556         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7557         needs -lm directly.
7558         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7559
7560         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7561
7562         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7563         --as-needed option if available.  Problem reported by Albert Chin in
7564         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7565         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7566         cc merely issues a bunch of annoying warnings for --as-needed
7567         (this problem was reported by Bob Proulx).  Also, try linking with
7568         -lm to detect a bug in binutils 2.16 (this problem was reported
7569         by Ralf Wildenhues).
7570
7571         2006-06-18  Jim Meyering  <jim@meyering.net>
7572
7573         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7574         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7575         macro.
7576         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7577         also check for glibc-2.4's abort-inducing bug.
7578
7579         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7580         Low-probability clean-up should be to use rmdir to get rid of
7581         the just-created directory, not unlink.
7582
7583         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7584         configure fail, and request a bug report to inform us about it.
7585         Add a comment that, barring reports to the contrary, in 2007 we'll
7586         assume ftruncate is universally available.
7587
7588         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7589
7590         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7591
7592         2006-03-12  Jim Meyering  <jim@meyering.net>
7593
7594         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7595         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7596         * m4/same.m4 (gl_SAME): Likewise.
7597         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7598
7599         2006-03-11  Eric Blake  <ebb9@byu.net>
7600
7601         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7602         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7603         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7604         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7605
7606 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7607
7608         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7609         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7610         reported by Mark D. Baushke, one in
7611         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7612
7613         Merge from coreutils.
7614
7615         * lib/.cppi-disable: Add stdint_.h.
7616         * lib/.cvsignore: Add stdint.h.
7617
7618         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7619
7620         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7621         both double and long double versions.
7622         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7623         * lib/xstrtold.c: New file.
7624         * lib/xstrtod.h (xstrtold): New decl.
7625
7626         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7627
7628         * lib/filemode.c (setst): Remove.
7629         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7630         (arguably) clearer, and the generated code is a bit smaller on my
7631         Debian GNU/Linux stable x86 host.
7632
7633         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7636         Assume that filemode.h includes sys/types.h and sys/stat.h.
7637         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7638         (ftypelet): Reorder to put common cases first, for efficiency.
7639         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7640         to do 'M'.
7641         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7642         of 10, for compatibility with FreeBSD.  All callers changed.
7643         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7644         types that can't be deduced solely from st_mode.  First arg is now a
7645         const pointer.
7646         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7647         (strmode): Renamed from mode_string.
7648         (filemodestring): New decl.
7649         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7650         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7651         needed.
7652         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7653
7654         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7655
7656         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7657         fsusage.h now does that.  Include fsusage.h first, to test interface.
7658         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7659         at most one method (the old code could have generated decls that
7660         didn't conform to C89, not that this was ever exercised).
7661         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7662
7663         2006-03-19  Jim Meyering  <jim@meyering.net>
7664
7665         Work even in a chroot where d_ino values for entries in "/"
7666         don't match the stat.st_ino values for the same names.
7667         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7668         number, iterate through all entries again, using lstat instead.
7669         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7670         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7671
7672         * lib/getcwd.c (__getcwd): Clarify a comment.
7673         Use memcpy in place of a call to strcpy.
7674
7675         2006-03-12  Jim Meyering  <jim@meyering.net>
7676
7677         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7678         matches that of the current directory (which we're about to chdir ".."
7679         out of), then save the dev-ino of the parent, instead.
7680
7681         * lib/same-inode.h (SAME_INODE): New file/macro.
7682         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7683         Include "same-inode.h", instead.
7684         * lib/same.c: Likewise.
7685         * lib/cycle-check.h: Include "same-inode.h".
7686         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7687         * lib/cycle-check.c (SAME_INODE): Remove definition.
7688         * lib/root-dev-ino.h: Include "same-inode.h".
7689
7690         2006-03-11  Eric Blake  <ebb9@byu.net>
7691
7692         * lib/same.c (same_name): s/base_name/last_component/
7693         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7694         * lib/filenamecat.c (file_name_concat): Likewise.
7695
7696         2006-03-11  Eric Blake  <ebb9@byu.net>,
7697                     Paul Eggert  <eggert@cs.ucla.edu>
7698
7699         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7700         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7701         drive prefix.
7702         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7703         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7704         (last_component): New method.
7705         * lib/dirname.c (dir_len): Determine when drive letters need a
7706         subsequent slash.  Preserve // when it is special.
7707         (dir_name): Don't append dot when drive letter is absolute.
7708         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7709         * lib/basename.c (base_name): New semantics - malloc the result.
7710         Preserve // when it is special.  Preserve relative files that look
7711         like drive letters.
7712         (base_len): Preserve // when it is special.
7713         (last_component): New method, similar to old base_name semantics.
7714         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7715         base_name.  Strip redundant slashes from ///.
7716
7717 2006-07-03  Jim Meyering  <jim@meyering.net>
7718
7719         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7720         macro is used before the first cycle_check call.
7721
7722 2006-07-03  Eric Blake  <ebb9@byu.net>
7723
7724         * modules/dirname (Depends-on): Add xstrndup.
7725
7726 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7727
7728         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7729         test cases, so that config.log is a bit easier to follow.
7730
7731 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7732
7733         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7734         both are 64 bits, since this seems to be the tradition, and this
7735         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7736         we ever run into a host that prefers long long to long in this
7737         case, we'll need another configure-time test.  Problem reported by
7738         Jim Meyering.
7739
7740 2006-07-02  Eric Blake  <ebb9@byu.net>
7741
7742         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7743
7744 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7745
7746         * modules/inttypes (Depends-on): No longer depends on stdint.
7747         * modules/stdint (Description): Say more about assumptions.
7748         Say that the fast types might differ.  Say macros are used.
7749         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7750         (Makefile.am): Revise list of substituted symbols to match
7751         new stdint.m4.
7752         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7753         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7754         * tests/test-stdint.c (verify_same_types)
7755         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7756         the code conforms to C99/C89.
7757         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7758         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7759
7760 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7761
7762         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7763         but fix a bug, by requiring at least 64 bits.
7764         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7765         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7766         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7767         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7768
7769         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7770         changes.  Make 2.59 a prerequisite.  Check and substitute for
7771         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7772         inttypes.h.  Do not use special include files; just use the
7773         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7774         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7775         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7776         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7777         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7778         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7779         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7780         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7781         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7782         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7783         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7784         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7785         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7786         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7787         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7788         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7789         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7790         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7791         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7792         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7793         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7794         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7795         not check for things that C99 does not require, e.g., int8_t.  If
7796         a test isn't needed unless <stdint.h> isn't working, and is
7797         unlikely to be needed for any other reason, then don't do it
7798         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7799         size_t, since we assume C89 freestanding at least.  Do not check
7800         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7801         the right thing even if the types are not defined.  Instead use:
7802         (gl_STDINT_TYPE_PROPERTIES): New macro.
7803         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7804         testing whether <sys/types.h> clashes, as Autoconf does this for
7805         us now.  All uses removed.
7806         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7807         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7808         (gl_CHECK_TYPE_SAME):
7809         Remove; no longer needed.
7810         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7811         exists, since we'll return 0 anyway in that case.
7812         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7813
7814 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7815
7816         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7817         possible collision with system files.
7818         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7819         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7820         WCHAR_MIN and WCHAR_MAX in this case.
7821         (<stddef.h>): Do not include; no longer needed.
7822         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7823         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7824         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7825         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7826         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7827         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7828         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7829         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7830         !defined(__c99))]: Include in this case too, since it's harmless
7831         now.
7832         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7833         dangerous to do so.
7834         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7835         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7836         (_STDINT_MIN, _STDINT_MAX): New macros.
7837         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7838         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7839         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7840         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7841         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7842         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7843         macros, not typedefs; this simplifies things quite a bit.
7844         Use long int for all types narrower than int64_t.
7845         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7846         Define in terms of long long int or int64_t or long int,
7847         not int64_t or int32_t.  This saves some compile-time testing.
7848         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7849         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7850         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7851         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7852         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7853         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7854         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7855         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7856         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7857         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7858         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7859         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7860         undef any previous version and define our own version, for
7861         simplicity and consistency with the new macros for types.
7862         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7863         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7864         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7865         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7866         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7867         @WINT_T_SUFFIX@ to keep things simple here.
7868         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7869         Simplify by assuming typical 8/16/32/64 host, since we're
7870         already doing that elsewhere anyway.
7871         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7872         and assume long long int is 64 bits if available.  This
7873         speeds up 'configure'.
7874
7875 2006-07-01  Eric Blake  <ebb9@byu.net>
7876
7877         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7878         Reported by Andreas Buening.
7879
7880 2006-07-01  Eric Blake  <ebb9@byu.net>
7881
7882         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7883
7884 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7885
7886         * lib/getaddrinfo.c: fixed typo
7887
7888 2006-06-29  Jim Meyering  <jim@meyering.net>
7889
7890         * modules/strftime (Maintainer): Add my name, since with the
7891         FPRINTFTIME changes strftime.c has forked from glibc.
7892
7893 2006-06-29  Eric Blake  <ebb9@byu.net>
7894
7895         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7896
7897 2006-06-29  Eric Blake  <ebb9@byu.net>
7898
7899         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7900
7901 2006-06-29  Eric Blake  <ebb9@byu.net>
7902
7903         * lib/stat_.h: New file.
7904
7905 2006-06-29  Eric Blake  <ebb9@byu.net>
7906
7907         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7908         unused static function.
7909
7910 2006-06-29  Eric Blake  <ebb9@byu.net>
7911
7912         * doc/functions.texi (Function Portability): Document missing lstat
7913         on mingw.
7914
7915 2006-06-29  Eric Blake  <ebb9@byu.net>
7916
7917         * MODULES.html.sh: Add sys_stat.
7918         * modules/sys_stat: New module.
7919         * modules/mkstemp (Depends-on): Add sys_stat.
7920
7921 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7922
7923         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7924
7925 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7926
7927         * m4/c-bs-a.m4: Removed.
7928
7929 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7930
7931         * lib/strftime.c: Assume strftime() exists.
7932
7933 2006-06-29  Derek Price  <derek@ximbiot.com>
7934
7935         * modules/c-bs-a: Removed - \a is C89.
7936         * MODULES.html.sh: Remove c-bs-a.
7937
7938 2006-06-29  Bruno Haible  <bruno@clisp.org>
7939
7940         * modules/wcwidth (License): Change to LGPL.
7941
7942 2006-06-28  Simon Josefsson  <jas@extundo.com>
7943
7944         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7945         on _WIN32.
7946
7947         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7948         getnameinfo.
7949
7950 2006-06-28  Simon Josefsson  <jas@extundo.com>
7951
7952         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7953
7954 2006-06-28  Simon Josefsson  <jas@extundo.com>
7955
7956         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7957         functions there.  It will succeed on Windows XP, but on Windows
7958         2000 and (presumably) earlier, it will fail, and use the internal
7959         re-implementation.
7960         (use_win32_p): New function.
7961         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7962         Support AI_NUMERICSERV to disable getservbyname.
7963         (getnameinfo): New function, only supports
7964         NI_NUMERICHOST|NI_NUMERICSERV for now.
7965
7966         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7967         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7968         getnameinfo.
7969
7970 2006-06-28  Eric Blake  <ebb9@byu.net>
7971
7972         * modules/wcwidth: New file.
7973         * modules/mbchar (Depends-on): Add wcwidth.
7974         * modules/mbswidth (Depends-on): Add wcwidth.
7975         * MODULES.html.sh: Add wcwidth.
7976
7977 2006-06-28  Eric Blake  <ebb9@byu.net>
7978
7979         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7980         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7981
7982 2006-06-28  Eric Blake  <ebb9@byu.net>
7983
7984         * lib/xvasprintf.h: Fix comments.
7985
7986 2006-06-28  Eric Blake  <ebb9@byu.net>
7987
7988         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7989         * lib/mbswidth.c (wcwidth): Move from here...
7990         * lib/wcwidth.h: ...to this new file.
7991
7992 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7993
7994         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7995
7996         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7997         it's obsolete.
7998         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7999
8000 2006-06-28  Derek R. Price  <derek@ximbiot.com>
8001
8002         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
8003         Autoconf 2.60 says this stuff was obsolete.
8004
8005 2006-06-28  Bruno Haible  <bruno@clisp.org>
8006
8007         * modules/wcwidth (Files): Add m4/wchar_t.m4.
8008
8009 2006-06-28  Bruno Haible  <bruno@clisp.org>
8010
8011         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
8012         gt_TYPE_WCHAR_T.
8013
8014 2006-06-28  Bruno Haible  <bruno@clisp.org>
8015
8016         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
8017         declaration for wcwidth.
8018         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
8019
8020 2006-06-28  Bruno Haible  <bruno@clisp.org>
8021
8022         * lib/mkdtemp.c [MINGW]: Include <io.h>.
8023         (mkdir): Define using _mkdir.
8024
8025 2006-06-28  Bruno Haible  <bruno@clisp.org>
8026
8027         * lib/getaddrinfo.h: Fix POSIX URL.
8028         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8029         _WIN32.
8030         (use_win32_p): Make static.
8031         (getaddrinfo): Reject service name if it is empty or does not consist
8032         solely of decimal digits, or if its value is > 65535.
8033         (getnameinfo): Remove useless casts.
8034
8035 2006-06-27  Simon Josefsson  <jas@extundo.com>
8036
8037         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8038         Eggert and Martin Lambers.
8039
8040 2006-06-27  Simon Josefsson  <jas@extundo.com>
8041
8042         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8043         Eggert and Martin Lambers.
8044
8045 2006-06-27  Bruno Haible  <bruno@clisp.org>
8046
8047         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8048         result to 0, not to empty.
8049         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8050
8051 2006-06-27  Bruno Haible  <bruno@clisp.org>
8052
8053         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8054
8055 2006-06-26  Simon Josefsson  <jas@extundo.com>
8056
8057         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8058         present.
8059
8060 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8061
8062         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8063         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8064         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8065
8066 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8067
8068         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8069
8070 2006-06-26  Bruno Haible  <bruno@clisp.org>
8071
8072         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8073
8074 2006-06-26  Bruno Haible  <bruno@clisp.org>
8075
8076         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8077
8078 2006-06-26  Bruno Haible  <bruno@clisp.org>
8079
8080         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8081         SGI C compiler in pre-C99 mode.
8082         Suggested by Mark D. Baushke and Larry Jones.
8083
8084 2006-06-26  Bruno Haible  <bruno@clisp.org>
8085
8086         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8087         WCHAR_MAX.
8088         Reported by Mark D. Baushke and Larry Jones.
8089
8090 2006-06-26  Bruno Haible  <bruno@clisp.org>
8091
8092         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8093         in pre-C99 mode.
8094         Suggested by Mark D. Baushke and Larry Jones.
8095
8096 2006-06-23  Simon Josefsson  <jas@extundo.com>
8097             Bruno Haible  <bruno@clisp.org>
8098
8099         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8100         Emit mostlyclean-local rule.
8101         (func_emit_tests_Makefile_am): Likewise.
8102         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8103
8104 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8105
8106         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8107
8108 2006-06-23  Bruno Haible  <bruno@clisp.org>
8109
8110         * tests/test-stdint.c: Update to match ISO C 99 Technical
8111         Corrigendum 1.
8112
8113 2006-06-23  Bruno Haible  <bruno@clisp.org>
8114
8115         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8116
8117 2006-06-23  Bruno Haible  <bruno@clisp.org>
8118
8119         * lib/stdint_.h: Treat IRIX like OpenBSD.
8120
8121 2006-06-23  Bruno Haible  <bruno@clisp.org>
8122
8123         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8124         ISO C 99 Technical Corrigendum 1.
8125
8126 2006-06-22  Simon Josefsson  <jas@extundo.com>
8127
8128         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8129         MinGW.
8130
8131 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8132
8133         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8134         needed.  Some compiler complained about some of them.  Problem reported
8135         by Larry Jones in
8136         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8137
8138 2006-06-21  Simon Josefsson  <jas@extundo.com>
8139
8140         * tests/test-getaddrinfo.c: New file.
8141
8142         * modules/getaddrinfo-tests: New file.
8143
8144         * MODULES.html.sh: Add inet_pton.
8145
8146         * modules/inet_pton: New file.
8147
8148 2006-06-21  Simon Josefsson  <jas@extundo.com>
8149
8150         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8151         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8152         of using the (limited) gnulib implementation on Windows XP.
8153
8154         * m4/inet_pton.m4: New file.
8155
8156 2006-06-21  Simon Josefsson  <jas@extundo.com>
8157
8158         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8159         variable.
8160
8161         * lib/socket_.h: Don't define WINVER.
8162
8163         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8164         slightly modified to work in gnulib.
8165
8166 2006-06-21  Simon Josefsson  <jas@extundo.com>
8167
8168         * doc/gnulib.texi (Windows sockets): Add.
8169
8170 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8171
8172         * lib/read-file.c (fread_file): Start with buffer allocation of
8173         0 bytes rather than 1 byte; this simplifies the code.
8174         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8175         code to free buffer and save/restore errno.
8176         (internal_read_file): Remove unused local.
8177
8178 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8179
8180         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8181         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8182         Problem reported by Denis Excoffier in
8183         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8184
8185 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8186
8187         * modules/sys_socket, modules/socklen: Include sys/types since
8188         FreeBSD 4.x's sys/socket.h needs it.
8189
8190 2006-06-19  Simon Josefsson  <jas@extundo.com>
8191
8192         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8193
8194 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8195
8196         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8197
8198 2006-06-19  Bruno Haible  <bruno@clisp.org>
8199
8200         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8201         and FULL_PATH_INTTYPES_H in angle brackets.
8202         Reported by Mark D. Baushke <mdb@gnu.org>.
8203
8204 2006-06-17  Eric Blake  <ebb9@byu.net>
8205
8206         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8207         errno.
8208
8209 2006-06-17  Bruno Haible  <bruno@clisp.org>
8210
8211         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8212         <sys/inttypes.h>.
8213
8214 2006-06-17  Bruno Haible  <bruno@clisp.org>
8215
8216         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8217         whether errno is declared. Assume <errno.h> declares errno.
8218
8219 2006-06-17  Bruno Haible  <bruno@clisp.org>
8220
8221         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8222
8223 2006-06-17  Bruno Haible  <bruno@clisp.org>
8224
8225         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8226         problem on Solaris 2.5.1.
8227
8228 2006-06-16  Eric Blake  <ebb9@byu.net>
8229
8230         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8231         * lib/unicodeio.c [!defined errno]: Likewise.
8232         * lib/strtol.c [!defined errno]: Likewise.
8233         * lib/strtod.c [!defined errno]: Likewise.
8234
8235 2006-06-15  Eric Blake  <ebb9@byu.net>
8236
8237         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8238
8239 2006-06-15  Eric Blake  <ebb9@byu.net>
8240
8241         * config/srclist.txt (ssize_t.m4): Lose sync.
8242
8243 2006-06-15  Bruno Haible  <bruno@clisp.org>
8244
8245         * modules/stdint (Files): Include m4/full-header-path.m4,
8246         m4/size_max.m4, m4/wchar_t.m4.
8247         (Makefile.am): Many more substitutions.
8248         * modules/stdint-tests: New file.
8249         * tests/test-stdint.c: New file.
8250
8251 2006-06-15  Bruno Haible  <bruno@clisp.org>
8252
8253         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8254         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8255         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8256         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8257         gl_CHECK_TYPE_SAME): New macros.
8258
8259 2006-06-15  Bruno Haible  <bruno@clisp.org>
8260
8261         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8262
8263 2006-06-15  Bruno Haible  <bruno@clisp.org>
8264
8265         * lib/stdint_.h: Rewritten to be fully auto-configured.
8266         Fixes bug on HP-UX/IA64.
8267
8268 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8269
8270         * lib/getdate.y (__attribute__): Don't define if already defined.
8271         Problem reported by Larry Jones.
8272         * lib/utimens.c (__attribute__): Likewise.
8273
8274 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8275
8276         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8277         reported by Andreas Schwab.
8278
8279 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8280             Bruno Haible  <bruno@clisp.org>
8281
8282         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8283         check for the declaration of strnlen and a run test that exposes the
8284         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8285         rpl_strndup.
8286
8287 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8288             Bruno Haible  <bruno@clisp.org>
8289
8290         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8291
8292 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8293
8294         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8295         compile test, for Tru64 4.0D.
8296
8297 2006-05-28  Karl Berry  <karl@gnu.org>
8298
8299         * config/srclist.txt (printf-args.c): lose sync.
8300
8301 2006-05-26  Martin Lambers  <marlam@marlam.de>
8302
8303         * lib/getpass.c: Updates the test for the native W32 API, and adds
8304         missing includes, thus fixing compilation warnings.
8305
8306 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8307
8308         * lib/exclude.c (exclude_fnmatch): New function.
8309         (excluded_file_name): Call exclude_fnmatch.
8310         * lib/exclude.h (excluded_file_name): New prototype
8311
8312 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8313
8314         * lib/tempname.c (small_open, large_open): New macros.
8315         (__open, __open64) [!_LIBC]: Remove.
8316         (__gen_tempname): Use small_open and large_open instead of __open
8317         and __open64.  This fixes a portability bug on HP-UX 11.11i
8318         reported by Simon Wing-Tang in
8319         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8320
8321 2006-05-24  Bruno Haible  <bruno@clisp.org>
8322
8323         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8324         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8325         Reported by Thorsten Maerz <torte@netztorte.de> via
8326         Aaron Stone <aaron@serendipity.cx>.
8327
8328 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8329
8330         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8331         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8332         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8333         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8334         not really conditional on the cache.
8335         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8336
8337 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8338
8339         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8340         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8341         (my_usleep): Don't mishandle maximum value.
8342
8343 2006-05-19  Jim Meyering  <jim@meyering.net>
8344
8345         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8346
8347 2006-05-17  Bruno Haible  <bruno@clisp.org>
8348
8349         Cygwin portability.
8350         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8351
8352 2006-05-17  Bruno Haible  <bruno@clisp.org>
8353
8354         * lib/stdint_.h: Fix recognition of Cygwin.
8355
8356 2006-05-15  Bruno Haible  <bruno@clisp.org>
8357
8358         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8359         on libtool patch by Ralf Wildenhues.
8360
8361 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8362
8363         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8364         test for C99 conformance; (bool) 0.5 is an integer constant
8365         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8366         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8367
8368 2006-05-11  Simon Josefsson  <jas@extundo.com>
8369
8370         * m4/xvasprintf.m4: Fix obvious typo.
8371
8372 2006-05-11  Jim Meyering  <jim@meyering.net>
8373
8374         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8375         James Lemley.
8376
8377 2006-05-10  Simon Josefsson  <jas@extundo.com>
8378
8379         * lib/md4.c: Typo fix, update copyright years.
8380         (K1, K2): Don't use L because it turn computations into 64-bit on
8381         64-bit platforms.
8382
8383 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8384
8385         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8386         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8387         unwanted sign propagation, e.g., on hosts with 64-bit int.
8388         There still are some problems with reeelly weird theoretical hosts
8389         (e.g., 33-bit int) but it's not worth worrying about now.
8390         * lib/sha1.c (rol): Likewise.
8391         (K1, K2, K3, K4): Remove unnecessary L suffix.
8392
8393 2006-05-10  Bruno Haible  <bruno@clisp.org>
8394
8395         * lib/des.c: Cast to avoid warnings.
8396
8397 2006-05-09  Bruno Haible  <bruno@clisp.org>
8398
8399         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8400         (Depends-on): Depend also on xsize, stdarg.
8401         (configure.ac): Add gl_XVASPRINTF.
8402
8403 2006-05-09  Bruno Haible  <bruno@clisp.org>
8404
8405         * m4/xvasprintf.m4: New file.
8406
8407 2006-05-09  Bruno Haible  <bruno@clisp.org>
8408
8409         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8410         (EOVERFLOW): Define fallback value.
8411         (xstrcat): New function.
8412         (xvasprintf): Recognize the special case of a string concatenation.
8413
8414 2006-05-08  Eric Blake  <ebb9@byu.net>
8415
8416         * gnulib-tool (func_version): Base copyright year on CVS date.
8417         (func_emit_copyright_notice): New function.
8418         (func_emit_lib_Makefile_am): Use it.
8419         (func_emit_tests_Makefile_am): Likewise.
8420         (func_import): Likewise.
8421
8422 2006-05-08  Bruno Haible  <bruno@clisp.org>
8423
8424         * modules/stdarg: New file.
8425         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8426
8427 2006-05-08  Bruno Haible  <bruno@clisp.org>
8428
8429         * m4/stdarg.m4: New file, from GNU gettext.
8430
8431 2006-05-08  Bruno Haible  <bruno@clisp.org>
8432
8433         * config/srclist.txt (build-aux/config.rpath): different from latest
8434         release.
8435
8436 2006-05-08  Bruno Haible  <bruno@clisp.org>
8437
8438         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8439
8440 2006-05-05  Jim Meyering  <jim@meyering.net>
8441
8442         * m4/warning.m4: New file, derived from bison's file by the same name.
8443
8444 2006-05-03  Bruno Haible  <bruno@clisp.org>
8445
8446         * lib/stdint_.h: Shorter URL.
8447         * lib/inttypes.h: Likewise.
8448
8449 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8450
8451         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8452
8453 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8454
8455         * lib/verify.h: Document the internals better.  Most of this change
8456         was written by Bruno Haible.
8457
8458 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8459
8460         * doc/verify.texi: New file, partly based on a proposal by
8461         Bruno Haible.
8462
8463 2006-05-02  Bruno Haible  <bruno@clisp.org>
8464
8465         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8466         test from here...
8467         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8468
8469 2006-04-29  Bruno Haible  <bruno@clisp.org>
8470
8471         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8472         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8473
8474 2006-04-29  Bruno Haible  <bruno@clisp.org>
8475
8476         * gnulib-tool: Make --update option actually work.
8477
8478 2006-04-29  Bruno Haible  <bruno@clisp.org>
8479
8480         * doc/gcd.texi: New file.
8481         * doc/gnulib.texi: Include it.
8482
8483 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8484
8485         * lib/getdate.y (get_date): When adding relative date, start with the
8486         initial time, not with the result of the first mktime call.
8487
8488 2006-04-25  Bruno Haible  <bruno@clisp.org>
8489
8490         * gnulib-tool (func_import): Output the include directives in three
8491         blocks, sorted separately.
8492         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8493
8494 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8495
8496         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8497         to define main with arguments, for C++.  Reported by Eric Blake.
8498         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8499         Prefer 'int main ()' to 'int main (void)', for C++.
8500         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8501         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8502         for 'main', for C99 and C++.
8503
8504 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8505
8506         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8507         Don't assume that exit status -1 is valid.
8508         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8509         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8510         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8511         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8512         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8513         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8514         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8515         functions can be used without declaring them, or that you can
8516         exit with status -1.
8517         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8518
8519 2006-04-24  Karl Berry  <karl@gnu.org>
8520
8521         * config/srclist.txt (longdouble.m4): sync lost.
8522
8523 2006-04-24  Eric Blake  <ebb9@byu.net>
8524
8525         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8526
8527 2006-04-24  Bruno Haible  <bruno@clisp.org>
8528
8529         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8530         poll() implementation in AIX.
8531         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8532
8533 2006-04-24  Bruno Haible  <bruno@clisp.org>
8534
8535         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8536         assigned exactly once.
8537
8538 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8539             Bruno Haible  <bruno@clisp.org>
8540
8541         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8542         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8543         for AM_CPPFLAGS.
8544
8545 2006-04-23  Bruno Haible  <bruno@clisp.org>
8546
8547         * modules/copy-file: Depend on unistd.
8548         * modules/execute: Likewise.
8549         * modules/fatal-signal: Likewise.
8550         * modules/findprog: Likewise.
8551         * modules/mkdtemp : Likewise.
8552         * modules/pipe: Likewise.
8553         * modules/wait-process: Likewise.
8554
8555 2006-04-23  Bruno Haible  <bruno@clisp.org>
8556
8557         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8558         condition was already detected.
8559         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8560
8561 2006-04-23  Bruno Haible  <bruno@clisp.org>
8562
8563         * lib/copy-file.c: Include <unistd.h> unconditionally.
8564         * lib/execute.c: Likewise.
8565         * lib/fatal-signal.c: Likewise.
8566         * lib/findprog.c: Likewise.
8567         * lib/mkdtemp.c: Likewise.
8568         * lib/pipe.h: Likewise.
8569         * lib/pipe.c: Likewise.
8570         * lib/wait-process.h: Likewise.
8571
8572 2006-04-23  Bruno Haible  <bruno@clisp.org>
8573
8574         * gnulib-tool (func_usage): Fix --import description. Document
8575         --update.
8576         (func_import): Create temporary file in a temporary directory, if
8577         --dry-run is specified. Silence errors from 'grep' when there are no
8578         m4 files in $m4dir.
8579         (func_create_testdir): Silence errors from 'grep' when there are no
8580         m4 files in $m4dir.
8581         Reported by Karl Berry <karl@freefriends.org>.
8582
8583 2006-04-20  Bruno Haible  <bruno@clisp.org>
8584
8585         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8586         one argument, so that the code will be portable to Autoconf 2.60.
8587         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8588         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8589         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8590
8591 2006-04-19  Derek Price  <derek@ximbiot.com>
8592             Eric Blake  <ebb9@byu.net>
8593
8594         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8595         rather than "/full/path.h".  Update comment to match.  Shorten &
8596         generalize m4_translit call via AS_TR_CPP.
8597
8598 2006-04-19  Derek Price  <derek@ximbiot.com>
8599             Eric Blake  <ebb9@byu.net>
8600
8601         * lib/inttypes.h: Correct grammar in comment.
8602
8603 2006-04-18  Derek Price  <derek@ximbiot.com>
8604             Paul Eggert  <eggert@cs.ucla.edu>
8605
8606         * modules/inttypes: New file.
8607         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8608
8609 2006-04-18  Derek Price  <derek@ximbiot.com>
8610             Paul Eggert  <eggert@cs.ucla.edu>
8611
8612         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8613         New files.
8614
8615 2006-04-18  Derek Price  <derek@ximbiot.com>
8616             Paul Eggert  <eggert@cs.ucla.edu>
8617
8618         * lib/inttypes.h: New file.
8619         * lib/strtoimax.c: Assume <inttypes.h>.
8620
8621 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8622
8623         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8624         isn't mounted.  Problem reported by Kir Kolyshkin.
8625
8626 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8627
8628         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8629         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8630         Derek R. Price.
8631         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8632         implementation.
8633
8634 2006-04-12  Eric Blake  <ebb9@byu.net>
8635
8636         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8637         is now done automatically by the corresponding Autoconf macro.
8638
8639 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8640
8641         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8642         time_r.h.
8643
8644 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8645
8646         Merge regex changes from libc, removing some of our
8647         POSIX-conformance changes that were rejected and redoing them in a
8648         less-intrusive way.
8649
8650         * lib/regcomp.c (re_compile_internal, init_dfa):
8651         Length arg is now size_t, not Idx.  All uses changed.
8652         (peek_token): Forward decl now says internal_function.
8653         (__re_error_msgid, __re_error_msgid_idx):
8654         Now static rather than extern with attribute_hidden.
8655         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8656         For some reason libc prefers K&R style defns for external functions.
8657         (regerror) [!defined _LIBC]: Likewise.
8658         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8659         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8660         (build_range_exp, build_collating_symbol):
8661         Use K&R-style defn.
8662         (re_compile_fastmap): Use '\0' to memset, not 0.
8663         (utf8_sb_map): Make the calculations more obvious.
8664         (init_dfa, parse_bracket_exp, build_charclass_op):
8665         Call calloc and cast result, as glibc does.
8666         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8667         (build_range_exp, build_collating_symbol):
8668         Now internal functions.
8669
8670         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8671
8672         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8673         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8674         Don't depend on VMS; depend on __VMS instead, for POSIX
8675         namespace cleanness.
8676         (regoff_t): Define to ssize_t, not long int.
8677
8678         Remove the REG_ macros named below.  Instead, make the old names
8679         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8680         __USE_GNU_REGEX.
8681         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8682         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8683         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8684         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8685         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8686         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8687         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8688         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8689         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8690         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8691         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8692         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8693         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8694         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8695         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8696         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8697         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8698         (REG_NREGS):
8699         Remove.  All uses replaced by the old RE_* names.
8700         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8701         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8702         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8703         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8704         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8705         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8706         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8707         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8708         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8709         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8710         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8711         Don't bother having these macros be independent of each others'
8712         values, since they no longer exist in the POSIX name space.
8713
8714         Rename the following member names back to their old names,
8715         unless !__USE_GNU_REGEX.  All uses changed back.
8716         (buffer): Renamed from re_buffer.
8717         (allocated): Renamed from re_allocated.
8718         (used): Renamed from re_used.
8719         (syntax): Renamed from re_syntax.
8720         (fastmap): Renamed from re_fastmap.
8721         (translate): Renamed from re_translate.
8722         (can_be_null): Renamed from re_can_be_null.
8723         (regs_allocated): Renamed from re_regs_allocated.
8724         (fastmap_accurate): Renamed from re_fastmap_accurate.
8725         (no_sub): Renamed from re_no_sub.
8726         (not_bol): Renamed from re_not_bol.
8727         (not_eol): Renamed from re_not_eol.
8728         (newline_anchor): Renamed from re_newline_anchor.
8729         (num_regs): Renamed from rm_num_regs.
8730         (start): Renamed from rm_start.
8731         (end): Renamed from rm_end.
8732
8733         (free_state): Move up a bit.
8734
8735         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8736         #define to be empty.
8737         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8738         when that is what is intended.
8739         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8740         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8741         (MAX): New macro.
8742         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8743         All uses changed back to re_malloc, etc.  It's now the caller's
8744         responsibility to check for overflow; all callers changed.
8745         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8746         (re_x2nrealloc): Remove.
8747         (free_state): Remove decl.
8748
8749         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8750         (re_set_registers, re_exec):
8751         Use K&R-style defn.
8752
8753         2006-01-31  Roland McGrath  <roland@redhat.com>
8754
8755         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8756         Reported by Mike Frysinger <vapier@gentoo.org>.
8757
8758         2006-01-15  Andreas Jaeger  <aj@suse.de>
8759
8760         [BZ #1950]
8761         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8762         build_wcs_upper_buffer change.
8763         (build_wcs_upper_buffer): Change return type.
8764
8765         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8766
8767         * lib/regex_internal.h: Include <stdint.h> if available.
8768
8769         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8770
8771         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8772
8773         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8774
8775         * lib/regcomp.c: Adjust for changed secondary hash function.
8776
8777         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8778
8779         * lib/regex.h: Pretty printing.
8780         Clean up namespace a bit.
8781
8782         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8783
8784         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8785         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8786
8787         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8788                     Ulrich Drepper  <drepper@redhat.com>
8789
8790         [BZ #1302]
8791         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8792         changed.
8793         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8794
8795         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8796
8797         [BZ #281]
8798         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8799         * lib/regcomp.c: Remove unnecessary uses of
8800         unsigned RE_TRANSLATE_TYPE.
8801         * lib/regex_internal.h: Likewise.
8802         * lib/regex_internal.c: Likewise.
8803         * lib/regexec.c: Likewise.
8804         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8805
8806         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8807
8808         * lib/regexec.c (find_recover_state): Remove unnecessary
8809         initialization.
8810         (transit_state_bkref): Make DFA a const pointer.
8811         (get_subexp): Likewise.
8812         (check_arrival): Likewise.
8813         (update_cur_sifted_state): Likewise.
8814         (re_search_internal): Likewise.
8815         (prune_impossible_nodes): Likewise.
8816         (acquire_init_state_context): Likewise.
8817         (proceed_next_node): Likewise.
8818         (set_regs): Likewise.
8819         (free_fail_stack_return): Likewise.
8820         (check_arrival_expand_ecl): Mark DFA parameter as const.
8821         (check_arrival_expand_ecl_sub): Likewise.
8822         (check_subexp_limits): Likewise.
8823         (sub_epsilon_src_nodes):  Likewise.
8824         (add_epsilon_src_nodes):  Likewise.
8825         (merge_state_array): Likewise.
8826         (update_regs): Likewise.
8827         (build_trtable): Likewise.
8828         (sift_states_backward): Mark MCTX parameter as const.
8829         (build_sifted_states): Likewise.
8830         (update_cur_sifted_state): Likewise.
8831         (sift_states_mkref): Likewise.
8832         (check_arrival_expand_ecl): Mark eclosure as const.
8833         (check_dst_limits_calc_pos_1): Likewise.
8834         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8835         pointer.
8836
8837         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8838
8839         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8840         (transit_state_sb): Likewise.
8841         (transit_state_mb): Likewise.
8842         (sift_states_iter_mb): Likewise.
8843         (check_arrival_add_next_nodes): Likewise.
8844         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8845         [_LIBC] (re_search_2_stub): Use mempcpy.
8846
8847         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8848         mbrtowc for very simple UTF-8 case.
8849
8850         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8851         a pointer-to-const.
8852         (re_acquire_state_context): Likewise.
8853         * lib/regex_internal.h: Adjust prototypes.
8854
8855         * lib/regex.c: Prevent using C++ compilers.
8856
8857         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8858         (re_acquire_state_context): Likewise.
8859
8860 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8861
8862         * modules/regex (Depends-on): Add ssize_t.
8863
8864 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8865
8866         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8867         translation table.
8868
8869 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8870
8871         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8872
8873 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8874             Bruno Haible  <bruno@clisp.org>
8875
8876         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8877         <sys/types.h> and <inttypes.h>.
8878
8879 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8880
8881         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8882         `__error_t_defined', so argp.h will not typedef the former.
8883
8884 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8885
8886         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8887         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8888         glibc names.  Even if glibc is changed to conform to POSIX, the
8889         traditional names will be available anyway, since regex depends on
8890         the extensions module.  Also, fix a longstanding typo in the
8891         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8892         reported by Emanuele Giaquinta.  Also, change sense of cached
8893         variable, so that the message makes sense.
8894
8895 2006-03-24  Simon Josefsson  <jas@extundo.com>
8896
8897         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8898         including some doc fixes.
8899         (base64_encode_alloc): Fix +1 bug on allocation failures.
8900
8901 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8902
8903         * lib/base64.c (base64_encode): Do not read past end of array with
8904         unsanitized input on systems with CHAR_BIT > 8.
8905
8906 2006-03-24  Eric Blake  <ebb9@byu.net>
8907
8908         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8909
8910 2006-03-22  Karl Berry  <karl@gnu.org>
8911
8912         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8913         * config/srclistvars.sh (COREUTILS): new var.
8914
8915 2006-03-17  Jim Meyering  <jim@meyering.net>
8916
8917         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8918         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8919
8920 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8921
8922         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8923         no longer needs it.  Instead, check that regoff_t is as least
8924         as wide as ptrdiff_t.
8925
8926         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8927         so that our regex.h stays compatible with the installed regex.
8928         This is helpful for installers who configure --without-included-regex.
8929         Problem reported by Emanuele Giaquinta.
8930
8931 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8932
8933         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8934         Typedef to long int, not to off_, as POSIX will likely change
8935         in that direction.
8936
8937 2006-03-15  Eric Blake  <ebb9@byu.net>
8938
8939         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8940
8941 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8942
8943         * lib/argp-help.c (validate_uparams): Fix typo
8944         * lib/argp-parse.c (argp_default_options): Consistently begin help
8945         messages with a lowercase letter.
8946
8947 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8948
8949         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8950         overrun buffers and shouldn't be used (much as gets shouldn't be
8951         used).
8952         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8953
8954 2006-03-08  Simon Josefsson  <jas@extundo.com>
8955
8956         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8957         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8958
8959 2006-03-08  Simon Josefsson  <jas@extundo.com>
8960
8961         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8962         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8963
8964 2006-03-08  Simon Josefsson  <jas@extundo.com>
8965
8966         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8967         signal that configure disabled the device.
8968
8969 2006-03-08  Simon Josefsson  <jas@extundo.com>
8970
8971         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8972         languages.
8973
8974 2006-03-07  Simon Josefsson  <jas@extundo.com>
8975
8976         * modules/getopt (Depends-on): Add unistd.
8977
8978         * modules/unistd: New file.
8979
8980 2006-03-07  Simon Josefsson  <jas@extundo.com>
8981
8982         * modules/gc-random: New file.
8983
8984 2006-03-07  Simon Josefsson  <jas@extundo.com>
8985
8986         * m4/unistd_h.m4: New file.
8987
8988 2006-03-07  Simon Josefsson  <jas@extundo.com>
8989
8990         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8991         test to be side-effect free by storing the result in the cache
8992         variable gl_cv_lib_readline, and moving the assignment of
8993         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8994         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8995
8996 2006-03-07  Simon Josefsson  <jas@extundo.com>
8997
8998         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8999         error on missing devices (the functions will return an error).
9000
9001         * m4/gc.m4: Move random stuff to gc-random.m4
9002
9003 2006-03-07  Simon Josefsson  <jas@extundo.com>
9004
9005         * lib/unistd_.h: New file.
9006
9007 2006-03-07  Simon Josefsson  <jas@extundo.com>
9008
9009         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
9010
9011 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9012
9013         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
9014         Problem reported by Juan Manuel Guerrero.
9015
9016 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9017
9018         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
9019         the unistd module.
9020         * lib/getlogin_r.c: Likewise.
9021         * lib/getlogin_r.h: Likewise.
9022         * lib/glob.c: Likewise.
9023         * lib/pagealign_alloc.c: Likewise.
9024         * lib/unistd_.h: Remove; no longer needed.
9025
9026 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9027
9028         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9029         Add unistd.
9030         * modules/c-stack (Depends-on): Add unistd.
9031         * modules/getlogin_r: Likewise.
9032         * modules/glob: Likewise.
9033         * modules/pagealign_alloc: Likewise.
9034         * modules/unistd (Files): Remove lib/unistd_.h.
9035         (EXTRA_DIST): Remove.
9036         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9037         need unistd_.h.
9038         (MOSTLYCLEANFILES): Remove unistd.h-t.
9039
9040 2006-03-03  Simon Josefsson  <jas@extundo.com>
9041
9042         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9043
9044 2006-03-03  Simon Josefsson  <jas@extundo.com>
9045
9046         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9047         libidn and bison.
9048
9049 2006-03-03  Simon Josefsson  <jas@extundo.com>
9050
9051         * build-aux/maint.mk: Add indent target.
9052
9053 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9054
9055         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9056         our replacement poll.h in any case, to avoid a differing
9057         declaration from a system header.  Seen on AIX.
9058
9059 2006-03-01  Simon Josefsson  <jas@extundo.com>
9060
9061         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9062         <kasal@ucw.cz>.
9063
9064 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9065
9066         * modules/gettime (Depends-on): Add extensions module.
9067         * modules/nanosleep (Depends-on): Likewise.
9068         * modules/settime (Depends-on): Likewise.
9069
9070 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9071
9072         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9073         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9074         pedantically.
9075         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9076         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9077
9078         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9079         not "==".  Reported by Ralf Wildenhues.
9080
9081 2006-03-01  Karl Berry  <karl@gnu.org>
9082
9083         * doc/Copyright/request-*: new files, synced from gnuorg.
9084
9085 2006-03-01  Karl Berry  <karl@gnu.org>
9086
9087         * config/srclist.txt (Copyright/*): new entries.
9088
9089 2006-02-28  Simon Josefsson  <jas@extundo.com>
9090
9091         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9092
9093 2006-02-27  Simon Josefsson  <jas@extundo.com>
9094
9095         * lib/base64.h: Indent #define's.  From Jim Meyering
9096         <jim@meyering.net>.
9097
9098 2006-02-27  Jim Meyering  <jim@meyering.net>
9099
9100         Revert the change of 2006-02-24, so these files can continue
9101         to be sync'd from gettext.
9102         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9103         of `config.h'.
9104
9105 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9106
9107         * modules/intprops: New file.
9108         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9109         Add intprops.
9110         * modules/getloadavg (Files): Remove lib/intprops.h.
9111         (Depends-on): Add intprops.
9112         * modules/human: Likewise.
9113         * modules/inttostr: Likewise.
9114         * modules/openat: Likewise.
9115         * modules/sig2str: Likewise.
9116         * modules/userspec: Likewise.
9117         * modules/utimecmp: Likewise.
9118         * modules/xnanosleep: Likewise.
9119         * modules/xstrtol: Likewise.
9120
9121 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9122
9123         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9124         * modules/lock-tests (TESTS): Use $(EXEEXT).
9125         * modules/tls-tests: Likewise.
9126         * modules/argp-tests: Likewise.
9127         (check_PROGRAMS): New var, replacing...
9128         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9129
9130 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9131
9132         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9133         `config.h'.
9134
9135 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9136
9137         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9138
9139 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9140
9141         Sync from coreutils.
9142         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9143         gl_CHDIR_SAFER.
9144
9145 2006-02-22  Jim Meyering  <jim@meyering.net>
9146
9147         Sync from coreutils.
9148         * m4/chdir-safer.m4: New file.
9149
9150 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9151
9152         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9153         AT_FDCWD exceeds INT_MAX.
9154         * lib/openat.h (AT_FDCWD): Likewise.
9155
9156 2006-02-17  Eric Blake  <address@hidden>
9157
9158         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9159
9160 2006-02-16  Simon Josefsson  <jas@extundo.com>
9161
9162         * modules/getaddrinfo (Depends-on): Add sys_socket.
9163
9164 2006-02-15  Simon Josefsson  <jas@extundo.com>
9165
9166         * build-aux/maint.mk: Add dsyntax-check rule.
9167
9168 2006-02-15  Eric Blake  <ebb9@byu.net>
9169
9170         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9171         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9172         'present but cannot compile' warnings on cygwin.
9173         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9174         use ws2tcpip.h if sys/socket.h works.
9175         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9176         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9177
9178 2006-02-14  Simon Josefsson  <jas@extundo.com>
9179
9180         * modules/maintainer-makefile (Files): Rename.
9181
9182         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9183         and (the local) Makefile.cfg to maint-cfg.mk.
9184
9185         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9186         to the latter.
9187
9188         * modules/maintainer-makefile: New module.
9189
9190         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9191         severaly stripped to make it possible to build it up from scratch
9192         with reliable tests.
9193
9194         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9195         fixes to permit overriding the default actions when configure and
9196         makefile are not available.
9197
9198 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9199
9200         Sync from coreutils.
9201         * modules/lstat (Depends-on): Don't depend on xalloc.
9202         (License): Change from GPL to LGPL, since this is now simply a
9203         replacement for a libc function.
9204
9205 2006-02-14  Jim Meyering  <jim@meyering.net>
9206
9207         Sync from coreutils.
9208
9209         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9210         failure on deficient systems, and simplify gnulib lgpl dependencies.
9211         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9212         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9213
9214         * lib/xalloc-die.c: Remove unused definition of N_.
9215
9216 2006-02-14  Jim Meyering  <jim@meyering.net>
9217
9218         Sync from coreutils.
9219         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9220         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9221         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9222         double-quote uses of that variable, to accommodate the rare case in
9223         which getmntent is available in none of the libraries checked.  This
9224         happens at least on FreeBSD 5.0.
9225
9226 2006-02-13  Simon Josefsson  <jas@extundo.com>
9227
9228         * gnulib-tool (Usage): Fix --import, from
9229         karl@freefriends.org (Karl Berry).
9230
9231 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9232
9233         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9234
9235 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9236
9237         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9238         "autoupdate" on 2005-12-12.
9239
9240 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9241
9242         * modules/closeout (Depends-on): Remove atexit.
9243
9244 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9245
9246         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9247         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9248
9249 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9250
9251         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9252         __EXTENSIONS__ if this causes compilation to fail.  Problem
9253         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9254         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9255
9256 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9257
9258         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9259         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9260         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9261         All uses changed.
9262
9263 2006-01-26  Simon Josefsson  <jas@extundo.com>
9264
9265         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9266         prototype is visible on mingw32.
9267
9268         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9269         for mingw32.
9270
9271         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9272         mingw32).
9273
9274 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9275
9276         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9277         attempt to open for write; this always fails, at least on POSIX
9278         hosts.  This reinstates the 2006-01-09 change, which was
9279         inadvertently removed.
9280
9281 2006-01-26  Bruno Haible  <bruno@clisp.org>
9282
9283         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9284         Reported by Paul Eggert.
9285
9286 2006-01-26  Bruno Haible  <bruno@clisp.org>
9287             Paul Eggert  <eggert@cs.ucla.edu>
9288
9289         * lib/stdbool_.h (_Bool)
9290         [(! (defined __cplusplus || defined __BEOS__)
9291           && !defined __GNUC__
9292           && !(defined __HP_cc || defined __xlc__
9293                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9294                || defined __sgi))]:
9295         #define to signed char in these cases too; this simplifies
9296         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9297         etc., separately) and makes it more conservative.
9298
9299 2006-01-25  Simon Josefsson  <jas@extundo.com>
9300
9301         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9302         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9303         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9304
9305 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9306
9307         * lib/argp-namefrob.h: Bugfix. Remove stray #
9308
9309 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9310
9311         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9312         so that we test the test.
9313         Check for yet another HP-UX cc bug involving *bool |= bool.
9314
9315 2006-01-25  Karl Berry  <karl@gnu.org>
9316
9317         * config/srclist.txt (vasnprintf.c): sync lost.
9318
9319 2006-01-25  Jim Meyering  <jim@meyering.net>
9320
9321         Sync from the stable (b5) branch of coreutils:
9322
9323         * lib/fts.c (fts_children): Don't let close() clobber errno from
9324         failed fchdir().
9325
9326         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9327         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9328         a dangling symlink.  That can also happen at least for ELOOP.
9329         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9330         FYI, this bug predates the inclusion of fts.c in coreutils.
9331
9332         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9333         in their own block, so pre-c99 compilers don't object.
9334
9335         Avoid the double-free (first in fts_read, second in fts_close) that
9336         would occur when an `active' directory is made inaccessible (e.g.,
9337         via chmod a-x) during a traversal.
9338         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9339         before returning.  Reproduce this failure by
9340         mkdir -p a/b; cd a; chmod a-x . b
9341         Reported by Stavros Passas.
9342
9343 2006-01-25  Jim Meyering  <jim@meyering.net>
9344
9345         * lib/fileblocks.c: Remove more useless parentheses.
9346         * lib/readutmp.h: Likewise.
9347
9348 2006-01-25  Bruno Haible  <bruno@clisp.org>
9349
9350         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9351         warnings.
9352         Reported by Paul Eggert.
9353
9354 2006-01-25  Bruno Haible  <bruno@clisp.org>
9355
9356         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9357         rid of a trap command. For Solaris sh.
9358         Reported by Mark D. Baushke <mdb@gnu.org>.
9359
9360 2006-01-24  Simon Josefsson  <jas@extundo.com>
9361
9362         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9363         Bruno.
9364
9365 2006-01-24  Karl Berry  <karl@gnu.org>
9366
9367         * config/srclist.txt (argp-namefrob.h): sync lost.
9368
9369 2006-01-24  Jim Meyering  <jim@meyering.net>
9370
9371         * modules/openat (Files): Add lib/intprops.h.
9372         From Mark D. Baushke.
9373
9374 2006-01-24  Jim Meyering  <jim@meyering.net>
9375
9376         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9377         Reported by Mark D. Baushke.
9378
9379 2006-01-24  Jim Meyering  <jim@meyering.net>
9380
9381         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9382
9383 2006-01-24  Bruno Haible  <bruno@clisp.org>
9384
9385         * modules/strnlen (Maintainer): Change from glibc to all.
9386
9387 2006-01-24  Bruno Haible  <bruno@clisp.org>
9388
9389         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9390         Patch by Paul Eggert.
9391
9392 2006-01-24  Bruno Haible  <bruno@clisp.org>
9393
9394         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9395         already has it.
9396         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9397         2005-11-26.
9398
9399         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9400         'signed char' to avoid problems with the built-in _Bool type.
9401         Reported by Paul Eggert on 2005-11-26.
9402
9403 2006-01-24  Bruno Haible  <bruno@clisp.org>
9404
9405         * gnulib-tool (func_import): Avoid constructing complicated sed
9406         expressions inside backquote.
9407         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9408
9409 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9410
9411         These changes imported from libc.
9412         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9413         test and two separate function calls.
9414         * lib/strndup.c (__strndup): Add libc_hidden_def.
9415
9416 2006-01-23  Simon Josefsson  <jas@extundo.com>
9417
9418         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9419         Remove the test_*_SOURCES variable: automake infers it by default.
9420         * modules/tls-tests: Likewise.
9421
9422 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9423
9424         Work around porting bugs reported by Dieter in
9425         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9426         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9427         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9428         Include "getopt.h" first, to check interface.
9429         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9430         !HAVE_DECL_GETENV.
9431         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9432         (__strndup): Revert to K&R-style function dfns, the glibc style.
9433         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9434         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9435         Include strnlen.h first, to get prototype properly.
9436         (strnlen): Renamed from __strnlen.
9437         Remove weak alias.
9438
9439 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9440
9441         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9442
9443 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9444
9445         * config/srclist.txt: Adjust to reflect glibc reorganization.
9446         This affects only comments.
9447
9448 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9449
9450          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9451          Reported by Bruce Korb <bkorb@gnu.org>.
9452
9453 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9454
9455         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9456         to pacify gcc -Wswitch-default.
9457
9458 2006-01-22  Bruno Haible  <bruno@clisp.org>
9459
9460         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9461         temporary buffer for sprintf, take into account the precision also
9462         for 'd', 'i', 'u', 'o', 'x', 'X'.
9463
9464 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9465
9466         * modules/argp-tests: New module
9467         * tests/test-argp.c: New file
9468         * tests/test-argp-2.sh: New file
9469
9470 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9471
9472         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9473         (__argp_base_name): Removed
9474         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9475         typo.
9476         (__argp_base_name): Provide macro definition or extern declaration
9477         depending on the configuration
9478
9479 2006-01-20  Simon Josefsson  <jas@extundo.com>
9480
9481         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9482
9483 2006-01-20  Simon Josefsson  <jas@extundo.com>
9484
9485         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9486
9487 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9488
9489         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9490         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9491         Suggested by Bruno Haible.
9492
9493 2006-01-20  Karl Berry  <karl@gnu.org>
9494
9495         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9496         until changes propagate, I guess.
9497
9498 2006-01-19  Simon Josefsson  <jas@extundo.com>
9499
9500         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9501
9502 2006-01-19  Simon Josefsson  <jas@extundo.com>
9503
9504         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9505
9506 2006-01-19  Simon Josefsson  <jas@extundo.com>
9507
9508         * gnulib-tool: Set check_PROGRAMS.
9509
9510         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9511         modules/des-tests, modules/gc-arcfour-tests,
9512         modules/gc-arctwo-tests, modules/gc-des-tests,
9513         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9514         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9515         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9516         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9517         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9518         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9519         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9520         test_*_SOURCES.
9521
9522 2006-01-18  Simon Josefsson  <jas@extundo.com>
9523
9524         * modules/socklen (Depends-on): Depend on sys_socket.
9525
9526 2006-01-18  Simon Josefsson  <jas@extundo.com>
9527
9528         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9529         modules/des-tests, modules/gc-arcfour-tests,
9530         modules/gc-arctwo-tests, modules/gc-des-tests,
9531         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9532         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9533         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9534         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9535         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9536         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9537         $(EXEEXT) to automake TESTS variable, for mingw32.
9538
9539 2006-01-17  Simon Josefsson  <jas@extundo.com>
9540
9541         * modules/socklen (Include): Need sys/socket.h.
9542
9543 2006-01-17  Bruno Haible  <bruno@clisp.org>
9544
9545         * modules/ssize_t (Include): Add <sys/types.h>.
9546
9547 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9548
9549         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9550         it's not portable and it doesn't work with cross-compiles.
9551         Problem reported by Bruno Haible.  Fix missing-$ typo in
9552         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9553         -zignore from being used with Sun's C compiler.
9554
9555 2006-01-12  Simon Josefsson  <jas@extundo.com>
9556
9557         * lib/base64.c: Fix warning, reported by Bruno Haible
9558         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9559
9560 2006-01-12  Bruno Haible  <bruno@clisp.org>
9561
9562         * modules/ldd: New file.
9563         * build-aux/ldd.sh.in: New file.
9564         * MODULES.html.sh (Support for building libraries and executables): Add
9565         ldd.
9566
9567 2006-01-12  Bruno Haible  <bruno@clisp.org>
9568
9569         * m4/ldd.m4: New file.
9570
9571 2006-01-12  Bruno Haible  <bruno@clisp.org>
9572
9573         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9574         endless loop while replacing $auxdir with build-aux.
9575
9576 2006-01-11  Simon Josefsson  <jas@extundo.com>
9577
9578         * lib/stdint_.h (SIZE_MAX): Add missing (.
9579
9580 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9581
9582         Sync from coreutils.
9583         * lib/md5.c: Fix commentary typos.
9584         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9585         * lib/md5.h (__attribute__): Remove; unused.
9586         * lib/sha1.c: Fix commentary to match md5 better.
9587         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9588         so that we don't need to worry about alignment.  All uses changed.
9589         This merges the 2005-10-28 md5 change into sha1.
9590
9591 2006-01-11  Jim Meyering  <jim@meyering.net>
9592
9593         Sync from coreutils.
9594         * lib/md5.c (OP): Fix spacing.
9595
9596 2006-01-11  Bruno Haible  <bruno@clisp.org>
9597
9598         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9599         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9600         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9601
9602 2006-01-11  Bruno Haible  <bruno@clisp.org>
9603
9604         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9605         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9606         the "early" section as well.
9607
9608 2006-01-11  Bruno Haible  <bruno@clisp.org>
9609
9610         Avoid "ar: no archive members specified" error on MacOS X.
9611         * gnulib-tool (func_modules_add_dummy): New function.
9612         (func_import, func_create_testdir): Invoke it.
9613
9614 2006-01-11  Bruno Haible  <bruno@clisp.org>
9615
9616         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9617         with $auxdir in AC_CONFIG_FILES statements.
9618
9619 2006-01-11  Bruno Haible  <bruno@clisp.org>
9620
9621         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9622         Initialize also noinst_HEADERS to empty.
9623
9624 2006-01-11  Bruno Haible  <bruno@clisp.org>
9625
9626         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9627         variables.
9628         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9629         autoreconf.
9630
9631 2006-01-11  Bruno Haible  <bruno@clisp.org>
9632
9633         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9634         overridable by the user.
9635         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9636
9637 2006-01-10  Simon Josefsson  <jas@extundo.com>
9638
9639         * modules/sys_socket: New file.
9640
9641 2006-01-10  Simon Josefsson  <jas@extundo.com>
9642
9643         * m4/sys_socket_h.m4: New file.
9644
9645 2006-01-10  Simon Josefsson  <jas@extundo.com>
9646
9647         * lib/socket_.h: New file.
9648
9649 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9650
9651         * modules/readutmp (Maintainer): Add myself.
9652
9653 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9654
9655         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9656         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9657         People who are still concerned with buggy memcmp implementations
9658         can invoke gl_FUNC_MEMCMP themselves.
9659
9660 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9661
9662         * lib/regex_internal.h (BITSET_WORD_BITS):
9663         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9664         preprocessor mishandles large unsigned values as if they were signed.
9665         Problem reported by Claudio Fontana in
9666         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9667
9668 2006-01-10  Jim Meyering  <jim@meyering.net>
9669
9670         Avoid the double-free (first in fts_read, second in fts_close) that
9671         would occur when an `active' directory is made inaccessible (e.g.,
9672         via chmod a-x) during a traversal.
9673         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9674         before returning.  Reproduce this failure by
9675         mkdir -p a/b; cd a; chmod a-x . b
9676         Reported by Stavros Passas.
9677
9678         Sync from coreutils.
9679         * lib/sha1.c: Tweak grammar in a comment.
9680
9681 2006-01-10  Jim Meyering  <jim@meyering.net>
9682
9683         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9684         Patch by Joerg Sonnenberger.
9685
9686 2006-01-10  Bruno Haible  <bruno@clisp.org>
9687
9688         * modules/readutmp: Depend on module free.
9689         * modules/strtok_r: Depend on module restrict.
9690
9691 2006-01-10  Bruno Haible  <bruno@clisp.org>
9692
9693         * modules/gettext (configure.ac): Add an invocation of
9694         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9695
9696 2006-01-10  Bruno Haible  <bruno@clisp.org>
9697
9698         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9699         Reported by Werner Lemberg <wl@gnu.org>.
9700
9701 2006-01-10  Bruno Haible  <bruno@clisp.org>
9702
9703         * lib/localcharset.c: Update from GNU gettext.
9704
9705 2006-01-10  Bruno Haible  <bruno@clisp.org>
9706
9707         * lib/argp.h (__const): Remove macro. Use const instead.
9708         * lib/argp-fmtstream.h (__const): Likewise.
9709         * lib/glob_.h (__const): Remove macro.
9710         * lib/glob-libc.h: Use const instead of __const.
9711
9712 2006-01-10  Bruno Haible  <bruno@clisp.org>
9713
9714         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9715         variable.
9716         Needed to avoid an automake error regarding the 'gettext' module.
9717
9718 2006-01-09  Simon Josefsson  <jas@extundo.com>
9719
9720         * modules/inet_ntop (Depends-on): Add restrict.
9721
9722 2006-01-09  Simon Josefsson  <jas@extundo.com>
9723
9724         * modules/gc-rijndael-tests (License): Put under LGPL.
9725
9726         * modules/gc-des-tests (License): Likewise.
9727
9728         * modules/gc-arcfour-tests (License): Likewise.
9729
9730         * modules/gc-arctwo-tests (License): Likewise.
9731
9732         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9733
9734         * modules/gc-hmac-sha1-tests (Files): Likewise.
9735
9736         * modules/gc-hmac-md5-tests (License): Likewise.
9737
9738         * modules/gc-sha1-tests (License): Likewise.
9739
9740         * modules/gc-md5-tests (License): Likewise.
9741
9742         * modules/gc-md4-tests (License): Likewise.
9743
9744         * modules/gc-md2-tests (License): Likewise.
9745
9746         * modules/gc-tests (License): Likewise.
9747
9748         * modules/des-tests (License): Likewise.
9749
9750         * modules/md4-tests (License): Likewise.
9751
9752         * modules/md2-tests (License): Likewise.
9753
9754 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9755
9756         Sync from coreutils:
9757
9758         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9759         * modules/lib-ignore: New file.
9760         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9761         chdir-safer.m4, lchmod.m4.
9762         * modules/openat: Add mkdirat.c, openat-priv.h.
9763
9764 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9765
9766         Sync from coreutils.
9767         * m4/lib-ignore.m4: New file.
9768         * m4/lchmod.m4: New file.
9769
9770 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9771
9772         Sync from coreutils.
9773         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9774         for write access: POSIX says that must fail.
9775         * lib/fts.c (diropen): Likewise.
9776         * lib/save-cwd.c (save_cwd): Likewise.
9777         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9778         well, for minor improvements on hosts that lack O_DIRECTORY.
9779         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9780         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9781         Fall back on chown if open failed with EACCES.
9782
9783         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9784         Report an error at compile-time if only a 1-second nominal clock
9785         resolution is found.
9786
9787         * lib/lchmod.h: New file.
9788         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9789         (make_dir_parents): Use lchown rather than chown, and
9790         lchmod rather than chmod.
9791
9792         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9793         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9794         "proc" reported by n0dalus.
9795
9796         * lib/mountlist.c: Include <limits.h>.
9797         (dev_from_mount_options)
9798         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9799         New function.  It no longer assumes "dev=" has the System V meaning
9800         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9801         (read_file_system_list)
9802         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9803         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9804         dev= in that case.
9805
9806         * lib/posixtm.h (PDS_PRE_2000): New macro.
9807         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9808         allow_century.  All usages changed.  Reject dates outside the range
9809         1969-1999 if PDS_PRE_2000 is used.
9810
9811 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9812
9813         Sync from coreutils.
9814         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9815         (Time of day items): Mention the possibility of leap seconds.
9816         Problem reported by Dr. David Alan Gilbert.
9817
9818 2006-01-09  Jim Meyering  <jim@meyering.net>
9819
9820         Sync from coreutils.
9821
9822         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9823
9824         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9825
9826         * lib/modechange.c (mode_compile): Reject an invalid mode string
9827         that starts with an octal digit.  From Andreas Gruenbacher.
9828
9829         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9830         and dup to open_safer and dup_safer, respectively.
9831         (openat_permissive): Fix typo in comment.
9832
9833         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9834         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9835         (_): Remove; no longer needed.
9836         (openat): Renamed from rpl_openat; no need for rpl_openat
9837         since openat.h renames openat for us.
9838         Replace most of the body with a call to openat_permissive,
9839         to avoid duplicate code.
9840         Port to (probably hypothetical) environments were mode_t is
9841         wider than int.
9842         (openat_permissive): Require mode arg, so that we can check
9843         types better.  Put it just after flags.  Change cwd failure
9844         indicator from pointer-to-bool to pointer-to-errno-value.
9845         All callers changed.
9846         Invoke openat_save_fail and/or openat_restore_fail if
9847         cwd_errno is null, so that openat can call us.
9848         (openat_permissive, fdopendir, fstatat, unlinkat):
9849         Simplify errno handling to avoid some duplicate code,
9850         as it's OK to set errno on success.
9851         * lib/openat.h: Revamp code so that function macros depend on
9852         __OPENAT_PREFIX only, not also on AT_FDCWD.
9853         (openat_ro): Remove.  Caller changed to use openat_permissive.
9854         (openat_permissive): Now a macro, if not a function.
9855         (openat_restore_fail, openat_save_fail): Now always functions,
9856         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9857
9858         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9859         and openat.c.
9860         * lib/mkdirat.c: Include openat-priv.h.
9861         Remove definitions of macros defined therein.
9862         * lib/openat.c: Likewise.
9863
9864         * lib/mkdirat.c (mkdirat): New file and function.
9865         * lib/openat.h (mkdirat): Declare.
9866
9867         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9868
9869         * lib/openat.h (openat_permissive): Declare.
9870         (openat_ro): Define.
9871
9872         * lib/openat.c (EXPECTED_ERRNO): New macro.
9873         (openat_permissive): New function -- used in remove.c rewrite.
9874         (all functions): Set errno just before returning, only if there
9875         was an actual failure.
9876         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9877
9878         Emulate openat-family functions using Linux's procfs, if possible.
9879         Idea and some code based on Ulrich Drepper's glibc changes.
9880
9881         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9882         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9883         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9884         before falling back on save_cwd and restore_cwd.
9885         (fdopendir, fstatat, unlinkat): Likewise.
9886
9887         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9888         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9889
9890         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9891         as second argument to va_arg.  Otherwise, some versions of gcc
9892         warn that `if this code is reached, the program will abort'.
9893
9894 2006-01-09  Jim Meyering  <jim@meyering.net>
9895
9896         Sync from coreutils.
9897         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9898         Require openat-priv.h.
9899
9900 2006-01-09  Bruno Haible  <bruno@clisp.org>
9901
9902         * modules/strnlen (Include): Use strnlen.h.
9903
9904 2006-01-09  Bruno Haible  <bruno@clisp.org>
9905
9906         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9907
9908 2006-01-09  Bruno Haible  <bruno@clisp.org>
9909
9910         * lib/sysexit_.h (EX_OK): New macro.
9911         Suggested by Martin Lambers <marlam@marlam.de>.
9912
9913 2006-01-09  Bruno Haible  <bruno@clisp.org>
9914
9915         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9916         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9917
9918 2006-01-09  Bruno Haible  <bruno@clisp.org>
9919
9920         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9921         numbers.
9922
9923 2006-01-09  Bruno Haible  <bruno@clisp.org>
9924
9925         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9926         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9927         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9928         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9929
9930 2006-01-09  Bruno Haible  <bruno@clisp.org>
9931
9932         * build-aux/javacomp.sh.in: New file, moved from lib/.
9933         * modules/javacomp-script (Files): Update.
9934         (configure.ac): Add AC_CONFIG_FILES invocation.
9935         (EXTRA_DIST): Remove variable.
9936
9937         * build-aux/javaexec.sh.in: New file, moved from lib/.
9938         * modules/javaexec (Files): Update.
9939         (configure.ac): Add AC_CONFIG_FILES invocation.
9940         (EXTRA_DIST): Remove javaexec.sh.in.
9941
9942         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9943         * modules/csharpcomp-script (Files): Update.
9944         (configure.ac): Add AC_CONFIG_FILES invocation.
9945         (EXTRA_DIST): Remove variable.
9946
9947         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9948         * modules/csharpexec (Files): Update.
9949         (configure.ac): Add AC_CONFIG_FILES invocation.
9950         (EXTRA_DIST): Remove csharpexec.sh.in.
9951
9952 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9953
9954         Sync from coreutils.
9955
9956         Add POSIX ACL support
9957         * lib/acl.h (copy_acl, set_acl): Add declarations.
9958         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9959         systems other than Linux.
9960         (chmod_or_fchmod): New function: use fchmod when possible,
9961         and chmod otherwise.
9962         (file_has_acl): Add a POSIX ACL implementation, with a
9963         Linux-specific subcase.
9964         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9965         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9966         acls are unsupported.
9967         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9968         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9969         are unsupported.
9970
9971 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9972
9973         Sync from coreutils.
9974         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9975
9976 2006-01-07  Bruno Haible  <bruno@clisp.org>
9977
9978         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9979         gl_EARLY.
9980
9981 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9982
9983         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9984         Problem reported for Mingw by Mark Junker.
9985
9986 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9987
9988         * README: Gnulib normally doesn't generate a tarball.
9989
9990 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9991
9992         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9993         long int, not int, for nanosecond counts, so that people who are
9994         used to POSIX struct timespec won't be surprised.  Reported by Jim
9995         Meyering.
9996
9997 2005-12-28  Bruno Haible  <bruno@clisp.org>
9998
9999         * build-aux/config.rpath: Update from GNU gettext.
10000
10001 2005-12-16  Jim Meyering  <jim@meyering.net>
10002
10003         * modules/fprintftime: New module.
10004         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
10005
10006 2005-12-16  Jim Meyering  <jim@meyering.net>
10007
10008         * m4/fprintftime.m4: New file.
10009
10010 2005-12-16  Jim Meyering  <jim@meyering.net>
10011
10012         * lib/fprintftime.c, lib/fprintftime.h: New files.
10013
10014 2005-12-15  Simon Josefsson  <jas@extundo.com>
10015
10016         * modules/socklen (configure.ac): Fix M4 macro name, to align with
10017         new m4/socklen.m4.
10018
10019 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10020
10021         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
10022         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
10023
10024 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10025
10026         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10027         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10028         struct uparams is valid. Fall back to the default values if it is
10029         not.
10030
10031 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10032
10033         * modules/argp (Files): Add argp-pin.c
10034         (Depends-on): dirname
10035         (lib_SOURCES): Add argp-pin.c
10036
10037 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10038
10039         * m4/argp.m4:  Check if program_invocation_name and
10040         program_invocation_short_name are declared and define appropriate
10041         macros if they are not.
10042
10043 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10044
10045         * lib/argp-help.c (__argp_base_name): New function
10046         (__argp_short_program_name): Rewrite using __argp_base_name
10047         * lib/argp-namefrob.h: Define program_invocation_name and
10048         program_invocation_short_name if requested
10049         (__argp_base_name): Add prototype
10050         * lib/argp-parse.c (argp_def): Use gettext wrappers
10051         (argp_default_parser): Use __argp_base_name
10052         * lib/argp-pin.c: New file. Defines program_invocation_name and
10053         program_invocation_short_name on systems that lack them.
10054
10055 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10056
10057         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10058         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10059         porting problem reported by Georg Schwarz in
10060         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10061
10062 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10063
10064         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10065         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10066         porting problem reported by Georg Schwarz in
10067         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10068
10069 2005-12-05  Bruno Haible  <bruno@clisp.org>
10070
10071         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10072         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10073         Reported by Mark Junker <mjscod@gmx.de>.
10074
10075 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10076
10077         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10078         Use implementation from Albert Chin, with some
10079         comments/corrections by Stepan Kasal and myself.
10080
10081 2005-12-02  Bruno Haible  <bruno@clisp.org>
10082
10083         * gnulib-tool (func_import): Accept GPLed build tool modules when
10084         --lgpl is given.
10085         * modules/csharpcomp-script: New file.
10086         * modules/csharpcomp: Depend on it.
10087         * modules/javacomp-script: New file.
10088         * modules/javacomp: Depend on it.
10089         Suggested by Simon Josefsson.
10090
10091 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10092
10093         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10094         statement, to work around an HP-UX 10.20 compiler bug reported by
10095         Peter O'Gorman.
10096
10097 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10098
10099         * modules/savedir (Depends-on): Add openat.
10100
10101 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10102
10103         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10104         (uintmax_t) [defined uintmax_t]: Do not declare.
10105         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10106         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10107         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10108         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10109         sake of portability to weird hosts that C allows (though we don't
10110         know of any practical examples).
10111
10112         * lib/savedir.h (fdsavedir): New decl.
10113         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10114         contains most of the former guts of savedir.
10115         (savedir): Use savedirstream.
10116         Include "openat.h".
10117
10118 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10119
10120         * modules/obstack (Files): Add m4/ulonglong.m4.
10121         Problem reported by Davide Angelocola.
10122
10123 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10124
10125         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10126         coreutils no longer futzes with rounding modes.
10127
10128 2005-11-14  Jim Meyering  <jim@meyering.net>
10129
10130         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10131         replacement of mkstemp.
10132
10133 2005-11-10  Simon Josefsson  <jas@extundo.com>
10134
10135         * lib/readline.c: Remove EOL.
10136
10137 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10138
10139         * modules/gethrxtime (Depends-on): Add gettime.
10140
10141 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10142
10143         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10144         or gettimeofday; no longer needed.
10145
10146 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10147
10148         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10149         time business.
10150         (gethrxtime) [! (HAVE_NANOUPTIME
10151         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10152         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10153         our own approximation.
10154
10155 2005-11-08  Eric Blake  <ebb9@byu.net>
10156
10157         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10158
10159 2005-11-08  Eric Blake  <ebb9@byu.net>
10160
10161         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10162
10163 2005-11-04  Bruno Haible  <bruno@clisp.org>
10164
10165         * gnulib-tool: Implement --update mode.
10166
10167 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10168
10169         Fix porting problem reported by Theodoros V. Kalamatianos.
10170         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10171         Don't assume that futimes failing means we must fail.
10172
10173 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10174
10175         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10176         variables to suggest the intended function of the PATH_MAX check.
10177
10178 2005-10-30  Kean Johnston  <jkj@sco.com>
10179
10180         Trivial changes to support SCO systems.
10181         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10182         as PATH_MAX.
10183         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10184         where __ptr is null when no I/O is pending.
10185
10186 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10187
10188         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10189         leave errno alone.  Problem reported by Dmitry V. Levin.
10190
10191 2005-10-28  Simon Josefsson  <jas@extundo.com>
10192
10193         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10194         Test more.
10195
10196         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10197
10198         * modules/md2, modules/md2-tests: New files.
10199
10200 2005-10-28  Simon Josefsson  <jas@extundo.com>
10201
10202         * m4/inet_ntop.m4: More tests.
10203
10204         * m4/gc-md2.m4, md2.m4: New file.
10205
10206 2005-10-28  Simon Josefsson  <jas@extundo.com>
10207
10208         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10209         "restrict" keywords, as per POSIX.  Protect the function
10210         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10211         Don't use K&R prototypes.  Check the sprintf return values.
10212         Re-define EAFNOSUPPORT if not present.  Indent.
10213
10214         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10215         suggested by Bruno Haible <bruno@clisp.org>.
10216
10217         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10218
10219         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10220
10221         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10222         libgcrypt).
10223
10224         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10225
10226         * lib/md2.h, lib/md2.c: New files.
10227
10228 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10229
10230         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10231         errno alone.  Problem reported by Frederic Jolliton.
10232
10233 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10234
10235         * modules/verify (License): Change from GPL to LGPL.  This is a
10236         tiny module and there are apparently near-equivalents that are
10237         under the BSD license.
10238
10239 2005-10-24  Simon Josefsson  <jas@extundo.com>
10240
10241         * modules/sha1: Relicense to LGPL.
10242
10243 2005-10-24  Simon Josefsson  <jas@extundo.com>
10244
10245         * lib/md4.h: Shrink buffer size, now that we changed the type.
10246
10247 2005-10-23  Simon Josefsson  <jas@extundo.com>
10248
10249         * gnulib-tool (func_import): Fix --tests-base.
10250
10251 2005-10-22  Simon Josefsson  <jas@extundo.com>
10252
10253         * modules/arcfour (Depends-on): Need stdint.
10254
10255 2005-10-22  Simon Josefsson  <jas@extundo.com>
10256
10257         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10258         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10259
10260 2005-10-22  Simon Josefsson  <jas@extundo.com>
10261
10262         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10263         suggested by Bruno Haible <bruno@clisp.org>.
10264
10265 2005-10-22  Simon Josefsson  <jas@extundo.com>
10266
10267         * lib/crc.h: Include stddef.h, for size_t.
10268
10269 2005-10-22  Simon Josefsson  <jas@extundo.com>
10270
10271         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10272         arcfour_context struct (simplify test vector testing in GNU
10273         Shishi).
10274
10275 2005-10-21  Simon Josefsson  <jas@extundo.com>
10276
10277         * modules/des, modules/des-tests: New files.
10278
10279         * modules/gc-des, modules/gc-des-tests: New files.
10280
10281         * tests/test-des.c, tests/test-gc-des.c: New file.
10282
10283 2005-10-21  Simon Josefsson  <jas@extundo.com>
10284
10285         * modules/arctwo, modules/arctwo-tests: New files.
10286
10287         * tests/test-arctwo.c: New file.
10288
10289         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10290
10291         * tests/test-gc-arctwo.c: New file.
10292
10293 2005-10-21  Simon Josefsson  <jas@extundo.com>
10294
10295         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10296         Bruno Haible <bruno@clisp.org>.
10297
10298         * m4/gc-des.m4: New file.
10299
10300 2005-10-21  Simon Josefsson  <jas@extundo.com>
10301
10302         * m4/arctwo.m4: New file.
10303
10304         * m4/gc-arctwo.m4: New file.
10305
10306 2005-10-21  Simon Josefsson  <jas@extundo.com>
10307
10308         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10309         block.
10310
10311 2005-10-21  Simon Josefsson  <jas@extundo.com>
10312
10313         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10314         <bruno@clisp.org>.
10315
10316         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10317
10318         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10319         Bruno Haible <bruno@clisp.org>.
10320
10321         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10322         <bruno@clisp.org>.
10323
10324 2005-10-21  Simon Josefsson  <jas@extundo.com>
10325
10326         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10327
10328 2005-10-21  Simon Josefsson  <jas@extundo.com>
10329
10330         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10331
10332 2005-10-21  Simon Josefsson  <jas@extundo.com>
10333
10334         * lib/des.h, lib/des.c: New files.
10335
10336         * lib/gc-gnulib.c: Support DES.c
10337
10338 2005-10-21  Simon Josefsson  <jas@extundo.com>
10339
10340         * lib/arctwo.h, lib/arctwo.c: New files.
10341
10342         * lib/gc-gnulib.c: Support ARCTWO.
10343
10344 2005-10-21  Simon Josefsson  <jas@extundo.com>
10345
10346         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10347         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10348
10349 2005-10-21  Simon Josefsson  <jas@extundo.com>
10350
10351         * gnulib-tool (func_import, func_create_testdir): Define automake
10352         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10353         Makefile.am snippet),
10354         suggested by Bruno Haible <bruno@clisp.org>.
10355
10356         * modules/gc (Makefile.am): Use it.
10357
10358 2005-10-21  Bruno Haible  <bruno@clisp.org>
10359
10360         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10361         patch.
10362
10363 2005-10-19  Simon Josefsson  <jas@extundo.com>
10364
10365         * tests/test-gc-rijndael.c: New file.
10366
10367         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10368
10369 2005-10-19  Simon Josefsson  <jas@extundo.com>
10370
10371         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10372         interface too.
10373
10374 2005-10-19  Simon Josefsson  <jas@extundo.com>
10375
10376         * tests/test-gc-arcfour.c: New file.
10377
10378         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10379
10380 2005-10-19  Simon Josefsson  <jas@extundo.com>
10381
10382         * modules/gc-md4, modules/gc-md4-tests: New file.
10383
10384         * tests/test-gc-md4.c: New file.
10385
10386 2005-10-19  Simon Josefsson  <jas@extundo.com>
10387
10388         * m4/gc-md4.m4: New file.
10389
10390 2005-10-19  Simon Josefsson  <jas@extundo.com>
10391
10392         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10393         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10394         <kasal@ucw.cz>.
10395
10396 2005-10-19  Simon Josefsson  <jas@extundo.com>
10397
10398         * m4/gc-arcfour.m4: New file.
10399
10400         * m4/gc-rijndael.m4: New file.
10401
10402 2005-10-19  Simon Josefsson  <jas@extundo.com>
10403
10404         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10405
10406 2005-10-19  Simon Josefsson  <jas@extundo.com>
10407
10408         * lib/gc-gnulib.c: Support ARCFOUR.
10409
10410 2005-10-19  Simon Josefsson  <jas@extundo.com>
10411
10412         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10413         support.
10414
10415         * lib/gc.h: Add ECB enum type.
10416
10417         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10418
10419 2005-10-18  Simon Josefsson  <jas@extundo.com>
10420
10421         * tests/test-md5.c: New file.
10422
10423         * modules/md5-tests: New file.
10424
10425 2005-10-18  Simon Josefsson  <jas@extundo.com>
10426
10427         * tests/test-md4.c: New file.
10428
10429         * modules/md4, modules/md4-tests: New files.
10430
10431 2005-10-18  Simon Josefsson  <jas@extundo.com>
10432
10433         * m4/md4.m4: New file.
10434
10435 2005-10-18  Simon Josefsson  <jas@extundo.com>
10436
10437         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10438
10439 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10440
10441         * gnulib-tool (func_create_testdir): Omit the second check whether
10442         BUILT_SOURCES in nonempty.
10443
10444 2005-10-17  Simon Josefsson  <jas@extundo.com>
10445
10446         * tests/test-rijndael.c: New file.
10447
10448 2005-10-17  Simon Josefsson  <jas@extundo.com>
10449
10450         * modules/sha1: Depend on stdint instead of md5.
10451
10452         * modules/md5: Depend on stdint, remove uint32_t.
10453
10454 2005-10-17  Simon Josefsson  <jas@extundo.com>
10455
10456         * modules/gc-sha1-tests: New file.
10457
10458         * tests/test-gc-sha1.c: New file.
10459
10460 2005-10-17  Simon Josefsson  <jas@extundo.com>
10461
10462         * m4/md5.m4: Remove call to uint32_t.m4.
10463
10464 2005-10-17  Simon Josefsson  <jas@extundo.com>
10465
10466         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10467
10468         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10469         md5.h.
10470
10471         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10472
10473         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10474
10475 2005-10-17  Simon Josefsson  <jas@extundo.com>
10476
10477         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10478
10479 2005-10-17  Simon Josefsson  <jas@extundo.com>
10480
10481         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10482
10483 2005-10-17  Simon Josefsson  <jas@extundo.com>
10484
10485         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10486
10487         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10488
10489 2005-10-17  Bruno Haible  <bruno@clisp.org>
10490
10491         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10492         that it can also be used in a test.
10493
10494 2005-10-16  Bruno Haible  <bruno@clisp.org>
10495
10496         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10497         TESTS_ENVIRONMENT, so that individual tests can augment it.
10498
10499         * gnulib-tool (func_create_testdir): Use an intermediate target for
10500         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10501         macros, like $(ALLOCA_H), which cannot be passed through the command
10502         line.
10503
10504 2005-10-15  Simon Josefsson  <jas@extundo.com>
10505
10506         * modules/rijndael-tests: New file.
10507
10508         * modules/rijndael: New file.
10509
10510 2005-10-15  Simon Josefsson  <jas@extundo.com>
10511
10512         * m4/rijndael.m4: New file.
10513
10514 2005-10-15  Simon Josefsson  <jas@extundo.com>
10515
10516         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10517
10518         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10519
10520 2005-10-14  Simon Josefsson  <jas@extundo.com>
10521
10522         * tests/test-arcfour.c: New file.
10523
10524         * modules/arcfour, modules/arcfour-tests: New files.
10525
10526 2005-10-14  Simon Josefsson  <jas@extundo.com>
10527
10528         * m4/arcfour.m4: New file.
10529
10530 2005-10-14  Simon Josefsson  <jas@extundo.com>
10531
10532         * lib/arcfour.h, lib/arcfour.c: New files.
10533
10534 2005-10-14  Roland McGrath  <roland@redhat.com>
10535
10536         Import from libc.  [BZ #1331]
10537         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10538         macro argument.
10539         Reported by Matej Vela <vela@debian.org>.
10540
10541 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10542
10543         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10544         include <wchar.h>; no longer needed.
10545
10546 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10547
10548         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10549
10550 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10551         and  Ulrich Drepper  <drepper@redhat.com>
10552
10553         Import from libc.
10554         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10555         instead of inline stream orientation test and two separate
10556         function calls.  Pay no attention to USE_IN_LIBIO.
10557
10558 2005-10-13  Simon Josefsson  <jas@extundo.com>
10559
10560         * modules/gc-hmac-md5-tests: New file.
10561
10562         * tests/test-gc-hmac-sha1.c: New file.
10563
10564         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10565
10566         * modules/gc-hmac-md5-tests: New file.
10567
10568         * tests/test-gc-md5.c: New file.
10569
10570         * modules/gc-md5-tests: New file.
10571
10572 2005-10-13  Simon Josefsson  <jas@extundo.com>
10573
10574         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10575         Move memory allocation outside of loop.
10576
10577 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10578
10579         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10580         intermediate directory is in a read-only file system.  Problem
10581         reported by Eric Blake.
10582
10583 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10584
10585         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10586
10587 2005-10-12  Simon Josefsson  <jas@extundo.com>
10588
10589         * tests/test-hmac-sha1.c: New file.
10590
10591         * modules/hmac-sha1-tests: New file.
10592
10593         * modules/hmac-sha1: New file.
10594
10595 2005-10-12  Simon Josefsson  <jas@extundo.com>
10596
10597         * modules/gc-sha1: New file.
10598
10599 2005-10-12  Simon Josefsson  <jas@extundo.com>
10600
10601         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10602
10603         * tests/test-gc-pbkdf2-sha1.c: New file.
10604
10605 2005-10-12  Simon Josefsson  <jas@extundo.com>
10606
10607         * modules/gc-md5, modules/gc-hmac-md5: New files.
10608
10609         * modules/gc (Files): Remove md5, memxor and hmac files.
10610
10611 2005-10-12  Simon Josefsson  <jas@extundo.com>
10612
10613         * m4/gc-pbkdf2-sha1.m4: New file.
10614
10615         * m4/gc-hmac-sha1.m4: New file.
10616
10617         * m4/gc-sha1: New file.
10618
10619         * m4/hmac-sha1.m4: New file.
10620
10621 2005-10-12  Simon Josefsson  <jas@extundo.com>
10622
10623         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10624
10625         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10626
10627 2005-10-12  Simon Josefsson  <jas@extundo.com>
10628
10629         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10630         suggested by Bruno Haible <bruno@clisp.org>.
10631
10632 2005-10-12  Simon Josefsson  <jas@extundo.com>
10633
10634         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10635
10636 2005-10-12  Simon Josefsson  <jas@extundo.com>
10637
10638         * lib/gc-pbkdf2-sha1.c: New file.
10639
10640         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10641
10642 2005-10-12  Simon Josefsson  <jas@extundo.com>
10643
10644         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10645
10646         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10647
10648 2005-10-12  Simon Josefsson  <jas@extundo.com>
10649
10650         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10651         GC_USE_HMAC_MD5, respectively.
10652
10653         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10654         (gc_md5): Fix typo.
10655
10656         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10657
10658         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10659
10660         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10661
10662 2005-10-12  Bruno Haible  <bruno@clisp.org>
10663
10664         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10665         Reported by Stepan Kasal <kasal@ucw.cz>.
10666
10667 2005-10-11  Simon Josefsson  <jas@extundo.com>
10668
10669         * tests/test-crc.c: New file.
10670
10671         * modules/crc, modules/crc-tests: New files.
10672
10673 2005-10-11  Simon Josefsson  <jas@extundo.com>
10674
10675         * m4/crc.m4: New file.
10676
10677 2005-10-11  Simon Josefsson  <jas@extundo.com>
10678
10679         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10680
10681         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10682
10683         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10684
10685 2005-10-11  Simon Josefsson  <jas@extundo.com>
10686
10687         * lib/crc.h, lib/crc.c: New files.
10688
10689         * lib/gc.h (gc_hash_buffer): Add doc.
10690
10691 2005-10-11  Bruno Haible  <bruno@clisp.org>
10692
10693         * modules/c-strcasestr: New file.
10694         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10695
10696 2005-10-11  Bruno Haible  <bruno@clisp.org>
10697
10698         * modules/c-strcase: New file.
10699         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10700
10701 2005-10-11  Bruno Haible  <bruno@clisp.org>
10702
10703         * lib/strcasecmp.c: Include limits.h.
10704         (strcasecmp): Avoid integer overflow on exotic platforms.
10705         * lib/strncasecmp.c: Include limits.h.
10706         (strncasecmp): Avoid integer overflow on exotic platforms.
10707         Reported by Paul Eggert.
10708
10709 2005-10-11  Bruno Haible  <bruno@clisp.org>
10710
10711         * lib/c-strcasestr.h: New file, from GNU gettext.
10712         * lib/c-strcasestr.c: New file, from GNU gettext.
10713
10714 2005-10-11  Bruno Haible  <bruno@clisp.org>
10715
10716         * lib/c-strcase.h: New file, from GNU gettext.
10717         * lib/c-strcasecmp.c: New file, from GNU gettext.
10718         * lib/c-strncasecmp.c: New file, from GNU gettext.
10719
10720 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10721
10722         * modules/mempcpy (License): GPL -> LGPL.
10723         * modules/strchrnul (License): Likewise.
10724         * modules/sysexits (License): Likewise.
10725
10726 2005-10-08  Simon Josefsson  <jas@extundo.com>
10727
10728         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10729
10730 2005-10-07  Simon Josefsson  <jas@extundo.com>
10731
10732         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10733
10734 2005-10-06  Simon Josefsson  <jas@extundo.com>
10735
10736         * tests/test-hmac-md5.c: New file.
10737
10738         * modules/hmac-md5-tests: New file.
10739
10740         * modules/hmac-md5: New file.
10741
10742 2005-10-06  Simon Josefsson  <jas@extundo.com>
10743
10744         * m4/hmac-md5.m4: New file.
10745
10746         * m4/memxor.m4: Require gl_C_RESTRICT.
10747
10748 2005-10-06  Simon Josefsson  <jas@extundo.com>
10749
10750         * lib/memxor.c (memxor): Avoid casts and warnings.
10751
10752 2005-10-06  Simon Josefsson  <jas@extundo.com>
10753
10754         * lib/hmac-md5.c: New file.
10755
10756         * lib/hmac.h: New file.
10757
10758 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10759
10760         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10761         promotes to int, not unsigned int, to catch the AIX 5.3
10762         compiler bug.
10763
10764 2005-10-05  Simon Josefsson  <jas@extundo.com>
10765
10766         * modules/memxor: New file.
10767
10768         * modules/iconv (Files): Move config.rpath to havelib, it is used
10769         there.
10770
10771         * modules/havelib (Files): Add config.rpath.
10772
10773 2005-10-05  Simon Josefsson  <jas@extundo.com>
10774
10775         * m4/memxor.m4: New file.
10776
10777 2005-10-05  Simon Josefsson  <jas@extundo.com>
10778
10779         * lib/memxor.c (memxor): Fix compiler error.
10780
10781         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10782         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10783
10784         * lib/memxor.h, lib/memxor.c: New files.
10785
10786         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10787         we assume all systems have it, suggested by Jim Meyering
10788         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10789         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10790         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10791         same reasons.
10792
10793 2005-10-05  Simon Josefsson  <jas@extundo.com>
10794
10795         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10796
10797 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10798
10799         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10800         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10801         needed, since the source code now assumes these .h files.
10802
10803 2005-10-05  Derek Price  <derek@ximbiot.com>
10804
10805         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10806
10807 2005-10-05  Bruno Haible  <bruno@clisp.org>
10808
10809         * modules/stdint (License): Change to LGPL.
10810
10811 2005-10-04  Simon Josefsson  <jas@extundo.com>
10812
10813         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10814         D. Baushke" <mdb@gnu.org>.
10815
10816 2005-10-04  Bruno Haible  <bruno@clisp.org>
10817
10818         * lib/verify.h (verify_true): Provide alternative definition for C++.
10819
10820 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10821
10822         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10823         (SSIZE_MAX): New macro, if not already defined.
10824         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10825         than 2 GiB.
10826
10827 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10828
10829         Sync from coreutils.
10830         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10831         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10832         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10833         ULLONG_MAX doesn't work with 2.7.2.1.
10834
10835 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10836
10837         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10838         From Ben Pfaff.
10839
10840         * modules/exclude (Depends-on): Depend on verify.
10841         * modules/strtoimax (Depends-on): Likewise.
10842         * modules/utimecmp (Depends-on): Likewise.
10843
10844 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10845
10846         * lib/exclude.c: Include verify.h.
10847         (verify): Remove.  All callers changed to use verify.h's version.
10848         * lib/strtoimax.c: Likewise.
10849         * lib/utimecmp.c: Likewis.e
10850
10851         Sync from coreutils.
10852         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10853         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10854         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10855         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10856         bother returning ENOSYS if settimeofday or stime fails; just let
10857         them return whatever errno they want to return.
10858         * lib/utimens.c: Include unistd.h, for dup2.
10859         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10860         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10861
10862 2005-10-02  Jim Meyering  <jim@meyering.net>
10863
10864         Sync from coreutils.
10865         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10866         from glibc-2.2.5 that fails for read-only files.
10867
10868 2005-10-02  Jim Meyering  <jim@meyering.net>
10869
10870         Sync from coreutils.
10871         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10872         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10873         `#if HAVE_CONFIG_H'.
10874         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10875         Remove AT_FDCWD test.
10876         Do not consume the fd unless successful.
10877         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10878         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10879         block, so that we don't even try to compile it if settimeofday is
10880         available.  This works around a compilation failure on OSF1 V5.1,
10881         due to stime requiring a `long int*' while tv_sec is `int'.
10882
10883 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10884
10885         Sync from coreutils.
10886         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10887         against `yes', rather than just testing for nonempty.
10888
10889 2005-10-01  Simon Josefsson  <jas@extundo.com>
10890
10891         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10892         and Darwin.
10893
10894         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10895         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10896         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10897         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10898         Check if struct addrinfo is declared.
10899
10900 2005-10-01  Simon Josefsson  <jas@extundo.com>
10901
10902         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10903         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10904         AI_* and EAI_* definitions.  Protect function declarations.
10905
10906 2005-10-01  Jim Meyering  <jim@meyering.net>
10907
10908         Sync from coreutils.
10909
10910         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10911         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10912         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10913         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10914         in the inet and nsl libraries.  Required on Solaris 5.7.
10915
10916 2005-10-01  Jim Meyering  <jim@meyering.net>
10917
10918         Sync from coreutils.
10919         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10920         in the inet and nsl libraries.  Required on Solaris 5.7.
10921
10922 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10923
10924         * lib/getdelim.c (getdelim): Remove unused variables.
10925
10926 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10927
10928         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10929         so that the code works even with ancient cpp.  Portability problem
10930         with GCC 2.7.2.1 reported by Thomas M.Ott.
10931
10932 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10933
10934         * modules/regex (Depends-on): Add strcase.
10935
10936         * modules/gethostname (Licence): Change from GPL to LGPL, since
10937         gethostname.c is a trivial implementation of a standard library
10938         function.
10939         * modules/poll (License): Change from GPL to LGPL, since it's
10940         derived from LGPL code.
10941
10942 2005-09-27  Jim Meyering  <jim@meyering.net>
10943
10944         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10945         HAVE_CONFIG_H.
10946
10947         * lib/intprops.h (signed_type_or_expr__): Define.
10948         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10949         for unsigned types.
10950
10951 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10952
10953         * lib/verify.h (verify_expr): Remove, replacing with:
10954         (verify_true): New macro that returns true instead of void.
10955         (verify_type__): Remove.
10956         (verify): Use verify_true rather than verify_type__.
10957
10958 2005-09-26  Bruno Haible  <bruno@clisp.org>
10959
10960         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10961         is necessary.
10962         (lib_SOURCES): Remove mbchar.c.
10963         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10964         (Files): Add m4/mbrtowc.m4.
10965         * modules/mbiter: Likewise.
10966         * modules/mbuiter: Likewise.
10967
10968 2005-09-26  Bruno Haible  <bruno@clisp.org>
10969
10970         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10971         compile mbchar.c if they are not both present.
10972         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10973         * m4/mbiter.m4 (gl_MBITER): Likewise.
10974         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10975         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10976         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10977
10978 2005-09-25  Jim Meyering  <jim@meyering.net>
10979
10980         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10981         also uses socklen_t.
10982
10983 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10984
10985         * lib/utimens.c (ENOSYS): Define if not already defined.
10986         (futimens): Support having a null PATH if the file descriptor
10987         is nonnegative.
10988
10989         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10990         Remove.
10991         (__attribute): Define to empty unless GCC 3.1 or later.
10992         This works around a core dump on OpenBSD 3.4, which has GCC
10993         2.95.3, which dumps core when given __attribute__(()).  It also
10994         simplifies other tests, since we really don't want to bother with
10995         worrying about which ancient version of GCC supported what.
10996         Original problem reported by Yoann Vandoorselaere, with part of
10997         the fix suggested by Derek Price.
10998
10999 2005-09-24  Jim Meyering  <jim@meyering.net>
11000
11001         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
11002         so we can once again use a positive bitfield width of 1 -- now we
11003         don't have to explain why we were using a bitfield width of 2.
11004
11005 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11006
11007         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
11008         and similarly for the other external symbols.  Problem reported
11009         by James Gallager.
11010
11011         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
11012         bug reported by Jim Meyering.
11013
11014         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
11015         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
11016         not needed, since socklen is a prerequisite module.
11017
11018 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
11019
11020         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
11021         Problem reported by Eric Blake.
11022         (getaddrinfo): Initialize se so that it's not garbage.
11023         Redo internal storage allocation so that it doesn't make unportable
11024         assumptions about alignment.
11025         Fix a memory leak.
11026
11027         * lib/utimens.c (futimens): Use futimesat if available.
11028         Prefer it to futimes since it doesn't have the futimes bug.
11029
11030         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11031         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11032         Instead, declare a function that returns a pointer to an array,
11033         and use verify_type__ to declare the size of the array.
11034         Problem and germ of a solution reported by Bruno Haible.
11035         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11036         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11037
11038 2005-09-23  Jim Meyering  <jim@meyering.net>
11039
11040         Sync from coreutils.
11041         Correct build failure (socklen_t not defined) on at least
11042         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11043         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11044
11045 2005-09-23  Jim Meyering  <jim@meyering.net>
11046
11047         * modules/getaddrinfo (Depends-on): Add socklen.
11048
11049 2005-09-23  Bruno Haible  <bruno@clisp.org>
11050
11051         * tests/test-verify.c: New file.
11052
11053 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11054
11055         Sync from coreutils.
11056
11057         * modules/argmatch (Depends-on): Add verify.
11058         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11059         unistd-safer.
11060         * modules/save-cwd (Depends-on): Likewise.
11061
11062         * modules/openat (Files): Add lib/openat-die.c.
11063         (Depends-on): Remove error, exitfail.
11064         Add dirname.
11065
11066         * modules/verify: New file.
11067         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11068         with "verify" module.
11069
11070 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11071
11072         Sync from coreutils.
11073
11074         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11075         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11076         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11077         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11078         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11079         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11080         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11081         Don't bother checking for string.h, stdlib.h, unistd.h.
11082         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11083         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11084         module's job.
11085         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11086         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11087
11088         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11089         (gl_GETDATE): Use it.
11090
11091         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11092
11093 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11094
11095         Sync from coreutils.
11096
11097         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11098         stat-time.h.
11099         * lib/argmatch.h: Include verify.h
11100         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11101         (ARGMATCH_ASSERT): Remove; unused.
11102         * lib/canonicalize.c: Assume STDC_HEADERS.
11103         * lib/exclude.c: Include "strcase.h".
11104         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11105         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11106         and stdio-safer.h.
11107         (getusershell): Call fopen, not fopen_safer.
11108         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11109         Do not include unistd-safer.h.
11110         (save_cwd): Don't call fd_safer; no longer needed
11111         now that we include fcntl--.h.
11112
11113         * lib/getdate.y (relative_time): New type.
11114         (RELATIVE_TIME_0): New constant.
11115         (parser_control): Use relative_time instead of doing it ourselves.
11116         (%union): Add new relative_time rel member.
11117         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11118         Now typeless.
11119         (relunit, relunit_snumber): Now of type rel.
11120         (zone, rel, relunit, get_date): Adjust to above changes.
11121
11122         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11123         Do not include unistd-safer.h.
11124         (getloadavg): Don't call fd_safer; no longer needed
11125         now that we include fcntl--.h.
11126
11127         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11128         (make_dir_parents): Treat ENOSYS like EEXIST.
11129
11130         Improve quality of diagnostics on restore_cwd failure.
11131         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11132         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11133         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11134         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11135         each time through the loop.  Do not diagnose restore_cwd failure;
11136         that is the caller's job (and perhaps the caller does not care).
11137
11138         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11139         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11140         If the file already exists but is not a directory, don't bother
11141         to try to make its parents.
11142         Close potential file descriptor leak if we can't chdir("/") (!).
11143         Don't always return true if chdir($PWD) fails; return true only
11144         if the requested action was done successfully (except for the
11145         chdir($PWD)).
11146         Don't log final directory unless we actually made it.
11147         Refactor to avoid duplicate code to fix up permissions.
11148         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11149
11150         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11151         to make it a bit faster and (I hope) clearer.
11152         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11153         Fix bug in formats like %2N.
11154
11155         * lib/verify.h: New file.
11156
11157 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11158
11159         Sync from coreutils.
11160         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11161
11162 2005-09-22  Jim Meyering  <jim@meyering.net>
11163
11164         Sync from coreutils.
11165
11166         * m4/lstat.m4 (gl_FUNC_LSTAT):
11167         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11168         Remove obsolete comment.
11169         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11170         * m4/xstrtod.m4: Likewise.
11171
11172         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11173
11174 2005-09-22  Jim Meyering  <jim@meyering.net>
11175
11176         Sync from coreutils.
11177
11178         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11179
11180         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11181         the .tm_year member, since otherwise gcc-4.0 would now warn about
11182         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11183
11184         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11185         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11186
11187         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11188         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11189         when run in a time zone for which daylight savings time is in effect
11190         for the starting date.
11191
11192         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11193         stop us from restricting permissions of just-created absolute-named
11194         directories.
11195         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11196         to restore initial working directory.
11197         * lib/mkdir-p.c (make_dir_parents): New parameter:
11198         different_working_dir, to tell caller if/when we change the working
11199         directory and are unable to return to the initial one.
11200         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11201         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11202         `return false'.  This fixes a bug introduced on 2004-07-30.
11203
11204         * lib/openat.c (fdopendir): Be sure to close the supplied
11205         file descriptor before returning.  This makes our replacement
11206         implementation a little closer to Solaris's, where fdopendir
11207         ties the file descriptor to the returned DIR* pointer.
11208         * lib/openat.c (unlinkat): New function.
11209         * lib/openat.h (unlinkat): Add prototype.
11210         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11211         (openat_restore_fail): Rename from openat_restore_die.
11212         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11213
11214         Provide an alternative to exiting immediately upon save_cwd or
11215         restore_cwd failure.  Now, an application can arrange e.g.,
11216         to perform a longjump in that case.
11217         * lib/openat.c: Include dirname.h.
11218         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11219         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11220         and openat_restore_die rather than calling error directly.
11221         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11222
11223         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11224         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11225         define.
11226
11227         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11228         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11229                             int utc, int nanoseconds);
11230         Background:
11231         date should not have to allocate a megabyte of virtual memory to
11232         handle a format argument like +%1048575T.  When implemented with
11233         strftime, it must allocate such a buffer, use strftime to fill it
11234         in, print it, then free it.
11235         With fprintftime, it simply prints everything and exits.
11236         With no need for memory allocation, that's one fewer way to fail.
11237         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11238         optional field width, not before, so we accept %9:z, not %:9z.
11239         (my_strftime): Be sure to use L_('x') for literals.
11240
11241         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11242         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11243         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11244         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11245         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11246         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11247         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11248         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11249         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11250         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11251         * lib/xgethostname.c, lib/xreadlink.c:
11252         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11253
11254         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11255         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11256         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11257         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11258         and don't include <sys/file.h>).
11259
11260 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11261
11262         Sync from coreutils.
11263
11264         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11265         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11266         [!LDAV_DONE]: Avoid unused variable warning.
11267
11268 2005-09-21  Bruno Haible  <bruno@clisp.org>
11269
11270         * lib/unicodeio.h (unicode_to_mb): New declaration.
11271
11272 2005-09-20  Derek Price  <derek@ximbiot.com>
11273
11274         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11275         getaddrinfo.h.
11276
11277 2005-09-20  Bruno Haible  <bruno@clisp.org>
11278
11279         * gnulib-tool: Remove trailing slashes from the values specified for
11280         --source-base, --m4-base, --tests-base, --aux-dir.
11281         Suggested by Simon Josefsson <jas@extundo.com>.
11282
11283 2005-09-20  Bruno Haible  <bruno@clisp.org>
11284
11285         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11286         func_modules_to_filelist, func_import, func_create_testdir): Make all
11287         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11288         change when gnulib-tool is invoked in a different locale.
11289
11290 2005-09-19  Simon Josefsson  <jas@extundo.com>
11291
11292         * m4/socklen.m4: Fix typo.
11293
11294 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11295
11296         Use a consistent style for including <config.h>.
11297         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11298         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11299         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11300         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11301         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11302         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11303         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11304         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11305         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11306         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11307         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11308         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11309         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11310         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11311         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11312         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11313         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11314         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11315         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11316         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11317         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11318         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11319         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11320         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11321         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11322         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11323         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11324         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11325         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11326         lib/xstrtoumax.c, lib/yesno.c:
11327         Standardize inclusion of config.h.
11328         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11329         lib/inttostr.h:  Removed inclusion of config.h from header files.
11330         * lib/inttostr.c:  Adjusted in-tree users.
11331         * lib/timespec.h: Remove superfluous warning to include config.h.
11332         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11333         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11334         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11335         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11336         config.h with HAVE_CONFIG_H.
11337
11338 2005-09-19  Jim Meyering  <jim@meyering.net>
11339
11340         * modules/pathmax (License): Change to LGPL.
11341
11342 2005-09-19  Derek Price  <derek@ximbiot.com>
11343
11344         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11345
11346 2005-09-19  Bruno Haible  <bruno@clisp.org>
11347
11348         * gnulib-tool (import): Provide default for --tests-base.
11349
11350 2005-09-19  Bruno Haible  <bruno@clisp.org>
11351
11352         * doc/quote.texi: New file, extracted from gnulib.texi.
11353         * doc/ctime.texi: New file, extracted from gnulib.texi.
11354         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11355         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11356         * doc/gnulib.texi: Include them.
11357
11358 2005-09-18  Bruno Haible  <bruno@clisp.org>
11359
11360         Portability fix.
11361         * gnulib-tool (func_readlink): New function.
11362         (func_ln_if_changed): Use it.
11363
11364 2005-09-18  Bruno Haible  <bruno@clisp.org>
11365
11366         * gnulib-tool: Support --with-tests also with --import.
11367         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11368         (func_import): Use variables $testsbase and $inctests. Emit a
11369         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11370         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11371         SUBDIRS += $testsdir.
11372         (func_create_testdir): Update.
11373
11374 2005-09-18  Bruno Haible  <bruno@clisp.org>
11375
11376         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11377         instead of $dry_run.
11378         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11379         (func_ln_if_changed): Don't handle dry-run here.
11380         (func_import): In dry-run mode, detect more precisely which actions
11381         would be performed, and don't use "...ing" verbs.
11382
11383 2005-09-18  Bruno Haible  <bruno@clisp.org>
11384
11385         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11386         (func_import): Use join on two temporary files instead of three nested
11387         loops, in order to determine which files are new or old.
11388
11389 2005-09-18  Bruno Haible  <bruno@clisp.org>
11390
11391         * gnulib-tool (func_import): Comment out code that spits out the
11392         new files with --dry-run.
11393
11394 2005-09-18  Bruno Haible  <bruno@clisp.org>
11395
11396         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11397
11398 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11399
11400         * lib/stat-time.h: New file.
11401         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11402         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11403         in a different way.
11404         (timespec_cmp): New function.
11405         * lib/utimecmp.c: Include stat-time.h.
11406         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11407         members exist, not on the obsolescent ST_MTIM_NSEC.
11408         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11409
11410 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11411
11412         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11413
11414 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11415
11416         * MODULES.html.sh (File system functions): Add stat-time.
11417         * modules/stat-time: New file.
11418         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11419         is now done in a different way, by the stat-time module.
11420         * modules/utimecmp (Depends-on): Add stat-time.
11421
11422 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11423
11424         * m4/st_mtim.m4: Remove.  Superseded by...
11425         * m4/stat-time.m4: New file.
11426         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11427         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11428
11429 2005-09-15  Derek Price  <derek@ximbiot.com>
11430
11431         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11432
11433 2005-09-15  Derek Price  <derek@ximbiot.com>
11434
11435         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11436         * lib/regex_internal.c: Ditto, using this...
11437         (__GNUC_PREREQ): ...new macro.
11438         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11439         using...
11440         (__GNUC_PREREQ): ...this new macro.
11441
11442         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11443
11444 2005-09-15  Derek Price  <derek@ximbiot.com>
11445             Paul Eggert  <eggert@cs.ucla.edu>
11446
11447         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11448         changes, consolidating in...
11449         * lib/regex_internal.h: ...this file.
11450
11451 2005-09-13  Jim Meyering  <jim@meyering.net>
11452
11453         * lib/canon-host.c: Filter through gnu indent and reword comments
11454         slightly.
11455         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11456
11457 2005-09-13  Derek Price  <derek@ximbiot.com>
11458
11459         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11460         failure.
11461         Reported by Jim Meyering  <jim@meyering.net>.
11462
11463 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11464
11465         * lib/base64.c: Typo.
11466         (base64_encode): Put b64str in initialized data section.
11467
11468 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11469
11470         Merge glibc and coreutils changes into gnulib, plus a few
11471         extra fixes.
11472         * lib/md5.c: Use #error rather than a string.
11473         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11474         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11475         (__attribute__): Define to empty for non recent-GCC.
11476         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11477         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11478         Renamed from their non-__ counterparts, with new macros replacing
11479         them if not _LIBC.  Add __THROW attribute.
11480         (rol): Remove.
11481         (struct md5_ctx): Align buffer if using GCC.
11482         * lib/sha1.h (struct sha1_ctx): Likewise.
11483         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11484         The old name was backwards.
11485         (NOTSWAP): Remove; not used.
11486         (rol): New macro, moved here from md5.h.
11487         (sha1_process_block): Remove a FIXME that doesn't make sense.
11488
11489 2005-09-12  Derek Price  <derek@ximbiot.com>
11490
11491         Return usable errors from canon-host.
11492         * lib/canon-host.h: New file.
11493         * lib/canon-host.c (canon_host): Wrap...
11494         (canon_host_r): ...this new function, which now relies exclusively on
11495         getaddrinfo.
11496         (ch_strerror): New function.
11497         (last_cherror): New global.
11498         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11499         interface.
11500         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11501         void *.
11502         (freeaddrinfo): Free ai->ai_canonname when set.
11503
11504 2005-09-12  Derek Price  <derek@ximbiot.com>
11505
11506         Make canon-host require getaddrinfo.
11507         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11508         AC_LIBSOURCE canon-host.h.  Call...
11509         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11510         gl_GETADDRINFO.
11511         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11512
11513 2005-09-12  Derek Price  <derek@ximbiot.com>
11514
11515         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11516         LGPL.
11517         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11518
11519 2005-09-12  Derek Price  <derek@ximbiot.com>
11520
11521         * lib/gai_strerror.c: Include config.h when available.  Include
11522         getaddrinfo.h before other headers to test interface.
11523         Reported by Larry Jones <lawrence.jones@ugs.com>.
11524
11525 2005-09-12  Derek Price  <derek@ximbiot.com>
11526             Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         * modules/glob (Files): Add glob-libc.h.
11529
11530 2005-09-12  Derek Price  <derek@ximbiot.com>
11531             Paul Eggert  <eggert@cs.ucla.edu>
11532
11533         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11534         glob_.h, glob-libc.h.
11535         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11536
11537 2005-09-12  Derek Price  <derek@ximbiot.com>
11538             Paul Eggert  <eggert@cs.ucla.edu>
11539
11540         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11541         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11542         protecting things that should be done only in gnulib contexts.
11543         * lib/glob_.h: New file, containing only the glob things needed for
11544         gnulib.
11545         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11546         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11547         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11548         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11549         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11550         and to respect the namespace rules better.
11551
11552 2005-09-08  Simon Josefsson  <jas@extundo.com>
11553
11554         * modules/socklen: New file.
11555
11556 2005-09-08  Simon Josefsson  <jas@extundo.com>
11557
11558         * m4/socklen.m4: New file.
11559
11560 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11561
11562         * modules/utimens (Files): Add m4/utimbuf.m4, since
11563         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11564         Reported by Sergey Poznyakoff.
11565
11566 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11567
11568         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11569         definitions, since that's the preferred style in glibc.
11570         Fix a minor spacing issue, and update copyright notice to match
11571         glibc's.
11572
11573 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11574
11575         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11576
11577 2005-09-06  Simon Josefsson  <jas@extundo.com>
11578
11579         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11580         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11581
11582 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11583
11584         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11585         warning.
11586
11587 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11588
11589         * config/srclist.txt: Add glibc bug 1302.
11590
11591 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11592
11593         Change bitset word type from unsigned int to unsigned long int,
11594         as this has better performance on typical 64-bit hosts.
11595         Port bitset code to hosts with unusual word sizes.
11596         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11597         (build_collating_symbol):
11598         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11599         argument is a bitset.  This is merely a style issue, but it makes
11600         it clearer that an entire array is expected.
11601         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11602         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11603         Port to the case where bitset_word is not the same as unsigned int.
11604         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11605         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11606         Likewise.
11607         * lib/regexec.c (check_dst_limits_calc_pos_1,
11608         check_subexp_matching_top):
11609         (build_trtable, group_nodes_into_DFAstates):
11610         Likewise.
11611         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11612         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11613         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11614         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11615         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11616         * lib/regcomp.c (optimize_subexps, lower_subexp):
11617         Work even if bitset_word has holes in its bitwise representation.
11618         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11619         * lib/regexec.c (check_dst_limits_calc_pos_1,
11620         check_subexp_matching_top):
11621         Likewise.
11622         * lib/regex_internal.c (re_string_reconstruct):
11623         Don't assume UCHAR_MAX == 255.
11624         * lib/regex_internal.h (bitset_set_all): Likewise.
11625         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11626         All uses changed.
11627         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11628         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11629         All uses changed.
11630         (BITSET_WORD_MAX): New macro.
11631         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11632         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11633         (bitset_empty, bitset_copy):
11634         Prefer sizeof (bitset) to multiplying it out ourselves.
11635         (bitset_not_merge): Remove; unused.
11636         (bitset_contain): Return bool, not unsigned int with one bit on.
11637         All callers changed.
11638         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11639         alignment than re_node_set; do this by defining a new internal
11640         type struct dests_alloc and using it to allocate memory.
11641
11642 2005-09-05  Bruno Haible  <bruno@clisp.org>
11643
11644         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11645         links.
11646
11647 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11648
11649         * modules/size_max (Makefile.am): Add size_max.h
11650
11651 2005-09-04  Derek Price  <derek@ximbiot.com>
11652
11653         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11654
11655 2005-09-03  Simon Josefsson  <jas@extundo.com>
11656
11657         * gnulib-tool: Fix typo.
11658
11659 2005-09-03  Simon Josefsson  <jas@extundo.com>
11660
11661         * config/srclist.txt: Add glibc bug 1293.
11662
11663 2005-09-03  Derek Price  <derek@ximbiot.com>
11664
11665         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11666         From Larry Jones <lawrence.jones@ugs.com>.
11667
11668 2005-09-02  Simon Josefsson  <jas@extundo.com>
11669
11670         * modules/socklen: New file.
11671
11672 2005-09-02  Simon Josefsson  <jas@extundo.com>
11673
11674         * modules/havelib: New module.
11675
11676         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11677         Use havelib.
11678
11679 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11680
11681         Check for arithmetic overflow when calculating sizes, to prevent
11682         some buffer-overflow issues.  These patches are conservative, in the
11683         sense that when I couldn't determine whether an overflow was possible,
11684         I inserted a run-time check.
11685         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11686         macros.
11687         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11688         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11689         (re_xnrealloc, re_x2nrealloc): New inline functions.
11690         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11691         parse_bracket_exp):
11692         (build_equiv_class, build_charclass): Check for arithmetic overflow
11693         in size expression calculations.
11694         * lib/regex_internal.c (re_string_realloc_buffers):
11695         (build_wcs_upper_buffer, re_node_set_add_intersect):
11696         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11697         (re_dfa_add_node, register_state): Likewise.
11698         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11699         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11700         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11701         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11702
11703 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11704
11705         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11706         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11707
11708 2005-09-02  Bruno Haible  <bruno@clisp.org>
11709
11710         Support for lib vs. lib64 distinction on biarch platforms.
11711         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11712         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11713         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11714
11715 2005-09-02  Bruno Haible  <bruno@clisp.org>
11716
11717         * gnulib-tool (import): In the other first-use case, provide defaults
11718         as well.
11719
11720 2005-09-02  Bruno Haible  <bruno@clisp.org>
11721
11722         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11723         patches not yet found in the latest gettext release.
11724
11725 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11726
11727         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11728         to avoid a collision with bits/local_lim.h in glibc.
11729         All uses changed.  Problem reported by Dmitry V. Levin in
11730         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11731
11732         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11733         bugs in int versus size_t comparisons.
11734         (re_string_context_at): Fix bug where the code assumed that
11735         Idx is signed.
11736
11737         Use bool where appropriate.
11738         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11739         All callers changed.
11740         (calc_eclosure_iter): Likewise, for ROOT arg.
11741         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11742         (build_charclass_op): Likewise, for NON_MATCH arg.
11743         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11744         (re_string_construct_common): Likewise, for ICASE arg.
11745         * lib/regexec.c (re_search_2_stub, re_search_stub):
11746         Likewise, for RET_LEN arg.
11747         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11748         (set_regs): Likewise, for FL_BACKTRACK arg.
11749         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11750         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11751         (calc_eclosure_iter, parse_bracket_exp):
11752         Use bool for internal variables that are booleans.
11753         * lib/regexec.c (re_search_internal, check_matching,
11754         proceed_next_node):
11755         (set_regs, build_sifted_states, sift_states_bkref):
11756         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11757         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11758         (find_collation_sequence_value):
11759         Likewise.
11760         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11761         (re_node_set_compare):
11762         Return bool, not int. All callers changed.
11763         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11764         (build_trtable, check_node_accept): Likewise.
11765         * lib/regex_internal.h: Include stdbool.h.
11766
11767         Fix bugs uncovered when converting to bool.
11768         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11769         failure instead of charging ahead blindly.
11770         * lib/regex_internal.c (register_state): Likewise.
11771         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11772         for freeing internal storage.
11773         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11774         bitset pieces used as boolean, to avoid undefined behavior
11775         on hosts that do int overflow checking.
11776
11777 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11778
11779         * config/srclist.txt: Add glibc bugs 1285-1287.
11780
11781 2005-09-01  Jim Meyering  <jim@meyering.net>
11782
11783         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11784         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11785         Require gl_STAT_MACROS, too.
11786
11787 2005-09-01  Bruno Haible  <bruno@clisp.org>
11788
11789         * gnulib-tool (import): In the first-use case, provide defaults.
11790
11791 2005-09-01  Bruno Haible  <bruno@clisp.org>
11792
11793         * gnulib-tool (func_import): Remove the .tmp files.
11794
11795 2005-09-01  Bruno Haible  <bruno@clisp.org>
11796
11797         * gnulib-tool (func_import): Fix handling of symbolic links.
11798
11799 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11800
11801         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11802         old glibc regex code mishandles strings longer than 2**31 bytes.
11803         This patch fixes this when the regex code is used in gnulib
11804         (i.e., outside glibc).
11805
11806         This patch should not affect the use of the regex code inside
11807         glibc.  No doubt this problem also needs to be handled for glibc
11808         as well, but the result will be an incompatible change to the
11809         glibc ABI, and the old ABI will have to be supported too.  That
11810         can be the the subject for another patch.
11811
11812         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11813         governing whether the rest of this patch is active.  By default,
11814         the macro is disabled and the patch has no effect.
11815         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11816         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11817         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11818         (re_match_2, re_set_registers): Use the new types.
11819         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11820         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11821         New macros.
11822         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11823         (re_string_context_at, bin_tree_t, re_dfastate_t):
11824         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11825         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11826         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11827         (re_string_char_size_at, re_string_wchar_at):
11828         (re_string_elem_size_at):
11829         Use the new types and macros to port to 64-bit hosts.
11830         Use unsigned types for internal values, so that the code
11831         mostly works even for arrays larger than SSIZE_MAX.
11832         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11833         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11834         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11835         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11836         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11837         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11838         (calc_inveclosure, parse_dup_op, build_range_exp):
11839         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11840         (fetch_number, create_token_tree, mark_opt_subexp):
11841         Likewise.
11842         * lib/regex_internal.c (re_string_construct_common,
11843         create_ci_newstate):
11844         (create_cd_newstate, re_string_allocate, re_string_construct):
11845         (re_string_realloc_buffers, build_wcs_upper_buffer):
11846         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11847         (re_string_reconstruct, re_string_peek_byte_case):
11848         (re_string_fetch_byte_case, re_string_context_at):
11849         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11850         (re_node_set_init_copy, re_node_set_add_intersect):
11851         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11852         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11853         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11854         (re_acquire_state, re_acquire_state_context, register_state):
11855         Likewise.
11856         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11857         search_cur_bkref_entry):
11858         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11859         (re_search_internal, re_search_2_stub, re_search_stub)
11860         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11861         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11862         (update_cur_sifted_state, check_dst_limits):
11863         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11864         (check_subexp_limits, sift_states_bkref, merge_state_array):
11865         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11866         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11867         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11868         (expand_bkref_cache, check_node_accept_bytes):
11869         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11870         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11871         (acquire_init_state_context, check_halt_node_context):
11872         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11873         (sift_states_backward, clean_state_log_if_needed):
11874         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11875         (find_recover_state, transit_state_sb, transit_state_mb):
11876         (transit_state_bkref, build_trtable, match_ctx_clean):
11877         Likewise.
11878         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11879         to work around an assumption that REG_MISSING is negative.
11880
11881         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11882         (seek_collating_symbol_entry) [defined _LIBC]:
11883         (lookup_collation_sequence_value) [defined _LIBC]:
11884         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11885         Use prototypes rather than old-style function definitions.
11886         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11887         (transit_state_sb) [0]:
11888         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11889
11890         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11891         rm_eo.
11892
11893         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11894         (optimize_subexps, lower_subexp):
11895         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11896         since the signed shift might overflow.  Use 1u<<31 instead.
11897         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11898         Likewise.
11899         * lib/regexec.c (check_dst_limits_calc_pos_1,
11900         check_subexp_matching_top): Likewise.
11901
11902         * lib/regcomp.c (optimize_subexps, lower_subexp):
11903         Use CHAR_BIT rather than 8, for clarity.
11904         * lib/regexec.c (check_dst_limits_calc_pos_1):
11905         (check_subexp_matching_top): Likewise.
11906         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11907         have to worry about portability issues when shifting it left.
11908         Remove no-longer-needed test for table_size > 0.
11909         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11910         in a word, as the resulting behavior is undefined.
11911         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11912         in one case, a <= should have been an <, and in another case the
11913         whole test was missing.
11914         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11915         the standard name CHAR_BIT.
11916         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11917         this is not true on one's complement and signed-magnitude hosts.
11918
11919         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11920         next_last_offset.
11921         (struct re_dfa_t): Remove unused member states_alloc.
11922         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11923
11924 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11925
11926         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11927         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11928         and large-file glibc and in 32-bit large-file Solaris.
11929
11930 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11931
11932         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11933         lengths fit in regoff_t; this isn't true if regoff_t is the same
11934         width as size_t.
11935         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11936         (= START + RANGE) instead of RANGE.  This avoids overflow
11937         problems when regoff_t is the same width as size_t.
11938         All callers changed.
11939         (re_search_2_stub): Check for overflow when adding the
11940         sizes of the two strings.
11941         (re_search_stub): Check for overflow when adding START
11942         to RANGE; if it occurs, substitute the extreme value.
11943
11944 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11945
11946         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11947
11948 2005-08-31  Jim Meyering  <jim@meyering.net>
11949
11950         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11951         a pointer-to-const.
11952         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11953         (register_state): Likewise.
11954         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11955         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11956         (group_nodes_into_DFAstates): Likewise.
11957
11958 2005-08-31  Jim Meyering  <jim@meyering.net>
11959
11960         * check-module: Add a FIXME comment.
11961
11962 2005-08-31  Eric Blake  <ebb9@byu.net>
11963
11964         * modules/unistd-safer (Files): Add unistd--.h.
11965         * modules/stdio-safer (Files): Add stdio--.h.
11966
11967 2005-08-31  Derek Price  <derek@ximbiot.com>
11968
11969         * lib/getdelim.c (getdelim): Return EOF on EOF.
11970         Reported by Larry Jones <lawrence.jones@ugs.com>.
11971
11972 2005-08-31  Bruno Haible  <bruno@clisp.org>
11973
11974         Avoid unnecessary diffs in the generated lib/Makefile.am.
11975         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11976         the generated files.
11977         (func_import): Don't set cmd.
11978
11979 2005-08-31  Bruno Haible  <bruno@clisp.org>
11980
11981         * lib/strstr.c: Include <stddef.h>, for NULL.
11982         * lib/strcasestr.c: Likewise.
11983         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11984
11985 2005-08-31  Bruno Haible  <bruno@clisp.org>
11986
11987         * gnulib-tool: New option --macro-prefix.
11988         (func_import): Use macro_prefix.
11989         (import): Handle option --macro-prefix.
11990
11991 2005-08-31  Bruno Haible  <bruno@clisp.org>
11992
11993         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11994         Also use new variables cached_lgpl, cached_libtool.
11995
11996 2005-08-31  Bruno Haible  <bruno@clisp.org>
11997
11998         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11999         always instantiating them.
12000
12001 2005-08-31  Bruno Haible  <bruno@clisp.org>
12002
12003         * gnulib-tool (func_import): Read the previous cached settings
12004         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
12005         earlier added by gnulib but are now dropped. Warn when a gnulib file
12006         overwrites a non-gnulib file.
12007
12008 2005-08-31  Bruno Haible  <bruno@clisp.org>
12009
12010         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
12011         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
12012         projects that don't keep autogenerated files in CVS. Put into
12013         actioncmd only the specified modules, not the transitive closure.
12014
12015 2005-08-31  Bruno Haible  <bruno@clisp.org>
12016
12017         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
12018         Create directories that shall be filled.
12019         (import): Don't look for gl_* macros in configure.ac. Recurse across
12020         all directories containing a gnulib-cache.m4 files, if meaningful.
12021
12022 2005-08-31  Bruno Haible  <bruno@clisp.org>
12023
12024         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12025         (import): Set seen_libtool when we see gl_LIBTOOL.
12026
12027 2005-08-31  Bruno Haible  <bruno@clisp.org>
12028
12029         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12030         declaration macro definitions from generated gnulib.m4.
12031
12032 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12033
12034         * lib/iconvme.h: Add prototype for iconv_alloc.
12035
12036 2005-08-29  Simon Josefsson  <jas@extundo.com>
12037
12038         * lib/iconvme.c: Fix errno.
12039
12040 2005-08-29  Bruno Haible  <bruno@clisp.org>
12041
12042         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12043         that it works when the directory contains spaces.
12044
12045 2005-08-29  Bruno Haible  <bruno@clisp.org>
12046
12047         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12048
12049 2005-08-29  Bruno Haible  <bruno@clisp.org>
12050
12051         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12052         Emit more advice.
12053
12054 2005-08-29  Bruno Haible  <bruno@clisp.org>
12055         and Stepan Kasal  <kasal@ucw.cz>
12056
12057         * check-module: If more parameters are given, check each of them
12058         separately; add more exceptions, as noted by Jim Meyering.
12059         (check_module): New procedure.
12060         (%exempt_header): Now contains all exceptions.
12061
12062 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12063
12064         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12065
12066 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12067
12068         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12069
12070 2005-08-28  Bruno Haible  <bruno@clisp.org>
12071
12072         * m4/gnulib-tool.m4: New file.
12073
12074 2005-08-27  Jim Meyering  <jim@meyering.net>
12075
12076         * modules/unistd-safer (Files): Add pipe-safer.c.
12077         * modules/fcntl-safer (Files): Add creat-safer.c.
12078
12079 2005-08-27  Jim Meyering  <jim@meyering.net>
12080
12081         * m4/stdlib-safer.m4: New file.  From coreutils.
12082         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12083         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12084         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12085         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12086         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12087
12088 2005-08-27  Jim Meyering  <jim@meyering.net>
12089
12090         * lib/fopen-safer.c: Merge minor changes from coreutils.
12091         * lib/dup-safer.c: Likewise.
12092         * lib/fd-safer.c: Likewise.
12093
12094         Merge from coreutils.
12095         * lib/stdio--.h: New file.
12096         * lib/stdlib--.h: New file.
12097         * lib/mkstemp-safer.c: New file.
12098
12099         GNU tar needs these.
12100         * lib/pipe-safer.c: New file.
12101         * lib/creat-safer.c: New file.
12102         * lib/fcntl--.h (creat): Define to creat_safer.
12103         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12104         * lib/unistd--.h (pipe): Define to pipe_safer.
12105         * lib/unistd-safer.h: Declare pipe_safer.
12106
12107 2005-08-26  Simon Josefsson  <jas@extundo.com>
12108
12109         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12110         Haible <bruno@clisp.org>.
12111
12112 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12113
12114         * lib/regex_internal.h: Remove all references to
12115         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12116         or better.
12117         (bitset_not, bitset_merge, bitset_not_merge):
12118         (bitset_mask, re_string_allocate, re_string_construct):
12119         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12120         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12121         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12122         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12123         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12124         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12125         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12126         (re_acquire_state_context):
12127         Remove unnecessary forward decls.
12128         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12129         Put __attribute at function definition,
12130         now that the function decl has been removed.
12131         * lib/regex_internal.c (re_string_peek_byte_case):
12132         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12133         Likewise.
12134
12135 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12136
12137         * m4/regex.m4: Add AC_PREREQ(2.50).
12138         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12139
12140 2005-08-25  Simon Josefsson  <jas@extundo.com>
12141
12142         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12143         __fsetlocking.
12144
12145 2005-08-25  Simon Josefsson  <jas@extundo.com>
12146
12147         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12148         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12149         GLIBC specific code.
12150
12151 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12152
12153         Make regex safe for g++.  This fixes one real bug (an "err"
12154         that should have been "*err").  g++ problem reported by
12155         Sam Steingold.
12156         * lib/regex_internal.h (re_calloc): New macro, consistent with
12157         re_malloc etc.  All callers of calloc changed to use re_calloc.
12158         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12159         not int.  All callers changed.
12160         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12161         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12162         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12163         (find_recover_state): Change "err" to "*err"; this fixes what
12164         appears to be a real bug.
12165         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12166         versus int.
12167
12168 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12169
12170         * modules/regex (Depends-on): Add malloc, since the code
12171         assumes that !malloc(0) means failure.
12172
12173 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12174
12175         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12176
12177         alloca modernization/simplification for regex.
12178         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12179         needs to be at the start of the file, and can be moved into
12180         regex_internal.h and simplified.
12181         * lib/regex_internal.h: Include <alloca.h>.
12182         (__libc_use_alloca) [!defined _LIBC]: New macro.
12183         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12184         now works outside glibc.
12185
12186 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12187
12188         * config/srclist.txt: Add glibc bugs 1241, 1245.
12189
12190 2005-08-25  Jim Meyering  <jim@meyering.net>
12191
12192         * lib/open-safer.c: Include <config.h>.
12193         Otherwise, we'd lose LARGEFILE support in any file using
12194         e.g. "fcntl--.h"
12195
12196 2005-08-25  Bruno Haible  <bruno@clisp.org>
12197
12198         * m4/minmax.m4: Require autoconf 2.52.
12199         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12200         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12201         alternatives of translit over the alphabet.
12202         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12203
12204 2005-08-24  Simon Josefsson  <jas@extundo.com>
12205
12206         * tests/test-getpass.c: New file.
12207
12208 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12209
12210         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12211         for GNU regex features.
12212
12213 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12214
12215         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12216         * lib/regex.h (regerror): Likewise.
12217
12218         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12219         requires this.  (The code never needed it.)
12220
12221         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12222         All uses of recently-renamed identifiers changed to use the new,
12223         POSIX-compliant names.  The code will build and run just fine
12224         without these changes, but it's better to eat our own dog food
12225         and use the standard-conforming names.
12226
12227         * lib/regex.h: Fix a multitude of POSIX name space violations.
12228         These changes have an effect only for programs that define
12229         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12230         do not change anything for programs compiled in the normal way.
12231         Also, there is no effect on the ABI.
12232
12233         (_REGEX_SOURCE): New macro.
12234         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12235         defined and _GNU_SOURCE is not; this fixes a name space violation.
12236
12237         Rename the following macros to obey POSIX requirements.
12238         The old names are still visible as macros if _REGEX_SOURCE is defined.
12239         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12240         RE_BACKSLASH_ESCAPE_IN_LISTS.
12241         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12242         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12243         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12244         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12245         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12246         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12247         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12248         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12249         (REG_INTERVALS): renamed from RE_INTERVALS.
12250         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12251         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12252         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12253         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12254         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12255         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12256         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12257         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12258         RE_UNMATCHED_RIGHT_PAREN_ORD.
12259         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12260         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12261         (REG_DEBUG): renamed from RE_DEBUG.
12262         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12263         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12264         unusual, since we can't clash with the POSIX REG_ICASE.
12265         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12266         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12267         (REG_NO_SUB): renamed from RE_NO_SUB.
12268         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12269         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12270         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12271         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12272         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12273         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12274         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12275         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12276         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12277         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12278         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12279         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12280         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12281         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12282         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12283         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12284         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12285         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12286         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12287         (REG_FIXED): Renamed from REGS_FIXED.
12288         (REG_NREGS): Renamed from RE_NREGS.
12289
12290         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12291         of other REG_* macros, since POSIX says the user is allowed to
12292         #undef these macros selectively.
12293
12294         (reg_errcode_t): Update comment stating what other tables need
12295         to be consistent.
12296
12297         Rename the following enum values to obey POSIX requirements.
12298         The old names are still visible as macros.
12299         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12300         is not defined, since GNU is supposed to be a superset of POSIX as
12301         much as possible, and since we want reg_errcode_t to be a signed
12302         type for implementation consistency.
12303         (_REG_NOERROR): Renamed from REG_NOERROR.
12304         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12305         (_REG_BADPAT): Renamed from REG_BADPAT.
12306         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12307         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12308         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12309         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12310         (_REG_EBRACK): Renamed from REG_EBRACK.
12311         (_REG_EPAREN): Renamed from REG_EPAREN.
12312         (_REG_EBRACE): Renamed from REG_EBRACE.
12313         (_REG_BADBR): Renamed from REG_BADBR.
12314         (_REG_ERANGE): Renamed from REG_ERANGE.
12315         (_REG_ESPACE): Renamed from REG_ESPACE.
12316         (_REG_BADRPT): Renamed from REG_BADRPT.
12317         (_REG_EEND): Renamed from REG_EEND.
12318         (_REG_ESIZE): Renamed from REG_ESIZE.
12319         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12320         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12321         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12322         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12323         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12324
12325         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12326         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12327         changed.  But support the old name if the new one is not defined
12328         and if _REGEX_SOURCE.
12329
12330         Change the following member names in struct re_pattern_buffer.
12331         The old names are still supported if !_REGEX_SOURCE.
12332         The new names are always supported, regardless of _REGEX_SOURCE.
12333         (re_buffer): Renamed from buffer.
12334         (re_allocated): Renamed from allocated.
12335         (re_used): Renamed from used.
12336         (re_syntax): Renamed from syntax.
12337         (re_fastmap): Renamed from fastmap.
12338         (re_translate): Renamed from translate.
12339         (re_can_be_null): Renamed from can_be_null.
12340         (re_regs_allocated): Renamed from regs_allocated.
12341         (re_fastmap_accurate): Renamed from fastmap_accurate.
12342         (re_no_sub): Renamed from no_sub.
12343         (re_not_bol): Renamed from not_bol.
12344         (re_not_eol): Renamed from not_eol.
12345         (re_newline_anchor): Renamed from newline_anchor.
12346
12347         Change the following member names in struct re_registers.
12348         The old names are still supported if !_REGEX_SOURCE.
12349         The new names are always supported, regardless of _REGEX_SOURCE.
12350         (rm_num_regs): Renamed from num_regs.
12351         (rm_start): Renamed from start.
12352         (rm_end): Renamed from end.
12353
12354         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12355         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12356         Prepend __ to parameter names.
12357
12358         Undo yesterday's changes.
12359
12360 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12361
12362         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12363         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12364         lib/regex.c.
12365
12366 2005-08-24  Jim Meyering  <jim@meyering.net>
12367
12368         Sync from coreutils.
12369         * m4/fcntl-safer.m4: New file.
12370
12371         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12372         and object files for this module.
12373
12374 2005-08-24  Jim Meyering  <jim@meyering.net>
12375
12376         Sync from coreutils.
12377         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12378
12379 2005-08-24  Jim Meyering  <jim@meyering.net>
12380
12381         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12382         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12383
12384 2005-08-24  Jim Meyering  <jim@meyering.net>
12385
12386         * modules/fcntl-safer: New module.
12387         * modules/fts (Depends-on): Add fcntl-safer.
12388         * MODULES.html.sh (File descriptor based Input/Output):
12389         Add fcntl-safer.
12390
12391 2005-08-24  Bruno Haible  <bruno@clisp.org>
12392
12393         Support for unit test modules.
12394         * modules/README: Mention tests modules.
12395         * modules/TEMPLATE-TESTS: New file.
12396         * gnulib-tool: New options --extract-tests-module, --with-tests and
12397         --tests-base (unused for the moment).
12398         (testsbase, inctests): New variables.
12399         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12400         (func_verify_module): Exclude TEMPLATE-TESTS.
12401         (func_verify_nontests_module, func_verify_tests_module): New functions.
12402         (func_get_dependencies): Add implicit dependency for tests modules.
12403         (func_get_tests_module): New function.
12404         (func_modules_transitive_closure): When --with-tests was specified,
12405         include the unit tests as well, unless explicitly avoided.
12406         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12407         (func_emit_tests_Makefile_am): New function.
12408         (func_create_testdir): When --with-tests was specified, emit a
12409         tests/ directory.
12410         * MODULES.html.sh (Future developments): Update.
12411
12412 2005-08-24  Bruno Haible  <bruno@clisp.org>
12413
12414         * modules/tls-tests: New file.
12415         * tests/test-tls.c: New file, from GNU gettext.
12416
12417 2005-08-24  Bruno Haible  <bruno@clisp.org>
12418
12419         * modules/lock-tests: New file.
12420         * tests/test-lock.c: New file, from GNU gettext.
12421
12422 2005-08-24  Bruno Haible  <bruno@clisp.org>
12423
12424         * lib/lock.h: Add multiple inclusion guard.
12425         * lib/tls.h: Add multiple inclusion guard.
12426
12427 2005-08-24  Bruno Haible  <bruno@clisp.org>
12428
12429         * gnulib-tool: Add support for the --aux-dir option to
12430         --create-testdir, --create-megatestdir, --test, --megatest.
12431         (func_create_testdir, func_create_megatestdir): Optionally emit a
12432         AC_CONFIG_AUX_DIR directive.
12433         (create-testdir, create-megatestdir, test, megatest): Provide a
12434         default value for $auxdir.
12435
12436 2005-08-24  Bruno Haible  <bruno@clisp.org>
12437
12438         * gnulib-tool (import): Use compound statement instead of subshell
12439         where possible.
12440
12441 2005-08-24  Bruno Haible  <bruno@clisp.org>
12442
12443         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12444
12445 2005-08-24  Bruno Haible  <bruno@clisp.org>
12446
12447         * gnulib-tool (func_version): Update.
12448
12449 2005-08-24  Bruno Haible  <bruno@clisp.org>
12450
12451         * gnulib-tool (func_import, func_create_testdir,
12452         func_create_megatestdir): Quote all autoconf macro arguments.
12453
12454 2005-08-24  Bruno Haible  <bruno@clisp.org>
12455
12456         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12457         option --force, because --force causes the aclocal.m4 of each
12458         subdirectory to be newer than the corresponding config.h.in.
12459
12460 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12461
12462         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12463         All contents moved to gl_REGEX.
12464         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12465         assume that it does.
12466
12467 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12468
12469         * lib/regex.h (REG_NOSYS)
12470         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12471         Define, since POSIX requires it as of 2001.
12472         (_REG_ENOSYS)
12473         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12474         New private symbol, used to keep the enum signed in all cases.
12475         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12476         Youngman in
12477         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12478
12479         * lib/regex_internal.c (re_string_skip_chars, register_state):
12480         (calc_state_hash):
12481         Remove forward decls; no longer needed now that we use prototypes.
12482         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12483         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12484         (clean_state_log_if_needed): Likewise.
12485
12486 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12487
12488         * config/srclist.txt: Add glibc bugs 1231-1233.
12489
12490 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12491
12492         Fix problems reported by Sam Steingold in
12493         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12494         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12495         assumed that reg_errcode_t is a signed type, which is not
12496         necessarily true if _XOPEN_SOURCE is not defined.
12497         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12498         since some compilers warn about it otherwise.
12499
12500 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12501
12502         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12503         (init_word_char, create_initial_state, duplicate_node_closure):
12504         (fetch_token, peek_token_bracket, build_range_exp):
12505         (build_collating_symbol): Remove forward decls; no longer needed
12506         now that we use prototypes.
12507
12508         * lib/regcomp.c:
12509         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12510         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12511         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12512         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12513         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12514         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12515         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12516         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12517         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12518         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12519         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12520         (build_charclass, build_charclass_op, fetch_number, create_tree):
12521         (create_token_tree, mark_opt_subexp, duplicate_tree):
12522         Use prototypes rather than old-style definitions.
12523
12524         * lib/regex_internal.c:
12525         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12526         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12527         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12528         (re_string_reconstruct, re_string_peek_byte_case):
12529         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12530         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12531         (re_node_set_init_copy, re_node_set_add_intersect):
12532         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12533         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12534         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12535         (re_acquire_state, re_acquire_state_context, register_state):
12536         (create_ci_newstate, create_cd_newstate, free_state):
12537         Likewise.
12538         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12539         re_search_2):
12540         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12541         (re_search_internal, prune_impossible_nodes):
12542         (acquire_init_state_context, check_matching, static):
12543         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12544         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12545         (update_regs, sift_states_backward, build_sifted_states):
12546         (clean_state_log_if_needed, merge_state_array):
12547         (update_cur_sifted_state, add_epsilon_src_nodes):
12548         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12549         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12550         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12551         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12552         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12553         (check_arrival, check_arrival_add_next_nodes):
12554         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12555         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12556         (check_node_accept_bytes, check_node_accept, extend_buffers):
12557         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12558         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12559         (sift_ctx_init):
12560         Likewise.
12561
12562         * lib/regex_internal.h:
12563         (re_string_allocate, re_string_construct, re_string_reconstruct):
12564         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12565         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12566         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12567         (re_string_context_at, re_string_peek_byte_case):
12568         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12569         is defined, since we now use prototypes always.
12570
12571         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12572         C89 or better.  All uses removed.
12573
12574 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12575
12576         * config/srclist.txt: Add glibc bugs 1220-1227.
12577
12578 2005-08-20  Jim Meyering  <jim@meyering.net>
12579
12580         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12581         of unused local, dfa.
12582
12583 2005-08-20  Bruno Haible  <bruno@clisp.org>
12584
12585         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12586
12587 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12588
12589         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12590         (re_node_set_insert_last, re_dfa_add_node):
12591         Rename local variables to avoid GCC shadowing warnings.
12592
12593 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12594
12595         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12596         [defined lint]: Suppress bogus uninitialized-variable warnings.
12597
12598         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12599         and let the caller return REG_ESPACE if out of space.  This
12600         removes an uninitialied-variable warning with GCC 4.0.1, and also
12601         avoids taking the address of a local variable.  All callers
12602         changed.
12603
12604 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12605
12606         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12607         $LIBCSRC/posix/regexec.c.
12608         Add glibc bug 1217 for regcomp.c.
12609
12610 2005-08-19  Jim Meyering  <jim@meyering.net>
12611
12612         * lib/regexec.c (proceed_next_node): Redo local variables to
12613         avoid GCC shadowing warnings.
12614
12615 2005-08-18  Bruno Haible  <bruno@clisp.org>
12616
12617         * lib/strstr.c (strstr): Fix return value in multibyte case.
12618         * lib/strcasestr.c (strcasestr): Likewise.
12619
12620 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12621
12622         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12623
12624 2005-08-17  Jim Meyering  <jim@meyering.net>
12625
12626         Make the %s format (seconds since the epoch) work for a negative
12627         number and when used with a zero-padded field width, e.g. %015s.
12628
12629         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12630         label so that it precedes the code to set `digits'.  Otherwise,
12631         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12632         print `00-22'.  Now, it prints `-0022', as it should.
12633
12634 2005-08-17  Bruno Haible  <bruno@clisp.org>
12635
12636         * modules/strstr (Files): Add m4/mbrtowc.m4.
12637         (Depends-on): Add mbuiter.
12638
12639 2005-08-17  Bruno Haible  <bruno@clisp.org>
12640
12641         * modules/strcasestr: New file.
12642         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12643         strcasestr.
12644
12645 2005-08-17  Bruno Haible  <bruno@clisp.org>
12646
12647         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12648
12649 2005-08-17  Bruno Haible  <bruno@clisp.org>
12650
12651         * modules/mbuiter: New file.
12652         * MODULES.html.sh (Extended multibyte and wide character utilities):
12653         Add mbuiter.
12654
12655 2005-08-17  Bruno Haible  <bruno@clisp.org>
12656
12657         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12658         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12659
12660 2005-08-17  Bruno Haible  <bruno@clisp.org>
12661
12662         * m4/strcasestr.m4: New file.
12663
12664 2005-08-17  Bruno Haible  <bruno@clisp.org>
12665
12666         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12667         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12668
12669 2005-08-17  Bruno Haible  <bruno@clisp.org>
12670
12671         * lib/strcasestr.h: New file.
12672         * lib/strcasestr.c: New file.
12673
12674 2005-08-17  Bruno Haible  <bruno@clisp.org>
12675
12676         * lib/strcasecmp.c: Use mbuiter.h.
12677
12678 2005-08-17  Bruno Haible  <bruno@clisp.org>
12679
12680         * lib/mbuiter.h: New file.
12681
12682 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12683
12684         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12685         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12686         and gl_GETOPT are both invoked via different paths (as happens
12687         with GNU tar CVS because it uses both argp and getopt), the former
12688         wins.
12689
12690 2005-08-16  Bruno Haible  <bruno@clisp.org>
12691
12692         * modules/tls: New file.
12693         * MODULES.html.sh (Multithreading): Add tls.
12694
12695 2005-08-16  Bruno Haible  <bruno@clisp.org>
12696
12697         * modules/strnlen1: New file.
12698         * MODULES.html.sh (String handling): Add strnlen1.
12699
12700 2005-08-16  Bruno Haible  <bruno@clisp.org>
12701
12702         * modules/strcase (Files): Add m4/mbrtowc.m4.
12703         (Depends-on): Add strnlen1, mbchar.
12704
12705 2005-08-16  Bruno Haible  <bruno@clisp.org>
12706
12707         * modules/mbiter: New file.
12708         * MODULES.html.sh (Extended multibyte and wide character utilities):
12709         Add mbiter.
12710
12711 2005-08-16  Bruno Haible  <bruno@clisp.org>
12712
12713         * modules/mbfile: New file.
12714         * MODULES.html.sh (Extended multibyte and wide character utilities):
12715         Add mbfile.
12716
12717 2005-08-16  Bruno Haible  <bruno@clisp.org>
12718
12719         * modules/mbchar: New file.
12720         * MODULES.html.sh (Extended multibyte and wide character utilities):
12721         New section.
12722
12723 2005-08-16  Bruno Haible  <bruno@clisp.org>
12724
12725         * m4/tls.m4: New file, from GNU gettext.
12726
12727 2005-08-16  Bruno Haible  <bruno@clisp.org>
12728
12729         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12730         always.
12731         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12732
12733 2005-08-16  Bruno Haible  <bruno@clisp.org>
12734
12735         * m4/mbiter.m4: New file.
12736
12737 2005-08-16  Bruno Haible  <bruno@clisp.org>
12738
12739         * m4/mbfile.m4: New file.
12740
12741 2005-08-16  Bruno Haible  <bruno@clisp.org>
12742
12743         * m4/mbchar.m4: New file.
12744
12745 2005-08-16  Bruno Haible  <bruno@clisp.org>
12746
12747         * lib/tls.h: New file, from GNU gettext.
12748         * lib/tls.c: New file, from GNU gettext.
12749
12750 2005-08-16  Bruno Haible  <bruno@clisp.org>
12751
12752         * lib/strnlen1.h: New file.
12753         * lib/strnlen1.c: New file.
12754
12755 2005-08-16  Bruno Haible  <bruno@clisp.org>
12756
12757         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12758         (mbi_init): Update.
12759         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12760         NUL byte, not after it.
12761
12762 2005-08-16  Bruno Haible  <bruno@clisp.org>
12763
12764         * lib/strcase.h (strcasecmp): Add note in comments.
12765         * lib/strncasecmp.c: Use code from strcasecmp.c.
12766         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12767         (strcasecmp): Work correctly in multibyte locales.
12768
12769 2005-08-16  Bruno Haible  <bruno@clisp.org>
12770
12771         * lib/mbiter.h: New file.
12772
12773 2005-08-16  Bruno Haible  <bruno@clisp.org>
12774
12775         * lib/mbfile.h: New file.
12776
12777 2005-08-16  Bruno Haible  <bruno@clisp.org>
12778
12779         * lib/mbchar.h: New file.
12780         * lib/mbchar.c: New file.
12781
12782 2005-08-16  Bruno Haible  <bruno@clisp.org>
12783
12784         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12785         the valid ones. Makes the comparison operations transitive:
12786         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12787         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12788
12789 2005-08-15  Simon Josefsson  <jas@extundo.com>
12790
12791         * modules/ssize_t (License): Change to 'unlimited'.
12792
12793         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12794
12795 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12796
12797         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12798         Add comments for each pending glibc patch.
12799
12800 2005-08-15  Bruno Haible  <bruno@clisp.org>
12801
12802         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12803         __cplusplus is defined.
12804
12805 2005-08-14  Jim Meyering  <jim@meyering.net>
12806
12807         Sync from coreutils.
12808
12809         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12810         Use the hash-table-based cycle-detection code not just when
12811         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12812         Reported by James Youngman in
12813         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12814         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12815         FTS_TIGHT_CYCLE_CHECK.
12816         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12817         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12818         once again.
12819         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12820         * lib/fts.c (fd_safer): Remove decl.
12821         Include fcntl--.h rather than unistd-safer.h
12822         (fts_safe_changedir): Don't call fd_safer; no longer needed
12823         now that we include fcntl--.h.
12824
12825 2005-08-12  Simon Josefsson  <jas@extundo.com>
12826
12827         * modules/getndelim2: Use ssize_t module.
12828         * modules/getnline: Likewise.
12829         * modules/safe-read: Likewise.
12830         * modules/xreadlink: Likewise.
12831
12832         * modules/ssize_t: New file.
12833
12834 2005-08-12  Simon Josefsson  <jas@extundo.com>
12835
12836         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12837
12838 2005-08-12  Simon Josefsson  <jas@extundo.com>
12839
12840         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12841         ssize_t.
12842
12843 2005-08-12  Simon Josefsson  <jas@extundo.com>
12844
12845         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12846         readline, getdelim and check_version.
12847         (Support for systems lacking ISO C 99: Sizes of integer types):
12848         Add size_max.
12849
12850 2005-08-12  Bruno Haible  <bruno@clisp.org>
12851
12852         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12853
12854 2005-08-11  Simon Josefsson  <jas@extundo.com>
12855
12856         * modules/readline: New file.
12857
12858         * modules/strnlen (Files): Add strnlen.h.
12859
12860 2005-08-11  Simon Josefsson  <jas@extundo.com>
12861
12862         * m4/readline.m4: New file.
12863
12864 2005-08-11  Simon Josefsson  <jas@extundo.com>
12865
12866         * lib/readline.h, readline.c: New file.
12867
12868 2005-08-11  Simon Josefsson  <jas@extundo.com>
12869
12870         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12871         gl_AVOID.
12872
12873 2005-08-11  Bruno Haible  <bruno@clisp.org>
12874
12875         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12876
12877 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12878
12879         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12880
12881 2005-08-10  Simon Josefsson  <jas@extundo.com>
12882
12883         * tests/test-iconvme.c: New file.
12884
12885 2005-08-10  Simon Josefsson  <jas@extundo.com>
12886
12887         * m4/strnlen.m4: New file.
12888
12889         * m4/strndup.m4: Don't check for strnlen declaration, done in
12890         strnlen.m4.
12891
12892 2005-08-10  Simon Josefsson  <jas@extundo.com>
12893
12894         * lib/strndup.c: Use strnlen.h.
12895
12896         * lib/strnlen.h: New file.
12897
12898 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12899
12900         * README: Typos.
12901
12902 2005-08-02  Simon Josefsson  <jas@extundo.com>
12903
12904         * modules/readline: New file.
12905
12906 2005-08-02  Simon Josefsson  <jas@extundo.com>
12907
12908         * modules/getdelim: New file.
12909
12910         * modules/getline: Rewrite, don't use getndelim2.
12911
12912 2005-08-02  Simon Josefsson  <jas@extundo.com>
12913
12914         * m4/getline.m4: Separate out getdelim stuff into separate module.
12915
12916         * m4/getdelim.m4: New file.
12917
12918 2005-08-02  Simon Josefsson  <jas@extundo.com>
12919
12920         * lib/getline.h, getline.c: Rewrite.
12921
12922         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12923
12924 2005-07-31  Bruno Haible  <bruno@clisp.org>
12925
12926         * lib/lock.h (gl_lock_initializer): New macro.
12927         (gl_lock_define_initialized): Use it.
12928         (gl_rwlock_initializer): New macro.
12929         (gl_rwlock_define_initialized): Use it.
12930         (gl_recursive_lock_initializer): New macro.
12931         (gl_recursive_lock_define_initialized): Use it.
12932
12933 2005-07-30  Karl Berry  <karl@gnu.org>
12934
12935         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12936         Report from Ben Pfaff, regarding getopt.
12937
12938 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12939
12940         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12941         normal way.
12942         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12943         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12944         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12945         (gl_GETOPT): Use the new macros.  Most of the implementation
12946         is moved to the new macros.  This is for programs like Emacs
12947         that don't want all the functionality of gl_GETOPT.
12948
12949 2005-07-26  Bruno Haible  <bruno@clisp.org>
12950
12951         * m4/lock.m4: Update from GNU gettext.
12952
12953 2005-07-26  Bruno Haible  <bruno@clisp.org>
12954
12955         * lib/lock.h: Update from GNU gettext.
12956         * lib/lock.c: Update from GNU gettext.
12957
12958 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12959
12960         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12961         obsolescent AC_TRY_RUN.  Include the default includes files, for
12962         'exit'.
12963
12964 2005-07-24  Bruno Haible  <bruno@clisp.org>
12965
12966         * modules/visibility: New file.
12967         * MODULES.html.sh (Misc): Add visibility.
12968
12969 2005-07-24  Bruno Haible  <bruno@clisp.org>
12970
12971         * m4/visibility.m4: New file.
12972
12973 2005-07-24  Bruno Haible  <bruno@clisp.org>
12974
12975         * doc/visibility.texi: New file.
12976
12977 2005-07-22  Bruno Haible  <bruno@clisp.org>
12978
12979         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12980         $(ALLOCA_H), redundant through BUILT_SOURCES.
12981         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12982         redundant through BUILT_SOURCES.
12983         * modules/byteswap (Makefile.am): Remove explicit dependency on
12984         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12985         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12986         $(FNMATCH_H), redundant through BUILT_SOURCES.
12987         * modules/getopt (Makefile.am): Remove explicit dependency on
12988         $(GETOPT_H), redundant through BUILT_SOURCES.
12989         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12990         redundant through BUILT_SOURCES.
12991         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12992         redundant through BUILT_SOURCES.
12993         * modules/stdbool (Makefile.am): Remove explicit dependency on
12994         $(STDBOOL_H), redundant through BUILT_SOURCES.
12995         * modules/stdint (Makefile.am): Remove explicit dependency on
12996         $(STDINT_H), redundant through BUILT_SOURCES.
12997         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12998         Remove explicit dependency on $(SYSEXITS_H).
12999         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
13000
13001 2005-07-18  Simon Josefsson  <jas@extundo.com>
13002
13003         * lib/check-version.c (check_version): Accept identical versions too.
13004
13005 2005-07-18  Bruno Haible  <bruno@clisp.org>
13006
13007         * modules/lock: New file.
13008         * MODULES.html.sh (Multithreading): New section.
13009
13010 2005-07-18  Bruno Haible  <bruno@clisp.org>
13011
13012         * m4/lock.m4: New file, from GNU gettext.
13013
13014 2005-07-18  Bruno Haible  <bruno@clisp.org>
13015
13016         * lib/lock.h: New file, from GNU gettext.
13017         * lib/lock.c: New file, from GNU gettext.
13018
13019 2005-07-18  Bruno Haible  <bruno@clisp.org>
13020
13021         * lib/lock.h (gl_once_t): New type.
13022         (gl_once_define, gl_once): New macros.
13023         * lib/lock.c (fresh_once): New variable.
13024         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13025         functions.
13026
13027 2005-07-16  Simon Josefsson  <jas@extundo.com>
13028
13029         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13030         workaround, suggested by Bruno.
13031
13032 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13033
13034         * modules/xalloc (Depends-on): Add xalloc-die.
13035         * modules/xvasprintf (Depends-on): Add xalloc-die.
13036
13037 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13038
13039         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13040         with a minor change.
13041
13042 2005-07-15  Bruno Haible  <bruno@clisp.org>
13043
13044         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13045         When using lib/poll.c, define poll as rpl_poll.
13046
13047 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13048
13049         * modules/argp (Depends-on): Remove unlocked-io.
13050
13051 2005-07-14  Derek Price  <derek@ximbiot.com>
13052
13053         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13054         for glob symlink bug.
13055
13056 2005-07-14  Bruno Haible  <bruno@clisp.org>
13057
13058         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13059         Instead, test for *_unlocked function declarations directly.
13060
13061 2005-07-11  Simon Josefsson  <jas@extundo.com>
13062
13063         * modules/size_max: New file.
13064
13065         * modules/xsize: Depend on size_max module for size_max.m4.
13066
13067 2005-07-11  Simon Josefsson  <jas@extundo.com>
13068
13069         * lib/size_max.h: New file.
13070
13071 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13072
13073         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13074         copyright symbol and the year.
13075         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13076         (version_etc_va): Use parameterized copyright notice.
13077         Reword to conform to the current GNU coding standards.
13078
13079 2005-07-11  Karl Berry  <karl@gnu.org>
13080
13081         * doc/gnulib.texi (Quoting): new node.
13082         (Initial import): more info, from Patrice.
13083
13084 2005-07-11  Bruno Haible  <bruno@clisp.org>
13085
13086         * gnulib-tool (func_usage): Document option --avoid.
13087         (Command line options): Handle --avoid.
13088         (func_acceptable): New function.
13089         (func_modules_transitive_closure): Use it.
13090
13091 2005-07-11  Bruno Haible  <bruno@clisp.org>
13092
13093         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13094         Reported by Jim Meyering.
13095
13096 2005-07-10  Bruno Haible  <bruno@clisp.org>
13097
13098         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13099         Needed when size_t is smaller than 'unsigned int'.
13100         Reported by Paul Eggert.
13101
13102 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13103
13104         * modules/argp (Depends-on): Add unlocked-io
13105
13106 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13107
13108         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13109         block of defines.
13110
13111 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13112
13113         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13114         fix now.
13115
13116 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13117         and Paul Eggert  <eggert@cs.ucla.edu>
13118
13119         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13120         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13121
13122 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13123
13124         * modules/regex (Files): Add lib/regex_internal.c,
13125         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13126         (Depends-on): Add extensions.
13127         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13128
13129 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13130
13131         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13132         pathconf.
13133         * m4/same.m4 (gl_SAME): Likewise.
13134         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13135
13136         * m4/regex.m4: Adjust to new libc regex implementation.
13137         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13138         all the .c and .h parts of (the new) regex.
13139         Quote the m4 stuff better.
13140         Check for RE_ICASE bug of old gnulib.
13141         Check for REG_STARTEND of recent libc.
13142         Rename local variables from jm_* to gl_*.
13143         Quote operand of "test -f".
13144         Say "recent enough" version of libc, not "version 2".
13145         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13146         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13147         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13148         Remove check for btowc, isascii.
13149         Require AM_LANGINFO_CODESET.
13150
13151 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13152
13153         * lib/regex.c, regex.h: Sync from libc.
13154         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13155         * lib/regexec.c:
13156         New files, synced from libc, except that regex_internal.h
13157         currently has a small porting fix.
13158
13159 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13160
13161         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13162         regex_internal.c, regexec.c.
13163         Add regex_internal.h too, but as a comment, since the libc version
13164         is currently broken in gnulib mode.
13165
13166 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13167
13168         Support programs like Emacs that use gnulib but not gettext.
13169         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13170         * modules/gettext-h: New file.
13171         * modules/gettext (Files): Remove lib/gettext.h.
13172         (Depends-on): Add gettext-h.
13173         (Makefile.am): Remove lib_SOURCES.
13174         * modules/argmatch, modules/c-stack, modules/closeout:
13175         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13176         * modules/execute, modules/file-type, modules/getaddrinfo:
13177         * modules/getopt, modules/human, modules/javacomp:
13178         * modules/javaexec, modules/mkdir-p, modules/obstack:
13179         * modules/openat, modules/pagealign_alloc, modules/pipe:
13180         * modules/quotearg, modules/regex, modules/rpmatch:
13181         * modules/unicodeio, modules/userspec, modules/version-etc:
13182         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13183         * modules/xsetenv:
13184         Depend on gettext-h, not gettext.
13185
13186 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13187
13188         * gnulib-tool (func_import): Add support for 'public domain' license.
13189         * modules/alloca, modules/atexit, modules/memmove:
13190         Now public domain, not GPL.
13191         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13192         * modules/realloc, modules/strerror, modules/strtod:
13193         Now LGPL, not GPL.
13194
13195 2005-07-05  Bruno Haible  <bruno@clisp.org>
13196
13197         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13198         autoconf CVS. Needed for mingw.
13199
13200 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13201
13202         Remove the dependency of the strftime module on the tzset module.
13203         * modules/strftime (Depends-on): Remove dependency on tzset.
13204
13205 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13206
13207         Remove the dependency of the strftime module on the tzset module.
13208         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13209         gl_FUNC_TZSET_CLOBBER.
13210
13211 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13212
13213         Remove the dependency of the strftime module on the tzset module.
13214         * lib/strftime.c (my_strftime)
13215         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13216         Copy the input structure, to work around some of the bug with
13217         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13218         Solaris releases, you should also use the tzset module, but we won't
13219         require it as a dependency any more since we don't want LGPLed code
13220         to depend on GPLed code.
13221
13222 2005-07-02  Jim Meyering  <jim@meyering.net>
13223
13224         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13225         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13226         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13227         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13228
13229 2005-07-02  Jim Meyering  <jim@meyering.net>
13230
13231         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13232
13233 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13234
13235         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13236         declares only 'struct timespec;' (!).
13237
13238 2005-07-01  Jim Meyering  <jim@meyering.net>
13239
13240         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13241         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13242         * lib/save-cwd.c, tempname.c:
13243         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13244         and don't include <sys/file.h>).
13245
13246 2005-06-29  Jim Meyering  <jim@meyering.net>
13247
13248         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13249         type name.  Use the variable name instead.
13250         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13251         Likewise.
13252
13253 2005-06-28  Simon Josefsson  <jas@extundo.com>
13254
13255         * modules/check-version (Files): Add check-version.m4.
13256
13257 2005-06-28  Simon Josefsson  <jas@extundo.com>
13258
13259         * m4/check-version.m4: New file, suggested by Jim Meyering
13260         <jim@meyering.net>.
13261
13262 2005-06-28  Simon Josefsson  <jas@extundo.com>
13263
13264         * lib/check-version.h, lib/check-version.c: New files.
13265
13266 2005-06-28  Simon Josefsson  <jas@extundo.com>
13267
13268         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13269         collision with global variable.  Better indentation.  Don't
13270         increment buffer pointer beyond buffer end.  Based on comments
13271         from Paul Eggert <eggert@cs.ucla.edu>.
13272
13273         * lib/base64.h: Indent.
13274
13275 2005-06-28  Simon Josefsson  <jas@extundo.com>
13276
13277         * doc/gnulib.texi (Library version handling): New section.
13278
13279 2005-06-28  Jim Meyering  <jim@meyering.net>
13280
13281         * check-module (find_included_lib_files): Hard-code another
13282         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13283         but modules/fts-lgpl (correctly) does not list those files.
13284
13285         * modules/canonicalize (Files): Add lib/pathmax.h.
13286
13287 2005-06-25  Simon Josefsson  <jas@extundo.com>
13288
13289         * modules/check-version: New file.
13290
13291 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13292
13293         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13294         initializer of struct addrinfo, as an indication that we don't
13295         care how many members the structure has.
13296
13297 2005-06-24  Derek Price  <derek@ximbiot.com>
13298         and Bruno Haible  <bruno@clisp.org>
13299
13300         Remove stat module & update lstat.
13301         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13302         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13303         * m4/stat.m4: Remove this file.
13304
13305 2005-06-24  Derek Price  <derek@ximbiot.com>
13306         and Bruno Haible  <bruno@clisp.org>
13307
13308         Remove stat module & update lstat.
13309         * lib/stat.c: Remove this file...
13310         (slash_aware_lstat): ...moving this content and its support...
13311         * lib/lstat.c (rpl_lstat): ...into here.
13312         * lib/lstat.h: New file.
13313
13314 2005-06-24  Derek Price  <derek@ximbiot.com>
13315         and Bruno Haible  <bruno@clisp.org>
13316
13317         Remove stat module & update lstat.
13318         * config/srclist.txt (libc sources): Remove stat.
13319
13320 2005-06-24  Derek Price  <derek@ximbiot.com>
13321         and Bruno Haible  <bruno@clisp.org>
13322
13323         Remove stat module & update lstat.
13324         * MODULES.html.sh (stat): Remove.
13325         * MODULES.html: Regenerated.
13326         * modules/lstat (Description): Correct function name.
13327         (Files): Add "lstat.h".
13328         (Depends-on): Remove stat, add xalloc, stat-macros.
13329         * modules/stat: Remove this file.
13330         (Include): Add "lstat.h", remove <sys/stat.h>.
13331
13332 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13333
13334         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13335         (ranged_convert): Don't save conversion in a temporary struct.
13336         This causes a warning with GCC 4.0.0, and anyway in the typical
13337         case it's not worth the extra 100 bytes or so of code.
13338         (ranged_convert, __mktime_internal): When calling a function via a
13339         pointer P, use P () rather than (*P) (), as we now assume C89 or
13340         better.
13341
13342 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13343
13344         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13345         "who -r" failed to give output.  Problem reported by Tim Waugh.
13346
13347         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13348         (xcalloc): Use it to avoid needless tests.
13349         Problem reported by Jim Meyering.
13350
13351 2005-06-20  Derek Price  <derek@ximbiot.com>
13352
13353         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13354         unnecessary for Autoconfs > 2.59c.
13355
13356 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13357
13358         * lib/argp.h (__option_is_short): Check upper limit of
13359         __key. Isprint() requires its argument to have the value
13360         of an unsigned char or EOF.
13361
13362 2005-06-16  Jim Meyering  <jim@meyering.net>
13363
13364         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13365         when either N or S is zero.
13366
13367 2005-06-16  Derek Price  <derek@ximbiot.com>
13368
13369         * m4/bison.m4: Declare YACC & YFLAGS precious.
13370
13371 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13372
13373         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13374         multibyte string or pattern, fall back on unibyte matching.
13375         Problem reported by James Youngman.
13376
13377 2005-06-08  Bruno Haible  <bruno@clisp.org>
13378
13379         * modules/csharpcomp: New file.
13380         * MODULES.html.sh (C#): Add csharpcomp.
13381
13382 2005-06-08  Bruno Haible  <bruno@clisp.org>
13383
13384         * m4/csharpcomp.m4: New file, from GNU gettext.
13385
13386 2005-06-08  Bruno Haible  <bruno@clisp.org>
13387
13388         * lib/csharpcomp.h: New file, from GNU gettext.
13389         * lib/csharpcomp.c: New file, from GNU gettext.
13390         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13391
13392 2005-06-08  Bruno Haible  <bruno@clisp.org>
13393
13394         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13395         warning on mingw.
13396
13397 2005-06-07  Derek Price  <derek@ximbiot.com>
13398
13399         Sync from CVS.
13400         * lib/glob_.h: Indent nested #ifdef.
13401
13402 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13403
13404         Sync from coreutils.
13405         Use "file name" when talking about file names, instead of "filename"
13406         or "path", as per the GNU coding standards.
13407         * lib/mkdir-p.c: Renamed from makepath.c.
13408         (make_dir_parents): Renamed from make_path.  All callers changed.
13409         * lib/mkdir-p.h: Likewise.  All includers changed.
13410         * lib/filenamecat.c: Renamed from path-concat.c.
13411         (file_name_concat): Renamed from path_concat.  All callers changed.
13412         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13413         * lib/filenamecat.h: Likewise.  All includers changed.
13414         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13415         in comments or local variable names.
13416         * lib/basename.c: Likewise.
13417         * lib/canonicalize.c, canonicalize.h: Likewise.
13418         * lib/dirname.c, dirname.h: Likewise.
13419         * lib/euidaccess.c: Likewise.
13420         * lib/exclude.c: Likewise
13421         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13422         * lib/fsusage.c, fsuage.h: Likewise.
13423         * lib/fts.c, fts_.h: Likewise.
13424         * lib/getcwd.c: Likewise.
13425         * lib/getloadavg.c: Likewise.
13426         * lib/mkstemp.c: Likewise.
13427         * lib/mountlist.c, mountlist.h: Likewise.
13428         * lib/openat.c, openat.h: Likewise.
13429         * lib/readlink-stub.c: Likewise.
13430         * lib/readutmp.c, readutmp.h: Likewise.
13431         * lib/rename.c: Likewise.
13432         * lib/rmdir.c: Likewise.
13433         * lib/same.c: Likewise.
13434         * lib/savedir.c: Likewise.
13435         * lib/stripslash.c: Likewise.
13436         * lib/tempname.c: Likewise.
13437         * lib/xreadlink.c: Likewise.
13438         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13439         All uses changed.
13440         * lib/exclude.h: Likewise.
13441
13442         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13443         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13444         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13445         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13446         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13447         files have been getting away with it for years (MORE/BSD 4.3
13448         is extinct now).
13449         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13450         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13451
13452         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13453         Define to 256, not 255, as per modern POSIX.
13454
13455 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13456
13457         Sync from coreutils.
13458         Use "file name" when talking about file names, instead of "filename"
13459         or "path", as per the GNU coding standards.
13460         * MODULES.html.sh: mkdir-p renamed from makepath.
13461         filenamecat renamed from path-concat.
13462         * modules/filenamecat: Renamed from modules/path-concat.
13463         (Files): filenamecat.h and filenamecat.c renamed from
13464         path-concat.h and path-concat.c.
13465         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13466         (Include): filenamecat.h, not path-concat.h.
13467         * modules/mkdir-p: Renamed from modules/makepath.
13468         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13469         makepath.c.
13470         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13471         (Include): mkdir-p.h, not makepath.h.
13472
13473 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13474
13475         Sync from coreutils.
13476         * m4/mkdir-p.m4: Renamed from makepath.m4.
13477         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13478         Rename files from makepath.c to mkdir-p.c, and from
13479         makepath.h to mkdir-p.h.
13480         * m4/filenamecat.m4: Renamed from path-concat.m4.
13481         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13482         Rename files from path-concat.c to filenamecat.c,
13483         and from path-concat.h to filenamecat.h.
13484         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13485         "file name" in local variables or comments.
13486         * m4/rename.m4: Likewise.
13487
13488 2005-06-01  Bruno Haible  <bruno@clisp.org>
13489
13490         * modules/csharpexec: New file.
13491         * MODULES.html.sh (C#): New section.
13492
13493 2005-06-01  Bruno Haible  <bruno@clisp.org>
13494
13495         * m4/csharp.m4: New file, from GNU gettext.
13496         * m4/csharpexec.m4: New file, from GNU gettext.
13497
13498 2005-06-01  Bruno Haible  <bruno@clisp.org>
13499
13500         * lib/csharpexec.h: New file, from GNU gettext.
13501         * lib/csharpexec.c: New file, from GNU gettext.
13502         * lib/csharpexec.sh.in: New file, from GNU gettext.
13503
13504 2005-05-31  Derek Price  <derek@ximbiot.com>
13505             Paul Eggert  <eggert@cs.ucla.edu>
13506
13507         Sync from cvs.
13508         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13509
13510 2005-05-31  Derek Price  <derek@ximbiot.com>
13511             Paul Eggert  <eggert@cs.ucla.edu>
13512
13513         Sync from cvs.
13514         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13515
13516 2005-05-29  Derek Price  <derek@ximbiot.com>
13517
13518         * config/srclist.txt (glob_.h, glob.c): Add these files.
13519
13520 2005-05-29  Derek Price  <derek@ximbiot.com>
13521
13522         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13523         * modules/glob: New file.
13524         * modules/getlogin_r: Add link to POSIX spec in description.
13525
13526 2005-05-29  Derek Price  <derek@ximbiot.com>
13527             Paul Eggert  <eggert@cs.ucla.edu>
13528
13529         * m4/glob.m4: New file.
13530
13531 2005-05-29  Derek Price  <derek@ximbiot.com>
13532             Paul Eggert  <eggert@cs.ucla.edu>
13533
13534         * lib/glob_.h, lib/glob.c: New files.
13535
13536 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13537
13538         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13539         * modules/fts-lgpl (Depends-on): Remove gettext.
13540
13541 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13542
13543         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13544         and don't require gt_INTTYPES_PRI.
13545
13546 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13547
13548         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13549
13550         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13551         the configuration hassle isn't worth it.
13552         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13553         (LONGEST_MODIFIER, PRIuMAX): Remove.
13554
13555 2005-05-27  Bruno Haible  <bruno@clisp.org>
13556
13557         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13558
13559 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13560
13561         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13562         _POSIX_PTHREAD_SEMANTICS for Solaris.
13563
13564 2005-05-25  Derek Price  <derek@ximbiot.com>
13565
13566         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13567
13568 2005-05-25  Derek Price  <derek@ximbiot.com>
13569             Paul Eggert  <eggert@cs.ucla.edu>
13570
13571         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13572         * lib/getlogin_r.c, getlogin_r.h: New files.
13573
13574 2005-05-25  Bruno Haible  <bruno@clisp.org>
13575             Derek Price  <derek@ximbiot.com>
13576
13577         * lib/getlogin_r.h: Simplify API documentation.
13578
13579 2005-05-23  Derek Price  <derek@ximbiot.com>
13580
13581         * modules/minmax (Files): Add m4/minmax.m4.
13582         (configure.ac): Add gl_MINMAX.
13583
13584 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13585
13586         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13587         so that unistd-safer.h (GPL'ed code) need not be included.
13588
13589 2005-05-22  Bruno Haible  <bruno@clisp.org>
13590
13591         * m4/minmax.m4: New file.
13592         Based on a patch by Derek Price <derek@ximbiot.com>.
13593
13594 2005-05-22  Bruno Haible  <bruno@clisp.org>
13595
13596         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13597         (INT64_MIN): Fix definition.
13598         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13599
13600         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13601         NEED_SIGNED_INT_TYPES.
13602
13603         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13604         HAVE_SYSTEM_INTTYPES.
13605
13606 2005-05-22  Bruno Haible  <bruno@clisp.org>
13607
13608         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13609         Also include <sys/param.h> if it defines MIN, MAX.
13610         Based on a patch by Derek Price <derek@ximbiot.com>.
13611
13612 2005-05-21  Jim Meyering  <jim@meyering.net>
13613
13614         * modules/fts (Files): Add m4/inttypes-pri.m4.
13615         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13616
13617 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13618
13619         New fts module.
13620         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13621         (setup_dir, free_dir): New functions.
13622         (enter_dir, leave_dir): Define trivial
13623         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13624         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13625         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13626         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13627         Move to fts-cycle.c.
13628         (fts_open): Use setup_dir.
13629         (fts_close): Use free_dir.
13630         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13631         This adds a label and some gotos, but the alternatives were messier.
13632         Check for memory allocation failure when entering a dir.
13633         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13634         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13635         (FTS): New member fts_cycle, that is a union that contains the
13636         old active_dir_ht and cycle_state.  All uses changed to mention
13637         fts_cycle.ht and fts_cycle.state.
13638         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13639         fts.c, with the following changes:
13640         (setup_dir, free_dir): New functions.
13641         (enter_dir): Now returns bool.  Return true if successful, false
13642         if memory exhausted.  All callers changed.
13643         Do not bother partly cleaning up on
13644         memory allocation failure; that is free_dir's job.
13645         However, free ad if hash_insert fails, to avoid memory leak.
13646         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13647         fts->fts_options to see which union member to use.
13648
13649 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13650
13651         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13652         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13653
13654 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13655
13656         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13657
13658 2005-05-20  Jim Meyering  <jim@meyering.net>
13659
13660         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13661         Now a macro, to pacify GCC.
13662
13663 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13664
13665         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13666         of -1.
13667
13668 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13669
13670         * lib/chown.c (rpl_chown): Return -1 on failure.
13671
13672 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13673
13674         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13675         Don't check for stddef.h.
13676         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13677         don't use its results.
13678         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13679         since we include them unconditionally.  Don't require
13680         AM_STDBOOL_H, since stdbool is a prerequisite.
13681         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13682         since we assume C89 or better.
13683         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13684         as we don't use their results.
13685         Don't check for fchdir, memmove, memset, strrchr, as we use
13686         them unconditionally.
13687         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13688         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13689
13690 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13691
13692         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13693         Include <stddef.h> unconditionally, since we assume C89 now.
13694         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13695         * lib/fts.c: Include fts_.h first, to check interface.
13696         Do not include intprops.h; no longer needed.
13697         Include cycle-check.h and hash.h, since fts_.h no longer does.
13698         Remove unnecessary casts of closedir to void.
13699         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13700         decide whether to decrement nlinks.
13701         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13702         (FTS): Use struct hash_table * instead of Hash_table, so that
13703         we no longer need to include hash.h here.
13704
13705 2005-05-18  Jim Meyering  <jim@meyering.net>
13706
13707         * modules/dirfd (License): Change to LGPL.  Most of the code
13708         is already in the public domain.
13709
13710 2005-05-18  Jim Meyering  <jim@meyering.net>
13711
13712         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13713         Reported by Yoann Vandoorselaere.
13714
13715 2005-05-17  Jim Meyering  <jim@meyering.net>
13716
13717         * m4/fts.m4: New file, from coreutils.
13718
13719 2005-05-17  Jim Meyering  <jim@meyering.net>
13720
13721         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13722
13723 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13724
13725         Sync from coreutils.
13726         * m4/unlinkdir.m4: New file.
13727
13728 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13729
13730         Sync from coreutils.
13731         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13732         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13733         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13734         White space changes only.
13735         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13736         special.
13737         * lib/yesno.c: Include getline.h, not ctype.h.
13738         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13739         Use getline to remove arbitrary restriction on response length.
13740
13741 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13742
13743         * config/srclist-update: Spell out "Street" in FSF postal
13744         mail address; this is the style the FSF seems to prefer.
13745
13746         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13747         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13748         this updates FSF postal mail address.
13749
13750         Sync from coreutils.
13751         * modules/unlinkdir: New file.
13752         * modules/yesno (Depends-on): Add getline.
13753         * MODULES.html.sh (File system functions): Add unlinkdir.
13754
13755 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13756
13757         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13758         lib/strsep.h:
13759         Change the initial comment to refer to GPL, not LGPL.
13760         gnulib-tool will change it to LGPL as needed.
13761
13762         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13763         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13764         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13765         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13766         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13767         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13768         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13769         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13770         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13771         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13772         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13773         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13774         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13775         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13776         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13777         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13778         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13779         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13780         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13781         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13782         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13783         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13784         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13785         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13786         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13787         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13788         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13789         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13790         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13791         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13792         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13793         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13794         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13795         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13796         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13797         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13798         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13799         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13800         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13801         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13802         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13803         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13804         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13805         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13806         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13807         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13808         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13809         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13810         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13811         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13812         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13813         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13814         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13815         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13816         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13817         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13818         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13819         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13820         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13821         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13822         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13823         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13824         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13825         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13826         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13827         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13828         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13829         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13830         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13831         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13832         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13833         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13834         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13835         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13836         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13837         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13838         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13839         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13840         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13841         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13842         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13843         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13844         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13845         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13846         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13847         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13848         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13849         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13850         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13851         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13852         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13853         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13854         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13855         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13856         lib/yesno.c, lib/yesno.h:
13857         Update FSF postal mail address.
13858
13859 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13860
13861         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13862         tests/test-memmem.c, tests/test-stpncpy.c:
13863         Update FSF postal mail address.
13864
13865 2005-05-13  Bruno Haible  <bruno@clisp.org>
13866
13867         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13868         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13869         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13870         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13871         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13872         Add support for 64-bit integers in the MSVC compiler.
13873
13874 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13875
13876         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13877
13878 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13879
13880         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13881
13882 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13883
13884         * doc/getdate.texi (General date syntax): Don't say that date
13885         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13886         Problem reported by Nic Ferrier.
13887
13888 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13889
13890         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13891         specified in ai_socktype. Fix invalid ai_protocol
13892         check. ai_protocol is usually set to 0 or depending on
13893         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13894         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13895         ai_socktype / ai_protocol in the returned addrinfo structure.
13896
13897 2005-05-10  Simon Josefsson  <jas@extundo.com>
13898
13899         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13900         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13901
13902 2005-05-10  Karl Berry  <karl@gnu.org>
13903
13904         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13905         (from http://www.gnu.org/licenses).
13906         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13907         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13908         fdl.texi suffices.
13909
13910 2005-05-10  Karl Berry  <karl@gnu.org>
13911
13912         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13913         (COPYING.DOC): remove.
13914
13915         * config/srclist-update: new FSF address.
13916
13917 2005-05-10  Derek Price  <derek@ximbiot.com>
13918
13919         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13920         possible.
13921
13922 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13923             Bruno Haible  <bruno@clisp.org>
13924
13925         * modules/inet_ntop: New file.
13926         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13927         inet_ntop.
13928
13929 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13930             Bruno Haible  <bruno@clisp.org>
13931
13932         * m4/inet_ntop.m4: New file.
13933
13934 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13935             Bruno Haible  <bruno@clisp.org>
13936
13937         * lib/inet_ntop.h: New file.
13938         * lib/inet_ntop.c: New file, from glibc with modifications.
13939
13940 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13941
13942         * modules/time_r (License): Change to LGPL.
13943         * modules/extensions (License): Change to LGPL.  Actually,
13944         the license is more permissive than that, but currently gnulib-tool
13945         doesn't know how to handle more-permissive licenses.
13946
13947         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13948         Problem reported by Dave Love.
13949
13950 2005-05-08  Jim Meyering  <jim@meyering.net>
13951
13952         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13953         blank.
13954
13955 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13956
13957         * modules/argmatch (Depends-on): Add stdbool.
13958         * modules/backupfile (Depends-on): Likewise.
13959         * modules/chdir-long (Depends-on): Likewise.
13960         * modules/closeout (Depends-on): Likewise.
13961         * modules/cycle-check (Depends-on): Likewise.
13962         * modules/dirname (Depends-on): Likewise.
13963         * modules/fnmatch (Depends-on): Likewise.
13964         * modules/fsusage (Depends-on): Likewise.
13965         * modules/fwriteerror (Depends-on): Likewise.
13966         * modules/getcwd (Depends-on): Likewise.
13967         * modules/getloadavg (Depends-on): Likewise.
13968         * modules/hard-locale (Depends-on): Likewise.
13969         * modules/makepath (Depends-on): Likewise.
13970         * modules/mountlist (Depends-on): Likewise.
13971         * modules/nanosleep (Depends-on): Likewise.
13972         * modules/posixtm (Depends-on): Likewise.
13973         * modules/quotearg (Depends-on): Likewise.
13974         * modules/readtokens (Depends-on): Likewise.
13975         * modules/readtokens0 (Depends-on): Likewise.
13976         * modules/readutmp (Depends-on): Likewise.
13977         * modules/save-cwd (Depends-on): Likewise.
13978         * modules/strftime (Depends-on): Likewise.
13979         * modules/userspec (Depends-on): Likewise.
13980         * modules/utimecmp (Depends-on): Likewise.
13981         * modules/xgetcwd (Depends-on): Likewise.
13982         * modules/xnanosleep (Depends-on): Likewise.
13983         * modules/xstrtod (Depends-on): Likewise.
13984         * modules/yesno (Depends-on): Likewise.
13985
13986 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13987
13988         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13989         needless checks.
13990
13991 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13992
13993         Merge from coreutils.  Among other things,
13994         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13995         * lib/fd-safer.c: New file.
13996         * lib/fcntl-safer.h, open-safer.c: Remove.
13997         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13998         * lib/dup-safer.c: Include unistd-safer.h first.
13999         Don't include errno.h.
14000         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
14001         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
14002         * lib/file-type.c: Rely on file-type.h change.
14003         * lib/getloadavg.c: Include unistd-safer.h.
14004         (getloadavg): Use safer open.
14005         * lib/getusershell.c: Include "stdio-safer.h".
14006         (getusershell): Use safer fopen.
14007         * lib/long-options.c (long_options): Use NULL rather than 0.
14008         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
14009         'free'.
14010         * lib/modechange.c: Likewise.
14011         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
14012         (MODE_DONE): New constant.
14013         (struct mode_change): Remove 'next' member.
14014         (make_node_op_equals): New function; like the old one of the
14015         same name, except it allocates an array.
14016         (mode_compile, mode_create_from_ref): Use it.
14017         (mode_compile): Allocate result as an array, not a linked list.
14018         Parse octal string ourself, so that we catch mistakes like "+0".
14019         (mode_adjust): Arg is an array, not a linked list.
14020         * lib/modechange.c: Include stat-macros.h, xalloc.h.
14021         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
14022         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
14023         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14024         Remove.  This is now stat-macros.h's job.
14025         (talloc): Remove.  All callers replaced by xalloc, so that
14026         our invokers don't have to worry about reporting memory failures.
14027         (make_node_op_equals): Remove.
14028         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14029         New constants.
14030         (struct mode_change): Moved here from modechange.h.
14031         (mode_append_entry): Remove.
14032         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14033         apps to have incorrect behavior.  Use simpler algorithm for head
14034         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14035         Detect more invalid usages rather than having somewhat-random behavior.
14036         Don't insert an "a=" action, as that leads to incorrect behavior.
14037         (mode_compile, mode_create_from_ref): Return NULL on error instead
14038         of an enum, since now there's only one way to have an error.  All
14039         callers changed.
14040         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14041         at the correct time.  Simplify calculation of "+u" and its ilk.
14042         Don't mishandle "+X".
14043         (mode_free): Remove "register" and localize decls.
14044         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14045         (struct mode_change): Move to modechange.c; callers don't
14046         need to see this stuff.
14047         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14048         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14049         (mode_change, mode_adjust): Reflect the new signatures noted above.
14050         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14051         that might redefine system include files.
14052         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14053         (my_usleep): Use NULL rather than (void *) 0.
14054         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14055         Use siginterrupt to specify that system calls should be interrupted.
14056         (rpl_nanosleep): Move initialization of suspended closer to call of
14057         my_usleep.
14058         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14059         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14060         (desirable_utmp_entry): New function.
14061         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14062         using x2nrealloc, to simplify logic.
14063         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14064         size calculation.  Do not assume utmp file is a regular file.
14065         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14066         (READ_UTMP_CHECK_PIDS): New constant.
14067         * lib/save-cwd.c: Include unistd-safer.h.
14068         (save_cwd): Use fd_safer.
14069         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14070         [!_LIBC] Include "stat-macros.h" instead.
14071         * lib/unistd-safer.h (fd_safer): New decl.
14072
14073 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14074
14075         * modules/getloadavg (Depends-on): Add unistd-safer.
14076         * modules/getusershell (Depends-on): Add stdio-safer.
14077         * modules/lstat (Depends-on): Remove xalloc.
14078         * modules/mkstemp (Depends-on): Add stat-macros.
14079         * modules/modechange (Depends-on): Remove xstrtol.
14080         Add stat-macros, xalloc.
14081         * modules/save-cwd (Depends-on): Add unistd-safer.
14082         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14083         * modules/unistd-safer (Files): Add lib/fd-safer.c
14084         (Makefile.am): Remove lib_SOURCES.
14085
14086         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14087         Remove fcntl-safer; unistd-safer supersedes it.
14088
14089 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14090
14091         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14092         AC_HEADER_STAT.
14093         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14094         (gl_PREREQ_CHOWN): Remove.
14095         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14096         it.  Don't require AC_HEADER_STAT.
14097         (gl_PREREQ_LSTAT): Remove.
14098         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14099         Don't require AC_HEADER_STAT.
14100         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14101         (gl_PREREQ_RMDIR): Remove.
14102         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14103         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14104         the stat-macros module a prerequisite.
14105         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14106         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14107         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14108         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14109         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14110         variable names.
14111         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14112         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14113         variable prefixes.
14114         * m4/fcntl-safer.m4: Remove.
14115         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14116         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14117         Invoke gl_PREREQ_FD_SAFER.
14118         (gl_PREREQ_FD_SAFER): New macro.
14119         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14120         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14121         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14122         Remove duplicate call to AC_LIBOBJ(readutmp).
14123         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14124
14125         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14126         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14127
14128 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14129
14130         * MODULES.html.sh (Misc): Add byteswap.
14131
14132 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14133
14134         * modules/getcwd (Depends-on): Add extensions.
14135         * modules/openat (Depends-on): Likewise.
14136
14137 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14138
14139         * modules/byteswap: New file.
14140
14141 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14142
14143         * m4/byteswap.m4: New file.
14144
14145 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14146
14147         * lib/byteswap_.h: New file.
14148
14149 2005-04-25  Karl Berry  <karl@gnu.org>
14150
14151         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14152
14153 2005-04-25  Albert Chin  <china@thewrittenword.com>
14154
14155         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14156         Toolkit C bug.
14157
14158 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14159
14160         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14161         (func_ln_if_changed) Remove forcibly for no error message
14162         in case file does not exist.
14163
14164 2005-04-19  Simon Josefsson  <jas@extundo.com>
14165
14166         * gnulib-tool (Options): Make --symlink mean --symbolic.
14167
14168 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14169
14170         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14171
14172 2005-04-16  Simon Josefsson  <jas@extundo.com>
14173
14174         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14175
14176 2005-04-15  Simon Josefsson  <jas@extundo.com>
14177
14178         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14179
14180 2005-04-15  Simon Josefsson  <jas@extundo.com>
14181
14182         * gnulib-tool: Rename --symlink to --symbolic.
14183
14184 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14185
14186         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14187         symbolic links to files instead of copying/moving.  Add --aux-dir,
14188         specifying directory relative --dir where auxiliary build tools
14189         are placed.
14190
14191 2005-04-14  Bruno Haible  <bruno@clisp.org>
14192
14193         * modules/allocsa (License): Change to LGPL.
14194         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14195
14196 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14197
14198         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14199         that "UTC +1 second" continues to work.  Problem reported
14200         by Dmitry V. Levin.
14201         (relunit_snumber): New rule.
14202         (relunit): Use it.
14203
14204 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14205
14206         * lib/getdate.y (universal_time_zone_table): New constant.
14207         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14208         universal_time_zone_table.
14209         (lookup_zone): Prefer universal_time_zone_table to
14210         local_time_zone_table, so that "GMT" time stamps are allowed in
14211         London during the summer.  Problem reported by Ian Abbott.
14212
14213 2005-04-12  Jim Meyering  <jim@meyering.net>
14214
14215         * lib/human.c (humblock): Set *options even when returning due to
14216         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14217         warning from gcc-4.
14218
14219 2005-04-09  Jim Meyering  <jim@meyering.net>
14220
14221         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14222         -Wuninitialized: initialize tm0.tm_year.
14223
14224 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14225
14226         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14227         count, since there's no maximum.  All uses changed.
14228         Add member dsts_seen.
14229         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14230         not being INT_MAX.
14231         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14232         Use pc_rels_seen to decide whther a date is absolute.
14233
14234         * lib/getdate.y (number): Don't overwrite year.
14235         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14236         check.
14237
14238 2005-04-02  Simon Josefsson  <jas@extundo.com>
14239
14240         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14241         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14242
14243 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14244
14245         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14246         where no absolute path name can be longer than PATH_MAX.
14247
14248 2005-03-27  Jim Meyering  <jim@meyering.net>
14249
14250         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14251
14252 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14253
14254         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14255         "one's complement" -> "ones' complement" in comment, as per Knuth.
14256         "value of type" -> "type or expression" in comment.
14257         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14258
14259 2005-03-26  Jim Meyering  <jim@meyering.net>
14260
14261         Comment nits.
14262         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14263         Correct typos: s/or/of/.
14264
14265 2005-03-26  Jim Meyering  <jim@meyering.net>
14266
14267         * modules/check-include-files: Move to ../ and rename to...
14268         * check-module: ...this.
14269
14270 2005-03-25  Jim Meyering  <jim@meyering.net>
14271
14272         * modules/xvasprintf (Files): Add xalloc.h.
14273
14274 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14275
14276         * modules/gettext (Files): config/config.rpath ->
14277         build-aux/config.rpath
14278         * modules/iconv (Files): Likewise.
14279         Problem reported by Oskar Liljeblad.
14280
14281 2005-03-23  Jim Meyering  <jim@meyering.net>
14282
14283         * modules/check-include-files: New script to check for
14284         missing dependencies, multiple includes, etc.
14285
14286         * modules/c-strtold (Depends-on): Add xalloc.
14287         * modules/c-strtod (Depends-on): Add xalloc.
14288         * modules/hash (Depends-on): Add xalloc.
14289         (Files): Remove lib/xalloc.h.
14290
14291         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14292         * modules/userspec (Files): Add lib/inttostr.h.
14293
14294 2005-03-23  Jim Meyering  <jim@meyering.net>
14295
14296         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14297
14298 2005-03-22  Jim Meyering  <jim@meyering.net>
14299
14300         * modules/stat-macros: New module.
14301         * modules/canonicalize, modules/euidaccess, modules/file-type,
14302         * modules/filemode, modules/lchown, modules/makepath,
14303         * modules/rmdir, modules/stat: Depend on new stat-macros module
14304         rather than listing lib/stat-macros.h manually.
14305         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14306
14307 2005-03-22  Jim Meyering  <jim@meyering.net>
14308
14309         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14310
14311 2005-03-22  Bruno Haible  <bruno@clisp.org>
14312
14313         * config/srclist.txt: Replace target directory 'config' with
14314         'build-aux'.
14315         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14316         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14317         ../build-aux/.
14318
14319 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14320
14321         * modules/chdir-long (Depends-on): Add mempcpy.
14322
14323         * modules/acl, modules/backupfile, modules/c-strtod,
14324         modules/c-strtold, modules/canon-host, modules/canonicalize,
14325         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14326         modules/exclude, modules/exitfail, modules/file-type,
14327         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14328         modules/getdate, modules/getline, modules/getpagesize,
14329         modules/getpass, modules/getugroups, modules/group-member,
14330         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14331         modules/inttostr, modules/long-options, modules/makepath,
14332         modules/md5, modules/memcasecmp, modules/memcoll,
14333         modules/modechange, modules/mountlist, modules/path-concat,
14334         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14335         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14336         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14337         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14338         modules/strftime, modules/strndup, modules/strverscmp,
14339         modules/timespec, modules/unlocked-io, modules/userspec,
14340         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14341         modules/yesno:
14342         Remove lib_SOURCES line from Makefile.am section, as this is now
14343         done automatically by the corresponding Autoconf macro.
14344
14345 2005-03-21  Jim Meyering  <jim@meyering.net>
14346
14347         Changes imported from coreutils.
14348
14349         * lib/cycle-check.c: Don't include xalloc.h.
14350
14351         * lib/path-concat.c: Don't include assert.h.
14352         (path_concat): Remove assertion that would have triggered
14353         for ABASE starting with more than one slash.
14354         Reported by Andreas Schwab.
14355
14356         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14357         properly when ABASE is an absolute file name.
14358         Correct the description of this function.
14359         Include <assert.h>.
14360         Add an assertion and a test driver.
14361         This fixes a bug introduced on 2004-07-02.
14362         Andreas Schwab reported the resulting failure of cp --parents:
14363         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14364
14365 2005-03-21  Jim Meyering  <jim@meyering.net>
14366
14367         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14368         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14369
14370 2005-03-21  Jim Meyering  <jim@meyering.net>
14371         and  Paul Eggert  <eggert@cs.ucla.edu>
14372
14373         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14374         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14375         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14376         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14377         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14378         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14379         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14380         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14381         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14382         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14383         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14384         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14385         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14386         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14387         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14388         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14389         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14390         for these modules.
14391
14392 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14393
14394         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14395         (which shouldn't happen), generate nothing instead of returning 0
14396         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14397
14398 2005-03-16  Bruno Haible  <bruno@clisp.org>
14399
14400         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14401         HAVE_LONGLONG_64BIT.
14402
14403 2005-03-16  Bruno Haible  <bruno@clisp.org>
14404
14405         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14406         HAVE_LONGLONG_64BIT.
14407
14408 2005-03-16  Bruno Haible  <bruno@clisp.org>
14409
14410         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14411         HAVE_LONGLONG_64BIT.
14412
14413 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14414
14415         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14416         reliably distinguish strftime failure from empty output on POSIX
14417         hosts.
14418
14419 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14420
14421         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14422         (iconv_string): Don't guess a size-zero buffer, as that might cause
14423         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14424         result would be 'too large', where 'too large' is (heuristically)
14425         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14426         overflow concerns.  This will prevent some unwanted malloc failures
14427         when the inputs are very large.
14428
14429 2005-03-15  Karl Berry  <karl@gnu.org>
14430
14431         * config/srclist.txt (config.rpath): from gettext.
14432         * config/config.rpath: update.
14433
14434 2005-03-15  Bruno Haible  <bruno@clisp.org>
14435
14436         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14437         to 'negate'.
14438
14439         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14440         variable.
14441
14442         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14443         results.
14444
14445 2005-03-14  Simon Josefsson  <jas@extundo.com>
14446
14447         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14448         <fx@gnu.org>.
14449
14450 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14451
14452         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14453         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14454         intprops.h.
14455         * lib/strtol.c: Likewise.
14456
14457 2005-03-14  Jim Meyering  <jim@meyering.net>
14458
14459         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14460         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14461         to be nonzero so that we (and caller) can detect the difference
14462         between a valid zero-length expansion and an error return, even
14463         when the underlying strftime fails before writing anything into
14464         that location.
14465
14466 2005-03-14  Bruno Haible  <bruno@clisp.org>
14467
14468         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14469         Update from GNU gettext 0.14.3.
14470
14471 2005-03-10  Jim Meyering  <jim@meyering.net>
14472
14473         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14474
14475 2005-03-10  Jim Meyering  <jim@meyering.net>
14476
14477         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14478         so that this module works on systems without fchdir.
14479
14480 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14481
14482         Factor int-properties macros into a single file, except for
14483         glibc-related files.
14484         * lib/intprops.h: New file.
14485         * lib/getloadavg.c: Include it instead of limits.h.
14486         (INT_STRLEN_BOUND): Remove.
14487         * lib/human.c: Include intprops.h.
14488         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14489         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14490         302/1000.
14491         * lib/inttostr.h: Include intprops.h instead of limits.h.
14492         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14493         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14494         for consistency with intprops.h.
14495         (time_t_is_integer, twos_complement_arithmetic): Use them.
14496         * lib/sig2str.h: Include <signal.h>, intprops.h.
14497         (INT_STRLEN_BOUND): Remove.
14498         * lib/strftime.c (TYPE_SIGNED): Remove.
14499         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14500         * lib/strtol.c: Adjust comments to match intprops.h.
14501         * lib/userspec.c: Include intprops.h.
14502         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14503         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14504         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14505         instead of rolling our own expressions.
14506         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14507
14508         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14509         instead of int.
14510         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14511         the right thing even if adding 1900 would overflow.  Similarly
14512         for tm_mon + 1 and tm_yday + 1.
14513         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14514         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14515         (DO_SIGNED_NUMBER): New macro.
14516         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14517
14518 2005-03-07  Bruno Haible  <bruno@clisp.org>
14519
14520         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14521
14522 2005-03-07  Bruno Haible  <bruno@clisp.org>
14523
14524         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14525
14526 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14527
14528         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14529         (func_import): Only replace files via --import when they have actually
14530         changed.
14531
14532 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14533
14534         * m4/mmap-anon.m4: New file.
14535         * m4/pagealign_alloc.m4: New file.
14536
14537 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14538             Bruno Haible  <bruno@clisp.org>
14539
14540         * modules/pagealign_alloc: New file.
14541         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14542
14543 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14544             Bruno Haible  <bruno@clisp.org>
14545
14546         * lib/pagealign_alloc.h: New file.
14547         * lib/pagealign_alloc.c: New file.
14548
14549 2005-03-03  Bruno Haible  <bruno@clisp.org>
14550
14551         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14552         Use an all-permissive copyright notice, recommended by RMS.
14553
14554 2005-03-02  Bruno Haible  <bruno@clisp.org>
14555
14556         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14557         of AIX, the replacement has to be done only after <string.h> is
14558         included, therefore not in config.h. stpncpy.h does the replacement,
14559         and stpncpy.c uses it.
14560
14561 2005-03-02  Bruno Haible  <bruno@clisp.org>
14562
14563         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14564         stpncpy.c uses it.
14565
14566 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14567
14568         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14569         The workaround isn't strictly needed for POSIX conformance, and
14570         it's too much of a pain to configure and maintain.  We'll ask
14571         people to fix their kernels instead.
14572         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14573         (NANOSLEEP_BUG_WORKAROUND): Remove.
14574         (xnanosleep): Remove the workaround.
14575
14576 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14577
14578         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14579         Reported by Derek Price.
14580         (Include): Add "timespec.h".
14581
14582         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14583
14584 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14585
14586         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14587         to detect nanosleep bug.
14588
14589 2005-03-01  Bruno Haible  <bruno@clisp.org>
14590
14591         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14592
14593 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14594
14595         * modules/gethrxtime: New file.
14596         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14597         (Depends-on): Add gethrxtime.
14598         (configure.ac): Add gl_XNANOSLEEP.
14599         (Makefile.am): Remove lib_SOURCES line.
14600
14601 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14602
14603         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14604         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14605
14606 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14607
14608         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14609         * lib/timespec.h (gettime): Return void, since it always
14610         succeeds now.  All uses changed.
14611         * lib/gettime.c (gettime) Likewise.
14612         [HAVE_NANOTIME]: Prefer nanotime.
14613         Assume gettimeofday succeeds, as POSIX requires.
14614         Assime time () succeeds, since other code already does.
14615         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14616         (timespec_subtract): Remove.
14617         (NANOSLEEP_BUG_WORKAROUND): New constant.
14618         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14619         things considerably.  Use it only on GNU/Linux hosts, since the
14620         workaround shouldn't be needed elsewhere.
14621
14622 2005-02-24  Bruno Haible  <bruno@clisp.org>
14623
14624         * modules/gettext (Files): Add m4/glibc2.m4.
14625
14626 2005-02-24  Bruno Haible  <bruno@clisp.org>
14627
14628         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14629         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14630         * m4/progtest.m4:
14631         Update from GNU gettext 0.14.2.
14632         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14633
14634 2005-02-24  Bruno Haible  <bruno@clisp.org>
14635
14636         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14637         * lib/config.charset: Update from GNU gettext 0.14.2.
14638
14639 2005-02-24  Bruno Haible  <bruno@clisp.org>
14640
14641         * lib/gettext.h: Update from GNU gettext 0.14.2.
14642
14643 2005-02-23  Simon Josefsson  <jas@extundo.com>
14644
14645         * m4/iconvme.m4: New file.
14646
14647 2005-02-23  Jim Meyering  <jim@meyering.net>
14648
14649         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14650         change.
14651         Thanks to Bruno Haible for catching it.
14652
14653 2005-02-22  Simon Josefsson  <jas@extundo.com>
14654
14655         * modules/iconvme: New file.
14656
14657         * MODULES.html.sh: Add iconvme.
14658
14659 2005-02-22  Simon Josefsson  <jas@extundo.com>
14660
14661         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14662
14663 2005-02-22  Simon Josefsson  <jas@extundo.com>
14664
14665         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14666
14667 2005-02-22  Jim Meyering  <jim@meyering.net>
14668
14669         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14670         s/ifndef/ifdef/.
14671
14672 2005-02-20  Neil Conway  <neilc@samurai.com>
14673
14674         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14675         returned by OSX/Darwin if the specified buffer is not large
14676         enough for the hostname.
14677
14678 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14679
14680         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14681         pass it to _help, otherwise the latter coredumps trying to
14682         dereference state.root_argp.
14683
14684 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14685
14686         * modules/chdir-long (Depends-on): Add memrchr.
14687         * modules/memrchr (Files): Add lib/memrchr.h.
14688         (Include): "memrchr.h".
14689
14690 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14691
14692         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14693
14694 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14695
14696         * lib/memrchr.h: New file.
14697         * lib/chdir-long.c: Include it.
14698         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14699         Don't bother including stddef.h.
14700
14701 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14702
14703         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14704         inclusion.
14705         Include <sys/types.h>, for dev_t.
14706         (ME_DUMMY, ME_REMOTE): Move from here....
14707         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14708         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14709         Dmitry V. Levin.
14710         Include mountlist.h first, to test the interface.
14711
14712 2005-01-29  Bruno Haible  <bruno@clisp.org>
14713
14714         * lib/progname.c (program_name): Initialize.
14715         Needed when linking statically on MacOS X.
14716
14717 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14718
14719         Sync from coreutils.
14720         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14721         (Depends-on): Add c-strtod.
14722         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14723
14724 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14725
14726         Sync from coreutils.
14727         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14728
14729         Remove files that are specific to coreutils.
14730         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14731
14732 2005-01-28  Bruno Haible  <bruno@clisp.org>
14733
14734         * modules/javacomp: New file.
14735         * MODULES.html.sh (Java): Add javacomp.
14736
14737 2005-01-28  Bruno Haible  <bruno@clisp.org>
14738
14739         * m4/javacomp.m4: New file, from GNU gettext.
14740
14741 2005-01-28  Bruno Haible  <bruno@clisp.org>
14742
14743         * lib/javacomp.sh.in: New file, from GNU gettext.
14744         * lib/javacomp.h: New file, from GNU gettext.
14745         * lib/javacomp.c: New file, from GNU gettext.
14746
14747 2005-01-26  Simon Josefsson  <jas@extundo.com>
14748
14749         * lib/gai_strerror.c: Use GPL in header.
14750
14751 2005-01-26  Bruno Haible  <bruno@clisp.org>
14752
14753         * modules/javaexec: New file.
14754         * MODULES.html.sh (Java): Add javaexec.
14755
14756 2005-01-26  Bruno Haible  <bruno@clisp.org>
14757
14758         * m4/javaexec.m4: New file, from GNU gettext.
14759
14760 2005-01-26  Bruno Haible  <bruno@clisp.org>
14761
14762         * lib/javaexec.sh.in: New file, from GNU gettext.
14763         * lib/javaexec.h: New file, from GNU gettext.
14764         * lib/javaexec.c: New file, from GNU gettext.
14765
14766 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14767
14768         * modules/lchown (Depends-on): Remove lchown.h
14769
14770 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14771
14772         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14773         must be defined if the header file was not found, in order
14774         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14775
14776 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14777
14778         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14779         initializers for struct pentry_state.
14780         (__argp_error): Check return value of __asprintf
14781         (__argp_failure): Translate error message
14782
14783         * lib/argp-parse.c: Removed braces around the expansion of N_()
14784
14785 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14786
14787         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14788         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14789         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14790         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14791         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14792         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14793         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14794         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14795         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14796         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14797         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14798         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14799         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14800         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14801         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14802         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14803         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14804         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14805         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14806         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14807         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14808         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14809         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14810         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14811         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14812         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14813         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14814         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14815         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14816         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14817         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14818         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14819         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14820         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14821         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14822         Use an all-permissive copyright notice, recommended by RMS.
14823
14824 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14825
14826         * modules/chdir-long (Depends-on): Remove mempcpy.
14827
14828 2005-01-21  Jim Meyering  <jim@meyering.net>
14829
14830         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14831         same value as for Solaris 9.
14832
14833         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14834         component length.  This included changing the parameter to be
14835         of type `char *' rather than `char const *'.
14836         * lib/chdir-long.h (chdir_long): Update prototype.
14837
14838         * lib/openat.c (fdopendir, fstatat): New functions.
14839         * lib/openat.h: Include headers required for use of DIR and struct
14840         stat.
14841         [AT_SYMLINK_NOFOLLOW]: Define.
14842         (fdopendir, fstatat): Add prototypes.
14843
14844 2005-01-21  Bruno Haible  <bruno@clisp.org>
14845
14846         * modules/classpath: New file.
14847         * MODULES.html.sh (Java): Add classpath.
14848
14849 2005-01-21  Bruno Haible  <bruno@clisp.org>
14850
14851         * lib/classpath.h: New file, from GNU gettext.
14852         * lib/classpath.c: New file, from GNU gettext.
14853
14854 2005-01-20  Simon Josefsson  <jas@extundo.com>
14855
14856         * modules/version-etc-fsf: New file.
14857
14858 2005-01-20  Simon Josefsson  <jas@extundo.com>
14859
14860         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14861         * lib/version-etc.c: Remove version_etc_copyright.
14862         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14863         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14864
14865 2005-01-20  Simon Josefsson  <jas@extundo.com>
14866
14867         * lib/base64.h (isbase64): Add.
14868
14869         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14870         using a unsigned prototype, don't inline.
14871         (base64_decode): Use it.
14872
14873 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14874
14875         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14876         it.
14877
14878 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14879
14880         * lib/save-cwd.c (save_cwd): Remove code to support the case
14881         where fchdir is missing or flaky.
14882
14883 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14884
14885         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14886
14887 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14888
14889         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14890         AC_LIBSOURCES now does this.
14891         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14892         with new ullong_max module.
14893
14894 2005-01-19  Bruno Haible  <bruno@clisp.org>
14895
14896         * modules/sh-quote: New file.
14897         * MODULES.html.sh (Executing programs): Add sh-quote.
14898
14899 2005-01-19  Bruno Haible  <bruno@clisp.org>
14900
14901         * lib/sh-quote.h: New file, from GNU gettext.
14902         * lib/sh-quote.c: New file, from GNU gettext.
14903
14904 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14905
14906         Merge from coreutils.
14907         * m4/ullong_max.m4: New file.
14908         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14909         (gl_MACROS): Assume localeconv exists.
14910
14911 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14912
14913         Merge changes from coreutils, as described below in several
14914         changelogs dated today.
14915
14916         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14917         (O_DIRECTORY): Remove; not needed here, since "." must be
14918         a directory.  All uses removed.
14919         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14920         universal on Suns, and we also need to test for IRIX.
14921         Revamp code to use 'if' rather than '#if'.
14922         Avoid unnecessary comparison of cwd->desc to 0.
14923
14924         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14925         for known valid error numbers rather than observed invalid ones.
14926
14927 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14928
14929         * modules/ullong_max: New file.
14930
14931         * modules/chdir-long, modules/openat: New files.
14932         * modules/save-cwd (Depends-on): Depend on chdir-long.
14933         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14934
14935 2005-01-18  Jim Meyering  <jim@meyering.net>
14936
14937         Merge from coreutils.
14938         * m4/chdir-long.m4, m4/openat.m4: New files.
14939         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14940         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14941         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14942         is sane and DOES follow symlinks.  Besides, testing 20 different
14943         systems found no broken chown implementations.
14944         Prompted by a change in rsync's copy of this macro.
14945         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14946
14947         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14948
14949         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14950         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14951         NULL-means-set-to-current-time semantics.
14952         Remove temporary file immediately, rather than waiting
14953         for configure's at-exit trap code to do it.
14954
14955 2005-01-18  Jim Meyering  <jim@meyering.net>
14956
14957         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14958
14959         * lib/utimens.c (futimens): Account for the fact that futimes
14960         can also fail with errno == ENOSYS or errno == ENOENT.
14961         Patch from Dmitry V. Levin.
14962
14963         Change the name of the robust chdir function from chdir to chdir_long.
14964         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14965         (restore_cwd): Use chdir_long, not chdir.
14966         * lib/chdir-long.c: Renamed from chdir.c.
14967         * lib/chdir-long.h: Renamed from chdir.h.
14968         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14969         Hurd.
14970
14971 2005-01-18  Bruno Haible  <bruno@clisp.org>
14972
14973         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14974         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14975         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14976         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14977         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14978         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14979         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14980         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14981         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14982         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14983         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14984         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14985         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14986         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14987         Use an all-permissive copyright notice, recommended by RMS.
14988
14989 2005-01-18  Bob Proulx  <bob@proulx.com>
14990
14991         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14992         simplify offsetof() macro construct to avoid compile failure with
14993         native HP-UX 11.0 ANSI C compiler.
14994
14995 2005-01-17  Bruno Haible  <bruno@clisp.org>
14996
14997         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14998         redundant because stpncpy.m4 takes care of it.
14999
15000 2005-01-17  Bruno Haible  <bruno@clisp.org>
15001
15002         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
15003
15004 2005-01-17  Bruno Haible  <bruno@clisp.org>
15005
15006         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
15007         used.
15008
15009 2005-01-17  Bruno Haible  <bruno@clisp.org>
15010
15011         * lib/fwriteerror.h (fwriteerror): Change specification to include
15012         fclose.
15013         * lib/fwriteerror.c: Include <stdbool.h>.
15014         (fwriteerror): At the end, close the file stream. Record whether
15015         stdout was already closed.
15016
15017 2005-01-17  Bruno Haible  <bruno@clisp.org>
15018
15019         * lib/execute.c (environ): Declare if needed.
15020         * lib/pipe.c (environ): Likewise.
15021         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
15022
15023 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15024
15025         * modules/argp: Depend on vsnprintf
15026
15027 2005-01-10  Jim Meyering  <jim@meyering.net>
15028
15029         * modules/closeout (Depends-on): Add atexit.
15030
15031 2005-01-06  Bruno Haible  <bruno@clisp.org>
15032
15033         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15034
15035 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15036
15037         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15038         definitions to be after all include files, to avoid collisions.
15039         Problem reported by Bob Proulx.
15040
15041 2005-01-04  Jim Meyering  <jim@meyering.net>
15042
15043         Changes imported from coreutils.
15044         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15045         as the mkstemp template, use a temporary directory and an
15046         8.3-friendly template to avoid trouble on systems like DJGPP.
15047         Reported by Juan M. Guerrero via Stepan Kasal.
15048         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15049         close. Remove the temporary directory right away, rather than waiting
15050         for configure's at-exit trap code to do it.
15051         Suggestion from Stepan Kasal.
15052
15053 2005-01-01  Simon Josefsson  <jas@extundo.com>
15054
15055         * gnulib-tool: Print #include directives when --import'ing.
15056
15057 2004-12-28  Simon Josefsson  <jas@extundo.com>
15058
15059         * tests/test-base64.c: Include required header files.  Remove
15060         unused variables.
15061
15062 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15063
15064         * modules/error (Depends-on): Remove gettext.
15065
15066 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15069         not needed.  This removes a dependency on the gettext module.
15070         [defined _LIBC]: Do not include <libintl.h>; not needed.
15071
15072 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15073
15074         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15075         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15076
15077 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15078
15079         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15080         HAVE_DECL_STRTOLD.
15081
15082 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         * modules/getdate (Depends-on): Remove alloca-opt.
15085
15086 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15087
15088         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15089
15090 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15091
15092         * lib/argp-parse.c: Include <stddef.h>.
15093         (alignof, alignto): New macros.
15094         (parser_init): Don't assume that void * is aligned sufficiently
15095         for struct option.
15096
15097         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15098         need to extend the stack.
15099         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15100         large.
15101
15102 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15103
15104         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15105
15106 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15107
15108         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15109         (2004-10-24) change.  Apparently this was a false alarm.
15110
15111         * modules/getdate: Depend on alloca-opt, not alloca.
15112
15113 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15114
15115         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15116         Remove now-obsolete comment about AIX.
15117         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15118         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15119         (YYMAXDEPTH): New macro.
15120
15121 2004-12-18  Simon Josefsson  <jas@extundo.com>
15122
15123         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15124
15125 2004-12-18  Bruno Haible  <bruno@clisp.org>
15126
15127         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15128
15129 2004-12-18  Bruno Haible  <bruno@clisp.org>
15130
15131         * lib/fatal-signal.c (fatal_signals): Make non-const.
15132         (init_fatal_signals): New function.
15133         (uninstall_handlers, install_handlers): Ignore signals that were set to
15134         SIG_IGN.
15135         (at_fatal_signal): Call init_fatal_signals.
15136         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15137         SIG_IGN.
15138         Reported by Paul Eggert.
15139
15140 2004-12-18  Bruno Haible  <bruno@clisp.org>
15141
15142         * doc/alloca.texi: New file.
15143         * doc/alloca-opt.texi: New file.
15144
15145 2004-12-17  Jim Meyering  <jim@meyering.net>
15146
15147         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15148         Otherwise, install-sh could exit with improper exit status when
15149         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15150
15151 2004-12-16  Simon Josefsson  <jas@extundo.com>
15152
15153         * tests/test-base64.c: Add license.
15154
15155 2004-12-15  Stepan Kasal  <address@hidden>
15156
15157         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15158
15159 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15160
15161         * modules/getcwd (Files): Add m4/d-ino.m4.
15162         Suggested by Mark D. Baushke.
15163
15164 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15165
15166         * lib/getdate.y (textint): New member "negative".
15167         (time_zone_hhmm): New function.
15168         Expect 14 shift-reduce conflicts, not 13.
15169         (o_colon_minutes): New rule.
15170         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15171         (yylex): Set the "negative" member of signed numbers.
15172
15173 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15174
15175         * doc/getdate.texi (Time of day items, Time zone items):
15176         Describe new formats +00:00, UTC+00:00.
15177
15178 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15179
15180         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15181         spurious "-l"s.  Problem reported by Stepan Kasal.
15182
15183 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15184
15185         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15186         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15187
15188 2004-12-04  Simon Josefsson  <jas@extundo.com>
15189
15190         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15191         Vandoorselaere <yoann@prelude-ids.org>.
15192
15193 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15194
15195         Changes imported from coreutils.
15196         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15197         exist.
15198         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15199
15200 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15201
15202         Changes imported from coreutils.
15203         * lib/hard-locale.c: Assume <locale.h> exists.
15204         Include "strdup.h".
15205         (GLIBC_VERSION): New macro.
15206         (hard_locale): Assume setlocale exists.
15207         Rewrite to avoid #ifdef.
15208         Use strdup rather than malloc + strcpy.
15209         * lib/human.c: Assume <locale.h> exists.
15210         (human_readable): Assume localeconv exists.
15211
15212 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15213
15214         * modules/hard-locale (Depends-on): Add strdup.
15215
15216 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15217
15218         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15219         convert T2, not T.  (Imported from libc.)
15220
15221 2004-11-30  Simon Josefsson  <jas@extundo.com>
15222
15223         * modules/restrict (License): Change to LGPL.
15224
15225 2004-11-30  Simon Josefsson  <jas@extundo.com>
15226
15227         * m4/restrict.m4: Add copyright and copying conditions.
15228
15229 2004-11-30  Simon Josefsson  <jas@extundo.com>
15230
15231         * m4/base64.m4: New file.
15232
15233 2004-11-30  Simon Josefsson  <jas@extundo.com>
15234
15235         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15236         base64.
15237
15238         * tests/test-base64.c: New file.
15239
15240         * modules/base64: New file.
15241
15242 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15243
15244         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15245         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15246
15247         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15248
15249 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15250
15251         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15252         (__getcwd.c): Don't restore errno; glibc doesn't.
15253         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15254         first, falling back to our code only if its results look suspicious.
15255         Ensure that the resulting buffer is only as large as necessary.
15256
15257         * lib/readutmp.c: Include readutmp.h first.
15258         Include <errno.h>, since readutmp.h no longer does that.
15259         * lib/readutmp.h: Don't include <errno.h>,
15260         <sys/param.h>, <time.h>; not needed to establish interface.
15261         (errno): Remove decl.
15262         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15263         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15264         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15265
15266 2004-11-28  Simon Josefsson  <jas@extundo.com>
15267
15268         * lib/base64.h, base64.c: New file.
15269
15270 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15271
15272         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15273
15274 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15275
15276         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15277         (Depends-on): Remove pathmax, same.  Add mempcpy.
15278         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15279         (Makefile.am): Append getcwd.h to lib_SOURCES.
15280         (Include): Add getcwd.h.
15281         (Maintainer): Change from Jim Meyering to "all, glibc",
15282         since getdate now uses intended-for-glibc code.
15283         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15284         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15285
15286 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15287
15288         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15289         HP's ANSI C compiler.
15290         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15291         Declaring int functions causes warnings on some modern systems and
15292         shouldn't be needed to compile on ancient ones.
15293         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15294         defined.
15295
15296         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15297         with the following changes.
15298         (__set_errno): Parenthesize properly.
15299         Include <stdbool.h>.
15300         (MIN, MAX, MATCHING_INO): New macros.
15301         (__getcwd): Define with prototype, not K&R form.
15302         Use heuristics to allocate default buffer on stack if possible.
15303         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15304         behavior, and to avoid the PATH_MAX limit when computing
15305         ../../../../...
15306         Use MATCHING_INO to compare inode number to file.
15307         Check for arithmetic overflow in size calculations.
15308         Fix bug in reallocation of dot array that caused getcwd to fail
15309         on directories nested deeper than 75.
15310         Be more careful about saving errno on error.
15311         Do not use realloc; use only free+malloc, as this is a bit
15312         more flexible and avoids a needless copy operation.
15313         Do not inspect st_dev and st_ino for symbolic links; POSIX
15314         doesn't specify the latter.
15315         Check for closedir errors.
15316         Avoid needless casts.
15317         Use "#ifdef weak_alias" around weak_alias, to be like other
15318         glibc code.
15319         The following changes to getcwd.c have effect only when used in
15320         gnulib; they have no effect inside glibc proper.
15321         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15322         as alloca isn't used.
15323         (alloca, __alloca): Likewise.
15324         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15325         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15326         unconditionally, as gnulib assumes C89 or better.
15327         Do not include <sys/param.h>.
15328         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15329         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15330         better.
15331         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15332         Include <dirent.h> in a way that is compatible with modern Autoconf.
15333         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15334         New macros, if not already defined.
15335         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15336         Use "_LIBC", not "defined _LIBC", for consistency.
15337         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15338         a mempcpy module.
15339         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15340         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15341         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15342         credit only to Jim Meyering and adjust the copyright dates.
15343         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15344         <stdlib.h>, <unistd.h>, "pathmax.h".
15345         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15346         (INITIAL_BUFFER_SIZE): Remove.
15347         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15348
15349 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15350
15351         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15352         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15353         Use the _ONCE methods, for efficiency.
15354         Check for fcntl.h.  In test program, include <errno.h>
15355         and <fcntl.h> if available.  Remove old K&R cruft from
15356         test program.  Check for common errors in GNU/Linux,
15357         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15358         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15359         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15360         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15361         name accordingly.
15362         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15363         accommodate new getcwd.c.
15364         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15365         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15366         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15367         that's all we need now.
15368
15369 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15370
15371         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15372         argp-parse.c depends on getopt internals, that means we should
15373         always use our getopt, to be on the safe side.
15374         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15375         order not to spoil the result of an eventual previous invocation
15376         of gl_GETOPT_SUBSTITUTE.
15377
15378 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15379
15380         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15381         redefinition warnings. To avoid them, include the defines
15382         in `#if !defined __need_getopt ... #endif'. The only place
15383         where __getopt_argv_const is used is in definitions
15384         of getopt_long and getopt_long_only below, which are as well
15385         protected by `#ifndef __need_getopt'.
15386         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15387         __need_getopt after including <stdio.h> and <unistd.h> These
15388         headers might have defined it.
15389
15390 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15391
15392         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15393
15394 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15395
15396         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15397         (futimens): New function, which uses futimes if available.
15398         (futimens, utimens): Support timespec==NULL, with same semantics
15399         as utime and utimens.
15400         * lib/utimens.h (futimens): New decl.
15401
15402 2004-11-23  Jim Meyering  <jim@meyering.net>
15403
15404         * lib/getopt_.h: Remove trailing blanks.
15405
15406 2004-11-23  Jim Meyering  <jim@meyering.net>
15407
15408         * lib/__fpending.c: Add comment.
15409
15410 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15411
15412         * modules/canonicalize (Depends-on): Add xreadlink.
15413         Problem reported by James Youngman.
15414
15415 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15416
15417         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15418         New macros.
15419         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15420         optopt): Use them instead of invoking ## directly; otherwise, the
15421         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15422
15423 2004-11-19  Bruno Haible  <bruno@clisp.org>
15424
15425         * lib/strtok_r.c: Move comments from here...
15426         * lib/strtok_r.h: ... to here.
15427
15428 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15429
15430         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15431         implementations that mishandle size_t overflow.
15432
15433 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15434
15435         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15436         might fail.  Problem reported by Yoann Vandoorselaere.
15437         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15438         implementations that mishandle size_t overflow.
15439
15440 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15441
15442         * modules/canon-host (Depends-on): Add strdup.
15443
15444 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15445
15446         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15447
15448 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15449
15450         * lib/canon-host.c: Include "strdup.h".
15451         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15452         Use strdup instead of malloc/strcpy to duplicate strings.
15453
15454         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15455         (human_space_before_unit): New constant.
15456         * lib/human.c (human_readable): Support it.
15457
15458         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15459         (xgetcwd): Set errno correctly when failing.
15460         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15461         the failure is actually due to a PATH_MAX problem.
15462
15463         Further getopt changes to make it more likely that glibc will
15464         buy the changes back.
15465         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15466         (getopt): Use it, so to preserve glibc semantic
15467         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15468         when compiling for libc.
15469         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15470         (getopt_long, getopt_long_only): Use it.
15471
15472         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15473         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15474         (getopt): Argv is now char * const *, as per standard.
15475         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15476         not char *__getopt_argv_const *.
15477         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15478         _getopt_long_only_r): Likewise.
15479         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15480         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15481         _getopt_long_r, _getopt_long_only_r): Likewise.
15482         * lib/getopt_.h (__getopt_argv_const): Remove.
15483         (getopt): Argv is now char * const *, as per standard.
15484
15485         * lib/getdate.y (tORDINAL): New token.
15486         (day, relunit): Allow it for relative times.
15487         (relative_time_table): Use tORDINAL for ordinals.
15488
15489 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15490
15491         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15492         Document that "second" isn't allowed as an ordinal number.
15493
15494 2004-11-16  Jim Meyering  <jim@meyering.net>
15495
15496         * modules/closeout (Depends-on): Add fpending.
15497
15498 2004-11-15  Jim Meyering  <jim@meyering.net>
15499
15500         * lib/closeout.c: Include "__fpending.h" once again.
15501         Include <stdbool.h>.
15502         (close_stdout): Don't fail just because stdout was closed initially,
15503         since some programs don't write to stdout in the normal course of
15504         operation (other than --version and --help), and we don't want this
15505         function to make e.g. `touch file >&-' fail.
15506         But do fail if it was closed and someone has tried to write to it.
15507         E.g., `printf foo >&-' must fail.
15508
15509 2004-11-13  Jim Meyering  <jim@meyering.net>
15510
15511         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15512
15513 2004-11-12  Simon Josefsson  <jas@extundo.com>
15514
15515         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15516         small doc fix is still pending.
15517
15518 2004-11-11  Simon Josefsson  <jas@extundo.com>
15519
15520         * modules/strtok_r: New file.
15521
15522         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15523         strtok_r.
15524
15525 2004-11-11  Simon Josefsson  <jas@extundo.com>
15526
15527         * m4/strtok_r.m4: New file.
15528
15529         * m4/getopt.m4: Replace opterr.
15530
15531 2004-11-11  Simon Josefsson  <jas@extundo.com>
15532
15533         * lib/strtok_r.h, strtok_r.c: New file.
15534
15535 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15536
15537         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15538         of replacing opterr, getopt, etc.  This should handle the
15539         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15540
15541 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15542
15543         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15544         we can stop lying to compilers about the constness of argv when we
15545         are compiled outside glibc.
15546         (getopt, getopt_long, getopt_long_only): Use it.
15547         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15548         _getopt_internal, getopt): Likewise.
15549         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15550         _getopt_long_only_r): Likewise.
15551         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15552         _getopt_long_r, _getopt_long_only_r): Likewise.
15553
15554         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15555         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15556         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15557         the other external symbols.
15558         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15559         declaration, since the above renaming now works around collisions.
15560
15561 2004-11-11  Jim Meyering  <jim@meyering.net>
15562
15563         * lib/linebreak.c: Remove trailing blanks.
15564         * lib/alloca_.h: Likewise.
15565         * lib/acosl.c: Likewise.
15566         * lib/euidaccess.c: Likewise.
15567         * lib/allocsa.h: Likewise.
15568
15569 2004-11-10  Simon Josefsson  <jas@extundo.com>
15570
15571         * m4/getaddrinfo.m4: New file.
15572
15573 2004-11-10  Simon Josefsson  <jas@extundo.com>
15574
15575         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15576
15577 2004-11-10  Simon Josefsson  <jas@extundo.com>
15578
15579         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15580         getaddrinfo.
15581
15582         * modules/getaddrinfo: New file.
15583
15584 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15585
15586         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15587
15588 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15589
15590         * lib/mktime.c (SHR): New macro, which is a portable
15591         substitute for >> that should work even on Crays.
15592         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15593         Problem reported by Mark D. Baushke in
15594         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15595         * lib/getdate.y (SHR): Likewise.
15596         (tm_diff): Use it.
15597         * lib/strftime.c (SHR): Likewise.
15598         (tm_diff): Use it.
15599         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15600         quote_these_too, so that right shifts are well defined.  All uses
15601         changed.
15602
15603 2004-11-10  Jim Meyering  <jim@meyering.net>
15604
15605         Ensure that no close failure goes unreported.
15606         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15607         return early when it seems there's nothing to flush.
15608         Don't include __fpending.h.
15609
15610 2004-11-10  Jim Meyering  <jim@meyering.net>
15611
15612         * modules/closeout (Depends-on): Remove fpending.
15613
15614 2004-11-10  Jim Meyering  <jim@meyering.net>
15615
15616         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15617
15618 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15619
15620         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15621         gl_FUNC_STRFTIME.
15622         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15623         and AC_REQUIRE when possible, to avoid duplicate checks.
15624         Check for <wchar.h>.
15625
15626 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15627
15628         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15629
15630 2004-11-09  Bruno Haible  <bruno@clisp.org>
15631
15632         * m4/sockpfaf.m4: New file.
15633
15634 2004-11-05  Bruno Haible  <bruno@clisp.org>
15635
15636         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15637         Reported by Mark D. Baushke <mdb@cvshome.org>.
15638
15639 2004-11-04  Bruno Haible  <bruno@clisp.org>
15640
15641         2004-09-11  Bruno Haible  <bruno@clisp.org>
15642                 * allocsa.valgrind: New file.
15643         2004-02-06  Bruno Haible  <bruno@clisp.org>
15644                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15645                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15646                 Reported by Christopher Seip <chris.seip@hp.com>.
15647
15648 2004-11-04  Bruno Haible  <bruno@clisp.org>
15649
15650         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15651         (Makefile.am): Distribute it.
15652
15653 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15654
15655         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15656         with errno == ERANGE if the buffer is too small.
15657         Problem reported by Mark D. Baushke.
15658
15659 2004-11-03  Albert Chin  <china@thewrittenword.com>
15660             Paul Eggert  <eggert@cs.ucla.edu>
15661
15662         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15663         equivalent, substitute $ac_type for equivalent type rather than
15664         blindly using uint32_t *always* which won't work if uint32_t is not
15665         available.  Define _UINT32_T to work around typedef of uint32_t if
15666         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15667         2.5.1.
15668
15669 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15670
15671         * m4/jm-macros.m4: Sync from coreutils.
15672         (gl_MACROS): Check for mbrlen, for pathchk.
15673         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15674
15675 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15676
15677         * lib/xreadlink.c (MAXSIZE): New macro.
15678         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15679         size does not exceed MAXSIZE.  Avoid cast.
15680         As suggested by Mark D. Baushke in
15681         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15682         if readlink fails with buffer size just under MAXSIZE, try again
15683         with MAXSIZE.
15684
15685 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15686
15687         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15688
15689 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15690         and  Paul Eggert  <eggert@cs.ucla.edu>
15691
15692         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15693         (get_date): Overparenthesize to avoid GCC warning.
15694
15695 2004-11-02  Bruno Haible  <bruno@clisp.org>
15696
15697         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15698         returns void.
15699
15700 2004-11-02  Bruno Haible  <bruno@clisp.org>
15701
15702         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15703         function returns void.
15704
15705 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15706
15707         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15708         fflush_unlocked, flockfile, funlockfile, funlockfile,
15709         fputs_unlocked, putc_unlocked.
15710
15711 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15712
15713         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15714         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15715         already declared.
15716
15717 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15718
15719         * modules/getdate (Files): Add doc/getdate.texi.
15720         (Depends-on): Add setenv, xalloc.
15721
15722 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15723
15724         * lib/getdate.y: Add support for TZ="foo" within a date string.
15725         Fix some bugs near time_t boundaries.  Reject dates with
15726         out-of-range components, e.g., "Sept 31".
15727         Include <stdlib.h>, "setenv.h", "xalloc.h".
15728         (ISDIGIT_LOCALE): Remove; unused.
15729         Note that the TZ and time functions used here are not reentrant.
15730         (mktime_ok, get_tz): New functions.
15731         (TZBUFSIZE): New constant.
15732         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15733         This requires that we sometimes generate our own TZ="XXX..." setting.
15734
15735 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15736
15737         * doc/getdate.texi: New file, from coreutils with modifications for
15738         the new TZ parsing.
15739
15740 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15741
15742         * lib/mktime.c (not_equal_tm): Remove redundant check.
15743
15744 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15745
15746         * modules/regex (lib_SOURCES): Add regex.c.
15747         Reported by James Youngman in
15748         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15749
15750 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * lib/getdate.y: Use Bison 1.875 features, and some minor
15753         code cleanups.  This change does not affect semantics.
15754         Don't include <stdlib.h>; no longer needed.
15755         Don't include unlocked-io.h; only the "#if TEST" code uses
15756         stdio, and performance isn't crucial there.
15757         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15758         Bison 1.875 features as described below.
15759         All uses of "PC." replaced by "pc->".
15760         (YYSTYPE): Add a forward declaration.
15761         (yylex, yyerror): Use full prototypes in forward decls.
15762         Use "%pure-parser" rather than obsolescent "%pure_parser".
15763         Use %parse-param and %lex-param instead of obsolescent
15764         YYPARSE_PARAM and YYLEX_PARAM.
15765         (meridian_table, month_and_day_table, time_units_table,
15766         relative_time_table, time_zone_table, military_table,
15767         lookup_zone, lookup_word, get_date):
15768         Use NULL instead of 0 where appropriate.
15769         (to_hour): Avoid abort (), to avoid a dependency on
15770         stdlib.h.
15771         (yyerror, yylex): Now accepts parser_control * arg.
15772         (main) [TEST]: Use '\0' rather than 0 for char.
15773
15774 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15775
15776         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15777
15778 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15779
15780         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15781         It's now the caller's responsibility to handle the case where
15782         !HAVE_GETPAGESIZE && !defined getpagesize.
15783
15784         * lib/mktime.c (leapyear): Arg is long int, not int.
15785
15786 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15787
15788         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15789
15790 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15791
15792         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15793         missing.  Problem reported by James Youngman.
15794
15795 2004-10-16  Simon Josefsson  <jas@extundo.com>
15796
15797         * gnulib-tool: Fix comments.  Fix parse problem.
15798         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15799
15800 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15801
15802         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15803         implementation of getopt_long.  Problem reported by Alexander Taler in:
15804         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15805
15806 2004-10-15  Bruno Haible  <bruno@clisp.org>
15807
15808         * gnulib-tool: Untabify. Initialize supplied_libname.
15809         (func_usage): More homogenous output.
15810         (func_modules_transitive_closure, func_modules_to_filelist,
15811         func_emit_lib_Makefile_am): New functions.
15812         (func_import): New function, extracted from big case statement. Use
15813         func_get_license, func_modules_transitive_closure,
15814         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15815         opt_lgpl. Don't use test -a, as it's not portable.
15816         (func_create_testdir): Use func_modules_transitive_closure,
15817         func_modules_to_filelist, func_emit_lib_Makefile_am.
15818
15819 2004-10-15  Bruno Haible  <bruno@clisp.org>
15820
15821         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15822
15823 2004-10-15  Bruno Haible  <bruno@clisp.org>
15824
15825         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15826         the portions belonging to each module.
15827         Suggested by Derek Robert Price <derek@ximbiot.com>.
15828
15829 2004-10-12  Simon Josefsson  <jas@extundo.com>
15830
15831         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15832         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15833         to real functions.
15834
15835 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15836
15837         * modules/vsnprintf: New file.
15838
15839 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15840
15841         * m4/vsnprintf.m4: New file.
15842
15843 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15844
15845         * lib/vsnprintf.h: New file.
15846         * lib/vsnprintf.c: New file.
15847
15848 2004-10-11  Bruno Haible  <bruno@clisp.org>
15849
15850         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15851         vsnprintf.
15852
15853 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15854
15855         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15856
15857 2004-10-07  Bruno Haible  <bruno@clisp.org>
15858
15859         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15860         fits into the provided buffer.
15861
15862 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15863
15864         * lib/diacrit.c, diacrit.h: Add GPL notice.
15865
15866         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15867         notice.
15868         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15869         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15870         This avoids a potential constant-folding bug.
15871
15872 2004-10-05  Bruno Haible  <bruno@clisp.org>
15873
15874         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15875         for the declaration of strsep.
15876
15877 2004-10-05  Bruno Haible  <bruno@clisp.org>
15878
15879         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15880
15881 2004-10-04  Simon Josefsson  <jas@extundo.com>
15882
15883         * modules/memmem: New file.
15884         * tests/test-memmem.c: New file.
15885         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15886
15887 2004-10-04  Simon Josefsson  <jas@extundo.com>
15888
15889         * m4/memmem.m4: New file.
15890
15891 2004-10-04  Simon Josefsson  <jas@extundo.com>
15892
15893         * lib/memmem.h: New file.
15894         * lib/memmem.c: New file, taken from glibc.
15895
15896 2004-10-04  Simon Josefsson  <jas@extundo.com>
15897
15898         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15899         '#ifdef USE_UNLOCKED_IO'.
15900
15901 2004-10-04  Simon Josefsson  <jas@extundo.com>
15902
15903         * config/srclist.txt: Add memmem from glibc.
15904
15905 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15906
15907         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15908
15909         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15910         modules/exclude, modules/getdate, modules/getline,
15911         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15912         modules/getusershell, modules/linebuffer, modules/md5,
15913         modules/mountlist, modules/posixtm, modules/readtokens,
15914         modules/readutmp, modules/regex, modules/sha1,
15915         modules/version-etc, modules/yesno:
15916         Remove dependency on unlocked-io.
15917
15918 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15919
15920         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15921
15922         * m4/unlocked-io.m4: Add copyright notice.
15923         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15924
15925 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15926
15927         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15928         * lib/xmalloc.c (xmemdup): Likewise.
15929         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15930         XFREE): Remove these long-obsolescent macros.
15931         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15932         * lib/xstrdup.c: Remove.
15933
15934         * lib/regex.c (re_comp): Cast gettext return value to char *,
15935         Problem reported by Martin Neitzel via Mark D. Baushke.
15936
15937 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15938
15939         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15940         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15941         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15942         regex.c, sha1.c, version-etc.c, yesno.c:
15943         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15944         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15945         the includer's responsibility.
15946
15947         Sync from coreutils.
15948
15949         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15950         points to the start of a string, as the C Standard says the
15951         resulting behavior is undefined.
15952
15953         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15954         simple -> simple_backups, numbered_existing ->
15955         numbered_existing_backups, numbered -> numbered_backups
15956         to avoid shadowing problems.  All uses changed.
15957         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15958         * lib/backupfile.c (check_extension, numbered_backup):
15959         Rename locals to avoid shadowing 'basename'.
15960         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15961         once.
15962
15963         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15964         * lib/.cvsignore: Add getopt.h.
15965
15966 2004-10-04  Bruno Haible  <bruno@clisp.org>
15967
15968         * modules/README: New file.
15969         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15970         not a module.
15971
15972 2004-10-02  Jim Meyering  <jim@meyering.net>
15973
15974         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15975
15976 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15977
15978         * modules/strsep: New file.
15979
15980 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15981
15982         * m4/strsep.m4: New file.
15983
15984 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15985
15986         * lib/strsep.h: New file.
15987         * lib/strsep.c: New file.
15988
15989 2004-10-01  Simon Josefsson  <jas@extundo.com>
15990
15991         * lib/snprintf.c (snprintf): Handle size==0.
15992
15993 2004-10-01  Simon Josefsson  <jas@extundo.com>
15994             Bruno Haible  <bruno@clisp.org>
15995
15996         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15997         (snprintf): Declare 'args'.
15998
15999 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
16000
16001         * lib/snprintf.c: Remove comments as to why each header is needed.
16002
16003 2004-10-01  Bruno Haible  <bruno@clisp.org>
16004
16005         * MODULES.html.sh: Add strsep.
16006
16007 2004-09-30  Simon Josefsson  <jas@extundo.com>
16008
16009         * modules/snprintf: New file.
16010
16011 2004-09-30  Simon Josefsson  <jas@extundo.com>
16012
16013         * m4/snprintf.m4: New file.
16014
16015 2004-09-30  Simon Josefsson  <jas@extundo.com>
16016
16017         * lib/snprintf.h, lib/snprintf.c: New files.
16018
16019 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
16020
16021         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
16022         (hol_entry_help): Never translate an empty string.
16023         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16024         * lib/argp.h (OPTION_NO_TRANS): New option.
16025
16026 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16027
16028         * modules/argp (Maintainer): Replace Simon Josefsson
16029         by Sergey Poznyakoff.
16030
16031 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16032
16033         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16034         changes merged back into glibc.
16035
16036 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16037
16038         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16039
16040 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16041
16042         * lib/xvasprintf.c: Include xalloc.h.
16043         (xvasprintf): Use xalloc_die, not xmalloc_die.
16044
16045 2004-09-29  Bruno Haible  <bruno@clisp.org>
16046
16047         * modules/alloca-opt: New file, derived from modules/alloca.
16048         * modules/allocsa: Depend on alloca-opt instead of alloca.
16049         * modules/setenv: Likewise.
16050         * modules/vasnprintf: Likewise.
16051         * MODULES.html.sh: Add alloca-opt.
16052
16053 2004-09-28  Simon Josefsson  <jas@extundo.com>
16054
16055         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16056         LGPL, and to replace license template from GPL to LGPL.
16057
16058 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16059
16060         * modules/dummy: Change license to LGPL.
16061
16062 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16063
16064         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16065
16066 2004-09-24  Simon Josefsson  <jas@extundo.com>
16067
16068         * modules/minmax (License): Change from GPL to LGPL.
16069
16070 2004-09-23  Simon Josefsson  <jas@extundo.com>
16071
16072         * gnulib-tool (--import): Typo.
16073
16074 2004-09-23  Simon Josefsson  <jas@extundo.com>
16075
16076         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16077
16078 2004-09-22  Bruno Haible  <bruno@clisp.org>
16079
16080         * modules/*: Add 'License' field.
16081         * gnulib-tool: Accept --extract-license option.
16082         (func_get_license): New function.
16083
16084 2004-09-21  Bruno Haible  <bruno@clisp.org>
16085
16086         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16087         Reported by Simon Josefsson.
16088
16089 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16090
16091         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16092         gl_AC_TYPE_LONG_LONG.
16093
16094 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16095
16096         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16097
16098 2004-09-18  Simon Josefsson  <jas@extundo.com>
16099         and  Paul Eggert  <eggert@cs.ucla.edu>
16100
16101         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16102         calls with autoreconf.  Define GL_LIB.
16103
16104 2004-09-14  Karl Berry  <karl@gnu.org>
16105
16106         * config/srclist.txt: unsync setenv.c, sigh.
16107
16108 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16109
16110         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16111         Problem reported by Bruno Haible in:
16112         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16113
16114 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16115
16116         * config/srclist.txt: Comment out argp-pvh.c.
16117
16118 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16119
16120         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16121         in case some system header has #define'd it.  Problem reported by
16122         Soeren D. Schulze in
16123         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16124
16125 2004-09-09  Karl Berry  <karl@gnu.org>
16126
16127         * regex.[ch]: delete from the root.  These were supposed to be
16128                 synced with emacs cvs, but this has not happened for about
16129                 a year, and anyway nothing else uses emacs regex.[ch].
16130                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16131                 lib/regex[.ch] is untouched.
16132
16133 2004-09-09  Bruno Haible  <bruno@clisp.org>
16134
16135         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16136
16137 2004-09-09  Bruno Haible  <bruno@clisp.org>
16138
16139         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16140         modifications.
16141         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16142
16143 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16144
16145         * modules/xvasprintf: New file.
16146         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16147
16148 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16149
16150         * lib/xvasprintf.h: New file.
16151         * lib/xvasprintf.c: New file.
16152         * lib/xasprintf.c: New file.
16153
16154 2004-09-08  Bruno Haible  <bruno@clisp.org>
16155
16156         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16157
16158 2004-09-08  Bruno Haible  <bruno@clisp.org>
16159
16160         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16161         length is > INT_MAX.
16162         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16163         more.
16164
16165 2004-09-08  Bruno Haible  <bruno@clisp.org>
16166
16167         * lib/stdint_.h: New file, taken from GNU clisp.
16168
16169 2004-09-08  Bruno Haible  <bruno@clisp.org>
16170             Oskar Liljeblad  <oskar@osk.mine.nu>
16171
16172         * modules/stdint: New file.
16173         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16174
16175 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16176
16177         Import from coreutils.
16178         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16179         strings on unbounded length.  alloca's performance benefits aren't
16180         that important here.
16181         (V_STRDUP): Remove.
16182         (parse_with_separator): New function, with most of the internals
16183         of the old parse_user_spec.  Allow user to omit both user and group,
16184         for compatibility with FreeBSD.
16185         Clone only the user name, not the entire spec.
16186         Do not set *uid, *gid unless entirely successful.
16187         Avoid memory leak in some failing cases.
16188         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16189         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16190         (parse_user_spec): Rewrite to use parse_with_separator.
16191
16192 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16193
16194         * modules/userspec: Don't depend on alloca.
16195
16196 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16197
16198         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16199
16200 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16201
16202         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16203         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16204         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16205
16206 2004-08-16  Simon Josefsson  <jas@extundo.com>
16207
16208         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16209         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16210         Add --dry-run for --import.
16211         Let user provided command line parameters override configure.ac
16212         settings.
16213
16214 2004-08-12  Simon Josefsson  <jas@extundo.com>
16215
16216         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16217         as discussed with Paul Eggert in threads rooted at
16218         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16219         and
16220         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16221         Before, the test was empty, and relied on ELIDE_CODE in source
16222         code.)
16223         (gl_PREREQ_GETOPT): New macro.
16224         (gl_GETOPT): Use them.
16225
16226 2004-08-12  Simon Josefsson  <jas@extundo.com>
16227
16228         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16229         * lib/getopt_.h: Renamed from getopt.h.
16230
16231 2004-08-12  Simon Josefsson  <jas@extundo.com>
16232
16233         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16234         Change default library name from libfoo to libgnu.
16235         Now, if you have a configure.ac that says:
16236                 gl_SOURCE_BASE(gl)
16237                 gl_M4_BASE(gl/m4)
16238                 gl_MODULES(error getopt etcetera)
16239                 gl_INIT
16240         you can import all you need by running:
16241                 ../gnulib/gnulib-tool --import
16242
16243         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16244         (Makefile.am): Rewrite, use logic from argz.
16245         (Include): Use <getopt.h> instead of "getopt.h".
16246
16247 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16248
16249         * modules/argp (Files): Add m4/unlocked-io.m4.
16250         (Depends-on): Add extensions.
16251
16252 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16253
16254         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16255         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16256         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16257         Check for program_invocation_name, program_invocation_short_name,
16258         flockfile, funlockfile, features.h, _getopt_long_only_r.
16259
16260 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16261
16262         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16263         its complicated substitute.
16264         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16265         and program_invocation_name.
16266         (__argp_basename) [!_LIBC]: Remove; the only use was
16267         replaced by its body.
16268         (__argp_short_program_name): Change condition from
16269         !defined __argp_short_program_name to
16270         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16271         to match argp-namefrob.h.
16272         (__argp_failure): Don't assume strerror_r returns char *.
16273         * lib/argp-parse.c (N_): Define unconditionally.
16274         (argp_default_options): Fill out initializers with 0 to avoid
16275         gcc warnings.
16276
16277 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16278
16279         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16280         getopt1.c.
16281
16282 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16283
16284         Merge from coreutils.
16285
16286         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16287
16288         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16289         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16290
16291 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16292
16293         Merge from coreutils.
16294
16295         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16296         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16297         for Reliant Unix 5.43.
16298
16299         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16300         (union fooround): Use uintmax_t, not long int.
16301         The rest is a merge from libc:
16302         [defined _LIBC]: Include <shlib-compat.h>.
16303         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16304
16305         * lib/settime.c (settime): Recode to avoid warning with
16306         Sun Forte C 6U2.
16307
16308         * lib/strverscmp.c: Convert to UTF-8.
16309
16310 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16311
16312         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16313         m4/uintmax_t.m4.
16314
16315 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16316
16317         * modules/xalloc-die: New file.
16318         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16319
16320         * modules/md5 (Files): Add m4/uint32_t.m4.
16321         * modules/sha1: Renamed from modules/sha.
16322         (Files):
16323         Rename lib/sha.h to lib/sha1.h.
16324         Rename lib/sha.c to lib/sha1.c.
16325         Rename m4/sha.m4 to m4/sha1.m4.
16326         (lib_SOURCES): Likewise.
16327         (configure.ac): Rename gl_SHA to gl_SHA1.
16328         (Include): sha.h -> sha1.h.
16329
16330 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16331
16332         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16333         * m4/sha1.m4: Renamed from sha.m4.
16334         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16335
16336 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16337
16338         * lib/obstack.h (obstack_empty_p):
16339         Don't assume that chunk->contents is suitably aligned.
16340         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16341         Likewise. Problem reported by Benno in
16342         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16343
16344         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16345         readable.  This could be improved further but it'd take some work.
16346
16347 2004-08-08  Simon Josefsson  <jas@extundo.com>
16348
16349         * modules/xgethostname (Depends-on): Remove exit and error (not
16350         used).
16351
16352         * modules/getpass-gnu: Add getpass.h.
16353         (Depends-on): Add stdbool.
16354         * modules/getpass: Add getpass.h.
16355
16356 2004-08-08  Simon Josefsson  <jas@extundo.com>
16357
16358         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16359         Check getpass declaration.
16360
16361 2004-08-08  Simon Josefsson  <jas@extundo.com>
16362
16363         * lib/xgethostname.c: Don't include error.h (not used).
16364
16365         * lib/getpass.h: Add.
16366         * lib/getpass.c: Include getpass.h first.
16367
16368 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16369
16370         * lib/xalloc-die.c: New file.
16371         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16372         All uses removed.
16373         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16374         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16375         xalloc-die.c.
16376         (_, N_, xalloc_die): Move to xalloc-die.c.
16377         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16378         so that we needn't mess with xalloc_msg_memory_exhausted.
16379
16380         * lib/sha1.h: Renamed from sha.h.
16381         (SHA1_H): Renamed from _SHA_H.
16382         (sha1_ctx): Renamed from sha_ctx.
16383         (sha1_init_ctx): Renamed from sha_init_ctx.
16384         (sha1_process_block): Renamed from sha_process_block.
16385         (sha1_process_bytes): Renamed from sha_process_bytes.
16386         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16387         (sha1_read_ctx): Renamed from sha_read_ctx.
16388         (sha1_stream): Renamed from sha_stream.
16389         (sha1_buffer): Renamed from sha_buffer.
16390         * lib/sha1.c: Likewise; renamed from sha.c.
16391         Do not include <sys/types.h>.
16392         Include <stddef.h> rather than <stdlib.h>.
16393
16394 2004-08-08  Bruno Haible  <bruno@clisp.org>
16395
16396         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16397         FILESYSTEM_PREFIX_LEN.
16398         * lib/progreloc.c: Likewise.
16399         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16400
16401 2004-08-06  Simon Josefsson  <jas@extundo.com>
16402
16403         * modules/progname (Depends-on): Don't depend on stdbool.
16404
16405 2004-08-06  Simon Josefsson  <jas@extundo.com>
16406
16407         * modules/getsubopt: New file.
16408         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16409         getsubopt.
16410
16411 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16412
16413         More merge from coreutils.
16414
16415         * m4/utimens.m4, m4/utimecmp.m4: New files.
16416         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16417         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16418         prereq.m4, sha.m4: Import changes from coreutils.
16419
16420 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16421
16422         More merge from coreutils.
16423         * modules/raise, modules/readtokens0, modules/utimens:
16424         * modules/utimecmp, module/xnanosleep: New files.
16425         * modules/strftime: Add lib/strftime.h.
16426         Change include from <time.h> to "strftime.h".
16427         * modules/yesno: Add lib/yesno.h.
16428         * modules/backupfile: Remove lib/addext.c.
16429         * modules/euidaccess: Add stat-macros.h.
16430         * modules/canonicalize, modules/euidaccess,
16431         modules/filemode, modules/lchown, modules/makepath,
16432         modules/rmdir, modules/stat: Likewise.
16433
16434 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16435
16436         Merge from tar.
16437         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16438         SIZE_MAX is a valid preprocessor constant.
16439         (__argp_basename): Change from "#ifndef _LIBC"
16440         to "#ifndef __argp_short_program_name", so that
16441         we don't compile these functions for tar.
16442
16443         More merges from coreutils.
16444         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16445         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16446         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16447         * lib/addext.c: Remove; no longer needed.
16448         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16449         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16450         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16451         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16452         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16453         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16454         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16455         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16456         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16457         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16458         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16459         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16460         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16461         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16462         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16463         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16464         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16465         Import changes from coreutils.
16466
16467 2004-08-05  Simon Josefsson  <jas@extundo.com>
16468
16469         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16470
16471 2004-08-05  Simon Josefsson  <jas@extundo.com>
16472
16473         * m4/getsubopt.m4: New file.
16474
16475 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16476
16477         Merge from coreutils.
16478
16479         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16480         * m4/getcwd-path-max.m4: New files.
16481
16482         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16483         FILESYSTEM_PREFIX_LEN ->
16484         FILE_SYSTEM_PREFIX_LEN.
16485         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16486         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16487         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16488         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16489
16490         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16491         prerequisite modules now handle the DOS stuff.
16492         Don't check for unistd.h.
16493
16494 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16495
16496         Merge from coreutils.
16497
16498         * lib/.gdb-history: Remove; this doesn't belong here.
16499
16500         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16501         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16502         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16503         * lib/getcwd.c: New files.
16504
16505         * lib/dirname.h: Include <stdbool.h>.
16506         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16507         for consistency with POSIX terminology.  All uses changed.
16508         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16509         (strip_trailing_slashes): Use bool for booleans.
16510         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16511
16512         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16513         sometimes returns a positive errno value even when it succeeds.
16514         (print_errno_message) [!LIBC]: Fall back on strerror if
16515         __strerror_r fails.
16516
16517         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16518         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16519         (longest_relative_suffix): New function.
16520         (path_concat): Use it.  Assume first argument is not NULL.
16521         Port to DOS.  Omit redundant separators.
16522         Report an error instead of returning NULL.
16523         Use mempcpy instead of memcpy.
16524         (xpath_concat): Remove: not declared or used.
16525
16526         * lib/same.h: Include <stdbool.h>
16527         (same_name): Return bool, not int.
16528         * lib/same.c (same_name): Likewise.
16529         (errno): Don't declare; we assume C89 or better now.
16530
16531         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16532         if not already defined.
16533
16534         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16535         * lib/dup-safer.c (errno): Likewise.
16536
16537 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16538
16539         Merge from coreutils.
16540         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16541         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16542         * modules/path-concat: Don't depend on strdup.
16543
16544 2004-08-03  Simon Josefsson  <jas@extundo.com>
16545
16546         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16547         * lib/progname.h: Don't include stdbool.h.
16548
16549 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16550
16551         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16552         * MODULES.html.sh (func_all_modules): Remove fatal.
16553
16554 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16555
16556         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16557
16558 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16559
16560         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16561         working.
16562
16563 2004-08-02  Simon Josefsson  <jas@extundo.com>
16564
16565         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16566         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16567         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16568
16569 2004-08-01  Simon Josefsson  <jas@extundo.com>
16570
16571         * lib/xgetdomainname.c: Include stdlib.h, for free().
16572
16573 2004-07-19  Bruno Haible  <bruno@clisp.org>
16574
16575         * MODULES.html.sh (func_all_modules): Add dummy.
16576
16577 2004-07-16  Simon Josefsson  <jas@extundo.com>
16578
16579         * modules/dummy: New file.
16580
16581 2004-07-16  Simon Josefsson  <jas@extundo.com>
16582
16583         * lib/dummy.c: New file.
16584
16585 2004-07-16  Bruno Haible  <bruno@clisp.org>
16586
16587         * lib/backupfile.h: Add extern "C" for C++.
16588         * lib/closeout.h: Likewise.
16589         * lib/copy-file.h: Likewise.
16590         * lib/findprog.h: Likewise.
16591         * lib/full-write.h: Likewise.
16592         * lib/pathname.h: Likewise.
16593         * lib/progname.h: Likewise.
16594         * lib/stpcpy.h: Likewise.
16595         * lib/stpncpy.h: Likewise.
16596         * lib/strcase.h: Likewise.
16597         * lib/strstr.h: Likewise.
16598         * lib/xalloc.h: Likewise.
16599
16600         * lib/mbswidth.h: Add extern "C" for C++.
16601         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16602
16603 2004-07-13  Robert Millan  <robertmh@gnu.org>
16604
16605         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16606
16607 2004-07-09  Simon Josefsson  <jas@extundo.com>
16608
16609         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16610         failed without this.)
16611
16612 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16613
16614         * modules/chown (Files): Add lib/fchown-stub.c, since
16615         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16616
16617 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16618
16619         * lib/fchown-stub.c: New file.
16620
16621 2004-06-24  Jim Meyering  <jim@meyering.net>
16622
16623         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16624
16625 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16626
16627         * modules/argz: Omit "#include".
16628
16629         * MODULES.html.sh (func_all_modules): Add calloc, to match
16630         2004-06-01 addition of calloc module.
16631
16632 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16633
16634         * m4/argz.m4: New file, which is autoupdated from libtool.
16635
16636 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16637
16638         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16639         libtool.
16640
16641 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16642
16643         * config/srclist-update: Don't insist on "USA." before the
16644         close-comment, as libtool omits the period and puts the */ on a
16645         separate line.
16646         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16647         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16648
16649 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16650
16651         * modules/argz: New file.
16652         * MODULES.html.sh (func_all_modules): Add argz.
16653
16654 2004-06-12  Jim Meyering  <jim@meyering.net>
16655         and  Paul Eggert  <eggert@cs.ucla.edu>
16656
16657         * modules/hash (Files): Add lib/xalloc.h.
16658         * modules/pipe (Depends-on): Add wait-process.
16659         * modules/stat (Depends-on): Add xalloc.
16660         * modules/userspec (Files): Add lib/userspec.h.
16661         * modules/xstrto
16662
16663         Upgrade from gettext-0.13.
16664         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16665         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16666         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16667
16668 2004-06-10  Jim Meyering  <jim@meyering.net>
16669
16670         * lib/calloc.c: New file.
16671
16672 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16673
16674         * lib/getdate.y (yylex): Allow space between sign and number.
16675         Problem reported by Dan Jacobson.
16676
16677 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16678
16679         Merge from coreutils CVS.
16680
16681         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16682         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16683         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16684         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16685         xstrtol.m4: Fix copyright date and/or serial number.
16686
16687         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16688         See if we need an fchown replacement.
16689         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16690         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16691         and use the replacement function if we detect either defect.
16692
16693         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16694         gl_UTIMECMP.
16695
16696 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16697         and  Jim Meyering  <jim@meyering.net>
16698
16699         Merge from coreutils CVS.
16700
16701         * lib/stat-macros.h: New file, with contents from file-type.h
16702         and coreutils' system.h.
16703         * lib/file-type.c: Include "stat-macros.h".
16704         * lib/file-type.h (file_type): Move all macro definitions to new file,
16705         stat-macros.h.
16706
16707         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16708         Wrap old code with this conditional.
16709         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16710         function that does not dereference symlinks.
16711         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16712
16713         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16714         dependency problems.
16715         (xreadlink): Accept new arg SIZE, for efficiency.
16716         All decls and uses changed.
16717         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16718
16719         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16720         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16721
16722         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16723         sysexits.h.
16724
16725 2004-06-01  Jim Meyering  <jim@meyering.net>
16726
16727         * m4/calloc.m4: New file.
16728
16729 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16730
16731         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16732         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16733         Also, fix a typo in a diagnostic.
16734
16735 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16736
16737         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16738         or AC_FUNC_REALLOC.
16739
16740 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16741
16742         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16743         macros to be defined.
16744         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16745         the allocator returns NULL because the requested size is zero.
16746
16747 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16748
16749         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16750         var.  Add comment explaining why libc still defines it.  This
16751         merges the following patch from glibc:
16752         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16753
16754 2004-05-20  Andreas Schwab  <schwab@suse.de>
16755
16756         * m4/free.m4: Replace free if it not known to work, not the other
16757         way round.
16758
16759 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16760
16761         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16762         present in glibc since revision 1.1 of this file.
16763         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16764         obstack_alignment_mask, obstack_alloc, obstack_base,
16765         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16766         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16767         obstack_grow0, obstack_init, obstack_int_grow,
16768         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16769         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16770         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16771         nonexistent functions.
16772
16773 2004-05-18  Karl Berry  <karl@gnu.org>
16774
16775         * config/srclist.txt: break link for vasnprintf.c.
16776
16777 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16778
16779         Port obstack to the AS/400, where pointers are 16 bytes wide and
16780         you cannot cast an integer to a valid pointer.  This patch is
16781         currently waiting to be integrated into glibc; see
16782         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16783
16784         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16785         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16786         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16787         (struct obstack): temp member is now a union of a pointer and
16788         an integer, instead of an integer.  All integer uses changed.
16789         This does not affect the physical layout of struct obstack,
16790         except on hosts (like the AS/400) where the size or alignment of
16791         void * is greater than that of ptrdiff_t.
16792         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16793         __STDC__)]: Store temporary in pointer member of union, not
16794         integer member.
16795         * lib/obstack.c: Include <stddef.h>, for offsetof.
16796         (struct fooalign): Remove; it doesn't need a name.
16797         (union fooround): Change double to long double, and add void *.
16798         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16799         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16800         not a macro.  Hence the values are always int; so remove all
16801         casts-to-int in uses.
16802
16803 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16804
16805         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16806         we can get this patch merged into glibc.
16807
16808 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16809             Paul Eggert  <eggert@cs.ucla.edu>
16810
16811         * m4/argp: Depend on alloca.
16812
16813 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16814             Paul Eggert  <eggert@cs.ucla.edu>
16815
16816         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16817         freecoding.
16818
16819 2004-05-17  Bruno Haible  <bruno@clisp.org>
16820
16821         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16822         precision that consists of a '.' followed by an empty digit string.
16823         Patch by Tor Lillqvist <tml@iki.fi>.
16824
16825 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16826
16827         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16828         for backward compatibility with older code.  We need our own
16829         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16830         it under some other name, and our alloca.h will define it.
16831
16832 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16833             Derek Price  <derek@ximbiot.com>
16834
16835         * lib/alloca.c: Include <alloca.h>, to get our interface.
16836         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16837         include <alloca.h> first.  Use C89 prototype for alloca; this
16838         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16839         Use #elif for simplicity, since we can assume C89 now.
16840         Don't try to source the system alloca.h since it will not be found
16841         and to prevent recursively including its replacement.
16842         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16843         * lib/regex.c: Likewise.
16844
16845 2004-05-16  Derek Price  <derek@ximbiot.com>
16846             Paul Eggert  <eggert@cs.ucla.edu>
16847
16848         getline cleanup.  This changes the getndelim2 API: both order of
16849         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16850         no delimiter).
16851
16852         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16853         interface does that.
16854         (getline): Always use getdelim, so that we don't have two
16855         copies of this code.
16856         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16857         if available.
16858         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16859         (GETNDELIM2_MAXIMUM): New macro.
16860         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16861         instead of the old practice of delim2==0.  All callers changed.
16862         Return -1 on overflow, instead of returning junk.
16863         Do not set *linesize unless allocation succeeds.
16864         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16865         that we include sys/types.h.
16866         * lib/getnline.h: Likewise.
16867         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16868         (getndelim2): Reorder arguments.
16869         * lib/getnline.c (getnline, getndelim):
16870         Don't discard the NMAX argument.
16871         (getnline): Invoke getndelim, to avoid code duplication.
16872         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16873         of (size_t) -1 by callers of the getnline family.
16874
16875 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16876
16877         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16878         Check for gettimeofday.
16879         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16880         Check for settimeofday, stime.
16881
16882 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16883
16884         * lib/nanosleep.c (suspended): Change its type from int to
16885         sig_atomic_t volatile.
16886         (first_call): Make it private to rpl_nanosleep, and have it
16887         be zero initially as that's a bit faster.
16888         (my_usleep): Round up fractional times instead of truncating them,
16889         as this is the usual meaning for 'sleep'.
16890
16891         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16892         doesn't work.
16893         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16894         (ENOSYS): Define if not defined.
16895         (settime): Fall back on stime if it exists and settimeofday fails.
16896         But don't bother with fallbacks if a method fails with errno == EPERM.
16897
16898 2004-05-11  Jim Meyering  <jim@meyering.net>
16899
16900         Prior to this change, the save_cwd caller required read access to the
16901         current directory on most systems (ones with the fchdir function).
16902
16903         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16904         fails, try write-only, and finally, resort to using xgetcwd.
16905
16906 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16907
16908         * lib/obstack.c, obstack.h: Import changes from libc.
16909
16910 2004-04-28  Bruno Haible  <bruno@clisp.org>
16911
16912         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16913         also implicitly appends .exe to executables.
16914         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16915         accepts Windows pathnames.
16916         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16917         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16918         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16919         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16920         Reported by Derek Robert Price <derek@ximbiot.com>.
16921
16922 2004-04-21  Karl Berry  <karl@gnu.org>
16923
16924         * config/srclist.txt (localcharset.c): break sync.
16925
16926 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16927
16928         * m4/host-os.m4: Add a copyright notice.
16929
16930 2004-04-20  Jim Meyering  <jim@meyering.net>
16931
16932         Change UTILS_ to gl_ in AC_DEFINE'd names.
16933         Change utils_- and jm_-prefixed variables, too.
16934         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16935         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16936         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16937
16938         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16939         Don't emit trailing blanks.
16940         Also rename jm_-prefixed variables to have gl_ prefix.
16941
16942         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16943         Also rename jm_-prefixed variables to have gl_ prefix.
16944
16945         * m4/jm-macros.m4: Reflect the renamings.
16946         * m4/prereq.m4: Likewise.
16947
16948 2004-04-20  Jim Meyering  <jim@meyering.net>
16949
16950         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16951         memory.
16952
16953 2004-04-20  Jim Meyering  <jim@meyering.net>
16954             Bruno Haible  <bruno@clisp.org>
16955
16956         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16957         memory when realloc fails.
16958
16959 2004-04-19  Jim Meyering  <jim@meyering.net>
16960
16961         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16962         now that readutmp.c may call `free (0)'.
16963
16964 2004-04-19  Bruno Haible  <bruno@clisp.org>
16965
16966         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16967         * m4/inttypes_h.m4: Likewise.
16968         * m4/stdint_h.m4: Likewise.
16969         * m4/intmax_t.m4: Likewise.
16970         * m4/uintmax_t.m4: Likewise.
16971
16972 2004-04-18  Jim Meyering  <jim@meyering.net>
16973
16974         * m4/prereq.m4: Don't forbid jm_ prefix.
16975
16976         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16977         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16978         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16979         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16980         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16981         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16982         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16983         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16984         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16985         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16986         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16987         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16988         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16989         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16990         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16991         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16992         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16993         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16994         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16995
16996 2004-04-18  Jim Meyering  <jim@meyering.net>
16997
16998         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16999         failure, don't leak memory and do call END_UTMP_ENT.
17000
17001 2004-04-16  Jim Meyering  <jim@meyering.net>
17002
17003         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
17004         coreutils' stat program.
17005         (gl_PREREQ): Don't require jm_PREREQ_STAT.
17006
17007 2004-04-11  Paul Eggert  <eggert@twinsun.com>
17008
17009         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
17010         C89.
17011         (CHAR_BIT): Remove, since we assume C89.
17012         Include <stdint.h> if available, as per current Autoconf CVS advice.
17013
17014 2004-03-31  Jim Meyering  <jim@meyering.net>
17015
17016         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
17017         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
17018         * m4/xalloc.m4: Likewise.
17019
17020 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17021
17022         Merge from coreutils.
17023
17024         * m4/inttostr.m4: New file.
17025         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17026         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17027         Require gl_CLOCK_TIME.
17028         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17029
17030 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17031
17032         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17033         not bool, to be more consistent with Unix conventions.
17034         Suggested by Bruno Haible.
17035
17036         Merge from coreutils.
17037
17038         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17039         * lib/umaxtostr.c: New files.
17040
17041         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17042         the usual <time.h> dance.
17043         (get_date): Change signature to support fractional time stamps.
17044         All callers changed.
17045         * lib/getdate.y: Include "getdate.h" first, as we can now
17046         assume C89 and don't need to worry about 'const'.
17047         Similarly, include "unlocked-io.h" near start, not in middle.
17048         Include <limits.h>.
17049         (textint.value): Use long int rather than int.
17050         (textint.digits): Use size_t rather than int.
17051         (BILLION, LOG10_BILLION): New constants.
17052         (parser_control): New member rel_ns.  Members day_ordinal,
17053         time_zone, month, day, hour, minutes, rel_year, rel_month,
17054         rel_day, rel_hour, rel_minutes, rel_seconds
17055         are now long int, not int.  Member seconds is now struct timespec,
17056         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17057         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17058         not int.
17059         (%union.intval): Now long int, not int.
17060         New member timespec.
17061         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17062         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17063         (spec): Now is a timespec or an item list.
17064         (timespec, items): New nonterminals.
17065         (time, rel, relunit, number, get_date):
17066         Add support for fractional seconds.
17067         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17068         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17069         (to_hour): First arg is now long int, not int.
17070         (to_year): Returns long int, not int.
17071         Don't treat year -70 like 70.
17072         (tm_diff): Returns long int, not int.
17073         (lookup_word): Use bool instead of int when appropriate.
17074         (yylex): Use size_t for count, not int.
17075         Detect overflow when parsing large integer constants.
17076         Add support for fractions.
17077         (get_date): Make pointers 'const' if possible.
17078         Use more-portable code to detect integer overflow.
17079         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17080         Don't use ctime; it's not reliable if the year has >4 digits.
17081
17082         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17083         This is for compatibility with BSD.
17084
17085         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17086         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17087         From coreutils' system.h.
17088
17089         * lib/userspec.c: Don't include "posixver.h".
17090         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17091         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17092         compatible extension.  Simplify code by removing a boolean int
17093         that was always nonzero if a string was nonnull.
17094
17095 2004-03-30  Jim Meyering  <jim@meyering.net>
17096
17097         Merge from coreutils.
17098
17099         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17100         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17101         on some systems one must include <grp.h> before it.
17102         Reported by Christian Krackowizer.
17103
17104 2004-03-30  Jim Meyering  <jim@meyering.net>
17105
17106         Merge from coreutils.
17107
17108         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17109
17110         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17111         an empty input stream.
17112
17113         * lib/readtokens.c: Include <stdbool.h>.
17114         (readtoken): Use `size_t' rather than int/long.
17115         All callers adjusted.
17116         Use `bool' rather than `int' where appropriate.
17117         Use memset rather than an explicit loop.
17118         Use x2nrealloc rather than xrealloc.
17119         Allow the use of `\0' as a delimiter.
17120         (readtokens): Likewise.
17121         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17122
17123 2004-03-30  Jim Meyering  <jim@meyering.net>
17124
17125         * m4/realloc.m4: Remove file, since now it does no more than
17126         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17127         the `configure.ac' section of module/realloc.
17128         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17129
17130 2004-03-30  Bruno Haible  <bruno@clisp.org>
17131
17132         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17133         nonnull.
17134
17135 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17136
17137         Merge changes to getloadavg.c from coreutils and Emacs.
17138
17139         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17140         Define to an expression, not to the empty string.
17141         Include cloexec.h and xalloc.h.
17142         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17143         Use set_cloexec_flag rather than rolling our own.
17144         * lib/cloexec.c, lib/cloexec.h: New files.
17145
17146 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17147
17148         * m4/cloexec.m4: New file.
17149
17150 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17151
17152         * lib/getopt.h: Sync with libc CVS.
17153
17154 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17155             Bruno Haible  <bruno@clisp.org>
17156
17157         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17158         mbswidth.
17159
17160 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17161             Bruno Haible  <bruno@clisp.org>
17162
17163         * lib/mbswidth.h: Include <wchar.h> only if
17164         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17165         <wchar.h>.
17166         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17167
17168 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17169
17170         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17171         Sync with libc CVS.
17172         * lib/getopt_int.h: New file, also synced from libc.
17173
17174 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17175
17176         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17177         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17178         Bring back getopt.c, getopt.h, getopt1.c.
17179
17180 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17181
17182         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17183         All uses changed.  Check for sa_sigaction member; this fixes
17184         a bug first reported by Jason Andrade in
17185         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17186
17187 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17188
17189         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17190         '#if' expressions.  Unlike the code it replaces, it does not
17191         depend on (defined _SC_PAGESIZE).  However, it does depend on
17192         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17193         first reported by Jason Andrade in
17194         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17195
17196 2004-02-25  Simon Josefsson  <jas@extundo.com>
17197
17198         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17199
17200 2004-02-25  Simon Josefsson  <jas@extundo.com>
17201
17202         * lib/strdup.h: New file.
17203         * lib/strdup.c: Include it.
17204         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17205         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17206
17207 2004-02-23  Karl Berry  <karl@gnu.org>
17208
17209         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17210         (from fencepost.gnu.org:/gd/gnuorg).
17211
17212 2004-02-23  Karl Berry  <karl@gnu.org>
17213
17214         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17215         * config/srclist.txt: add maintain/standards documents.
17216
17217 2004-02-18  Bruno Haible  <bruno@clisp.org>
17218
17219         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17220         Reported by Derek Robert Price <derek@ximbiot.com>.
17221
17222 2004-02-16  Karl Berry  <karl@gnu.org>
17223
17224         * config/mkinstalldirs, install-sh: update from automake.
17225
17226 2004-02-06  Karl Berry  <karl@gnu.org>
17227
17228         * m4/po.m4: update from gettext 0.14.1.
17229
17230 2004-02-06  Karl Berry  <karl@gnu.org>
17231
17232         * lib/config.charset: update from gettext 0.14.1.
17233
17234 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17235
17236         Add comments and code, prompted by suggestions from Bruno Haible
17237         for sh-quote.
17238         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17239         describing the enum quoting_style values.
17240         * lib/quotearg.c (quotearg_alloc): New function.
17241         (quotearg_buffer_restyled): Treat lone { and } as special.
17242         Treat = as special.  Work around bug with older shells
17243         that "see" a '\' that is really the 2nd byte of a multibyte char.
17244         Quote empty string with shell_quoting_style.
17245
17246 2004-02-03  Bruno Haible  <bruno@clisp.org>
17247
17248         * m4/pipe.m4: New file, from GNU gettext.
17249
17250 2004-02-03  Bruno Haible  <bruno@clisp.org>
17251
17252         * lib/pipe.h: New file, from GNU gettext.
17253         * lib/pipe.c: New file, from GNU gettext.
17254
17255 2004-01-27  Bruno Haible  <bruno@clisp.org>
17256
17257         * m4/execute.m4: New file, from GNU gettext.
17258
17259 2004-01-27  Bruno Haible  <bruno@clisp.org>
17260
17261         * lib/execute.h: New file, from GNU gettext.
17262         * lib/execute.c: New file, from GNU gettext.
17263         * lib/w32spawn.h: New file, from GNU gettext.
17264
17265 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17266
17267         Merge from diffutils.
17268
17269         * lib/file-type.c (file_type): Add typed memory objects.
17270         * lib/file-type.h (S_TYPEISTMO): New macro.
17271
17272         * lib/c-stack.h (c_stack_action): Remove argv argument.
17273         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17274         (die): Don't calculate message unless segv_action returns.
17275         (get_stack_location, min_address_from_argv, max_address_from_argv,
17276         volatile stack_base, volatile_stack_size): Remove.
17277         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17278         that every segmentation violation is a stack overflow.  (Ouch!)
17279         See Debian bug 136249 (still outstanding) for more info about why
17280         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17281
17282 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17283
17284         Exit-status fix from coreutils.
17285
17286         Use exit_failure consistently in place of EXIT_FAILURE,
17287         so that program exit statuses are consistent on failure.
17288
17289         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17290         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17291         * lib/argmatch.h: Comment fix to match the above.
17292         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17293         Now a macro referring to exit_failure, instead of a separate
17294         variable.  Include "exitfail.h" to get it.
17295         * lib/xstrtol.h: Include "exitfail.h".
17296         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17297
17298         * lib/long-options.c (parse_long_options): Use prototype
17299         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17300         for clarity.
17301
17302 2004-01-21  Jim Meyering  <jim@meyering.net>
17303
17304         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17305         so as not to conflict with a different-sized __mktime_internal
17306         function in GNU libc.
17307         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17308         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17309
17310 2004-01-20  Karl Berry  <karl@gnu.org>
17311
17312         * config/config.guess: update from config.
17313
17314         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17315
17316 2004-01-20  Bruno Haible  <bruno@clisp.org>
17317
17318         Safer stack allocation.
17319         * lib/setenv.c: Include allocsa.h.
17320         (alloca): Remove fallback definition.
17321         (freea): Remove macro.
17322         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17323         instead of freea.
17324
17325 2004-01-20  Bruno Haible  <bruno@clisp.org>
17326
17327         * m4/eealloc.m4: New file, from GNU gettext.
17328
17329 2004-01-20  Bruno Haible  <bruno@clisp.org>
17330
17331         * m4/allocsa.m4: New file, from GNU gettext.
17332
17333 2004-01-20  Bruno Haible  <bruno@clisp.org>
17334
17335         * lib/xallocsa.h: New file, from GNU gettext.
17336         * lib/xallocsa.c: New file, from GNU gettext.
17337
17338 2004-01-20  Bruno Haible  <bruno@clisp.org>
17339
17340         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17341
17342 2004-01-20  Bruno Haible  <bruno@clisp.org>
17343
17344         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17345         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17346         specially.
17347
17348 2004-01-20  Bruno Haible  <bruno@clisp.org>
17349
17350         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17351         patch.
17352
17353 2004-01-20  Bruno Haible  <bruno@clisp.org>
17354
17355         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17356
17357 2004-01-20  Bruno Haible  <bruno@clisp.org>
17358
17359         * lib/eealloc.h: New file.
17360
17361 2004-01-20  Bruno Haible  <bruno@clisp.org>
17362
17363         * lib/binary-io.h: Avoid warnings on Cygwin.
17364
17365 2004-01-20  Bruno Haible  <bruno@clisp.org>
17366
17367         * lib/allocsa.h: New file, from GNU gettext.
17368         * lib/allocsa.c: New file, from GNU gettext.
17369
17370 2004-01-18  Karl Berry  <karl@gnu.org>
17371
17372         * doc/gpl.texi, doc/lgpl.texi: new files.
17373
17374 2004-01-18  Karl Berry  <karl@gnu.org>
17375
17376         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17377         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17378
17379 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17380
17381         Merge from coreutils.
17382
17383         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17384         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17385         (gl_DEFAULT_POSIX2_VERSION): Move
17386         the documentation from 'configure' into 'config.hin',
17387         so that 'configure --help' isn't burdened by it and
17388         we don't have to worry about its formatting there.
17389         Reword the documentation so that it's more succinct
17390         and can be run together into a single paragraph.
17391         * m4/same.m4 (gl_SAME): Check for pathconf.
17392
17393 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17394
17395         Merge from coreutils.
17396
17397         * lib/posixver.c: Include posixver.h.
17398
17399         * lib/same.c: Include <stdbool.h>, <limits.h>.
17400         (_POSIX_NAME_MAX): Define if not defined.
17401         (MIN): New macro.
17402         (same_name): If file names are silently truncated, report
17403         that the file names are the same if they are the same after
17404         the silent truncation.
17405
17406         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17407         conversion function.
17408         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17409         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17410         longer needed.
17411
17412 2004-01-15  Jim Meyering  <jim@meyering.net>
17413
17414         Merge from coreutils.
17415
17416         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17417         if no library is required.
17418         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17419         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17420         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17421         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17422         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17423         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17424         value, $ac_cv_search_crypt, if it's "none required".
17425         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17426         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17427         not gl_FUNC_GETLOADAVG.
17428         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17429         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17430
17431 2004-01-15  Jim Meyering  <jim@meyering.net>
17432
17433         Merge from coreutils.
17434
17435         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17436         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17437         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17438
17439         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17440         optional configure-time default.
17441
17442         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17443
17444         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17445
17446 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17447
17448         Merge from coreutils.
17449
17450         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17451         value, $ac_cv_search_nanosleep, if it's "none required".
17452
17453 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17454
17455         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17456         with like-named macro in fnmatch.c.
17457         (EXT): Use an internal constant instead.
17458
17459         Merge fnmatch patches from glibc.
17460         * lib/fnmatch.c (mbsinit): Remove define.
17461         Add libc_hidden_ver (__fnmatch, fnmatch).
17462         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17463         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17464
17465 2004-01-14  Karl Berry  <karl@gnu.org>
17466
17467         * config/install-sh: update from automake.
17468
17469 2004-01-13  Karl Berry  <karl@gnu.org>
17470
17471         * config/install-sh: update from automake.
17472
17473 2004-01-09  Karl Berry  <karl@gnu.org>
17474
17475         * config/install-sh: update from automake.
17476
17477 2004-01-05  Karl Berry  <karl@gnu.org>
17478
17479         * config/config.{sub,guess}: update from config.
17480
17481 2003-12-31  Karl Berry  <karl@gnu.org>
17482
17483         * config/depcomp: update from automake.
17484
17485 2003-12-14  Karl Berry  <karl@gnu.org>
17486
17487         * lib/config.charset: update from gettext-runtime.
17488
17489 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17490
17491         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17492         Bug reported by Alfred M. Szmidt.
17493
17494 2003-12-03  Bruno Haible  <bruno@clisp.org>
17495
17496         * m4/gettext.m4: Upgrade from gettext-0.13.
17497         * m4/po.m4: Upgrade from gettext-0.13.
17498         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17499         * m4/intmax.m4: New file, from gettext-0.13.
17500         * m4/printf-posix.m4: New file, from gettext-0.13.
17501
17502 2003-11-29  Karl Berry  <karl@gnu.org>
17503
17504         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17505
17506 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17507             Bruno Haible  <bruno@clisp.org>
17508
17509         * lib/printf-parse.h: Don't include sys/types.h.
17510         (ARG_NONE): New macro.
17511         (char_directive): Change type of *arg_index fields to size_t.
17512         * lib/printf-parse.c: Don't include sys/types.h.
17513         (SSIZE_MAX): Remove macro.
17514         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17515         Remove unnecessary overflow check.
17516         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17517         fields.
17518
17519 2003-11-25  Bruno Haible  <bruno@clisp.org>
17520
17521         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17522
17523 2003-11-25  Bruno Haible  <bruno@clisp.org>
17524
17525         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17526         gt_TYPE_SSIZE_T.
17527
17528 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17529
17530         * modules/alloca: Remove dependency on xalloc.
17531
17532 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17533
17534         * lib/alloca.c: Remove dependency on xalloc module.
17535         (xalloc_die): Remove.
17536         (memory_full) [!defined emacs]: New macro.
17537         [!defined emacs]: Don't include xalloc.h.
17538         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17539         address arithmetic overflows.  Change datatypes a bit to avoid
17540         unnecessary casts.
17541
17542 2003-11-22  Jim Meyering  <jim@meyering.net>
17543
17544         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17545         s/size/size_t/.
17546
17547 2003-11-21  Karl Berry  <karl@gnu.org>
17548
17549         * config/config.{sub,guess}: update from config.
17550
17551 2003-11-18  Karl Berry  <karl@gnu.org>
17552
17553         * config/config.{sub,guess}: update from config.
17554
17555         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17556
17557 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17558
17559         * README: Mention that S+T cannot overflow if S is the size of
17560         an existing object and T is sufficiently small.
17561
17562 2003-11-17  Jim Meyering  <jim@meyering.net>
17563
17564         On systems without utime and without a utimes function capable of
17565         dealing with a NULL struct utimbuf* argument, this utime replacement
17566         could -- in unusual circumstances -- leak a file descriptor.
17567         * lib/utime.c: Include <unistd.h> and <errno.h>.
17568         (utime_null): Be sure to close `fd' and to preserve errno.
17569         Reported by Geoff Collyer via Arnold Robbins.
17570
17571 2003-11-17  Bruno Haible  <bruno@clisp.org>
17572
17573         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17574         (Depends-on): Add xsize.
17575
17576 2003-11-17  Bruno Haible  <bruno@clisp.org>
17577
17578         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17579
17580 2003-11-17  Bruno Haible  <bruno@clisp.org>
17581
17582         * lib/vasnprintf.c (alloca): Remove fallback definition.
17583         (freea): Remove definition.
17584         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17585         Reported by Paul Eggert.
17586
17587 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17588             Bruno Haible  <bruno@clisp.org>
17589
17590         Protect against address arithmetic overflow.
17591         * lib/printf-args.h: Include stddef.h.
17592         (arguments): Change type of field 'count' to size_t.
17593         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17594         'unsigned int' where appropriate.
17595         * lib/printf-parse.h: Include sys/types.h.
17596         (char_directive): Change type of *arg_index fields to ssize_t.
17597         (char_directives): Change type of fields 'count', max_*_length to
17598         size_t.
17599         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17600         (SSIZE_MAX): Define fallback value.
17601         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17602         instead of 'int' where appropriate. Check a_allocated, d_allocated
17603         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17604         * lib/vasnprintf.c: Include xsize.h.
17605         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17606         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17607         overflow. Avoid wraparound when converting a width or precision from
17608         decimal to binary.
17609
17610 2003-11-16  Bruno Haible  <bruno@clisp.org>
17611
17612         Update from GNU gettext.
17613         * lib/printf-parse.c: Generalize to it can be compiled for wide
17614         strings.
17615         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17616         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17617         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17618         SNPRINTF): New macros.
17619         Don't include <alloca.h> if the file is used inside libintl.
17620         (local_wcslen): New function, for Solaris 2.5.1.
17621         (VASNPRINTF): Use it instead of wcslen.
17622
17623 2003-11-16  Bruno Haible  <bruno@clisp.org>
17624
17625         * lib/xsize.h (xmax): New function.
17626         (xsum, xsum3, xsum4): Declare as "pure" functions.
17627
17628 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17629
17630         * modules/xalloc (Files): Undo latest change, since xalloc.h
17631         no longer needs SIZE_MAX or PTRDIFF_MAX.
17632
17633 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17634
17635         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17636         gl_PTRDIFF_MAX.
17637
17638 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17639
17640         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17641         "return", to pacify some unknown compiler.  Problem reported
17642         by Joerg Schilling.
17643
17644 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17645
17646         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17647         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17648         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17649         heuristic is just as accurate as far as we know, and it removes a
17650         dependency on size_max.m4 and ptrdiff_max.m4.
17651
17652 2003-11-11  Bruno Haible  <bruno@clisp.org>
17653
17654         * modules/xsize (Files): Add m4/size_max.m4.
17655         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17656
17657 2003-11-11  Bruno Haible  <bruno@clisp.org>
17658
17659         * m4/size_max.m4: New file.
17660         * m4/ptrdiff_max.m4: New file.
17661         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17662         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17663         (gl_XALLOC): Invoke it.
17664
17665 2003-11-11  Bruno Haible  <bruno@clisp.org>
17666
17667         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17668         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17669         defined.
17670
17671 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17672
17673         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17674         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17675         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17676         From Bruno Haible.
17677         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17678         not (size_t) -1, since it's defined here.
17679
17680 2003-11-09  Karl Berry  <karl@gnu.org>
17681
17682         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17683
17684 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17685
17686         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17687         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17688         Reject sizes of exactly SIZE_MAX bytes.
17689         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17690         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17691
17692 2003-11-05  Bruno Haible  <bruno@clisp.org>
17693
17694         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17695         SIZE_MAX defined in <limits.h> on Solaris.
17696
17697 2003-11-04  Jim Meyering  <jim@meyering.net>
17698
17699         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17700         variable names, rather than @VAR@.
17701         * modules/poll: Likewise.
17702
17703 2003-11-04  Bruno Haible  <bruno@clisp.org>
17704
17705         * modules/xsize: New file.
17706         * modules/linebreak: Depend on xsize.
17707         * MODULES.html.sh (func_all_modules): Add xsize.
17708
17709 2003-11-04  Bruno Haible  <bruno@clisp.org>
17710
17711         * m4/xsize.m4: New file.
17712
17713 2003-11-04  Bruno Haible  <bruno@clisp.org>
17714
17715         * lib/xsize.h: New file.
17716         * lib/linebreak.c: Include xsize.h.
17717         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17718         argument for overflow.
17719         Suggested by Paul Eggert.
17720
17721 2003-11-03  Karl Berry  <karl@gnu.org>
17722
17723         * config/config.{guess,sub}: update from config.
17724
17725 2003-11-03  Jim Meyering  <jim@meyering.net>
17726
17727         * modules/userspec (lib_SOURCES): Add userspec.h.
17728         (Include): Add "userspec.h".
17729         Improve description.
17730
17731 2003-11-03  Jim Meyering  <jim@meyering.net>
17732
17733         * lib/userspec.c: Include "userspec.h".
17734         * lib/userspec.h: New file.
17735
17736 2003-11-03  Bruno Haible  <bruno@clisp.org>
17737
17738         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17739
17740 2003-11-03  Bruno Haible  <bruno@clisp.org>
17741
17742         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17743         available, to avoid (extremely rare) race condition.
17744         Suggested by Paul Eggert.
17745
17746 2003-11-02  Karl Berry  <karl@gnu.org>
17747
17748         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17749
17750 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17751
17752         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17753         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17754         (read_filesystem_list): Set and use me_type_malloced.
17755         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17756         whatever the type happens to be), for brevity and consistency.
17757         Check for size calculation overflow on Alphas running OSF/1.
17758
17759 2003-10-31  Jim Meyering  <jim@meyering.net>
17760
17761         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17762
17763         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17764
17765 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17766             Bruno Haible  <bruno@clisp.org>
17767
17768         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17769         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17770
17771 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17772
17773         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17774         netbsd*-gnu*.  Suggested by Robert Millan.
17775
17776 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17777
17778         * modules/group-member: Depend on stdbool.
17779
17780 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17781
17782         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17783
17784 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17785
17786         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17787         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17788         after the 'gnu' in these cases.  This fixes some bugs in the
17789         previous change, and is based on suggestions by Robert Millan.
17790
17791 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17792
17793         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17794         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17795         no longer needed.
17796         * lib/quotearg.c (quotearg_n_options): Use it.
17797         * lib/group-member.c: Include <stdbool.h>.
17798         (free_group_info): Arg is now const *; don't free arg.
17799         (get_group_info): Now returns bool and accepts struct group_info *,
17800         rather than returning a malloc'ed struct group_info *.
17801         All uses changed.  Check for overflow in internal size calculation.
17802
17803         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17804         rather than xmalloc/xrealloc.
17805         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17806         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17807         conformance bug: the old code used a pointer after freeing the
17808         storage that it addressed.
17809         * lib/hash.c (hash_initialize): Simplify the code by using
17810         xalloc_oversized rather than doing it by hand.
17811         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17812         the buffer preserved.  Use free and xmalloc instead.
17813         * lib/quotearg.c (quotearg_n_options): Likewise.
17814         Use a simpler test for size overflow.  Don't use xalloc_oversized
17815         because unsigned int might be wider than size_t (!); this suggests
17816         that we should switch from unsigned int to size_t for slot numbers.
17817
17818 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17819
17820         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17821         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17822         NetBSD kernels.  Requested by Richard Stallman.
17823
17824 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17825
17826         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17827         to allocate the returned structure.  Do not allocate a subarray,
17828         as x2nrealloc will do that.
17829         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17830         instead of xnrealloc.
17831         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17832
17833 2003-10-27  Bruno Haible  <bruno@clisp.org>
17834
17835         * lib/stdbool_.h: Better support for BeOS.
17836
17837 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17838
17839         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17840         now uses inline.
17841
17842 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17843
17844         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17845         callers that want to do their own size-overflow checking.  Include
17846         <stdbool.h>, since xalloc_oversized returns bool.
17847         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17848         to use xalloc_oversized.
17849
17850         Add two functions x2realloc, x2nrealloc, for programs that grow
17851         arrays dynamically by doubling their sizes.
17852         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17853         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17854         New functions.
17855
17856         Port to C99 semantics for 'inline' of external functions.
17857         Bug reported by Bruno Haible.
17858         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17859         with the old contents of xnmalloc.
17860         (xnmalloc, xmalloc): Use it.
17861         (xnrealloc_inline): New static inline function,
17862         with the old contents of xnrealloc.
17863         (xnrealloc, xrealloc): Use it.
17864
17865         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17866         that.
17867
17868 2003-10-26  Karl Berry  <karl@gnu.org>
17869
17870         * config/srclist.txt (COPYING.DOC): no longer available from
17871         /gd/gnuorg; don't know where the ultimate source is.
17872
17873 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17874
17875         Fix several address-calculation bugs in the hash modules,
17876         plus some minor code cleanup.
17877
17878         * lib/hash.h: Include <stdbool.h>, for bool.
17879         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17880         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17881         hash_get_n_entries, hash_get_max_bucket_length,
17882         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17883         hash_rehash): Use size_t rather than unsigned.
17884         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17885         hash_get_n_buckets_used, hash_get_n_entries,
17886         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17887         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17888         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17889         Likewise.
17890         (SIZE_MAX): Define if not defined.
17891         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17892         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17893         hash_print):
17894         Use const * when possible.
17895         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17896         (check_tuning): Fix bug: if tuning parameters were very close to
17897         0 or 1, rounding errors could have caused subscript violations.
17898         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17899         (hash_initialize): Add 'fail:' label
17900         to free table and return NULL, and use it to simplify code.
17901         Use calloc rather than clearing the storage ourself.
17902         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17903         buffer size calculations.
17904         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17905         Include <stddef.h>, for size_t.
17906         * lib/hash-pjw.c (hash_pjw): Likewise.
17907         Switch to method described by Bruno Haible.
17908         Include <limits.h>, for CHAR_BIT.
17909         (SIZE_BITS): New macro.
17910
17911 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17912
17913         * m4/getline.m4 (AM_FUNC_GETLINE):
17914         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17915         hosts.  Problem reported by Derek Robert Price in
17916         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17917         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17918         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17919
17920 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17921
17922         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17923         ceiling the allocation at NMAX bytes rather than silently
17924         discarding input bytes before NMAX is reached.  This makes
17925         a difference only if NMAX exceeds SIZE_MAX / 2.
17926
17927         * lib/obstack.c: Merge from glibc.
17928         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17929         Add libc_hidden_def (_obstack_newchunk).
17930         (_obstack_free) [! defined _LIBC]: Remove.
17931         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17932         a clone of the function body.
17933         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17934         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17935
17936         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17937         glibc.
17938         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17939         arg to memcpy.
17940
17941         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17942         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17943         Don't use lvalue casts, as GCC plans to remove support for them
17944         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17945         was also present in the non-GCC version, indicating that this
17946         code had always been buggy and had never been widely used.
17947         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17948         Use the fast variant of each macro, rather than copying the
17949         definiens of the fast variant; that way, we'll be more likely to
17950         catch future bugs in the fast variants.
17951
17952 2003-10-20  Bruno Haible  <bruno@clisp.org>
17953
17954         * modules/wait-process: New file.
17955         * MODULES.html.sh (func_all_modules): Add wait-process.
17956
17957 2003-10-20  Bruno Haible  <bruno@clisp.org>
17958
17959         * m4/wait-process.m4: New file.
17960
17961 2003-10-20  Bruno Haible  <bruno@clisp.org>
17962
17963         * lib/wait-process.h: New file, from GNU gettext.
17964         * lib/wait-process.c: New file, from GNU gettext.
17965
17966 2003-10-19  Jim Meyering  <jim@meyering.net>
17967
17968         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17969         HPUX 10.20.
17970
17971 2003-10-18  Karl Berry  <karl@gnu.org>
17972
17973         * config/config.guess: update from config.
17974
17975 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17976
17977         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17978         (getgroups): First arg is int, not size_t.
17979         Don't let 'free' mangle errno.
17980
17981 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17982
17983         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17984
17985 2003-10-16  Karl Berry  <karl@gnu.org>
17986
17987         * config/config.{guess,sub}: update from config.
17988
17989 2003-10-16  Jim Meyering  <jim@meyering.net>
17990
17991         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17992         memcpy.
17993
17994 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17995
17996         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17997         (SIZE_MAX): Remove.
17998         (new_exclude, add_exclude_file): Initial size no longer needs to
17999         be a power of 2.
18000         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
18001         our own address arithmetic overflow checking.
18002
18003         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
18004         (fnmatch): Do not alloca more than 2000 wide characters;
18005         instead, use malloc for large buffers.
18006         Check for address arithmetic overflow, and return -1
18007         with errno set to ENOMEM in that case.
18008         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
18009         (NEW_PATTERN): Do not alloca more than 8000 bytes;
18010         instead, return -1.  Check for address arithmetic overflow.
18011
18012 2003-10-14  Paul Eggert  <eggert@twinsun.com>
18013
18014         Handle invalid suffixes and overflow independently, so that
18015         callers can treat them independently as needed.  Fix some bugs in
18016         suffix handling, e.g., "100k@" was not diagnosed as an invalid
18017         suffix for a human-readable blocksize.  The major caller-visible
18018         change is the addition of a new
18019         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
18020         that both overflow and suffix chars were found.
18021
18022         * lib/human.c (humblock): Don't check separately for invalid suffix
18023         char; that is xstrtoumax's job (now that its bug is fixed).
18024         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18025         INTMAX_MAX]: New macros.
18026         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18027         TYPE_MAXIMUM): New macros.
18028         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18029         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18030         if overflow occurs, as it's what __strtol does and it's more useful
18031         in practice.
18032         (__xstrtol): If __strtol reports some error other than ERANGE,
18033         reflect it to the caller as LONGINT_INVALID.  If it reports
18034         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18035         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18036         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18037         value.
18038         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18039         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18040         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18041         [defined UINTMAX_MAX]: New macros.
18042
18043 2003-10-14  Bruno Haible  <bruno@clisp.org>
18044
18045         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18046
18047 2003-10-14  Bruno Haible  <bruno@clisp.org>
18048
18049         * m4/sig_atomic_t: New file, from GNU gettext.
18050         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18051
18052 2003-10-14  Bruno Haible  <bruno@clisp.org>
18053
18054         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18055         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18056         Also use volatile where needed.
18057
18058 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18059
18060         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18061         Change maintainer from Bruno Haible to 'all'.
18062
18063 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18064
18065         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18066
18067 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18068
18069         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18070         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18071         and define in terms of the other primitives.
18072         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18073         (SIZE_MAX): Define if not already defined.
18074         (array_size_overflow): New function.
18075         (xalloc_die): Abort instead of exiting if 'error' returns.
18076         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18077         (xmalloc, xrealloc): Use them.
18078         (xcalloc): Check for address arithmetic overflow.
18079         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18080         a bit faster than strcpy.
18081
18082 2003-10-10  Simon Josefsson  <jas@extundo.com>
18083
18084         * modules/argp (Depends-on): Add restrict and strcase.
18085
18086 2003-10-10  Simon Josefsson  <jas@extundo.com>
18087
18088         * m4/argp.m4: Add AC_C_INLINE.
18089
18090 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18091
18092         Merge getpass from libc, plus a few fixes.
18093
18094         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18095         Include <stdbool.h>.
18096         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18097         __fsetlocking to empty.
18098         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18099         do include <bits/libc-lock.h>.
18100         Do not include <fcntl.h>; not needed.
18101         [_LIBC]: Include <wchar.h>.
18102         (NOTCANCEL_MODE): New macro.
18103         (flockfile, funlockfile) [_LIBC]: New macros.
18104         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18105         [!_LIBC]: New macros.
18106         (call_fclose): New function.
18107         (getpass): Use it.  Save tty stream separately; this simplifies the
18108         code and makes it more reliable if stdin happens to equal stdout.
18109         Invoke __fsetlocking on tty.
18110         Handle thread cancellation if needed.
18111         Namespace cleanup (use __tcgetattr, __getline).
18112         Use bool for Booleans.
18113         [USE_IN_LIBIO]: Handle wide streams.
18114         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18115         stream might go where.
18116
18117         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18118         doesn't have to include <stdio.h> before us.
18119         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18120         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18121         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18122         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18123         if not declared, so that we can use getpass.c code from libc without
18124         rewriting it.
18125         (flockfile, ftrylockfile, funlockfile): New macros.
18126
18127 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18128
18129         * modules/getpass: Depend on stdbool.
18130
18131 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18132
18133         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18134
18135 2003-10-07  Karl Berry  <karl@gnu.org>
18136
18137         * config/config.{guess,sub}: update from config.
18138
18139 2003-10-06  Jim Meyering  <jim@meyering.net>
18140             Bruno Haible  <bruno@clisp.org>
18141
18142         This lets translators provide better translations for the
18143         "Written by ..." part of --version output.
18144         * lib/version-etc.h: Include stdarg.h.
18145         (version_etc_copyright): Declare as readonly.
18146         (version_etc): Make this function variadic with a NULL-terminated list
18147         of author name strings.
18148         (version_etc_va): New declaration.
18149         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18150         (version_etc_copyright): Declare as readonly.
18151         (version_etc_va): New function. Provide a different translatable string
18152         for each possible number of authors < 10. Abbreviate when there are 10
18153         authors or more.
18154         (version_etc): Make this function variadic. Call version_etc_va.
18155         Suggestion from Gary V. Vaughan.
18156
18157         * lib/long-options.h (parse_long_options): Change prototype: the
18158         authors string is moved to the end and becomes variadic.
18159         * lib/long-options.c: Include stdarg.h.
18160         (parse_long_options): Make this function variadic, too.
18161         Call version_etc_va, not version_etc.
18162
18163 2003-10-06  Bruno Haible  <bruno@clisp.org>
18164
18165         * modules/version-etc-2: Remove file.
18166         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18167
18168 2003-10-06  Bruno Haible  <bruno@clisp.org>
18169
18170         * modules/fatal-signal: New file.
18171         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18172
18173 2003-10-06  Bruno Haible  <bruno@clisp.org>
18174
18175         * m4/fatal-signal.m4: New file.
18176         * m4/signalblocking.m4: New file, from GNU gettext.
18177
18178 2003-10-06  Bruno Haible  <bruno@clisp.org>
18179
18180         * lib/version-etc-2.h: Remove file.
18181         * lib/version-etc-2.c: Remove file.
18182
18183 2003-10-06  Bruno Haible  <bruno@clisp.org>
18184
18185         * lib/fatal-signal.h: New file, from GNU gettext.
18186         * lib/fatal-signal.c: New file, from GNU gettext.
18187
18188 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18189
18190         * README: Rework advice for preventing empty .o files.
18191         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18192         not <sys/types.h>.
18193
18194 2003-10-04  Karl Berry  <karl@gnu.org>
18195
18196         * lib/argp*: update from libc.
18197
18198 2003-10-04  Karl Berry  <karl@gnu.org>
18199
18200         * config/config.{guess,sub}: update from config.
18201
18202 2003-10-02  Bruno Haible  <bruno@clisp.org>
18203
18204         * modules/lchown (Include): Add lchown.h.
18205         * modules/time_r (Include): Use "..." syntax.
18206         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18207
18208 2003-10-01  Simon Josefsson  <jas@extundo.com>
18209
18210         * MODULES.html.sh (func_all_modules): Move gethostname from section
18211         'based on' to section 'lacking' POSIX:2001.
18212
18213 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18214
18215         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18216         to output mode on the same stream.
18217
18218 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18219
18220         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18221         Fix arg typo in previous patch.
18222
18223 2003-09-28  Jim Meyering  <jim@meyering.net>
18224
18225         * lib/error.c: Correct cpp indentation.
18226
18227 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18228
18229         * modules/free: New file.
18230
18231 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18232
18233         * m4/free.m4: New file.
18234
18235 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18236
18237         * lib/minmax.h (MIN, MAX)
18238         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18239         Omit the special code that used __typeof__, since we worry that
18240         it could be more trouble than it's worth.  See:
18241         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18242         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18243
18244         * lib/free.c: New file.
18245
18246 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18247
18248         Trivial fixes to Makefile.am parts of module listings.
18249         * modules/strstr: Append strstr.h to lib_SOURCES.
18250         * modules/strcase: Likewise, for strcase.h.
18251
18252 2003-09-27  Karl Berry  <karl@gnu.org>
18253
18254         * config/mkinstalldirs: update from automake.
18255
18256 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18257
18258         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18259         (error_tail): Do not loop, reallocating temporary buffer, since
18260         the output cannot contain more wide characters than the input
18261         contains bytes, the size must be big enough already.  This avoids
18262         one potential size overflow calculation.  Check for size overflow
18263         when calculating temporary buffer size.  Free temporary buffer
18264         when done, if it was allocated with malloc; this plugs a memory
18265         leak.  Remove casts from void * to pointers, that are no longer
18266         needed now that we're assuming C89 or better.
18267
18268         Merge error changes from glibc.
18269
18270         * lib/error.c, error.h: Update copyright notice header to match glibc.
18271         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18272         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18273         Disable cancellation while printing error.
18274         * lib/error.h: Prepend __ to parameter names.
18275
18276 2003-09-26  Jim Meyering  <jim@meyering.net>
18277
18278         * lib/error.c (error_tail): Move some declarations
18279         into inner scope where the local variables are used.
18280
18281 2003-09-26  Bruno Haible  <bruno@clisp.org>
18282
18283         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18284         stpncpy().
18285         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18286
18287 2003-09-26  Bruno Haible  <bruno@clisp.org>
18288
18289         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18290         (stpncpy): Define as alias for gnu_stpncpy.
18291         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18292
18293 2003-09-25  Simon Josefsson  <jas@extundo.com>
18294
18295         * lib/xgetdomainname.h: New file.
18296         * lib/xgetdomainname.c: New file.
18297
18298 2003-09-25  Simon Josefsson  <jas@extundo.com>
18299             Bruno Haible  <bruno@clisp.org>
18300
18301         * modules/getdomainname: New file.
18302         * modules/xgetdomainname: New file.
18303         * MODULES.html.sh (func_all_modules): Add getdomainname,
18304         xgetdomainname.
18305
18306 2003-09-25  Simon Josefsson  <jas@extundo.com>
18307             Bruno Haible  <bruno@clisp.org>
18308
18309         * m4/getdomainname.m4: New file.
18310
18311 2003-09-25  Simon Josefsson  <jas@extundo.com>
18312             Bruno Haible  <bruno@clisp.org>
18313
18314         * lib/getdomainname.h: New file.
18315         * lib/getdomainname.c: New file.
18316
18317 2003-09-25  Karl Berry  <karl@gnu.org>
18318
18319         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18320
18321 2003-09-25  Karl Berry  <karl@gnu.org>
18322
18323         * config/install-sh: update from automake.
18324
18325 2003-09-25  Bruno Haible  <bruno@clisp.org>
18326
18327         * modules/version-etc-2: New file, from modules/version-etc with
18328         modifications.
18329         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18330
18331 2003-09-25  Bruno Haible  <bruno@clisp.org>
18332
18333         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18334         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18335
18336 2003-09-24  Simon Josefsson  <jas@extundo.com>
18337
18338         * modules/xgethostname: Add xgethostname.h.
18339
18340 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18341
18342         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18343         the buffer associated with the argument.  Bug reported by
18344         Simon Josefsson.
18345
18346 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18347
18348         * README: Document assumptions that 'int' is at least 32 bits
18349         wide, that integer arithmetic is 2's complement without overflow,
18350         that there are no holes in integer values, that adding sizes of
18351         two nonoverlapping objects can't overflow, and that all-bits-zero
18352         yields scalar zero.  Fix spelling and capitalization typos.
18353
18354 2003-09-19  Karl Berry  <karl@gnu.org>
18355
18356         * lib/argp.h: update from libc.
18357
18358 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18359
18360         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18361         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18362         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18363
18364 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18365
18366         * gnulib-tool: Use "test -h", not "test -L", for portability
18367         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18368         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18369         (sed_extract_prog): Issue s commands one-by-one, rather than
18370         using \| in one s command.
18371
18372 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18373
18374         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18375         input error, instead of returning NULL the next time we are called
18376         (and therefore losing track of errno).
18377
18378 2003-09-16  Bruno Haible  <bruno@clisp.org>
18379
18380         * gnulib-tool (func_create_testdir): Warn about duplicated
18381         dependencies.
18382
18383 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18384
18385         * modules/argmatch, modules/fatal, modules/obstack,
18386         modules/xalloc, modules/xgethostname: Sort dependencies by
18387         importance, not alphabetically.
18388
18389 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18390
18391         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18392         fails, so that the caller gets the proper errno.
18393
18394         * lib/readutmp.c (read_utmp): Likewise.
18395         Check for fstat error.  Close stream and free storage
18396         when failing.
18397
18398 2003-09-14  Karl Berry  <karl@gnu.org>
18399
18400         * config/srclist.txt (strdup.c): disable for c89 changes.
18401
18402 2003-09-14  Jim Meyering  <jim@meyering.net>
18403
18404         * lib/getloadavg.c: Correct cpp indentation.
18405         * lib/strdup.c: Likewise.
18406         * lib/vasnprintf.c: Likewise.
18407
18408 2003-09-14  Bruno Haible  <bruno@clisp.org>
18409
18410         * modules/fwriteerror: New file.
18411         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18412
18413 2003-09-14  Bruno Haible  <bruno@clisp.org>
18414
18415         * lib/fwriteerror.h: New file.
18416         * lib/fwriteerror.c: New file.
18417
18418 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18419
18420         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18421         modules/xgethostname, modules/xalloc: Depend on exit.
18422
18423 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18424
18425         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18426
18427         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18428         and AC_MINIX, too, so that their extensions are available.
18429
18430         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18431         This macro has been superseded by gl_BACKUPFILE.
18432
18433         More patches to assume C89 or better.
18434
18435         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18436
18437         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18438         unconditionally.
18439         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18440         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18441         Include <string.h>, <stdlib.h> unconditionally.
18442         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18443         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18444         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18445         headers or for string.h.
18446         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18447         or strtoul.
18448
18449         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18450         headers.
18451         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18452         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18453         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18454         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18455         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18456         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18457         memcpy, memset.
18458         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18459         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18460         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18461         strtol.
18462         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18463         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18464         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18465         strtoul.
18466
18467 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18468
18469         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18470         * lib/obstack.c [!defined _LIBC]: Likewise.
18471         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18472         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18473         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18474
18475         More changes to assume C89 or better.
18476
18477         * lib/error.c (error_tail): Assume vprintf.
18478
18479         * lib/argmatch.c (getenv): Remove decl.
18480         * lib/progreloc.c (get_full_program_name): Define via prototype.
18481         * lib/setenv.c (clearenv): Likewise.
18482         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18483         needed.
18484         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18485         (malloc, memcpy): Remove decls.
18486         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18487         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18488         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18489         (memcpy): Remove macro.
18490         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18491         (__P): Remove.  All uses removed.
18492         (PTR): Remove.  All uses changed to void *.
18493         (CHAR_BIT, NULL): Remove.
18494         (spaces, zeros, memset_space, memset_zero)
18495         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18496         Remove.
18497         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18498         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18499         Define with prototype.
18500         Remove now-unnecessary prototype decl.
18501         (extra_args_spec): Assume ANSI C.  All uses changed.
18502         (extra_args_spec_iso): Remove.
18503         (my_strftime, emacs_strftimeu): Define via prototype.
18504         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18505         unconditionally.
18506         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18507         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18508         (strtoul, strtol): Remove decls.
18509         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18510         LONG_MAX): Remove.
18511         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18512         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18513         (LOCALE_PARAM_PROTO): New macro.
18514         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18515         (INTERNAL (strtol), strtol): Define with a prototype.
18516         (PARAMS): Remove.  All uses removed.
18517         * lib/tempname.c: Include <string.h> unconditionally.
18518         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18519         * lib/xgethostname.c (main): Define with a prototype.
18520         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18521         Include <stdlib.h> unconditionally.
18522         (calloc, malloc, realloc, free): Remove decls.
18523         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18524         Include <stdlib.h> unconditionally.  Sort include file names.
18525         (strtod): Remove.
18526         (xstrtod): Define with a prototype.
18527         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18528         (strtol, strtoul): Remove decls.
18529
18530 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18531
18532         More patches to assume C89 or better.
18533         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18534         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18535         string.h, memchr, STDC_HEADERS.
18536
18537 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18538
18539         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18540         Include <stdlib.h>, <string.h> unconditionally.
18541         Remove now-unnecessary cast to char *.
18542         * lib/strnlen.c: Include <string.h> unconditionally.
18543         * lib/yesno.c (yesno): Define with a prototype.
18544
18545 2003-09-11  Bruno Haible  <bruno@clisp.org>
18546
18547         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18548
18549 2003-09-10  Jim Meyering  <jim@meyering.net>
18550
18551         * lib/error.c: Correct indentation of cpp directives.
18552
18553 2003-09-10  Bruno Haible  <bruno@clisp.org>
18554
18555         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18556         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18557         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18558         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18559         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18560         <stdlib.h> and <string.h> checks.
18561         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18562         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18563
18564 2003-09-10  Bruno Haible  <bruno@clisp.org>
18565
18566         * lib/strcspn.c: Include <string.h> unconditionally.
18567         * lib/strpbrk.c: Include <string.h> unconditionally.
18568         * lib/strstr.c: Include <string.h> unconditionally.
18569         * lib/unicodeio.c: Include <string.h> unconditionally.
18570         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18571         * lib/unsetenv.c: Likewise.
18572         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18573         * lib/yesno.c: Include <stdlib.h> unconditionally.
18574         (rpmatch): Add prototype.
18575
18576 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18577
18578         More patches to assume C89 or better.
18579         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18580         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18581         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18582         or for string.h.
18583         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18584         stdlib.h.
18585         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18586         C headers.
18587         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18588         string.h.
18589         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18590         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18591         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18592         or for string.h.
18593         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18594         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18595         C headers.
18596         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18597         memcpy.
18598         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18599         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18600         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18601         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18602         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18603         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18604         string.h, free.
18605         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18606         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18607         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18608         C headers, or for string.h.
18609         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18610         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18611         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18612         headers, memory.h, stdlib.h, string.h, strings.h.
18613         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18614         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18615         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18616         strchr.
18617         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18618         headers, memory.h, string.h.
18619         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18620         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18621         free.
18622         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18623         headers.
18624         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18625         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18626         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18627         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18628         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18629
18630 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18631
18632         More K&R removal.
18633
18634         * lib/acosl.c (main): Use a prototype.
18635         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18636         tanl.c: Likewise.
18637
18638         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18639
18640         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18641         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18642         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18643         with a prototype.
18644         * lib/getopt.c (const): Remove macro.
18645         Include <string.h> unconditionally.
18646         (my_index): Remove; all uses changed to strchr.
18647         (strlen): Remove decl.
18648         (exchange): Remove forward decl; no longer needed.
18649         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18650         Define with prototype.
18651         * lib/getopt1.c (const): Remove macro.
18652         (getopt_long, getopt_long_only, main): Define with prototype.
18653
18654         * lib/getugroups.c: Include <string.h> unconditionally.
18655
18656         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18657         (getusershell, setusershell, endusershell, readname, main):
18658         Define with prototypes.
18659
18660         * lib/group-member.c: Include group-member.h first.
18661         Include <stdlib.h> unconditionally.
18662
18663         * lib/hard-locale.c: Include hard-locale.h first.
18664         Include <stdlib.h>, <string.h> unconditionally.
18665
18666         * lib/hash.c (free, malloc): Remove decls.
18667         Include <stdlib.h> unconditionally.
18668
18669         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18670         (getenv): Do not declare.
18671
18672         * lib/idcache.c: Include <string.h> unconditionally.
18673
18674         * lib/long-options.c: Include long-options.h first, to test interface.
18675         Include <stdlib.h> unconditionally.
18676
18677         * lib/makepath.c: Include makepath.h first, to test interface.
18678         Include <stdlib.h> and <string.h> unconditionally.
18679
18680         * lib/linebuffer.c: Include <stdlib.h>.
18681         (free): Remove decl.
18682
18683         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18684         stddef.h. rpl_malloc returns void *, not char *.
18685         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18686         prototype.
18687
18688         * lib/md5.h: Include <limits.h> unconditionally.
18689         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18690         (__P): Remove; all uses removed.
18691         * lib/md5.c: Include "md5.h" first.
18692         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18693         md5_buffer, md5_process_bytes, md5_process_block):
18694         Define with prototypes.
18695         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18696         * lib/sha.c: Include "sha.h" first.
18697         Include <stdlib.h>, <string.h> unconditionally.
18698
18699         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18700         * lib/memcmp.c (__ptr_t): Likewise.
18701         * lib/memrchr.c (__ptr_t): Likewise.
18702         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18703         Include <string.h> unconditionally.
18704         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18705         * lib/memchr.c: Include <stdlib.h> unconditionally.
18706         * lib/memchr.c (LONG_MAX): Remove.
18707         * lib/memrchr.c (LONG_MAX): Likewise.
18708         * lib/memchr.c (__memchr): Define via a prototype.
18709         * lib/memrchr.c (__memrchr): Likewise.
18710         * lib/memcmp.c (__P): Remove, and remove all uses.
18711         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18712         Remove forward decls; no longer needed.
18713         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18714         Use types required by C89 in prototype.
18715
18716         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18717         * lib/savedir.c: Likewise.
18718         * lib/mkdir.c (free): Remove decl.
18719         * lib/rmdir.c (rmdir): Define with a prototype.
18720         * lib/savedir.c: Include savedir.h first, to test interface.
18721
18722         * lib/mktime.c (STDC_HEADERS): Remove.
18723         Include <stdlib.h>, <string.h> unconditionally.
18724
18725         * lib/modechange.c: Include <stdlib.h> unconditionally.
18726         (malloc): Remove decl.
18727
18728         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18729         (free): Remove decl.
18730
18731         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18732         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18733         (This type really should be intptr_t, but that's a C99ism.)
18734         (_obstack_memcpy): Remove: all uses changed to memcpy.
18735         Include <string.h> unconditionally.
18736         (struct obstack): Assume __STDC__ for types of members
18737         chunkfun, freefun, extra_arg.
18738         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18739         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18740         obstack_begin, obstack_specify_allocation,
18741         obstack_specify_allocation_with_arg, obstack_chunkfun,
18742         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18743         Remove unprototyped decls and the macros that use them.
18744         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18745         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18746         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18747         (defined __STDC__ && __STDC__)]:
18748         Remove nonprototyped code.
18749         Include <stdlib.h> unconditionally.
18750         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18751         _obstack_allocated_p, _obstack_free, obstack_free,
18752         _obstack_memory_used, print_and_abort):
18753         Define using prototypes.
18754         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18755         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18756         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18757         obstack_next_free, obstack_object_size, obstack_room) [0]:
18758         Remove unused, unprototyped code.
18759
18760         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18761
18762         * lib/physmem.c (physmem_total, physmem_available, main): Define
18763         with prototypes.
18764
18765         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18766         (main): Define with a prototype.
18767
18768         * lib/posixver.c (getenv): Remove decl.
18769
18770         * lib/putenv.c (malloc): Returns void *, not char *.
18771         Include <string.h> unconditionally.
18772         (strchr, memcpy, NULL): Do not define.
18773
18774         * lib/readtokens.c: Include readtokens.h first, to test interface.
18775         Include <stdlib.h>, <string.h> unconditionally.
18776         (init_tokenbuffer): Define with a prototype.
18777
18778         * lib/regex.c (PARAMS): Remove.  All uses removed.
18779         All uses of _RE_ARGS removed, too.
18780         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18781         unconditionally.
18782         (bzero): Assume memset exists.
18783         (memcmp, memcpy, NULL): Remove.
18784         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18785         char, or assignments to local vars of type signed char.
18786         (init_syntax_once, PREFIX(extract_number_and_incr),
18787         PREFIX(print_partial_compiled_pattern),
18788         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18789         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18790         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18791         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18792         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18793         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18794         wcs_compile_range, byte_compile_range, truncate_wchar,
18795         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18796         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18797         count_mbs_length, wcs_re_match_2_internal,
18798         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18799         PREFIX(alt_match_null_string_p),
18800         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18801         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18802         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18803         now-unnecessary declaration, if any.
18804         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18805         regcomp, regexec):
18806         Remove now-unnecessary casts among pointer types.
18807         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18808
18809         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18810         (free): Remove decl.
18811
18812         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18813
18814         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18815         (free): Remove decl.
18816
18817         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18818         * lib/xgetcwd.c: Likewise.
18819
18820         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18821         (free): Remove decl.
18822
18823         * lib/strchrnul.c (strchrnul): Define with a prototype.
18824         Fix bug: c_in was not converted to char before searching.
18825
18826         The following changes are not K&R related:
18827
18828         * lib/group-member.h: Include <sys/types.h>, so that this file is
18829         self-contained.
18830         * lib/makepath.h: Likewise.
18831
18832         * lib/getusershell.c (readname, default_index, line_size, readname):
18833         Use size_t, not int, for sizes.
18834         (readname): If the size overflows, report an error instead of
18835         looping forever.
18836
18837 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18838
18839         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18840         libc.
18841
18842 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18843
18844         * README: New section: portability guidelines.
18845
18846 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18847
18848         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18849         C89 spec.
18850
18851 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18852
18853         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18854
18855 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18856
18857         Assume C89 or better; remove K&R cruft.
18858         A few of these changes were first proposed by Derek Robert Price
18859         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18860
18861         * lib/addext.c: Include <string.h> unconditionally.
18862         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18863         Don't declare getenv or malloc.
18864
18865         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18866         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18867         (NULL): Remove.
18868         (find_stack_direction, alloca): Use prototypes.
18869
18870         * lib/atexit.c (atexit): Define using a prototype.
18871
18872         * lib/basename.c, dirname.c, stripslash.c:
18873         Include <string.h> unconditionally.
18874
18875         * lib/bcopy.c: Include <stddef.h>.
18876         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18877
18878         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18879
18880         * lib/error.h (error, error_at_line, error_print_progname)
18881         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18882         * lib/error.c: Include error.h first, to check interface.
18883         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18884         (VA_START): Remove; all uses changeed to va_start.
18885         (exit, strerror): Remove decls.
18886         (error_print_progname): Prototype uncondionally.
18887         Don't include <errno.h>; no longer needed.
18888         (private_strerror): Remove.
18889         (error_tail): Always define.
18890         (error, error_at_line): Assume C89 or better; always use prototypes.
18891         * lib/fatal.c: Include "fatal.h" first, to test interface.
18892         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18893         (VA_START): Remove; all uses changed to va_start.
18894         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18895         this case.
18896         (exit): Remove decl.
18897         (fatal): Prototype unconditionally.  Assume va_start works.
18898         Abort at end, to pacify gcc.
18899
18900         * lib/euidaccess.c (main): Define with a prototype.
18901
18902         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18903
18904         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18905
18906         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18907         prototypes.
18908         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18909         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18910         (getenv): Remove decl.
18911         (fnmatch): Define using a prototype.
18912         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18913         (FCT): Define using a prototype.
18914
18915         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18916
18917         * lib/gethostname.c: Include <stddef.h>.
18918         (gethostname): Define with prototype.  Length is size_t, not int.
18919
18920 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18921
18922         Assume C89 or better; remove K&R cruft.
18923         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18924         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18925         string.h, getenv, malloc.
18926         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18927         headers.
18928         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18929         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18930         do not check for strerror.
18931         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18932         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18933         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18934         do not check for doprnt or vprintf.
18935         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18936         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18937
18938 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18939
18940         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18941         getversion.c should have been removed then, but was accidentally
18942         preserved.
18943
18944         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18945         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18946
18947 2003-09-08  Karl Berry  <karl@gnu.org>
18948
18949         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18950                 config, forget about prep.
18951
18952         * config/depcomp, missing: update from automake.
18953
18954 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18955
18956         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18957         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18958
18959 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18960
18961         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18962         copy_tm_result.  Bug reported by Simon Josefsson in
18963         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18964
18965 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18966
18967         * m4/time_r.m4: New file.
18968         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18969         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18970         is. Check for timegm declaration.
18971         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18972         Do not check for gmtime_r.
18973         Replace mktime if __mktime_internal does not exist and if mktime
18974         hasn't been replaced already.
18975
18976 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18977
18978         * lib/time_r.c, lib/time_r.h: New files.
18979
18980         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18981         __localtime_r.
18982         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18983         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18984
18985         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18986         __gmtime_r.
18987         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18988         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18989         Include <time_r.h>.
18990
18991         * lib/timegm.c: Switch to glibc implementation, with the following
18992         changes:
18993         [defined HAVE_CONFIG_H]: Include <config.h>.
18994         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18995         (__mktime_internal) [!defined _LIBC]: New decl.
18996         (__gmtime_r) [!defined _LIBC]: New macro and function.
18997         (timegm): Use a prototype, since gnulib assumes C89.
18998         Do not bother declaring tmp to be const, as it's not really usefu.
18999         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
19000         (timegm): Declare only if HAVE_DECL_TIMEGM.
19001
19002 2003-09-06  Paul Eggert  <eggert@twinsun.com>
19003
19004         * MODULES.html.sh (func_all_modules): Add time_r.
19005         * modules/time_r: New file.
19006         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
19007         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
19008
19009 2003-09-03  Paul Eggert  <eggert@twinsun.com>
19010
19011         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
19012         Bug reported by Lute Kamstra in
19013         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
19014
19015         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
19016         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
19017         course with correspondingly smaller numbers for tomorrow and
19018         yesterday.  From Tadayoshi Funaba.  Originally installed into
19019         sh-utils on 1999-08-07, but the patch got lost (I guess during the
19020         coreutils merge?).
19021
19022 2003-08-31  Simon Josefsson  <jas@extundo.com>
19023
19024         * modules/timegm: New file.
19025         * MODULES.html.sh (func_all_modules): Add timegm.
19026
19027 2003-08-31  Simon Josefsson  <jas@extundo.com>
19028
19029         * m4/timegm.m4: New file.
19030
19031 2003-08-31  Simon Josefsson  <jas@extundo.com>
19032
19033         * lib/timegm.h: New file.
19034         * lib/timegm.c: New file.  Based on
19035         wget-1.8.2/src/http.c:mktime_from_utc.
19036
19037 2003-08-31  Karl Berry  <karl@gnu.org>
19038
19039         * lib/argp.h: update from libc.
19040
19041 2003-08-28  Bruno Haible  <bruno@clisp.org>
19042
19043         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19044         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19045         followed by '#define fnmatch fnmatch_posix' gives an error.
19046
19047 2003-08-28  Bruno Haible  <bruno@clisp.org>
19048
19049         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19050         warning on QNX, which defines O_BINARY to 000000.
19051
19052 2003-08-27  Jim Meyering  <jim@meyering.net>
19053
19054         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19055         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19056         would fail after 32.  Reported by Danny Levinson.  Details here:
19057         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19058
19059 2003-08-24  Bruno Haible  <bruno@clisp.org>
19060
19061         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19062         MSVC7 <stdio.h> is included later.
19063
19064 2003-08-22  Simon Josefsson  <jas@extundo.com>
19065
19066         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19067
19068 2003-08-20  Karl Berry  <karl@gnu.org>
19069
19070         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19071
19072 2003-08-20  Bruno Haible  <bruno@clisp.org>
19073
19074         * modules/progname: New file.
19075         * MODULES.html.sh (func_all_modules): Add progname.
19076
19077 2003-08-20  Bruno Haible  <bruno@clisp.org>
19078
19079         * lib/progname.h: New file, from GNU gettext.
19080         * lib/progname.c: New file, from GNU gettext.
19081         * lib/progreloc.c: New file, from GNU gettext.
19082
19083 2003-08-19  Jim Meyering  <jim@meyering.net>
19084
19085         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19086         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19087
19088 2003-08-19  Bruno Haible  <bruno@clisp.org>
19089
19090         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19091         more.
19092
19093 2003-08-19  Bruno Haible  <bruno@clisp.org>
19094
19095         * lib/xstrdup.c: Assume <string.h> exists.
19096
19097 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19098
19099         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19100         in makefile rules.
19101
19102 2003-08-18  Jim Meyering  <jim@meyering.net>
19103
19104         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19105         * m4/lib-ld.m4: Likewise.
19106
19107 2003-08-18  Jim Meyering  <jim@meyering.net>
19108
19109         * lib/setenv.h: Indent nested cpp directive.
19110         * lib/vasnprintf.c: Remove trailing blanks.
19111
19112 2003-08-17  Simon Josefsson  <jas@extundo.com>
19113
19114         * modules/xstrndup: New file.
19115         * MODULES.html.sh (func_all_modules): Add xstrndup.
19116
19117 2003-08-17  Simon Josefsson  <jas@extundo.com>
19118
19119         * modules/argp: Fix autoconf macro name. Add more dependencies.
19120
19121 2003-08-17  Simon Josefsson  <jas@extundo.com>
19122
19123         * m4/xstrndup.m4: New file.
19124
19125 2003-08-17  Simon Josefsson  <jas@extundo.com>
19126
19127         * m4/argp.m4: New file.
19128
19129 2003-08-17  Simon Josefsson  <jas@extundo.com>
19130             Bruno Haible  <bruno@clisp.org>
19131
19132         * lib/xstrndup.h: New file.
19133         * lib/xstrndup.c: New file.
19134
19135 2003-08-17  Bruno Haible  <bruno@clisp.org>
19136
19137         * modules/strndup (Files, Include): Add lib/strndup.h.
19138
19139 2003-08-17  Bruno Haible  <bruno@clisp.org>
19140
19141         * modules/euidaccess (Files): Add lib/euidaccess.h.
19142
19143 2003-08-17  Bruno Haible  <bruno@clisp.org>
19144
19145         * lib/strndup.h: New file.
19146
19147 2003-08-17  Bruno Haible  <bruno@clisp.org>
19148
19149         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19150         like AC_GNU_SOURCE.
19151         * modules/extensions (configure.ac): Comment out the invocation of
19152         gl_USE_SYSTEM_EXTENSIONS.
19153
19154 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19155
19156         Merges from coreutils, etc.
19157         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19158         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19159         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19160         fixing a typo.
19161         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19162         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19163
19164 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19165
19166         Document merge from coreutils.
19167         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19168         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19169         * modules/utime: Add m4/utimes-null.m4.
19170
19171 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19172
19173         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19174         space, undoing this 2003-08-12 change:
19175         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19176
19177 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19178
19179         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19180         strtoul.c from libc, undoing this 2003-08-12 change:
19181         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19182
19183 2003-08-16  Jim Meyering  <jim@meyering.net>
19184
19185         Merges from coreutils.
19186         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19187         prefix.  Adjust cache variables similarly.  Create 500 rather than
19188         just 300 files, to exercise bug on Darwin6.5, too.
19189         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19190         $missing_dir.
19191         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19192         AM_SYS_POSIX_TERMIOS.
19193         Reported by mkc@mathdogs.com.
19194         Also change use of $am_cv_sys_posix_termios
19195         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19196         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19197         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19198         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19199         in /proc/mounts until it finds one with matching device number.  This
19200         is unnecessary when the FILE argument *is* a mount point.  No stat call
19201         is necessary in that case.  So, disable the statvfs-testing code on
19202         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19203         as RedHat bug# 84846.
19204         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19205         to 1MB, so as not to render systems with no stack size limit (e.g.,
19206         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19207         Include <unistd.h>.  On some systems,
19208         it is required for the definition of _SC_PAGESIZE.
19209
19210 2003-08-16  Jim Meyering  <jim@meyering.net>
19211
19212         Merge from coreutils.
19213         * lib/xstrtoimax.c: #else #if -> #elif.
19214         * lib/xstrtoumax.c: Likewise.
19215
19216 2003-08-16  Jim Meyering  <jim@meyering.net>
19217
19218         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19219         * m4/utimes.m4: Removed.
19220         * m4/utimes-null.m4: Renamed from utimes.m4.
19221
19222         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19223         to 1MB, so as not to render systems with no stack size limit (e.g.,
19224         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19225         Include <unistd.h>.  On some systems,
19226         it is required for the definition of _SC_PAGESIZE.
19227
19228 2003-08-16  Jim Meyering  <jim@meyering.net>
19229         and Paul Eggert  <eggert@cs.ucla.edu>
19230
19231         Merges from coreutils, etc.
19232
19233         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19234         using the latest version from cvs.  This avoids problems with #line
19235         directives using a vendor (Sun) compiler.
19236         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19237         Don't set GETGROUPS_LIB here; now it's
19238         done via getgroups.m4's wrapper function.
19239         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19240         rather than just in sh-util/configure.in, so that the
19241         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19242         same.
19243         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19244         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19245         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19246         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19247         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19248         Remove code that is now done by the newly-required macros.
19249         Append $(EXEEXT) to DF_PROG.
19250         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19251         Do not invoke or require the following here,
19252         since prereq.m4 or some gnulib .m4 now does this for us:
19253         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19254         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19255         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19256         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19257         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19258         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19259         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19260         AC_FUNC_OBSTACK.
19261         Do not replace the following functions, as this is now the job
19262         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19263         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19264         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19265         atexit getpass, strdup, getpagesize.
19266         Replace 'raise'.
19267         Do not check for the following functions, as this is now the job
19268         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19269         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19270         setregid.
19271         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19272         Check for sys/sysctl.h.
19273         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19274         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19275         of checking for ssize_t ourselves.
19276
19277         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19278         Require every macro that gnulib/modules/* suggests for us.
19279         (jm_PREREQ_ADDEXT): New macro.
19280         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19281         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19282
19283         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19284         (gl_PHYSMEM): Use it.
19285         Also check for `table' function.
19286         Check for new headers and functions.
19287         Add check for sys/sysmp.h.
19288         With suggestions from Kaveh Ghazi.
19289         Ignore headers that are present but cannot be compiled.  This
19290         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19291         C 5.4.
19292
19293 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19294
19295         Document merge from coreutils.
19296         * modules/userspec: Depend on posixver.
19297         * modules/strftime: Depend on tzset.
19298
19299 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19300
19301         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19302         rather than tab, after '#' in shell-script copyright notices.
19303         Suggested by Bruno Haible.
19304
19305 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19306
19307         * config/srclist-update: Use three spaces, rather than tab, after '#'
19308         in shell-script copyright notices.  Suggested by Bruno Haible.
19309         Remove unnecessary parenthesization in regular expression.
19310
19311 2003-08-15  Jim Meyering  <jim@meyering.net>
19312
19313         Merge from coreutils.
19314         * lib/xgethostname.c: Include <stdlib.h>.
19315         (xghostname): Don't exit for anything other than memory-related
19316         failure; just return NULL.
19317         * lib/userspec.c: Include "posixver.h".
19318         (parse_user_spec): Accept `.' as a separator only
19319         in pre-POSIX-200112 mode.
19320         * lib/strtoimax.c: Use #elif rather than #else #if.
19321         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19322         Remove function, now that we can rely on a working tzset function.
19323         [!_LIBC]: Ensure that the required autoconf test has been run.
19324         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19325         Use underlying_strftime for %r.
19326         * lib/sha.c: Merge in some clean-up and optimization changes from
19327         glibc.
19328         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19329         Ensure that it is a multiple of 64.
19330         Rearrange loop exit tests so as to avoid performing an
19331         additional fread after encountering an error or EOF.
19332         * lib/realloc.c: Update copyright date.
19333
19334 2003-08-15  Jim Meyering  <jim@meyering.net>
19335         and Paul Eggert  <eggert@twinsun.com>
19336
19337         Merge from coreutils.
19338         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19339         member but strut utmpx does not.  Needed for AIX 4.3.3.
19340         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19341
19342 2003-08-15  Jim Meyering  <jim@meyering.net>
19343         and Paul Eggert  <eggert@cs.ucla.edu>
19344
19345         Merges from coreutils, etc.
19346         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19347         Require gl_FUNC_TZSET_CLOBBER.
19348         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19349         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19350         members.
19351
19352 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19353
19354         Help the merge from coreutils.
19355         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19356         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19357         * m4/tzset.m4: Use it too.
19358
19359 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19360
19361         * modules/tzset: New file.
19362
19363 2003-08-14  Jim Meyering  <jim@meyering.net>
19364
19365         Merges from coreutils.
19366         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19367         variable names, rather than @FNMATCH_H@.
19368         * modules/alloca: Likewise for $(ALLOCA_H).
19369
19370         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19371         the three copies of the literal target, `fnmatch.h'.
19372         * modules/alloca (alloca.h): Likewise.
19373
19374 2003-08-14  Jim Meyering  <jim@meyering.net>
19375
19376         Merge from coreutils.
19377         * m4/tzset.m4: New file.
19378         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19379         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19380         otherwise, AIX 5.1 systems would end up using the latter.
19381         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19382         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19383         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19384         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19385
19386 2003-08-14  Jim Meyering  <jim@meyering.net>
19387
19388         Merge from coreutils.
19389         * lib/obstack.h: Whitespace changes.
19390         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19391         and xcalloc return values.
19392         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19393         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19394         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19395         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19396         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19397         error from mntctl.
19398         Use mntctl's return value to drive the entry-processing loop, since
19399         we can't rely on the value of the vmt_length member in the last
19400         entry.  On some systems doing so could result in exhausting
19401         virtual memory.  Based in part on a patch from Mike Jetzer.
19402
19403 2003-08-14  Jim Meyering  <jim@meyering.net>
19404         and Paul Eggert  <eggert@twinsun.com>
19405
19406         Merges from coreutils, plus other fixes.
19407         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19408         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19409         for credits and details.  Thanks to Kaveh Ghazi for helping
19410         to keep these files in sync.
19411         (ARRAY_SIZE): Define it.
19412         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19413         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19414         (memcasecmp): Don't assume size_t fits in unsigned int.
19415         Remove casts and duplicate code.
19416         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19417         (memcpy): Remove definition.
19418         Merge in some clean-up and optimization changes from glibc.
19419         [BLOCKSIZE]: Move definition to top of file.
19420         Ensure that it is a multiple of 64.
19421         Rearrange loop exit tests so as to avoid performing an
19422         additional fread after encountering an error or EOF.
19423         * lib/md5.h (md5_uintptr): Define.
19424         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19425         return to the initial working directory.  Preserve errno
19426         for caller.
19427         * lib/idcache.c: Include "xalloc.h".
19428         (xmalloc, xrealloc): Remove decls.
19429         (getuser): Remove casts no longer required in C89.
19430         * lib/human.c: Include stdio.h, for sprintf.
19431         * lib/group-member.c: Include "xalloc.h".
19432         (xmalloc, xrealloc): Remove decls.
19433         (get_group_info): Remove casts no longer required in C89.
19434         * lib/getusershell.c (readname): Remove casts no longer required in
19435         C89.
19436         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19437         * lib/getline.c: Whitespace fix, from coreutils.
19438
19439 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19440
19441         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19442         Check for isascii.
19443
19444         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19445         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19446         Undo previous (whitespace-only) change.
19447
19448 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19449
19450         * lib/exclude.c: Include <ctype.h>
19451         (IN_CTYPE_DOMAIN): New macro.
19452         (is_space): New fn.
19453         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19454         and empty lines.
19455
19456         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19457         Undo previous (whitespace-only) change.
19458
19459 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19460
19461         * config/srclist-update: Change update back to the old behavior,
19462         leaving whitespace alone.  Use one 'sed' command rather than a
19463         pipeline.
19464         (fixlicense): Now a variable, not a function.
19465         (remove_trailing_blanks): Remove.
19466         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19467         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19468         Undo previous (whitespace-only) change.
19469
19470 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19471
19472         Merge from coreutils.
19473         * modules/euidaccess: Add lib_SOURCES, include for new
19474         file euidaccess.h
19475
19476 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19477
19478         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19479         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19480         Normalize leading white space and remove trailing white space.
19481
19482         Merge from coreutils
19483         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19484
19485         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19486         0.12.1.  These files are now being upgraded automatically by
19487         ../config/srclist-update.
19488
19489 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19490
19491         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19492         Normalize leading white space and remove trailing white space.
19493         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19494         notice, as per ../config/srclist-update.
19495
19496         Merge from coreutils.
19497         * lib/euidaccess.h: New file.
19498         * lib/euidaccess.c: Include it.
19499         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19500         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19501         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19502
19503 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19504
19505         * config/srclist-update: Add copyright notice.
19506         (remove_id_lines, remove_trailing_blanks): New constants.
19507         (fixfile): Use them to normalize spacing a bit in copied files.
19508         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19509         Normalize leading white space and remove trailing white space.
19510
19511         * config/texinfo.tex: Sync with texinfo.
19512
19513         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19514         strtoul.c from libc, to merge coreutils whitespace changes.
19515
19516         * config/srclist.txt: Get the following m4 files from gettext:
19517         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19518         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19519         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19520         wint_t.m4.
19521
19522 2003-08-12  Karl Berry  <karl@gnu.org>
19523
19524         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19525         been made.
19526
19527 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19528
19529         * modules/gnu-source, m4/gnu-source.m4:
19530         Remove; we're assuming Autoconf 2.54 or later now.
19531         Suggested by Bruno Haible.
19532         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19533
19534 2003-08-11  Bruno Haible  <bruno@clisp.org>
19535
19536         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19537
19538 2003-08-11  Bruno Haible  <bruno@clisp.org>
19539
19540         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19541         (vasnprintf): Use it instead of wcslen.
19542
19543 2003-08-11  Bruno Haible  <bruno@clisp.org>
19544
19545         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19546         value to ensure that _Bool promotes to int. Use #define for _Bool when
19547         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19548
19549 2003-08-10  Karl Berry  <karl@gnu.org>
19550
19551         * lib/regex.h: update from libc (whitespace fix).
19552
19553 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19554
19555         Merge some files from coreutils.  These changes were
19556         originally made by Jim Meyering.
19557         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19558         many older Unixes require this.
19559         * lib/alloca.c (alloca): Remove cast to argument of free;
19560         no longer needed in C89.
19561         * lib/alloca_.h, regex.h: Fix white space to match
19562         what GNU indent does.
19563
19564 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19565
19566         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19567         apparently Emacs's Unicode mode got confused before my 2003-08-05
19568         checkin.
19569
19570 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19571
19572         * m4/extensions.m4: New file.
19573         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19574         Require gl_USE_SYSTEM_EXTENSIONS.
19575         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19576         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19577
19578 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19579
19580         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19581         * modules/extensions, modules/gnu-source: New files.
19582         * modules/timespec, modules/unlocked-io: Depend on extensions.
19583
19584 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19585
19586         * modules/restrict: New file.
19587         * MODULES.html.sh (func_all_modules): Add restrict.
19588         * modules/regex: Depend on restrict.
19589
19590 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19591
19592         * m4/restrict.m4: New file.
19593         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19594
19595 2003-08-07  Bruno Haible  <bruno@clisp.org>
19596
19597         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19598         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19599
19600 2003-08-07  Bruno Haible  <bruno@clisp.org>
19601
19602         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19603         makes the module 'getndelim2' compatible with the module 'getline'.
19604
19605 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19606
19607         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19608         byte with "\201" to avoid glitches when editing that source file
19609         with multi-gnome-terminal.
19610
19611 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19612
19613         * lib/bumpalloc.h: Remove.
19614
19615 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19616
19617         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19618         * modules/bumpalloc: Remove.
19619
19620 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19621
19622         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19623         GNU coding style.
19624
19625         Merge from coreutils.
19626         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19627         1. From glibc.
19628         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19629         from Karl Berry, implemented by Jim Meyering.
19630         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19631         from Dmitry V. Levin.
19632         Remove anachronistic cast of xrealloc.
19633         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19634         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19635         type. Otherwise, it wouldn't compile with at least /bin/cc on
19636         ymp-cray-unicos9.0.2.X.
19637         Combine two mostly-identical uses of alloca into one.
19638         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19639
19640 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19641
19642         [From Emacs.]
19643
19644         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19645         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19646         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19647         obsolete NLIST_NAME_UNION.
19648         [__GNU__]: Undef BSD and FSCALE.
19649         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19650
19651 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19652
19653         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19654         an enum type, so that it's guaranteed to promote to int.  See:
19655         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19656
19657 2003-08-03  Karl Berry  <karl@gnu.org>
19658
19659         * config/depcomp: update from automake.
19660
19661 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19662
19663         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19664         (strerror): Don't assume that a printable int fits in 14 bytes.
19665
19666 2003-07-31  Bruno Haible  <bruno@clisp.org>
19667
19668         * modules/getpass-gnu: New file.
19669         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19670
19671 2003-07-31  Bruno Haible  <bruno@clisp.org>
19672
19673         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19674
19675 2003-07-24  Karl Berry  <karl@gnu.org>
19676
19677         * config/missing: update from automake.
19678
19679 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19680             Bruno Haible  <bruno@clisp.org>
19681
19682         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19683         * lib/getline.c (getline, getdelim): Likewise.
19684         Remove _GNU_SOURCE define; now it's defined in config.h through
19685         m4/getline.m4.
19686
19687 2003-07-23  Karl Berry  <karl@gnu.org>
19688
19689         * config/config.sub: update from prep.
19690
19691 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19692
19693         * modules/xalloc (Depends-on): Add exitfail.
19694         * modules/xmemcoll: Likewise.
19695
19696 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19697
19698         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19699         over-parenthesization in macros.
19700
19701         Sync with coreutils.
19702
19703         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19704         required by C99.
19705
19706         Use `exit_failure' for xalloc and xmemcoll instead of their own
19707         private exit-failure variables.
19708         * lib/xalloc.h (xalloc_exit_failure): Remove.
19709         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19710         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19711         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19712         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19713         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19714
19715 2003-07-20  Jim Meyering  <jim@meyering.net>
19716
19717         * modules/closeout (Depends-on): Add exitfail.
19718         Suggestion from Bruno Haible.
19719
19720 2003-07-19  Karl Berry  <karl@gnu.org>
19721
19722         * config/config.sub: update from prep.
19723
19724 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19725
19726         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19727         Remove.
19728         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19729         to test that it can stand by itself.  Include "exitfail.h".
19730         Clients should set exit_failure instead.
19731         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19732
19733 2003-07-18  Bruno Haible  <bruno@clisp.org>
19734
19735         * modules/getndelim2: New file.
19736         * modules/getline: Share files with module getndelim2.
19737         * modules/getnline: Depend on getndelim2 instead of sharing files with
19738         it. Add getnline.c to lib_SOURCES.
19739         * MODULES.html.sh (func_all_modules): Add getndelim2.
19740
19741 2003-07-18  Bruno Haible  <bruno@clisp.org>
19742
19743         * m4/getndelim2.m4: New file.
19744         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19745         invoke gl_PREREQ_GETNDELIM2.
19746         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19747         gl_PREREQ_GETNDELIM2.
19748         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19749         gl_GETNDELIM2.
19750
19751 2003-07-18  Bruno Haible  <bruno@clisp.org>
19752
19753         * lib/getndelim2.h: New file.
19754         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19755         getndelim2.h.
19756         (getndelim2): Make non-static. Change return type to ssize_t.
19757         * lib/getline.h: Change argument names.
19758         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19759         * lib/getnline.c: Include getndelim2.h.
19760
19761 2003-07-18  Andreas Schwab  <schwab@suse.de>
19762
19763         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19764
19765 2003-07-17  Karl Berry  <karl@gnu.org>
19766
19767         * config/config.sub: update from prep.
19768
19769 2003-07-17  Bruno Haible  <bruno@clisp.org>
19770
19771         * modules/getnline: New file.
19772         * modules/getline: Add lib/getndelim2.c to source file list.
19773         * MODULES.html.sh (func_all_modules): Add getnline.
19774
19775 2003-07-17  Bruno Haible  <bruno@clisp.org>
19776
19777         * m4/getnline.m4: New file.
19778
19779 2003-07-17  Bruno Haible  <bruno@clisp.org>
19780
19781         * m4/Makefile.am.in: Remove file.
19782         * m4/Makefile.am: Remove file.
19783         * m4/Makefile.in: Remove file.
19784
19785 2003-07-17  Bruno Haible  <bruno@clisp.org>
19786
19787         * lib/getnline.h: New file.
19788         * lib/getnline.c: New file.
19789         * lib/getndelim2.c: New file, extracted from getline.c.
19790         (getndelim2): Renamed from getdelim2, with added nmax argument.
19791         * lib/getline.c: Include getndelim2.c.
19792         (getdelim2): Moved out to getndelim2.c.
19793         (getline, getdelim): Update.
19794
19795 2003-07-17  Bruno Haible  <bruno@clisp.org>
19796
19797         * lib/Makefile.am: Remove file.
19798         * lib/Makefile.in: Remove file.
19799
19800 2003-07-17  Bruno Haible  <bruno@clisp.org>
19801
19802         * configure.in: Remove file.
19803         * Makefile.in: Remove file.
19804
19805 2003-07-17  Bruno Haible  <bruno@clisp.org>
19806
19807         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19808
19809 2003-07-16  Karl Berry  <karl@gnu.org>
19810
19811         * config/srclist-update: was running fixlicense twice, which caused
19812                 texinfo.tex to be nullified for some reason.  Simplify,
19813                 $gplsrc is no longer needed as far as I can see?
19814
19815 2003-07-16  Jim Meyering  <jim@meyering.net>
19816
19817         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19818
19819 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19820
19821         * config/srclist.txt: Get the following files from gettext-runtime/intl
19822         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19823         ref-del.sin.  From Bruno Haible.
19824         * config/srclist-update (fixfile): Change grep pattern again, since the
19825         previous fix didn't work (there was another trailing $).  Use
19826         '[$]' to escape the $s.
19827
19828 2003-07-15  Karl Berry  <karl@gnu.org>
19829
19830         * lib/vasnprintf.c: update from gettext.
19831
19832 2003-07-15  Karl Berry  <karl@gnu.org>
19833
19834         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19835         gets expanded when surrounded by '$'.
19836
19837 2003-07-15  Jim Meyering  <jim@meyering.net>
19838
19839         * modules/save-cwd: Don't depend on error.  From Derek Price.
19840
19841 2003-07-15  Jim Meyering  <jim@meyering.net>
19842
19843         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19844
19845 2003-07-14  Simon Josefsson  <jas@extundo.com>
19846
19847         * modules/mempcpy: New file.
19848         * MODULES.html.sh (func_all_modules): Add mempcpy.
19849
19850 2003-07-14  Simon Josefsson  <jas@extundo.com>
19851
19852         * m4/mempcpy.m4: New file.
19853
19854 2003-07-14  Simon Josefsson  <jas@extundo.com>
19855
19856         * lib/mempcpy.h: New file.
19857         * lib/mempcpy.c: New file.
19858
19859 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19860
19861         * modules/getdate, modules/posixtm: Depend on mktime.
19862
19863 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19864
19865         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19866         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19867         unicodeio.c, unicodeio.h, unlocked-io.h:
19868         Switch from LGPL to GPL.
19869
19870 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19871
19872         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19873         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19874         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19875         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19876         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19877         updated automatically by ../config/srclist-update.  This changes
19878         their license from LPGL to GPL.
19879
19880 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19881
19882         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19883         assumed to refer to the root of the most recent stable gettext version.
19884         * config/srclistvars.sh: Add defaults for eggert.
19885         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19886         Match "This program" as well as "The program".  This is needed
19887         for gettext.
19888
19889 2003-07-14  Jim Meyering  <jim@meyering.net>
19890
19891         Don't emit diagnostics.  Let callers do that.
19892         * lib/save-cwd.c: Don't include "error.h".
19893         (save_cwd): Don't call error.  Ensure that errno is valid
19894         when returning nonzero.
19895
19896         * lib/save-cwd.h (restore_cwd): Update prototype.
19897         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19898         Simplify.  Don't call error upon failure.  Let callers do that.
19899         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19900         when auditing is enabled.  But don't bother updating the #if.
19901
19902 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19903
19904         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19905         it breaks C++ compilation.
19906         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19907
19908 2003-07-10  Simon Josefsson  <jas@extundo.com>
19909
19910         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19911
19912 2003-07-10  Jim Meyering  <jim@meyering.net>
19913
19914         * m4/clock_time.m4: Remove trailing blank.
19915         * m4/intmax_t.m4: Likewise.
19916
19917 2003-07-10  Jim Meyering  <jim@meyering.net>
19918
19919         * lib/vasnprintf.c: Remove trailing blanks.
19920         Make cpp indentation consistent.
19921
19922 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19923
19924         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19925         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19926         Switch from LGPL to GPL.
19927
19928 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19929
19930         * config/srclist.txt: Sort sublists.  Add
19931         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19932         that differ from gnulib for one reason or another; we'd like this list
19933         to be smaller but for now let's document what we have.
19934
19935 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19936
19937         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19938         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19939         and sweeter "eval x=$x".
19940         * config/srclist.txt: Get lib/argp* from glibc.
19941
19942 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19943
19944         * lib/mktime.c: Fix some boundary cases and remove need for floating
19945         point.
19946
19947         Issue a compile-time diagnostic if time_t is floating point, or if
19948         two's complement arithmetic is not in effect, or if arithmetic
19949         right shift does not propagate the sign.  These assumptions were
19950         all in the original code but they weren't checked.
19951
19952         (TIME_T_MIDPOINT, verify): New macros.
19953         (__isleap): Remove; it has integer overflow problems.
19954         (leapyear): New function, without those problems.
19955         (ydhms_tm_diff): Remove; splitting into two parts.
19956         (ydhms_diff): New function, containing the arithmetic part of
19957         the old ydhms_tm_diff function.  Issue a compile-time
19958         diagnostic if we are not using C99 integer division.
19959         Avoid casts when possible.
19960         (guess_time_tm): New function, containing the checking part of
19961         the old ydhms_tm_diff function.  Return the new value, rather than
19962         the difference between it and the old.  Accept a new argument T
19963         so that *T specifies the old value.  Check for overflow in the result.
19964
19965         (__mktime_internal): Use a time_t offset, not a long int offset.
19966         This undoes the 2003-06-04 change, which is no longer needed now
19967         that we have better overflow checking.
19968         (localtime_offset): Likewise.
19969
19970         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19971         and long are 64-bit but int is only 32-bit.
19972         (ydhms_diff): Use long int to store year1 and yday1.
19973         Issue a compile-time diagnostic if long int is not wide enough.
19974
19975         (__mktime_internal): Use long int to store adjusted year and yday.
19976         Use plain C rather than preprocessor commands, if that doesn't
19977         affect efficiency.
19978         Check for overflow (and try to repair) after each probe
19979         rather than checking only at the very end.  This avoids some bugs
19980         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19981         does not equal GMT offset at maximum time).
19982         Use integer to check for overflow rather than floating point; this
19983         is more portable to non-IEEE hosts, and is a tad faster.
19984         When we detect that we are oscillating between two values,
19985         don't check whether tm_isdst has the requested value, since
19986         we already know the answer.  When tm_isdst has the wrong value,
19987         use a different heuristic to find the right one, based on the
19988         extreme values actually observed in practice in tz2003a,
19989         rather than the (overly optimistic) "previous 3 calendar quarters".
19990
19991         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19992         "T const" to accommodate glibc style.
19993         (check_result): Use less-confusing report format.  "long" -> "long int.
19994         (main): Likewise.
19995         Don't loop if the iteration overflows time_t.
19996         Allow a negative step in the iteration.
19997
19998 2003-07-06  Karl Berry  <karl@gnu.org>
19999
20000         * config/depcomp: update from automake.
20001         * config/config.sub: update from prep.
20002
20003 2003-07-03  Karl Berry  <karl@gnu.org>
20004
20005         * config/config.guess: update from prep.
20006
20007 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20008
20009         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
20010         xreadlink.c now includes it unconditionally.
20011
20012 2003-07-01  Paul Eggert  <eggert@twinsun.com>
20013
20014         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
20015         having it depend on HAVE_SYS_TYPES_H.
20016
20017 2003-07-01  Bruno Haible  <bruno@clisp.org>
20018
20019         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
20020         <sys/types.h> should be sufficient.
20021         Reported by Paul Eggert.
20022
20023 2003-06-26  Karl Berry  <karl@gnu.org>
20024
20025         * config/depcomp: update from automake.
20026
20027 2003-06-26  Bruno Haible  <bruno@clisp.org>
20028
20029         * modules/human: Depend on module stdbool.
20030
20031 2003-06-25  Bruno Haible  <bruno@clisp.org>
20032
20033         * modules/readlink: New file.
20034         * modules/xreadlink: Depend on it.
20035         * MODULES.html.sh (func_all_modules): Add readlink.
20036
20037 2003-06-25  Bruno Haible  <bruno@clisp.org>
20038
20039         * m4/readlink.m4: New file.
20040
20041 2003-06-25  Bruno Haible  <bruno@clisp.org>
20042
20043         * lib/readlink.c: New file.
20044
20045 2003-06-22  Karl Berry  <karl@gnu.org>
20046
20047         * config/srclist.txt: update mkinstalldirs from automake.
20048         * config/mkinstalldirs: update.
20049
20050 2003-06-22  Bruno Haible  <bruno@clisp.org>
20051
20052         Portability to mingw32.
20053         * m4/ssize_t.m4: New file, from GNU gettext.
20054         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20055         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20056
20057 2003-06-22  Bruno Haible  <bruno@clisp.org>
20058
20059         * modules/safe-read: Add m4/ssize_t.m4.
20060         * modules/xreadlink: Add m4/ssize_t.m4.
20061
20062 2003-06-20  Bruno Haible  <bruno@clisp.org>
20063
20064         Assume C89, so PARAMS isn't needed.
20065         * lib/unicodeio.h (PARAMS): Remove.
20066         * lib/unicodeio.c: Don't use PARAMS.
20067
20068 2003-06-18  Karl Berry  <karl@gnu.org>
20069
20070         * config/config.{guess,sub}: update from prep.
20071
20072 2003-06-18  Jim Meyering  <jim@meyering.net>
20073
20074         Merge changes from coreutils.
20075         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20076         Remove explicit declarations of xmalloc and realloc.
20077         Include xalloc.h.
20078         (read_utmp): Remove anachronistic cast of xmalloc.
20079
20080 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20081
20082         Assume C89, so PARAMS isn't needed.
20083         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20084         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20085         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20086         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20087         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20088         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20089         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20090         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20091         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20092         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20093         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20094         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20095         no longer needed. Anyway, config.h should always be included before any
20096         other file.
20097
20098 2003-06-11  Simon Josefsson  <jas@extundo.com>
20099
20100         * modules/sysexits: New file.
20101         * MODULES.html.sh (func_all_modules): Add sysexits.
20102
20103 2003-06-11  Simon Josefsson  <jas@extundo.com>
20104
20105         * lib/sysexit_.h: New file.
20106
20107 2003-06-11  Derek Price  <derek@ximbiot.com>
20108
20109         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20110         necessary.
20111
20112 2003-06-11  Bruno Haible  <bruno@clisp.org>
20113
20114         * m4/sysexits.m4: New file.
20115
20116 2003-06-10  Simon Josefsson  <jas@extundo.com>
20117
20118         * lib/argp.h: New file, from glibc.
20119         * lib/argp-ba.c: New file, from glibc.
20120         * lib/argp-eexst.c: New file, from glibc.
20121         * lib/argp-fmtstream.c: New file, from glibc.
20122         * lib/argp-fmtstream.h: New file, from glibc.
20123         * lib/argp-fs-xinl.c: New file, from glibc.
20124         * lib/argp-help.c: New file, from glibc.
20125         * lib/argp-namefrob.h: New file, from glibc.
20126         * lib/argp-parse.c: New file, from glibc.
20127         * lib/argp-pv.c: New file, from glibc.
20128         * lib/argp-pvh.c: New file, from glibc.
20129         * lib/argp-xinl.c: New file, from glibc.
20130
20131 2003-06-10  Simon Josefsson  <jas@extundo.com>
20132
20133         * modules/strchrnul: New file.
20134
20135 2003-06-10  Simon Josefsson  <jas@extundo.com>
20136
20137         * modules/argp: New file.
20138
20139 2003-06-10  Simon Josefsson  <jas@extundo.com>
20140
20141         * m4/strchrnul.m4: New file.
20142
20143 2003-06-10  Simon Josefsson  <jas@extundo.com>
20144
20145         * lib/strchrnul.h: New file.
20146         * lib/strchrnul.c: New file.
20147
20148 2003-06-10  Bruno Haible  <bruno@clisp.org>
20149
20150         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20151
20152 2003-06-07  Karl Berry  <karl@gnu.org>
20153
20154         * config/config.{guess,sub}: update from prep.
20155
20156 2003-06-07  Jim Meyering  <jim@meyering.net>
20157
20158         * modules/strtod: Use $(...) notation, not @...@ for
20159         AC_REPLACE'd variables.
20160         * modules/localcharset: Likewise.
20161
20162 2003-06-07  Jim Meyering  <jim@meyering.net>
20163
20164         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20165         in place of my name in the copyright comment.
20166         Remove definition and uses of __P.
20167
20168         From coreutils.
20169         * lib/stat.c: Don't declare xmalloc explicitly.
20170         Instead, include "xalloc.h".
20171         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20172         xrealloc, and xcalloc return values.
20173         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20174         Improve comment.
20175         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20176
20177 2003-06-07  Bruno Haible  <bruno@clisp.org>
20178
20179         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20180         avoid AC_CONFIG_LINKS.
20181         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20182         fnmatch.h, to avoid AC_CONFIG_LINKS.
20183         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20184
20185 2003-06-07  Bruno Haible  <bruno@clisp.org>
20186
20187         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20188         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20189         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20190         directory.
20191         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20192         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20193         directory.
20194
20195 2003-06-06  Jim Meyering  <jim@meyering.net>
20196
20197         Merge from coreutils.
20198         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20199         Consolidate declarations and initializations of *_base* locals.
20200
20201         Merge from coreutils.
20202         This avoids a core dump on systems without GNU putenv,
20203         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20204         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20205         (unsetenv): New static function, from GNU libc.
20206         (rpl_putenv): Use it.
20207
20208         * lib/modechange.c: Remove trailing blanks.
20209
20210         Merge from coreutils.
20211         * lib/fsusage.c: Remove declaration of statfs.
20212         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20213
20214         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20215
20216 2003-06-06  Jim Meyering  <jim@meyering.net>
20217
20218         * lib/stdbool_.h: Renamed from stdbool.h.in.
20219
20220 2003-06-06  Jim Meyering  <jim@meyering.net>
20221             Bruno Haible  <bruno@clisp.org>
20222
20223         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20224         Adjust Makefile.am snippet not to redirect directly to target.
20225         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20226
20227 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20228
20229         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20230         mismatch, look in future quarters as well as past.  This fixes a
20231         bug when processing fall-backwards gaps immediately after a long
20232         period of daylight-saving time.
20233
20234         * lib/mktime.c: Assume freestanding C89 or better.
20235         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20236         (__P): Remove; not used.
20237         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20238         (mktime, not_equal_tm, print_tm, check_result,
20239         main): Use prototypes.  Use const * where appropriate.
20240         (main): Fix typo in testing code that uncovered by above changes.
20241         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20242
20243 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20244
20245         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20246         locale.h, localeconv.  This merges changes from coreutils.
20247
20248         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20249         It can be removed after the next Autoconf is released.
20250         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20251         needed.
20252
20253 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20254
20255         * lib/mktime.c: Fix Debian bug 177940
20256         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20257         (localtime_offset): Now long int, not time_t, because we want it
20258         to be guaranteed to be signed.  All uses changed.
20259         (__mktime_internal): If overflow would occur when adding offset,
20260         don't add it.
20261
20262         Merge 'human' changes from coreutils.  Rewrite to support
20263         locale-specific notations like thousands separators.
20264         * lib/human.c: Simplify authorship notice.
20265         Include human.h immediately after config.h.
20266         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20267         <limits.h>: Do not include, since human.h does.
20268         (SIZE_MAX, UINTMAX_MAX): New macros.
20269         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20270         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20271         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20272         (power_letter): Renamed from suffixes.
20273         (generate_suffix_backwards): Remove.
20274         (adjust_value): Now takes int style (because of human.h changes)
20275         and long double value (for greater precision on some platforms).
20276         (group_number): New function.
20277         (human_readable): Use it.  Use integer options, not enum.
20278         Put the options before the sizes in the arg list.
20279         Support all the new options.
20280         The old human_readable function has been removed;
20281         use inttostr.h instead.
20282         (human_readable, default_block_size, humblock):
20283         Use uintmax_t, not int, for block sizes.
20284         (human_readable_inexact, block_size_types): Remove.
20285         (block_size_opts): New constant.
20286         (human_options): Renamed from human_block_size, with new signature
20287         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20288         * lib/human.h: Add copyright and authorship notice.
20289         Include <limits.h> and <stdbool.h> unconditionally.
20290         (PARAMS): Remove.  All uses removed.
20291         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20292         (enum human_inexact_style): Remove tag; now a nameless enum.
20293         (human_floor, human_ceiling, human_round_to_even): Now have
20294         values 2, 0, 1 rather than -1, 1, 0.
20295         (human_group_digits, human_suppress_point_zero, human_autoscale,
20296         human_base_1024, human_SI, human_B): New constants.
20297         (human_readable_inexact, human_block_size): Remove.
20298         (human_readable): Size args are now uintmax_t, not int.
20299         (human_options): New decl.
20300
20301         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20302         unnecessary now that we assume C89 or better.  This change
20303         imported from coreutils.
20304
20305         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20306         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20307         in the 2003-05-30 sync from glibc.
20308
20309         .h files should stand alone, but we shouldn't include <sys/types.h>
20310         if we can get away with just <stddef.h>.
20311
20312         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20313         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20314         rather than <sys/types.h>, as we merely need size_t.
20315         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20316         to get size_t.
20317         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20318         Include <stdio.h>, to get FILE.
20319         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20320         memcasecmp.h has included <stddef.h> and all we need is size_t.
20321         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20322         our interface, instead of including <sys/types.h>
20323
20324 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20325
20326         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20327         now, as glibc mktime is buggy on non-glibc systems.
20328
20329 2003-06-03  Karl Berry  <karl@gnu.org>
20330
20331         * config/config.sub: update from prep.
20332
20333 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20334
20335         [from coreutils]
20336         Fix some minor time-related bugs with POSIX time arguments.
20337         Some valid time stamps were being rejected (notably -1, and
20338         time stamps before 1900 on 64-bit hosts).  And some invalid
20339         time stamps were being accepted, e.g. September 31.
20340
20341         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20342         that we can return (time_t) -1 successfully.
20343         * lib/posixtm.c: Likewise.
20344         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20345         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20346         (t): Remove static var.
20347         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20348         of static var.  All uses changed.
20349         (year): Do not reject years before 1900; they can occur with
20350         64-bit time_t.
20351         (posix_time_parse): Do not check for out-of-range components;
20352         that is now the caller's responsibility, since our checks were
20353         only approximations.
20354         (posixtime): Use mktime to check for out-of-range components,
20355         since it knows them exactly.
20356         If mktime returns (time_t) -1, check whether an error actually occurred
20357         by invoking localtime on -1.
20358         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20359         posixtime failures better.
20360         Improve the test data (in comments only).
20361
20362 2003-06-02  Karl Berry  <karl@gnu.org>
20363
20364         * config/mkinstalldirs (version): new variable.
20365         (--version): new option.
20366         (usage): improve message.
20367
20368 2003-05-30  Karl Berry  <karl@gnu.org>
20369
20370         * lib/mktime.c: update from libc.
20371
20372 2003-05-30  Bruno Haible  <bruno@clisp.org>
20373
20374         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20375         * config/config.rpath: Upgrade to gettext-0.12.1.
20376
20377 2003-05-30  Bruno Haible  <bruno@clisp.org>
20378
20379         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20380         * m4/nls.m4: New file, from gettext-0.12.1.
20381         * m4/po.m4: New file, from gettext-0.12.1.
20382         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20383
20384 2003-05-30  Bruno Haible  <bruno@clisp.org>
20385
20386         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20387         * lib/localcharset.h: Likewise.
20388         * lib/localcharset.c: Likewise.
20389
20390 2003-05-29  Karl Berry  <karl@gnu.org>
20391
20392         * config/config.rpath: update from gettext.
20393
20394 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20395
20396         Assume the headers required for C89 freestanding compilers.
20397         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20398         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20399         * m4/human.m4 (gl_HUMAN): Likewise.
20400         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20401         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20402         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20403         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20404         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20405         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20406
20407 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20408
20409         Assume the headers required for C89 freestanding compilers.
20410         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20411         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20412         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20413         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20414         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20415         define, since <limits.h> is guaranteed to do that.
20416         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20417         * lib/exclude.c: Include <stdbool.h> unconditionally.
20418         * lib/tempname.c: Include <stddef.h> unconditionally.
20419         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20420         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20421         <stddef.h> does that.
20422         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20423         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20424         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20425         needed.
20426         * lib/xstrtol.c: Likewise.
20427         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20428         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20429
20430         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20431         warnings on some platforms.
20432
20433         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20434         arbitrarily.
20435
20436 2003-05-26  Jim Meyering  <jim@meyering.net>
20437
20438         Merge in a change from coreutils:
20439         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20440         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20441         that condition, rather than `-1' which is slightly misleading.
20442         Change the name of the cache variable to have the gl_ prefix.
20443         Prompted by a patch from Richard Dawe for DJGPP.
20444
20445 2003-05-24  Karl Berry  <karl@gnu.org>
20446
20447         * config/config.guess: update from prep.
20448
20449 2003-05-22  Karl Berry  <karl@gnu.org>
20450
20451         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20452
20453 2003-05-20  Karl Berry  <karl@gnu.org>
20454
20455         * config/config.guess: update from prep.
20456
20457 2003-05-18  Karl Berry  <karl@gnu.org>
20458
20459         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20460         might actually be set by the user.
20461
20462         * config/depcomp, install-sh, mdate-sh: update from automake.
20463
20464 2003-05-17  Bruno Haible  <bruno@clisp.org>
20465
20466         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20467         invalid expansion for AC_EGREP_CPP.
20468         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20469         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20470         Suggested by Akim Demaille <akim@epita.fr> in
20471         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20472
20473 2003-05-12  Jim Meyering  <jim@meyering.net>
20474
20475         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20476         the space-padded-by-default conversion specifiers, %e, %k, %l.
20477
20478 2003-05-12  Bruno Haible  <bruno@clisp.org>
20479
20480         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20481         the string is longer than 4 KB.
20482
20483 2003-05-11  Karl Berry  <karl@gnu.org>
20484
20485         * config/config.{guess,sub}: update from prep.
20486
20487 2003-05-09  Bruno Haible  <bruno@clisp.org>
20488
20489         * modules/error: Add m4/strerror_r.m4 to file list.
20490
20491 2003-05-03  Bruno Haible  <bruno@clisp.org>
20492
20493         Upgrade to Unicode-4.0.
20494         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20495         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20496         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20497         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20498         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20499         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20500         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20501         Change width of U+E0100..U+E01EF from 1 to 0.
20502
20503 2003-04-25  Jim Meyering  <jim@meyering.net>
20504
20505         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20506         of type size_t, not int.
20507
20508 2003-04-25  Bruno Haible  <bruno@clisp.org>
20509
20510         * lib/copy-file.c: Include <stddef.h>, for size_t.
20511
20512 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20513
20514         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20515         code which expansion is under static control.  Patch imported from
20516         Akim Demaille's patch to Bison; see
20517         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20518
20519 2003-04-14  Bruno Haible  <bruno@clisp.org>
20520
20521         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20522
20523 2003-04-11  Jim Meyering  <jim@meyering.net>
20524
20525         Merge changes from Coreutils.
20526
20527         2003-03-22  Jim Meyering  <jim@meyering.net>
20528
20529         * lib/strftime.c (widen): Cast alloca return value to proper type.
20530
20531         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20532
20533         From GNU libc.
20534         * lib/strftime.c (my_strftime): Handle very large width
20535         specifications for numeric values correctly.  Improve checks for
20536         overflow.
20537
20538         2003-01-19  Jim Meyering  <jim@meyering.net>
20539
20540         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20541         definitions.
20542         (nl_get_alt_digit) [! defined my_strftime]: Define.
20543         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20544         _nl_get_alt_digit and _nl_get_walt_digit.
20545
20546         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20547         libc. These changes have no effect outside of _LIBC.
20548
20549 2003-04-10  Bruno Haible  <bruno@clisp.org>
20550
20551         * modules/findprog: New file.
20552         * MODULES.html.sh (func_all_modules): Add it.
20553
20554 2003-04-10  Bruno Haible  <bruno@clisp.org>
20555
20556         * m4/findprog.m4: New file.
20557         * m4/eaccess.m4: New file.
20558
20559 2003-04-10  Bruno Haible  <bruno@clisp.org>
20560
20561         * lib/findprog.h: New file, from GNU gettext.
20562         * lib/findprog.c: New file, from GNU gettext.
20563
20564 2003-04-05  Jim Meyering  <jim@meyering.net>
20565
20566         Merge changes from Coreutils.
20567
20568         * lib/exclude.h (PARAMS): Remove definition and uses.
20569         * lib/exclude.c: Remove uses of `PARAMS'.
20570
20571         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20572         Add test-cases for DOS filenames. Declare program_name.
20573         (main): Set up program_name.  Patch by Rich Dawe.
20574
20575         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20576         error from mntctl.
20577         Use mntctl's return value to drive the entry-processing loop, since
20578         we can't rely on the value of the vmt_length member in the last
20579         entry.  On some systems doing so could result in exhausting
20580         virtual memory.  Based in part on a patch from Mike Jetzer.
20581
20582 2003-04-04  Bruno Haible  <bruno@clisp.org>
20583
20584         * modules/linebreak: New file.
20585         * MODULES.html.sh (func_all_modules): Add it.
20586
20587 2003-04-04  Bruno Haible  <bruno@clisp.org>
20588
20589         * m4/linebreak.m4: New file.
20590
20591 2003-04-04  Bruno Haible  <bruno@clisp.org>
20592
20593         * lib/linebreak.h: New file, from GNU gettext.
20594         * lib/linebreak.c: New file, from GNU gettext with slight
20595         modifications.
20596         * lib/lbrkprop.h: New file, from GNU gettext.
20597
20598 2003-04-03  Bruno Haible  <bruno@clisp.org>
20599
20600         * modules/utf8-ucs4: New file.
20601         * modules/utf16-ucs4: New file.
20602         * modules/ucs4-utf8: New file.
20603         * modules/ucs4-utf16: New file.
20604         * MODULES.html.sh (func_all_modules): Add them.
20605
20606 2003-04-03  Bruno Haible  <bruno@clisp.org>
20607
20608         * m4/utf-ucs4.m4: New file.
20609         * m4/ucs4-utf.m4: New file.
20610
20611 2003-04-03  Bruno Haible  <bruno@clisp.org>
20612
20613         * lib/utf8-ucs4.h: New file, from GNU gettext.
20614         * lib/utf16-ucs4.h: New file, from GNU gettext.
20615         * lib/ucs4-utf8.h: New file, from GNU gettext.
20616         * lib/ucs4-utf16.h: New file, from GNU gettext.
20617
20618 2003-04-02  Bruno Haible  <bruno@clisp.org>
20619
20620         * modules/binary-io: New file.
20621         * MODULES.html.sh (func_all_modules): Add it.
20622
20623 2003-04-02  Bruno Haible  <bruno@clisp.org>
20624
20625         * lib/binary-io.h: New file, from GNU gettext.
20626
20627 2003-04-01  Bruno Haible  <bruno@clisp.org>
20628
20629         * modules/pathname: New file.
20630         * MODULES.html.sh (func_all_modules): Add it.
20631
20632 2003-04-01  Bruno Haible  <bruno@clisp.org>
20633
20634         * lib/pathname.h: New file, from GNU gettext.
20635         * lib/concatpath.c: New file, from GNU gettext.
20636
20637 2003-03-30  Bruno Haible  <bruno@clisp.org>
20638
20639         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20640
20641 2003-03-30  Bruno Haible  <bruno@clisp.org>
20642
20643         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20644         function chown() doesn't exist.
20645
20646 2003-03-28  Bruno Haible  <bruno@clisp.org>
20647
20648         * modules/copy-file: New file.
20649         * MODULES.html.sh (func_all_modules): Add it.
20650
20651 2003-03-28  Bruno Haible  <bruno@clisp.org>
20652
20653         * m4/copy-file.m4: New file.
20654
20655 2003-03-28  Bruno Haible  <bruno@clisp.org>
20656
20657         * lib/copy-file.h: New file, from GNU gettext.
20658         * lib/copy-file.c: New file, from GNU gettext.
20659
20660 2003-03-18  Jim Meyering  <jim@meyering.net>
20661
20662         * lib/quote.c (quote_n): Fix typo in comment.
20663
20664 2003-03-18  Bruno Haible  <bruno@clisp.org>
20665
20666         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20667         checking.
20668         * m4/onceonly_2_57.m4: Likewise.
20669
20670 2003-03-17  Bruno Haible  <bruno@clisp.org>
20671
20672         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20673         (m4_quote): Remove macro.
20674         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20675
20676 2003-03-14  Jim Meyering  <jim@meyering.net>
20677
20678         Merge changes from Coreutils.
20679         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20680         to be const, in order to avoid warnings.
20681         (obstack_room): Likewise.
20682         (obstack_empty_p): Likewise.
20683
20684 2003-03-14  Bruno Haible  <bruno@clisp.org>
20685
20686         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20687         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20688
20689 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20690
20691         Merge changes from Bison.
20692         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20693         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20694         when compiling Bison 1.875's `bitset bset = obstack_alloc
20695         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20696         * lib/hash.c: Include <stdbool.h> unconditionally.
20697
20698 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20699
20700         * m4/onceonly.m4 (m4_quote): New macro.
20701         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20702         Quote AC_FOREACH variable-expansions properly.
20703
20704 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20705
20706         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20707
20708 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20709
20710         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20711         Reported by Bruce Becker; see:
20712         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20713
20714 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20715             Bruno Haible  <bruno@clisp.org>
20716
20717         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20718         Reported by John Hughes, see
20719         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20720
20721 2003-02-20  Bruno Haible  <bruno@clisp.org>
20722
20723         * MODULES.html.sh (func_all_modules): Add poll.
20724
20725 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20726
20727         * modules/poll: New file.
20728
20729 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20730
20731         * lib/poll_.h: New file.
20732         * lib/poll.c: New file.
20733
20734 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20735
20736         * m4/poll.m4: New file.
20737
20738 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20739
20740         * modules/mathl: New file.
20741
20742 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20743
20744         * lib/mathl.h: New file.
20745         * lib/acosl.c: New file.
20746         * lib/asinl.c: New file.
20747         * lib/atanl.c: New file.
20748         * lib/ceill.c: New file.
20749         * lib/cosl.c: New file.
20750         * lib/expl.c: New file.
20751         * lib/floorl.c: New file.
20752         * lib/frexpl.c: New file.
20753         * lib/ldexpl.c: New file.
20754         * lib/logl.c: New file.
20755         * lib/sincosl.c: New file.
20756         * lib/sinl.c: New file.
20757         * lib/sqrtl.c: New file.
20758         * lib/tanl.c: New file.
20759         * lib/trigl.c: New file.
20760         * lib/trigl.h: New file.
20761
20762 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20763
20764         * m4/mathl.m4: New file.
20765
20766 2003-02-18  Bruno Haible  <bruno@clisp.org>
20767
20768         * MODULES.html.sh (func_all_modules): Add mathl.
20769
20770 2003-02-17  Bruno Haible  <bruno@clisp.org>
20771
20772         * modules/mkdtemp: New module.
20773         * MODULES.html.sh (func_all_modules): Add it.
20774
20775 2003-02-17  Bruno Haible  <bruno@clisp.org>
20776
20777         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20778
20779 2003-02-17  Bruno Haible  <bruno@clisp.org>
20780
20781         * lib/mkdtemp.h: New file, from GNU gettext.
20782         * lib/mkdtemp.c: New file, from GNU gettext.
20783
20784 2003-02-02  Jim Meyering  <jim@meyering.net>
20785
20786         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20787         e.g. glibc-2.2.93.
20788
20789 2003-01-31  Bruno Haible  <bruno@clisp.org>
20790
20791         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20792         'rpl_rename'.
20793         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20794         'rpl_strnlen'.
20795         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20796         'rpl_strtod'.
20797         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20798         'rpl_utime'.
20799
20800 2003-01-31  Bruno Haible  <bruno@clisp.org>
20801
20802         * lib/rename.c: #undef rename before defining rpl_rename.
20803         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20804
20805 2003-01-30  Bruno Haible  <bruno@clisp.org>
20806
20807         * modules/vasnprintf, modules/vasprintf: New modules.
20808         * MODULES.html.sh (func_all_modules): Add them.
20809
20810 2003-01-30  Bruno Haible  <bruno@clisp.org>
20811
20812         * m4/signed.m4: New file, from GNU gettext.
20813         * m4/longdouble.m4: New file, from GNU gettext.
20814         * m4/wchar_t.m4: New file, from GNU gettext.
20815         * m4/wint_t.m4: New file, from GNU gettext.
20816         * m4/vasnprintf.m4: New file.
20817         * m4/vasprintf.m4: New file.
20818
20819 2003-01-30  Bruno Haible  <bruno@clisp.org>
20820
20821         * lib/printf-args.h: New file, from GNU gettext.
20822         * lib/printf-args.c: New file, from GNU gettext.
20823         * lib/printf-parse.h: New file, from GNU gettext.
20824         * lib/printf-parse.c: New file, from GNU gettext.
20825         * lib/vasnprintf.h: New file, from GNU gettext.
20826         * lib/vasnprintf.c: New file, from GNU gettext.
20827         * lib/asnprintf.c: New file, from GNU gettext.
20828         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20829         * lib/vasprintf.c: New file, from GNU gettext.
20830         * lib/asprintf.c: New file, from GNU gettext.
20831
20832 2003-01-29  Bruno Haible  <bruno@clisp.org>
20833
20834         * modules/stpncpy: New module.
20835         * MODULES.html.sh (func_all_modules): Add it.
20836
20837 2003-01-29  Bruno Haible  <bruno@clisp.org>
20838
20839         * m4/stpncpy.m4: New file.
20840
20841 2003-01-29  Bruno Haible  <bruno@clisp.org>
20842
20843         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20844         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20845
20846 2003-01-28  Bruno Haible  <bruno@clisp.org>
20847
20848         * modules/c-ctype: New module.
20849         * MODULES.html.sh (func_all_modules): Add it.
20850
20851 2003-01-28  Bruno Haible  <bruno@clisp.org>
20852
20853         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20854         Paul Eggert.
20855         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20856         Paul Eggert.
20857
20858 2003-01-27  Bruno Haible  <bruno@clisp.org>
20859
20860         * modules/xsetenv: New module.
20861         * MODULES.html.sh (func_all_modules): Add it.
20862
20863 2003-01-27  Bruno Haible  <bruno@clisp.org>
20864
20865         * lib/xsetenv.h: New file, from GNU gettext.
20866         * lib/xsetenv.c: New file, from GNU gettext.
20867
20868 2003-01-23  Jim Meyering  <jim@meyering.net>
20869
20870         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20871         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20872
20873 2003-01-23  Bruno Haible  <bruno@clisp.org>
20874
20875         * modules/minmax: New module.
20876         * MODULES.html.sh (func_all_modules): Add it.
20877
20878 2003-01-23  Bruno Haible  <bruno@clisp.org>
20879
20880         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20881         Eggert.
20882
20883 2003-01-22  Bruno Haible  <bruno@clisp.org>
20884
20885         * modules/exit: New module.
20886         * MODULES.html.sh (func_all_modules): Add it.
20887
20888 2003-01-22  Bruno Haible  <bruno@clisp.org>
20889
20890         * lib/exit.h: New file, from GNU gettext.
20891
20892 2003-01-19  Bruno Haible  <bruno@clisp.org>
20893
20894         * gnulib-tool: Recognize option --extract-maintainer.
20895         (func_get_maintainer): New function.
20896         * modules/*: Add Maintainer entry.
20897
20898 2003-01-16  Jim Meyering  <jim@meyering.net>
20899
20900         * m4/regex.m4: The `regex' struct is both input and output.
20901         Initialize it before each use.  Patch by Tim Waugh.
20902
20903 2003-01-16  Bruno Haible  <bruno@clisp.org>
20904
20905         * MODULES.html.sh: Add a table of contents. Add the module name as
20906         leftmost column. Add hyperlinks.
20907
20908 2003-01-15  Bruno Haible  <bruno@clisp.org>
20909
20910         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20911
20912 2003-01-15  Bruno Haible  <bruno@clisp.org>
20913
20914         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20915         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20916         suffix.
20917
20918 2003-01-15  Bruno Haible  <bruno@clisp.org>
20919
20920         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20921
20922 2003-01-15  Bruno Haible  <bruno@clisp.org>
20923
20924         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20925         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20926
20927 2003-01-14  Jim Meyering  <jim@meyering.net>
20928
20929         * lib/same.c (same_name): Tweak a comment.
20930
20931 2003-01-14  Bruno Haible  <bruno@clisp.org>
20932
20933         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20934         when a string comparison is sufficient.
20935
20936 2003-01-14  Bruno Haible  <bruno@clisp.org>
20937
20938         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20939         'unsigned int'.
20940
20941 2003-01-14  Bruno Haible  <bruno@clisp.org>
20942
20943         * lib/hash-pjw.c: Add comment about low quality of this function.
20944
20945 2003-01-13  Bruno Haible  <bruno@clisp.org>
20946
20947         * modules/stpcpy: Distribute lib/stpcpy.h.
20948         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20949
20950 2003-01-13  Bruno Haible  <bruno@clisp.org>
20951
20952         * modules/*: Add a description.
20953         * modules/strpbrk: Fix Makefile.am snippet.
20954         * modules/strtoimax: Fix dependencies.
20955         * modules/strtoumax: Likewise.
20956
20957 2003-01-13  Bruno Haible  <bruno@clisp.org>
20958
20959         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20960         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20961         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20962
20963 2003-01-13  Bruno Haible  <bruno@clisp.org>
20964
20965         * gnulib-tool (func_create_testdir): Store config/* files in the main
20966         directory.
20967         * config.rpath: Move to ...
20968         * config/config.rpath: ... here.
20969         * modules/gettext: Contains config/config.rpath, not config.rpath.
20970         * modules/iconv: Likewise.
20971
20972 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20973
20974         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20975         to avoid collisions with libcurses and libreadline.
20976
20977         * m4/getstr.m4: Remove.
20978         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20979
20980 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20981
20982         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20983         to avoid collisions with libcurses and libreadline.
20984
20985         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20986         * lib/getstr.h, getstr.c: Remove.
20987         * lib/getline.c: Include "getline.h", to check interface.
20988         Move body of old getstr.c here: this defines MIN_CHUNK and
20989         declares getdelim2, which is renamed from getstr.
20990         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20991
20992         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20993         All uses changed.
20994         * lib/linebuffer.h: Likewise.
20995         (readline): Remove backward-compatibility macro.
20996
20997 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20998
20999         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
21000         to avoid collisions with libcurses and libreadline.
21001         * getstr: Remove.
21002         * MODULES.html.sh: Remove getstr.
21003         * modules/getline: Depend on unlocked-io, not getstr.
21004
21005 2003-01-12  Jim Meyering  <jim@meyering.net>
21006
21007         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
21008
21009 2003-01-10  Bruno Haible  <bruno@clisp.org>
21010
21011         * modules/alloca: Change Makefile.am requirements. Simplify Include
21012         requirements. Add lib/alloca_.h to file list.
21013
21014 2003-01-10  Bruno Haible  <bruno@clisp.org>
21015
21016         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
21017
21018 2003-01-10  Bruno Haible  <bruno@clisp.org>
21019
21020         * lib/alloca_.h: New file.
21021         * lib/getdate.y: Unconditionally include alloca.h.
21022         * lib/makepath.c: Likewise.
21023         * lib/setenv.c: Likewise.
21024         * lib/userspec.c: Likewise.
21025
21026 2003-01-09  Karl Berry  <karl@gnu.org>
21027
21028         * MODULES.html.sh: include `dirname $0` in PATH, to find
21029         gnulib-tool.
21030
21031 2003-01-09  Bruno Haible  <bruno@clisp.org>
21032
21033         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21034         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21035
21036 2003-01-09  Bruno Haible  <bruno@clisp.org>
21037
21038         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21039
21040 2003-01-09  Bruno Haible  <bruno@clisp.org>
21041
21042         * lib/stdbool.h.in: New file.
21043
21044 2003-01-09  Bruno Haible  <bruno@clisp.org>
21045
21046         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21047         * MODULES.html.sh: Likewise.
21048
21049 2003-01-08  Jim Meyering  <jim@meyering.net>
21050
21051         * lib/full-write.c: Undefine and define-away `const' after inclusion
21052         of errno.h, not before.  Suggestion from Bruno Haible.
21053
21054 2003-01-08  Bruno Haible  <bruno@clisp.org>
21055
21056         * modules/full-read: Depend on full-write.
21057
21058 2003-01-08  Bruno Haible  <bruno@clisp.org>
21059
21060         * lib/safe-read.c: Include specification header first, to ensure its
21061         selfcontainedness.
21062         * lib/full-write.c: Likewise.
21063
21064 2003-01-07  Jim Meyering  <jim@meyering.net>
21065
21066         * lib/full-write.c: Rework so that it may serve to define full_read,
21067         too.
21068         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21069
21070 2003-01-07  Bruno Haible  <bruno@clisp.org>
21071
21072         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21073         <inttypes.h>.
21074         * lib/xstrtol.h: Likewise.
21075         * lib/xstrtoimax.c: Likewise.
21076         * lib/xstrtoumax.c: Likewise.
21077         * lib/human.h: Likewise.
21078
21079         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21080         on systems that have <inttypes.h> but not <stdint.h>.
21081
21082 2003-01-07  Bruno Haible  <bruno@clisp.org>
21083
21084         * MODULES.html.sh: Add copyright notice.
21085         (missed_files): Omit CVS directory entries.
21086         (func_module): Make it work with sed-3.02.
21087         * MODULES.txt: Remove file.
21088
21089 2003-01-06  Jim Meyering  <jim@meyering.net>
21090
21091         * lib/version-etc.c: Update year in translatable copyright string.
21092
21093 2003-01-03  Karl Berry  <karl@gnu.org>
21094
21095         * config/config.{guess,sub}: update from prep.
21096
21097 2003-01-02  Karl Berry  <karl@gnu.org>
21098
21099         * doc/COPYING.DOC: belatedly updated to 1.2.
21100
21101 2003-01-01  Karl Berry  <karl@gnu.org>
21102
21103         * gnulib-tool (func_verify_module): report module name $module in
21104         error message, not $1.
21105         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21106         be created, only if it doesn't exist.
21107         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21108
21109 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21110
21111         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21112
21113 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21114
21115         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21116         memcmp if strcoll doesn't work.
21117
21118 2002-12-31  Bruno Haible  <bruno@clisp.org>
21119
21120         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21121         nonempty.
21122
21123 2002-12-31  Bruno Haible  <bruno@clisp.org>
21124
21125         * lib/memcoll.c (STRCOLL): New macro.
21126         (memcoll): Use it.
21127
21128 2002-12-31  Bruno Haible  <bruno@clisp.org>
21129
21130         * lib/localcharset.h: New file.
21131         * lib/localcharset.c: Include it.
21132         * lib/unicodeio.c: Likewise.
21133
21134 2002-12-31  Bruno Haible  <bruno@clisp.org>
21135
21136         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21137         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21138
21139 2002-12-31  Bruno Haible  <bruno@clisp.org>
21140
21141         * lib/getline.h: Include <stddef.h>, for size_t.
21142
21143         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21144         * lib/unicodeio.c: Don't include <stddef.h>.
21145
21146 2002-12-31  Bruno Haible  <bruno@clisp.org>
21147
21148         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21149         HAVE_TM_ZONE.
21150
21151 2002-12-24  Karl Berry  <karl@gnu.org>
21152
21153         * config/config.guess: update from prep.
21154
21155 2002-12-24  Bruno Haible  <bruno@clisp.org>
21156
21157         General infrasructure.
21158         * m4/README: Rewritten.
21159         * m4/onceonly.m4: New file.
21160         * m4/onceonly_2_57.m4: New file.
21161
21162         Module atexit.
21163         * m4/atexit.m4: New file.
21164
21165         Module strtod.
21166         * m4/strtod.m4: New file.
21167
21168         Module strtol.
21169         * m4/strtol.m4: New file.
21170
21171         Module strtoul.
21172         * m4/strtoul.m4: New file.
21173
21174         Module memchr.
21175         * m4/memchr.m4: New file.
21176
21177         Module memcmp.
21178         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21179         (jm_FUNC_MEMCMP): Invoke it.
21180
21181         Module memcpy.
21182         * m4/memcpy.m4: New file.
21183
21184         Module memmove.
21185         * m4/memmove.m4: New file.
21186
21187         Module memset.
21188         * m4/memset.m4: New file.
21189
21190         Module strcspn.
21191         * m4/strcspn.m4: New file.
21192
21193         Module strpbrk.
21194         * m4/strpbrk.m4: New file.
21195
21196         Module strstr.
21197         * m4/strstr.m4: New file.
21198
21199         Module strerror.
21200         * m4/strerror.m4: New file.
21201
21202         Module mktime.
21203         * m4/mktime.m4: Renamed from jm-mktime.m4.
21204         (gl_PREREQ_MKTIME): New macro.
21205         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21206
21207         Module malloc.
21208         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21209         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21210         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21211
21212         Module realloc.
21213         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21214         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21215         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21216
21217         Module strftime.
21218         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21219         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21220         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21221         gl_TM_GMTOFF.
21222         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21223
21224         Module xalloc.
21225         * m4/xalloc.m4: New file.
21226
21227         Module alloca.
21228         * m4/alloca.m4: New file.
21229
21230         Module putenv.
21231         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21232         (jm_FUNC_PUTENV): Invoke it.
21233
21234         Module setenv.
21235         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21236         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21237         when invoked twice.
21238         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21239         gt_FUNC_SETENV.
21240
21241         Module memrchr.
21242         * m4/memrchr.m4: New file.
21243
21244         Module stpcpy.
21245         * m4/stpcpy.m4: New file.
21246
21247         Module strcase.
21248         * m4/strcase.m4: New file.
21249
21250         Module strdup.
21251         * m4/strdup.m4: New file.
21252
21253         Module strnlen.
21254         * m4/strnlen.m4: New file.
21255
21256         Module strndup.
21257         * m4/strndup.m4: New file.
21258
21259         Module xstrtod.
21260         * m4/xstrtod.m4: New file.
21261
21262         Module xstrtol.
21263         * m4/xstrtol.m4: New file.
21264
21265         Module getdate.
21266         * m4/getdate.m4: New file.
21267
21268         Module unlocked-io.
21269         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21270         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21271         * m4/jm-glibc-io.m4n: Remove file.
21272
21273         Module long-options.
21274         * m4/long-options.m4: New file.
21275
21276         Module md5.
21277         * m4/md5.m4: New file.
21278
21279         Module sha.
21280         * m4/sha.m4: New file.
21281
21282         Module getstr.
21283         * m4/getstr.m4: New file.
21284
21285         Module getline.
21286         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21287         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21288         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21289         simply getline. Infoke gl_PREREQ_GETLINE.
21290
21291         Module obstack.
21292         * m4/obstack.m4: New file.
21293
21294         Module hash.
21295         * m4/hash.m4: New file.
21296
21297         Module readtokens.
21298         * m4/readtokens.m4: New file.
21299
21300         Module strverscmp.
21301         * m4/strverscmp.m4: New file.
21302
21303         Module stdbool.
21304         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21305         OSF/1.
21306
21307         Module strtoll.
21308         * m4/strtoll.m4: New file.
21309
21310         Module strtoull.
21311         * m4/strtoull.m4: New file.
21312
21313         Module strtoimax.
21314         * m4/strtoimax.m4: New file.
21315
21316         Module strtoumax.
21317         * m4/strtoumax.m4: New file.
21318
21319         Module xstrtoimax.
21320         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21321         jm_AC_PREREQ_XSTRTOIMAX.
21322         Moved the strtol prerequisites to strtol.m4.
21323         Moved the strtoll prerequisites to strtoll.m4.
21324         Moved the strtoimax prerequisites to strtoimax.m4.
21325
21326         Module xstrtoumax.
21327         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21328         jm_AC_PREREQ_XSTRTOUMAX.
21329         Moved the strtoul prerequisites to strtoul.m4.
21330         Moved the strtoull prerequisites to strtoull.m4.
21331         Moved the strtoumax prerequisites to strtoumax.m4.
21332
21333         Module chown.
21334         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21335         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21336
21337         Module dup2.
21338         * m4/dup2.m4: New file.
21339
21340         Module ftruncate.
21341         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21342         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21343
21344         Module getgroups.
21345         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21346         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21347
21348         Module gettimeofday.
21349         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21350         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21351         gl_PREREQ_GETTIMEOFDAY.
21352
21353         Module mkdir.
21354         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21355         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21356
21357         Module mkstemp.
21358         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21359         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21360         jm_AC_TYPE_UINTMAX_T.
21361         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21362
21363         Module stat.
21364         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21365         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21366
21367         Module lstat.
21368         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21369         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21370
21371         Module timespec.
21372         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21373         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21374         * m4/st_mtim.m4: Indentation.
21375
21376         Module nanosleep.
21377         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21378         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21379         gl_PREREQ_NANOSLEEP.
21380
21381         Module regex.
21382         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21383         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21384         (gl_REGEX): New macro.
21385
21386         Module rename.
21387         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21388         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21389
21390         Module rmdir.
21391         * m4/rmdir.m4: New file.
21392
21393         Module utime.
21394         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21395         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21396         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21397
21398         Module dirname.
21399         * m4/dirname.m4: New file.
21400
21401         Module getopt.
21402         * m4/getopt.m4: New file.
21403
21404         Module unistd-safer.
21405         * m4/unistd-safer.m4: New file.
21406
21407         Module fnmatch.
21408         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21409         declaration.
21410         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21411         (gl_FUNC_FNMATCH_POSIX): New macro.
21412         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21413         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21414         simply fnmatch.
21415
21416         Module exclude.
21417         * m4/exclude.m4: New file.
21418
21419         Module human.
21420         * m4/human.m4: New file.
21421
21422         Module acl.
21423         * m4/acl.m4: Nop.
21424
21425         Module backupfile.
21426         * m4/backupfile.m4: New file.
21427         * m4/d-ino.m4: Indentation.
21428
21429         Module fsusage.
21430         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21431         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21432         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21433
21434         Module dirfd.
21435         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21436         requirements.
21437
21438         Module euidaccess.
21439         * m4/euidaccess.m4: New file.
21440
21441         Module file-type.
21442         * m4/file-type.m4: New file.
21443
21444         Module fileblocks.
21445         * m4/fileblocks.m4: New file.
21446
21447         Module filemode.
21448         * m4/filemode.m4: New file.
21449
21450         Module isdir.
21451         * m4/isdir.m4: New file.
21452
21453         Module lchown.
21454         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21455         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21456
21457         Module makepath.
21458         * m4/makepath.m4: New file.
21459
21460         Module modechange.
21461         * m4/modechange.m4: New file.
21462
21463         Module mountlist.
21464         * m4/mountlist.m4: New file.
21465         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21466         Indentation.
21467
21468         Module path-concat.
21469         * m4/path-concat.m4: New file.
21470
21471         Module pathmax.
21472         * m4/pathmax.m4: New file.
21473
21474         Module same.
21475         * m4/same.m4: New file.
21476
21477         Module save-cwd.
21478         * m4/save-cwd.m4: New file.
21479
21480         Module savedir.
21481         * m4/savedir.m4: New file.
21482
21483         Module xgetcwd.
21484         * m4/xgetcwd.m4: New file.
21485         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21486
21487         Module xreadlink.
21488         * m4/xreadlink.m4: New file.
21489
21490         Module safe-read.
21491         * m4/safe-read.m4: New file.
21492
21493         Module safe-write.
21494         * m4/safe-write.m4: New file.
21495
21496         Module closeout.
21497         * m4/closeout.m4: New file.
21498
21499         Module stdio-safer.
21500         * m4/stdio-safer.m4: New file.
21501
21502         Module getpass.
21503         * m4/getpass.m4: New file.
21504
21505         Module getugroups.
21506         * m4/getugroups.m4: New file.
21507
21508         Module group-member.
21509         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21510         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21511
21512         Module idcache.
21513         * m4/idcache.m4: New file.
21514
21515         Module userspec.
21516         * m4/userspec.m4: New file.
21517
21518         Module gettime.
21519         * m4/clock_time.m4: New file.
21520         * m4/gettime.m4: New file.
21521
21522         Module settime.
21523         * m4/settime.m4: New file.
21524
21525         Module posixtm.
21526         * m4/posixtm.m4: New file.
21527
21528         Module gethostname.
21529         * m4/gethostname.m4: New file.
21530
21531         Module canon-host.
21532         * m4/canon-host.m4: New file.
21533
21534         Module gettext.
21535         * m4/codeset.m4: New file, from gettext-0.11.5.
21536         * m4/gettext.m4: New file, from gettext-0.11.5.
21537         * m4/glibc21.m4: New file, from gettext-0.11.5.
21538         * m4/iconv.m4: New file, from gettext-0.11.5.
21539         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21540         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21541         * m4/inttypes.m4: New file, from gettext-0.11.5.
21542         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21543         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21544         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21545         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21546         * m4/lib-link.m4: New file, from gettext-0.11.5.
21547         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21548         * m4/progtest.m4: New file, from gettext-0.11.5.
21549         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21550         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21551         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21552
21553         Module localcharset.
21554         * m4/localcharset.m4: New file.
21555
21556         Module hard-locale.
21557         * m4/hard-locale.m4: New file.
21558
21559         Module mbswidth.
21560         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21561         onceonly macros.
21562         * m4/mbrtowc.m4: Add comment.
21563
21564         Module memcasecmp.
21565         * m4/memcasecmp.m4: New file.
21566
21567         Module memcoll.
21568         * m4/memcoll.m4: New file.
21569
21570         Module unicodeio.
21571         * m4/unicodeio.m4: New file.
21572
21573         Module rpmatch.
21574         * m4/rpmatch.m4: New file.
21575
21576         Module yesno.
21577         * m4/yesno.m4: New file.
21578
21579         Module exitfail.
21580         * m4/exitfail.m4: New file.
21581
21582         Module c-stack.
21583         * m4/c-stack.m4 (gl_C_STACK): New macro.
21584         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21585
21586         Module error.
21587         * m4/error.m4 (gl_ERROR): New macro.
21588         (jm_PREREQ_ERROR): Use onceonly macros.
21589
21590         Module fatal.
21591         * m4/fatal.m4: New file.
21592
21593         Module getloadavg.
21594         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21595         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21596
21597         Module getpagesize.
21598         * m4/getpagesize.m4: New file.
21599
21600         Module getusershell.
21601         * m4/getusershell.m4: New file.
21602
21603         Module physmem.
21604         * m4/physmem.m4: New file.
21605
21606         Module posixver.
21607         * m4/posixver.m4: New file.
21608
21609         Module quotearg.
21610         * m4/quotearg.m4: New file.
21611
21612         Module quote.
21613         * m4/quote.m4: New file.
21614
21615         Module readutmp.
21616         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21617
21618         Module sig2str.
21619         * m4/sig2str.m4: New file.
21620
21621         Other.
21622         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21623         ulonglong.m4.
21624         * m4/intmax_t.m4: New file.
21625         * m4/d-type.m4: Indentation.
21626         * m4/jm-macros.m4: Update.
21627         * m4/prereq.m4 (jm_PREREQ): Update.
21628         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21629         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21630         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21631         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21632         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21633         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21634         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21635         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21636         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21637         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21638         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21639         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21640         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21641         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21642         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21643         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21644         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21645         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21646         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21647
21648 2002-12-24  Bruno Haible  <bruno@clisp.org>
21649
21650         * MODULES.txt: Update according to m4/ changes.
21651
21652         Module gettext.
21653         * config.rpath: New file, from gettext-0.11.5.
21654
21655         * modules/*: New module descriptions.
21656         * gnulib-tool: New file.
21657         * MODULES.html.sh: New file.
21658
21659 2002-12-21  Karl Berry  <karl@gnu.org>
21660
21661         * doc/fdl.texi: update to version 1.2.
21662
21663 2002-12-19  Karl Berry  <karl@gnu.org>
21664
21665         * config/config.guess: update from prep.
21666
21667 2002-12-18  Bruno Haible  <bruno@clisp.org>
21668
21669         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21670         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21671
21672 2002-12-17  Bruno Haible  <bruno@clisp.org>
21673
21674         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21675         stdlib.h, string.h.
21676
21677 2002-12-17  Bruno Haible  <bruno@clisp.org>
21678
21679         * lib/canon-host.c (strdup): Remove unused declaration.
21680
21681         * lib/fsusage.c: Include full_read.h.
21682         (get_fs_usage): Use full_read instead of safe_read.
21683
21684         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21685
21686 2002-12-12  Karl Berry  <karl@gnu.org>
21687
21688         * config/config.guess: update from prep.
21689
21690 2002-12-11  Bruno Haible  <bruno@clisp.org>
21691
21692         * m4/setenv.m4: New file, from gettext-0.11.5.
21693
21694 2002-12-11  Bruno Haible  <bruno@clisp.org>
21695
21696         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21697         not unsetenv().
21698         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21699         modifications:
21700
21701         2002-12-11  Bruno Haible  <bruno@clisp.org>
21702
21703                 * setenv.c (alloca): Fall back to malloc.
21704                 (freea): New macro.
21705                 (setenv): Use freea() to free memory allocated with alloca().
21706
21707         2002-11-13  Bruno Haible  <bruno@clisp.org>
21708
21709                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21710                 function declarations.
21711                 * unsetenv.c (unsetenv): Likewise.
21712
21713         2002-03-04  Bruno Haible  <bruno@clisp.org>
21714
21715                 Portability to AIX 4.3.3.
21716                 * unsetenv.c: New file, extracted from setenv.c.
21717                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21718
21719         2001-12-20  Bruno Haible  <bruno@clisp.org>
21720
21721                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21722                 use malloc instead. For SunOS 4.
21723
21724         2001-12-11  Bruno Haible  <bruno@clisp.org>
21725
21726                 * setenv.c: Declare alloca.
21727                 (compar_fn_t): New typedef.
21728                 (KNOWN_VALUE, STORE_VALUE): Use it.
21729
21730         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21731         setenv.h.
21732
21733 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21734
21735         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21736         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21737         Choose values that are less likely to collide with system fnmatch
21738         options.
21739         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21740         defined (e.g., a pure POSIX system).
21741         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21742         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21743
21744 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21745
21746         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21747         a pain in practice to deal with generated m4 files.  This change
21748         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21749
21750         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21751         and jm-glibc-io.m4, as they are no longer a special case.
21752         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21753         kludge and the auto-generation stuff.  Check only whether the
21754         functions are declared, not whether they exist, since older hosts
21755         that don't declare the functions can't use the optimization anyway.
21756
21757 2002-12-06  Jim Meyering  <jim@meyering.net>
21758
21759         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21760
21761         Merge in changes from libc's misc/error.c, in preparation
21762         for the merge of gnulib's changes back into libc.
21763
21764         * lib/error.c (_): Define only if not already defined.
21765         Move definition to follow all #include directives.
21766         Include unlocked-io.h only if !_LIBC.
21767         [_LIBC]: Include <libio/libioP.h>.
21768         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21769         (fflush): Tweak definition to use INTUSE.
21770         (putc): Define.
21771
21772 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21773
21774         * lib/alloca.c [defined emacs]: Include "lisp.h".
21775         (xalloc_die) [defined emacs]: New macro.
21776         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21777         [! defined emacs]: Include <xalloc.h>.
21778         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21779         (pointer): Typedef to POINTER_TYPE *.
21780         (malloc): Remove decl; we now always use xmalloc.
21781         (alloca): Use old-style definition, since Emacs needs this.
21782         Check for arithmetic overflow when computing combined size.
21783
21784 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21785
21786         Do not generate unlocked-io.h automatically, since it's easier to
21787         maintain it by hand.
21788
21789         * lib/unlocked-io.h: New file, from GNU diffutils,
21790         but with proper copyright notice and attribution.
21791         * lib/gen-uio: Remove.
21792         * lib/Makefile.am: Add copyright notice.
21793         (libfetish_a_SOURCES): Add unlocked-io.h.
21794         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21795         (DISTCLEANFILES, io_functions): Remove macros.
21796         (EXTRA_DIST): Remove gen_uio.
21797         (unlocked-io.h): Remove rule.
21798
21799 2002-12-04  Jim Meyering  <jim@meyering.net>
21800
21801         Reflect the fact that stat.c and lstat.c are no longer generated.
21802         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21803         (DISTCLEANFILES): Likewise.
21804         (EXTRA_DIST): Likewise.
21805         (all_local): Don't depend on stat.c or lstat.c.
21806         (stat.c, lstat.c): Remove rules.
21807         (EXTRA_DIST): Remove xstat.in.
21808
21809         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21810         * lib/stat.c: New file.  Contents mostly from xstat.in.
21811         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21812         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21813
21814         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21815         too.
21816         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21817
21818 2002-12-03  Jim Meyering  <jim@meyering.net>
21819
21820         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21821         but not semantics, to minimize the differences between these two files.
21822         (safe_read): Change comment to mention SAFE_READ_ERROR.
21823
21824         * lib/safe-read.c (IS_EINTR): Define.
21825         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21826
21827 2002-12-02  Jim Meyering  <jim@meyering.net>
21828
21829         * lib/safe-read.c (EINTR): Define.
21830         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21831         (INT_MAX): Provide fallback.
21832         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21833
21834         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21835
21836 2002-12-02  Bruno Haible  <bruno@clisp.org>
21837
21838         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21839         Define, taken from safe-read.c.
21840         (INT_MAX): Provide fallback.
21841         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21842         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21843
21844         * lib/safe-read.c (EINTR): Remove definition.
21845         (safe_read): Don't use EINTR if it is absent.
21846
21847 2002-12-01  Jim Meyering  <jim@meyering.net>
21848
21849         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21850         zero.
21851         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21852
21853 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21854
21855         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21856         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21857         with `if (! (value < limit)) abort ();', for readability.
21858
21859 2002-11-26  Karl Berry  <karl@gnu.org>
21860
21861         * lib/strdup.c: copy from libc again, with jim's ok.
21862         * lib/.cppi-disable: re-add strdup.c
21863
21864 2002-11-25  Karl Berry  <karl@gnu.org>
21865
21866         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21867         instead of "strtol.c".
21868
21869 2002-11-25  Karl Berry  <karl@gnu.org>
21870
21871         * config/install-sh: update from automake for variable quoting, $0 in
21872         error msgs, etc.
21873
21874         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21875         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21876         entry.
21877
21878 2002-11-25  Jim Meyering  <jim@meyering.net>
21879
21880         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21881
21882 2002-11-24  Karl Berry  <karl@gnu.org>
21883
21884         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21885         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21886
21887 2002-11-24  Jim Meyering  <jim@meyering.net>
21888
21889         Update from coreutils:
21890
21891         * lib/mktime.c: Merge in changes from libc.
21892
21893         Avoid a link-time failure on some Linux systems.
21894         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21895         (otherwise).
21896         (__mon_yday): Declare with the STATIC attribute.
21897         (__mktime_internal): Likewise.
21898         Based on a report from Greg Schafer.
21899
21900 2002-11-23  Jim Meyering  <jim@meyering.net>
21901
21902         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21903         Use `unsigned', not `int', as type of index.
21904
21905         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21906
21907         * lib/fsusage.c: Remove unneeded parentheses around operands of
21908         `defined'.
21909
21910 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21911
21912         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21913         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21914         so that we can be included first.
21915         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21916         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21917         No need to include stddef.h or sys/types.h any more.
21918         Surround local include files with "", not "<>".
21919         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21920         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21921         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21922         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21923         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21924         (ISPRINT): Remove; no longer needed now that we assume C89.
21925
21926         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21927         Preserve errno.
21928
21929         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21930         quotearg_char): Use SIZE_MAX rather than
21931         (size_t) -1 when we are talking about "infinity".
21932
21933         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21934
21935 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21936
21937         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21938         hint that one should use `if (! x) abort ();' rather than `assert
21939         (x);', and anyway it's one less thing to worry about configuring.
21940         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21941         hash_rehash, hash_insert): Use abort rather than assert.
21942
21943 2002-11-22  Bruno Haible  <bruno@clisp.org>
21944
21945         * lib/safe-read.h: Assume C89. Add comments.
21946         (safe_read): Change return type to size_t.
21947         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21948         byte counts > SSIZE_MAX correctly.
21949         * lib/safe-write.h: New file.
21950         * lib/safe-write.c: New file.
21951         * lib/full-read.h: New file.
21952         * lib/full-read.c: New file.
21953         * lib/full-write.h: Assume C89. Add comments.
21954         * lib/full-write.c: Include safe-write.h.
21955         (full_write): Rewritten to use safe_write.
21956         Suggested by Jim Meyering and Paul Eggert.
21957
21958 2002-11-21  Jim Meyering  <jim@meyering.net>
21959
21960         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21961
21962         Merge in changes from the coreutils.
21963
21964         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21965         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21966         <stdint.h>.
21967         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21968         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21969         int.  Work more efficiently if X is the same width as uintmax_t.
21970         Do not compare X to -1, to avoid bogus compiler warning.
21971         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21972         Don't assume that f_frsize and f_bsize are the same type.
21973
21974         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21975         warning on FreeBSD.
21976
21977         * lib/makepath.c (make_path): Restore umask *before* creating the final
21978         component.
21979         (make_path): Minor reformatting.
21980
21981         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21982         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21983         HAVE_MALLOC/HAVE_REALLOC.
21984
21985         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21986         dummy ones.  At least on GNU/Linux systems, `auto' means something
21987         else.
21988         From Michael Stone.
21989
21990 2002-11-21  Bruno Haible  <bruno@clisp.org>
21991
21992         Remove case insensitive option matching.
21993         * lib/argmatch.h (argcasematch): Remove declaration.
21994         (ARGCASEMATCH): Remove macro.
21995         (__xargmatch_internal): Remove case_sensitive argument.
21996         (XARGMATCH): Update.
21997         (XARGCASEMATCH): Remove macro.
21998         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21999         case_sensitive argument.
22000         (argcasematch): Remove function.
22001         (__xargmatch_internal): Remove case_sensitive argument.
22002         (main): Use XARGMATCH instead of XARGCASEMATCH.
22003
22004         * lib/xmalloc.c: Change compile-time error message. Add comment about
22005         required autoconf version.
22006
22007 2002-11-20  Paul Eggert  <eggert@twinsun.com>
22008
22009         Merge argmatch cleanups from Bison.  Assume C89.
22010
22011         * lib/argmatch.c: Include config.h here, not in argmatch.h.
22012         Include stdlib.h, for EXIT_FAILURE.
22013         Always include <string.h>, since we assume C89.
22014         (EXIT_FAILURE): Remove pre-C89 bug workaround.
22015         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
22016         Include <stddef.h> instead, since it's all we need for size_t.
22017         (PARAMS): Remove.  All uses removed.
22018         (ARRAY_CARDINALITY): Do not bother to #undef.
22019         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
22020         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22021         Remove unnecessary parentheses.
22022         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
22023         Insert necessary parentheses.
22024         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22025         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22026
22027 2002-11-19  Bruno Haible  <bruno@clisp.org>
22028
22029         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22030         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22031
22032         * lib/mbswidth.h (PARAMS): Remove macro.
22033         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22034         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22035
22036         * lib/gcd.h (PARAMS): Remove macro.
22037         (gcd): Use ANSI C function declarations.
22038         * lib/gcd.c (gcd): Likewise.
22039
22040 2002-11-15  Bruno Haible  <bruno@clisp.org>
22041
22042         * lib/strcspn.c: Include <stddef.h>.
22043         (strcspn): Use ANSI C function declaration. Change return type to
22044         size_t. Use NULL.
22045         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22046         (strpbrk): Use NULL.
22047         * lib/strpbrk.h (PARAMS): Remove macro.
22048         (strpbrk): Use ANSI C function declaration.
22049         * lib/strstr.c: Don't include <sys/types.h>.
22050         * lib/strstr.h (PARAMS): Remove macro.
22051         (strstr): Use ANSI C function declarations.
22052
22053 2002-11-14  Karl Berry  <karl@gnu.org>
22054
22055         * config/mkinstalldirs: `do' on separate line, instead of
22056         `for var; do'.
22057
22058 2002-11-06  Bruno Haible  <bruno@clisp.org>
22059
22060         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22061         * lib/gcd.c (gcd): Likewise.
22062
22063 2002-11-05  Bruno Haible  <bruno@clisp.org>
22064
22065         * lib/gcd.h: New file, from gettext-0.11.5.
22066         * lib/gcd.c: New file, from gettext-0.11.5.
22067
22068 2002-11-05  Bruno Haible  <bruno@clisp.org>
22069
22070         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22071         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22072         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22073         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22074
22075         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22076         <libintl.h>.
22077         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22078         <libintl.h>.
22079
22080         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22081         * lib/human.c: Include gettext.h instead of <libintl.h>.
22082         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22083         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22084         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22085         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22086         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22087         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22088         (textdomain): Remove definition.
22089         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22090
22091         * lib/long-options.c: Remove include of <libintl.h> and definition of
22092         _.
22093         * lib/same.c: Remove include of <libintl.h> and definition of _.
22094
22095 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22096
22097         * lib/config.charset: A few additions for Solaris.
22098
22099 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22100
22101         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22102         * lib/localcharset.c (locale_charset): Declare as extern "C".
22103
22104 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22105
22106         * lib/config.charset: msdos in uk_UA uses CP1125.
22107
22108 2002-11-04  Bruno Haible  <bruno@clisp.org>
22109
22110         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22111         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22112         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22113         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22114         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22115
22116 2002-11-04  Bruno Haible  <bruno@clisp.org>
22117
22118         * lib/localcharset.c (locale_charset): Don't return an empty string.
22119
22120 2002-11-04  Bruno Haible  <bruno@clisp.org>
22121
22122         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22123         aliases.
22124
22125 2002-11-04  Bruno Haible  <bruno@clisp.org>
22126
22127         * lib/config.charset: Update for newest glibc. Add canonical names
22128         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22129
22130 2002-11-04  Bruno Haible  <bruno@clisp.org>
22131
22132         * lib/config.charset: Add support for NetBSD.
22133
22134 2002-11-04  Bruno Haible  <bruno@clisp.org>
22135
22136         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22137
22138 2002-11-01  Bruno Haible  <bruno@clisp.org>
22139
22140         * configure.in: Add AC_CONFIG_AUX_DIR call.
22141         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22142         test/Makefile.
22143         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22144
22145 2002-09-28  Karl Berry  <karl@gnu.org>
22146
22147         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22148         installed automake until the next release, since changes have been
22149         made.
22150
22151 2002-09-25  Karl Berry  <karl@gnu.org>
22152
22153         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22154         * lib/getopt*: copy from libc/posix.
22155         * lib/gettext.h: copy from gettext.
22156         * lib/.cppi-disable: add strdup.c, gettext.h.
22157
22158 2002-09-25  Karl Berry  <karl@gnu.org>
22159
22160         * config/srclist.txt: enable gettext.h check.
22161         * config/config.{guess,sub}: update from prep.
22162         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22163                 from automake 1.6.3.
22164         See srclist*.
22165
22166 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22167
22168         * regex.c (PATFETCH): Remove the translating fetch.
22169         (PATFETCH_RAW): Rename to PATFETCH.
22170         (set_image_of_range): New fun.
22171         (SET_RANGE_TABLE_WORK_AREA): Use it.
22172         (regex_compile): Don't translate the pattern chars so eagerly.
22173         Only do it when inserting an `exactn' bytecode or when handling
22174         a char-range.
22175         (mutually_exclusive_p): Avoid empty statement.
22176
22177 2002-07-06  Jim Meyering  <meyering@lucent.com>
22178
22179         * m4/README: Don't mention Makefile.am.in.
22180         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22181
22182 2002-07-01  Jim Meyering  <meyering@lucent.com>
22183
22184         * lib/c-stack.c: Include sys/time.h.
22185         From Volker Borchert.
22186
22187 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22188
22189         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22190
22191 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22192
22193         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22194         New macro.  Use it uniformly instead of
22195         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22196         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22197         reported by Vin Shelton.
22198
22199 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22200
22201         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22202         Do not assume SA_SIGINFO behavior.
22203         Bug reported by Jim Meyering on NetBSD 1.5.2.
22204
22205 2002-06-22  Jim Meyering  <meyering@lucent.com>
22206
22207         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22208         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22209
22210         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22211         now that configure.ac uses AC_GNU_SOURCE.
22212         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22213         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22214
22215         Update to latest tools.  Suggestions from Paul Eggert.
22216         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22217         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22218         * m4/fnmatch.m4: Likewise.
22219         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22220         to AC_HEADER_STDBOOL
22221
22222 2002-06-22  Jim Meyering  <meyering@lucent.com>
22223
22224         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22225         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22226
22227 2002-06-22  Jim Meyering  <meyering@lucent.com>
22228
22229         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22230
22231         * lib/exitfail.c, exitfail.h: Likewise.
22232         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22233
22234         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22235         of fnmatch.h.
22236         (EXTRA_DIST): Add fnmatch_loop.c.
22237         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22238
22239         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22240         * lib/fnmatch.c: Update from diffutils-2.8.2.
22241         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22242         * lib/fnmatch.h: Remove file.
22243
22244 2002-06-21  Jim Meyering  <meyering@lucent.com>
22245
22246         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22247         * m4/mbrtowc.m4: Likewise.
22248
22249         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22250         * m4/mbswidth.m4: Reflect name change:
22251         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22252         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22253
22254         * m4/lib-link.m4: Update from gettext-0.11.2.
22255         * m4/gettext.m4: Likewise.
22256
22257         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22258         From Alfred M. Szmidt.
22259
22260 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22261
22262         * lib/file-type.h: Report an error if neither S_ISREG nor
22263         S_IFREG is defined, instead of using a test specific to glibc
22264         2.2.  This should be safe, since POSIX requires S_ISREG and
22265         Unix Version 7 had S_IFREG.  We don't need to check for
22266         <sys/types.h> since we don't use any symbols that it defines.
22267
22268 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22269
22270         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22271         $@-t, so that each temporary file name is unique and valid in the first
22272         8 characters, for operation under DOS.
22273
22274 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22275
22276         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22277
22278 2002-06-15  Jim Meyering  <meyering@lucent.com>
22279
22280         Work even with DJGPP 2.03, which lacks support for symlinks.
22281         From Richard Dawe.
22282         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22283         is defined.
22284         * lib/lchown.c (S_ISLNK): Likewise.
22285
22286 2002-06-15  Jim Meyering  <meyering@lucent.com>
22287
22288         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22289         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22290         have been included before this file.
22291
22292 2002-06-14  Jim Meyering  <meyering@lucent.com>
22293
22294         * lib/file-type.h: Use the version from diffutils-2.8.2.
22295         * lib/file-type.c: Likewise.
22296
22297 2002-06-07  Jim Meyering  <meyering@lucent.com>
22298
22299         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22300         They're needed at least for NetBSD 1.5.2.
22301         ($statxfs_includes): Include those same headers.
22302         ($statxfs_includes): Include sys/vfs.h if available.
22303         ($statxfs_includes): Likewise for sys/statvfs.h.
22304         Check for the following members in both structs statfs and statvfs:
22305         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22306
22307 2002-06-01  Jim Meyering  <meyering@lucent.com>
22308
22309         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22310         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22311
22312 2002-05-28  Jim Meyering  <meyering@lucent.com>
22313
22314         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22315         Reported by Volker Borchert.
22316
22317 2002-05-27  Jim Meyering  <meyering@lucent.com>
22318
22319         Fix a problem seen only on nonconforming systems whereby ls.c's
22320         use of localtime, and then of gettimeofday would cause trouble:
22321         the localtime call used to initialize rpl_gettimeofday's save
22322         mechanism would clobber ls's current local time information so
22323         that in any long listing the first file would always be listed
22324         with date 1970-01-01.  Analysis by Volker Borchert.
22325
22326         * lib/gettimeofday.c (localtime): Undefine.
22327         (rpl_localtime): New function.
22328
22329 2002-05-27  Jim Meyering  <meyering@lucent.com>
22330
22331         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22332         localtime.
22333
22334         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22335         use the replacement function; it wouldn't resolve at link time.
22336         Reported by Volker Borchert.
22337
22338 2002-05-22  Jim Meyering  <meyering@lucent.com>
22339
22340         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22341         file-type.h.
22342         * lib/file-type.h: New file.
22343         * lib/file-type.c (file_type): New file/function.  Extracted from
22344         diffutils.
22345
22346 2002-04-30  Jim Meyering  <meyering@lucent.com>
22347
22348         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22349
22350 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22351
22352         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22353
22354 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22355
22356         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22357         Do not check for alloca.h (no longer used) or stdbool.h (was never
22358         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22359
22360 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22361
22362         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22363
22364 2002-04-29  Jim Meyering  <meyering@lucent.com>
22365
22366         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22367         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22368         Use AC_FUNC_STRNLEN here instead.
22369
22370         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22371         With autoconf-2.53a, it's part of AC_PROG_CC.
22372
22373 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22374
22375         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22376         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22377
22378 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22379
22380         * lib/sig2str.h, lib/sig2str.c: New files.
22381         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22382
22383 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22384
22385         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22386         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22387         of 127, since 64 is the largest conceivable number for ancient
22388         nonstandard hosts.
22389         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22390
22391 2002-04-28  Jim Meyering  <meyering@lucent.com>
22392
22393         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22394
22395 2002-04-24  Jim Meyering  <meyering@lucent.com>
22396
22397         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22398         (jm_PREREQ): Use it.
22399
22400         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22401         mach/mach.h fcntl.h.
22402         Check for this function: setlocale.
22403
22404 2002-04-24  Jim Meyering  <meyering@lucent.com>
22405
22406         * lib/gettext.h: New file, from Gettext.
22407         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22408         (libfetish_a_SOURCES): Add gettext.h.
22409
22410 2002-04-16  Jim Meyering  <meyering@lucent.com>
22411
22412         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22413         ut_pid, ut_id, ut_exit.
22414
22415 2002-04-16  Jim Meyering  <meyering@lucent.com>
22416
22417         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22418         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22419         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22420
22421 2002-04-12  Jim Meyering  <meyering@lucent.com>
22422
22423         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22424         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22425         existence of the getmntinfo function.  Needed for Darwin 5.3.
22426
22427         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22428         This is necessary at least on Darwin 5.3.
22429
22430         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22431         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22432         strnlen.o in the library, and that makes some versions of ranlib
22433         object.
22434
22435 2002-04-12  Jim Meyering  <meyering@lucent.com>
22436
22437         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22438
22439 2002-04-09  Jim Meyering  <meyering@lucent.com>
22440
22441         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22442         to be more precise.  Rather than saying we're checking whether the
22443         function `works', say what we're testing.
22444         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22445         Reported by Bruno Haible.
22446
22447 2002-03-10  Jim Meyering  <meyering@lucent.com>
22448
22449         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22450         Suggestion from Santiago Vila.
22451
22452 2002-03-08  Jim Meyering  <meyering@lucent.com>
22453
22454         * lib/rename.c: Mention that this wrapper is needed also on
22455         mips-dec-ultrix4.4 systems.
22456
22457 2002-03-02  Jim Meyering  <meyering@lucent.com>
22458
22459         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22460         not HAVE_CLOCK_SETTIME.
22461
22462 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22463
22464         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22465         Check for clock_settime.
22466
22467 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22468
22469         * lib/nanosleep.h: Rename to....
22470         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22471
22472         * lib/gettime.c: New file.
22473         * lib/settime.c: New file.
22474         * lib/stime.c: Remove.
22475
22476         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22477         timespec.h.  Remove nanosleep.h.
22478
22479 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22480
22481         * m4/acl.m4: New file.
22482         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22483         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22484
22485 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22486
22487         * lib/acl.c, lib/acl.h: New files.
22488         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22489
22490 2002-02-24  Jim Meyering  <meyering@lucent.com>
22491
22492         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22493         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22494         cause trouble.  Reported by Nelson Beebe.
22495
22496 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22497
22498         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22499         compilers that don't know that xalloc_die never returns.
22500
22501 2002-02-20  Jim Meyering  <meyering@lucent.com>
22502
22503         * lib/getdate.c: Regenerate using bison-1.33.
22504
22505 2002-02-17  Jim Meyering  <meyering@lucent.com>
22506
22507         * config/config.guess (main): Don't use `head -1'; it's no longer
22508         portable. Use `sed 1q' instead.
22509
22510 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22511
22512         * m4/codeset.m4: Upgrade to gettext-0.11.
22513         * m4/gettext.m4: Upgrade to gettext-0.11.
22514         * m4/glibc21.m4: Upgrade to gettext-0.11.
22515         * m4/iconv.m4: Upgrade to gettext-0.11.
22516         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22517         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22518         * m4/lib-ld.m4: New file, from gettext-0.11.
22519         * m4/lib-link.m4: New file, from gettext-0.11.
22520         * m4/lib-prefix.m4: New file, from gettext-0.11.
22521         * m4/progtest.m4: Upgrade to gettext-0.11.
22522
22523 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22524
22525         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22526         (jm_PREREQ): Use it.
22527
22528 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22529
22530         * lib/posixver.c, lib/posixver.h: New files.
22531         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22532
22533 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22534             Bruno Haible  <bruno@clisp.org>
22535
22536         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22537         (fwrite_success_callback): New declaration.
22538         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22539         print_unicode_char. Call failure callback instead of error.
22540         (fwrite_success_callback): New function.
22541         (exit_failure_callback): New function.
22542         (fallback_failure_callback): New function.
22543         (print_unicode_char): Call unicode_to_mb.
22544
22545 2002-01-26  Jim Meyering  <meyering@lucent.com>
22546
22547         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22548         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22549
22550 2002-01-26  Jim Meyering  <meyering@lucent.com>
22551
22552         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22553
22554 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22555
22556         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22557
22558 2002-01-22  Jim Meyering  <meyering@lucent.com>
22559
22560         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22561         Otherwise, some versions of automake would omit the rule that makes
22562         Makefile from Makefile.in.
22563
22564 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22565
22566         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22567         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22568         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22569         (memcoll): Set errno to zero if there is no error.
22570
22571         * lib/quotearg.c (quotearg_buffer_restyled):
22572         Fix bug with quoting buffers containing NUL when backslashing escapes.
22573         This bug was exposed by the other changes in this patch.
22574         (quotearg_n_options): New arg ARGSIZE.
22575         All callers changed.
22576         (quoting_options_from_style): New function.
22577         (quotearg_n_style): Use it.
22578         (quotearg_n_style_mem): New function.
22579
22580         * lib/quotearg.h (quotearg_n_style_mem): New function.
22581
22582 2002-01-19  Jim Meyering  <meyering@lucent.com>
22583
22584         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22585         Remove useless quotes: DF_PROG="df".
22586         * m4/strnlen.m4: New file.
22587
22588 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22589
22590         * lib/backupfile.c (ISDIGIT): Comment fix.
22591         * lib/getdate.y (ISDIGIT): Likewise.
22592         * lib/posixtm.c (ISDIGIT, year): Likewise.
22593         * lib/strverscmp.c (ISDIGIT): Likewise.
22594         * lib/userspec.c (ISDIGIT): Likewise.
22595
22596 2002-01-16  Jim Meyering  <meyering@lucent.com>
22597
22598         * lib/getdate.y: Add three semicolons, each just before a closing
22599         brace. Bison (as of version 1.31) no longer papers over that mistake.
22600
22601 2002-01-05  Jim Meyering  <meyering@lucent.com>
22602
22603         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22604
22605 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22606
22607         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22608         not silently exit merely because the output buffer happens to
22609         have nothing pending.
22610
22611 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22612
22613         See the big note in ../ChangeLog.
22614         * lib/human.c (suffixes): Prefer K to k for 1024.
22615         (generate_suffix_backwards): New function.
22616         (human_readable_inexact): Use it.
22617         * lib/xstrtol.c (__xstrtol): If there is no number but there
22618         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22619         Accept 'K' as well as 'k'.
22620
22621 2001-12-15  Jim Meyering  <meyering@lucent.com>
22622
22623         * lib/regex.h (__restrict_arr): Update from libc.
22624
22625         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22626         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22627         (STREQ): Define.
22628
22629 2001-12-14  Jim Meyering  <meyering@lucent.com>
22630
22631         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22632         Suggestion from Bruno Haible.
22633
22634 2001-12-10  Jim Meyering  <meyering@lucent.com>
22635
22636         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22637         xrealloc, Instead, include "xalloc.h".
22638         (initbuffer): Don't cast xmalloc return value to char*.
22639         (readline): Reword comment.
22640         Don't cast xrealloc return value to char*
22641         Return NULL, not 0.
22642
22643 2001-12-09  Jim Meyering  <meyering@lucent.com>
22644
22645         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22646         about `signed and unsigned type in conditional expression'.
22647         * lib/posixtm.c (posix_time_parse): Likewise.
22648
22649         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22650
22651         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22652         to avoid a pedantic warning.
22653
22654         * lib/getstr.c: Don't include assert.h.
22655         (getstr): Remove warning-evoking assertions.
22656         Return -1 if offset parameter is out of bounds.
22657         Change the type of a local from int to size_t.
22658
22659         * lib/strftime.c (my_strftime_localtime_r): Include this function
22660         definition in the `#if ! HAVE_TM_GMTOFF' block.
22661
22662         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22663         Include xalloc.h instead.
22664
22665 2001-12-02  Jim Meyering  <meyering@lucent.com>
22666
22667         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22668         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22669         included.
22670
22671         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22672         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22673
22674 2001-11-30  Akim Demaille  <akim@epita.fr>
22675
22676         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22677         before being defined.
22678
22679 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22680
22681         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22682         First arg is int, not unsigned.
22683         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22684         (SIZE_MAX, UINT_MAX): New macros.
22685         (quotearg_n_options): Abort if N is negative.
22686         Avoid overflow check on hosts where size_t is 64 bits and int
22687         is 32 bits, as overflow is impossible there.
22688         Fix off-by-one typo that caused unnecessary reallocation.
22689
22690 2001-11-27  Jim Meyering  <meyering@lucent.com>
22691
22692         * lib/tempname.c: Merge with version from libc.
22693         * lib/regex.c: Likewise.
22694
22695         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22696         systems for which STDC_HEADERS is 0, it was not included, resulting in
22697         a warning about an integer-to-pointer conversion problem with getenv.
22698         Reported by Volker Borchert.
22699
22700 2001-11-26  Jim Meyering  <meyering@lucent.com>
22701
22702         * lib/gtod.h: Remove file.
22703         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22704         * lib/gettimeofday.c: Don't include gtod.h.
22705         (GTOD_init): Remove function.
22706         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22707         Suggestion from Volker Borchert.
22708
22709 2001-11-23  Jim Meyering  <meyering@lucent.com>
22710
22711         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22712         it.
22713         * lib/hash.c (struct hash_table): Define it here instead.
22714
22715 2001-11-22  Jim Meyering  <meyering@lucent.com>
22716
22717         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22718
22719 2001-11-20  Jim Meyering  <meyering@lucent.com>
22720
22721         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22722         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22723
22724 2001-11-19  Jim Meyering  <meyering@lucent.com>
22725
22726         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22727         directory.  Use "conftestXXXXXX" as the template.
22728         Suggestion from Paul Eggert.
22729
22730         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22731         immediately, so the test doesn't mistakenly hit the max-open-files
22732         limit.
22733
22734 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22735
22736         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22737         (TEMPORARIES): New macro.
22738         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22739         removes an artificial limitation (e.g. HP-UX 10.20, where
22740         TMP_MAX is 17576).
22741
22742 2001-11-18  Jim Meyering  <meyering@lucent.com>
22743
22744         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22745
22746 2001-11-18  Jim Meyering  <meyering@lucent.com>
22747
22748         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22749         on SunOS 4.
22750
22751         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22752         files will be created before anything else.
22753
22754 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22755
22756         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22757         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22758
22759 2001-11-17  Jim Meyering  <meyering@lucent.com>
22760
22761         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22762         Prompted by a report from Bob Proulx.
22763
22764         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22765         Instead, require UTILS_FUNC_MKSTEMP.
22766
22767 2001-11-17  Jim Meyering  <meyering@lucent.com>
22768
22769         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22770         Now, that's done as part of AC_FUNC_STRTOD.
22771
22772 2001-11-17  Jim Meyering  <meyering@lucent.com>
22773
22774         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22775         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22776         rather than group writable.  Patch by Juan F. Codagnone.
22777
22778         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22779         xrealloc, Instead, include "xalloc.h".
22780
22781         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22782         Remove explicit declarations of xmalloc, xrealloc,
22783         and xstrdup.  Instead, include "xalloc.h".
22784
22785         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22786         unlocked-io.h.
22787         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22788         Likewise.
22789         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22790
22791         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22792         Reported by Padraig Brady.
22793
22794         * lib/mkstemp.c: #undef mkstemp.
22795         Include config.h.
22796         (rpl_mkstemp): Rename from mkstemp.
22797         Protoize.
22798
22799 2001-11-16  Jim Meyering  <meyering@lucent.com>
22800
22801         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22802         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22803         determine the amount of total physical memory, use pstat_getstatic.
22804         HPUX-11 doesn't define _SC_PHYS_PAGES.
22805         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22806         If sysconf couldn't be used to determine the amount of available
22807         physical memory, use both pstat_getstatic and pstat_getdynamic.
22808         Based on a patch from Bob Proulx.
22809
22810 2001-11-10  Jim Meyering  <meyering@lucent.com>
22811
22812         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22813         (jm_PREREQ): Use it.
22814
22815 2001-11-09  Jim Meyering  <meyering@lucent.com>
22816
22817         * m4/jm-macros.m4: Require autoconf-2.52f.
22818         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22819         Use these AC_-prefixed names, not the AM_-prefixed ones.
22820
22821         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22822
22823 2001-11-05  Jim Meyering  <meyering@lucent.com>
22824
22825         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22826
22827 2001-11-04  Jim Meyering  <meyering@lucent.com>
22828
22829         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22830         $DEFS.
22831
22832 2001-11-03  Jim Meyering  <meyering@lucent.com>
22833
22834         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22835         of AC_DEFUN.
22836
22837         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22838         know the name of the variable in the macro definition.
22839
22840 2001-11-03  Jim Meyering  <meyering@lucent.com>
22841
22842         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22843         in argmatch_to_argument call.
22844
22845         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22846         argument.
22847
22848         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22849         e.g., a fault due to an attempt to free a NULL pointer.
22850
22851 2001-11-01  Jim Meyering  <meyering@lucent.com>
22852
22853         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22854         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22855
22856 2001-11-01  Jim Meyering  <meyering@lucent.com>
22857
22858         * lib/dirfd.c, lib/dirfd.h: New files.
22859         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22860
22861         * lib/hash.c (hash_print) [TESTING]: Clean up.
22862
22863 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22864
22865         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22866         to avoid a warning if -Wall.
22867
22868 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22869
22870         * README: New file
22871         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22872         (per RMS's instructions, this is now the canonical source)
22873         * lgpl/, gpl/: New directories.
22874
22875 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22876
22877         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22878
22879 2001-10-21  Jim Meyering  <meyering@lucent.com>
22880
22881         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22882         this code would end up calling gettext even in packages built
22883         with --disable-nls.
22884         * lib/getopt.c (_): Likewise.
22885         * lib/regex.c (_): Likewise.
22886
22887 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22888
22889         * m4/error.m4 (jm_PREREQ_ERROR):
22890         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22891         AC_FUNC_STRERROR_R does that.
22892         Check for strerror declaration.
22893
22894         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22895         are supposed to have them these days.
22896         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22897         Merge changes from latest Autoconf CVS.
22898         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22899         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22900         POSIX decided to standardize on the int flavor of strerror_r.
22901
22902 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22903
22904         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22905         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22906         Use strerror_r that is only a macro, even if it is not a function.
22907         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22908         (private_strerror): Use prototypes, not old-style function definition.
22909         (print_errno_message): New function.
22910         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22911         char*-flavored one.
22912         (error_tail, error, error_at_line): Use it.
22913
22914 2001-10-11  Jim Meyering  <meyering@lucent.com>
22915
22916         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22917         and quote_n (1, ... to avoid clobbering a buffer.
22918
22919 2001-10-05  Jim Meyering  <meyering@lucent.com>
22920
22921         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22922         hash-pjw.h.
22923         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22924         * lib/hash-pjw.h: New file.
22925
22926 2001-09-30  Jim Meyering  <meyering@lucent.com>
22927
22928         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22929         `struct fsstat' has the `f_fstypename' member.
22930         Use that to define FS_TYPE, which is now used to make
22931         the getfsstat link test tighter.
22932
22933 2001-09-30  Jim Meyering  <meyering@lucent.com>
22934
22935         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22936         Include <sys/ucred.h>, for Apple Darwin.
22937         Include sys/mount.h and sys/fs_types.h only if available.
22938         (FS_TYPE): Define.
22939         (read_filesystem_list): Use FS_TYPE.
22940
22941 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22942
22943         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22944         a boolean context.
22945
22946 2001-09-29  Jim Meyering  <meyering@lucent.com>
22947
22948         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22949         [one-argument getmntent function]): Include stdio.h before mntent.h.
22950         SunOS 4.1.x needs it for the declaration of `FILE'.
22951         Patch by Volker Borchert.
22952
22953         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22954         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22955         sys/fs_types.h, and make the link-test for getfsstat guard #include
22956         directives with appropriate #if HAVE_*_H tests so that we can
22957         detect getfsstat on Apple Darwin1.3.7 systems.
22958         Reported by Nelson Beebe.
22959         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22960
22961 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22962
22963         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22964         #defines strtoimax.  Also treat the other strto* functions
22965         like strtoimax.
22966
22967         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22968         Check for strtoul and strtoumax,
22969         as those declarations are made even in the signed case.
22970         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22971         Likewise, for strtol and strtoimax.
22972
22973 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22974
22975         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22976         #defines strtoimax.  Also treat the other strto* functions
22977         like strtoimax.
22978
22979         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22980         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22981         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22982
22983 2001-09-26  Jim Meyering  <meyering@lucent.com>
22984
22985         Most macros in unlocked-io.h had the wrong number of arguments.
22986         * lib/gen-uio: New script.
22987         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22988         * lib/unlocked-io.hin: Remove file.
22989         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22990         rather than trying to embed it here.
22991         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22992         Reported by Padraig Brady.
22993
22994 2001-09-25  Volker Borchert  <bt@teknon.de>
22995
22996         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22997         `result'.
22998
22999 2001-09-24  Jim Meyering  <meyering@lucent.com>
23000
23001         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
23002
23003 2001-09-23  Jim Meyering  <meyering@lucent.com>
23004
23005         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
23006         instead of the mere test for existence of mntent.h.  The latter
23007         would get a false-positive on AIX 3.4 systems.
23008         In the outer getmntent if-block, don't die if neither of the getmntent
23009         tests succeeds.  Instead, just fall through and continue with the
23010         remaining tests.
23011
23012 2001-09-23  Jim Meyering  <meyering@lucent.com>
23013
23014         * lib/mountlist.c: Remove useless parentheses in #if directives.
23015         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
23016         the deprecated MOUNTED symbol is no longer defined in mntent.h.
23017
23018 2001-09-22  Jim Meyering  <meyering@lucent.com>
23019
23020         * m4/gettext.m4: New file.  From gettext.
23021         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
23022         * m4/progtest.m4: Likewise
23023         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23024         * m4/glibc21.m4: Likewise.
23025
23026         * m4/libintl.m4: Remove.  No longer used.
23027
23028 2001-09-22  Jim Meyering  <meyering@lucent.com>
23029
23030         * lib/localcharset.c: Update from latest gettext.
23031         * lib/config.charset: Likewise.
23032
23033 2001-09-20  Jim Meyering  <meyering@lucent.com>
23034
23035         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23036         strtoimax.
23037         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23038         strtoumax.
23039
23040 2001-09-20  Jim Meyering  <meyering@lucent.com>
23041
23042         * lib/xstrtol.c (strtoimax): Guard declaration with
23043         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23044         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23045         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23046         (strtoumax): Likewise, for completeness (it wasn't necessary).
23047
23048 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23049
23050         * lib/strtoimax.c (HAVE_LONG_LONG):
23051         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23052         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23053         to work around bug in IBM C compiler.
23054
23055 2001-09-17  Jim Meyering  <meyering@lucent.com>
23056
23057         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23058         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23059         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23060         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23061         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23062         whenever the right hand side need not be expanded by the shell.
23063
23064 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23065
23066         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23067         library.  It's not correct, as some older glibcs are buggy.
23068         fnmatch wasn't fixed until glibc 2.2.
23069
23070         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23071         special shell magic here.
23072
23073 2001-09-16  Jim Meyering  <meyering@lucent.com>
23074
23075         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23076         * m4/jm-macros.m4: Require it.
23077
23078 2001-09-16  Jim Meyering  <meyering@lucent.com>
23079
23080         * lib/mkdir.c: New file.
23081
23082 2001-09-15  Jim Meyering  <meyering@lucent.com>
23083
23084         * m4/jm-macros.m4: Check for help2man.
23085
23086 2001-09-11  Jim Meyering  <meyering@lucent.com>
23087
23088         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23089         The body, by Paul Eggert, was moved here from configure.in.
23090         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23091
23092 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23093
23094         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23095         (jm_PREREQ): Use it.
23096
23097 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23098
23099         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23100         Use ssize_t, not int, to store result of readlink.
23101         Check for ssize_t overflow as well as size_t overflow,
23102         as POSIX says the result of readlink is implementation-defined
23103         when ssize_t overflows.
23104         Remove unnecessary cast to char*.
23105         Use free+malloc instead of realloc, as the storage doesn't need
23106         to be preserved and it's clearer and can be more efficient that way.
23107         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23108         * lib/xreadlink.h (xreadlink): Update prototype.
23109
23110 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23111
23112         * lib/xgetcwd.c: Revert some of the previous change; intead,
23113         fix the HAVE_GETCWD_NULL code to behave more like the
23114         !HAVE_GETCWD_NULL code used to.
23115
23116         Include "xalloc.h".
23117         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23118         invoke xalloc_die.
23119
23120 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23121
23122         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23123         sys/param.h, as pathmax.h includes them.
23124
23125 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23126
23127         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23128         (jm_PREREQ_XGETCWD): New macro.
23129
23130         * m4/getcwd.m4: New file.
23131
23132 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23133
23134         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23135         like the HAVE_GETCWD_NULL code.
23136         Include pathmax.h if not HAVE_GETCWD.
23137         Do not include xalloc.h.
23138         (INITIAL_BUFFER_SIZE): New symbol.
23139         Do not use xmalloc / xrealloc, since the caller is responsible for
23140         handling errors.  Preserve errno around `free' during failure.
23141         Do not overrun buffer when using getwd.
23142
23143 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23144
23145         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23146         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23147         getcwd (NULL, 0).
23148
23149 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23150
23151         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23152         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23153         spotted by Jim Meyering.
23154
23155 2001-09-03  Jim Meyering  <meyering@lucent.com>
23156
23157         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23158         failure.
23159
23160 2001-09-02  Jim Meyering  <meyering@lucent.com>
23161
23162         * lib/error.c: Update from GNU libc.
23163
23164 2001-09-01  Jim Meyering  <meyering@lucent.com>
23165
23166         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23167         Used by df.
23168
23169 2001-09-01  Jim Meyering  <meyering@lucent.com>
23170
23171         * lib/xreadlink.c: New file.
23172         * lib/xreadlink.h: New file.
23173         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23174         xreadlink.h.
23175
23176         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23177         doesn't conflict with sparc Solaris 7's definition in
23178         /usr/include/sys/int_types.h.
23179
23180         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23181         files.
23182         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23183         and strncasecmp as r-values.  Unixware didn't have declarations.
23184
23185 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23186
23187         * lib/xstrtol.h: Add copyright notice.
23188         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23189         LONGINT_INVALID_SUFFIX_CHAR.
23190
23191 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23192
23193         * lib/xstrtol.c (strtoimax): New decl.
23194
23195 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23196
23197         * lib/xgetcwd.c: Don't include pathmax.h.
23198         Include stdlib.h and unistd.h if available.
23199         Include xalloc.h.
23200         (xmalloc, xstrdup, free): Remove decls.
23201         (xgetcwd): Don't assume sizes fit in unsigned.
23202         Check for overflow when computing sizes.
23203         Simplify reallocation code.
23204
23205 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23206
23207         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23208         a directory's st_size can have an arbitrary value, so the old
23209         usage could waste an arbitrary amount of memory.  All uses
23210         changed.
23211         * lib/savedir.h: Update prototype.
23212
23213 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23214
23215         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23216
23217         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23218         old strtoimax.c.
23219
23220         Also, make the following further changes to make this file's
23221         configuration more similar to that of strtol.c:
23222         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23223         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23224         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23225         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23226         changed to signed values.
23227
23228         And make the following changes as well:
23229         Fix copyright notice, as 1999 was missing.
23230         (verify): New macro.
23231         (strtoimax): Check sizes at compile-time, not run-time.
23232         Prefer strtol to strtoll if both work.
23233         (main): Remove; it was not that useful and was a pain to maintain.
23234
23235         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23236
23237 2001-08-31  Jim Meyering  <meyering@lucent.com>
23238
23239         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23240         Use an initial, malloc'd, buffer of length 128 rather than
23241         a statically allocated one of length 1024.
23242
23243 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23244
23245         Simplify code, partly by assuming autoconf 2.52 semantics.
23246
23247         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23248
23249         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23250         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23251         All uses removed.
23252         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23253         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23254         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23255         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23256         jm_AC_HEADER_INTTYPES_H.
23257         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23258
23259         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23260
23261         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23262         Quote first arg of AC_DEFUN.
23263         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23264         since they are needed to parse the include file even if we need
23265         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23266         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23267         but with opposite signedness.
23268
23269 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23270
23271         Merge 'exclude' changes from tar 1.13.22.
23272         This fixes one or two unlikely storage allocation overflow bugs,
23273         but doesn't change user-visible behavior otherwise.
23274
23275 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23276
23277         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23278         (jm_PREREQ_EXCLUDE): New macro.
23279
23280 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23281
23282         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23283         tm to be declared.
23284
23285 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23286
23287         * lib/hash.c: Remove '2001' from copyright notice.
23288
23289 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23290
23291         * lib/full-write.h: New file.
23292         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23293         * lib/full-write.c: Correct credits, as cccp.c no longer
23294         exists and anyway it was so heavily changed from the old cccp
23295         code as to be unrecognizable.  Include full-write.h.
23296         (full_write) Return size_t, with short writes meaning failure.
23297         All callers changed.  This fixes a bug with large buffers
23298         on 64-bit hosts.
23299         * lib/utime.c: Include full-write.h.
23300
23301 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23302
23303         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23304         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23305         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23306         Include if available.
23307         (<xalloc.h>): Include
23308         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23309         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23310         collide with FNM macros.
23311         (struct patopts): New struct.
23312         (struct exclude): Use it, as exclude patterns now come with options.
23313         (new_exclude): Support above changes.
23314         (new_exclude, add_exclude_file):
23315         Initial size must now be a power of two to simplify overflow checking.
23316         (free_exclude, fnmatch_no_wildcards): New function.
23317         (excluded_filename): No longer requires options arg, as the options
23318         are determined by add_exclude.  Now returns bool, not int.
23319         (excluded_filename, add_exclude):
23320         Add support for the fancy new exclusion options.
23321         (add_exclude, add_exclude_file): Now takes int options arg.
23322         Check for arithmetic overflow when computing sizes.
23323         (add_exclude_file): xrealloc might modify errno, so don't
23324         realloc until after errno might be used.
23325
23326         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23327         New macros.
23328         (free_exclude): New decl.
23329         (add_exclude, add_exclude_file): Now takes int options arg.
23330         (excluded_filename): No longer requires options arg, as the options
23331         are determined by add_exclude.  Now returns bool, not int.
23332
23333 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23334
23335         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23336
23337 2001-08-27  Jim Meyering  <meyering@lucent.com>
23338
23339         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23340
23341         * lib/version-etc.c (N_): Remove definition.
23342         Revert most of last change.
23343         Instead, simply don't mark the `Copyright...' string for translation.
23344         Based on advice from Paul Eggert.
23345
23346         * lib/strtoxmax.c: Tweak comment.
23347
23348 2001-08-26  Jim Meyering  <meyering@lucent.com>
23349
23350         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23351
23352         * m4/xstrtoimax.m4: New file.
23353         * m4/xstrtoumax.m4: Add comments explaining why we
23354         AC_REPLACE_FUNCS(strtol).
23355
23356 2001-08-26  Jim Meyering  <meyering@lucent.com>
23357
23358         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23359         of copyright with `%s' so translators don't get an untranslated
23360         message in 2002.
23361         (COPYRIGHT_YEAR): Define.
23362         (version_etc): Use fprintf rather than fputs.
23363         Suggestion from Ulrich Drepper.
23364
23365         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23366
23367         * lib/strtoll.c: New file, from GNU libc.
23368         * lib/xstrtoimax.c: New file.
23369
23370         * lib/xstrtol.h: Add xstrtoimax.
23371         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23372         * lib/strtoimax.c: New file.  Likewise, but first define
23373         STRTOUXMAX_SIGNED.
23374
23375         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23376         ...
23377         * lib/strtoxmax.c: ... then renamed to this.
23378
23379 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23380
23381         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23382         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23383         (jm_AC_TYPE_INTMAX_T): New macro.
23384         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23385
23386         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23387
23388         * m4/longlong.m4: Renamed from ulonglong.m4.
23389         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23390         * m4/uintmax_t.m4: Removed.
23391
23392 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23393
23394         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23395         Port to Solaris 8, where 'sed' requires a space after the 'r'
23396         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23397         Redirect output to $tmp just once.
23398
23399 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23400
23401         * lib/addext.c (<errno.h>): Include.
23402         (errno): Declare if not defined.
23403         (addext): Work correctly when pathconf returns -1 and leaves
23404         errno alone because there is no limit.  Also, work even if
23405         pathconf returns a value greater than SIZE_MAX.
23406
23407 2001-08-12  Jim Meyering  <meyering@lucent.com>
23408
23409         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23410         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23411         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23412         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23413         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23414         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23415         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23416         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23417         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23418         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23419         utime.m4, utimes.m4, xstrtoumax.m4:
23420         Quote the first argument in each use of AC_DEFUN.
23421
23422 2001-08-12  Jim Meyering  <meyering@lucent.com>
23423
23424         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23425         Simply `return getcwd (NULL, 0);'.
23426         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23427         Use 1300 as initial value for length, not PATH_MAX.
23428
23429         * lib/pathmax.h: Clean up cpp syntax.
23430
23431 2001-08-12  Jim Meyering  <meyering@lucent.com>
23432
23433         * lib/gettimeofday.c: New file.
23434         * lib/gtod.h: New file.
23435         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23436
23437 2001-08-05  Jim Meyering  <meyering@lucent.com>
23438
23439         * m4/jm-macros.m4: Require autoconf-2.52.
23440
23441 2001-08-04  Jim Meyering  <meyering@lucent.com>
23442
23443         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23444         stmt, to get in sync with glibc.
23445
23446 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23447
23448         The following changes are from gettext 0.10.39 as maintained by
23449         Bruno Haible.
23450
23451         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23452         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23453         with inverted sense.  All uses changed.
23454
23455         * lib/mbswidth.c: Don't include <limits.h>.
23456         Include <stdlib.h> and <string.h> unconditionally.
23457         (iswcntrl, mbsinit, ISCNTRL): New macros.
23458         (mbsnwidth): Use K&R style function declarations.
23459         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23460         can optimize it when MB_CUR_MAX == 1.
23461         The width of control characters is zero, not 1.
23462
23463 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23464
23465         The following changes are from gettext 0.10.39 as maintained by
23466         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23467
23468         * m4/codeset.m4: Upgrade to serial AM1.
23469         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23470         all uses changed.  Quote first arg of AC_DEFUN.
23471         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23472
23473         * m4/iconv.m4: Upgrade to serial AM2.
23474         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23475         Add --with-libconv-prefix.
23476         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23477         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23478         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23479         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23480         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23481
23482         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23483         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23484         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23485         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23486         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23487         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23488         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23489         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23490         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23491
23492         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23493         string.h any more.
23494
23495         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23496         not the default value.
23497
23498         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23499         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23500         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23501         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23502         Also check for iswcntrl, used for wcwidth fallback.
23503         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23504         to Autoconf 2.13.
23505
23506 2001-08-03  Jim Meyering  <meyering@lucent.com>
23507
23508         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23509         as it was in the original.  Reported by Paul Eggert.
23510
23511 2001-07-16  Jim Meyering  <meyering@lucent.com>
23512
23513         * m4/gettimeofday.m4: New file.
23514         Prompted by a report from Bernhard Baehr.
23515
23516 2001-07-15  Jim Meyering  <meyering@lucent.com>
23517
23518         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23519         stuff. Now it's in ../Makefile.cfg.
23520
23521 2001-07-15  Jim Meyering  <meyering@lucent.com>
23522
23523         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23524         (BUILT_SOURCES): Add unlocked-io.h.
23525         (io_functions): Define.
23526         (unlocked-io.h): New rule.
23527         (DISTCLEANFILES): Add unlocked-io.h.
23528         (all-local): Depend on unlocked-io.h, to ensure it is created.
23529
23530         * lib/unlocked-io.hin: New file
23531
23532         * lib/regex.c: Update from glibc.
23533
23534 2001-07-05  Jim Meyering  <meyering@lucent.com>
23535
23536         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23537         recommendation.
23538         (libfetish_a_SOURCES): Put all .h files here instead.
23539         Remove a thus-exposed (better checks in automake) duplicate and
23540         two unnecessary .h files.
23541
23542 2001-07-04  Jim Meyering  <meyering@lucent.com>
23543
23544         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23545         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23546         distcheck failure.
23547
23548 2001-07-02  Jim Meyering  <meyering@lucent.com>
23549
23550         The following changes were prompted by suggestions from Bruno Haible.
23551
23552         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23553         is now generated.
23554         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23555         definition of EXTRA_DIST.
23556         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23557         ensure that the generated file is created/updated whenever the list
23558         of $(unlocked_functions) is changed.
23559         (jm-glibc-io.m4): New rule.
23560         (unlocked-io.h): New rule -- currently unused.
23561
23562 2001-06-24  Jim Meyering  <meyering@lucent.com>
23563
23564         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23565         unmatched right bracket, rather than kludging it with an extra,
23566         falsely-matching quote in a comment.  Patch by Akim Demaille.
23567
23568 2001-06-11  Jim Meyering  <meyering@lucent.com>
23569
23570         * lib/regex.c: Update from GNU libc.
23571
23572 2001-05-27  Jim Meyering  <meyering@lucent.com>
23573
23574         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23575         Check for ut_type in struct utmp.
23576
23577 2001-05-27  Jim Meyering  <meyering@lucent.com>
23578
23579         * lib/readutmp.h (UT_TYPE): Define.
23580
23581 2001-05-24  Jim Meyering  <meyering@lucent.com>
23582
23583         * lib/argmatch.c: Include "quote.h".
23584         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23585         quote function.  Reported by Göran Uddeborg.
23586
23587 2001-05-22  Jim Meyering  <meyering@lucent.com>
23588
23589         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23590         now that we use the package-supplied version unconditionally.
23591         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23592
23593 2001-05-21  Jim Meyering  <meyering@lucent.com>
23594
23595         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23596         shell syntax errors.
23597
23598 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23599
23600         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23601
23602 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23603
23604         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23605         Don't bother to check library strftime, since
23606         we'll be using our own my_strftime function anyway.
23607         Define my_strftime instead of strftime.
23608
23609 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23610
23611         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23612         which is not yet declared.
23613
23614 2001-05-15  Jim Meyering  <meyering@lucent.com>
23615
23616         * m4/regex.m4: Use proper quoting so brackets appear in the test
23617         program.
23618         Reported by, and with help from, Bruno Haible.
23619
23620 2001-05-13  Jim Meyering  <meyering@lucent.com>
23621
23622         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23623         undefined.
23624
23625 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23626
23627         dirname code cleanup.  base_name now behaves more compatibly
23628         with POSIX basename when given file names that have trailing
23629         slashes, and similarly for dir_name.  Add new primitives
23630         base_len and dir_len.  Put the directory-name-related decls
23631         into dirname.h.
23632
23633         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23634         * lib/backupfile.c (base_name): Likewise.
23635         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23636         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23637         * lib/makepath.c (strip_trailing_slashes): Likewise.
23638         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23639         ISSLASH): Likewise.
23640         * lib/rename.c (strip_trailing_slashes): Likewise.
23641         * lib/same.c (base_name): Likewise.
23642         * lib/stripslash.c (ISSLASH): Likewise.
23643
23644         * lib/addext.c: Include <dirname.h> after size_t is defined.
23645         * lib/backupfile.c: Likewise.
23646
23647         * lib/addext.c (addext): Use base_len to trim redundant
23648         trailing slashes instead of doing it ourselves.
23649         But do not trim the last slash if it is not redundant.
23650
23651         * lib/backupfile.c (find_backup_file_name,
23652         max_backup_version): Use base_len instead of rolling it ourselves.
23653         Handle the case of "" and (on DOS) "C:" correctly.
23654
23655         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23656         needed. Include <string.h>, <dirname.h>.
23657         (base_name): Allow file names ending in slashes, other than names
23658         that are all slashes.  In this case, return the basename followed
23659         by the slashes.  This is more general, and can be used in places
23660         where the original base_name purposely had an assertion failure.
23661         (base_len): New function.
23662
23663         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23664         Do not include <assert.h>; no longer needed.
23665         Include xalloc.h.
23666         (memrchr): Remove decl.
23667         (dir_name_r): Remove.
23668         (dir_len): Renamed from dirlen.  All callers changed.
23669         Rewrite in terms of base_name, for simplicity and consistency.
23670         (dir_name): Never return NULL.  All callers changed.
23671         Do not include <stdlib.h> in test program; no longer needed.
23672         return 0; is fine for test program.
23673
23674         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23675         New macros.
23676         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23677
23678         * lib/path-concat.c (path_concat): Use base_len to compute
23679         base length, not strlen; this means we cannot rely on memcpy
23680         to null-terminate.
23681
23682         * lib/same.c (STREQ): Remove.
23683         (same_name): Handle the case where the basename ends in trailing '/'.
23684
23685         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23686         a slash was stripped.  Do not strip the last slash after a
23687         file system prefix.
23688
23689 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23690
23691         * lib/Makefile.am (libfetish_a_SOURCES):
23692         Add strftime.c, since we now compile it on all hosts.
23693
23694         * lib/strftime.c (my_strftime):
23695         Define to nstrftime if emacs, but only if my_strftime is not defined.
23696         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23697         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23698         Add one more extra argument: a nanoseconds value.
23699         All uses changed.
23700         (ns): New macro.
23701         (my_strftime function): Add %N format.
23702         (emacs_strftimeu): Renamed from emacs_strftime,
23703         with extra ut argument.
23704
23705 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23706
23707         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23708
23709 2001-04-21  Jim Meyering  <meyering@lucent.com>
23710
23711         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23712         doesn't interfere.
23713
23714 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23715
23716         * m4/ftruncate.m4: Check for chsize.
23717         Link with ftruncate.o unconditionally if ftruncate is missing.
23718         This was required when cross-compiling to i586-mingw32msvc.
23719
23720 2001-04-08  Jim Meyering  <meyering@lucent.com>
23721
23722         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23723         recomputed; that's necessary when the offset spans a DST transition.
23724         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23725
23726 2001-04-02  Jim Meyering  <meyering@lucent.com>
23727
23728         * lib/regex.h, regex.c: Update from GNU libc.
23729
23730 2001-03-24  Jim Meyering  <meyering@lucent.com>
23731
23732         * m4/jm-macros.m4: Require autoconf-2.49d.
23733
23734 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23735
23736         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23737
23738 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23739
23740         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23741
23742 2001-03-17  Jim Meyering  <meyering@lucent.com>
23743
23744         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23745         now that the version in autoconf is equivalent.
23746         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23747
23748         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23749         Suggestion from Akim Demaille.
23750
23751         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23752         (jm_PREREQ_TEMPNAME): New function.
23753
23754 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23755
23756         * lib/tempname.c (uint64_t): Define to uintmax_t if
23757         not defined, and if UINT64_MAX is not defined.
23758         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23759         Reported by John David Anglin.
23760
23761 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23762
23763         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23764         resolve alias if codeset is empty.
23765         * lib/config.charset (BeOS): Use wildcard syntax.
23766
23767 2001-03-13  Jim Meyering  <meyering@lucent.com>
23768
23769         * lib/path-concat.c (path_concat)
23770         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23771         concatenating e.g., `C:' and `foo'.
23772         From Bruno Haible.
23773
23774 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23775
23776         * lib/localcharset.c (locale_charset): Don't use
23777         setlocale(LC_CTYPE,NULL). Don't return NULL.
23778         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23779
23780 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23781
23782         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23783         support for DOS/DJGPP.
23784
23785 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23786
23787         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23788         lacks mkstemp.  Compile our own tempname.c if we compile our own
23789         mkstemp.c, as mkstemp relies on tempname.
23790
23791 2001-03-01  Jim Meyering  <meyering@lucent.com>
23792
23793         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23794         AH_VERBATIM really does output its argument verbatim.
23795
23796 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23797
23798         * lib/Makefile.am (libfetish_a_SOURCES):
23799         Add dup-safer.c, fopen-safer.c.
23800         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23801
23802         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23803         * lib/unistd-safer.h: New files.
23804
23805 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23806
23807         The mkstemp replacement is taken from glibc 2.2.2, with some
23808         portability fixes for use outside glibc, as follows:
23809
23810         * lib/tempname.c (struct_stat64): New macro.
23811         (direxists, __gen_tempname): Use it.
23812         This avoids a portability problem with Solaris 8.
23813
23814         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23815         (<stddef.h>, <stdint.h>, <string.h>):
23816         Include only if STDC_HEADERS || _LIBC.
23817         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23818         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23819         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23820         (__set_errno): Define this macro if <errno.h> doesn't.
23821         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23822         Define these macros if <stdio.h> doesn't.
23823         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23824         Define these macros if <sys/stat.h>
23825         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23826         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23827         __xstat64): Define if not _LIBC.
23828         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23829         (__gen_tempname): Invoke gettimeofday only if
23830         HAVE_GETTIMEOFDAY || _LIBC;
23831         otherwise, fall back on plain "time".
23832         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23833
23834         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23835
23836         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23837
23838 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23839
23840         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23841
23842 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23843
23844         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23845         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23846         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23847         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23848
23849 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23850
23851         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23852         Remove workaround macros for hosts that have mbrtowc but not
23853         mbstate_t, as we now insist on proper declarations for both
23854         before using mbrtowc.
23855
23856 2001-02-17  Jim Meyering  <meyering@lucent.com>
23857
23858         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23859         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23860         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23861         UnixWare 7.1.1.
23862
23863         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23864         rather than AC_CACHE_VAL.
23865
23866 2001-02-17  Jim Meyering  <meyering@lucent.com>
23867
23868         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23869         around included file name.
23870
23871         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23872
23873         * lib/strftime.c: Update from GNU libc (the only changes were to
23874         comments).
23875
23876 2001-02-17  Jim Meyering  <meyering@lucent.com>
23877
23878         * lib/regex.c: Update from libc.
23879
23880 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23881
23882         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23883         clash.
23884
23885 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23886
23887         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23888         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23889         Reported by Mark Hounschell via Paul Eggert.
23890
23891 2001-02-07  Jim Meyering  <meyering@lucent.com>
23892
23893         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23894
23895 2001-02-05  Jim Meyering  <meyering@lucent.com>
23896
23897         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23898         it includes the patch required for `large file' support with at least
23899         HP-UX's 10.20 /bin/cc.
23900
23901 2001-02-03  Jim Meyering  <meyering@lucent.com>
23902
23903         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23904         AS_IF, now that it works once again (mysteriously).
23905         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23906
23907 2001-01-30  Jim Meyering  <meyering@lucent.com>
23908
23909         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23910         * m4/chown.m4: Rename conftestchown to conftest.chown.
23911         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23912         s/conftestdir2/conftest.d2/.
23913         * m4/utimes.m4: s/conftestdata/conftest.data/
23914         Inspired by Pavel Roskin's change in autoconf.
23915
23916 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23917
23918         * lib/config.charset: Update for FreeBSD 4.2.
23919
23920 2001-01-27  Jim Meyering  <meyering@lucent.com>
23921
23922         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23923         a use of AS_IF.
23924         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23925
23926 2001-01-26  Jim Meyering  <meyering@lucent.com>
23927
23928         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23929         quotearg.c includes it.
23930
23931 2001-01-26  Jim Meyering  <meyering@lucent.com>
23932
23933         * lib/quotearg.c: Include stddef.h.
23934         * lib/quote.c: Include stddef.h.
23935         Reported by Axel Kittenberger.
23936
23937         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23938         line in double quotes so that it evokes a better diagnostic.
23939         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23940         Reported by Axel Kittenberger.
23941
23942 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23943
23944         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23945         as if it was a `charset'.
23946
23947 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23948
23949         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23950         has const.
23951
23952 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23953
23954         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23955         to avoid a warning.  Add back 'const' to inptr.
23956
23957 2001-01-20  Jim Meyering  <meyering@lucent.com>
23958
23959         Be sure that headers are checked before used in code compiled
23960         for the type checks.
23961         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23962         In place of that, invoke jm_CHECK_ALL_TYPES.
23963         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23964         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23965         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23966         The check for ssize_t was mistakenly run before the test for unistd.h.
23967
23968         The configure-time check for stdbool.h was missing.
23969         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23970         (jm_PREREQ_HASH): New function.
23971
23972 2001-01-17  Jim Meyering  <meyering@lucent.com>
23973
23974         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23975         for autoconf-2.49c.
23976         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23977
23978 2001-01-16  Jim Meyering  <meyering@lucent.com>
23979
23980         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23981         From Bruno Haible.
23982
23983 2001-01-14  Jim Meyering  <meyering@lucent.com>
23984
23985         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23986         foo and bar.  Create conftestdir/ in the script, not in the C code.
23987         Remove directories in the script, not in the C code.
23988         Remove conftestdir{,2} before trying to create the directory.
23989         Make the entire configure script fail if the mkdir fails.
23990
23991 2001-01-14  Jim Meyering  <meyering@lucent.com>
23992
23993         * lib/rename.c: New file.  From Volker Borchert.
23994         Include stdlib.h, string.h or strings.h, and xalloc.h.
23995         Use strip_trailing_slashes rather than open-coding it.
23996
23997 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23998
23999         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
24000
24001 2001-01-03  Jim Meyering  <meyering@lucent.com>
24002
24003         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
24004         of local `inptr' to avoid warning with some system declarations of
24005         iconv.
24006
24007 2001-01-02  Volker Borchert  <bt@teknon.de>
24008
24009         * m4/rename.m4: New file.
24010         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
24011
24012 2001-01-01  Jim Meyering  <meyering@lucent.com>
24013
24014         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
24015         even on systems with utmpx.h.  It's necessary for the declaration of
24016         utmp's ut_user member.  Reported by Andreas Jaeger.
24017
24018         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
24019         available. They are required for the declarations of getgrgid and
24020         getpwuid resp.
24021         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
24022         Reported by Andreas Jaeger.
24023
24024 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24025
24026         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24027         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24028         so `make install' also works in VPATH builds.
24029
24030 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24031
24032         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24033         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24034         can be used in subdirectories.
24035
24036 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24037
24038         * lib/modechange.c: Do not assume that mode_t uses the
24039         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24040         the other-execute bit of FOO even if S_IXOTH != 1.
24041
24042         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24043         WOTH, XOTH, ALLM): New macros.
24044         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24045          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24046         Use them.
24047         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24048         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24049         (mode_compile):
24050         No need to use uintmax_t; unsigned long is long enough.
24051         Don't bother to get suffix since we don't use it.
24052
24053 2000-12-26  Jim Meyering  <meyering@lucent.com>
24054
24055         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24056         better with autoheader.
24057
24058 2000-12-24  Jim Meyering  <meyering@lucent.com>
24059
24060         * lib/hash.c (is_prime): Return explicit boolean values.
24061         (hash_get_first): Return NULL to appease Irix5.6's 89.
24062         Reported by Nelson Beebe.
24063
24064 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24065
24066         * lib/localcharset.c (locale_charset): Add support for Win32.
24067
24068 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24069
24070         * lib/physmem.h, lib/physmem.c: New files.
24071
24072         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24073         (noinst_HEADERS): Add physmem.h.
24074
24075         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24076         't' for compatibility with Solaris 8 sort.
24077
24078 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24079
24080         * lib/config.charset: Add support for BeOS.
24081
24082 2000-12-17  Jim Meyering  <meyering@lucent.com>
24083
24084         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24085         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24086
24087 2000-12-16  Jim Meyering  <meyering@lucent.com>
24088
24089         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24090         N and M) would have treated it like `chown N:N FILE'.
24091
24092         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24093
24094 2000-12-16  Jim Meyering  <meyering@lucent.com>
24095
24096         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24097         SHELLS_FILE to a file name that's useful on djgpp systems.
24098         Include stdlib.h.
24099         (ADDITIONAL_DEFAULT_SHELLS): Define.
24100         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24101         Based mostly on a patch from Prashant TR.
24102
24103 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24104
24105         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24106         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24107         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24108
24109 2000-12-08  Andreas Schwab  <schwab@suse.de>
24110
24111         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24112         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24113
24114 2000-12-07  Jim Meyering  <meyering@lucent.com>
24115
24116         * lib/stripslash.c (ISSLASH): Define.
24117         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24118         `/'.
24119         From Prashant TR.
24120
24121         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24122         (dir_name_r): Declare this function as static.
24123         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24124         manifest itself on a name containing a mix of slashes and
24125         backslashes.
24126         Make this function work with names starting with a DOS-style
24127         drive letter and colon prefix.
24128         (dir_name): Append `.' if necessary.
24129         Based mostly on patches from Prashant TR and Eli Zaretskii.
24130
24131         * lib/dirname.h (dir_name_r): Remove prototype.
24132
24133 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24134
24135         * m4/off_t-format.m4: Remove this file.
24136         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24137
24138 2000-12-06  Jim Meyering  <meyering@lucent.com>
24139
24140         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24141         replacement strtoull, we may well need the replacement strtoul, too.
24142         Check for declarations of strtoul and strtoull.
24143         Check for strtol.  Mainly as a cue to cause automake to include
24144         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24145         Check for limits.h -- strtol.c needs it.
24146
24147 2000-12-05  Jim Meyering  <meyering@lucent.com>
24148
24149         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24150
24151 2000-12-04  Jim Meyering  <meyering@lucent.com>
24152
24153         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24154         Also include memory.h, stdlib.h, unistd.h if appropriate.
24155         Reported by Andreas Jaeger (conflicting declaration of malloc).
24156
24157 2000-12-02  Jim Meyering  <meyering@lucent.com>
24158
24159         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24160         * m4/jm-macros.m4 (jm_MACROS): require it.
24161
24162 2000-12-02  Jim Meyering  <meyering@lucent.com>
24163
24164         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24165
24166 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24167
24168         * lib/memrchr.c: Include <config.h> before any system include file.
24169
24170 2000-11-30  Jim Meyering  <meyering@lucent.com>
24171
24172         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24173
24174 2000-11-30  Jim Meyering  <meyering@lucent.com>
24175
24176         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24177
24178 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24179
24180         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24181
24182 2000-11-26  Jim Meyering  <meyering@lucent.com>
24183
24184         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24185
24186 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24187
24188         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24189         size of (size_t) -1; it's not portable.
24190
24191 2000-11-17  Jim Meyering  <meyering@lucent.com>
24192
24193         * lib/strstr.c: Update from GNU libc.
24194
24195 2000-11-17  Akim Demaille  <akim@epita.fr>
24196
24197         * lib/obstack.h: Formatting changes.
24198         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24199         prevent type checking.
24200         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24201         cast the value to (void *): assigning a `foo *' to a `void *'
24202         variable is valid.
24203         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24204
24205 2000-11-16  Jim Meyering  <meyering@lucent.com>
24206
24207         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24208
24209 2000-11-11  Jim Meyering  <meyering@lucent.com>
24210
24211         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24212
24213 2000-11-10  Jim Meyering  <meyering@lucent.com>
24214
24215         * lib/obstack.h: Update from GNU libc.
24216         * lib/obstack.c: Likewise.
24217
24218 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24219
24220         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24221
24222 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24223
24224         * lib/getusershell.c (setusershell): Use rewind rather than
24225         fseek/fseeko, to avoid configuration hassles with fseeko.
24226         Don't bother opening SHELLS_FILE if shellstream is NULL;
24227         it's not necessary.
24228
24229 2000-11-05  Jim Meyering  <meyering@lucent.com>
24230
24231         * lib/makepath.h (make_dir): Declare.
24232         * lib/makepath.c (make_dir): Remove `static' attribute.
24233         Tweak a comment.
24234
24235 2000-11-04  Jim Meyering  <meyering@lucent.com>
24236
24237         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24238
24239 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24240
24241         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24242         last one in a bucket, advance to the next bucket.
24243
24244 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24245
24246         * lib/fnmatch.c: Do not comment out all the code if we are using
24247         the GNU C library, because in some cases we are replacing buggy
24248         code in the GNU C library itself.
24249
24250 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24251
24252         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24253         (regex_compile): Catch bogus \(\1\).
24254
24255 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24256
24257         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24258         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24259         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24260
24261 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24262
24263         * lib/error.h, getline.h, modechange.h:
24264         Remove "2000" from Copyright line, as the file hasn't been
24265         changed this year other than in the copyright notice.
24266
24267         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24268         was changed this year.
24269
24270 2000-10-29  Jim Meyering  <meyering@lucent.com>
24271
24272         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24273         renaming.
24274         * m4/ls-mntd-fs.m4: Likewise
24275
24276 2000-10-29  Jim Meyering  <meyering@lucent.com>
24277
24278         * lib/xstat.in: Fix grammar in comment.
24279
24280 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24281
24282         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24283         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24284         doesn't define __restrict_arr.
24285
24286 2000-10-28  Jim Meyering  <meyering@lucent.com>
24287
24288         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24289         (jm_PREREQ_MEMCHR): New function.
24290
24291 2000-10-28  Jim Meyering  <meyering@lucent.com>
24292
24293         * lib/memchr.c: Update from libc.
24294         Adjust for portability:
24295         [HAVE_STDLIB_H]: Include stdlib.h.
24296         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24297         Undef __memchr, too.
24298         [!weak_alias]: Define __memchr to memchr.
24299
24300         * lib/regex.c: Update from libc.
24301         * lib/regex.h: Likewise.
24302         * lib/getopt1.c: Likewise.
24303         * lib/memcmp.c: Likewise.
24304
24305         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24306         Avoid using fseek, when possible -- it's broken by design.
24307         Patch by Ulrich Drepper.
24308
24309 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24310
24311         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24312         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24313         Giving in to popular pressure to shut up the compiler with casts.
24314
24315 2000-10-26  Jim Meyering  <meyering@lucent.com>
24316
24317         * lib/strftime.c: Update from libc.
24318
24319 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24320
24321         * regex.c: More `unsigned char' -> `re_char' changes.
24322         Also change several `int' into `re_wchar_t'.
24323         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24324         (PUSH_FAILURE_POINTER): Don't cast any more.
24325         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24326         We want GCC to complain, since this piece of code makes
24327         re_match non-reentrant, which *should* be fixed.
24328         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24329         (EXTEND_BUFFER): Use RETALLOC.
24330         (SET_LIST_BIT): Don't cast.
24331         (re_wchar_t): New type.
24332         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24333         that those two functions will always properly return.
24334         (IMMEDIATE_QUIT_CHECK): Cast to void.
24335         (analyse_first): Use recursion rather than an explicit stack.
24336         (re_compile_fastmap): Can't fail anymore.
24337         (re_search_2): Don't check re_compile_fastmap for failure.
24338         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24339         Now also sets the new value (passed in a new argument).
24340         (re_match_2_internal): Use it.
24341         Also, use a new var `reg' of type size_t when looping through regs
24342         rather than reuse the inappropriate `mcnt'.
24343
24344 2000-10-25  Jim Meyering  <meyering@lucent.com>
24345
24346         * lib/obstack.c: Update from libc.
24347
24348 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24349
24350         * regex.c (regex_compile): Change the way of handling a range from
24351         a char less than 256 to a char not less than 256.
24352
24353 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24354
24355         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24356         NT-Emacs only.
24357         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24358         so that re_search functions only quit when callers expect them to.
24359
24360 2000-10-23  Jim Meyering  <meyering@lucent.com>
24361
24362         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24363         wrong.  That set_locale call must not have any side effects.
24364         From Paul Eggert.
24365
24366 2000-10-22  Jim Meyering  <meyering@lucent.com>
24367
24368         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24369         [CYCLIC]: Remove now-unused definition.
24370
24371         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24372         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24373         Suggestion from Ulrich Drepper.
24374
24375 2000-10-21  Jim Meyering  <meyering@lucent.com>
24376
24377         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24378         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24379         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24380
24381 2000-10-21  Jim Meyering  <meyering@lucent.com>
24382
24383         * lib/dirname.c (memrchr): Declare if necessary.
24384         (dir_name): Remove the restriction that there be no
24385         trailing slashes.  Now, this code skips past them, effectively
24386         ignoring them.
24387         [TEST_DIRNAME] (main): New unit tests.
24388
24389         * lib/memrchr.c: New file from GNU libc.
24390         Undef __memrchr, too.
24391         [!weak_alias]: Define __memrchr to memrchr.
24392         Guard weak_alias use with `#ifdef weak_alias'.
24393
24394 2000-10-21  Jim Meyering  <meyering@lucent.com>
24395
24396         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24397         (dir_name): Use dir_name_r.
24398         * lib/dirname.h (dir_name_r): Declare it.
24399
24400 2000-10-17  Jim Meyering  <meyering@lucent.com>
24401
24402         * lib/quote.h (PARAMS): Define and use.
24403         Reported by Akim Demaille.
24404
24405         * lib/getopt.c: Update from libc.
24406
24407 2000-10-16  Jim Meyering  <meyering@lucent.com>
24408
24409         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24410         setlocale.
24411         From Jan Fedak.
24412
24413 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24414
24415         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24416
24417 2000-09-25  Jim Meyering  <meyering@lucent.com>
24418
24419         * lib/md5.h (rol): Define (from GnuPG).
24420
24421         * lib/sha.c: Give credit (GnuPG) where due.
24422         (M): Use rol rather than open-coding it.
24423         Add a FIXME comment.
24424
24425 2000-09-21  Jim Meyering  <meyering@lucent.com>
24426
24427         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24428         Reported by Michael Stone.
24429
24430 2000-09-20  Jim Meyering  <meyering@lucent.com>
24431
24432         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24433         (noinst_HEADERS): Add sha.h.
24434         Based on code from Scott G. Miller and from GnuPG.
24435
24436 2000-09-18  Jim Meyering  <meyering@lucent.com>
24437
24438         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24439         LIBS. Otherwise, everyone ends up linking with -lelf for some
24440         configurations.
24441         Reported by Mike Stone.
24442
24443 2000-09-15  Jim Meyering  <meyering@lucent.com>
24444
24445         * lib/regex.c: Update from libc.
24446
24447 2000-09-10  Jim Meyering  <meyering@lucent.com>
24448
24449         * lib/getopt.c (_getopt_internal): Update from glibc.
24450
24451 2000-09-09  Jim Meyering  <meyering@lucent.com>
24452
24453         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24454         think it should be used as a general replacement for isascii.
24455         * lib/fnmatch.c: Likewise.
24456         * lib/mbswidth.c: Likewise
24457         * lib/regex.c: Likewise.
24458
24459         Don't use atoi.
24460         * lib/userspec.c: Include sys/param.h and limits.h.
24461         Include xstrtol.h.
24462         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24463         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24464         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24465         UID, GID.  Check range.
24466
24467 2000-09-06  Jim Meyering  <meyering@lucent.com>
24468
24469         * lib/getopt.c (_getopt_internal): Update from glibc.
24470
24471 2000-08-30  Jim Meyering  <meyering@lucent.com>
24472
24473         * lib/strftime.c: Merge in changes from GNU libc.
24474
24475 2000-08-26  Jim Meyering  <meyering@lucent.com>
24476
24477         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24478         * m4/fpending.m4: New file.
24479
24480 2000-08-26  Jim Meyering  <meyering@lucent.com>
24481
24482         * lib/closeout.c: Include "__fpending.h".
24483         (close_stdout_status): Return right away if there's nothing to flush.
24484
24485         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24486         * lib/__fpending.c: New file.
24487         * lib/__fpending.h: New file.
24488
24489 2000-08-20  Jim Meyering  <meyering@lucent.com>
24490
24491         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24492         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24493         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24494
24495 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24496
24497         Improve fileutils installation on systems where running
24498         programs (like install) can't be unlinked.
24499         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24500         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24501
24502 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24503
24504         Standardize on "memory exhausted" instead of "Memory exhausted"
24505         or "virtual memory exhausted".
24506         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24507         "virtual memory exhausted".
24508         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24509         our own message.
24510         * lib/userspec.c (parse_user_spec): Likewise.
24511         * lib/bumpalloc.h: comment fix
24512         * lib/same.c, userspec.c: Include xalloc.h.
24513
24514         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24515         not char *const and pointing to a constant array.
24516         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24517         (xrealloc): Comment fix.
24518
24519         * lib/userspec.c (parse_user_spec):
24520         Don't translate a message until just before returning,
24521         to avoid unnecessary translation.
24522
24523 2000-08-07  Jim Meyering  <meyering@lucent.com>
24524
24525         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24526         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24527         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24528         getgroups.c, gethostname.c, getopt.h, group-member.c,
24529         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24530         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24531         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24532         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24533         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24534         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24535         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24536         yesno.c: Back out Copyright date changes for each file with no change
24537         this year.  This eases coordination with other programs using the same
24538         source code modules.  From Paul Eggert.
24539
24540 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24541
24542         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24543         not char, for compatibility with glibc 2.1.3 strftime.c.
24544
24545 2000-08-03  Greg McGary  <greg@mcgary.org>
24546
24547         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24548         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24549         (EXTEND_BUFFER): Use them.
24550
24551 2000-08-01  Jim Meyering  <meyering@lucent.com>
24552
24553         * lib/dirname.c (ISSLASH): Define.
24554         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24555         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24556         both `\' and `/' may be use as path separators.
24557         Based on a patch from Prashant TR.
24558
24559 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24560
24561         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24562         slot vector a constant, since it might get modified.
24563
24564 2000-07-31  Jim Meyering  <meyering@lucent.com>
24565
24566         * lib/xmalloc.c: Use `virtual memory exhausted', not
24567         `Memory exhausted'.
24568         * lib/obstack.c (print_and_abort): Likewise.
24569
24570 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24571
24572         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24573         buffer, so that the caller can always quote one small
24574         component of a "memory exhausted" message in slot 0.
24575         From a suggestion by Jim Meyering.
24576
24577 2000-07-30  Jim Meyering  <meyering@lucent.com>
24578
24579         * lib/makepath.c (make_path): Quote the other instance, too.
24580
24581         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24582         (STATIC_BUF_SIZE): Define.
24583         (quotearg_n_options): Use only statically allocated storage when
24584         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24585         than STATIC_BUF_SIZE.
24586
24587 2000-07-29  Jim Meyering  <meyering@lucent.com>
24588
24589         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24590         * lib/dirname.c (dir_name): Likewise.
24591
24592         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24593         `/'.
24594
24595         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24596         (dir_name): Assert that there are no trailing slashes.
24597
24598 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24599
24600         * lib/mbswidth.h (mbswidth): Add a flags argument.
24601         (mbswidth): New declaration.
24602         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24603         * lib/mbswidth.c (mbswidth): Add a flags argument.
24604         (mbsnwidth): New function.
24605
24606 2000-07-24  Jim Meyering  <meyering@lucent.com>
24607
24608         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24609
24610 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24611
24612         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24613
24614 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24615
24616         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24617         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24618         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24619         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24620         invoke multibyte primitives.
24621
24622 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24623
24624         * lib/quotearg.c:
24625         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24626         so that mbstate_t is always defined.
24627
24628         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24629         be 1 in at least one GCC installation, and this configuration
24630         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24631         performance on hosts that have mbrtowc but have only unibyte
24632         locales, but I assume these hosts are rare.
24633
24634 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24635
24636         * lib/mbswidth.c (_XOPEN_SOURCE):
24637         Don't define; this causes problems on Solaris 7.
24638         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24639
24640 2000-07-23  Jim Meyering  <meyering@lucent.com>
24641
24642         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24643         too: getgrgid, getpwuid, getuid.
24644
24645 2000-07-23  Jim Meyering  <meyering@lucent.com>
24646
24647         * lib/basename.c (base_name): Add an assertion.
24648
24649 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24650
24651         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24652         shadow its mbsinit function.
24653
24654 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24655
24656         * lib/mbswidth.h: New file.
24657         * lib/mbswidth.c: New file.
24658         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24659         (noinst_HEADERS): Add mbswidth.h.
24660
24661 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24662
24663         * lib/config.charset: Add support for FreeBSD. Improve support for
24664         HP-UX and IRIX 6.
24665
24666 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24667
24668         * m4/mbswidth.m4: New file.
24669         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24670
24671 2000-07-15  Jim Meyering  <meyering@lucent.com>
24672
24673         * lib/makepath.c: Include quote.h.
24674         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24675         corresponding argument in a `quote (...)' call.
24676         Give better diagnostics.
24677
24678         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24679         (noinst_HEADERS): Add quote.h.
24680
24681         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24682         from tar's src/misc.c.
24683         * lib/quote.h: New file.  Prototypes for same.
24684
24685 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24686
24687         From a suggestion by Bruno Haible.
24688         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24689         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24690         to decide whether to define the BeOS workaround macro;
24691         this adjusts to the change to AC_MBSTATE_T.
24692
24693 2000-07-14  Jim Meyering  <meyering@lucent.com>
24694
24695         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24696         jm_AC_TYPE_UINTMAX_T.
24697
24698 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24699
24700         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24701
24702         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24703         quotearg_buffer_restyled): Add support for
24704         clocale_quoting_style.  Undo previous change to
24705         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24706         and "{RIGHT QUOTATION MARK}" msgids.
24707
24708 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24709
24710         From a suggestion by Bruno Haible.
24711         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24712         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24713         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24714         and mbstate_t, to a single-part test that simply defines mbstate_t.
24715         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24716         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24717
24718 2000-07-10  Jim Meyering  <meyering@lucent.com>
24719
24720         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24721
24722         * m4/gnu-source.m4: Output to confdefs.h directly.
24723         Suggestion from Akim Demaille.
24724
24725 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24726
24727         The old behavior of quoting `like this' doesn't look good with
24728         newer, ISO-style fonts.  See:
24729         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24730
24731         Instead, quote "like this" by default.  Let the translator
24732         tailor the locale-specific quoting behavior by providing
24733         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24734
24735         * lib/quotearg.c (N_): New macro.
24736         (gettext_default): New function.
24737         (quotearg_buffer_restyled): Use
24738         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24739         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24740
24741 2000-07-09  Jim Meyering  <meyering@lucent.com>
24742
24743         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24744         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24745
24746         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24747         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24748
24749 2000-07-09  Jim Meyering  <meyering@lucent.com>
24750
24751         * lib/Most files: Update copyright dates to include 2000.
24752
24753 2000-07-08  Jim Meyering  <meyering@lucent.com>
24754
24755         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24756         if not defined.
24757         (xgethostname): Remove now-unnecessary #ifdef.
24758         Move declaration of `err' into loop where it's used.
24759
24760 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24761         and Bruno Haible  <haible@clisp.cons.org>
24762
24763         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24764         only if the test for an object-type mbstate_t fails.  This
24765         prevents us from mistakenly reporting that mbstate_t is a
24766         system object type after we "#define mbstate_t int" to work
24767         around its lack.
24768
24769 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24770         and Bruno Haible  <haible@clisp.cons.org>
24771
24772         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24773
24774 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24775
24776         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24777         to strerror_r.
24778         Include <ctype.h> for use of isalpha.
24779
24780 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24781
24782         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24783         by allocating a larger buffer. Test the gethostname return value for
24784         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24785         returns an error and ENAMETOOLONG isn't defined.
24786
24787 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24788
24789         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24790         dimension.
24791
24792 2000-07-04  Jim Meyering  <meyering@lucent.com>
24793
24794         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24795         of the deprecated AC_CHECKING.
24796
24797 2000-07-04  Jim Meyering  <meyering@lucent.com>
24798
24799         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24800         Reported by Bruno Haible.
24801
24802 2000-07-04  Jim Meyering  <meyering@lucent.com>
24803
24804         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24805         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24806         lacks mbrtowc.
24807
24808 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24809
24810         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24811         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24812
24813 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24814         and Bruno Haible  <haible@clisp.cons.org>
24815
24816         * lib/quotearg.c (mbrtowc):
24817         Assign to *pwc, and return 1 only if result is nonzero.
24818         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24819
24820 2000-07-03  Jim Meyering  <meyering@lucent.com>
24821
24822         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24823
24824 2000-07-03  Jim Meyering  <meyering@lucent.com>
24825
24826         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24827         This is necessary to get a definition of e.g., UTMP_FILE on
24828         HP-UX 10.20.
24829         From Bob Proulx.
24830
24831 2000-07-02  Jim Meyering  <meyering@lucent.com>
24832
24833         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24834
24835         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24836         AC_LIBOBJ(function_name).
24837         * m4/chown.m4: Likewise.
24838         * m4/fnmatch.m4: Likewise.
24839         * m4/ftruncate.m4: Likewise.
24840         * m4/getgroups.m4: Likewise.
24841         * m4/getline.m4: Likewise.
24842         * m4/group-member.m4: Likewise.
24843         * m4/jm-macros.m4: Likewise.
24844         * m4/lstat.m4: Likewise.
24845         * m4/malloc.m4: Likewise.
24846         * m4/memcmp.m4: Likewise.
24847         * m4/nanosleep.m4: Likewise.
24848         * m4/putenv.m4: Likewise.
24849         * m4/realloc.m4: Likewise.
24850         * m4/regex.m4: Likewise.
24851         * m4/stat.m4: Likewise.
24852         * m4/strftime.m4: Likewise.
24853
24854 2000-07-02  Jim Meyering  <meyering@lucent.com>
24855
24856         * lib/quotearg.c (mbstate_t): Don't define here.
24857
24858 2000-07-02  Jim Meyering  <meyering@lucent.com>
24859
24860         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24861
24862 2000-07-01  Jim Meyering  <meyering@lucent.com>
24863
24864         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24865
24866 2000-07-01  Jim Meyering  <meyering@lucent.com>
24867
24868         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24869         problem.
24870
24871 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24872
24873         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24874         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24875
24876 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24877
24878         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24879         per change in ../m4/ls-mntd-fs.m4.
24880         (read_filesystem_list): Ignore symbolic links.
24881
24882 2000-06-29  Jim Meyering  <meyering@lucent.com>
24883
24884         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24885         for declaration of strcmp.
24886
24887         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24888
24889         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24890         Avoid warning by casting result to `char *' to remove `const'.
24891
24892 2000-06-28  Jim Meyering  <meyering@lucent.com>
24893
24894         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24895         included by quotearg.c, for which we perform this test.  From
24896         Bruno Haible.
24897
24898 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24899
24900         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24901         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24902         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24903
24904 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24905
24906         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24907
24908 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24909
24910         savedir now sets errno on failure and invokes xmalloc to get memory.
24911         Fix a couple of other minor bugs while we're at it.
24912
24913         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24914         (NAMLEN): Remove macro.
24915         (malloc, realloc): Remove decls.
24916         (stpcpy): Likewise.
24917         ("xalloc.h"): Include.
24918         (NAME_SIZE_DEFAULT): New macro.
24919         (savedir): Use xmalloc / xrealloc to allocate memory.
24920         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24921         Skip "" directory entries.
24922         Use strlen to calculate directory entry length, since the old method
24923         is rarely used these days and isn't worth supporting.
24924         Don't use a pointer after freeing it.
24925         Check for integer overflow when calculating allocation size.
24926         Use memcpy to copy entries, instead of stpcpy.
24927         Set errno properly when returning NULL.
24928         Check for readdir error.
24929
24930 2000-06-26  Jim Meyering  <meyering@lucent.com>
24931
24932         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24933
24934 2000-06-25  Jim Meyering  <meyering@lucent.com>
24935
24936         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24937         Linux header bug when _XOPEN_SOURCE is defined to 500.
24938
24939 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24940
24941         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24942         deficiency.
24943
24944 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24945
24946         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24947         Include xalloc.h.
24948         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24949
24950 2000-06-24  Jim Meyering  <meyering@lucent.com>
24951
24952         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24953         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24954         for which strerror does return char*, but which lacks a conveniently
24955         accessible declaration of the function.  If the compile-test says
24956         strerror_r doesn't work, then resort to a `run'-test that works on
24957         BeOS and segfaults on DEC Unix.
24958
24959 2000-06-24  Jim Meyering  <meyering@lucent.com>
24960
24961         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24962
24963 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24964
24965         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24966         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24967
24968 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24969
24970         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24971         (mbrtowc, mbstate_t): Define substitutes if
24972         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24973         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24974         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24975
24976 2000-06-23  Jim Meyering  <meyering@lucent.com>
24977
24978         * m4/afs.m4: Add missing AC_MSG_RESULT.
24979         Reported by Bruno Haible.
24980
24981         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24982         Suggestion from Bruno Haible.
24983
24984 2000-06-23  Jim Meyering  <meyering@lucent.com>
24985
24986         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24987
24988 2000-06-21  Jim Meyering  <meyering@lucent.com>
24989
24990         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24991
24992 2000-06-21  Jim Meyering  <meyering@lucent.com>
24993
24994         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24995         (noinst_HEADERS): Add getstr.h.
24996
24997         * lib/getline.c (getstr): Move into a separate file.
24998         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24999         the following changes: new parameter, delim2; both delim[12]
25000         parameters have type `int', not `char'.  The latter would lose
25001         with 8-bit delimiters.
25002         * lib/getstr.h: New file.
25003
25004 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25005
25006         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
25007         than 1024, return a memory chunk of least possible size, instead
25008         of size PATH_MAX + 2. In the loop, increment the size proportionally.
25009         Use free/xmalloc instead of xrealloc to avoid copying for very long
25010         paths.
25011
25012 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25013
25014         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
25015         the empty string.
25016
25017 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
25018
25019         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
25020         address, not strdup.  Include <stdlib.h> and don't declare free().
25021
25022 2000-06-19  Jim Meyering  <meyering@lucent.com>
25023
25024         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25025
25026 2000-06-18  Jim Meyering  <meyering@lucent.com>
25027
25028         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25029
25030         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25031         `checking whether...' message to be consistent with that of the
25032         lstat test.
25033
25034 2000-06-18  Jim Meyering  <meyering@lucent.com>
25035
25036         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25037         Besides, these days every porting target provides a mkdir function.
25038
25039         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25040         needed. (this snippet comes from src/system.h).
25041
25042 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25043
25044         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25045
25046 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25047
25048         * lib/human.c (adjust_value): New function.
25049         (human_readable_inexact): Apply rounding style even when
25050         printing approximate values.
25051
25052 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25053
25054         * lib/human.c (human_readable_inexact): Allow an input block
25055         size that is not a multiple of the output block size, and vice versa.
25056         Reported by Piergiorgio Sartor.
25057
25058 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25059
25060         * lib/getdate.y (get_date): Apply relative times after time
25061         zone indicator, not before.  Reported by Todd A. Jacobs.
25062
25063 2000-06-13  Jim Meyering  <meyering@lucent.com>
25064
25065         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25066
25067         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25068
25069 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25070
25071         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25072
25073 2000-06-12  Jim Meyering  <meyering@lucent.com>
25074
25075         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25076         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25077         optional argument.
25078         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25079         the optional argument, `lib'.
25080
25081 2000-06-08  Jim Meyering  <meyering@lucent.com>
25082
25083         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25084
25085 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25086
25087         Rewrite largefile configuration so that we don't need to run
25088         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
25089         AC_CANONICAL_HOST in configure.in -- jmm]
25090
25091         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
25092         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
25093         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
25094         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
25095         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
25096         All uses changed.
25097         Instead of inspecting the output of getconf, try to compile the
25098         test program without and with the macro definition.
25099         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
25100         for getconf.  Instead, check for the needed flags by compiling
25101         test programs.
25102
25103 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25104
25105         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
25106
25107 2000-06-04  Jim Meyering  <meyering@lucent.com>
25108
25109         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
25110         SunOS 4.1.4 for which gid_t is an unsigned type.
25111
25112 2000-06-03  Jim Meyering  <meyering@lucent.com>
25113
25114         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
25115         now that autoconf requires that.
25116
25117         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
25118         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
25119         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
25120
25121 2000-06-03  Jim Meyering  <meyering@lucent.com>
25122
25123         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
25124
25125 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25126
25127         * m4/glibc21.m4: New file.
25128         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
25129
25130 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25131
25132         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
25133         newer, don't install charset.alias.
25134         * lib/config.charset: Change the Linux/glibc rules so they become empty
25135         on glibc-2.1 or newer.
25136
25137 2000-06-02  Jim Meyering  <meyering@lucent.com>
25138
25139         * lib/mountlist.c: Back out last change.  Instead, do this...
25140         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
25141         me_dummy member using the same `ignore'-testing code.
25142         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
25143         fs_type strings.
25144         From Mark D. Roth.
25145
25146 2000-05-29  Jim Meyering  <meyering@lucent.com>
25147
25148         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
25149         mounts with the `ignore' attribute.  Based on a patch from
25150         Mark D. Roth.
25151
25152 2000-05-28  Jim Meyering  <meyering@lucent.com>
25153
25154         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
25155         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25156         * m4/stat.m4: Likewise.
25157         * m4/lstat.m4: Likewise.
25158         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
25159
25160         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
25161         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
25162
25163 2000-05-26  Jim Meyering  <meyering@lucent.com>
25164
25165         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
25166
25167 2000-05-24  Jim Meyering  <meyering@lucent.com>
25168
25169         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
25170         autoconf requires that.
25171         * m4/lib-check.m4: Likewise.
25172         * m4/jm-macros.m4: Likewise.
25173         * m4/strftime.m4: Likewise.
25174
25175         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
25176         AC_CHECK_DECLS, now that autoconf requires that.
25177
25178 2000-05-22  Jim Meyering  <meyering@lucent.com>
25179
25180         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25181         * m4/lstat.m4: Likewise.
25182
25183 2000-05-22  Jim Meyering  <meyering@lucent.com>
25184
25185         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
25186
25187 2000-05-20  Jim Meyering  <meyering@lucent.com>
25188
25189         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
25190         (jm_PREREQ): Use it.
25191
25192 2000-05-18  Jim Meyering  <meyering@lucent.com>
25193
25194         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
25195         back, too, since it may have been modified by allocate_entry.
25196         (hash_delete): Rewrite to use neither the assignment operator
25197         nor the comma operator in an if-expression.
25198
25199 2000-05-15  Paul Eggert  <eggert@twinsun.com>
25200
25201         * lib/closeout.c:
25202         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
25203         Remove; no longer needed.
25204         "quotearg.h": Add include.
25205         (file_name): Do not bother to explicitly initialize to NULL; it's less
25206         efficient on some hosts.
25207         (close_stdout_status): Remove test as to whether stdout was already
25208         closed; it breaks for the case "echo x | sort >&-".
25209         Quote file name colons.
25210         Do not assume that _("write error") lacks format strings.
25211
25212 2000-05-15  Jim Meyering  <meyering@lucent.com>
25213
25214         * lib/version-etc.c (version_etc_copyright): Update the copyright
25215         string used in all --version output.
25216
25217 2000-05-14  Jim Meyering  <meyering@lucent.com>
25218
25219         * lib/closeout.c (close_stdout_set_file_name): New function.
25220         (close_stdout_status): Use new file-scoped global.
25221         Return right away if fstat says the stdout file descriptor is invalid.
25222         * lib/closeout.h (close_stdout_set_file_name): Declare.
25223
25224 2000-05-10  Jim Meyering  <meyering@lucent.com>
25225
25226         * lib/closeout.c [default_exit_status]: New file-scoped variable.
25227         (close_stdout_set_status): New function.
25228         * lib/closeout.h (close_stdout_set_status): Declare.
25229
25230 2000-05-09  Jim Meyering  <meyering@lucent.com>
25231
25232         * m4/gettext.m4: Rename this...
25233         * m4/libintl.m4: ...to this.
25234
25235 2000-05-08  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/long-options.c: Don't include closeout.h.
25238         (parse_long_options): Don't call close_stdout for --version.
25239
25240 2000-05-06  Paul Eggert  <eggert@twinsun.com>
25241
25242         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
25243         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
25244         2.1.3 bug.  This avoids a clash when files like regex.c define
25245         _GNU_SOURCE.
25246
25247 2000-05-06  Jim Meyering  <meyering@lucent.com>
25248
25249         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25250         (AC_REPLACE_FUNCS): Add strnlen.
25251
25252         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25253         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25254
25255         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25256         AC_SEARCH_LIBS call for nanosleep.
25257         (LIB_NANOSLEEP): Set and AC_SUBST.
25258
25259 2000-05-06  Jim Meyering  <meyering@lucent.com>
25260
25261         * lib/strnlen.c: Undefine __strnlen and strnlen.
25262         [!weak_alias]: Define __strnlen to strnlen.
25263
25264         * lib/atexit.c: New file, from libiberty.
25265
25266 2000-05-06  Jim Meyering  <meyering@lucent.com>
25267
25268         * lib/closeout.c (close_stdout_status): Also check for errors on the
25269         stderr stream.
25270
25271 2000-05-05  Jim Meyering  <meyering@lucent.com>
25272
25273         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25274         AC_SEARCH_LIBS call for clock_gettime.
25275         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25276
25277         * m4/search-libs.m4: Update from autoconf.
25278
25279         su doesn't work on Solaris 2.6.
25280         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25281         <shadow.h>.  Reported by Dragos Harabor.
25282
25283 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25284
25285         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25286         memcpy instead of xmalloc, xrealloc, path_concat.
25287         (locale_charset): Treat empty environment variables as absent.
25288         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25289
25290 2000-05-04  Jim Meyering  <meyering@lucent.com>
25291
25292         * lib/getopt.c: Update from glibc.
25293         * lib/obstack.c: Likewise.
25294         * lib/obstack.h: Likewise.
25295         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25296         file
25297
25298         * lib/regex.h: Likewise.
25299         * lib/strndup.c: Likewise.
25300         * lib/strnlen.c: New file, from glibc.
25301
25302 2000-05-03  Jim Meyering  <meyering@lucent.com>
25303
25304         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25305
25306 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25307
25308         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25309         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25310         compile-time test, rather than inspecting host and OS, to
25311         decide whether to define _LARGEFILE_SOURCE.
25312
25313 2000-05-01  Jim Meyering  <meyering@lucent.com>
25314
25315         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25316
25317         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25318         Based on a patch from Bruno Haible.
25319
25320 2000-05-01  Jim Meyering  <meyering@lucent.com>
25321
25322         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25323
25324 2000-04-29  Jim Meyering  <meyering@lucent.com>
25325
25326         * lib/path-concat.c: Declare strdup only if it's not defined.
25327         * lib/canon-host.c: Likewise.
25328
25329 2000-04-28  Jim Meyering  <meyering@lucent.com>
25330
25331         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25332         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25333         is included first, then limits.h is included by locale.h by libintl.h.
25334         From John David Anglin.
25335
25336 2000-04-25  Jim Meyering  <meyering@lucent.com>
25337
25338         * lib/makepath.c (S_IRWXUGO): Define.
25339         (make_path): Always perform explicit chmod if MODE specifies any
25340         of the `special' permission bits.  Prompted by a bug report against
25341         install from Mate Wierdl and Joost van Baal.
25342
25343 2000-04-18  Jim Meyering  <meyering@lucent.com>
25344
25345         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25346         (jm_PREREQ): Use it.
25347
25348 2000-04-18  Jim Meyering  <meyering@lucent.com>
25349
25350         * lib/README: New file.
25351
25352         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25353         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25354
25355 2000-04-17  Jim Meyering  <meyering@lucent.com>
25356
25357         Get it right :-)
25358         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25359         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25360         Suggestion from Akim Demaille.
25361
25362 2000-04-17  Jim Meyering  <meyering@lucent.com>
25363
25364         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25365         the definition of it to rpl_strftime also defined-away the system's
25366         declaration.
25367
25368 2000-04-15  Jim Meyering  <meyering@lucent.com>
25369
25370         Use `C' to denote so-called `contiguous' files, the same way
25371         that tar does.
25372         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25373         (ftypelet): Use S_ISCTG.
25374         From Michael Deutschmann.
25375
25376 2000-04-14  Jim Meyering  <meyering@lucent.com>
25377
25378         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25379         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25380         clobbered.
25381
25382 2000-04-14  Jim Meyering  <meyering@lucent.com>
25383
25384         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25385
25386 2000-04-13  Jim Meyering  <meyering@lucent.com>
25387
25388         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25389         AH_VERBATIM to insert required #ifndef into config.h.in.
25390         Suggestion from Akim Demaille.
25391
25392 2000-04-12  Jim Meyering  <meyering@lucent.com>
25393
25394         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25395         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25396         Christian Krackowizer.
25397
25398         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25399         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25400         (AC_SYS_LARGEFILE): Require.
25401         (AM_C_PROTOTYPES): Require.
25402
25403 2000-04-08  Jim Meyering  <meyering@lucent.com>
25404
25405         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25406         names don't conflict.  Reported by Eli Zaretskii.
25407
25408 2000-04-07  Jim Meyering  <meyering@lucent.com>
25409
25410         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25411         sys/types.h, to work around system header problems on AIX 3.2.5.
25412         From Bruno Haible.
25413
25414 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25415
25416         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25417         bug.  Deal with the different error behavior of Irix iconv.
25418
25419 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25420
25421         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25422         IRIX if the installer said otherwise.
25423
25424 2000-04-05  Jim Meyering  <meyering@lucent.com>
25425
25426         Portability tweaks required for ultrix4.3.
25427         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25428         (jm_CHECK_DECLS): Add getutent to the list of functions.
25429         (_jm_DECL_HEADERS): Add utmpx.h.
25430         From John David Anglin.
25431
25432         * m4/strftime.m4: Back out the 2000-04-02 change.
25433         Instead of that change, simply undefine putenv in the test program.
25434
25435 2000-04-05  Jim Meyering  <meyering@lucent.com>
25436
25437         Portability tweaks required for ultrix4.3.
25438         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25439         getutent.
25440         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25441         * lib/canon-host.c: Declare strdup.
25442         * lib/path-concat.c: Likewise.
25443         From John David Anglin.
25444
25445 2000-04-04  Jim Meyering  <meyering@lucent.com>
25446
25447         Be more DOS 8.3-friendly.
25448         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25449         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25450         * lib/Makefile.am: Reflect renaming.
25451         Reported by Eli Zaretskii.
25452
25453         Use a temporary file name that won't clash with `charset.alias'
25454         in the DOS 8.3 name space.
25455         * lib/Makefile.am (charset_tmp): Define.
25456         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25457         (uninstall-local): Likewise.
25458         Reported by Eli Zaretskii.
25459
25460 2000-04-03  Jim Meyering  <meyering@lucent.com>
25461
25462         * m4/gettext.m4: Fix typo in comment.
25463
25464         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25465         textutils/configure.in).  Suggestion from Paul Eggert.
25466         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25467
25468 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25469
25470         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25471         variable in the shell rather than using putenv, which isn't
25472         portable.  This avoids the configure-time inter-test dependency
25473         on the potentially-renamed putenv function.
25474
25475 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25476
25477         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25478         before checking struct stat.st_blksize, so that
25479         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25480
25481 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25482
25483         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25484         since strftime.c uses HAVE_STRFTIME to decide whether to use
25485         the underlying strftime.
25486
25487 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25488
25489         * lib/time/strftime.c (my_strftime): Make sure we call the system
25490         strftime, not ourselves, when invoking the underlying strftime.
25491
25492 2000-03-24  Jim Meyering  <meyering@lucent.com>
25493
25494         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25495         (charset_alias): Define.
25496         (install-exec-local): Factor out common code.
25497         (uninstall-local): Split lines longer than 80.
25498         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25499         (SUFFIXES): Define.
25500         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25501         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25502
25503 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25504
25505         * lib/config.charset: Output a line containing "Packages using this
25506         file".
25507         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25508         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25509         ref-del.sed): New rules.
25510
25511 2000-03-17  Jim Meyering  <meyering@lucent.com>
25512
25513         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25514         Otherwise, include <strings.h>
25515
25516 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25517
25518         * lib/unicodeio.c (utf8_wctomb): New function.
25519         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25520         format instead of in UCS-4 with platform dependent endianness.
25521
25522 2000-03-10  Jim Meyering  <meyering@lucent.com>
25523
25524         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25525         From Marco Franzen.
25526
25527 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25528
25529         * lib/savedir.c (savedir): Work even if directory size is
25530         negative; this can happen with some screwy NFS configurations.
25531
25532 2000-03-06  Jim Meyering  <meyering@lucent.com>
25533
25534         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25535         if it's NULL (because we ran out of memory).  From Bruno Haible.
25536
25537 2000-03-05  Jim Meyering  <meyering@lucent.com>
25538
25539         * lib/localcharset.c ("path-concat.h"): Include.
25540         (get_charset_aliases): Use path_concat instead of ANSI string
25541         concatenation.
25542
25543         * lib/unicodeio.h (PARAMS): Define.
25544         Use it to guard prototype.
25545
25546 2000-03-04  Jim Meyering  <meyering@lucent.com>
25547
25548         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25549         for lib/localcharset.c.
25550
25551 2000-03-04  Jim Meyering  <meyering@lucent.com>
25552
25553         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25554         installing into it.
25555         (uninstall-local): Uncomment this rule so `make distcheck' works
25556         once again.
25557
25558         * lib/unicodeio.c (<errno.h>): Include it.
25559         (errno): Declare if not defined.
25560
25561         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25562
25563         * lib/config.charset: New version, incorporating remarks from a linux
25564         i18n mailing list.  From Bruno Haible.
25565
25566 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25567
25568         * m4/codeset.m4: New file.
25569         * m4/iconv.m4: New file.
25570         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25571
25572 2000-03-03  Jim Meyering  <meyering@lucent.com>
25573
25574         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25575
25576 2000-03-02  Jim Meyering  <meyering@lucent.com>
25577
25578         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25579         the messages come out on separate lines.
25580
25581         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25582         rather than jm_CHECK_DECLARATIONS.
25583         * m4/decl.m4: Remove now-unused file.
25584
25585         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25586         geteuid.
25587
25588 2000-03-02  Jim Meyering  <meyering@lucent.com>
25589
25590         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25591
25592 2000-03-01  Jim Meyering  <meyering@lucent.com>
25593
25594         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25595         * lib/unicodeio.c: Likewise.
25596
25597 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25598
25599         * lib/config.charset: New file.
25600         * lib/localcharset.c: New file.
25601         * lib/unicodeio.h, lib/unicodeio.c: New files.
25602         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25603         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25604         (noinst_HEADERS): Add unicodeio.h.
25605         (all-local, install-exec-local, charset.alias): New targets.
25606
25607 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25608
25609         * lib/quotearg.c (ALERT_CHAR): New macro.
25610         (quotearg_buffer_restyled): Use it.
25611
25612 2000-02-27  Jim Meyering  <meyering@lucent.com>
25613
25614         * m4/check-decl.m4: Add getenv to the list.
25615
25616 2000-02-27  Jim Meyering  <meyering@lucent.com>
25617
25618         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25619         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25620
25621         * lib/backupfile.c: Guard inclusion of stdlib.h with
25622         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25623         Declare malloc if needed.
25624
25625         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25626         `#ifndef HAVE_DECL..'
25627         now that autoconf always defines the HAVE_DECL_ symbols.
25628         * lib/human.c: Likewise.
25629         * lib/same.c: Likewise.
25630         * lib/strtoumax.c: Likewise.
25631
25632         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25633         declaration check was not run.
25634         * lib/hash.c: Likewise.
25635         * lib/human.c: Likewise.
25636         * lib/same.c: Likewise.
25637         * lib/strtoumax.c: Likewise.
25638
25639         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25640         `.', then first look up the entire `.'-containing string as a login
25641         name.
25642
25643 2000-02-23  Jim Meyering  <meyering@lucent.com>
25644
25645         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25646         in place of my hack.
25647
25648 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25649
25650         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25651         (textint): New typedef.
25652         (parser_control): Member year changed from int to textint.
25653         All uses changed.
25654         (YYSTYPE): Removed; replaced by %union with int and textint members.
25655         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25656         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25657         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25658         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25659         (date, number, to_year): Use width of number in digits, not its value,
25660         to determine whether it's a 2-digit year, or a 2-digit time.
25661         (yylex): Store number of digits of numeric tokens.
25662         Reported by John Kendall.
25663
25664         (parser_control): Changed from struct parser_control to typedef (for
25665         consistency).  All uses changed.
25666
25667         (tID): Removed; not used.
25668         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25669
25670 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25671
25672         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25673         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25674
25675 2000-02-12  Jim Meyering  <meyering@lucent.com>
25676
25677         * lib/userspec.c (ISDIGIT): Define it.
25678         (isdigit): Remove definition.
25679         (is_number): Use ISDIGIT, not isdigit.
25680         <libintl.h>: Include.
25681         (_ and N_): Define.
25682         (parse_user_spec): Mark translatable strings.
25683
25684 2000-02-10  Jim Meyering  <meyering@lucent.com>
25685
25686         With these changes, nanosleep.[ch] are finally enough like the other
25687         lib/* replacement files to compile on a few more losing systems.
25688
25689         * lib/nanosleep.h: Don't include config.h.
25690         Remove prototype from declaration of nanosleep.
25691         (PARAMS): Remove now-unneeded definition.
25692         * lib/nanosleep.c: #undef nanosleep.
25693         (rpl_nanosleep): Rename from nanosleep.
25694
25695 2000-02-10  Jim Meyering  <meyering@lucent.com>
25696
25697         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25698         gnu_nanosleep to rpl_nanosleep.
25699
25700 2000-02-09  Jim Meyering  <meyering@lucent.com>
25701
25702         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25703         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25704
25705 2000-02-08  Akim Demaille  <akim@epita.fr>
25706
25707         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25708         `[' and `]' and remove uses of `changequote'.
25709         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25710         (AC_SYS_LARGEFILE): Likewise.
25711         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25712         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25713         of changequote.
25714         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25715         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25716         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25717         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25718
25719 2000-02-05  Jim Meyering  <meyering@lucent.com>
25720
25721         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25722         Remove explicit use of AC_HEADER_TIME.  It is required by
25723         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25724         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25725         in autoconf whereby the expansion of the latter ended up preceding
25726         the expansion of its prerequisite, AC_HEADER_TIME.
25727         Reported by Volker Borchert.
25728
25729 2000-02-03  Jim Meyering  <meyering@lucent.com>
25730
25731         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25732
25733 2000-02-03  Jim Meyering  <meyering@lucent.com>
25734
25735         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25736         rather than with `#if HAVE_UTMPNAME'.
25737
25738 2000-02-02  Jim Meyering  <meyering@lucent.com>
25739
25740         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25741         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25742         Reported by Eli Zaretskii.
25743
25744 2000-02-01  Jim Meyering  <meyering@lucent.com>
25745
25746         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25747
25748 2000-01-31  Jim Meyering  <meyering@lucent.com>
25749
25750         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25751         functions.  Add the time.h and sys/time.h headers along with the
25752         AC_REQUIRE'ment of AC_HEADER_TIME.
25753
25754 2000-01-31  Jim Meyering  <meyering@lucent.com>
25755
25756         * lib/nanosleep.h (nanosleep): Guard declaration with
25757         `#if ! HAVE_DECL_NANOSLEEP'.
25758         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25759         the declaration in that vendor's sys/timers.h.
25760         Reported by Christian Krackowizer.
25761
25762         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25763         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25764         (ISPRINT): Likewise.
25765         Reported by Tom Tromey.
25766
25767 2000-01-30  Jim Meyering  <meyering@lucent.com>
25768
25769         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25770
25771         * m4/prereq.m4 (utmp_includes): Define.
25772         Check for ut_user and ut_name members in both struct utmpx
25773         and struct utmp.
25774
25775 2000-01-30  Jim Meyering  <meyering@lucent.com>
25776
25777         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25778         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25779         header files where only utmpx.ut_user is declared.
25780
25781         * lib/readutmp.h (UT_USER): Define.
25782
25783 2000-01-29  Jim Meyering  <meyering@lucent.com>
25784
25785         * m4/lib-check.m4: New file containing library-related checks from
25786         fileutils and sh-utils (textutils had none).
25787
25788 2000-01-28  Jim Meyering  <meyering@lucent.com>
25789
25790         * m4/perl.m4: Change format of warning message to look more like that
25791         from the missing script.  Suggestion from François Pinard.
25792
25793 2000-01-25  Jim Meyering  <meyering@lucent.com>
25794
25795         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25796         well as time.h in the compile check.
25797         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25798         Fix typo in cross-compiling case: s/yes/no/.
25799
25800 2000-01-23  Jim Meyering  <meyering@lucent.com>
25801
25802         * m4/jm-macros.m4: Move df-related tests here from
25803         fileutils/configure.in
25804
25805         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25806         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25807
25808         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25809         s/space/ac_fsusage_space/.
25810         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25811
25812         * m4/ftruncate.m4: New file (derived from part of
25813         fileutils/configure.in).
25814         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25815         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25816
25817         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25818         AC_SUBST these here, rather than just in sh-util/configure.in, so
25819         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25820         all the same.
25821         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25822         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25823         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25824         (AC_SUBST(POW_LIBM)): Likewise.
25825         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25826
25827 2000-01-23  Jim Meyering  <meyering@lucent.com>
25828
25829         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25830         obstack.c.
25831
25832 2000-01-22  Jim Meyering  <meyering@lucent.com>
25833
25834         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25835
25836         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25837
25838         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25839         configure.in
25840         (AC_CHECK_HEADERS): Likewise for sh-utils.
25841         (AC_CHECK_HEADERS): Likewise for textutils.
25842         Merge the three lists of headers.
25843
25844         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25845         from fileutils' configure.in.
25846
25847         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25848         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25849         check-decl.m4.
25850
25851         * m4/check-decl.m4: Use #if rather than #ifdef.
25852         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25853         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25854         (_jm_DECL_HEADERS): Define new function.
25855         (jm_CHECK_DECLARATIONS): Require it.
25856
25857 2000-01-22  Jim Meyering  <meyering@lucent.com>
25858
25859         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25860         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25861         Required for some AIX systems.  Reported by Christian Krackowizer.
25862         [TESTING] (main): New function.
25863
25864         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25865         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25866         letters.
25867
25868         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25869         iswprint.
25870
25871         * lib/strverscmp.c (ISDIGIT): Define.
25872         (strverscmp): Use ISDIGIT, not isdigit.
25873
25874 2000-01-19  Jim Meyering  <meyering@lucent.com>
25875
25876         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25877         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25878         defines `struct timespec' in <sys/time.h>
25879
25880         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25881         Thanks to Akim for explaining.
25882
25883 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25884
25885         * lib/nanosleep.c (nanosleep):
25886         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25887         POSIX.1 doesn't require SA_INTERRUPT and some systems
25888         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25889         it's been part of POSIX.1 since day 1 (in 1988).
25890
25891 2000-01-17  Jim Meyering  <meyering@lucent.com>
25892
25893         * lib/interlock: Remove unused file.  Reported by François Pinard.
25894
25895 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25896
25897         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25898         alert, backslash, formfeed, and vertical tab unnecessarily in
25899         shell quoting style.
25900
25901 2000-01-16  Jim Meyering  <meyering@lucent.com>
25902
25903         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25904         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25905         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25906         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25907
25908 2000-01-16  Jim Meyering  <meyering@lucent.com>
25909
25910         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25911         because the latter didn't work.
25912
25913 2000-01-15  Jim Meyering  <meyering@lucent.com>
25914
25915         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25916         (AC_REPLACE_FUNCS): Add memcpy and memset.
25917         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25918         Add strpbrk.
25919         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25920
25921 2000-01-12  Jim Meyering  <meyering@lucent.com>
25922
25923         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25924         (jm_PREREQ): Use it.
25925         (jm_PREREQ_READUTMP): New macro.
25926         (jm_PREREQ): Use it.
25927
25928 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25929
25930         Quote multibyte characters correctly.
25931         * m4/c-bs-a.m4: New file.
25932         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25933         (jm_PREREQ): Use it.
25934
25935 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25936
25937         * m4/uintmax_t.m4: Port to autoconf 2.13.
25938
25939 2000-01-08  Jim Meyering  <meyering@ascend.com>
25940
25941         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25942         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25943
25944 2000-01-04  Jim Meyering  <meyering@ascend.com>
25945
25946         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25947         jm_STRUCT_DIRENT_D_TYPE.
25948         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25949         jm_STRUCT_DIRENT_D_INO.
25950         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25951         jm_STRUCT_UTIMBUF.
25952         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25953         renamings.
25954         * m4/utime.m4: Likewise.
25955
25956         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25957         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25958
25959 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25960
25961         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25962         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25963
25964 2000-01-02  Jim Meyering  <meyering@ascend.com>
25965
25966         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25967         remember if this is necessary.
25968
25969 1999-12-26  Jim Meyering  <meyering@ascend.com>
25970
25971         * m4/jm-macros.m4: Use it here.
25972         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25973
25974 1999-12-23  Jim Meyering  <meyering@ascend.com>
25975
25976         * m4/jm-macros.m4: Check for clock_gettime (moved from
25977         fileutils/configure.in)
25978         Check for gettimeofday.
25979
25980 1999-12-20  Jim Meyering  <meyering@ascend.com>
25981
25982         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25983         autoconf-2.14a-1999-12-20.
25984
25985 1999-12-19  Jim Meyering  <meyering@ascend.com>
25986
25987         * m4/lstat-slash.m4: New file.
25988         * m4/jm-macros.m4: Use the new macro:
25989         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25990
25991 1999-12-07  Jim Meyering  <meyering@ascend.com>
25992
25993         * m4/perl.m4: Require that File::Compare be available, too.
25994         Too many systems seem to lack it.
25995
25996         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25997         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25998
25999 1999-11-18  Paul Eggert  <eggert@twinsun.com>
26000
26001         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
26002         problem with the QNX 4.25 shell, which doesn't propagate exit
26003         status of failed commands inside shell assignments.
26004
26005 1999-11-17  Jim Meyering  <meyering@ascend.com>
26006
26007         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
26008
26009 1999-11-07  Jim Meyering  <meyering@ascend.com>
26010
26011         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
26012
26013 1999-11-06  Jim Meyering  <meyering@ascend.com>
26014
26015         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
26016         * m4/jm-macros.m4 (jm_MACROS): Use it here.
26017
26018 1999-11-05  Jim Meyering  <meyering@ascend.com>
26019
26020         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
26021         configure.in of textutils, fileutils, and sh-utils into this one
26022         (shared between those packages) file.
26023         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
26024         AC_STRUCT_ST_BLKSIZE.
26025
26026 1999-11-03  Jim Meyering  <meyering@ascend.com>
26027
26028         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
26029         of AC_CHECK_TYPE checks includes unistd.h.
26030         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
26031         Suggestion from Akim Demaille.
26032
26033 1999-10-30  Jim Meyering  <meyering@ascend.com>
26034
26035         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
26036         m4-quoted string.
26037         * m4/ls-mntd-fs.m4: Likewise.
26038         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
26039         * m4/jm-winsz1.m4: Likewise.
26040
26041         * m4/const.m4: Remove file, since the fix made it into the experimental
26042         version of autoconf.
26043         * m4/mktime.m4: Likewise.
26044
26045         * m4/check-type.m4: Remove file, now that the latest version of
26046         AC_CHECK_TYPE takes a third arg to specify additional #includes.
26047
26048         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
26049         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
26050         AC_CHECK_TYPE.
26051
26052 1999-10-04  Jim Meyering  <meyering@ascend.com>
26053
26054         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
26055
26056 1999-09-22  Paul Eggert  <eggert@twinsun.com>
26057
26058         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
26059         2.95.1 bug with HP-UX 10.20.
26060
26061 1999-09-17  Jim Meyering  <meyering@ascend.com>
26062
26063         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
26064         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
26065         due to missing strdup (against sh-utils-2.0).
26066
26067 1999-08-29  Jim Meyering  <meyering@ascend.com>
26068
26069         * m4/jm-macros.m4: Require jm_BISON.
26070         * m4/bison.m4: New file.
26071
26072 1999-08-17  Paul Eggert  <eggert@twinsun.com>
26073
26074         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
26075         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
26076
26077 1999-08-05  Jim Meyering  <meyering@ascend.com>
26078
26079         * m4/getline.m4: Rename test file from conftestdata to conftest.data
26080         to avoid conflicts with `conftest' on 8+3 filesystems.
26081         Suggestion from Eli Zaretskii.
26082
26083 1999-08-04  Jim Meyering  <meyering@ascend.com>
26084
26085         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
26086         fileutils and sh-utils (textutils's getline test was inadequate).
26087         (AM_FUNC_GETLINE): Run this test.
26088         (AC_CHECK_FUNCS): Check for getdelim.
26089         Reported by Bob Proulx.
26090
26091 1999-08-02  Jim Meyering  <meyering@ascend.com>
26092
26093         * m4/jm-macros.m4: Add a comment.
26094
26095 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26096
26097         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
26098         <inttypes.h> defines strtoumax as a macro (and not as a
26099         function).
26100
26101 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26102
26103         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
26104         that we can shift, multiply and divide unsigned long long
26105         values; Ultrix cc can't do it.
26106
26107 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26108
26109         * m4/mktime.m4: New file, which is a preview of what should appear
26110         in the next public autoconf release.
26111
26112 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26113
26114         * m4/lfs.m4: Remove this file.
26115         * m4/largefile.m4: New file.  It contains the old contents of
26116         lfs.m4, except that all names with prefix AC_LFS have been
26117         changed to use the prefix AC_SYS_LARGEFILE instead, to be
26118         compatible with future autoconf versions.  Also, some minor m4
26119         quoting problems have been fixed.
26120
26121 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26122
26123         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
26124         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
26125         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
26126         and simplify the shell code.
26127
26128 1999-08-01  Jim Meyering  <meyering@ascend.com>
26129
26130         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
26131         m4.
26132
26133 1999-07-20  Jim Meyering  <meyering@ascend.com>
26134
26135         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
26136
26137 1999-07-15  Jim Meyering  <meyering@ascend.com>
26138
26139         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
26140
26141 1999-05-22  Jim Meyering  <meyering@ascend.com>
26142
26143         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
26144
26145 1999-05-20  Jim Meyering  <meyering@ascend.com>
26146
26147         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
26148         Add a colon after each `then' in case $4 is empty.
26149
26150 1999-05-16  Jim Meyering  <meyering@ascend.com>
26151
26152         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
26153
26154 1999-05-10  Jim Meyering  <meyering@ascend.com>
26155
26156         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
26157
26158         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
26159         AC_FUNC_MKTIME.
26160
26161 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
26162
26163         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
26164
26165 1999-05-04  Paul Eggert  <eggert@twinsun.com>
26166
26167         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
26168         not CPPFLAGS, so that linking works correctly in IRIX.
26169
26170 1999-04-30  Paul Eggert  <eggert@twinsun.com>
26171
26172         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
26173
26174 1999-04-20  Paul Eggert  <eggert@twinsun.com>
26175
26176         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
26177         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
26178         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
26179         jm_AC_TYPE_UNSIGNED_LONG_LONG.
26180         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
26181
26182         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
26183
26184 1999-04-20  Jim Meyering  <meyering@ascend.com>
26185
26186         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
26187         AC_REPLACE xstroull if necessary.  From Paul Eggert.
26188         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
26189
26190 1999-04-18  Jim Meyering  <meyering@ascend.com>
26191
26192         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
26193         * m4/jm-macros.m4: Use it.
26194
26195 1999-04-06  Jim Meyering  <meyering@ascend.com>
26196
26197         * m4/strftime.m4: Remove test for %f.
26198
26199 1999-03-29  Jim Meyering  <meyering@ascend.com>
26200
26201         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
26202         superset of the AC_TYPE_* checks in the textutils, fileutils,
26203         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
26204         AC_TYPE_PID_T.
26205
26206 1999-03-28  Jim Meyering  <meyering@ascend.com>
26207
26208         * m4/jm-macros.m4: Define GNU_PACKAGE here.
26209         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
26210         replaced e.g., in the *.sh files of the sh-utils.
26211
26212 1999-03-20  Jim Meyering  <meyering@ascend.com>
26213
26214         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
26215         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
26216         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
26217
26218 1999-03-19  Jim Meyering  <meyering@ascend.com>
26219
26220         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
26221
26222 1999-03-12  Jim Meyering  <meyering@ascend.com>
26223
26224         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
26225
26226 1999-03-07  Jim Meyering  <meyering@ascend.com>
26227
26228         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
26229         declared.
26230
26231 1999-02-17  Jim Meyering  <meyering@ascend.com>
26232
26233         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
26234         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
26235
26236 1999-02-07  Jim Meyering  <meyering@ascend.com>
26237
26238         * m4/group-member.m4: New file -- extracted from sh-utils'
26239         configure.in.
26240
26241         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
26242         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
26243
26244 1999-02-06  Jim Meyering  <meyering@ascend.com>
26245
26246         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26247         * m4/fnmatch.m4: Likewise.
26248         * m4/getgroups.m4: Likewise.
26249         * m4/lstat.m4: Likewise.
26250         * m4/malloc.m4: Likewise.
26251         * m4/putenv.m4: Likewise.
26252         * m4/realloc.m4: Likewise.
26253         * m4/regex.m4: Likewise.
26254         * m4/stat.m4: Likewise.
26255         * m4/strftime.m4: Likewise.
26256         Suggestion from Alain Magloire.
26257
26258         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26259         * m4/fnmatch.m4: Likewise.
26260         * m4/getgroups.m4: Likewise.
26261         * m4/getline.m4: Likewise.
26262         * m4/lstat.m4: Likewise.
26263         * m4/malloc.m4: Likewise.
26264         * m4/memcmp.m4: Likewise.
26265         * m4/putenv.m4: Likewise.
26266         * m4/realloc.m4: Likewise.
26267         * m4/regex.m4: Likewise.
26268         * m4/stat.m4: Likewise.
26269         * m4/strftime.m4: Likewise.
26270         Suggestion from Alain Magloire.
26271
26272         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26273         an argument.
26274
26275         * m4/regex.m4: Add a run-time Test for proper operation of
26276         re_compile_pattern.
26277
26278 1999-01-31  Jim Meyering  <meyering@ascend.com>
26279
26280         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26281
26282 1999-01-30  Jim Meyering  <meyering@ascend.com>
26283
26284         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26285
26286         * m4/jm-mktime.m4: Make this a wrapper around the official
26287         AM_FUNC_MKTIME rather than my private copy, now that the official one
26288         is up to date.
26289         * m4/mktime.m4: Remove file.
26290
26291         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26292         * m4/uptime.m4: Likewise.
26293         * m4/uintmax_t.m4: Likewise.
26294
26295 1999-01-28  Jim Meyering  <meyering@ascend.com>
26296
26297         * m4/jm-macros.m4: Use jm_AFS.
26298         * m4/afs.m4: New file (from fileutils' configure.in).
26299
26300         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26301         * m4/chown.m4: Likewise.
26302         * m4/d-ino.m4: Likewise.
26303         * m4/d-type.m4: Likewise.
26304         * m4/fnmatch.m4: Likewise.
26305         * m4/getgroups.m4: Likewise.
26306         * m4/gettext.m4: Likewise.
26307         * m4/jm-mktime.m4: Likewise.
26308         * m4/jm-winsz2.m4: Likewise.
26309         * m4/lcmessage.m4: Likewise.
26310         * m4/ls-mntd-fs.m4: Likewise.
26311         * m4/malloc.m4: Likewise.
26312         * m4/memcmp.m4: Likewise.
26313         * m4/putenv.m4: Likewise.
26314         * m4/realloc.m4: Likewise.
26315         * m4/st_mtim.m4: Likewise.
26316         * m4/strftime.m4: Likewise.
26317
26318 1999-01-16  Jim Meyering  <meyering@ascend.com>
26319
26320         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26321         (ARGMATCH_DIE_DECL): Define.
26322
26323 1999-01-12  Jim Meyering  <meyering@ascend.com>
26324
26325         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26326         Reported by Lars Hecking.
26327
26328 1999-01-10  Jim Meyering  <meyering@ascend.com>
26329
26330         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26331         gross kludge.
26332         * m4/inttypes_h.m4: Likewise.
26333         * m4/lstat.m4: Likewise.
26334         * m4/malloc.m4: Likewise.
26335         * m4/readdir.m4: Likewise.
26336         * m4/realloc.m4: Likewise.
26337         * m4/st_dm_mode.m4: Likewise.
26338         * m4/stat.m4: Likewise.
26339         * m4/utimbuf.m4: Likewise.
26340         * m4/utimes.m4: Likewise.
26341
26342         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26343         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26344         comments in config.h.in are meaningful.
26345
26346         * m4/jm-macros.m4: Require autoconf-2.13 here.
26347
26348         * m4/regex.m4: By default, don't use the included regex.c on systems
26349         with glibc 2.  Suggestion from Uli Drepper.
26350
26351 1999-01-02  Jim Meyering  <meyering@ascend.com>
26352
26353         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26354
26355 1998-12-18  Jim Meyering  <meyering@ascend.com>
26356
26357         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26358         Based on a suggestion from Lars Hecking.
26359
26360 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26361
26362         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26363
26364 1998-11-16  Jim Meyering  <meyering@ascend.com>
26365
26366         * m4/lfs.m4: Double-quote the `uname...` expression.
26367
26368 1998-11-14  Jim Meyering  <meyering@ascend.com>
26369
26370         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26371         * m4/stat.m4: Likewise.
26372
26373 1998-11-03  Jim Meyering  <meyering@ascend.com>
26374
26375         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26376         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26377
26378 1998-10-18  Jim Meyering  <meyering@ascend.com>
26379
26380         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26381
26382 1998-10-17  Jim Meyering  <meyering@ascend.com>
26383
26384         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26385         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26386         calls for those previously hard-coded headers.  Instead, take a new
26387         parameter.
26388         (jm_CHECK_DECLARATIONS): Reflect interface change.
26389         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26390         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26391
26392         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26393
26394 1998-10-14  Jim Meyering  <meyering@ascend.com>
26395
26396         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26397         instead of "TZ=America/Vancouver".  From Paul Eggert.
26398
26399 1998-10-11  Jim Meyering  <meyering@ascend.com>
26400
26401         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26402         This adds a test for a recently added compatibility fix for mktime.c.
26403         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26404
26405 1998-09-27  Jim Meyering  <meyering@ascend.com>
26406
26407         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26408
26409         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26410         ../configure.in, including a change from Gordon Matzigkeit to allow
26411         cross-compiling for the Hurd.
26412
26413         * m4/glibc.m4: New file/macro to test for the GNU C Library
26414         versions 1 and 2.  From Gordon Matzigkeit.
26415         Indent.
26416
26417 1998-09-21  Jim Meyering  <meyering@ascend.com>
26418
26419         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26420
26421 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26422
26423         Port nanosecond-resolution times to UnixWare 2.1.2 and
26424         pedantic Solaris 2.6.
26425
26426         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26427         AC_STRUCT_ST_MTIM.
26428         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26429         Generate name of ns member, instead of just 1 or undef.
26430         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26431
26432 1998-08-15  Jim Meyering  <meyering@ascend.com>
26433
26434         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26435         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26436         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26437         instead of jm_TYPE_SSIZE_T.
26438
26439 1998-08-12  Jim Meyering  <meyering@ascend.com>
26440
26441         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26442
26443 1998-08-02  Jim Meyering  <meyering@ascend.com>
26444
26445         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26446         in acconfig.h manually.
26447
26448 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26449
26450         * m4/st_mtim.m4: New file.
26451
26452 1998-07-28  Jim Meyering  <meyering@ascend.com>
26453
26454         * m4/utimes.m4: Undef stat.
26455
26456 1998-07-25  Jim Meyering  <meyering@ascend.com>
26457
26458         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26459         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26460
26461 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26462
26463         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26464         uid and gid actually remain unchanged.
26465
26466 1998-07-07  Jim Meyering  <meyering@ascend.com>
26467
26468         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26469
26470 1998-07-04  Jim Meyering  <meyering@ascend.com>
26471
26472         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26473         to prove that this macro can be used in packages without regex.c.
26474
26475 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26476
26477         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26478         is to be used.
26479
26480 1998-07-03  Jim Meyering  <meyering@ascend.com>
26481
26482         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26483
26484         * m4/gettext.m4: New file -- from gettext-0.10.35.
26485         * m4/lcmessage.m4: Likewise.
26486         * m4/progtest.m4: Likewise.
26487
26488         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26489         * m4/jm-macros.m4: Require the new macro.
26490
26491 1998-06-29  Jim Meyering  <meyering@ascend.com>
26492
26493         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26494         for the definition of NGROUPS (used in a system header included
26495         by sys/mount.h).
26496
26497 1998-06-28  Jim Meyering  <meyering@ascend.com>
26498
26499         * m4/ls-mntd-fs.m4: New file.
26500         * m4/fstypename.m4: New file.
26501
26502         * m4/jm-macros.m4: Require the new macro.
26503         * m4/jm-glibc-io.m4: New file.
26504
26505 1998-05-19  Jim Meyering  <meyering@ascend.com>
26506
26507         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26508         * m4/lchown.m4: New file.
26509
26510         * m4/Makefile.am.in: New file.
26511         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26512
26513 1998-05-14  Jim Meyering  <meyering@ascend.com>
26514
26515         * m4/Makefile.am (EXTRA_DIST): Add them.
26516         * m4/jm-macros.m4: New file.
26517         * m4/utimbuf.m4: New file.
26518
26519 1998-05-12  Jim Meyering  <meyering@ascend.com>
26520
26521         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26522
26523 1998-05-11  Jim Meyering  <meyering@ascend.com>
26524
26525         * m4/isc-posix.m4: New file.
26526
26527 1998-05-10  Jim Meyering  <meyering@ascend.com>
26528
26529         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26530
26531 1998-05-09  Jim Meyering  <meyering@ascend.com>
26532
26533         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26534         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26535         with automake.
26536
26537         * m4/ssize_t.m4: New file.
26538         * m4/mktime.m4: Remove file -- the new automake has this now.
26539
26540 1998-04-26  Jim Meyering  <meyering@ascend.com>
26541
26542         * m4/assert.m4: New file.
26543         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26544
26545 1998-04-05  Jim Meyering  <meyering@ascend.com>
26546
26547         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26548         (jm_PREREQ): Use it here.
26549
26550 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26551
26552         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26553         in acconfig.h.
26554
26555 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26556
26557         * m4/prereq.m4: New file.
26558         * m4/error.m4: New file.
26559         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26560
26561 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26562
26563         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26564         cache-check for the same variable -- that defeated the purpose of
26565         the test; the test program was never run.  This was a problem only
26566         on systems with losing getline functions -- HP-UX 10.20 is one.
26567         Reported by Bjorn Helgaas.
26568
26569 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26570
26571         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26572
26573 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26574
26575         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26576
26577         * m4/const.m4: New file.  Use an initializer in this declaration
26578         typedef int charset[2]; const charset x;
26579         Reported by Bob Glickstein.
26580
26581 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26582
26583         * m4/chown.m4: Fix reversed types on -1 args to chown.
26584         From Kaveh Ghazi.
26585
26586 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26587
26588         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26589         Add lseek and memchr.
26590
26591         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26592         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26593         have a 20-character limit on names.
26594
26595 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26596
26597         * m4/inttypes_h.m4: New file.
26598         * m4/uintmax_t.m4: New file.
26599         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26600
26601 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26602   Free Software Foundation, Inc.
26603 Copying and distribution of this file, with or without modification,
26604 are permitted provided the copyright notice and this notice are preserved.