6b575717b4c8b5fab1efb04a001b6873f79a50a1
[gnulib.git] / ChangeLog
1 2007-02-05  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * m4/regex.m4 (gl_REGEX): Check for glibc bug #3957.
4         Prefer returning from main to exiting from it.
5         Remove unnecessary parens after sizeof.
6
7 2007-02-05  Bruno Haible  <bruno@clisp.org>
8
9         New module mbssep.
10         * modules/mbssep: New file.
11         * lib/mbssep.c: New file.
12         * lib/string_.h (strsep): Add a conditional link warning.
13         (mbssep): New declaration.
14         * m4/mbssep.m4: New file.
15         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
16         GNULIB_MBSSEP.
17         * modules/string (string.h): Also substitute GNULIB_MBSSEP.
18         * MODULES.html.sh (Internationalization functions): Add mbssep.
19
20 2007-02-05  Bruno Haible  <bruno@clisp.org>
21
22         * lib/strsep.c (strsep): Fix actions in case of no delimiters.
23         Optimize search in case of 1 delimiter.
24
25 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
26
27         * lib/acl.h: Include sys/types.h before sys/acl.h.
28
29 2007-02-05  Paolo Bonzini  <bonzini@gnu.org>
30
31         Merge upstream fix for glibc bugzilla #3957:
32
33         2007-02-05  Jakub Jelinek  <jakub@redhat.com>
34
35         * lib/regcomp.c (parse_bracket_exp): Set '\n' bit rather than '\0'
36         bit for RE_HAT_LISTS_NOT_NEWLINE.
37         (build_charclass_op): Remove bogus comment.
38
39 2007-02-05  Simon Josefsson  <simon@josefsson.org>
40
41         * lib/gc.h, lib/gc-libgcrypt.c: Support SHA-256/384/512.
42
43 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
44
45         * lib/getsubopt.c [!_LIBC]: Include config.h and getsubopt.h.
46         * lib/memmem.c [!defined _LIBC]: Include config.h.
47
48 2007-02-04  Bruno Haible  <bruno@clisp.org>
49
50         * lib/string_.h (GL_LINK_WARNING2): Put the word "warning:" into the
51         warning message.
52
53 2007-02-04  Bruno Haible  <bruno@clisp.org>
54
55         New module mbstok_r.
56         * modules/mbstok_r: New file.
57         * lib/mbstok_r.c: New file.
58         * lib/string_.h (strtok_r): Change argument names to match the
59         comments. Add a conditional link warning.
60         (mbstok_r): New declaration.
61         * m4/mbstok_r.m4: New file.
62         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
63         GNULIB_MBSTOK_R.
64         * modules/string (string.h): Also substitute GNULIB_MBSTOK_R.
65         * MODULES.html.sh (Internationalization functions): Add mbstok_r.
66
67 2007-02-04  Bruno Haible  <bruno@clisp.org>
68
69         New module mbsspn.
70         * modules/mbsspn: New file.
71         * lib/mbsspn.c: New file.
72         * lib/string_.h (strspn): Add a conditional link warning.
73         (mbsspn): New declaration.
74         * m4/mbsspn.m4: New file.
75         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
76         GNULIB_MBSSPN.
77         * modules/string (string.h): Also substitute GNULIB_MBSSPN.
78         * MODULES.html.sh (Internationalization functions): Add mbsspn.
79
80 2007-02-04  Bruno Haible  <bruno@clisp.org>
81
82         New module mbspbrk.
83         * modules/mbspbrk: New file.
84         * lib/mbspbrk.c: New file.
85         * lib/string_.h (strpbrk): Add a conditional link warning.
86         (mbspbrk): New declaration.
87         * m4/mbspbrk.m4: New file.
88         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
89         GNULIB_MBSPBRK.
90         * modules/string (string.h): Also substitute GNULIB_MBSPBRK.
91         * MODULES.html.sh (Internationalization functions): Add mbspbrk.
92
93 2007-02-04  Bruno Haible  <bruno@clisp.org>
94
95         New module mbscspn.
96         * modules/mbscspn: New file.
97         * lib/mbscspn.c: New file.
98         * lib/string_.h (strcspn): Add a conditional link warning.
99         (mbscspn): New declaration.
100         * m4/mbscspn.m4: New file.
101         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
102         GNULIB_MBSCSPN.
103         * modules/string (string.h): Also substitute GNULIB_MBSCSPN.
104         * MODULES.html.sh (Internationalization functions): Add mbscspn.
105
106 2007-02-04  Bruno Haible  <bruno@clisp.org>
107
108         New module mbscasestr, reduced goal of strcasestr.
109         * modules/mbscasestr: New file.
110         * lib/mbscasestr.c: New file, copied from lib/strcasestr.c.
111         (mbscasestr): Renamed from strcasestr.
112         * lib/strcasestr.c: Don't include mbuiter.h.
113         (strcasestr): Remove support for multibyte locales.
114         * lib/string_.h (strcasestr): Don`t rename. Declare only if missing.
115         Change the conditional link warning.
116         (mbscasestr): New declaration.
117         * m4/mbscasestr.m4: New file.
118         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Enable the replacement only if
119         the system does not have strcasestr. Set HAVE_STRCASESTR instead of
120         REPLACE_STRCASESTR.
121         (gl_PREREQ_STRCASESTR): Don't require gl_FUNC_MBRTOWC.
122         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
123         HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
124         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSCASESTR.
125         * modules/string (string.h): Also substitute GNULIB_MBSCASESTR.
126         Substitute HAVE_STRCASESTR instead of REPLACE_STRCASESTR.
127         * modules/strcasestr (Files): Remove m4/mbrtowc.m4.
128         (Depends-on): Remove mbuiter.
129         * MODULES.html.sh (Internationalization functions): Add mbscasestr.
130
131 2007-02-04  Bruno Haible  <bruno@clisp.org>
132
133         Simplify handling of strncasecmp.
134         * lib/string_.h (strncasecmp): Remove test for GNULIB_STRCASE. Change
135         the conditional link warning.
136         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Initialize
137         HAVE_STRCASECMP, not REPLACE_STRCASECMP.
138         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Don't initialize GNULIB_STRCASE.
139         * modules/strcase (configure.ac): Don't invoke
140         gl_STRING_MODULE_INDICATOR.
141         * modules/string (string.h): Don't substitute GNULIB_STRCASE.
142
143 2007-02-04  Bruno Haible  <bruno@clisp.org>
144
145         New module mbscasecmp, reduced goal of strcasecmp.
146         * modules/mbscasecmp: New file.
147         * lib/mbscasecmp.c: New file, copied from lib/strcasecmp.c.
148         (mbscasecmp): Renamed from strcasecmp.
149         * lib/strcasecmp.c: Don't include mbuiter.h.
150         (strcasecmp): Remove support for multibyte locales.
151         * lib/string_.h (strcasecmp): Don`t rename. Declare only if missing.
152         Change the conditional link warning.
153         (mbscasecmp): New declaration.
154         * m4/mbscasecmp.m4: New file.
155         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Enable the replacement only if
156         the system lacks strcasecmp. Set HAVE_STRCASECMP instead of
157         REPLACE_STRCASECMP.
158         (gl_PREREQ_STRCASECMP): Don't require gl_FUNC_MBRTOWC.
159         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
160         GNULIB_MBSCASECMP.
161         * modules/string (string.h): Also substitute GNULIB_MBSCASECMP.
162         Substitute HAVE_STRCASECMP instead of REPLACE_STRCASECMP.
163         * modules/strcase (Files): Remove m4/mbrtowc.m4.
164         (Depends-on): Remove mbuiter.
165         * MODULES.html.sh (Internationalization functions): Add mbscasecmp.
166
167 2007-02-04  Bruno Haible  <bruno@clisp.org>
168
169         New module mbsstr. Remove module strstr.
170         * modules/mbsstr: New file.
171         * modules/strstr: Remove file.
172         * lib/mbsstr.c: Renamed from lib/strstr.c.
173         (mbsstr): Renamed from strstr.
174         * lib/string_.h (strstr): Remove declaration. Change the conditional
175         link warning.
176         (mbsstr): New declaration.
177         * m4/mbsstr.m4: New file.
178         * m4/strstr.m4: Remove file.
179         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): Don't initialize
180         REPLACE_STRSTR.
181         (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize GNULIB_MBSSTR.
182         Don't initialize GNULIB_STRSTR.
183         * modules/string (string.h): Also substitute GNULIB_MBSSTR. Don't
184         substitute GNULIB_STRSTR and REPLACE_STRSTR.
185         * MODULES.html.sh (Internationalization functions): Add mbsstr.
186         (Support for systems lacking ANSI C 89): Remove strstr.
187
188 2007-02-04  Bruno Haible  <bruno@clisp.org>
189
190         New module mbsrchr.
191         * modules/mbsrchr: New file.
192         * lib/mbsrchr.c: New file.
193         * lib/string_.h (strrchr): Add a conditional link warning.
194         (mbsrchr): New declaration.
195         * m4/mbsrchr.m4: New file.
196         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
197         GNULIB_MBSRCHR.
198         * modules/string (string.h): Also substitute GNULIB_MBSRCHR.
199         * MODULES.html.sh (Internationalization functions): Add mbsrchr.
200
201 2007-02-04  Bruno Haible  <bruno@clisp.org>
202
203         New module mbschr.
204         * modules/mbschr: New file.
205         * lib/mbschr.c: New file.
206         * lib/string_.h (strchr): Add a conditional link warning.
207         (mbschr): New declaration.
208         * m4/mbschr.m4: New file.
209         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR_DEFAULTS): Initialize
210         GNULIB_MBSCHR.
211         * modules/string (string.h): Also substitute GNULIB_MBSCHR.
212         * MODULES.html.sh (Internationalization functions): Add mbschr.
213
214 2007-02-04  Paul Eggert  <eggert@cs.ucla.edu>
215
216         * lib/stdbool_.h: Mention that bool bit-fields aren't supported.
217
218         * modules/stdarg (configure.ac-early): Require AC_PROG_CC_STDC.
219
220 2007-02-04  Bruno Haible  <bruno@clisp.org>
221
222         New module description section 'configure.ac-early'.
223         * gnulib-tool (sed_extract_prog): Recognize configure.ac-early.
224         (func_get_autoconf_early_snippet): New function.
225         (func_import, func_create_testdir): Use it. Remove special cases for
226         modules 'extensions' and 'lock'.
227         * modules/extensions (configure.ac-early): Require
228         gl_USE_SYSTEM_EXTENSIONS.
229         * modules/lock (configure.ac-early): Require gl_LOCK_EARLY.
230
231 2007-02-04  Bruno Haible  <bruno@clisp.org>
232
233         Make use of gcj-4.3's -fsource and -ftarget option.
234         * m4/javacomp.m4 (gt_JAVACOMP): Test whether gcj is in version >= 4.3,
235         and if so try the options -fsource and -ftarget.
236         * lib/javacomp.c (compile_using_gcj): Add fsource_option,
237         source_version, ftarget_option, target_version arguments.
238         (is_envjavac_gcj43, is_envjavac_gcj43_usable): New functions.
239         (is_envjavac_oldgcj_14_14_usable): Renamed from
240         is_envjavac_gcj_14_14_usable.
241         (is_envjavac_oldgcj_14_13_usable): Renamed from
242         is_envjavac_gcj_14_13_usable.
243         (is_gcj_present): Update.
244         (is_gcj_43, is_gcj43_usable): New functions.
245         (is_oldgcj_14_14_usable): Renamed from is_gcj_14_14_usable. Update.
246         (is_oldgcj_14_13_usable): Renamed from is_gcj_14_13_usable. Update.
247         (compile_java_class): Test whether gcj is in version >= 4.3, and if so
248         try the options -fsource and -ftarget.
249
250 2007-02-03  Paul Eggert  <eggert@cs.ucla.edu>
251
252         * lib/xalloc.h (x2nrealloc): Fix an unlikely bug in the overflow
253         checking code.  Set N = ceil (1.5 * N) rather than to a slightly
254         larger value.
255
256 2007-02-03  Jim Meyering  <jim@meyering.net>
257
258         Give tools a better chance to allocate space for very large buffers.
259         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
260
261         Make pwd and readlink work also when run with an unreadable parent dir
262         on systems with openat support.
263         * lib/getcwd.c (__getcwd) [HAVE_PARTLY_WORKING_GETCWD]: Use the system
264         provided getcwd function, even when we have openat support.
265         Reported by Dmitry V. Levin in <http://bugzilla.redhat.com/227168>.
266
267 2007-02-02  Bruno Haible  <bruno@clisp.org>
268
269         * lib/string_.h (memmem, mempcpy, memrchr, stpcpy, stpncpy, strchrnul,
270         strdup, strndup, strnlen, strpbrk, strsep, strtok_r): Provoke a link
271         error only if GNULIB_POSIXCHECK is defined. Needed to avoid artificial
272         portability problems if one of these functions is only used on specific
273         platforms.
274         Reported by Paul Eggert.
275
276 2007-02-02  Paul Eggert  <eggert@cs.ucla.edu>
277
278         Avoid mempcpy in the regex code, as the string.h mempcpy stuff
279         is causing more trouble than it's curing.
280         * lib/regex_internal.h (__mempcpy): Remove.
281         * lib/regcomp.c (regerror): Rewrite to avoid the need for mempcpy
282         (and make the code a tad smaller to boot).
283         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for mempcpy.
284
285 2007-02-02  Jim Meyering  <jim@meyering.net>
286
287         * modules/arpa_inet: Put AC_PROG_MKDIR_P in the configure.ac:
288         section, not in the Makefile.am: one.
289
290 2007-02-02  Eric Blake  <ebb9@byu.net>
291
292         * lib/strchrnul.c: Always include config.h first.
293
294         * modules/mountlist (Depends-on): Revert 2007-01-31 change,
295         gnulib strstr is not necessary here.
296
297 2007-02-02  Simon Josefsson  <simon@josefsson.org>
298
299         * m4/socklen.m4: Fix typo.
300
301 2007-02-02  Eric Blake  <ebb9@byu.net>
302
303         * modules/arpa_inet (Makefile.am): Use MKDIR_P to avoid races.
304         * modules/netinet_in (Makefile.am): Likewise.
305
306 2007-02-01  Bruno Haible  <bruno@clisp.org>
307
308         * lib/string_.h (GL_LINK_WARNING): New macro.
309         (strcasecmp, strstr, strcasestr): If provided by the system,
310         conditionally define as a macro that leads to a warning instead of to
311         an error.
312         (strncasecmp): Conditionally define as a macro that leads to a warning.
313
314 2007-02-01  Jim Meyering  <jim@meyering.net>
315
316         Give tools a better chance to allocate space for very large buffers.
317         * lib/xalloc.h (x2nrealloc): Use 3/2, not 2, as buffer size factor.
318
319 2007-02-01  Karl Berry  <karl@gnu.org>
320
321         * config/srclist.txt (strtok_r.c): lose sync, no more strtok_r.h.
322
323 2007-02-01  Bruno Haible  <bruno@clisp.org>
324
325         * MODULES.html.sh (Unicode string functions): Update after 2007-01-27
326         renamings.
327
328 2007-02-01  Eric Blake  <ebb9@byu.net>
329
330         * modules/regex (Depends-on): Revert dependence on mempcpy.
331         * lib/regex_internal.h [! _LIBC && !__mempcpy]: Undo string
332         module's definition of mempcpy.
333         Reported by Paul Eggert.
334
335 2007-02-01  Paul Eggert  <eggert@cs.ucla.edu>
336
337         * lib/string_.h: If the gnulib module XYZ is not present, undefine
338         the symbol XYZ before redefining it.  This fixes a problem with
339         programs that don't use XYZ, when compiled on systems that define
340         XYZ to something else.
341
342 2007-01-31  Paul Eggert  <eggert@cs.ucla.edu>
343
344         * lib/mkdir-p.c (make_dir_parents): Close a race condition that
345         occurs when "mkdir -m foo" creates a setgid directory that is (1)
346         writeable to group or other and (2) is intended to have a special
347         mode bit that is set or cleared.  In such a case, the directory
348         should be neither group- nor other-writeable until the special
349         mode bits are right.
350
351 2007-01-31  Eric Blake  <ebb9@byu.net>
352
353         * modules/mountlist (Depends-on): Add strstr.
354
355         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): Correct m4 usage
356         bug.
357         * modules/string (Makefile.am): Remove redundant replacement.
358         * modules/regex (Depends-on): Add mempcpy.
359
360 2007-01-31  Bruno Haible  <bruno@clisp.org>
361
362         New module description field 'Link'.
363         * gnulib-tool (func_usage): Document --extract-link-directive.
364         (sed_extract_prog): Recognize 'Link' directive.
365         (func_get_link_directive): New function.
366         (func_import): Show summary of link directives.
367         Handle --extract-link-directive option.
368         * modules/acl (Link): New section.
369         * modules/clock-time (Link): New section.
370         * modules/euidaccess (Link): New section.
371         * modules/gettext (Link): New section.
372         * modules/iconv (Link): New section.
373         * modules/lock (Link): New section.
374         * modules/nanosleep (Link): New section.
375         * modules/readline (Link): New section.
376
377 2007-01-27  Bruno Haible  <bruno@clisp.org>
378
379         Enforce the use of gnulib modules for unportable <string.h> functions.
380         * m4/string_h.m4 (gl_STRING_MODULE_INDICATOR): New macro.
381         (gl_STRING_MODULE_INDICATOR_DEFAULTS): New macro.
382         (gl_HEADER_STRING_H_BODY): Require it.
383         * lib/string_.h: If the gnulib module XYZ is not present, redefine
384         the symbol XYZ to one that gives a link error.
385         * modules/string (Makefile.am): Also substitute the GNULIB_* variables.
386         * modules/memmem (configure.ac): Invoke gl_STRING_MODULE_INDICATOR.
387         * modules/mempcpy (configure.ac): Likewise.
388         * modules/memrchr (configure.ac): Likewise.
389         * modules/stpcpy (configure.ac): Likewise.
390         * modules/stpncpy (configure.ac): Likewise.
391         * modules/strcase (configure.ac): Likewise.
392         * modules/strcasestr (configure.ac): Likewise.
393         * modules/strchrnul (configure.ac): Likewise.
394         * modules/strdup (configure.ac): Likewise.
395         * modules/strndup (configure.ac): Likewise.
396         * modules/strnlen (configure.ac): Likewise.
397         * modules/strpbrk (configure.ac): Likewise.
398         * modules/strsep (configure.ac): Likewise.
399         * modules/strstr (configure.ac): Likewise.
400         * modules/strtok_r (configure.ac): Likewise.
401
402 2007-01-31  Jean-Louis Martineau  <martineau@zmanda.com>  (tiny change)
403
404         * lib/gai_strerror.c (values): Add EAI_OVERFLOW.
405
406 2007-01-30  Jim Meyering  <jim@meyering.net>
407
408         * lib/mpsort.c (mpsort): Remove spurious "return" in void function.
409
410 2007-01-29  Bruno Haible  <bruno@clisp.org>
411
412         * lib/allocsa.h: Use '#if HAVE_*' instead of '#ifdef HAVE_*'.
413         * lib/execute.c: Likewise.
414         * lib/pipe.c: Likewise.
415         * lib/printf-args.h: Likewise.
416         * lib/printf-args.c: Likewise.
417         * lib/printf-parse.c: Likewise.
418         * lib/vasnprintf.c: Likewise.
419
420 2007-01-29  Eric Blake  <ebb9@byu.net>
421
422         * lib/memrchr.c: Assume <string.h> unconditionally, to pull in
423         declaration.
424
425 2007-01-29  Paul Eggert  <eggert@cs.ucla.edu>
426
427         * lib/strptime.h (strptime): Use 'restrict' for args where
428         POSIX requires this.
429         * lib/strptime.c (strptime): Likewise.
430         Change license notice from LGPL to GPL, since gnulib-tool will
431         change this as needed.
432         Include <config.h> if _LIBC is not defined, not if HAVE_CONFIG_H is
433         defined.
434         Include "strptime.h" first, to check interface.
435         Do not #undef _LIBC and _NL_CURRENT.
436         Do not include <stdlib.h>; no longer needed.
437         Include "time_r.h" and declare ptime_locale_status
438         only if _LIBC is not defined.
439         (__P): Remove unused macro.
440         (match_string): Bring back glibc version, but use it only if _LIBC
441         is defined.
442         (__strptime_internal): Compile tm_gmtoff code if _LIBC is defined, too.
443         Remove unnecessary assertion and abort() call.
444         Use #ifdef _NL_CURRENT rather than #if 0, for benefit of glibc.
445         * m4/strptime.m4: Fix serial number comment.
446         (gl_FUNC_STRPTIME): Require AC_C_RESTRICT, gl_TM_GMTOFF.
447         * modules/strptime (Files): Add m4/tm_gmtoff.m4.
448         (Depends-on): Add time_r.
449
450 2007-01-29  Bruno Haible  <bruno@clisp.org>
451
452         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
453         strptime.
454         * modules/strptime (Depends-on): Add stdbool.
455         * lib/strptime.h: Include <time.h> always. Add comments.
456
457 2007-01-29  Yoann Vandoorselaere  <yoann@prelude-ids.org>
458
459         * modules/strptime: New file.
460         * lib/strptime.h: New file.
461         * lib/strptime.c: New file.
462         * m4/strptime.m4: New file.
463
464 2007-01-28  Paul Eggert  <eggert@cs.ucla.edu>
465
466         * MODULES.html.sh: New module mpsort.
467         * lib/mpsort.c, lib/mpsort.h, m4/mpsort.m4, modules/mpsort: New files.
468
469         * lib/regex.h (_Restrict_): Renamed from __restrict, to avoid
470         a circularity problem with HP-UX ia64 reported by Bob Proulx in
471         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00394.html>.
472         All uses changed.
473         (_Restrict_arr_): Renamed from __restrict_arr, for similar reasons.
474         All uses changed.
475         * lib/regcomp.c, lib/regexec.c: Change all uses from __restrict
476         to _Restrict_.
477         * lib/regexec.c (regexec): Declare pmatch with _Restrict_arr_, so that
478         the parameter matches the prototype.
479
480 2007-01-28  Jim Meyering  <jim@meyering.net>
481
482         * modules/sys_time (Makefile.am) [MOSTLYCLEANFILES]: Do use
483         sys/time.h here, reverting that part of the previous patch:
484         <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/8959>.
485
486 2007-01-28  Bruno Haible  <bruno@clisp.org>
487
488         * modules/sys_time (Makefile.am): Build sys/time.h only when it's the
489         value of $(SYS_TIME_H).
490         [MOSTLYCLEANFILES]: Now that sys/time.h is created only when needed,
491         remove it conditionally, too. [added by Jim Meyering]
492         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Set SYS_TIME_H.
493         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
494         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Set SYS_TIME_H when setting
495         GETTIMEOFDAY_REPLACEMENT to 1.
496
497 2007-01-28  Bruno Haible  <bruno@clisp.org>
498
499         * m4/unistd_h.m4 (gl_HEADER_UNISTD_DEFAULTS): New macro.
500         (gl_HEADER_UNISTD): Require it. Don't set UNISTD_H to empty here.
501         * m4/fchdir.m4 (gl_FUNC_FCHDIR): Require gl_HEADER_UNISTD_DEFAULTS.
502         Set UNISTD_H instead of UNISTD_H2.
503         * modules/fchdir (BUILT_SOURCES): Drop $(UNISTD_H2).
504
505 2007-01-28  Bruno Haible  <bruno@clisp.org>
506
507         * modules/mbchar (Makefile.am): Add mbchar.c to lib_SOURCES.
508         * m4/mbchar.m4 (gl_MBCHAR): Remove AC_LIBOBJ invocation.
509
510 2007-01-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
511
512         * gnulib-tool (func_emit_lib_Makefile_am, func_add_or_update)
513         (func_create_testdir): Ensure C locale for `grep' and `tr'
514         character ranges.
515         (func_create_megatestdir): Avoid one `grep'.  Fix bug in
516         ACLOCAL_AMFLAGS parsing state machine.
517
518 2007-01-27  Bruno Haible  <bruno@clisp.org>
519
520         * modules/unistr/base: Update.
521
522 2007-01-27  Bruno Haible  <bruno@clisp.org>
523
524         Rename u32-mbtouc -> u32-mbtouc-unsafe, u32-mbtouc-safe -> u32-mbtouc,
525         u32_mbtouc -> u32_mbtouc_unsafe, u32_mbtouc_safe -> u32_mbtouc.
526         * modules/unistr/u32-mbtouc-unsafe: Renamed from
527         modules/unistr/u32-mbtouc.
528         * lib/unistr/u32-mbtouc-unsafe.c: Renamed from lib/unistr/u32-mbtouc.c.
529         * lib/unistr.h: Update.
530         * lib/linebreak.c: Update.
531         * modules/unistr/u32-mbtouc: Renamed from
532         modules/unistr/u32-mbtouc-safe.
533         * lib/unistr/u32-mbtouc.c: Renamed from lib/unistr/u32-mbtouc-safe.c.
534         * lib/unistr.h: Update.
535         * lib/unistr/u32-to-u8.c: Update.
536         * lib/unistr/u32-to-u16.c: Update.
537
538 2007-01-27  Bruno Haible  <bruno@clisp.org>
539
540         Rename utf16-ucs4 -> utf16-ucs4-unsafe, utf16-ucs4-safe -> utf16-ucs4,
541         u16_mbtouc -> u16_mbtouc_unsafe, u16_mbtouc_safe -> u16_mbtouc.
542         * modules/utf16-ucs4-unsafe: Renamed from modules/utf16-ucs4.
543         * lib/utf16-ucs4-unsafe.h: Renamed from lib/utf16-ucs4.h.
544         * lib/unistr/utf16-ucs4-unsafe.c: Renamed from lib/unistr/utf16-ucs4.c.
545         * modules/unistr/u16-mbtouc-unsafe: Renamed from
546         modules/unistr/u16-mbtouc.
547         * lib/unistr/u16-mbtouc-unsafe.c: Renamed from lib/unistr/u16-mbtouc.c.
548         * lib/unistr.h: Update.
549         * lib/linebreak.c: Update.
550         * modules/linebreak: Update.
551         * modules/utf16-ucs4: Renamed from modules/utf16-ucs4-safe.
552         * lib/utf16-ucs4.h: Renamed from lib/utf16-ucs4-safe.h.
553         * lib/unistr/utf16-ucs4.c: Renamed from lib/unistr/utf16-ucs4-safe.c.
554         * modules/unistr/u16-mbtouc: Renamed from
555         modules/unistr/u16-mbtouc-safe.
556         * lib/unistr/u16-mbtouc.c: Renamed from lib/unistr/u16-mbtouc-safe.c.
557         * lib/unistr.h: Update.
558         * lib/unistr/u16-to-u8.c: Update.
559         * modules/unistr/u16-to-u8: Update.
560         * lib/unistr/u16-to-u32.c: Update.
561         * modules/unistr/u16-to-u32: Update.
562
563 2007-01-27  Bruno Haible  <bruno@clisp.org>
564
565         Rename utf8-ucs4 -> utf8-ucs4-unsafe, utf8-ucs4-safe -> utf8-ucs4,
566         u8_mbtouc -> u8_mbtouc_unsafe, u8_mbtouc_safe -> u8_mbtouc.
567         * modules/utf8-ucs4-unsafe: Renamed from modules/utf8-ucs4.
568         * lib/utf8-ucs4-unsafe.h: Renamed from lib/utf8-ucs4.h.
569         * lib/unistr/utf8-ucs4-unsafe.c: Renamed from lib/unistr/utf8-ucs4.c.
570         * modules/unistr/u8-mbtouc-unsafe: Renamed from
571         modules/unistr/u8-mbtouc.
572         * lib/unistr/u8-mbtouc-unsafe.c: Renamed from lib/unistr/u8-mbtouc.c.
573         * lib/unistr.h: Update.
574         * lib/striconveh.c: Update.
575         * modules/striconveh: Update.
576         * lib/linebreak.c: Update.
577         * modules/linebreak: Update.
578         * modules/utf8-ucs4: Renamed from modules/utf8-ucs4-safe.
579         * lib/utf8-ucs4.h: Renamed from lib/utf8-ucs4-safe.h.
580         * lib/unistr/utf8-ucs4.c: Renamed from lib/unistr/utf8-ucs4-safe.c.
581         * modules/unistr/u8-mbtouc: Renamed from modules/unistr/u8-mbtouc-safe.
582         * lib/unistr/u8-mbtouc.c: Renamed from lib/unistr/u8-mbtouc-safe.c.
583         * lib/unistr.h: Update.
584         * lib/striconveh.c: Update.
585         * modules/striconveh: Update.
586         * lib/unistr/u8-to-u16.c: Update.
587         * modules/unistr/u8-to-u16: Update.
588         * lib/unistr/u8-to-u32.c: Update.
589         * modules/unistr/u8-to-u32: Update.
590
591 2007-01-27  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
592
593         Sync from Libtool.
594         * lib/argz.c: Do not include strings.h nor memory.h, include
595         string.h unconditionally.  Patch by Simon Josefsson.
596
597 2007-01-27  Bruno Haible  <bruno@clisp.org>
598
599         * m4/string_h.m4 (gl_HEADER_STRING_H_DEFAULTS): New macro, extracted
600         from gl_HEADER_STRING_H_BODY.
601         (gl_HEADER_STRING_H_BODY): Require it.
602         * m4/memmem.m4 (gl_FUNC_MEMMEM): Require gl_HEADER_STRING_H_DEFAULTS.
603         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Likewise.
604         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Likewise.
605         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Likewise.
606         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Likewise.
607         * m4/strcase.m4 (gl_FUNC_STRCASECMP, gl_FUNC_STRNCASECMP): Likewise.
608         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Likewise.
609         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Likewise.
610         * m4/strdup.m4 (gl_FUNC_STRDUP): Likewise.
611         * m4/strndup.m4 (gl_FUNC_STRNDUP): Likewise.
612         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Likewise.
613         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Likewise.
614         * m4/strsep.m4 (gl_FUNC_STRSEP): Likewise.
615         * m4/strstr.m4 (gl_FUNC_STRSTR): Likewise.
616         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
617
618 2007-01-27  Bruno Haible  <bruno@clisp.org>
619
620         * gnulib-tool (func_emit_lib_Makefile_am): If $for_test is true, turn
621         check_PROGRAMS into noinst_PROGRAMS.
622         (func_emit_tests_Makefile_am): Likewise. Also don't initialize
623         check_PROGRAMS in this case.
624         (func_import): Set for_test to false.
625         (func_create_testdir): Set for_test to true.
626
627 2007-01-27  Yoann Vandoorselaere <yoann.v@prelude-ids.com>
628             Bruno Haible  <bruno@clisp.org>
629
630         * modules/strcasestr (Files): Remove lib/strcasestr.h.
631         (Depends-on): Add string.
632         (Includes): Use <string.h> instead of strcasestr.h.
633         * modules/string (Makefile.am): Also substitute the value of
634         REPLACE_STRCASESTR.
635         * m4/strcasestr.m4 (gl_FUNC_STRCASESTR): Don't define strcasestr here;
636         assume strcasestr is declared in <string.h> not <strings.h>. Also
637         set REPLACE_STRCASESTR.
638         * m4/string_h.m4 (gl_HEADER_STRING_H_BODY): Provide a default value for
639         REPLACE_STRCASESTR.
640         * lib/strcasestr.h: Remove file.
641         * lib/strcasestr.c: Include <string.h> instead of strcasestr.h.
642         * lib/string_.h (strcasestr): New declaration.
643
644 2007-01-27  Bruno Haible  <bruno@clisp.org>
645
646         * lib/string_.h: Use 'extern'.
647
648 2007-01-27  Jim Meyering  <jim@meyering.net>
649
650         * lib/regex_internal.c (re_string_reconstruct): Remove declaration
651         of set-but-not-used local, "q".
652
653         * lib/mempcpy.c: Include <config.h> before <string.h>.
654         This fixes a compilation error on HP-UX, due to the system's
655         "restrict"-using mempcpy prototype.
656
657 2007-01-26  Bruno Haible  <bruno@clisp.org>
658
659         Small optimization.
660         * lib/javacomp.c: Include c-strstr.h.
661          (is_envjavac_gcj): Use c_strstr instead of strstr.
662         * modules/javacomp (Depends-on): Add c-strstr, remove strstr.
663
664 2007-01-26  Bruno Haible  <bruno@clisp.org>
665
666         * MODULES.html.sh (Unicode string functions): Add the new modules.
667
668         * modules/uniconv/u32-strconv-to-locale: New file.
669         * lib/uniconv/u32-strconv-to-locale.c: New file.
670
671         * modules/uniconv/u16-strconv-to-locale: New file.
672         * lib/uniconv/u16-strconv-to-locale.c: New file.
673
674         * modules/uniconv/u8-strconv-to-locale: New file.
675         * lib/uniconv/u8-strconv-to-locale.c: New file.
676
677         * modules/uniconv/u32-strconv-from-locale: New file.
678         * lib/uniconv/u32-strconv-from-locale.c: New file.
679
680         * modules/uniconv/u16-strconv-from-locale: New file.
681         * lib/uniconv/u16-strconv-from-locale.c: New file.
682
683         * modules/uniconv/u8-strconv-from-locale: New file.
684         * lib/uniconv/u8-strconv-from-locale.c: New file.
685
686         * modules/uniconv/u32-strconv-to-enc: New file.
687         * lib/uniconv/u32-strconv-to-enc.c: New file.
688         * modules/uniconv/u32-strconv-to-enc-tests: New file.
689         * tests/uniconv/test-u32-strconv-to-enc.c: New file.
690
691         * modules/uniconv/u16-strconv-to-enc: New file.
692         * lib/uniconv/u16-strconv-to-enc.c: New file.
693         * lib/uniconv/u-strconv-to-enc.h: New file.
694         * modules/uniconv/u16-strconv-to-enc-tests: New file.
695         * tests/uniconv/test-u16-strconv-to-enc.c: New file.
696
697         * modules/uniconv/u8-strconv-to-enc: New file.
698         * lib/uniconv/u8-strconv-to-enc.c: New file.
699         * modules/uniconv/u8-strconv-to-enc-tests: New file.
700         * tests/uniconv/test-u8-strconv-to-enc.c: New file.
701
702         * modules/uniconv/u32-strconv-from-enc: New file.
703         * lib/uniconv/u32-strconv-from-enc.c: New file.
704         * modules/uniconv/u32-strconv-from-enc-tests: New file.
705         * tests/uniconv/test-u32-strconv-from-enc.c: New file.
706
707         * modules/uniconv/u16-strconv-from-enc: New file.
708         * lib/uniconv/u16-strconv-from-enc.c: New file.
709         * modules/uniconv/u16-strconv-from-enc-tests: New file.
710         * tests/uniconv/test-u16-strconv-from-enc.c: New file.
711
712         * modules/uniconv/u8-strconv-from-enc: New file.
713         * lib/uniconv/u8-strconv-from-enc.c: New file.
714         * lib/uniconv/u-strconv-from-enc.h: New file.
715         * modules/uniconv/u8-strconv-from-enc-tests: New file.
716         * tests/uniconv/test-u8-strconv-from-enc.c: New file.
717
718         * modules/uniconv/u32-conv-from-enc: New file.
719         * lib/uniconv/u32-conv-from-enc.c: New file.
720         * modules/uniconv/u32-conv-from-enc-tests: New file.
721         * tests/uniconv/test-u32-conv-from-enc.c: New file.
722
723         * modules/uniconv/u16-conv-from-enc: New file.
724         * lib/uniconv/u16-conv-from-enc.c: New file.
725         * lib/uniconv/u-conv-from-enc.h: New file.
726         * modules/uniconv/u16-conv-from-enc-tests: New file.
727         * tests/uniconv/test-u16-conv-from-enc.c: New file.
728
729         * modules/uniconv/u8-conv-from-enc: New file.
730         * lib/uniconv/u8-conv-from-enc.c: New file.
731         * modules/uniconv/u8-conv-from-enc-tests: New file.
732         * tests/uniconv/test-u8-conv-from-enc.c: New file.
733
734         * modules/uniconv/base: New file.
735         * lib/uniconv.h: New file.
736
737 2007-01-26  Paul Eggert  <eggert@cs.ucla.edu>
738
739         * doc/gnulib-tool.texi (Initial import): Update to match current
740         behavior with strdup module.
741         * lib/.cppi-disable: Remove strcase.h, strdup.h, strndup.h, strnlen.h.
742         * lib/memmem.h: Remove; all uses removed.  This is now done
743         by <string.h>.
744         * lib/mempcpy.h: Likewise.
745         * lib/memrchr.h: Likewise.
746         * lib/stpcpy.h: Likewise.
747         * lib/stpncpy.h: Likewise.
748         * lib/strcase.h: Likewise.
749         * lib/strchrnul.h: Likewise.
750         * lib/strdup.h: Likewise.
751         * lib/strndup.h: Likewise.
752         * lib/strnlen.h: Likewise.
753         * lib/strpbrk.h: Likewise.
754         * lib/strsep.h: Likewise.
755         * lib/strstr.h: Likewise.
756         * lib/strtok_r.h: Likewise.
757         * lib/string_.h: New file.
758         * lib/argp-namefrob.h: Don't include no-longer-existent include files.
759         Rely on <string.h> instead.
760         * lib/canon-host.c: Likewise.
761         * lib/chdir-long.c: Likewise.
762         * lib/concatpath.c: Likewise.
763         * lib/exclude.c: Likewise.
764         * lib/fchdir.c: Likewise.
765         * lib/getaddrinfo.c: Likewise.
766         * lib/getcwd.c: Likewise.
767         * lib/getsubopt.c: Likewise.
768         * lib/glob.c: Likewise.
769         * lib/hard-locale.c: Likewise.
770         * lib/iconvme.c: Likewise.
771         * lib/javacomp.c: Likewise.
772         * lib/mempcpy.c: Likewise.
773         * lib/memrchr.c: Likewise.
774         * lib/regex_internal.h: Likewise.
775         * lib/stpncpy.c: Likewise.
776         * lib/strcasecmp.c: Likewise.
777         * lib/strchrnul.c: Likewise.
778         * lib/strdup.c: Likewise.
779         * lib/striconv.c: Likewise.
780         * lib/striconveh.c: Likewise.
781         * lib/striconveha.c: Likewise.
782         * lib/strncasecmp.c: Likewise.
783         * lib/strndup.c: Likewise.
784         * lib/strnlen.c: Likewise.
785         * lib/strsep.c: Likewise.
786         * lib/strstr.c: Likewise.
787         * lib/strtok_r.c: Likewise.
788         * lib/userspec.c: Likewise.
789         * lib/w32spawn.h: Likewise.
790         * lib/xstrndup.c: Likewise.
791         * lib/mountlist.c (strstr): Remove decl.
792         * m4/string_h.m4: New file.
793         * m4/memmem.m4 (gl_FUNC_MEMMEM): Set HAVE_DECL_MEMMEM if necessary.
794         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY): Set HAVE_MEMPCPY if necessary.
795         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Set HAVE_MEMRCHR
796         * m4/stpcpy.m4 (gl_FUNC_STPCPY): Set HAVE_STPCPY if necessary.
797         * m4/stpncpy.m4 (gl_PREREQ_STPNCPY): Set HAVE_STPNCPY if necessary.
798         * m4/strcase.m4 (gl_FUNC_STRCASECMP):
799         Set REPLACE_STRCASECMP if necessary.
800         (gl_FUNC_STRNCASECMP): Set HAVE_DECL_STRNCASECMP if necessary.
801         * m4/strchrnul.m4 (gl_FUNC_STRCHRNUL): Set HAVE_STRCHRNUL if necessary.
802         * m4/strdup.m4 (gl_FUNC_STRDUP): Set HAVE_DECL_STRDUP if necessary.
803         * m4/strndup.m4 (gl_FUNC_STRNDUP): Set HAVE_DECL_STRNLEN and
804         HAVE_DECL_STRDUP if necessary.
805         (gl_PREREQ_STRNLEN): Don't bother to check for strnlen decl,
806         since gl_FUNC_STRNDUP does that now.
807         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Set HAVE_DECL_STRNLEN if necessary.
808         Check for decl here...
809         (gl_PREREQ_STRNLEN): ... not here.
810         * m4/strpbrk.m4 (gl_FUNC_STRPBRK): Set HAVE_STRPBRK if necessary.
811         * m4/strsep.m4 (gl_FUNC_STRSEP): Set HAVE_STRSEP if necessary.
812         * m4/strstr.m4 (gl_FUNC_STRSTR): Set REPLACE_STRSTR if necessary.
813         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Set HAVE_DECL_STRTOK_R if
814         necessary.
815         * modules/string: New file.
816         * modules/memmem (Files): Remove special-purpose include file.
817         (Depends-on): Add string.
818         (Include): Include <string.h>, not the removed file.
819         * modules/mempcpy: Likewise.
820         * modules/memrchr: Likewise.
821         * modules/stpcpy: Likewise.
822         * modules/stpncpy: Likewise.
823         * modules/strcase: Likewise.
824         * modules/strchrnul: Likewise.
825         * modules/strdup: Likewise.
826         * modules/strndup: Likewise.
827         * modules/strnlen: Likewise.
828         * modules/strpbrk: Likewise.
829         * modules/strsep: Likewise.
830         * modules/strstr: Likewise.
831         * modules/strtok_r: Likewise.
832         * tests/test-dirname.c: Don't include "strdup.h", since
833         <string.h> now suffices.
834         * tests/test-memmem.c: Don't include "memmem.h", since
835         <string.h> now suffices.
836
837 2007-01-25  Bruno Haible  <bruno@clisp.org>
838
839         * lib/striconveh.c (mem_cd_iconveh_internal): Ignore *lengthp if
840         *resultp is 0.
841
842         * lib/unistr/u16-to-u8.c (u16_to_u8): Fix u8_uctomb invocation.
843         * lib/unistr/u32-to-u8.c (u32_to_u8): Likewise.
844         * lib/unistr/u8-to-u16.c (u8_to_u16): Fix u16_uctomb invocation.
845         * lib/unistr/u32-to-u16.c (u32_to_u16): Likewise.
846
847         * modules/unistr/u8-to-u16 (Depends-on): Add missing modules.
848         * modules/unistr/u8-to-u32 (Depends-on): Add missing modules.
849         * modules/unistr/u16-to-u8 (Depends-on): Add missing modules.
850         * modules/unistr/u16-to-u32 (Depends-on): Add missing modules.
851         * modules/unistr/u32-to-u8 (Depends-on): Add missing modules.
852         * modules/unistr/u32-to-u16 (Depends-on): Add missing modules.
853
854 2007-01-24  Bruno Haible  <bruno@clisp.org>
855
856         Don't AC_REQUIRE autoconf macros that invoke AC_LIBOBJ. See
857         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00279.html>.
858         * m4/argp.m4 (gl_ARGP): Invoke, don't require, gl_GETOPT_SUBSTITUTE.
859         * m4/fts.m4 (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): Invoke, don't require,
860         gl_FUNC_FTS_CORE.
861         (gl_FUNC_FTS_CORE): Invoke, don't require, gl_FUNC_OPENAT.
862         * m4/lstat.m4 (gl_FUNC_LSTAT): Invoke, don't require,
863         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
864         * m4/memcmp.m4 (gl_FUNC_MEMCMP): Invoke, don't require, AC_FUNC_MEMCMP.
865         * m4/mktime.m4 (gl_FUNC_MKTIME): Invoke, don't require, AC_FUNC_MKTIME.
866         * m4/openat.m4 (gl_FUNC_OPENAT): Invoke, don't require,
867         gl_FUNC_FCHOWNAT.
868         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Invoke, don't require,
869         gl_FUNC_STRFTIME.
870         * m4/strtod.m4 (gl_FUNC_STRTOD): Invoke, don't require, AC_FUNC_STRTOD.
871         Reported by Ralf Wildenhues.
872
873 2007-01-24  Bruno Haible  <bruno@clisp.org>
874
875         Drop AC_REQUIRE calls that are redundant with the module dependencies.
876         * m4/canon-host.m4 (gl_PREREQ_CANON_HOST): Don't require
877         gl_GETADDRINFO.
878         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Don't require AM_STDBOOL_H,
879         gl_FUNC_MEMPCPY, gl_FUNC_OPENAT, gl_FUNC_MEMRCHR.
880         * m4/openat.m4 (gl_PREREQ_OPENAT): Don't require gl_SAVE_CWD.
881
882 2007-01-24  Paul Eggert  <eggert@cs.ucla.edu>
883
884         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Add test for glibc bug 361.
885         Don't use 'exit'; just return from 'main'.
886         (_AC_LIBOBJ_FNMATCH): Check for headers and functions just once.
887
888         * lib/fnmatch_.h: Readjust white space and comments to match
889         glibc, to avoid spurious diffs.
890
891 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
892
893         * lib/fnmatch_loop.c (internal_fnmatch) [!_LIBC]: #if-out the
894         2004-12-01 change by Jakub Jelinek, since this code won't compile
895         if !LIBC.  Problem reported by Bob Proulx.
896
897 2007-01-23  Bruno Haible  <bruno@clisp.org>
898
899         * lib/striconveh.c: Include c-strcaseeq.h.
900         (mem_iconveh, str_iconveh): Use STRCASEEQ instead of c_strcasecmp.
901         * modules/striconveh (Depends-on): Add c-strcaseeq.
902
903 2007-01-23  Bruno Haible  <bruno@clisp.org>
904
905         * MODULES.html.sh (String handling): Add streq, c-strcaseeq.
906
907         * modules/c-strcaseeq: New file.
908         * lib/c-strcaseeq.h: New file.
909
910         * modules/streq: New file.
911         * lib/streq.h: New file.
912
913 2007-01-23  Bruno Haible  <bruno@clisp.org>
914
915         * modules/striconveha-tests: New file.
916         * tests/test-striconveha.c: New file.
917
918         * lib/striconveha.h: Include <stdbool.h>.
919         (mem_iconveha, str_iconveha): Add 'transliterate' argument.
920         * lib/striconveha.c: Include allocsa.h, strdup.h, c-strcase.h.
921         (mem_iconveha_notranslit): Renamed from mem_iconveha.
922         (mem_iconveha): New function.
923         (str_iconveha_notranslit): Renamed from str_iconveha.
924         (str_iconveha): New function.
925         * modules/striconveha (Depends-on): Add stdbool, allocsa, strdup,
926         c-strcase.
927
928 2007-01-23  Bruno Haible  <bruno@clisp.org>
929
930         * lib/striconveha.c (mem_iconveha): Fix endless recursion. Try all
931         encodings without forgiving before trying any encoding with handler.
932         (str_iconveha): Try all encodings without forgiving before trying any
933         encoding with handler.
934
935 2007-01-23  Paul Eggert  <eggert@cs.ucla.edu>
936
937         Import the following changes from libc.
938
939         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
940
941         * lib/fnmatch_loop.c: Adjust for changed secondary hash function.
942
943         2004-12-01  Jakub Jelinek  <jakub@redhat.com>
944
945         * lib/fnmatch_loop.c (internal_fnmatch): Clear is_seqval after
946         normal_bracket label.
947
948         2004-09-01  Jakub Jelinek  <jakub@redhat.com>
949
950         [BZ #361]
951         * lib/fnmatch_loop.c (FCT): For backslash between brackets, branch
952         to normal_bracket after fetching the next character.
953
954 2007-01-22  Bruno Haible  <bruno@clisp.org>
955
956         * lib/striconveh.h (mem_cd_iconveh, mem_iconveh): Add 'offsets'
957         argument.
958         * lib/striconveh.c (iconv_carefully_1): New function.
959         (mem_cd_iconveh_internal, mem_cd_iconveh, mem_iconveh): Add 'offsets'
960         argument.
961         (str_cd_iconveh): Update.
962         * lib/striconveha.h (mem_iconveha): Add 'offsets' argument.
963         * lib/striconveha.c (mem_iconveha): Add 'offsets' argument.
964         * tests/test-striconveh.c (MAGIC): New macro.
965         (new_offsets): New function.
966         (main): Test call with and without offsets.
967
968 2007-01-22  Bruno Haible  <bruno@clisp.org>
969
970         * modules/sys_stat (Makefile.am): Use @MKDIR_P@ instead of $(MKDIR_P).
971         * modules/sys_select (Makefile.am): Likewise.
972         * modules/sys_socket (Makefile.am): Likewise.
973         * modules/sys_time (Makefile.am): Likewise.
974
975 2007-01-22  Paul Eggert  <eggert@cs.ucla.edu>
976
977         * modules/gettimeofday (License): Change from GPL to LGPL, since
978         gettimeofday is a library function.
979
980 2007-01-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
981
982         * lib/poll.c (rpl_poll): Don't check against FD_SETSIZE under Win32.
983
984 2007-01-21  Bruno Haible  <bruno@clisp.org>
985
986         * m4/gnulib-common.m4 (AC_PROG_MKDIR_P): New macro.
987
988 2007-01-21  Bruno Haible  <bruno@clisp.org>
989
990         * modules/striconveha: New file.
991         * lib/striconveha.h: New file.
992         * lib/striconveha.c: New file.
993         * MODULES.html.sh (Internationalization functions): Add striconveha.
994         * lib/striconv.c (str_iconv): Optimize the case of an empty input
995         string.
996         * lib/striconveh.c (mem_iconveh, str_iconveh): Likewise.
997
998 2007-01-21  Bruno Haible  <bruno@clisp.org>
999
1000         * lib/striconv.c (str_iconv): Guarantee errno is set when strdup fails.
1001         * lib/striconveh.c (str_iconveh): Likewise.
1002
1003 2007-01-21  Bruno Haible  <bruno@clisp.org>
1004
1005         * lib/striconveh.h (mem_iconveh): New declaration.
1006         * lib/striconveh.c (mem_iconveh): New function.
1007         * tests/test-striconveh.c (main): Add tests for mem_iconveh.
1008
1009 2007-01-21  Bruno Haible  <bruno@clisp.org>
1010
1011         * lib/xstriconv.h (xmem_cd_iconv): Change specification.
1012
1013         * lib/striconveh.h (mem_cd_iconveh): Change specification.
1014         * lib/striconveh.c (mem_cd_iconveh): Don't free the user-supplied
1015         original result buffer.
1016         (str_cd_iconveh): Update.
1017         * tests/test-striconveh.c (main): Update.
1018
1019         * lib/striconv.h (mem_cd_iconv): Change specification.
1020         * lib/striconv.c (mem_cd_iconv): Don't free the user-supplied original
1021         result buffer.
1022         (str_cd_iconv): Update.
1023         * tests/test-striconv.c (main): Update.
1024
1025 2007-01-21  Bruno Haible  <bruno@clisp.org>
1026
1027         * gnulib-tool: Fix test whether sed is GNU sed supporting --posix.
1028
1029 2007-01-20  Jim Meyering  <jim@meyering.net>
1030
1031         * lib/userspec.c (parse_with_separator): If a user or group string
1032         starts with "+", skip the corresponding name-to-ID look-up, since
1033         such a look-up must fail: user and group names may not include "+".
1034
1035 2007-01-19  Paul Eggert  <eggert@cs.ucla.edu>
1036
1037         * lib/poll.c: Include sys/time.h and time.h unconditionally,
1038         since we now assume the sys_time module.
1039         * m4/poll.m4 (gl_PREREQ_POLL): Don't require AC_HEADER_TIME or
1040         check for sys/time.h; no longer needed.
1041         * modules/poll (Depends-on): Depend on sys_time.
1042
1043 2007-01-18  Bruno Haible  <bruno@clisp.org>
1044
1045         * m4/mktime.m4 (AC_FUNC_MKTIME): Remove test for <sys/time.h>.
1046         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1047
1048         * m4/tempname.m4 (gl_PREREQ_TEMPNAME): Remove tests for sys/time.h and
1049         gettimeofday.
1050
1051         * tests/test-gettimeofday.c: Include <time.h>.
1052         (dummy): Remove variable.
1053
1054         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H_BODY): Renamed from
1055         gl_HEADER_SYS_TIME_H.
1056         (gl_HEADER_SYS_TIME_H): New macro.
1057
1058         * lib/sys_time_.h: Test GETTIMEOFDAY_REPLACEMENT instead of
1059         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1060         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY,
1061         gl_FUNC_GETTIMEOFDAY_CLOBBER): Set GETTIMEOFDAY_REPLACEMENT instead of
1062         HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1063         * m4/sys_time_h.m4 (gl_HEADER_SYS_TIME_H): Initialize
1064         GETTIMEOFDAY_REPLACEMENT instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE
1065         and GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1066         * modules/sys_time (sys/time.h): Substitute GETTIMEOFDAY_REPLACEMENT
1067         instead of HAVE_GETTIMEOFDAY_POSIX_SIGNATURE and
1068         GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1069
1070         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Undo the
1071         last change; it caused a compilation error when cross-compiling to
1072         Cygwin.
1073
1074 2007-01-18  Jim Meyering  <jim@meyering.net>
1075
1076         Use "$(MKDIR_P) sys", not race-prone "test -d sys || mkdir sys".
1077         * modules/sys_stat (Makefile.am): Use "$(MKDIR_P) sys", rather
1078         than the race-prone "test -d sys || mkdir sys".
1079         (configure.ac): Use AC_PROG_MKDIR_P.
1080         * modules/sys_select: Likewise.
1081         * modules/sys_socket: Likewise.
1082         * modules/sys_time: Likewise.
1083
1084 2007-01-18  Eric Blake  <ebb9@byu.net>
1085
1086         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Also
1087         replace gettimeofday.
1088         * lib/gettimeofday.c (rpl_gettimeofday): Declare with replacement
1089         name, to avoid infinite recursion.
1090
1091 2007-01-17  Paul Eggert  <eggert@cs.ucla.edu>
1092
1093         * MODULES.html.sh (Support for systems lacking POSIX:2001): New
1094         module sys_time.
1095         * lib/gethrxtime.c: Include <sys/time.h>, since we can no longer
1096         assume timespec.h defines struct timeval.
1097         * lib/settime.c: Likewise.
1098         * lib/utimens.c: Likewise.
1099         * lib/gettime.c (gettime): Remove test against HAVE_GETTIMEOFDAY,
1100         since we now assume the gettimeofday module.
1101         * lib/tempname.c (__gen_tempname): Likewise.
1102         * lib/gettimeofday.h: Remove.
1103         * lib/gettimeofday.c: Include <sys/time.h> instead of "gettimeofday.h".
1104         Don't include <sys/types.h> and <stdlib.h>; shouldn't be needed.
1105         Include <time.h>, for 'time()'.
1106         (localtime_buffer_addr): Also use this workaround if
1107         TZSET_CLOBBERS_LOCALTIME.  Set to a dummy static variable by default,
1108         to simplify the uses.  All uses changed.
1109         (localtime, gmtime, tzset, gettimeofday): Reformat slightly so
1110         that #undef is inside {}, and 'const' follows type name consistently.
1111         (tzset): Define replacement only if TZSET_CLOBBERS_LOCALTIME.
1112         (gettimeofday): Do not use the maximum possible value for
1113         tv->tv_usec, since that might break usages other than ls.c.
1114         Instead, we'll leave ls.c alone.  This undoes today's patch
1115         by Bruno.  Add a compile-time warning for 1s-clock resolution;
1116         we've never observed the problem but might as well keep the
1117         canary.
1118         * lib/nanosleep.c: Include timespec.h first, for interface check.
1119         * lib/nanosleep.c: Include <sys/time.h> unconditionally, since we
1120         now assume the sys_time module.
1121         * lib/tempname.c: Likewise.
1122         * lib/timespec.h: Likewise.
1123         * lib/nanosleep.c: Don't worry about TIME_WITH_SYS_TIME; no longer
1124         needed.
1125         * lib/strftime.c: Likewise.
1126         * lib/timespec.h: Likewise.
1127         * lib/posixtm.c: Include posixtm.h first, for interface check.
1128         Don't worry about TM_IN_SYS_TIME; that's wayyy obsolete.
1129         * lib/posixtm.h: Include stdbool.h and time.h, for proper interface.
1130         * lib/strftime.c: Don't include <sys/types.h>; shouldn't be needed.
1131         * lib/sys_time_.h: New file.
1132         * lib/timespec.h (struct timespec): Use long int, not long.
1133         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY):
1134         (gl_FUNC_GETTIMEOFDAY_CLOBBER, gl_PREREQ_GETTIMEOFDAY):
1135         Remove obsolescent call to AC_HEADER_TIME.
1136         * m4/mktime.m4 (AC_FUNC_MKTIME): Likewise.
1137         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
1138         * m4/strftime.m4 (gl_FUNC_STRFTIME): Likewise.
1139         * m4/timespec.m4 (gl_TIMESPEC, gl_CHECK_TYPE_STRUCT_TIMESPEC):
1140         Likewise.
1141         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Likewise.
1142         * m4/utimbuf.m4 (gl_CHECK_TYPE_STRUCT_UTIMBUF): Likewise.
1143         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): Move sys/time.h tests
1144         into the sys_time module.  Check for gettimeofday just once.
1145         Prefix our variables with gl_, not with ac_ or jm_.  Tighten test
1146         for gettimeofday signature to just check the signature.  Merely
1147         compile it, since linking doesn't test signature.  Improve test for
1148         whether gettimeofday.o is actually needed.
1149         (gl_FUNC_GETTIMEOFDAY_CLOBBER): Renamed from
1150         AC_FUNC_GETTIMEOFDAY_CLOBBER.  All uses changed.  Use
1151         AC_RUN_IFELSE rather than AC_TRY_RUN.  If clobbering, set
1152         and define GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1153         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Don't define
1154         GETTIMEOFDAY_CLOBBERS_LOCALTIME; that's gl_FUNC_GETTIMEOFDAY_CLOBBER's
1155         job.  Don't define tzset; that's gl_FUNC_TZSET_CLOBBER's job.
1156         * m4/mktime.m4 (AC_FUNC_MKTIME): Just include <time.h> rather
1157         than worrying about sys/time.h.
1158         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
1159         Don't bother worrying about TIME_WITH_SYS_TIME.
1160         * m4/stat-time.m4 (gl_STAT_TIME): Likewise.
1161         * m4/posixtm.m4 (gl_POSIXTM): Remove obsolescent call to AC_STRUCT_TM.
1162         * m4/sys_time_h.m4: New file.
1163         * m4/tzset.m4 (gl_FUNC_TZSET_CLOBBER): Require gl_HEADER_SYS_TIME_H.
1164         Don't include sys/time.h.  Return from main rather than exiting.
1165         Define TZSET_CLOBBERS_LOCALTIME, for consistency with other names;
1166         all uses changed.
1167         * modules/gethrxtime (Depends-on): Add sys_time.
1168         * modules/gettime (Depends-on): Likewise.
1169         * modules/gettimeofday (Depends-on): Likewise.
1170         * modules/nanosleep (Depends-on): Likewise.
1171         * modules/settime (Depends-on): Likewise.
1172         * modules/tempname (Depends-on): Likewise.
1173         * modules/utimens (Depends-on): Likewise.
1174         * modules/gettimeofday (Files): Remove lib/gettimeofday.h.
1175         (Include:) Change back to <sys/time.h>.
1176         (Maintainer:) Add self.
1177         * modules/sys_time: New file.
1178         * modules/tempname (Depends-on): Add gettimeofday.
1179         * tests/test-gettimeofday.c: Include <sys/time.h>
1180         rather than gettimeofday.h.
1181
1182 2007-01-17  Bruno Haible  <bruno@clisp.org>
1183
1184         * gnulib-tool (func_get_license): Revert last patch. Instead, let
1185         the license default to GPL.
1186         (func_create_testdir): Don't complain if a module is LGPL and its
1187         tests module depends on GPLed modules.
1188
1189 2007-01-17  Bruno Haible  <bruno@clisp.org>
1190
1191         * lib/gettimeofday.c (gettimeofday): Add code for the case
1192         HAVE_GETTIMEOFDAY && !GETTIMEOFDAY_CLOBBERS_LOCALTIME. Use the
1193         maximum possible value for tv->tv_usec, rather than the minimum one.
1194
1195 2005-10-08  Martin Lambers  <marlam@marlam.de>
1196 2005-10-08  Paul Eggert  <eggert@cs.ucla.edu>
1197 2007-01-16  Bruno Haible  <bruno@clisp.org>
1198
1199         * modules/gettimeofday (Files): Add lib/gettimeofday.h.
1200         (configure.ac): Remove AC_FUNC_GETTIMEOFDAY_CLOBBER. Add
1201         gl_FUNC_GETTIMEOFDAY.
1202         (Include): Add gettimeofday.h.
1203         * m4/gettimeofday.m4 (gl_FUNC_GETTIMEOFDAY): New macro.
1204         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't invoke gl_PREREQ_GETTIMEOFDAY.
1205         (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): Define
1206         GETTIMEOFDAY_CLOBBERS_LOCALTIME. Invoke gl_PREREQ_GETTIMEOFDAY here.
1207         (gl_PREREQ_GETTIMEOFDAY): Check for <sys/timeb.h> and _ftime.
1208         * lib/gettimeofday.h: New file.
1209         * lib/gettimeofday.c: Include <sys/timeb.h>.
1210         (localtime_buffer_addr, rpl_localtime, rpl_gmtime, rpl_tzset): Define
1211         only if GETTIMEOFDAY_CLOBBERS_LOCALTIME.
1212         (rpl_gettimeofday) [!HAVE_GETTIMEOFDAY]: Use _ftime() when available;
1213         fall back on time().
1214
1215         * tests/test-gettimeofday.c: New file.
1216         * modules/gettimeofday-tests: New file.
1217
1218 2007-01-16  Eric Blake  <ebb9@byu.net>
1219
1220         * modules/fnmatch (Depends-on): Depend on wchar.
1221         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Assume <wchar.h>.
1222         * m4/fnmatch.m4: Likewise.
1223         * modules/mbchar (Makefile.am): Assume <wchar.h>.
1224         * m4/mbchar.m4: Likewise.
1225         * modules/mbswidth (Depends-on): Depend on wchar.
1226         * lib/mbswidth.c: Assume <wchar.h>.
1227         * m4/mbswidth.m4: Likewise.
1228         * modules/quotearg (Depends-on): Depend on wchar.
1229         * lib/quotearg.c: Assume <wchar.h>.
1230         * m4/quotearg.m4: Likewise.
1231         * modules/regex (Depends-on): Depend on wchar.
1232         * lib/regex_internal.h: Assume <wchar.h>.
1233         * m4/regex.m4: Likewise.
1234         * modules/stdint (Depends-on): Depend on wchar.
1235         * lib/stdint_.h [!defined WCHAR_MIN]: Assume <wchar.h>.
1236         * m4/stdint.m4: Likewise.
1237         * tests/test-stdint.c [HAVE_WINT_T]: Likewise.
1238         * modules/strftime (Depends-on): Depend on wchar.
1239         * lib/strftime.c (DO_MULTIBYTE): Assume <wchar.h>.
1240         * modules/strtol (Depends-on): Depend on wchar.
1241         * lib/strtol.c: Assume <wchar.h>.
1242         * modules/wcwidth (Depends-on): Depend on wchar.
1243         * lib/wcwidth.h: Assume <wchar.h>.
1244         * m4/wcwidth.m4: Likewise.
1245
1246 2007-01-16  Bruno Haible  <bruno@clisp.org>
1247
1248         * modules/csharpexec-script: New, created from...
1249         * modules/csharpexec: ... this.
1250
1251 2007-01-16  Paolo Bonzini  <bonzini@gnu.org>
1252
1253         * modules/javaexec-script: New, created from...
1254         * modules/javaexec: ... this.
1255
1256 2007-01-16  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
1257
1258         * modules/poll (Dependencies): Add sys_select.
1259
1260 2007-01-15  Jim Meyering  <jim@meyering.net>
1261
1262         * m4/readutmp.m4 (gl_READUTMP): Work around AIX 4.3 struct-
1263         redefinition bug when using both <utmp.h> and <utmpx.h> headers.
1264         * lib/readutmp.h: Likewise.  Reported by Daniel Richard G. in
1265         <http://article.gmane.org/gmane.comp.gnu.core-utils.bugs/9415>.
1266
1267 2007-01-15  Bruno Haible  <bruno@clisp.org>
1268
1269         * modules/striconveh: New file.
1270         * lib/striconveh.h: New file.
1271         * lib/striconveh.c: New file.
1272         * MODULES.html.sh (Internationalization functions): Add striconveh.
1273
1274         * modules/striconveh-tests: New file.
1275         * tests/test-striconveh.c: New file.
1276
1277 2007-01-15  Bruno Haible  <bruno@clisp.org>
1278
1279         * lib/striconv.c (str_cd_iconv): Use the first algorithm if iconv is
1280         not from GNU libiconv or GNU libc.
1281
1282 2007-01-15  Bruno Haible  <bruno@clisp.org>
1283
1284         * doc/gnulib-intro.texi (Copyright): Explain the different license
1285         terms for module descriptions, autoconf macros, tests, documentation.
1286
1287 2007-01-14  Bruno Haible  <bruno@clisp.org>
1288
1289         * modules/striconv-tests: New file.
1290         * tests/test-striconv.c: New file.
1291
1292 2007-01-14  Bruno Haible  <bruno@clisp.org>
1293
1294         * modules/iconv-tests: New file.
1295         * tests/test-iconv.c: New file.
1296
1297 2007-01-14  Bruno Haible  <bruno@clisp.org>
1298
1299         * gnulib-tool (func_get_license): For test modules, use the license of
1300         the main module.
1301
1302 2007-01-14  Bruno Haible  <bruno@clisp.org>
1303
1304         * modules/iconv (Include): Clarify that <iconv.h> can only be included
1305         if iconv is found to exist.
1306
1307 2007-01-14  Bruno Haible  <bruno@clisp.org>
1308
1309         * modules/c-ctype-tests: New file.
1310         * tests/test-c-ctype.c: New file.
1311
1312 2007-01-14  Bruno Haible  <bruno@clisp.org>
1313
1314         * modules/binary-io-tests: New file.
1315         * tests/test-binary-io.sh: New file.
1316         * tests/test-binary-io.c: New file.
1317
1318 2007-01-14  Bruno Haible  <bruno@clisp.org>
1319
1320         * modules/array-oset-tests: New file.
1321         * tests/test-array_oset.c: New file.
1322
1323 2007-01-14  Bruno Haible  <bruno@clisp.org>
1324
1325         * modules/array-list-tests: New file.
1326         * tests/test-array_list.c: New file.
1327
1328 2007-01-14  Bruno Haible  <bruno@clisp.org>
1329
1330         * gnulib-tool (func_create_testdir): Don't unnecessarily run configure
1331         and make.
1332         Reported by Simon Josefsson in
1333         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00139.html>
1334
1335 2007-01-14  Bruno Haible  <bruno@clisp.org>
1336
1337         * modules/allocsa-tests: New file.
1338         * tests/test-allocsa.c: New file.
1339
1340 2007-01-14  Bruno Haible  <bruno@clisp.org>
1341
1342         * modules/fchdir (Depends-on): Add absolute-header.
1343         * modules/unistd (Depends-on): Likewise.
1344
1345 2006-12-30  Bruno Haible  <bruno@clisp.org>
1346
1347         * modules/fchdir: New file.
1348         * modules/unistd (Files): Add lib/unistd_.h.
1349         (Makefile.am): Generate unistd.h from unistd_.h.
1350         * lib/fchdir.c: New file.
1351         * lib/dirent_.h: New file.
1352         * lib/unistd_.h: New file.
1353         * lib/fcntl_.h (open) [FCHDIR_REPLACEMENT]: New replacement.
1354         * m4/fchdir.m4: New file.
1355         * m4/unistd_h.m4 (gl_PREREQ_UNISTD): New macro.
1356         (gl_HEADER_UNISTD): Invoke it.
1357         * lib/dup-safer.c (dup_safer) [FCHDIR_REPLACEMENT]: Use the dup
1358         function.
1359         * lib/backupfile.c (opendir, closedir): Undefine.
1360         * lib/chown.c (open, close): Undefine.
1361         * lib/clean-temp.c (open, close): Undefine.
1362         * lib/copy-file.c (open, close): Undefine.
1363         * lib/execute.c (open, close): Undefine.
1364         * lib/fsusage.c (open, close): Undefine.
1365         * lib/gc-gnulib.c (open, close): Undefine.
1366         * lib/getcwd.c (opendir, closedir): Undefine.
1367         * lib/glob.c (opendir, closedir): Undefine.
1368         * lib/javacomp.c (open, close): Undefine.
1369         * lib/mountlist.c (open, close, opendir, closedir): Undefine.
1370         * lib/openat-proc.c (open, close): Undefine.
1371         * lib/pagealign_alloc.c (open, close): Undefine.
1372         * lib/pipe.c (open, close): Undefine.
1373         * lib/progreloc.c (open, close): Undefine.
1374         * lib/savedir.c (opendir, closedir): Undefine.
1375         * lib/utime.c (open, close): Undefine.
1376         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add fchdir.
1377
1378 2007-01-10  Bruno Haible  <bruno@clisp.org>
1379
1380         * lib/striconv.c (mem_cd_iconv): Align the temporary buffer.
1381
1382 2007-01-12  Eric Blake  <ebb9@byu.net>
1383
1384         Provide a robust <wchar.h>.  Further simplifications are now
1385         possible in other modules, but not included here.
1386         * modules/wchar: New module.
1387         * m4/wchar.m4: New file.
1388         * lib/wchar_.h: Likewise.
1389         * modules/mbchar (Depends-on): Depend on wchar, as the first use
1390         of the new module.
1391         * MODULES.html.sh (Extended multibyte and wide character utilities):
1392         New section.
1393
1394 2007-01-12  Paul Eggert  <eggert@cs.ucla.edu>
1395
1396         * lib/xreadlink.c (SYMLINK_MAX) [!defined SYMLINK_MAX]: Define
1397         to a reasonable default for memory allocation.
1398         (xreadlink): Don't allocate a huge buffer, to work around a buggy
1399         file system that reports garbage st_size values for symlinks.
1400         Problem reported by Liyang Hu.
1401
1402 2007-01-11  Simon Josefsson  <simon@josefsson.org>
1403
1404         * gnulib-tool (func_all_modules): Exclude all .* files (e.g.,
1405         Emacs .#* auto-save files).
1406
1407 2007-01-11  Bruno Haible  <bruno@clisp.org>
1408
1409         * gnulib-tool (func_all_modules): Exclude all files inside the CVS
1410         directory.
1411
1412 2007-01-10  Paul Eggert  <eggert@cs.ucla.edu>
1413
1414         Use @...@ consistently in lib/wctype_.h.
1415         * lib/wctype_.h [HAVE_WINT_T]: Go back to using @...@, but rely
1416         on it being set to 1 or 0.
1417         * m4/wctype.m4 (gl_WCTYPE_H): Set HAVE_WINT_T to 1 or 0, and
1418         go back to AC_SUBSTing it.
1419         * modules/wctype (Makefile.am): Undo previous change.
1420
1421 2007-01-10  Eric Blake  <ebb9@byu.net>
1422
1423         * lib/wctype_.h [HAVE_WINT_T]: Rely on AC_DEFINE.
1424         * m4/wctype.m4 (gl_WCTYPE_H): No need to AC_SUBST(HAVE_WINT_T).
1425         * modules/wctype (Makefile.am): Likewise.
1426         Reported by Chris McGuire.
1427
1428 2007-01-10  Jim Meyering  <jim@meyering.net>
1429
1430         fts.c: a small readability/maintainability improvement
1431         * lib/fts.c (fts_read): Make this code slightly more readable and
1432         maintainable by hoisting the "sp->fts_cur = p" assignments to
1433         immediately follow the statements that set P.  Derived from
1434         the patch by Miloslav Trmac in http://bugzilla.redhat.com/222089.
1435
1436 2007-01-10  Eric Blake  <ebb9@byu.net>
1437
1438         * lib/wctype_.h [HAVE_WINT_T]: Include <stddef.h> before
1439         <wchar.h>, to work around BSDI bug in BSD/OS 4.0.1.
1440         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
1441         * m4/wint_t.m4 (gt_TYPE_WINT_T): Likewise.
1442         Reported by Chris McGuire.
1443
1444 2007-01-09  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1445
1446         * gnulib-tool (func_all_modules): Use POSIX conforming escaping
1447         in sed script.
1448
1449 2007-01-09  Bruno Haible  <bruno@clisp.org>
1450
1451         * MODULES.html.sh: Accept options --cvs-urls, --git-urls.
1452         (repo_url_prefix, repo_url_suffix, repo_url_suffix_repl): New
1453         variables.
1454         (func_module): Use them.
1455
1456 2007-01-09  Bruno Haible  <bruno@clisp.org>
1457
1458         * modules/unistr/base: New file.
1459         * lib/unistr.h: New file.
1460
1461         * modules/unistr/u8-to-u16: New file.
1462         * lib/unistr/u8-to-u16.c: New file.
1463
1464         * modules/unistr/u8-to-u32: New file.
1465         * lib/unistr/u8-to-u32.c: New file.
1466
1467         * modules/unistr/u16-to-u8: New file.
1468         * lib/unistr/u16-to-u8.c: New file.
1469
1470         * modules/unistr/u16-to-u32: New file.
1471         * lib/unistr/u16-to-u32.c: New file.
1472
1473         * modules/unistr/u32-to-u8: New file.
1474         * lib/unistr/u32-to-u8.c: New file.
1475
1476         * modules/unistr/u32-to-u16: New file.
1477         * lib/unistr/u32-to-u16.c: New file.
1478
1479         * modules/unistr/u8-check: New file.
1480         * modules/unistr/u16-check: New file.
1481         * modules/unistr/u32-check: New file.
1482         * lib/unistr/u8-check.c: New file.
1483         * lib/unistr/u16-check.c: New file.
1484         * lib/unistr/u32-check.c: New file.
1485
1486         * modules/unistr/u8-chr: New file.
1487         * modules/unistr/u16-chr: New file.
1488         * modules/unistr/u32-chr: New file.
1489         * lib/unistr/u8-chr.c: New file.
1490         * lib/unistr/u16-chr.c: New file.
1491         * lib/unistr/u32-chr.c: New file.
1492
1493         * modules/unistr/u8-cmp: New file.
1494         * modules/unistr/u16-cmp: New file.
1495         * modules/unistr/u32-cmp: New file.
1496         * lib/unistr/u8-cmp.c: New file.
1497         * lib/unistr/u16-cmp.c: New file.
1498         * lib/unistr/u32-cmp.c: New file.
1499
1500         * modules/unistr/u8-cpy: New file.
1501         * modules/unistr/u16-cpy: New file.
1502         * modules/unistr/u32-cpy: New file.
1503         * lib/unistr/u8-cpy.c: New file.
1504         * lib/unistr/u16-cpy.c: New file.
1505         * lib/unistr/u32-cpy.c: New file.
1506         * lib/unistr/u-cpy.h: New file.
1507
1508         * modules/unistr/u8-cpy-alloc: New file.
1509         * modules/unistr/u16-cpy-alloc: New file.
1510         * modules/unistr/u32-cpy-alloc: New file.
1511         * lib/unistr/u8-cpy-alloc.c: New file.
1512         * lib/unistr/u16-cpy-alloc.c: New file.
1513         * lib/unistr/u32-cpy-alloc.c: New file.
1514         * lib/unistr/u-cpy-alloc.h: New file.
1515
1516         * modules/unistr/u8-endswith: New file.
1517         * modules/unistr/u16-endswith: New file.
1518         * modules/unistr/u32-endswith: New file.
1519         * lib/unistr/u8-endswith.c: New file.
1520         * lib/unistr/u16-endswith.c: New file.
1521         * lib/unistr/u32-endswith.c: New file.
1522         * lib/unistr/u-endswith.h: New file.
1523
1524         * modules/unistr/u8-mblen: New file.
1525         * modules/unistr/u16-mblen: New file.
1526         * modules/unistr/u32-mblen: New file.
1527         * lib/unistr/u8-mblen.c: New file.
1528         * lib/unistr/u16-mblen.c: New file.
1529         * lib/unistr/u32-mblen.c: New file.
1530
1531         * modules/unistr/u8-mbtouc: New file.
1532         * modules/unistr/u16-mbtouc: New file.
1533         * modules/unistr/u32-mbtouc: New file.
1534         * lib/unistr/u8-mbtouc.c: New file.
1535         * lib/unistr/u16-mbtouc.c: New file.
1536         * lib/unistr/u32-mbtouc.c: New file.
1537
1538         * modules/unistr/u8-mbtouc-safe: New file.
1539         * modules/unistr/u16-mbtouc-safe: New file.
1540         * modules/unistr/u32-mbtouc-safe: New file.
1541         * lib/unistr/u8-mbtouc-safe.c: New file.
1542         * lib/unistr/u16-mbtouc-safe.c: New file.
1543         * lib/unistr/u32-mbtouc-safe.c: New file.
1544
1545         * modules/unistr/u8-move: New file.
1546         * modules/unistr/u16-move: New file.
1547         * modules/unistr/u32-move: New file.
1548         * lib/unistr/u8-move.c: New file.
1549         * lib/unistr/u16-move.c: New file.
1550         * lib/unistr/u32-move.c: New file.
1551         * lib/unistr/u-move.h: New file.
1552
1553         * modules/unistr/u8-next: New file.
1554         * modules/unistr/u16-next: New file.
1555         * modules/unistr/u32-next: New file.
1556         * lib/unistr/u8-next.c: New file.
1557         * lib/unistr/u16-next.c: New file.
1558         * lib/unistr/u32-next.c: New file.
1559
1560         * modules/unistr/u8-prev: New file.
1561         * modules/unistr/u16-prev: New file.
1562         * modules/unistr/u32-prev: New file.
1563         * lib/unistr/u8-prev.c: New file.
1564         * lib/unistr/u16-prev.c: New file.
1565         * lib/unistr/u32-prev.c: New file.
1566
1567         * modules/unistr/u8-set: New file.
1568         * modules/unistr/u16-set: New file.
1569         * modules/unistr/u32-set: New file.
1570         * lib/unistr/u8-set.c: New file.
1571         * lib/unistr/u16-set.c: New file.
1572         * lib/unistr/u32-set.c: New file.
1573         * lib/unistr/u-set.h: New file.
1574
1575         * modules/unistr/u8-startswith: New file.
1576         * modules/unistr/u16-startswith: New file.
1577         * modules/unistr/u32-startswith: New file.
1578         * lib/unistr/u8-startswith.c: New file.
1579         * lib/unistr/u16-startswith.c: New file.
1580         * lib/unistr/u32-startswith.c: New file.
1581         * lib/unistr/u-startswith.h: New file.
1582
1583         * modules/unistr/u8-stpcpy: New file.
1584         * modules/unistr/u16-stpcpy: New file.
1585         * modules/unistr/u32-stpcpy: New file.
1586         * lib/unistr/u8-stpcpy.c: New file.
1587         * lib/unistr/u16-stpcpy.c: New file.
1588         * lib/unistr/u32-stpcpy.c: New file.
1589         * lib/unistr/u-stpcpy.h: New file.
1590
1591         * modules/unistr/u8-stpncpy: New file.
1592         * modules/unistr/u16-stpncpy: New file.
1593         * modules/unistr/u32-stpncpy: New file.
1594         * lib/unistr/u8-stpncpy.c: New file.
1595         * lib/unistr/u16-stpncpy.c: New file.
1596         * lib/unistr/u32-stpncpy.c: New file.
1597         * lib/unistr/u-stpncpy.h: New file.
1598
1599         * modules/unistr/u8-strcat: New file.
1600         * modules/unistr/u16-strcat: New file.
1601         * modules/unistr/u32-strcat: New file.
1602         * lib/unistr/u8-strcat.c: New file.
1603         * lib/unistr/u16-strcat.c: New file.
1604         * lib/unistr/u32-strcat.c: New file.
1605         * lib/unistr/u-strcat.h: New file.
1606
1607         * modules/unistr/u8-strchr: New file.
1608         * modules/unistr/u16-strchr: New file.
1609         * modules/unistr/u32-strchr: New file.
1610         * lib/unistr/u8-strchr.c: New file.
1611         * lib/unistr/u16-strchr.c: New file.
1612         * lib/unistr/u32-strchr.c: New file.
1613
1614         * modules/unistr/u8-strcmp: New file.
1615         * modules/unistr/u16-strcmp: New file.
1616         * modules/unistr/u32-strcmp: New file.
1617         * lib/unistr/u8-strcmp.c: New file.
1618         * lib/unistr/u16-strcmp.c: New file.
1619         * lib/unistr/u32-strcmp.c: New file.
1620
1621         * modules/unistr/u8-strcpy: New file.
1622         * modules/unistr/u16-strcpy: New file.
1623         * modules/unistr/u32-strcpy: New file.
1624         * lib/unistr/u8-strcpy.c: New file.
1625         * lib/unistr/u16-strcpy.c: New file.
1626         * lib/unistr/u32-strcpy.c: New file.
1627         * lib/unistr/u-strcpy.h: New file.
1628
1629         * modules/unistr/u8-strcspn: New file.
1630         * modules/unistr/u16-strcspn: New file.
1631         * modules/unistr/u32-strcspn: New file.
1632         * lib/unistr/u8-strcspn.c: New file.
1633         * lib/unistr/u16-strcspn.c: New file.
1634         * lib/unistr/u32-strcspn.c: New file.
1635         * lib/unistr/u-strcspn.h: New file.
1636
1637         * modules/unistr/u8-strdup: New file.
1638         * modules/unistr/u16-strdup: New file.
1639         * modules/unistr/u32-strdup: New file.
1640         * lib/unistr/u8-strdup.c: New file.
1641         * lib/unistr/u16-strdup.c: New file.
1642         * lib/unistr/u32-strdup.c: New file.
1643         * lib/unistr/u-strdup.h: New file.
1644
1645         * modules/unistr/u8-strlen: New file.
1646         * modules/unistr/u16-strlen: New file.
1647         * modules/unistr/u32-strlen: New file.
1648         * lib/unistr/u8-strlen.c: New file.
1649         * lib/unistr/u16-strlen.c: New file.
1650         * lib/unistr/u32-strlen.c: New file.
1651         * lib/unistr/u-strlen.h: New file.
1652
1653         * modules/unistr/u8-strmblen: New file.
1654         * modules/unistr/u16-strmblen: New file.
1655         * modules/unistr/u32-strmblen: New file.
1656         * lib/unistr/u8-strmblen.c: New file.
1657         * lib/unistr/u16-strmblen.c: New file.
1658         * lib/unistr/u32-strmblen.c: New file.
1659
1660         * modules/unistr/u8-strmbtouc: New file.
1661         * modules/unistr/u16-strmbtouc: New file.
1662         * modules/unistr/u32-strmbtouc: New file.
1663         * lib/unistr/u8-strmbtouc.c: New file.
1664         * lib/unistr/u16-strmbtouc.c: New file.
1665         * lib/unistr/u32-strmbtouc.c: New file.
1666
1667         * modules/unistr/u8-strncat: New file.
1668         * modules/unistr/u16-strncat: New file.
1669         * modules/unistr/u32-strncat: New file.
1670         * lib/unistr/u8-strncat.c: New file.
1671         * lib/unistr/u16-strncat.c: New file.
1672         * lib/unistr/u32-strncat.c: New file.
1673         * lib/unistr/u-strncat.h: New file.
1674
1675         * modules/unistr/u8-strncmp: New file.
1676         * modules/unistr/u16-strncmp: New file.
1677         * modules/unistr/u32-strncmp: New file.
1678         * lib/unistr/u8-strncmp.c: New file.
1679         * lib/unistr/u16-strncmp.c: New file.
1680         * lib/unistr/u32-strncmp.c: New file.
1681
1682         * modules/unistr/u8-strncpy: New file.
1683         * modules/unistr/u16-strncpy: New file.
1684         * modules/unistr/u32-strncpy: New file.
1685         * lib/unistr/u8-strncpy.c: New file.
1686         * lib/unistr/u16-strncpy.c: New file.
1687         * lib/unistr/u32-strncpy.c: New file.
1688         * lib/unistr/u-strncpy.h: New file.
1689
1690         * modules/unistr/u8-strnlen: New file.
1691         * modules/unistr/u16-strnlen: New file.
1692         * modules/unistr/u32-strnlen: New file.
1693         * lib/unistr/u8-strnlen.c: New file.
1694         * lib/unistr/u16-strnlen.c: New file.
1695         * lib/unistr/u32-strnlen.c: New file.
1696         * lib/unistr/u-strnlen.h: New file.
1697
1698         * modules/unistr/u8-strpbrk: New file.
1699         * modules/unistr/u16-strpbrk: New file.
1700         * modules/unistr/u32-strpbrk: New file.
1701         * lib/unistr/u8-strpbrk.c: New file.
1702         * lib/unistr/u16-strpbrk.c: New file.
1703         * lib/unistr/u32-strpbrk.c: New file.
1704         * lib/unistr/u-strpbrk.h: New file.
1705
1706         * modules/unistr/u8-strrchr: New file.
1707         * modules/unistr/u16-strrchr: New file.
1708         * modules/unistr/u32-strrchr: New file.
1709         * lib/unistr/u8-strrchr.c: New file.
1710         * lib/unistr/u16-strrchr.c: New file.
1711         * lib/unistr/u32-strrchr.c: New file.
1712
1713         * modules/unistr/u8-strspn: New file.
1714         * modules/unistr/u16-strspn: New file.
1715         * modules/unistr/u32-strspn: New file.
1716         * lib/unistr/u8-strspn.c: New file.
1717         * lib/unistr/u16-strspn.c: New file.
1718         * lib/unistr/u32-strspn.c: New file.
1719         * lib/unistr/u-strspn.h: New file.
1720
1721         * modules/unistr/u8-strstr: New file.
1722         * modules/unistr/u16-strstr: New file.
1723         * modules/unistr/u32-strstr: New file.
1724         * lib/unistr/u8-strstr.c: New file.
1725         * lib/unistr/u16-strstr.c: New file.
1726         * lib/unistr/u32-strstr.c: New file.
1727         * lib/unistr/u-strstr.h: New file.
1728
1729         * modules/unistr/u8-strtok: New file.
1730         * modules/unistr/u16-strtok: New file.
1731         * modules/unistr/u32-strtok: New file.
1732         * lib/unistr/u8-strtok.c: New file.
1733         * lib/unistr/u16-strtok.c: New file.
1734         * lib/unistr/u32-strtok.c: New file.
1735         * lib/unistr/u-strtok.h: New file.
1736
1737         * modules/unistr/u8-uctomb: New file.
1738         * modules/unistr/u16-uctomb: New file.
1739         * modules/unistr/u32-uctomb: New file.
1740         * lib/unistr/u8-uctomb.c: New file.
1741         * lib/unistr/u16-uctomb.c: New file.
1742         * lib/unistr/u32-uctomb.c: New file.
1743
1744         * MODULES.html.sh (Unicode string functions): Add the new modules.
1745
1746 2007-01-08  Bruno Haible  <bruno@clisp.org>
1747
1748         * gnulib-tool (func_all_modules): Use find, not ls, to traverse the
1749         modules directory. Filter out CVS, ChangeLog, COPYING, README also from
1750         subdirectories.
1751
1752 2007-01-08  Karl Berry  <karl@gnu.org>
1753
1754         * doc/error.texi: mention that main() fns must set program_name
1755         when progname is used.
1756
1757 2007-01-08  Paul Eggert  <eggert@cs.ucla.edu>
1758
1759         * m4/wctype.m4 (gl_WCTYPE_H): Compute ABSOLUTE_WCTYPE_H even if
1760         WCTYPE_H is empty, for the benefit of builds from non-distclean
1761         directories.  Problem reported by Eric Blake in
1762         <http://lists.gnu.org/archive/html/bug-gnulib/2007-01/msg00157.html>.
1763
1764 2007-01-08  Bruno Haible  <bruno@clisp.org>
1765
1766         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Remove
1767         PROVIDE_CANONICALIZE_FILENAME_MODE macro definition.
1768         * lib/canonicalize.h: Test GNULIB_CANONICALIZE instead of
1769         PROVIDE_CANONICALIZE_FILENAME_MODE.
1770         * modules/canonicalize (configure.ac): Use gl_MODULE_INDICATOR.
1771
1772 2007-01-08  Bruno Haible  <bruno@clisp.org>
1773
1774         * m4/fts.m4 (gl_FUNC_FTS_LGPL): Remove _LGPL_PACKAGE macro definition.
1775         * lib/fts_.h (_LGPL_PACKAGE): Remove macro.
1776         Use !GNULIB_FTS instead of _LGPL_PACKAGE.
1777         * lib/fts.c: Likewise.
1778         * modules/fts (configure.ac): Use gl_MODULE_INDICATOR.
1779
1780 2006-12-25  Bruno Haible  <bruno@clisp.org>
1781
1782         * modules/utf8-ucs4-safe: New file.
1783         * lib/utf8-ucs4-safe.h: New file.
1784         * lib/unistr/utf8-ucs4-safe.c: New file.
1785
1786         * modules/utf16-ucs4-safe: New file.
1787         * lib/utf16-ucs4-safe.h: New file.
1788         * lib/unistr/utf16-ucs4-safe.c: New file.
1789
1790         * MODULES.html.sh (Unicode string functions): Add the new modules.
1791
1792 2007-01-08  Bruno Haible  <bruno@clisp.org>
1793
1794         * modules/utf8-ucs4 (Files, lib_SOURCES): Add unistr/utf8-ucs4.c.
1795         (Depends-on): Add unitypes.
1796         * lib/utf8-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1797         (u8_mbtouc_aux): Move out to separate file.
1798         (u8_mbtouc): Use ucs4_t, uint8_t types.
1799         * lib/unistr/utf8-ucs4.c: New file.
1800
1801         * modules/utf16-ucs4 (Files, lib_SOURCES): Add unistr/utf16-ucs4.c.
1802         (Depends-on): Add unitypes.
1803         * lib/utf16-ucs4.h: Add double-inclusion guard. Include unitypes.h.
1804         (u16_mbtouc_aux): Move out to separate file.
1805         (u16_mbtouc): Use ucs4_t, uint16_t types.
1806         * lib/unistr/utf16-ucs4.c: New file.
1807
1808         * modules/ucs4-utf8 (Files, lib_SOURCES): Add unistr/ucs4-utf8.c.
1809         (Depends-on): Add unitypes.
1810         * lib/ucs4-utf8.h: Add double-inclusion guard. Include unitypes.h.
1811         (u8_uctomb_aux): Move out to separate file.
1812         (u8_uctomb): Use ucs4_t, uint8_t types.
1813         * lib/unistr/ucs4-utf8.c: New file.
1814
1815         * modules/ucs4-utf16 (Files, lib_SOURCES): Add unistr/ucs4-utf16.c.
1816         (Depends-on): Add unitypes.
1817         * lib/ucs4-utf16.h: Add double-inclusion guard. Include unitypes.h.
1818         (u16_uctomb_aux): Move out to separate file.
1819         (u16_uctomb): Use ucs4_t, uint16_t types.
1820         * lib/unistr/ucs4-utf16.c: New file.
1821
1822 2006-12-25  Bruno Haible  <bruno@clisp.org>
1823
1824         * modules/unitypes: New file.
1825         * lib/unitypes.h: New file.
1826         * MODULES.html.sh (func_all_modules): New section "Unicode string
1827         functions". Move ucs4-utf8, ucs4-utf16, utf8-ucs4, utf16-ucs4 to
1828         this section. Add unitypes.
1829
1830 2007-01-08  Bruno Haible  <bruno@clisp.org>
1831
1832         Avoid variable names that conflict with those from libtool.
1833         * m4/lib-link.m4 (AC_LIB_RPATH, AC_LIB_LINKFLAGS_BODY,
1834         AC_LIB_LINKFLAGS_FROM_LIBS): Rename libext to acl_libext,
1835         shlibext to acl_shlibext, libname_spec to acl_libname_spec,
1836         library_names_spec to acl_library_names_spec, hardcode_* to
1837         acl_hardcode_*.
1838         Reported by Ralf Wildenhues.
1839
1840 2007-01-08  Bruno Haible  <bruno@clisp.org>
1841
1842         * m4/gc-arcfour.m4 (gl_GC_ARCFOUR): Remove GC_USE_ARCFOUR macro
1843         definition.
1844         * m4/gc-arctwo.m4 (gl_GC_ARCTWO): Remove GC_USE_ARCTWO macro
1845         definition.
1846         * m4/gc-des.m4 (gl_GC_DES): Remove GC_USE_DES macro definition.
1847         * m4/gc-hmac-md5.m4 (gl_GC_HMAC_MD5): Remove GC_USE_HMAC_MD5 macro
1848         definition.
1849         * m4/gc-hmac-sha1.m4 (gl_GC_HMAC_SHA1): Remove GC_USE_HMAC_SHA1 macro
1850         definition.
1851         * m4/gc-md2.m4 (gl_GC_MD2): Remove GC_USE_MD2 macro definition.
1852         * m4/gc-md4.m4 (gl_GC_MD4): Remove GC_USE_MD4 macro definition.
1853         * m4/gc-md5.m4 (gl_GC_MD5): Remove GC_USE_MD5 macro definition.
1854         * m4/gc-random.m4 (gl_GC_RANDOM): Remove GC_USE_RANDOM macro
1855         definition.
1856         * m4/gc-rijndael.m4 (gl_GC_RIJNDAEL): Remove GC_USE_RIJNDAEL macro
1857         definition.
1858         * m4/gc-sha1.m4 (gl_GC_SHA1): Remove GC_USE_SHA1 macro definition.
1859         * lib/gc-gnulib.c: Use GNULIB_GC_<algorithm> instead of
1860         GC_USE_<algorithm>.
1861         * lib/gc-libgcrypt.c: Likewise.
1862         * modules/gc-arcfour (configure.ac): Use gl_MODULE_INDICATOR.
1863         * modules/gc-arctwo (configure.ac): Likewise.
1864         * modules/gc-des (configure.ac): Likewise.
1865         * modules/gc-hmac-md5 (configure.ac): Likewise.
1866         * modules/gc-hmac-sha1 (configure.ac): Likewise.
1867         * modules/gc-md2 (configure.ac): Likewise.
1868         * modules/gc-md4 (configure.ac): Likewise.
1869         * modules/gc-md5 (configure.ac): Likewise.
1870         * modules/gc-random (configure.ac): Likewise.
1871         * modules/gc-rijndael (configure.ac): Likewise.
1872         * modules/gc-sha1 (configure.ac): Likewise.
1873
1874 2007-01-08  Bruno Haible  <bruno@clisp.org>
1875
1876         * m4/close-stream.m4 (gl_CLOSE_STREAM): Remove GNULIB_CLOSE_STREAM
1877         macro definition.
1878         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Remove GNULIB_FCNTL_SAFER macro
1879         definition.
1880         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Remove GNULIB_FOPEN_SAFER macro
1881         definition.
1882         * modules/close-stream (configure.ac): Invoke gl_MODULE_INDICATOR.
1883         * modules/fcntl-safer (configure.ac): Likewise.
1884         * modules/fopen-safer (configure.ac): Likewise.
1885         * modules/fwriteerror (configure.ac): Likewise. Remove explicit
1886         GNULIB_FWRITEERROR macro definition.
1887
1888 2007-01-08  Bruno Haible  <bruno@clisp.org>
1889
1890         * m4/gnulib-common.m4: New file.
1891         * gnulib-tool (func_get_autoconf_snippet): Undo last change.
1892         (func_get_filelist): Add m4/gnulib-common.m4.
1893
1894 2007-01-08  Bruno Haible  <bruno@clisp.org>
1895
1896         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Simplify the sorting
1897         command.
1898
1899 2007-01-08  Jim Meyering  <jim@meyering.net>
1900
1901         Use a more robust test for a "can't happen" condition.
1902         * lib/fts.c (fts_read): Revert the change of 2006-11-22, since it
1903         narrowed the st_size value.  Presuming the "can't happen" condition
1904         is true, that narrowing could conceivably convert an invalid st_size
1905         value into a valid one.  Instead, use a change based on Matthew
1906         Woehlke's original patch.
1907
1908         Slight readability improvement: use an assert-like macro
1909         in place of literal "abort ()" uses.
1910         * lib/fts.c (fts_assert): Define.
1911         (fts_set_stat_required, cwd_advance_fd, fts_read, fd_ring_check):
1912         Use this macro instead of a bare 'abort'.
1913
1914 2007-01-05  Paul Eggert  <eggert@cs.ucla.edu>
1915
1916         Don't worry about using IRIX 5.3's wctype.h broken definitions;
1917         simply work around them.
1918         * lib/wctype_.h: Remove test for HAVE_WCTYPE_CTMP_BUG.
1919         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph, iswlower):
1920         (iswprint, iswpunct, iswspace, iswupper, iswxdigit): Undef before declaring.
1921         Don't bother to define as macros, since the standard doesn't require it.
1922         * m4/wctype.m4 (WCTYPE_H, ABSOLUTE_WCTYPE_H): Simplify, since we no
1923         longer worry about IRIX 5.3.
1924         (HAVE_WCTYPE_CTMP_BUG): Remove.
1925
1926 2007-01-04  Paul Eggert  <eggert@cs.ucla.edu>
1927
1928         * lib/wctype_.h (_ctmp_) [HAVE_WCTYPE_CTMP_BUG]: Now of type wchar_t,
1929         not wint_t.  Also, include <ctype.h>, to fix another IRIX bug.
1930         * m4/wctype.m4 (gl_WCTYPE_H): Likewise.
1931         Problems reported by Georg Schwarz for IRIX 5.3.
1932
1933         * gnulib-tool (autoconf_minversion): Take the maximum version number
1934         found, not the minimum.  Problem reported by James Youngman.
1935
1936 2007-01-03  Karl Berry  <karl@gnu.org>
1937
1938         * doc/error.texi: new file, explaining interaction with progname.
1939         * doc/gnulib.texi: include it.  Update copyright.
1940
1941 2007-01-03  Simon Josefsson  <simon@josefsson.org>
1942
1943         * gnulib-tool (func_create_testdir): Run AC_CANONICAL_BUILD and
1944         AC_CANONICAL_HOST, to improve autobuild outputs.
1945
1946 2007-01-03  Paolo Bonzini  <bonzini@gnu.org>
1947             Yoann Vandoorselaere <yoann.v@prelude-ids.com>
1948
1949         * lib/poll.c (poll): Use recv on Mac OS X to distinguish connected
1950         sockets, server sockets, and other file descriptors.  Count errors
1951         to compute the return value.  Reorder the code a bit to be easier
1952         to follow.  Don't set event bits that were not requested (except
1953         POLLERR and POLLHUP).
1954
1955 2007-01-01  Bruno Haible  <bruno@clisp.org>
1956
1957         * modules/lchmod (Include): Require lchmod.h, not lchown.h.
1958
1959 2007-01-03  Jim Meyering  <jim@meyering.net>
1960
1961         * modules/fts-lgpl (Depends-on): Add i-ring.  Reported by Bruno Haible.
1962
1963 2007-01-02  Bruno Haible  <bruno@clisp.org>
1964
1965         * modules/settime (Include): Require timespec.h.
1966         * modules/nanosleep (Include): Likewise.
1967
1968 2007-01-01  Bruno Haible  <bruno@clisp.org>
1969
1970         * gnulib-tool (func_emit_copyright_notice): Bump year.
1971         (func_get_autoconf_snippet): Emit a GNULIB_<modulename> macro.
1972
1973 2007-01-01  Bruno Haible  <bruno@clisp.org>
1974
1975         Improve support for OpenBSD.
1976         * build-aux/config.rpath (libname_spec): Export.
1977         (library_names_spec): New variable. Export.
1978         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Extract libname_spec and
1979         library_names_spec from the config.rpath output. Locate shared library
1980         through the name pattern in library_names_spec.
1981
1982 2007-01-01  Eric Blake  <ebb9@byu.net>
1983
1984         * lib/version-etc.c (COPYRIGHT_YEAR): Bump for new year.
1985
1986 2006-12-30  Paul Eggert  <eggert@cs.ucla.edu>
1987
1988         * gnulib-tool (SORT): Remove, since we no longer assume GNU sort.
1989         Rewrite so as not to assume GNU sort or "tail -1".  Also, don't
1990         assume the C locale, and avoid an "eval" that could cause trouble.
1991         Problem with SORT reported by Bob Proulx.
1992
1993         * lib/getpagesize.h (getpagesize) [defined __amigaos4__]:
1994         Define.  Trivial patch from Henning Nielsen Lund, originally
1995         sent to bug-grep@gnu.org today.
1996
1997 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
1998
1999         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
2000         struct stat.  Problem reported by Henning Nielsen Lund.
2001         * lib/acl.c: Include acl.h first, to check interface.  Don't
2002         bother to include sys/types.h and sys/stat.h again.
2003
2004 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
2005
2006         Import the following change from libc; problem reported by
2007         Sven Verdoolaege.
2008
2009         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
2010
2011         [BZ #1373]
2012         * lib/argp.h: Remove __NTH for __argp_usage inline function.
2013
2014 2006-12-28  Jim Meyering  <jim@meyering.net>
2015
2016         * build-aux/announce-gen: Do not assume that the package
2017         builds any of tar.gz, tar.bz2, and .xdelta files.
2018         Suggestion from Simon Josefsson.
2019
2020 2006-12-28  Simon Josefsson  <simon@josefsson.org>
2021
2022         * modules/announce-gen: New file.
2023
2024 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
2025
2026         * lib/mbchar.h: Just include <wctype.h>; the wctype module
2027         handles its gotchas now.
2028         * lib/mbswidth.c: Likewise.
2029         * lib/wcwidth.h: Likewise.
2030         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
2031         and iswcntrl; the wctype module does this stuff now.
2032         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2033         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
2034         * modules/mbchar (Depends-on): Add wctype.
2035         * modules/mbswidth (Depends-on): Likewise.
2036         * modules/wcwidth (Depends-on): Likewise.
2037
2038 2006-12-27  Eric Blake  <ebb9@byu.net>
2039
2040         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
2041         module uses more than what <wctype.h> is required to provide.
2042
2043 2006-12-26  Eric Blake  <ebb9@byu.net>
2044
2045         * gnulib-tool (sed_extract_prog): Avoid space-tab.
2046
2047 2006-12-26  Eric Blake  <ebb9@byu.net>
2048
2049         * modules/absolute-header: New module.
2050         * modules/fcntl (Depends-on): Depend on it.
2051         * modules/inttypes (Depends-on): Likewise.
2052         * modules/stdint (Depends-on): Likewise.
2053         * modules/sys_stat (Depends-on): Likewise.
2054         * modules/wctype (Depends-on): Likewise.
2055         * MODULES.html.sh (Support for building libraries and
2056         executables): Document it.
2057
2058 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
2059
2060         * gnulib-tool (SED): Remove, undoing previous change.
2061         The problem was that it broke coreutils on Solaris, because
2062         "sed --posix" leaked into a makefile.
2063         (sed): New alias, if 'alias' and GNU sed.
2064
2065 2006-12-24  Jim Meyering  <jim@meyering.net>
2066
2067         Work around an fchownat bug in glibc-2.4:
2068         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
2069         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
2070         in spite of the -P option.
2071         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
2072         New macros.
2073         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
2074         * modules/openat (Files): Add lib/fchownat.c.
2075         * lib/openat.c (fchownat): Don't define here.  Move to...
2076         * lib/fchownat.c: ...this new file.
2077
2078 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
2079
2080         Fix bug reported by Bruno Haible in
2081         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
2082         where quotearg.c didn't compile on Mac OS X 10.2 because it
2083         lacks <wchar.h> and wint_t.
2084         * lib/wctype_.h (__wctype_wint_t): New type.
2085         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
2086         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
2087         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
2088         Arg is now of type __wctype_wint_t, not wint_t.
2089         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
2090         substitute HAVE_WINT_T.
2091         * modules/wctype (Files): Add m4/wint_t.m4.
2092         (wctype.h): Substitute HAVE_WINT_T.
2093
2094 2006-12-23  Bruno Haible  <bruno@clisp.org>
2095
2096         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
2097
2098 2006-12-23  Bruno Haible  <bruno@clisp.org>
2099
2100         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
2101         S_ISLNK.
2102         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
2103         mingw.
2104
2105 2006-12-22  Bruno Haible  <bruno@clisp.org>
2106
2107         * lib/copy-file.c: Include acl.h.
2108         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
2109         Close the file descriptors only after being done with copy_acl.
2110         * modules/copy-file (Depends-on): Add acl.
2111
2112 2006-12-22  Bruno Haible  <bruno@clisp.org>
2113
2114         * gnulib-tool (SED): New variable.
2115         Use $SED instead of sed everywhere.
2116
2117 2006-12-22  Bruno Haible  <bruno@clisp.org>
2118
2119         * modules/no-c++: New file.
2120         * m4/no-c++.m4: New file.
2121         * MODULES.html.sh (Support for building libraries and executables):
2122         Add no-c++.
2123
2124 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
2125
2126         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
2127         Include <limits.h>, and use its INT_MAX to rewrite the
2128         j loop so that it does not overflow 'int'.  Problem reported by
2129         Ralf Wildenhues in
2130         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
2131         Play it safe by shifting left by 1 rather than multiplying by 2,
2132         as GCC is less likely to optimize this away when the value
2133         is signed (when it assumes overflow leads to undefined behavior).
2134         Also, don't assume time_t uses two's complement.
2135
2136 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
2137
2138         * MODULES.html.sh: New module wctype.
2139         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
2140         * lib/fnmatch.c: Don't bother to include <wchar.h> before
2141         <wctype.h>, since the new wctype module should fix this.
2142         * lib/quotearg.c: Include <wctype.h> unconditionally, since
2143         the wctype module should arrange for it.
2144         * lib/regex_internal.h: Likewise.
2145         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
2146         since the wctype module should handle this now.
2147         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
2148         * modules/fnmatch (Depends-on): Add wctype.
2149         * modules/quotearg (Depends-on): Likewise.
2150         * modules/regex (Depends-on): Likewise.
2151
2152 2006-12-19  Bruno Haible  <bruno@clisp.org>
2153
2154         * lib/strdup.h [C++]: Wrap definitions in extern "C".
2155         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
2156
2157 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2158
2159         * modules/savewd (Depends-on): Fix dependency on fcntl.
2160
2161 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2162
2163         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
2164         conforms to C99, rather than relying on the user's environment
2165         setting of STDINT_H.
2166
2167 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
2168         and Eric Blake  <ebb9@byu.net>
2169
2170         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
2171         This is more consistent with the other defines here.
2172         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
2173         Port to z/OS.  Problem reported by Paul Gilmartin.
2174         Change local vars to use gl_ prefix rather than ac_.
2175         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
2176         with other defines.
2177         * modules/double-slash-root: New module.
2178         * modules/dirname (Files): Remove m4/double-slash-root.m4.
2179         (Depends-on): Add double-slash-root.
2180         * MODULES.html.sh (File system functions): Mention new module.
2181
2182 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
2183
2184         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
2185         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
2186         This is for the benefit of gzip, which doesn't do i18n.
2187
2188 2006-12-12  Jim Meyering  <jim@meyering.net>
2189
2190         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
2191         Reported by Andreas Schwab <schwab@suse.de>.
2192
2193 2006-12-12  Bruno Haible  <bruno@clisp.org>
2194
2195         Merge these changes.
2196         2006-09-05  Bruno Haible  <bruno@clisp.org>
2197         * lib/iconvme.c (iconv_string): No need to save and restore errno when
2198         iconv_alloc succeeded.
2199         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
2200         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
2201         test for " && dest " at the end - dest is always != NULL there. Call
2202         iconv with 4xNULL arguments initially, to reset the state. Call iconv
2203         with 2xNULL arguments, also to flush the state storage. Handle the
2204         IRIX iconv behaviour. Realloc the final result, to throw away unused
2205         memory.
2206
2207 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
2208
2209         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
2210         and fchmodat unconditionally, since glibc 2.4 has them.
2211         Problem reported by Arkadiusz Miskiewicz.
2212
2213 2006-12-10  Bruno Haible  <bruno@clisp.org>
2214
2215         * gnulib-tool (func_import): Show the include files only for those
2216         modules that are copied and specified.
2217         Reported by Karl Berry.
2218
2219 2006-12-08  Jim Meyering  <jim@meyering.net>
2220
2221         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
2222         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
2223
2224         * build-aux/announce-gen: Add two new options, both optional:
2225         --bootstrap-tools=TOOL_LIST
2226               a comma-separated list of tools, e.g.,
2227               autoconf,automake,bison,gnulib
2228         --gnulib-snapshot-date=DATE
2229               if gnulib is in the bootstrap tool list,
2230               then report this as the snapshot date.
2231               If not specified, use the current date/time.
2232               If you specify a date here, be sure it's UTC.
2233
2234 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2235
2236         * tests/test-argp-2.sh: Fix test to match actual output.
2237         (func_compare): Fix sed script to be portable.
2238
2239 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
2240
2241         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
2242         workaround for this case.  It is not autoconfigured now; offhand
2243         it's hard to see how to autoconfigure it.
2244
2245 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
2246
2247         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
2248         a directory that is about to be chowned.  Such a directory's
2249         initial file permissions should permit the owner only and this
2250         should not be changed until after the chown, since the group and
2251         other bits would be incorrect if they granted permission before
2252         the chown.
2253
2254         Fix porting problem for iswctype reported by Georg Schwarz in:
2255         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
2256         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
2257         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
2258         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
2259         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
2260
2261 2006-12-03  Jim Meyering  <jim@meyering.net>
2262
2263         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
2264         p->fts_statp may not yet be defined.
2265         (fts_read): Instead, set it in the caller, once p->fts_statp is
2266         sure to be defined, and corresponds to a top-level directory.
2267         This bug made du -x fail.  Here's the coreutils test case:
2268         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
2269         Reported by Mike Frysinger.
2270
2271 2006-12-01  Jim Meyering  <jim@meyering.net>
2272
2273         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
2274         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
2275         Reported by Simon Josefsson.
2276
2277 2006-11-30  Jim Meyering  <jim@meyering.net>
2278
2279         * m4/warning.m4: Use the all-permissive copyright notice
2280         recommended by RMS (rather than LGPL).
2281         * m4/vararrays.m4: Likewise.
2282         * m4/flexmember.m4: Likewise.
2283
2284 2006-11-29  Bruno Haible  <bruno@clisp.org>
2285
2286         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2287         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
2288         using +=.
2289         Reported by Simon Josefsson <simon@josefsson.org>.
2290
2291 2006-11-28  James Youngman <jay@gnu.org>
2292
2293         * README: Advise users that they might find the bug-gnulib@gnu.org
2294         and autotools-announce@gnu.org mailing lists useful.
2295
2296 2006-11-28  Bruno Haible  <bruno@clisp.org>
2297
2298         * m4/ptrdiff_max.m4: Remove file.
2299
2300 2006-11-21  Bruno Haible  <bruno@clisp.org>
2301
2302         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
2303         _AC_COMPUTE_INT.
2304         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2305         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
2306         _AC_COMPUTE_INT.
2307         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2308         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
2309         _AC_COMPUTE_INT.
2310         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2311
2312 2006-11-28  Jim Meyering  <jim@meyering.net>
2313
2314         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
2315         warning from "gcc -Wshadow" about shadowing the builtin.
2316
2317 2006-11-27  Bruno Haible  <bruno@clisp.org>
2318
2319         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
2320         _AC_COMPUTE_INT.
2321         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
2322
2323 2006-11-27  Bruno Haible  <bruno@clisp.org>
2324             Paul Eggert  <eggert@cs.ucla.edu>
2325
2326         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
2327
2328 2006-11-26  Bruno Haible  <bruno@clisp.org>
2329
2330         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
2331         noinst_LTLIBRARIES.
2332
2333 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
2334             Bruno Haible  <bruno@clisp.org>
2335
2336         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
2337         if compiling with "gcc -ansi".
2338
2339 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
2340
2341         Fix some incompatibilities with gcc -ansi -pedantic.
2342         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
2343         if compiling pedantically with GCC, unless it's C99 or later.
2344         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
2345         it mishandles gcc -ansi -pedantic as well.
2346         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
2347         if gcc -pedantic.
2348         * lib/regexec.c (check_node_accept_bytes): Don't use auto
2349         initializers for struct if -pedantic, unless it's C99 or later.
2350
2351 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
2352
2353         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
2354         Don't close an fd more than once. Identical atimes indicate
2355         success, not failure.
2356
2357 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
2358
2359         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
2360
2361 2006-11-23  Jim Meyering  <jim@meyering.net>
2362
2363         * build-aux/announce-gen: New file.  From coreutils.
2364
2365 2006-11-22  Jim Meyering  <jim@meyering.net>
2366
2367         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
2368         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
2369         (fts_read): Use a temporary to narrow the overused st_size member
2370         before using it in a switch statement.  Reported by Matthew Woehlke.
2371
2372         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
2373         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
2374
2375 2006-11-20  Bruno Haible  <bruno@clisp.org>
2376
2377         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
2378         changequote instead of pairs of brackets.
2379         Reported by Andreas Schwab <schwab@suse.de>.
2380
2381 2006-11-21  Jim Meyering  <jim@meyering.net>
2382
2383         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
2384         so as to remain compatible with older compilers.
2385         Patch from Michael Deutschmann.
2386
2387 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2388
2389         * MODULES.html.sh (File system functions): Add openat.
2390
2391         * lib/openat.h (rpl_fstatat): New macro, if
2392         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
2393         (fstatat): Define to rpl_fstatat under the same conditions,
2394         unless COMPILING_FSTATAT.
2395         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
2396         seems to have the bug.
2397         * lib/fstatat.c: New file.
2398         * modules/openat (Files): Add it.
2399
2400 2006-11-20  Bruno Haible  <bruno@clisp.org>
2401
2402         * Makefile: New file.
2403
2404 2006-11-20  Jim Meyering  <jim@meyering.net>
2405
2406         The beginnings of syntax-related checks for gnulib.
2407         * lib/Makefile: New file.
2408         * lib/t-idcache: New script.  Ensure that the two halves of
2409         idcache.c stay in sync.
2410
2411         * lib/idcache.c: Adjust comments in user- and group- portions to
2412         be more accurate, and to be consistent with one another.
2413
2414 2006-11-20  Jim Meyering  <jim@meyering.net>
2415
2416         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
2417         continue using the flexible array member (thus, this module performs
2418         half as many malloc calls), with the addition that...
2419         (getgroup, getuser): Consistently record a non-match via an empty
2420         "name" string, and map an empty string match to a NULL return value.
2421         * modules/idcache (Depends-on): Re-add flexmember.
2422
2423         * lib/idcache.c (getuser): Remove all uses of the register keyword.
2424         (getuidbyname, getgroup, getgidbyname): Likewise.
2425
2426         Use cleaner syntax: NULL rather than 0.
2427         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
2428
2429 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
2430
2431         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
2432         It mishandled the case where the group was missing.
2433         Problem reported by Greg Schafer.
2434         * modules/idcache: Likewise.
2435
2436 2006-11-18  Jim Meyering  <jim@meyering.net>
2437
2438         * check-module (%exempt_header): Add exception for some
2439         conditionally-included headers.
2440
2441         * modules/i-ring (Depends-on): Add verify.
2442         (License): Change to LGPL.
2443
2444 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
2445
2446         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
2447         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
2448         and inttostr.h.  Use snprintf rather than uinttostr, so that
2449         LGPLed code doesn't depend on GPLed.
2450
2451 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
2452
2453         * modules/inline (License): Change from GPL to LGPL.
2454
2455 2006-11-17  Jim Meyering  <jim@meyering.net>
2456
2457         * modules/d-type (License): Switch to LGPL.
2458
2459 2006-11-15  Bruno Haible  <bruno@clisp.org>
2460
2461         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
2462
2463 2006-11-15  Eric Blake  <ebb9@byu.net>
2464
2465         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
2466         the module dependency.
2467
2468 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
2469             Bruno Haible  <bruno@clisp.org>
2470
2471         * gnulib-tool (func_create_testdir): Add license consistency check.
2472
2473 2006-11-15  Eric Blake  <ebb9@byu.net>
2474
2475         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
2476         random "(cached)" in configure output.
2477
2478 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2479
2480         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
2481         test for conforming inttypes.h is both announced and cached.
2482
2483         * MODULES.html.sh (seen_modules, seen_files): New variables.
2484         (func_module): Rewrite to use a few less gnulib-tool and sed
2485         invocations.  Avoid a couple of quadratic algorithms for ...
2486         (missed_modules, missed_files): ... these, with ...
2487         (func_append, func_tmpdir): ... these new functions, from
2488         gnulib-tool.  Analogously, install traps for cleanup.
2489
2490         * tests/test-gc.c (main): Remove unused variables.
2491         * tests/test-read-file.c: Include stdlib.h, for 'free'.
2492
2493 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
2494
2495         * modules/inttostr (License): Change to LGPL.
2496
2497 2006-11-14  Eric Blake  <ebb9@byu.net>
2498
2499         * modules/tempname (License): Change to LGPL.
2500
2501 2006-11-14  Eric Blake  <ebb9@byu.net>
2502
2503         * doc/functions.texi (Function Portability): *printf functions on
2504         Cygwin now understand all POSIX size specifiers.
2505
2506 2006-11-14  Bruno Haible  <bruno@clisp.org>
2507
2508         * modules/c-ctype (License): Change to LGPL.
2509
2510 2006-11-12  Bruno Haible  <bruno@clisp.org>
2511
2512         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
2513         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
2514         for GNOME libraries, for which the include files are installed in
2515         subdirectories of $prefix/include.
2516
2517 2006-11-12  Bruno Haible  <bruno@clisp.org>
2518
2519         * m4/lib-link.m4: Require at least autoconf-2.54.
2520         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
2521         name to underscores for the --with option.
2522
2523 2006-11-13  Bruno Haible  <bruno@clisp.org>
2524
2525         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
2526         the tests directory.
2527         Reported by Ralf Wildenhues.
2528
2529 2006-11-13  Bruno Haible  <bruno@clisp.org>
2530
2531         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
2532         (func_emit_initmacro_end): Undo the override here.
2533         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
2534         Works around the famous automake error in coreutils.
2535
2536 2006-11-13  Eric Blake  <ebb9@byu.net>
2537
2538         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
2539         element, not its node.
2540
2541 2006-11-12  Bruno Haible  <bruno@clisp.org>
2542
2543         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
2544         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
2545
2546 2006-11-12  Bruno Haible  <bruno@clisp.org>
2547
2548         * gnulib-tool: New option --local-symlink.
2549         (func_usage): Document it.
2550         (lsymbolic): New variable.
2551         (func_import, func_create_testdir): If --symlink was not specified,
2552         test whether --local-symlink was specified and the file comes from
2553         the local_gnulib_dir.
2554
2555 2006-11-12  Bruno Haible  <bruno@clisp.org>
2556
2557         * gnulib-tool (func_ln): New function.
2558         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
2559
2560 2006-11-12  Bruno Haible  <bruno@clisp.org>
2561
2562         Finish support for source files in subdirectories.
2563         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
2564         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
2565         AUTOMAKE_OPTIONS.
2566         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
2567
2568 2006-11-12  Bruno Haible  <bruno@clisp.org>
2569
2570         * gnulib-tool (func_get_automake_snippet): Synthesize also an
2571         EXTRA_lib_SOURCES augmentation.
2572         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
2573
2574 2006-11-12  Jim Meyering  <jim@meyering.net>
2575
2576         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
2577         file descriptors.  This also averts a failure on systems with
2578         native openat support when a traversed directory lacks "x" access.
2579         * lib/fts_.h: Include "i-ring.h"
2580         (struct FTS) [fts_fd_ring]: New member.
2581         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
2582         (FCHDIR): Add parentheses.
2583         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
2584         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
2585         When descending, rather than simply closing the previous
2586         fts_cwd_fd value, push that file descriptor onto the ring.
2587         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
2588         (fts_open): Initialize the new fd_ring member.
2589         (fts_close): Clear the ring.
2590         (fts_safe_changedir): When possible, use our new fd_ring to skip
2591         the diropen and fstat and dev/ino comparison that would normally
2592         accompany a virtual `chdir ("..")'.
2593
2594         * modules/fts (Depends-on): Add i-ring.
2595         * modules/i-ring: New module.
2596         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
2597         * m4/i-ring.m4: New file.
2598
2599 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2600
2601         * gnulib-tool (func_create_testdir): Fix replacement of
2602         `build-aux' in configure.ac.  Run autotools in gltests
2603         subdirectory.
2604         (func_create_testdir, func_create_megatestdir, test): There is
2605         no need for '--force' in most autotool invocations in a new
2606         tree.  Actually fail the whole test if any of the tools, or the
2607         configure or make stages fail.
2608
2609         Sync from Automake.
2610         * build-aux/gnupload: Revert last change.  Add pointer to upload
2611         instructions of the GNU Maintenance Instructions.
2612         Suggestion by Karl Berry.
2613
2614 2006-11-10  Jim Meyering  <jim@meyering.net>
2615
2616         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
2617
2618 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2619
2620         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
2621         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
2622         (bind_textdomain_codeset) [! ENABLE_NLS]:
2623         Evaluate all the arguments.  That way, callers get compatible behavior
2624         if the arguments have side effects.  Also, it avoids some GCC
2625         diagnostics in some cases; Joel E. Denny reported problems when Bison
2626         was configured with --enable-gcc-warnigs.
2627
2628 2006-11-10  Jim Meyering  <jim@meyering.net>
2629
2630         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
2631         relevant options in CFLAGS (like -O, -fno-inline) are taken into
2632         account.
2633
2634 2006-11-10  Jim Meyering  <jim@meyering.net>
2635
2636         * modules/inline: New file/module.
2637         * modules/xalloc (Files): Remove m4/inline.m4.
2638         (Depends-on): Add inline, instead.
2639         * modules/oset: Likewise.
2640         * modules/list: Likewise.
2641
2642 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
2643
2644         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
2645         Problem reported by Matthew Woehlke.
2646
2647 2006-11-09  Bruno Haible  <bruno@clisp.org>
2648
2649         * lib/tempname.c (gen_tempname): Remove variant that invokes
2650         __gen_tempname.
2651         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
2652         __gen_tempname.
2653
2654 2006-11-08  Bruno Haible  <bruno@clisp.org>
2655
2656         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
2657         to 'yes' instead of 'cross-compiling'.
2658
2659 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
2660
2661         * lib/quotearg.h (quotearg_free): New decl.
2662         * lib/quotearg.c (quotearg_free): New function.
2663         (slot0, nslots, slotvec0, slotvec):
2664         Now file-scope so that quotearg_free can get at them.
2665
2666 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2667
2668         Sync from Automake.
2669         * build-aux/gnupload: Add missing 'gnu' to example URL.
2670         Report by Karl Berry.
2671
2672 2006-11-08  Bruno Haible  <bruno@clisp.org>
2673
2674         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
2675         Suggested by Paul Eggert.
2676
2677 2006-11-08  Jim Meyering  <jim@meyering.net>
2678
2679         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
2680         It's already included if !_LIBC.
2681         (fts_safe_changedir): Add a comment.
2682
2683 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2684
2685         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
2686         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
2687         Matthew Woehlke.
2688
2689         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
2690         definitions up, to avoid colliding with change below.
2691         (static_inline) [HAVE_INLINE]: New macro.
2692         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
2693         Provide extern decls when !HAVE_INLINE.  Do not define unless
2694         static_inline is defined, either by us or by xmalloc.c.  Use
2695         static_inline rather than static inline.
2696         (XCALLOC): Optimize sizeof(T) = 1 case.
2697         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
2698
2699 2006-11-07  Bruno Haible  <bruno@clisp.org>
2700
2701         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
2702         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
2703         AC_C_INLINE.
2704         * modules/xalloc (Files): Add m4/inline.m4.
2705
2706 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2707
2708         * README: Fix typo.
2709         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
2710         (Miscellanous Notes): ...from this.
2711
2712 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
2713
2714         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
2715         Mention that offsetof should be used instead of sizeof.
2716         From Bruno Haible.
2717
2718 2006-11-07  Bruno Haible  <bruno@clisp.org>
2719
2720         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
2721
2722 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2723
2724         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2725         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
2726         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2727         (gl_tree_add_before, gl_tree_add_after):
2728         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
2729         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
2730         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
2731         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
2732         (gl_linked_add_after, gl_linked_add_at): Likewise.
2733         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
2734         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
2735         (gl_tree_add_before, gl_tree_add_after): Likewise.
2736         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
2737         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
2738         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
2739
2740 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2741
2742         * lib/gl_oset.h: Use C comment style, not C++ comment style.
2743
2744 2006-11-06  Bruno Haible  <bruno@clisp.org>
2745
2746         * m4/inline.m4: New file.
2747         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
2748         * modules/list (Files): Add m4/inline.m4.
2749         * modules/oset (Files): Likewise.
2750
2751 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
2752
2753         * lib/idcache.c: Include <stddef.h>, for offsetof.
2754         (struct userid.name): Change from char * to a flexible array member.
2755         All uses changed.
2756         * modules/idcache (Depends-on): Add flexmember.
2757
2758         * MODULES.html.sh (Core language properties): New module flexmember.
2759         * modules/flexmember, m4/flexmember.m4: New files.
2760
2761         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
2762         inline functions that are identical with the old xnmalloc_inline,
2763         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
2764         that we can avoid some unnecessary integer multiplications and
2765         divisions in the common case where the element size is known at
2766         compile time.
2767         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
2768         needed.
2769         (xnboundedmalloc): Remove.
2770         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
2771         arguments, for consistency with rest of this header.
2772         (xcharalloc): Rewrite using XNMALLOC.
2773         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
2774         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
2775         versions have been moved to lib/xalloc.h and renamed to be the
2776         non-*_inline versions.
2777         (xmalloc, xrealloc): Implement without reference to the xnmalloc
2778         and xnrealloc functions, since those functions are now inline and
2779         now call us.
2780         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
2781         renaming described above.
2782         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
2783         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
2784         captures the dependency in AC_C_INLINE.
2785
2786         New module canonicalize-lgpl, proposed by Charles Wilson in
2787         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
2788         with a few small changes afterwards.
2789         * MODULES.html.sh (File system functions): New module
2790         canonicalize-lgpl.
2791         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
2792         and canonicalize_file_name.
2793         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
2794         * modules/canonicalize-lgpl: New files.
2795
2796 2006-11-05  Bruno Haible  <bruno@clisp.org>
2797
2798         * gnulib-tool (func_import, func_create_testdir): Create directories
2799         also for files in subdirectories of lib/.
2800
2801 2006-11-05  Bruno Haible  <bruno@clisp.org>
2802
2803         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
2804         ANSI C compliant.
2805
2806 2006-11-03  Bruno Haible  <bruno@clisp.org>
2807
2808         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
2809         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
2810         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
2811         (xnboundedmalloc): New inline function.
2812         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
2813         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
2814         xmalloc.
2815         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
2816         xmalloc.
2817         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
2818         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
2819         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
2820         xmalloc.
2821         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2822         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
2823         xmalloc.
2824         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
2825         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2826         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
2827         xmalloc.
2828         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
2829         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
2830         gl_tree_add_after): Use XMALLOC instead of xmalloc.
2831         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
2832         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
2833         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
2834         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
2835
2836 2006-11-03  Bruno Haible  <bruno@clisp.org>
2837
2838         * lib/c-ctype.h [C++]: Define functions without name mangling.
2839         * lib/fwriteerror.h [C++]: Likewise.
2840         * lib/gcd.h [C++]: Likewise.
2841         * lib/linebreak.h [C++]: Likewise.
2842
2843 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
2844
2845         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
2846         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
2847         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
2848         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
2849         Check for functions and headers just once.
2850         Check for declaration of canonicalize_file_name.
2851         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
2852
2853 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
2854
2855         * gnulib-tool (func_import): Fix typo in actioncmd.
2856
2857 2006-11-02  Bruno Haible  <bruno@clisp.org>
2858
2859         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
2860         newline sequence in the Makefile.am snippet as a space, like "make"
2861         does.
2862         Reported by Roger Persson <perrog@gmail.com>.
2863
2864 2006-11-01  Bruno Haible  <bruno@clisp.org>
2865
2866         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
2867         already declared in <string.h>.
2868         * lib/strcase.h (strncasecmp): Don't declare it if yes.
2869
2870 2006-11-01  Bruno Haible  <bruno@clisp.org>
2871
2872         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
2873         * lib/strcase.h: Include <string.h>.
2874         (strcasecmp): Define to rpl_strcasecmp here.
2875
2876 2006-11-01  Bruno Haible  <bruno@clisp.org>
2877
2878         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
2879
2880 2006-11-01  Eric Blake  <ebb9@byu.net>
2881
2882         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
2883
2884         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
2885
2886 2006-10-29  Bruno Haible  <bruno@clisp.org>
2887
2888         Make it compile in C++ mode.
2889         * lib/full-write.c (full_rw): Add a cast.
2890
2891 2006-11-01  Bruno Haible  <bruno@clisp.org>
2892
2893         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
2894         be POSIX compliant.
2895         Reported by Roger Persson <perrog@gmail.com>.
2896
2897 2006-11-01  Eric Blake  <ebb9@byu.net>
2898
2899         * lib/getopt_.h: Fix comments.
2900
2901 2006-10-31  Eric Blake  <ebb9@byu.net>
2902
2903         * modules/tmpdir (Depends-on): Add sys_stat.
2904         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
2905         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
2906         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
2907         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
2908         tempname.
2909
2910 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
2911
2912         Avoid some C++ diagnostics reported by Bruno Haible.
2913         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
2914         xmalloc.
2915         (quotearg_alloc): Use xcharalloc rather than xmalloc.
2916         (struct slotvec): Move to top level.
2917         (quotearg_n_options): Rewrite to avoid xmalloc.
2918         * lib/xalloc.h (xcharalloc): New function.
2919         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
2920         [defined __cplusplus]: Add function template that provides result
2921         type propagation.  This part of the change is from Bruno Haible.
2922
2923 2006-10-29  Bruno Haible  <bruno@clisp.org>
2924
2925         Make it compile in C++ mode.
2926         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
2927         * lib/strnlen1.c (strnlen1): Cast memchr result.
2928         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
2929         * lib/clean-temp.c (string_equals, string_hash): Add casts.
2930         (create_temp_dir): Rename local variable 'template'.
2931         (compile_csharp_using_sscli): Add cast.
2932         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
2933         * lib/findprog.c (find_in_path): Likewise.
2934         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
2935         * lib/wait-process.c (register_slave_subprocess): Likewise.
2936
2937 2006-10-22  Bruno Haible  <bruno@clisp.org>
2938
2939         * modules/tsearch: New file.
2940         * lib/tsearch.h: New file.
2941         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
2942         * m4/tsearch.m4: New file.
2943         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
2944
2945 2006-10-29  Eric Blake  <ebb9@byu.net>
2946
2947         * lib/arcfour.c: Assume config.h.
2948         * lib/arctwo.c: Likewise.
2949         * lib/base64.c: Likewise.
2950         * lib/check-version.c: Likewise.
2951         * lib/crc.c: Likewise.
2952         * lib/des.c: Likewise.
2953         * lib/gc-gnulib.c: Likewise.
2954         * lib/gc-libgcrypt.c: Likewise.
2955         * lib/gc-pbkdf2-sha1.c: Likewise.
2956         * lib/getaddrinfo.c: Likewise.
2957         * lib/getdelim.c: Likewise.
2958         * lib/getline.c: Likewise.
2959         * lib/hmac-md5.c: Likewise.
2960         * lib/hmac-sha1.c: Likewise.
2961         * lib/iconvme.c: Likewise.
2962         * lib/md2.c: Likewise.
2963         * lib/md4.c: Likewise.
2964         * lib/memxor.c: Likewise.
2965         * lib/read-file.c: Likewise.
2966         * lib/readline.c: Likewise.
2967         * lib/rijndael-alg-fst.c: Likewise.
2968         * lib/rijndael-api-fst.c: Likewise.
2969         * lib/xgetdomainname.c: Likewise.
2970
2971 2006-10-28  Eric Blake  <ebb9@byu.net>
2972
2973         * lib/xstrndup.c: Assume config.h.
2974
2975 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
2976
2977         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
2978         stat-macros.h is now for our own macros, whereas stat_h is for
2979         macros in the <sys/stat.h> name space.
2980         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
2981         (STAT_MACROS_H): Remove.
2982         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
2983         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
2984         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
2985         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
2986         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
2987         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
2988         Move these macros to ...
2989         * lib/stat_.h: here.  Don't include stat-macros.h.
2990         * lib/canonicalize.c: Don't include stat-macros.h.
2991         * lib/chown.c: Likewise.
2992         * lib/euidaccess.c: Likewise.
2993         * lib/file-type.c: Likewise.
2994         * lib/filemode.c: Likewise.
2995         * lib/glob.c: Likewise.
2996         * lib/isapipe.c: Likewise.
2997         * lib/lchown.c: Likewise.
2998         * lib/lstat.c: Likewise.
2999         * lib/mkdir-p.c: Likewise.
3000         * lib/rmdir.c: Likewise.
3001         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
3002         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
3003         unless mkdir isn't declared, to speed up 'configure'.
3004         Always create sys/stat.h, since it's unlikely any real sys/stat.h
3005         would define all the S_* symbols.
3006         * modules/canonicalize (Depends-on):
3007         Depend on sys_stat, not stat-macros.
3008         * modules/chown: Likewise.
3009         * modules/euidaccess: Likewise.
3010         * modules/filemode: Likewise.
3011         * modules/file-type: Likewise.
3012         * modules/glob: Likewise.
3013         * modules/isapipe: Likewise.
3014         * modules/lchown: Likewise.
3015         * modules/lstat: Likewise.
3016         * modules/mkancesdirs: Likewise.
3017         * modules/rmdir: Likewise.
3018         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
3019         * modules/modechange: Likewise.
3020         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
3021         (configure.ac): Remove gl_STAT_MACROS.
3022         * modules/sys_stat (Depends-on): Remove stat-macros.
3023
3024 2006-10-27  Bruno Haible  <bruno@clisp.org>
3025
3026         * m4/signed.m4: Remove file.
3027         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
3028         invocation.
3029         * modules/vasnprintf (Files): Remove m4/signed.m4.
3030
3031 2006-10-27  Bruno Haible  <bruno@clisp.org>
3032
3033         Update to GNU gettext 0.16.
3034         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
3035         m4/inttypes-h.m4, m4/signed.m4.
3036         * m4/gettext.m4: Update to GNU gettext 0.16.
3037         * m4/intl.m4: New file, from GNU gettext.
3038         * m4/intldir.m4: New file, from GNU gettext.
3039         * config/srclist.txt: Update
3040
3041 2006-10-27  Eric Blake  <ebb9@byu.net>
3042
3043         * MODULES.html.sh: Document tempname.
3044         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
3045         dependencies.
3046         (Files): Move lib/tempname.c...
3047         * modules/tempname: ...to this new module.
3048         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
3049         (gl_PREREQ_TEMPNAME): Move...
3050         * m4/tempname.m4: ...to this new file.
3051         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
3052         * modules/sys_stat (Depends-on): Add stat-macros.
3053         * lib/stat_.h (includes): Pick up stat macros.
3054         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
3055         if stat macros are broken.
3056         * lib/tempname.c (includes): No need to include "stat-macros.h".
3057         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
3058         (direxists, __path_search) [!_LIBC]: Don't compile these in
3059         gnulib; the tmpdir module covers that.
3060         * lib/tempname.h: New file.
3061
3062 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
3063
3064         * COPYING: Explain how gnulib-tool converts licence headers.
3065         Almost all wording by Eric Blake.
3066
3067 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
3068
3069         * lib/mbchar.h (is_basic_table): Make read-only.
3070         * lib/mbchar.c (is_basic_table): Likewise.
3071         Reported by John Darrington.
3072
3073 2006-10-25  Bruno Haible  <bruno@clisp.org>
3074
3075         * lib/progname.h (set_program_name): Undefine before defining.
3076
3077 2006-10-25  Bruno Haible  <bruno@clisp.org>
3078
3079         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
3080         false for non-gcc C++ compilers.
3081         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
3082
3083 2006-10-24  Bruno Haible  <bruno@clisp.org>
3084
3085         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
3086         iconv implementations like Irix iconv.
3087
3088 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3089
3090         * modules/vararrays: New file.
3091         * m4/vararrays.m4: New file, taken from diffutils.
3092         * MODULES.html.sh: New module vararrays.
3093
3094 2006-10-24  Karl Berry  <karl@gnu.org>
3095
3096         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
3097         Don't call GNU Unix.
3098
3099 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3100
3101         * users.txt: Add Libtool.
3102
3103         Sync from Libtool:
3104
3105         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3106
3107         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
3108         to gnulib's policy of including config.h unconditionally.
3109
3110 2006-10-24  Bruno Haible  <bruno@clisp.org>
3111
3112         * modules/wcwidth (Files): Add m4/wint_t.m4.
3113         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
3114         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
3115
3116 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
3117
3118         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
3119         to pacify GCC with some -W flags enabled.  Problem reported by
3120         Bruno Haible.
3121
3122 2006-10-24  Jim Meyering  <jim@meyering.net>
3123
3124         * MODULES.html.sh: Remove uinttostr.  It's not a module.
3125         Reported by Karl Berry.
3126
3127 2006-10-23  Bruno Haible  <bruno@clisp.org>
3128
3129         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
3130
3131 2006-10-24  Bruno Haible  <bruno@clisp.org>
3132
3133         * lib/gl_list.h: Use C comment style, not C++ comment style.
3134
3135 2006-10-23  Eric Blake  <ebb9@byu.net>
3136
3137         * lib/getaddrinfo.c (includes): Add missing include.
3138
3139 2006-10-23  Bruno Haible  <bruno@clisp.org>
3140             Paul Eggert  <eggert@cs.ucla.edu>
3141
3142         Ability to rename obstack_free.
3143         * lib/obstack.h (__obstack_free): New macro. Declare instead of
3144         obstack_free.
3145         (obstack_free): Invoke the __obstack_free macro.
3146         * lib/obstack.c (obstack_free): Use __obstack_free macro.
3147
3148 2006-10-23  Bruno Haible  <bruno@clisp.org>
3149             Paul Eggert  <eggert@cs.ucla.edu>
3150
3151         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
3152         __argc, __argv from the declaration. (They are defined as macros on
3153         mingw.)
3154
3155 2006-10-22  Bruno Haible  <bruno@clisp.org>
3156
3157         * doc/gnulib-intro.texi: New file.
3158         * doc/gnulib.texi: Include it.
3159
3160 2006-10-21  Bruno Haible  <bruno@clisp.org>
3161
3162         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
3163         "Introduction", "Miscellanous Notes", "Particular Modules".
3164
3165 2006-10-21  Bruno Haible  <bruno@clisp.org>
3166
3167         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3168         Change mostlyclean-local rule to avoid sh syntax error from bash
3169         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
3170
3171 2006-10-23  Jim Meyering  <jim@meyering.net>
3172
3173         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
3174         in place of snprintf.
3175
3176         * modules/inttostr (Files): Add lib/uinttostr.c.
3177         * lib/uinttostr.c (inttostr): New file/function.
3178         * lib/inttostr.h (uinttostr): Declare.
3179         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
3180         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
3181         Add uinttostr.
3182         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
3183
3184 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3185
3186         * lib/canonicalize.c (ELOOP): Define if not already defined.
3187         Problem reported by Bruno Haible in
3188         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
3189
3190 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
3191
3192         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
3193         Problem reported by Perry Smith and Ville Laurikari.
3194
3195         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
3196         uses.
3197
3198 2006-10-19  Bruno Haible  <bruno@clisp.org>
3199
3200         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
3201         for mingw.
3202
3203 2006-10-19  Bruno Haible  <bruno@clisp.org>
3204
3205         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
3206         Needed for mingw.
3207
3208 2006-10-19  Bruno Haible  <bruno@clisp.org>
3209
3210         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
3211
3212 2006-10-19  Bruno Haible  <bruno@clisp.org>
3213
3214         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
3215         it.
3216
3217 2006-10-19  Bruno Haible  <bruno@clisp.org>
3218
3219         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
3220         invocation.
3221
3222 2006-10-19  Bruno Haible  <bruno@clisp.org>
3223
3224         * gnulib-tool (func_create_testdir): Don't include ftruncate and
3225         mountlist by default.
3226
3227 2006-10-16  Bruno Haible  <bruno@clisp.org>
3228
3229         * lib/c-strstr.c: Include c-strstr.h.
3230
3231 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
3232
3233         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
3234         in a slash.
3235
3236 2006-10-18  Bruno Haible  <bruno@clisp.org>
3237
3238         * lib/lock.h [C++]: Wrap definitions in extern "C".
3239
3240 2006-10-18  Bruno Haible  <bruno@clisp.org>
3241
3242         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
3243         gl_LIBOBJS list.
3244
3245 2006-10-18  Bruno Haible  <bruno@clisp.org>
3246
3247         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
3248
3249 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
3250
3251         * lib/xstrtol.h: Include gettext.h.
3252         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
3253         Problem reported by Eric Blake.
3254         * modules/xstrtol (Depends-on): Add gettext-h.
3255
3256 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
3257
3258         * lib/strftime.c (advance): New macro.
3259         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
3260         incomplete type, so you can't add 0 to it.  Problem and patch
3261         reported by Eelco Dolstra for dietlibc.
3262
3263 2006-10-18  Jim Meyering  <jim@meyering.net>
3264
3265         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
3266         type for a local, and rename it: s/up/user_proc/.
3267
3268 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
3269
3270         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
3271         READ_UTMP_USER_PROCESS.
3272         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
3273
3274 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
3275
3276         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
3277         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
3278
3279 2006-10-17  Eric Blake  <ebb9@byu.net>
3280
3281         * lib/sigprocmask.c (sigprocmask): Fix typo.
3282
3283         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
3284
3285         * modules/clean-temp (Makefile.am): Don't add to make output...
3286         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
3287         config.h.
3288
3289 2006-10-17  Bruno Haible  <bruno@clisp.org>
3290
3291         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
3292         differently if DEFAULT_TEXT_DOMAIN is set.
3293
3294 2006-10-16  Bruno Haible  <bruno@clisp.org>
3295
3296         * lib/clean-temp.c: Include fwriteerror.h.
3297
3298 2006-10-16  Bruno Haible  <bruno@clisp.org>
3299
3300         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
3301
3302 2006-10-16  Bruno Haible  <bruno@clisp.org>
3303
3304         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
3305         * lib/sigprocmask.h: Include <sys/types.h>.
3306         (sigset_t): Use the system's definition if present.
3307
3308 2006-10-17  Eric Blake  <ebb9@byu.net>
3309
3310         * lib/xvasprintf.c (includes): Assume config.h.
3311         * lib/xasprintf.c (includes): Likewise.
3312
3313 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
3314
3315         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
3316         at least as wide as intmax_t.
3317
3318 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
3319
3320         (Imported from Automake.)
3321         * build-aux/gnupload: Update to version 1.1 of directive file.
3322
3323 2006-10-16  Eric Blake  <ebb9@byu.net>
3324
3325         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
3326         match Automake 1.10a.
3327
3328 2006-10-14  Bruno Haible  <bruno@clisp.org>
3329
3330         * modules/sigprocmask: New file.
3331         * lib/sigprocmask.h: New file.
3332         * lib/sigprocmask.c: New file.
3333         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
3334         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
3335         request sigprocmask.o.
3336         (gl_PREREQ_SIGPROCMASK): New macro.
3337         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
3338         (Depends-on): Add sigprocmask.
3339         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
3340         gt_SIGNALBLOCKING. Test for 'raise' only once.
3341         * lib/fatal-signal.c: Include sigprocmask.h.
3342         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
3343         unblock_fatal_signals): Define always.
3344         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
3345         sigprocmask.
3346
3347 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
3348
3349         Sync from Automake.
3350         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
3351         which incorrectly sets the mode of an existing destination
3352         directory.  In some cases the unpatched install-sh could do the
3353         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
3354         system.  We hope this is rare in practice, but it's clearly worth
3355         fixing.  Problem reported by Alex Unleashed in
3356         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
3357         Also, don't bother to check for -m bugs unless we're using -m;
3358         suggested by Stepan Kasal.
3359
3360 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3361
3362         Sync from Automake.
3363         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
3364         `-c' flag, so they appear at the same position as in %FASTDEP%
3365         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
3366         which ignores unknown options only after the first non-option.
3367         Bug report against M4 by Nelson H. F. Beebe.
3368
3369 2006-10-13  Jim Meyering  <jim@meyering.net>
3370
3371         Fix a bug in yesterday's change.
3372         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
3373         p->fts_statp->st_dev would be used uninitialized.
3374         Ensures that we always call fts_stat on the very first entry.
3375         Miklos Szeredi reported that find -xdev stopped working.
3376
3377 2006-10-12  Bruno Haible  <bruno@clisp.org>
3378
3379         * gnulib-tool (func_get_automake_snippet): Append an automatically
3380         computed EXTRA_DIST augmentation.
3381         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
3382         * modules/alloca-opt (Makefile.am): Likewise.
3383         * modules/allocsa (Makefile.am): Likewise.
3384         * modules/arcfour (Makefile.am): Likewise.
3385         * modules/arctwo (Makefile.am): Likewise.
3386         * modules/argmatch (Makefile.am): Likewise.
3387         * modules/argz (Makefile.am): Likewise.
3388         * modules/atexit (Makefile.am): Likewise.
3389         * modules/backupfile (Makefile.am): Likewise.
3390         * modules/byteswap (Makefile.am): Likewise.
3391         * modules/c-strtod (Makefile.am): Likewise.
3392         * modules/c-strtold (Makefile.am): Likewise.
3393         * modules/calloc (Makefile.am): Likewise.
3394         * modules/canon-host (Makefile.am): Likewise.
3395         * modules/canonicalize (Makefile.am): Likewise.
3396         * modules/chdir-long (Makefile.am): Likewise.
3397         * modules/chdir-safer (Makefile.am): Likewise.
3398         * modules/check-version (Makefile.am): Likewise.
3399         * modules/chown (Makefile.am): Likewise.
3400         * modules/cloexec (Makefile.am): Likewise.
3401         * modules/close-stream (Makefile.am): Likewise.
3402         * modules/closeout (Makefile.am): Likewise.
3403         * modules/crc (Makefile.am): Likewise.
3404         * modules/csharpexec (Makefile.am): Likewise.
3405         * modules/cycle-check (Makefile.am): Likewise.
3406         * modules/des (Makefile.am): Likewise.
3407         * modules/dev-ino (Makefile.am): Likewise.
3408         * modules/dirfd (Makefile.am): Likewise.
3409         * modules/dirname (Makefile.am): Likewise.
3410         * modules/dup2 (Makefile.am): Likewise.
3411         * modules/eealloc (Makefile.am): Likewise.
3412         * modules/error (Makefile.am): Likewise.
3413         * modules/euidaccess (Makefile.am): Likewise.
3414         * modules/exclude (Makefile.am): Likewise.
3415         * modules/exitfail (Makefile.am): Likewise.
3416         * modules/fcntl-safer (Makefile.am): Likewise.
3417         * modules/fcntl (Makefile.am): Likewise.
3418         * modules/file-type (Makefile.am): Likewise.
3419         * modules/fileblocks (Makefile.am): Likewise.
3420         * modules/filemode (Makefile.am): Likewise.
3421         * modules/filenamecat (Makefile.am): Likewise.
3422         * modules/fnmatch (Makefile.am): Likewise.
3423         * modules/fopen-safer (Makefile.am): Likewise.
3424         * modules/fpending (Makefile.am): Likewise.
3425         * modules/fprintftime (Makefile.am): Likewise.
3426         * modules/free (Makefile.am): Likewise.
3427         * modules/fsusage (Makefile.am): Likewise.
3428         * modules/ftruncate (Makefile.am): Likewise.
3429         * modules/fts (Makefile.am): Likewise.
3430         * modules/gc-arcfour (Makefile.am): Likewise.
3431         * modules/gc-des (Makefile.am): Likewise.
3432         * modules/gc-hmac-md5 (Makefile.am): Likewise.
3433         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
3434         * modules/gc-md4 (Makefile.am): Likewise.
3435         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3436         * modules/gc-sha1 (Makefile.am): Likewise.
3437         * modules/gc (Makefile.am): Likewise.
3438         * modules/getaddrinfo (Makefile.am): Likewise.
3439         * modules/getcwd (Makefile.am): Likewise.
3440         * modules/getdelim (Makefile.am): Likewise.
3441         * modules/getdomainname (Makefile.am): Likewise.
3442         * modules/getgroups (Makefile.am): Likewise.
3443         * modules/gethostname (Makefile.am): Likewise.
3444         * modules/gethrxtime (Makefile.am): Likewise.
3445         * modules/getline (Makefile.am): Likewise.
3446         * modules/getloadavg (Makefile.am): Likewise.
3447         * modules/getlogin_r (Makefile.am): Likewise.
3448         * modules/getndelim2 (Makefile.am): Likewise.
3449         * modules/getopt (Makefile.am): Likewise.
3450         * modules/getpagesize (Makefile.am): Likewise.
3451         * modules/getpass-gnu (Makefile.am): Likewise.
3452         * modules/getpass (Makefile.am): Likewise.
3453         * modules/getsubopt (Makefile.am): Likewise.
3454         * modules/gettime (Makefile.am): Likewise.
3455         * modules/gettimeofday (Makefile.am): Likewise.
3456         * modules/getugroups (Makefile.am): Likewise.
3457         * modules/getusershell (Makefile.am): Likewise.
3458         * modules/glob (Makefile.am): Likewise.
3459         * modules/group-member (Makefile.am): Likewise.
3460         * modules/hard-locale (Makefile.am): Likewise.
3461         * modules/hash (Makefile.am): Likewise.
3462         * modules/hmac-md5 (Makefile.am): Likewise.
3463         * modules/hmac-sha1 (Makefile.am): Likewise.
3464         * modules/human (Makefile.am): Likewise.
3465         * modules/idcache (Makefile.am): Likewise.
3466         * modules/imaxabs (Makefile.am): Likewise.
3467         * modules/imaxdiv (Makefile.am): Likewise.
3468         * modules/inet_ntop (Makefile.am): Likewise.
3469         * modules/inet_pton (Makefile.am): Likewise.
3470         * modules/intprops (Makefile.am): Likewise.
3471         * modules/inttostr (Makefile.am): Likewise.
3472         * modules/inttypes (Makefile.am): Likewise.
3473         * modules/isapipe (Makefile.am): Likewise.
3474         * modules/javaversion (Makefile.am): Likewise.
3475         * modules/lchmod (Makefile.am): Likewise.
3476         * modules/lchown (Makefile.am): Likewise.
3477         * modules/localcharset (Makefile.am): Likewise.
3478         * modules/long-options (Makefile.am): Likewise.
3479         * modules/lstat (Makefile.am): Likewise.
3480         * modules/malloc (Makefile.am): Likewise.
3481         * modules/mathl (Makefile.am): Likewise.
3482         * modules/mbchar (Makefile.am): Likewise.
3483         * modules/md2 (Makefile.am): Likewise.
3484         * modules/md4 (Makefile.am): Likewise.
3485         * modules/md5 (Makefile.am): Likewise.
3486         * modules/memcasecmp (Makefile.am): Likewise.
3487         * modules/memchr (Makefile.am): Likewise.
3488         * modules/memcmp (Makefile.am): Likewise.
3489         * modules/memcoll (Makefile.am): Likewise.
3490         * modules/memcpy (Makefile.am): Likewise.
3491         * modules/memmem (Makefile.am): Likewise.
3492         * modules/memmove (Makefile.am): Likewise.
3493         * modules/mempcpy (Makefile.am): Likewise.
3494         * modules/memrchr (Makefile.am): Likewise.
3495         * modules/memset (Makefile.am): Likewise.
3496         * modules/memxor (Makefile.am): Likewise.
3497         * modules/mkancesdirs (Makefile.am): Likewise.
3498         * modules/mkdir-p (Makefile.am): Likewise.
3499         * modules/mkdir (Makefile.am): Likewise.
3500         * modules/mkdtemp (Makefile.am): Likewise.
3501         * modules/mkstemp (Makefile.am): Likewise.
3502         * modules/mktime (Makefile.am): Likewise.
3503         * modules/modechange (Makefile.am): Likewise.
3504         * modules/mountlist (Makefile.am): Likewise.
3505         * modules/nanosleep (Makefile.am): Likewise.
3506         * modules/obstack (Makefile.am): Likewise.
3507         * modules/openat (Makefile.am): Likewise.
3508         * modules/pagealign_alloc (Makefile.am): Likewise.
3509         * modules/pathmax (Makefile.am): Likewise.
3510         * modules/physmem (Makefile.am): Likewise.
3511         * modules/poll (Makefile.am): Likewise.
3512         * modules/posixtm (Makefile.am): Likewise.
3513         * modules/posixver (Makefile.am): Likewise.
3514         * modules/putenv (Makefile.am): Likewise.
3515         * modules/quote (Makefile.am): Likewise.
3516         * modules/quotearg (Makefile.am): Likewise.
3517         * modules/raise (Makefile.am): Likewise.
3518         * modules/read-file (Makefile.am): Likewise.
3519         * modules/readline (Makefile.am): Likewise.
3520         * modules/readlink (Makefile.am): Likewise.
3521         * modules/readtokens (Makefile.am): Likewise.
3522         * modules/readutmp (Makefile.am): Likewise.
3523         * modules/realloc (Makefile.am): Likewise.
3524         * modules/regex (Makefile.am): Likewise.
3525         * modules/rename-dest-slash (Makefile.am): Likewise.
3526         * modules/rename (Makefile.am): Likewise.
3527         * modules/rijndael (Makefile.am): Likewise.
3528         * modules/rmdir (Makefile.am): Likewise.
3529         * modules/rpmatch (Makefile.am): Likewise.
3530         * modules/safe-read (Makefile.am): Likewise.
3531         * modules/safe-write (Makefile.am): Likewise.
3532         * modules/same-inode (Makefile.am): Likewise.
3533         * modules/same (Makefile.am): Likewise.
3534         * modules/save-cwd (Makefile.am): Likewise.
3535         * modules/savedir (Makefile.am): Likewise.
3536         * modules/setenv (Makefile.am): Likewise.
3537         * modules/settime (Makefile.am): Likewise.
3538         * modules/sha1 (Makefile.am): Likewise.
3539         * modules/sig2str (Makefile.am): Likewise.
3540         * modules/snprintf (Makefile.am): Likewise.
3541         * modules/stat-macros (Makefile.am): Likewise.
3542         * modules/stat-time (Makefile.am): Likewise.
3543         * modules/stdbool (Makefile.am): Likewise.
3544         * modules/stdint (Makefile.am): Likewise.
3545         * modules/stdlib-safer (Makefile.am): Likewise.
3546         * modules/stpcpy (Makefile.am): Likewise.
3547         * modules/stpncpy (Makefile.am): Likewise.
3548         * modules/strcase (Makefile.am): Likewise.
3549         * modules/strcasestr (Makefile.am): Likewise.
3550         * modules/strchrnul (Makefile.am): Likewise.
3551         * modules/strcspn (Makefile.am): Likewise.
3552         * modules/strdup (Makefile.am): Likewise.
3553         * modules/strerror (Makefile.am): Likewise.
3554         * modules/strftime (Makefile.am): Likewise.
3555         * modules/strndup (Makefile.am): Likewise.
3556         * modules/strnlen (Makefile.am): Likewise.
3557         * modules/strpbrk (Makefile.am): Likewise.
3558         * modules/strsep (Makefile.am): Likewise.
3559         * modules/strstr (Makefile.am): Likewise.
3560         * modules/strtod (Makefile.am): Likewise.
3561         * modules/strtoimax (Makefile.am): Likewise.
3562         * modules/strtok_r (Makefile.am): Likewise.
3563         * modules/strtol (Makefile.am): Likewise.
3564         * modules/strtoll (Makefile.am): Likewise.
3565         * modules/strtoul (Makefile.am): Likewise.
3566         * modules/strtoull (Makefile.am): Likewise.
3567         * modules/strtoumax (Makefile.am): Likewise.
3568         * modules/strverscmp (Makefile.am): Likewise.
3569         * modules/sys_socket (Makefile.am): Likewise.
3570         * modules/sys_stat (Makefile.am): Likewise.
3571         * modules/sysexits (Makefile.am): Likewise.
3572         * modules/time_r (Makefile.am): Likewise.
3573         * modules/timegm (Makefile.am): Likewise.
3574         * modules/timespec (Makefile.am): Likewise.
3575         * modules/tmpfile-safer (Makefile.am): Likewise.
3576         * modules/trim (Makefile.am): Likewise.
3577         * modules/unistd-safer (Makefile.am): Likewise.
3578         * modules/unlinkdir (Makefile.am): Likewise.
3579         * modules/unlocked-io (Makefile.am): Likewise.
3580         * modules/userspec (Makefile.am): Likewise.
3581         * modules/utime (Makefile.am): Likewise.
3582         * modules/utimecmp (Makefile.am): Likewise.
3583         * modules/utimens (Makefile.am): Likewise.
3584         * modules/vasnprintf (Makefile.am): Likewise.
3585         * modules/vasprintf (Makefile.am): Likewise.
3586         * modules/vsnprintf (Makefile.am): Likewise.
3587         * modules/xalloc (Makefile.am): Likewise.
3588         * modules/xgetcwd (Makefile.am): Likewise.
3589         * modules/xnanosleep (Makefile.am): Likewise.
3590         * modules/xreadlink (Makefile.am): Likewise.
3591         * modules/xstrtod (Makefile.am): Likewise.
3592         * modules/xstrtol (Makefile.am): Likewise.
3593         * modules/xstrtold (Makefile.am): Likewise.
3594         * modules/yesno (Makefile.am): Likewise.
3595         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
3596
3597 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3598
3599         * modules/error (Makefile.am): Distribute files through
3600         EXTRA_DIST, not lib_SOURCES.
3601
3602 2006-10-12  Eric Blake  <ebb9@byu.net>
3603
3604         * modules/error (Makefile.am): Distribute files in /lib.
3605         * modules/obstack (Makefile.am): Likewise.
3606
3607 2006-10-12  Bruno Haible  <bruno@clisp.org>
3608
3609         * modules/acl (Makefile.am): Distribute all files in lib/ through
3610         EXTRA_DIST.
3611         * modules/arcfour (Makefile.am): Likewise.
3612         * modules/arctwo (Makefile.am): Likewise.
3613         * modules/argmatch (Makefile.am): Likewise.
3614         * modules/argz (Makefile.am): Likewise.
3615         * modules/atexit (Makefile.am): Likewise.
3616         * modules/backupfile (Makefile.am): Likewise.
3617         * modules/c-strtod (Makefile.am): Likewise.
3618         * modules/c-strtold (Makefile.am): Likewise.
3619         * modules/calloc (Makefile.am): Likewise.
3620         * modules/canon-host (Makefile.am): Likewise.
3621         * modules/canonicalize (Makefile.am): Likewise.
3622         * modules/chdir-long (Makefile.am): Likewise.
3623         * modules/chdir-safer (Makefile.am): Likewise.
3624         * modules/check-version (Makefile.am): Likewise.
3625         * modules/chown (Makefile.am): Likewise.
3626         * modules/cloexec (Makefile.am): Likewise.
3627         * modules/close-stream (Makefile.am): Likewise.
3628         * modules/closeout (Makefile.am): Likewise.
3629         * modules/crc (Makefile.am): Likewise.
3630         * modules/cycle-check (Makefile.am): Likewise.
3631         * modules/des (Makefile.am): Likewise.
3632         * modules/dirfd (Makefile.am): Likewise.
3633         * modules/dirname (Makefile.am): Likewise.
3634         * modules/dup2 (Makefile.am): Likewise.
3635         * modules/euidaccess (Makefile.am): Likewise.
3636         * modules/exclude (Makefile.am): Likewise.
3637         * modules/exitfail (Makefile.am): Likewise.
3638         * modules/fcntl-safer (Makefile.am): Likewise.
3639         * modules/file-type (Makefile.am): Likewise.
3640         * modules/fileblocks (Makefile.am): Likewise.
3641         * modules/filemode (Makefile.am): Likewise.
3642         * modules/filenamecat (Makefile.am): Likewise.
3643         * modules/fnmatch (Makefile.am): Likewise.
3644         * modules/fopen-safer (Makefile.am): Likewise.
3645         * modules/fpending (Makefile.am): Likewise.
3646         * modules/fprintftime (Makefile.am): Likewise.
3647         * modules/free (Makefile.am): Likewise.
3648         * modules/fsusage (Makefile.am): Likewise.
3649         * modules/ftruncate (Makefile.am): Likewise.
3650         * modules/fts (Makefile.am): Likewise.
3651         * modules/gc (Makefile.am): Likewise.
3652         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
3653         * modules/getaddrinfo (Makefile.am): Likewise.
3654         * modules/getcwd (Makefile.am): Likewise.
3655         * modules/getdelim (Makefile.am): Likewise.
3656         * modules/getdomainname (Makefile.am): Likewise.
3657         * modules/getgroups (Makefile.am): Likewise.
3658         * modules/gethostname (Makefile.am): Likewise.
3659         * modules/gethrxtime (Makefile.am): Likewise.
3660         * modules/getline (Makefile.am): Likewise.
3661         * modules/getloadavg (Makefile.am): Likewise.
3662         * modules/getlogin_r (Makefile.am): Likewise.
3663         * modules/getopt (Makefile.am): Likewise.
3664         * modules/getpass (Makefile.am): Likewise.
3665         * modules/getpass-gnu (Makefile.am): Likewise.
3666         * modules/getsubopt (Makefile.am): Likewise.
3667         * modules/gettime (Makefile.am): Likewise.
3668         * modules/gettimeofday (Makefile.am): Likewise.
3669         * modules/getugroups (Makefile.am): Likewise.
3670         * modules/getusershell (Makefile.am): Likewise.
3671         * modules/glob (Makefile.am): Likewise.
3672         * modules/group-member (Makefile.am): Likewise.
3673         * modules/hard-locale (Makefile.am): Likewise.
3674         * modules/hash (Makefile.am): Likewise.
3675         * modules/hmac-md5 (Makefile.am): Likewise.
3676         * modules/hmac-sha1 (Makefile.am): Likewise.
3677         * modules/human (Makefile.am): Likewise.
3678         * modules/idcache (Makefile.am): Likewise.
3679         * modules/imaxabs (Makefile.am): Likewise.
3680         * modules/imaxdiv (Makefile.am): Likewise.
3681         * modules/inet_ntop (Makefile.am): Likewise.
3682         * modules/inet_pton (Makefile.am): Likewise.
3683         * modules/inttostr (Makefile.am): Likewise.
3684         * modules/isapipe (Makefile.am): Likewise.
3685         * modules/lchown (Makefile.am): Likewise.
3686         * modules/long-options (Makefile.am): Likewise.
3687         * modules/lstat (Makefile.am): Likewise.
3688         * modules/malloc (Makefile.am): Likewise.
3689         * modules/mathl (Makefile.am): Likewise.
3690         * modules/mbchar (Makefile.am): Likewise.
3691         * modules/md2 (Makefile.am): Likewise.
3692         * modules/md4 (Makefile.am): Likewise.
3693         * modules/md5 (Makefile.am): Likewise.
3694         * modules/memcasecmp (Makefile.am): Likewise.
3695         * modules/memchr (Makefile.am): Likewise.
3696         * modules/memcmp (Makefile.am): Likewise.
3697         * modules/memcoll (Makefile.am): Likewise.
3698         * modules/memcpy (Makefile.am): Likewise.
3699         * modules/memmem (Makefile.am): Likewise.
3700         * modules/memmove (Makefile.am): Likewise.
3701         * modules/mempcpy (Makefile.am): Likewise.
3702         * modules/memrchr (Makefile.am): Likewise.
3703         * modules/memset (Makefile.am): Likewise.
3704         * modules/memxor (Makefile.am): Likewise.
3705         * modules/mkancesdirs (Makefile.am): Likewise.
3706         * modules/mkdir (Makefile.am): Likewise.
3707         * modules/mkdir-p (Makefile.am): Likewise.
3708         * modules/mkdtemp (Makefile.am): Likewise.
3709         * modules/mkstemp (Makefile.am): Likewise.
3710         * modules/mktime (Makefile.am): Likewise.
3711         * modules/modechange (Makefile.am): Likewise.
3712         * modules/mountlist (Makefile.am): Likewise.
3713         * modules/nanosleep (Makefile.am): Likewise.
3714         * modules/openat (Makefile.am): Likewise.
3715         * modules/pagealign_alloc (Makefile.am): Likewise.
3716         * modules/physmem (Makefile.am): Likewise.
3717         * modules/poll (Makefile.am): Likewise.
3718         * modules/posixtm (Makefile.am): Likewise.
3719         * modules/posixver (Makefile.am): Likewise.
3720         * modules/putenv (Makefile.am): Likewise.
3721         * modules/quote (Makefile.am): Likewise.
3722         * modules/quotearg (Makefile.am): Likewise.
3723         * modules/raise (Makefile.am): Likewise.
3724         * modules/read-file (Makefile.am): Likewise.
3725         * modules/readline (Makefile.am): Likewise.
3726         * modules/readlink (Makefile.am): Likewise.
3727         * modules/readtokens (Makefile.am): Likewise.
3728         * modules/readutmp (Makefile.am): Likewise.
3729         * modules/realloc (Makefile.am): Likewise.
3730         * modules/regex (Makefile.am): Likewise.
3731         * modules/rename (Makefile.am): Likewise.
3732         * modules/rename-dest-slash (Makefile.am): Likewise.
3733         * modules/rijndael (Makefile.am): Likewise.
3734         * modules/rmdir (Makefile.am): Likewise.
3735         * modules/rpmatch (Makefile.am): Likewise.
3736         * modules/safe-read (Makefile.am): Likewise.
3737         * modules/safe-write (Makefile.am): Likewise.
3738         * modules/same (Makefile.am): Likewise.
3739         * modules/save-cwd (Makefile.am): Likewise.
3740         * modules/savedir (Makefile.am): Likewise.
3741         * modules/setenv (Makefile.am): Likewise.
3742         * modules/settime (Makefile.am): Likewise.
3743         * modules/sha1 (Makefile.am): Likewise.
3744         * modules/sig2str (Makefile.am): Likewise.
3745         * modules/snprintf (Makefile.am): Likewise.
3746         * modules/stdlib-safer (Makefile.am): Likewise.
3747         * modules/stpcpy (Makefile.am): Likewise.
3748         * modules/stpncpy (Makefile.am): Likewise.
3749         * modules/strcase (Makefile.am): Likewise.
3750         * modules/strcasestr (Makefile.am): Likewise.
3751         * modules/strchrnul (Makefile.am): Likewise.
3752         * modules/strcspn (Makefile.am): Likewise.
3753         * modules/strdup (Makefile.am): Likewise.
3754         * modules/strerror (Makefile.am): Likewise.
3755         * modules/strftime (Makefile.am): Likewise.
3756         * modules/strndup (Makefile.am): Likewise.
3757         * modules/strnlen (Makefile.am): Likewise.
3758         * modules/strpbrk (Makefile.am): Likewise.
3759         * modules/strsep (Makefile.am): Likewise.
3760         * modules/strstr (Makefile.am): Likewise.
3761         * modules/strtod (Makefile.am): Likewise.
3762         * modules/strtoimax (Makefile.am): Likewise.
3763         * modules/strtok_r (Makefile.am): Likewise.
3764         * modules/strtol (Makefile.am): Likewise.
3765         * modules/strtoll (Makefile.am): Likewise.
3766         * modules/strtoul (Makefile.am): Likewise.
3767         * modules/strtoull (Makefile.am): Likewise.
3768         * modules/strtoumax (Makefile.am): Likewise.
3769         * modules/strverscmp (Makefile.am): Likewise.
3770         * modules/time_r (Makefile.am): Likewise.
3771         * modules/timegm (Makefile.am): Likewise.
3772         * modules/tmpfile-safer (Makefile.am): Likewise.
3773         * modules/unistd-safer (Makefile.am): Likewise.
3774         * modules/unlinkdir (Makefile.am): Likewise.
3775         * modules/userspec (Makefile.am): Likewise.
3776         * modules/utime (Makefile.am): Likewise.
3777         * modules/utimecmp (Makefile.am): Likewise.
3778         * modules/utimens (Makefile.am): Likewise.
3779         * modules/vasnprintf (Makefile.am): Likewise.
3780         * modules/vasprintf (Makefile.am): Likewise.
3781         * modules/vsnprintf (Makefile.am): Likewise.
3782         * modules/xalloc (Makefile.am): Likewise.
3783         * modules/xgetcwd (Makefile.am): Likewise.
3784         * modules/xnanosleep (Makefile.am): Likewise.
3785         * modules/xreadlink (Makefile.am): Likewise.
3786         * modules/xstrtod (Makefile.am): Likewise.
3787         * modules/xstrtol (Makefile.am): Likewise.
3788         * modules/xstrtold (Makefile.am): Likewise.
3789         * modules/yesno (Makefile.am): Likewise.
3790
3791 2006-10-12  Jim Meyering  <jim@meyering.net>
3792
3793         * m4/getloadavg.m4: Revert the change below.
3794
3795         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
3796         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
3797         fail with a symlink, which is what coreutils' ./bootstrap now
3798         creates by default.
3799
3800 2006-10-12  Bruno Haible  <bruno@clisp.org>
3801
3802         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
3803         mingw.
3804         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
3805         MSVC and mingw explicitly.
3806
3807 2006-10-11  Simon Josefsson  <jas@extundo.com>
3808             Bruno Haible  <bruno@clisp.org>
3809
3810         Add support for multiple gnulib-tool invocations in the scope of a
3811         single configure.ac file.
3812         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
3813         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
3814         with the same contents as the _LIBADD variable.
3815         (func_emit_initmacro_start, func_emit_initmacro_end,
3816         func_emit_initmacro_done): New functions.
3817         (func_import, func_create_testdir): Invoke them. Allow the identifiers
3818         gl_LIBOBJS and gl_LTLIBOBJS.
3819
3820 2006-10-11  Bruno Haible  <bruno@clisp.org>
3821
3822         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
3823         (func_create_testdir): Don't create po/Makefile.am, don't invoke
3824         autoreconf. Instead, invoke autopoint explicitly but move back the
3825         *.m4 files from gnulib.
3826
3827 2006-10-11  Bruno Haible  <bruno@clisp.org>
3828
3829         * gnulib-tool (func_usage): Make module names after --create-testdir
3830         optional.
3831         (func_create_testdir): If no module was specified, use nearly all
3832         modules.
3833
3834 2006-10-12  Jim Meyering  <jim@meyering.net>
3835
3836         Big performance improvement for fts-based tools that use FTS_NOSTAT.
3837         Avoid spurious inode-mismatch problems on non-POSIX file systems.
3838         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
3839         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
3840         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
3841         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
3842         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
3843         (fts_set_stat_required): New function.
3844         (fts_open): Defer the calls to fts_stat, if possible or requested.
3845         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
3846         into fts_stat itself.
3847         (fts_read): Perform any required (deferred) fts_stat call.
3848         (fts_build): Likewise, for the directory we're about to open and read.
3849         In the readdir loop, carefully decide whether each entry will require
3850         an eventual call to fts_stat, using dirent.d_type info if available.
3851         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
3852         a command line argument into this function.  Update all callers.
3853         Map a return value of FTS_DOT to FTS_D for a command line argument.
3854         * modules/fts (Depends-on): Add d-type.  Alphabetize.
3855         Thanks to Miklos Szeredi for his tenacity and for the initial
3856         bug report about "find" failing on a FUSE-based file system.
3857
3858         * lib/fts.c (fts_open): Use consistent indentation.
3859
3860 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
3861
3862         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
3863         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
3864         reported by Jim Meyering.  All uses of cache variables renamed
3865         to match Autoconf's.
3866         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
3867         the other one.
3868
3869         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
3870         Fix misspelling in diagnostic.
3871
3872 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3873
3874         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
3875         defined.  Problem reported by Matthew Woehlke.
3876
3877         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
3878         Add support for Tandem NonStop R series.
3879         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
3880         Use new macro.
3881
3882         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
3883         (has_trailing_slash): Omit size arg; all callers changed.
3884         Omit 'inline', since it doesn't help performance and we'd
3885         need to configure it.
3886         Don't count //, ///, etc. as having a trailing slash.
3887         As a side effect, this removes a C99ism reported by Matthew Woehlke.
3888         (rpl_rename_dest_slash): On failure, use rename's errno rather
3889         than (in some cases) an incorrect or junk errno.
3890         Simplify code by removing need to compute length; this does
3891         cause it to make two passes instead of one over the file name,
3892         but it's worth it.
3893
3894         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
3895         change, since Autoconf's version may no longer be appropriate now
3896         that we are using CVS Autoconf's version.  Add support for Tandem.
3897
3898 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
3899             Bruno Haible  <bruno@clisp.org>
3900
3901         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
3902         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
3903         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
3904         gl_AC_TYPE_LONG_LONG.
3905
3906         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
3907         instead of HAVE_LONG_LONG.
3908         * lib/printf-args.c (printf_fetchargs): Likewise.
3909         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
3910         * lib/vasnprintf.c (VASNPRINTF): Likewise.
3911         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
3912         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
3913         gl_AC_TYPE_LONG_LONG.
3914
3915 2006-10-11  Bruno Haible  <bruno@clisp.org>
3916
3917         * m4/longlong.m4: Add comments.
3918         * m4/ulonglong.m4: Likewise.
3919
3920 2006-10-10  Bruno Haible  <bruno@clisp.org>
3921
3922         Make it possible to #define stpcpy, strdup to aliases.
3923         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
3924         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
3925
3926 2006-10-10  Bruno Haible  <bruno@clisp.org>
3927
3928         Make it possible to #define gcd to an alias.
3929         * lib/gcd.c: Include config.h.
3930
3931 2006-10-10  Bruno Haible  <bruno@clisp.org>
3932
3933         Make it possible to #define c_isascii to an alias.
3934         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
3935         defined. Undefine the macros before defining them, to avoid gcc
3936         warnings.
3937         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
3938         define NO_C_CTYPE_MACROS early.
3939
3940 2006-10-10  Bruno Haible  <bruno@clisp.org>
3941
3942         Make it possible to #define set_program_name to an alias.
3943         * lib/progname.c: Don't undefine set_program_name; instead, undefine
3944         ENABLE_RELOCATABLE early.
3945
3946 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
3947
3948         Port to Tandem NSK OSS, which has 64-bit signed int but at most
3949         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
3950         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
3951         More generally, don't assume that 64-bit signed int is available
3952         if unsigned int is, and vice versa.
3953         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
3954         unsigned symbols, not on their signed counterparts.
3955         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
3956         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
3957         (UINT64_C, UINTMAX_C):
3958         Likewise.
3959         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
3960         unsigned counterparts.
3961         (Have_long_long, Unsigned): New macros.
3962         (Int): Renamed from INT.
3963         (strtoimax): Use the new macros.
3964         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
3965         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
3966         * modules/inttypes (inttypes.h): Substitute
3967         HAVE_UNSIGNED_LONG_LONG_INT.
3968         * modules/stdint (stdint.h): Likewise.
3969         (Files): Add m4/ulonglong.m4.
3970
3971 2006-10-10  Bruno Haible  <bruno@clisp.org>
3972
3973         Fix a gcc -Wshadow warning.
3974         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
3975         to 'bucket'.
3976         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
3977         gl_linked_indexof_from_to): Likewise.
3978         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
3979         Likewise.
3980         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
3981         Likewise.
3982         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
3983         Reported by Eric Blake.
3984
3985 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
3986
3987         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
3988         for NetBSD.  Problem reported by Bruno Haible.
3989
3990 2006-10-09  Jim Meyering  <jim@meyering.net>
3991
3992         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
3993         Patch from Bruno Haible.
3994
3995 2006-10-09  Jim Meyering  <jim@meyering.net>
3996
3997         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
3998         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
3999         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
4000
4001 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
4002
4003         Don't include <config.h> twice; this doesn't work in some cases,
4004         e.g., when config.h has "#define intmax_t long long int" and
4005         we include <config.h>, <inttypes.h>, <config.h> in that order.
4006         Problem reported by Matthew Woehlke in:
4007         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
4008         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
4009         * lib/fts-cycle.c: Don't include config.h.
4010         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
4011         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
4012         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
4013         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
4014         inttypes.h.
4015         * lib/xstrtoumax.c: Likewise.
4016         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
4017         __strtol and the like, so that this module is more like its siblings.
4018         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
4019         Remove; no longer needed now that we assume gnulib inttypes.h.
4020
4021 2006-10-08  Bruno Haible  <bruno@clisp.org>
4022
4023         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
4024         option.
4025
4026 2006-10-07  Jim Meyering  <jim@meyering.net>
4027
4028         * modules/inttypes (inttypes.h): Revert what seems to have been
4029         an inadvertent part of today's change: use "|", not "/" in the
4030         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
4031
4032 2006-10-07  Bruno Haible  <bruno@clisp.org>
4033
4034         * modules/sublist: New file.
4035
4036 2006-10-07  Bruno Haible  <bruno@clisp.org>
4037
4038         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
4039         * modules/argz (argz.h): Likewise.
4040         * modules/arpa_inet (arpa/inet.h): Likewise.
4041         * modules/byteswap (byteswap.h): Likewise.
4042         * modules/configmake (configmake.h): Likewise.
4043         * modules/fcntl (fcntl.h): Likewise.
4044         * modules/fnmatch (fnmatch.h): Likewise.
4045         * modules/getopt (getopt.h): Likewise.
4046         * modules/glob (glob.h): Likewise.
4047         * modules/inttypes (inttypes.h): Likewise.
4048         * modules/netinet_in (netinet/in.h): Likewise.
4049         * modules/poll (poll.h): Likewise.
4050         * modules/stdbool (stdbool.h): Likewise.
4051         * modules/stdint (stdint.h): Likewise.
4052         * modules/sys_select (sys/select.h): Likewise.
4053         * modules/sys_socket (sys/socket.h): Likewise.
4054         * modules/sys_stat (sys/stat.h): Likewise.
4055         * modules/sysexits (sysexits.h): Likewise.
4056         * modules/unistd (unistd.h): Likewise.
4057         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4058         Add a "DO NOT EDIT" comment to the generated file.
4059         (func_import): Likewise for gnulib-comp.m4.
4060
4061 2006-10-07  Bruno Haible  <bruno@clisp.org>
4062
4063         * lib/gl_sublist.h: New file.
4064         * lib/gl_sublist.c: New file.
4065
4066 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
4067
4068         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
4069         name (relative to the original working directory) and the file
4070         name component (relative to the temporary working directory).  All
4071         callers changed.
4072         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
4073         * lib/mkdir-p.c (make_dir_parents): Likewise.
4074         * lib/mkdir-p.h (make_dir_parents): Likewise.
4075
4076 2006-10-06  Eric Blake  <ebb9@byu.net>
4077
4078         Define several macros for use by the clean-temp module.
4079         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
4080         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
4081         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
4082
4083         * lib/clean-temp.h (close_stream_temp): New declaration.
4084         * lib/clean-temp.c (includes): Pull in headers according to what
4085         other modules are in use.
4086         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
4087
4088 2006-10-06  Bruno Haible  <bruno@clisp.org>
4089
4090         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
4091         instead of fopen, fwriteerror.
4092
4093 2006-10-06  Bruno Haible  <bruno@clisp.org>
4094
4095         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
4096         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
4097         int.
4098         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
4099         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
4100         Return an error indicator.
4101         Suggested by Eric Blake.
4102
4103 2006-10-06  Bruno Haible  <bruno@clisp.org>
4104
4105         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
4106         Reported by Eric Blake.
4107
4108 2006-10-06  Bruno Haible  <bruno@clisp.org>
4109
4110         * modules/closeout (Description): Mention stderr too.
4111
4112 2006-10-06  Bruno Haible  <bruno@clisp.org>
4113         and Paul Eggert  <eggert@cs.ucla.edu>
4114
4115         * lib/closeout.c (close_stdout): Also close stderr.
4116         * lib/closeout.h: Update comment.
4117
4118 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
4119
4120         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
4121         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
4122         * lib/dirchownmod.c: Include lchown.h.
4123         * lib/lchown.c: Don't include files that lchown.h now includes.
4124         Don't declare chown, since lchown.h now does that.
4125         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
4126         (lchown): Define to rpl_chown if lchown is declared but
4127         does not exist.  Declare using a prototype if lchown is not
4128         declared.  Add a copyright notice.
4129         * lib/mkstemp.h: Include <unistd.h>.
4130         * lib/openat.c: Include lchown.h.
4131
4132         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
4133         we now test for that separately.
4134         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
4135         rather than O_NOFOLLOW, when testing whether it's possible to
4136         avoid a race condition reliably.
4137         * lib/savewd.c (savewd_chdir): Likewise.
4138
4139         Remove macros that are no longer needed now that stdint.h is
4140         reliable.
4141         * lib/fsusage.c (UINTMAX_MAX): Remove.
4142         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
4143         * lib/utimecmp.c (SIZE_MAX): Remove.
4144
4145         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
4146
4147         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
4148         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
4149         O_NOATIME works.
4150
4151 2006-10-05  Bruno Haible  <bruno@clisp.org>
4152
4153         * lib/gl_list.h (gl_sortedlist_search_from_to,
4154         gl_sortedlist_indexof_from_to): New declarations.
4155         (gl_list_implementation): New fields sortedlist_search_from_to,
4156         sortedlist_indexof_from_to.
4157         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
4158         inline functions.
4159         * lib/gl_list.c (gl_sortedlist_search_from_to,
4160         gl_sortedlist_indexof_from_to): New functions.
4161         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
4162         function.
4163         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
4164         (gl_array_sortedlist_search_from_to): New function.
4165         (gl_array_list_implementation): Update.
4166         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
4167         function.
4168         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
4169         (gl_carray_sortedlist_search_from_to): New function.
4170         (gl_carray_list_implementation): Update.
4171         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
4172         gl_linked_sortedlist_indexof_from_to): New functions.
4173         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4174         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4175         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
4176         gl_tree_sortedlist_indexof_from_to): New functions.
4177         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4178         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4179         Update.
4180         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4181         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
4182         Update.
4183
4184 2006-10-05  Bruno Haible  <bruno@clisp.org>
4185
4186         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
4187         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
4188         (struct gl_list_implementation): Add fields search_from_to,
4189         indexof_from_to. Remove fields search, indexof.
4190         (gl_list_search): Use the search_from_to method.
4191         (gl_list_search_from, gl_list_search_from_to): New functions.
4192         (gl_list_indexof): Use the indexof_from_to method.
4193         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4194         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
4195         (gl_list_search_from, gl_list_search_from_to): New functions.
4196         (gl_list_indexof): Use the indexof_from_to method.
4197         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
4198         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
4199         gl_array_indexof. Add start_index, end_index arguments.
4200         (gl_array_search_from_to): Renamed from gl_array_search. Add
4201         start_index, end_index arguments.
4202         (gl_array_remove, gl_array_list_implementation): Update.
4203         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
4204         gl_carray_indexof. Add start_index, end_index arguments.
4205         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
4206         start_index, end_index arguments.
4207         (gl_carray_remove, gl_carray_list_implementation): Update.
4208         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
4209         gl_linked_search. Add start_index, end_index arguments.
4210         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
4211         start_index, end_index arguments.
4212         (gl_linked_remove): Update.
4213         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
4214         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
4215         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
4216         field to 'size_t'.
4217         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
4218         gl_tree_search. Add start_index, end_index arguments.
4219         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4220         start_index, end_index arguments.
4221         (gl_tree_remove): Update.
4222         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
4223         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
4224         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
4225         function.
4226         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
4227         gl_tree_search. Add start_index, end_index arguments.
4228         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
4229         start_index, end_index arguments.
4230         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
4231         Update.
4232         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
4233
4234 2006-10-05  Bruno Haible  <bruno@clisp.org>
4235
4236         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
4237
4238         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
4239         fwriteerror_temp): New declarations.
4240         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
4241         (descriptors): New variable.
4242         (cleanup): First, close the descriptors.
4243         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
4244         fclose_temp, fwriteerror_temp): New functions.
4245
4246 2006-10-04  Jim Meyering  <jim@meyering.net>
4247
4248         * lib/fts.c (fts_open): Tiny comment change.
4249
4250 2006-10-04  Bruno Haible  <bruno@clisp.org>
4251
4252         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
4253         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
4254         gl_LOCK_BODY.
4255         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
4256         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
4257         gl_LOCK_EARLY_BODY.
4258         (gl_LOCK): Require gl_LOCK_BODY.
4259
4260 2006-10-04  Bruno Haible  <bruno@clisp.org>
4261
4262         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
4263         (gl_oset_search_atleast): New declaration.
4264         (struct gl_oset_implementation): Add field 'search_atleast'.
4265         (gl_oset_search_atleast): New inline function.
4266         * lib/gl_oset.c (gl_oset_search_atleast): New function.
4267         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
4268         (gl_array_oset_implementation): Update.
4269         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
4270         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
4271         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
4272
4273 2006-10-04  Bruno Haible  <bruno@clisp.org>
4274
4275         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
4276
4277 2006-10-03  Bruno Haible  <bruno@clisp.org>
4278
4279         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
4280         from gl_avltreehash_list_implementation.
4281
4282 2006-10-03  Bruno Haible  <bruno@clisp.org>
4283
4284         * lib/gl_oset.c (gl_oset_add): Fix return type.
4285
4286 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
4287
4288         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
4289
4290 2006-10-02  Eric Blake  <ebb9@byu.net>
4291
4292         * modules/strnlen (Depends-on): Add extensions.
4293
4294 2006-10-02  Eric Blake  <ebb9@byu.net>
4295
4296         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
4297         definition in 2.60+.
4298
4299 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
4300
4301         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
4302         checks.
4303
4304 2006-10-02  Bruno Haible  <bruno@clisp.org>
4305
4306         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
4307         to the AUTOMAKE_OPTIONS.
4308         Reported by Jim Meyering.
4309
4310 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
4311
4312         Work around bug in Solaris 10 /proc file system:
4313         /proc/self/fd/NNN/.. isn't the parent directory of
4314         the directory whose file descriptor is NNN.  This needs to
4315         be worked around at run time, not compile time, since a
4316         program might be built on Solaris 8, where things work, and
4317         run on Solaris 10.
4318         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
4319         to use the following interface instead:
4320         (OPENAT_BUFFER_SIZE): New macro.
4321         (openat_proc_name): New function.
4322         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
4323         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
4324         Likewise.
4325         * lib/openat-proc.c: New file.
4326         * modules/openat (Files): Add lib/openat-proc.c.
4327         (Depends-on): Add same-inode, stdbool.
4328         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
4329
4330 2006-09-29  Bruno Haible  <bruno@clisp.org>
4331
4332         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
4333         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
4334         argument. Set stdout_closed before testing for ferror, not after.
4335         (fwriteerror, fwriteerror_no_ebadf): New functions.
4336
4337 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4338
4339         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
4340
4341 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
4342
4343         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
4344         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
4345
4346 2006-09-28  Jim Meyering  <jim@meyering.net>
4347
4348         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
4349         Include <unistd.h>.
4350
4351 2006-09-28  Bruno Haible  <bruno@clisp.org>
4352
4353         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
4354         * modules/linkedhash-list (Depends-on): Likewise.
4355         * modules/rbtreehash-list (Depends-on): Likewise.
4356
4357 2006-09-28  Bruno Haible  <bruno@clisp.org>
4358
4359         * lib/strndup.h: Simplify the redefinition of strndup.
4360         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
4361         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
4362
4363 2006-09-28  Bruno Haible  <bruno@clisp.org>
4364
4365         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
4366         * lib/gl_linkedhash_list.c: Likewise.
4367         * lib/gl_rbtreehash_list.c: Likewise.
4368
4369 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
4370
4371         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
4372         getaddrinfo.
4373
4374         * lib/__fpending.h: Don't include <stdio_ext.h> unless
4375         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
4376         it causes <stdio_ext.h> to cause a compile-time error.
4377         Problem reported by Nelson H. F. Beebe.
4378         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
4379         of HAVE_DECL___PENDING.
4380
4381         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
4382         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
4383         declaration.
4384
4385 2006-09-27  Jim Meyering  <jim@meyering.net>
4386
4387         This file could end up with a definition for a function
4388         named __strndup, rather than rpl_strndup on a system with
4389         incomplete weak_alias support.
4390         * lib/strndup.c (strndup): Rename from __strndup.
4391         Remove #defines that used to map __strndup to strndup.
4392         Don't use K&R prototypes.
4393         Remove LIBC-related code, since this file is not sync'd with glibc.
4394         * lib/strndup.h: Revamp, accordingly.
4395         * m4/strndup.m4: Modernize.
4396
4397 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
4398
4399         * modules/savewd (Depends-on): Add 'raise'.
4400         * lib/savewd.c: Include <signal.h>, for 'raise'.
4401
4402 2006-09-26  Jim Meyering  <jim@meyering.net>
4403
4404         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
4405         when we detect Darwin 8.7.0's acl_get_file bug.
4406         Rearrange to perform the new (below) run-test while $LIBS
4407         contains any acl-related library.  Set USE_ACL at the end.
4408         (gl_ACL_GET_FILE): New function.
4409
4410 2006-09-26  Eric Blake  <ebb9@byu.net>
4411
4412         * lib/verror.c: Include <config.h> unconditionally.
4413
4414 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
4415
4416         * modules/clock-time (Maintainer): Add self.
4417         * modules/getlogin_r (Depends-on): Add extensions.
4418
4419 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4420
4421         * modules/clock-time: New module.
4422         * modules/nanosleep (Depends-on): Add clock-time.
4423         * modules/gethrxtime (Depends-on): Likewise.
4424         * modules/gettime (Depends-on): Likewise.
4425         * modules/settime (Depends-on): Likewise.
4426
4427         * modules/fts-lgpl: Depend on openat.
4428         * modules/mkancesdirs: Depend on savewd.
4429         * modules/mkdir-p: Likewise.
4430
4431 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4432
4433         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
4434
4435         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
4436         `gl_have_arbitrary_file_name_length_limit' to
4437         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
4438         actually works between configure runs.
4439
4440 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4441             Bruno Haible  <bruno@clisp.org>
4442
4443         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
4444
4445 2006-09-25  Jim Meyering  <jim@meyering.net>
4446
4447         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
4448         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
4449
4450 2006-09-25  Eric Blake  <ebb9@byu.net>
4451
4452         * gnulib-tool (func_import, func_create_testdir): Fix typos in
4453         exec's in 2006-09-18 patch when shuffling fds.
4454
4455 2006-09-25  Bruno Haible  <bruno@clisp.org>
4456
4457         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
4458         Reported by Jim Meyering.
4459
4460 2006-09-24  Jim Meyering  <jim@meyering.net>
4461
4462         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
4463         compare a pointer against a literal "0".  That caused failures with
4464         at least HP-UX's hpcc.
4465
4466 2006-09-22  Simon Josefsson  <jas@extundo.com>
4467
4468         * modules/gc-sha1:
4469         * modules/gc-md4:
4470         * modules/gc-hmac-sha1:
4471         * modules/gc-hmac-md5:
4472         * modules/gc-des:
4473         * modules/gc-arcfour: Distribute more files.
4474
4475 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4476
4477         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
4478         (gl_linked_iterator_from_to): Initialize struct completely.
4479         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
4480         (gl_tree_iterator_from_to): Likewise
4481         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
4482         * lib/gl_array_list.c [lint] (gl_array_iterator)
4483         (gl_array_iterator_from_to): Likewise.
4484         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
4485         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
4486         (gl_carray_iterator_from_to): Likewise.
4487
4488         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
4489         * lib/md4.c (md4_process_block): Remove unused variable.
4490         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
4491         parentheses for clarity.
4492
4493 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4494
4495         * modules/bison-i18n (Depends-on): Add gettext.
4496
4497 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4498
4499         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
4500         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
4501         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
4502         also add missing comma that caused broken test.
4503         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
4504         stdlib.h, for `abort'.
4505         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
4506         variables.
4507         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
4508         include unistd.h if present, for `rmdir'.
4509         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
4510         variables.
4511         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
4512         in the process include standard headers for prototypes.
4513         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
4514         gets declared on GNU/Linux.
4515         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
4516         unistd.h, for `rmdir'.
4517         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
4518
4519         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
4520         always true.
4521         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
4522
4523         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
4524
4525 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4526
4527         * gnulib-tool (func_version): Create output all at once.  This
4528         may help avoid triggering unnecessary SIGPIPEs, and at any
4529         rate it doesn't hurt.
4530
4531 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4532             Bruno Haible  <bruno@clisp.org>
4533
4534         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
4535         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
4536         * m4/signed.m4 (bh_C_SIGNED): Likewise.
4537
4538         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
4539         (gl_FUNC_VASPRINTF): Invoke it.
4540
4541 2006-09-22  Bruno Haible  <bruno@clisp.org>
4542
4543         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
4544         getloadavg.c as first argument.
4545
4546 2006-09-22  Bruno Haible  <bruno@clisp.org>
4547
4548         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
4549         at the beginning of the gl_INIT macro.
4550         * modules/getloadavg (configure.ac): Pass $gl_source_base to
4551         gl_GETLOADAVG.
4552
4553 2006-09-22  Bruno Haible  <bruno@clisp.org>
4554
4555         * gnulib-tool (func_create_megatestdir): Don't include the config-h
4556         module.
4557         Suggested by Ralf Wildenhues.
4558
4559 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
4560
4561         Import this patch from libc:
4562
4563         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
4564
4565         * lib/regex_internal.c (re_string_reconstruct): Handle
4566         offset < pstr->valid_raw_len && pstr->offsets_needed case.
4567         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
4568         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
4569         re_string_context_at.
4570
4571         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
4572         now requires it.
4573         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
4574         gl_REGEX now does it for us.
4575         (gl_REGEX): Add test taken from
4576         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
4577
4578         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
4579         Check that large offsets work.  Modernize Autoconf usages.
4580         Prefer "yes" to mean a good thing rather than a bad.
4581         Don't put "#define mkstemp" in config.h, as this might interfere
4582         with standard system headers that "#define mkstemp mkstemp64".
4583
4584         * modules/mkstemp (Depends-on): Add extensions, so that
4585         mkstemp is visible on some platforms.
4586         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
4587         (Include): Change to "mkstemp.h" from <stdlib.h>.
4588         (Files): Add mkstemp.h.
4589
4590         * lib/mkstemp.h: New file, since some standard headers
4591         #define mkstemp.
4592         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
4593         Include "mkstemp.h".
4594         Make the _LIBC code resemble glibc original more,
4595         e.g., use K&R style.
4596         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
4597         (mkstemp): Remove, since mkstemp.h does this for us.
4598         * lib/stdlib--.h: Include mkstemp.h.
4599
4600         Import this patch from libc:
4601
4602         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4603
4604         * lib/tempname.c (__gen_tempname): Change attempts_min
4605         into a macro.  Use preprocessor to decide how to initialize
4606         attempts [Coverity CID 67].
4607
4608 2006-09-20  Bruno Haible  <bruno@clisp.org>
4609
4610         * lib/mkdtemp.c: Import from libc.
4611         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
4612                 * sysdeps/posix/tempname.c (__gen_tempname): Change
4613                 attempts_min into a macro.  Use preprocessor to decide how to
4614                 initialize attempts [Coverity CID 67].
4615         2001-11-27  Paul Eggert  <eggert@twinsun.com>
4616                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
4617                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
4618
4619 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4620
4621         * gnulib-tool (func_exit): New function, to allow to pass the
4622         exit status portably through the trap.  Use everywhere.
4623         (--help, --version): Signal a write error.
4624         (trap): catch SIGPIPE, for write errors.
4625         Exit at the end of the trap, with the correct exit status.
4626
4627 2006-09-19  Karl Berry  <karl@gnu.org>
4628
4629         * doc/gnulib.texi: note about the license texinfo files.
4630
4631 2006-09-19  Eric Blake  <ebb9@byu.net>
4632
4633         * gnulib-tool: Avoid space-tab.
4634
4635 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4636
4637         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
4638         that prevented coreutils 6.1 from building.  Problem reported
4639         by Petter Reinholdtsen.
4640
4641 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
4642
4643         * gnulib-tool (avoidlist): Fix typo that broke options like
4644         --avoid=lock that are used by coreutils bootstrap.
4645
4646 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
4647
4648         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
4649         more systematically.
4650
4651 2006-09-18  Jim Meyering  <jim@meyering.net>
4652
4653         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
4654
4655 2006-09-18  Bruno Haible  <bruno@clisp.org>
4656
4657         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
4658
4659 2006-09-18  Bruno Haible  <bruno@clisp.org>
4660
4661         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
4662         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
4663         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
4664         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
4665         * m4/gettext.m4: Require autoconf >= 2.52.
4666         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
4667         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
4668         of gl_cv_header_inttypes_h.
4669
4670 2006-09-18  Bruno Haible  <bruno@clisp.org>
4671
4672         * lib/javaversion.c: Include configmake.h.
4673
4674 2006-09-18  Bruno Haible  <bruno@clisp.org>
4675
4676         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
4677         avoid that the while loops be executed in a subshell.
4678
4679 2006-09-18  Bruno Haible  <bruno@clisp.org>
4680
4681         * MODULES.html.sh (func_module): Break long lines.
4682         Suggested by Bruce Korb <bkorb@gnu.org>.
4683
4684 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4685
4686         Speed up by a factor of 1.12.
4687         * gnulib-tool (nl): New variable.
4688         (func_import): Rewrite include directive extraction to only read each
4689         directive once.
4690
4691 2006-09-17  Bruno Haible  <bruno@clisp.org>
4692
4693         * modules/javaversion (Makefile.am): Remove DEFS setting.
4694         (Depends-on): Add configmake, for PKGDATADIR definition.
4695
4696 2006-09-17  Bruno Haible  <bruno@clisp.org>
4697
4698         * gnulib-tool (func_create_testdir): Rewrite all files at once.
4699
4700 2006-09-17  Bruno Haible  <bruno@clisp.org>
4701
4702         * gnulib-tool (func_append): New function, stolen from libtool.m4.
4703         (func_modules_transitive_closure, func_modules_add_dummy,
4704         func_modules_to_filelist, func_import, func_create_testdir,
4705         func_create_megatestdir, ...): Use it wherever possible.
4706         Suggested by Ralf Wildenhues.
4707
4708 2006-09-16  Karl Berry  <karl@gnu.org>
4709
4710         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
4711         to avoid sectioning errors.
4712         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
4713         [ifinfo]: blank line after @center-ed titles.
4714         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
4715         Spell FSF address consistently with others.
4716         (These changes approved by rms.)
4717
4718 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4719
4720         Speed up by a factor of 1.61.
4721         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
4722         already checked module names again.
4723
4724 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4725
4726         Speed up by a factor of 1.13.
4727         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
4728         for new_files, and the input to func_add_or_update.
4729
4730 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4731
4732         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
4733         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
4734
4735 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4736
4737         * modules/mkancesdirs (Depends-on): Add fcntl.
4738         * modules/savewd: New file.
4739         * MODULES.html.sh (File system functions): Add savewd.
4740
4741         * modules/configmake (Makefile.am): Add support for the
4742         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
4743
4744 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4745
4746         * m4/savewd.m4: New file.
4747
4748 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
4749
4750         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
4751         (dirchownmod): New arg FD.  All callers changed.
4752         Use FD rather than opening the directory ourself, as opening is
4753         now the caller's responsibility.
4754         * lib/dirchownmod.h: Likewise.
4755         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
4756         hosts that require <sys/types.h> before <sys/stat.h>.  Include
4757         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
4758         (test_dir): Remove.
4759         (mkancesdirs): Return length of prefix of FILE that has already
4760         been made, or -2 if there is a child doing the work.  Redo
4761         algorithm so that it is O(N) rather than O(N**2).  Optimize away
4762         ".", and treat ".." specially since it might stray back into
4763         already-created areas.  Use a subprocess if necessary.  New arg
4764         WD; all users changed.  MAKE_DIR function should now return 1
4765         if it creates a directory that is not readable.  Return -2 if
4766         a child process is spun off.
4767         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
4768         Adjust signature to match code.
4769         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
4770         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
4771         all users changed.
4772         * lib/savewd.c, lib/savewd.h: New files.
4773
4774 2006-09-15  Jim Meyering  <jim@meyering.net>
4775
4776         * modules/rename-dest-slash: New module.
4777         * MODULES.html.sh (posix_compat): Add it here.
4778
4779         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
4780
4781 2006-09-15  Jim Meyering  <jim@meyering.net>
4782
4783         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
4784         file.
4785
4786         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
4787
4788 2006-09-15  Jim Meyering  <jim@meyering.net>
4789
4790         * lib/rename-dest-slash.c (has_trailing_slash): Use
4791         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
4792         (rpl_rename_dest_slash): Perform the cheaper trailing slash
4793         test before testing whether SRC is a directory.
4794         Suggestions from Bruno Haible.
4795
4796         Avoid a warning about an unused variable.
4797         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
4798         into the #ifdef block where it's used.
4799
4800         * lib/rename-dest-slash.c: New file.
4801
4802 2006-09-14  Bruno Haible  <bruno@clisp.org>
4803
4804         * lib/allocsa.c: Include <config.h> unconditionally.
4805         * lib/asnprintf.c: Likewise.
4806         * lib/asprintf.c: Likewise.
4807         * lib/c-strcasecmp.c: Likewise.
4808         * lib/c-strcasestr.c: Likewise.
4809         * lib/c-strncasecmp.c: Likewise.
4810         * lib/c-strstr.c: Likewise.
4811         * lib/classpath.c: Likewise.
4812         * lib/clean-temp.c: Likewise.
4813         * lib/concatpath.c: Likewise.
4814         * lib/copy-file.c: Likewise.
4815         * lib/csharpcomp.c: Likewise.
4816         * lib/csharpexec.c: Likewise.
4817         * lib/execute.c: Likewise.
4818         * lib/fatal-signal.c: Likewise.
4819         * lib/findprog.c: Likewise.
4820         * lib/fwriteerror.c: Likewise.
4821         * lib/gl_array_list.c: Likewise.
4822         * lib/gl_array_oset.c: Likewise.
4823         * lib/gl_avltree_list.c: Likewise.
4824         * lib/gl_avltree_oset.c: Likewise.
4825         * lib/gl_avltreehash_list.c: Likewise.
4826         * lib/gl_carray_list.c: Likewise.
4827         * lib/gl_linked_list.c: Likewise.
4828         * lib/gl_linkedhash_list.c: Likewise.
4829         * lib/gl_list.c: Likewise.
4830         * lib/gl_oset.c: Likewise.
4831         * lib/gl_rbtree_list.c: Likewise.
4832         * lib/gl_rbtree_oset.c: Likewise.
4833         * lib/gl_rbtreehash_list.c: Likewise.
4834         * lib/imaxabs.c: Likewise.
4835         * lib/imaxdiv.c: Likewise.
4836         * lib/javacomp.c: Likewise.
4837         * lib/javaexec.c: Likewise.
4838         * lib/javaversion.c: Likewise.
4839         * lib/linebreak.c: Likewise.
4840         * lib/localcharset.c: Likewise.
4841         * lib/lock.c: Likewise.
4842         * lib/mbchar.c: Likewise.
4843         * lib/mbswidth.c: Likewise.
4844         * lib/mkdtemp.c: Likewise.
4845         * lib/pipe.c: Likewise.
4846         * lib/printf-args.c: Likewise.
4847         * lib/printf-parse.c: Likewise.
4848         * lib/progname.c: Likewise.
4849         * lib/progreloc.c: Likewise.
4850         * lib/readlink.c: Likewise.
4851         * lib/sh-quote.c: Likewise.
4852         * lib/stpcpy.c: Likewise.
4853         * lib/stpncpy.c: Likewise.
4854         * lib/strcasecmp.c: Likewise.
4855         * lib/strcasestr.c: Likewise.
4856         * lib/strcspn.c: Likewise.
4857         * lib/striconv.c: Likewise.
4858         * lib/strncasecmp.c: Likewise.
4859         * lib/strnlen1.c: Likewise.
4860         * lib/strstr.c: Likewise.
4861         * lib/strtok_r.c: Likewise.
4862         * lib/tls.c: Likewise.
4863         * lib/tmpdir.c: Likewise.
4864         * lib/unicodeio.c: Likewise.
4865         * lib/unsetenv.c: Likewise.
4866         * lib/vasnprintf.c: Likewise.
4867         * lib/vasprintf.c: Likewise.
4868         * lib/wait-process.c: Likewise.
4869         * lib/xallocsa.c: Likewise.
4870         * lib/xsetenv.c: Likewise.
4871         * lib/xstriconv.c: Likewise.
4872
4873 2006-09-13  Simon Josefsson  <jas@extundo.com>
4874
4875         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
4876         that internally, suggested by Ralf Wildenhues
4877         <Ralf.Wildenhues@gmx.de>.
4878
4879 2006-09-13  Simon Josefsson  <jas@extundo.com>
4880
4881         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
4882         @LIBOBJS@.
4883         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
4884
4885 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
4886
4887         * lib/_fpending.c: Include <config.h> unconditionally, since we no
4888         longer worry about uses that don't define HAVE_CONFIG_H.
4889         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
4890         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
4891         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
4892         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
4893         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
4894         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
4895         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
4896         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
4897         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
4898         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
4899         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
4900         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
4901         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
4902         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
4903         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
4904         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
4905         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
4906         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
4907         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
4908         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
4909         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
4910         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
4911         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
4912         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
4913         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
4914         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
4915         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
4916         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
4917         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
4918         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
4919         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
4920         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
4921         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
4922         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
4923         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
4924         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
4925         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
4926         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
4927         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
4928         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
4929         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
4930         Likewise.
4931
4932 2006-09-13  Eric Blake  <ebb9@byu.net>
4933
4934         * lib/getopt.c: Fix typo in last commit.
4935
4936 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
4937
4938         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
4939         dgettext.
4940
4941 2006-09-12  Jim Meyering  <jim@meyering.net>
4942
4943         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
4944         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
4945         Reported by Nelson H. F. Beebe.
4946
4947 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
4948
4949         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
4950         program_invocation_name and program_invocation_short_name are
4951         initialized.
4952         * lib/argp-namefrob.h: Move declarations of program_invocation_name
4953         and program_invocation_short_name to argp.h, so they are visible
4954         to user programs.
4955         * lib/argp.h: Likewise
4956
4957 2006-09-10  Bruno Haible  <bruno@clisp.org>
4958
4959         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
4960         m4/inttypes_h.m4, m4/uintmax_t.m4.
4961
4962 2006-09-10  Bruno Haible  <bruno@clisp.org>
4963
4964         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
4965         gl_AC_TYPE_UINTMAX_T.
4966
4967 2006-09-10  Bruno Haible  <bruno@clisp.org>
4968
4969         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
4970
4971 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
4972
4973         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
4974         convention.  Text proposed by Bruno Haible.
4975         (struct argp_option): Document the use of N_() wrappers.
4976
4977         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
4978         '\v', and translate the two parts separately, instead of feeding
4979         the whole string to gettext.  This allows to exclude
4980         '\v' from the strings visible to the translator by writing doc
4981         strings as N_("..") "\v" N_("..").
4982
4983 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
4984
4985         * config/srclist.txt: Undo latest change; the bug was fixed.
4986
4987 2006-09-09  Bruno Haible  <bruno@clisp.org>
4988
4989         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
4990         assignments if building a library without libtool.
4991         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
4992         in func_emit_lib_Makefile_am.
4993         (func_import): When building a static library libfoo.a, arrange to
4994         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
4995         (func_create_testdir): Likewise.
4996         * modules/gc (configure.ac, Makefile.am): If building statically,
4997         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
4998         * modules/iconvme (configure.ac, Makefile.am): Likewise.
4999         * modules/striconv (configure.ac, Makefile.am): Likewise.
5000         Based on a suggestion by Ralf Wildenhues.
5001
5002 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5003
5004         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
5005         Check for unistd.h too, since Autoconf doesn't assume POSIX.
5006         Also:
5007
5008         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5009         Add year_2050_test to catch glibc bug 2821
5010         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5011
5012         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
5013         Prefer #ifdef to #if.
5014
5015         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
5016         Return from 'main' instead of calling 'exit'.
5017
5018 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5019
5020         * lib/mktime.c (guess_time_tm): Fix bug where mktime
5021         returned the maximum time_t value rather than (time_t) -1.
5022         Problem originally reported by William Bardwell
5023         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
5024
5025         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5026         Moved to here ...
5027         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
5028         ... from here.
5029
5030 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
5031
5032         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
5033         2821 is fixed.
5034
5035 2006-09-08  Jim Meyering  <jim@meyering.net>
5036
5037         Don't make generated files read-only.  That would bother too many
5038         people.  However, do retain the ability to work when targets are
5039         read-only: remove the destination and temporary files before writing
5040         them (when generated via sed or echo), or by using the -f option for
5041         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
5042         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5043         * modules/byteswap, modules/configmake, modules/fcntl:
5044         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5045         * modules/localcharset, modules/netinet_in, modules/poll:
5046         * modules/stdbool, modules/stdint, modules/sys_select:
5047         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5048
5049 2006-09-08  Jim Meyering  <jim@meyering.net>
5050
5051         Avoid new build failure on FreeBSD 6.0.
5052         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
5053         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
5054         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
5055
5056 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5057
5058         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
5059
5060 2006-09-07  Jim Meyering  <jim@meyering.net>
5061
5062         Fix global typo in last change: use chmod u-w, not chmod u-x.
5063         Spotted by Paul Eggert and Bruce Korb.
5064         * modules/alloca-opt, modules/argz, modules/arpa_inet:
5065         * modules/byteswap, modules/configmake, modules/fcntl:
5066         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
5067         * modules/localcharset, modules/netinet_in, modules/poll:
5068         * modules/stdbool, modules/stdint, modules/sys_select:
5069         * modules/sys_socket, modules/sys_stat, modules/sysexits:
5070
5071 2006-09-06  Jim Meyering  <jim@meyering.net>
5072
5073         Make generated files be read-only.
5074         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
5075         Ensure that each generated file is now read-only.
5076         * modules/argz: Likewise.
5077         * modules/arpa_inet: Likewise.
5078         * modules/byteswap: Likewise.
5079         * modules/configmake: Likewise.
5080         * modules/fcntl: Likewise.
5081         * modules/fnmatch: Likewise.
5082         * modules/getopt: Likewise.
5083         * modules/glob: Likewise.
5084         * modules/inttypes: Likewise.
5085         * modules/netinet_in: Likewise.
5086         * modules/poll: Likewise.
5087         * modules/stdbool: Likewise.
5088         * modules/stdint: Likewise.
5089         * modules/sys_select: Likewise.
5090         * modules/sys_socket: Likewise.
5091         * modules/sys_stat: Likewise.
5092         * modules/sysexits: Likewise.
5093         * modules/localcharset: Same as above, but continue using temporary
5094         file named "t-$@" (why different?) rather than the "$@-t" used
5095         everywhere else.
5096
5097         * modules/sysexits (Makefile.am): Replace literal occurrences
5098         of "sysexit.h" more readable, and more consistent, "$@".
5099
5100 2006-09-06  Bruno Haible  <bruno@clisp.org>
5101
5102         * modules/striconv: New file.
5103         * modules/xstriconv: New file.
5104         * MODULES.html.sh (Internationalization functions): Add striconv,
5105         xstriconv.
5106
5107 2006-09-06  Bruno Haible  <bruno@clisp.org>
5108
5109         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
5110         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
5111         not using libtool correctly.
5112
5113 2006-09-06  Bruno Haible  <bruno@clisp.org>
5114
5115         * lib/striconv.h: New file.
5116         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
5117         iconvstring.c.
5118         * lib/xstriconv.h: New file.
5119         * lib/xstriconv.c: New file.
5120
5121 2006-09-06  Bruno Haible  <bruno@clisp.org>
5122
5123         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
5124         lib_..._LDFLAGS.
5125
5126 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5127
5128         * lib/argz_.h: Sync from Libtool.
5129
5130         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
5131                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
5132
5133         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
5134
5135 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5136
5137         * modules/trim: New file.
5138
5139 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
5140
5141         * lib/trim.h: New file.
5142         * lib/trim.c: New file.
5143
5144 2006-09-05  Bruno Haible  <bruno@clisp.org>
5145
5146         * MODULES.html.sh (String handling): Add trim.
5147
5148 2006-09-04  Karl Berry  <karl@gnu.org>
5149
5150         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
5151         until next release.
5152
5153 2006-09-03  Bruno Haible  <bruno@clisp.org>
5154
5155         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
5156         correctly.
5157
5158 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5159
5160         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
5161         not gl_GETLOADAVG.  Omit unneeded semicolons.
5162         Problems reported by Ralf Wildenhues in
5163         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5164         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
5165         at the end, which is the usual gnulib style.
5166
5167         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
5168         of doing all the work ourselves.
5169         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
5170         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
5171
5172 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5173
5174         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
5175         Problem reported by Ralf Wildenhues in
5176         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
5177
5178         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
5179         HAVE_STRUCT_STATFS_F_FSTYPENAME.
5180
5181 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
5182
5183         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
5184         yesterday's patch by changing test -n to test -z.
5185
5186 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5187
5188         * modules/getloadavg (Files): Add m4/getloadavg.m4.
5189         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
5190         the former is now obsolescent.
5191
5192         * modules/chdir-long (Depends-on): Add fcntl.
5193
5194 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5195
5196         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
5197         obsolescent, and programs should use gnulib instead.
5198         * m4/getloadavg.m4: New file, with contents taken from Autoconf
5199         but with prefixes changed.
5200
5201 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
5202
5203         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
5204         or stdbool.h, because they might not exist while configuring.
5205
5206         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
5207         Don't include unistd.h or limits.h; not needed, since chdir-long.h
5208         does that for us.
5209         (O_DIRECTORY): Remove.
5210
5211 2006-08-31  Eric Blake  <ebb9@byu.net>
5212
5213         * gnulib-tool: Don't let emacs change spaces to TAB.
5214
5215 2006-08-31  Bruno Haible  <bruno@clisp.org>
5216
5217         * gnulib-tool: When calling func_import more than once, do it in a
5218         subshell.
5219         Reported by Eric Blake <ebb9@byu.net>.
5220
5221 2006-08-31  Bruno Haible  <bruno@clisp.org>
5222
5223         * gnulib-tool (nl): Remove variable.
5224         (sed_transform_lib_file): Use more robust test for config-h module.
5225         (func_import): Fix typo in 2006-08-25 patch.
5226
5227 2006-08-31  Bruno Haible  <bruno@clisp.org>
5228
5229         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
5230         specified, augment Makefile.am variables instead of assigning them.
5231
5232 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5233
5234         Work around a bug in both the Linux and SunOS 64-bit kernels:
5235         nanosleep mishandles sleeps for longer than 2**31 seconds.
5236         Problem reported by Frank v Waveren in
5237         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5238         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
5239         Check for nanosleep bug.
5240         (LIB_NANOSLEEP): Append clock_gettime library if needed.
5241
5242 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5243
5244         Work around a bug in both the Linux and SunOS 64-bit kernels:
5245         nanosleep mishandles sleeps for longer than 2**31 seconds.
5246         Problem reported by Frank v Waveren in
5247         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
5248         * lib/nanosleep.c (BILLION): New constant.
5249         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
5250         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
5251         implementation.
5252
5253 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5254
5255         * modules/nanosleep (Depends-on): Add gettime.
5256
5257 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
5258         and Simon Josefsson  <jas@extundo.com>
5259         and Oskar Liljeblad  <oskar@osk.mine.nu>
5260
5261         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
5262         * gnulib-tool (func_import): New license type 'unmodifiable license
5263         text'.
5264         * modules/fdl: Use it.  Longer description.
5265         * module/gpl, module/lgpl: New files.
5266
5267 2006-08-30  Jim Meyering  <jim@meyering.net>
5268
5269         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
5270         shadowing the parameter.
5271
5272 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5273
5274         Sync from Libtool:
5275
5276         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5277
5278         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
5279         sharing with gnulib.  Report by Eric Blake.
5280
5281 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5282
5283         * modules/isapipe: New file.
5284         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
5285
5286 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5287
5288         * modules/configmake (Makefile.am): Add a comment, and omit
5289         the CONFIGMAKE_ prefix from generated macro names.  Suggested
5290         by Bruno Haible.
5291
5292 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5293
5294         * m4/isapipe.m4: New file.
5295
5296 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
5297
5298         * lib/isapipe.c, lib/isapipe.h: New files.
5299
5300 2006-08-29  Jim Meyering  <jim@meyering.net>
5301
5302         * modules/configmake (Makefile.am): Make configmake.h depend on
5303         Makefile.  Otherwise, a stale configmake.h could hang around.
5304
5305 2006-08-29  Eric Blake  <ebb9@byu.net>
5306
5307         * lib/error.c (error_at_line, print_errno_message): Match libc, after
5308         resolution of upstream bug 3044.
5309
5310 2006-08-29  Bruno Haible  <bruno@clisp.org>
5311
5312         * modules/localcharset (Depends-on): Add configmake.
5313         (Makefile.am): Remove setting of LIBDIR through DEFS.
5314
5315 2006-08-29  Bruno Haible  <bruno@clisp.org>
5316
5317         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
5318         defined.
5319
5320 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5321
5322         * modules/fcntl: New file.
5323         * modules/chdir-safer (Depends-on): Add fcntl.
5324         * modules/fts: Likewise.
5325         * modules/mkdir-p: Likewise.
5326
5327         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
5328         This undoes the most recent change, since we're now addressing the
5329         problem in a different way.
5330
5331         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
5332         into output, since the output might be called Makefile.am even
5333         if $makefile_name is something different.
5334         (func_import): Use $makefile_am rather than
5335         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
5336         empty.
5337
5338         * modules/inttypes (Files): Add m4/inttypes-h.m4.
5339
5340 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5341
5342         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
5343         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
5344         recent change to stdint.m4, since we're now addressing the problem in a
5345         different way.
5346
5347 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5348
5349         * m4/fcntl_h.m4: New file.
5350
5351 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
5352
5353         * lib/fcntl_.h: New file.
5354         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
5355         the fcntl module.
5356         * lib/dirchownmod.c: Likewise.
5357         * lib/fts.c: Likewise.
5358
5359         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
5360         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
5361         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
5362         just before including <inttypes.h>, to avoid circular inclusion.
5363
5364 2006-08-28  Jim Meyering  <jim@meyering.net>
5365
5366         * doc/visibility.texi: Actually read and correct the grammar of the
5367         sentence affected by yesterday's change.
5368
5369 2006-08-28  Eric Blake  <ebb9@byu.net>
5370
5371         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
5372         needs wrapper.
5373
5374 2006-08-28  Eric Blake  <ebb9@byu.net>
5375
5376         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
5377
5378 2006-08-28  Eric Blake  <ebb9@byu.net>
5379
5380         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
5381
5382 2006-08-28  Bruno Haible  <bruno@clisp.org>
5383
5384         * modules/c-strstr: New file, from GNU gettext.
5385         * MODULES.html.sh (String handling): Add c-strstr.
5386
5387 2006-08-28  Bruno Haible  <bruno@clisp.org>
5388
5389         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
5390         macros.
5391         Reported by Eric Blake.
5392
5393 2006-08-28  Bruno Haible  <bruno@clisp.org>
5394
5395         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
5396         (VASNPRINTF): Return a string of length > INT_MAX without failing.
5397         * lib/vasprintf.c: Include errno.h, limits.h.
5398         (EOVERFLOW): New fallback definition.
5399         (vasprintf): Test here whether the string length is > INT_MAX.
5400         * lib/vsnprintf.c: Include errno.h, limits.h.
5401         (EOVERFLOW): New fallback definition.
5402         (vsnprintf): Fix bug when generated string was too long for the buffer.
5403         Test here whether the string length is > INT_MAX.
5404
5405 2006-08-28  Bruno Haible  <bruno@clisp.org>
5406
5407         * lib/inttypes_.h (SCNX*): Remove definitions.
5408         Reported by Eric Blake.
5409
5410 2006-08-28  Bruno Haible  <bruno@clisp.org>
5411
5412         * lib/c-strstr.h: New file, from GNU gettext.
5413         * lib/c-strstr.c: New file, from GNU gettext.
5414
5415 2006-08-28  Bruno Haible  <bruno@clisp.org>
5416
5417         * gnulib-tool: Reorder some statements.
5418
5419 2006-08-28  Bruno Haible  <bruno@clisp.org>
5420
5421         * gnulib-tool: New option --makefile-name.
5422         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
5423         $makefile_name.
5424         (func_import): Write $makefile_name to the cache file, and read it from
5425         there unless explicitly specified. Use $makefile_name as file name
5426         instead of Makefile.am. Adjust the recommendations accordingly.
5427
5428 2006-08-28  Bruno Haible  <bruno@clisp.org>
5429
5430         * gnulib-tool (func_verify_module): Check against misapplying patch.
5431
5432 2006-08-28  Bruno Haible  <bruno@clisp.org>
5433
5434         * gnulib-tool (func_relativize, func_relconcat): New functions.
5435         Give an error if --local-dir is given with --update.
5436         Remove trailing slashes from $local_gnulib_dir.
5437         (func_import): Store the relativized $local_gnulib_dir in
5438         gnulib-cache.m4, and read it from there if not specified explicitly.
5439
5440 2006-08-28  Bruno Haible  <bruno@clisp.org>
5441
5442         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
5443         is the current directory. Respect also $local_gnulib_dir.
5444
5445 2006-08-28  Bruno Haible  <bruno@clisp.org>
5446             Simon Josefsson  <jas@extundo.com>
5447
5448         BeOS portability.
5449         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
5450
5451 2006-08-27  Jim Meyering  <jim@meyering.net>
5452
5453         * doc/visibility.texi: Remove duplicate word: "pointer".
5454
5455 2006-08-26  Bruno Haible  <bruno@clisp.org>
5456
5457         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
5458         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
5459         (Makefile.am): Create inttypes.h from inttypes_.h.
5460         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
5461
5462         * modules/imaxabs: New file.
5463
5464         * modules/imaxdiv: New file.
5465
5466 2006-08-26  Bruno Haible  <bruno@clisp.org>
5467
5468         * m4/inttypes.m4: New file.
5469         * m4/_inttypes_h.m4: Remove file.
5470         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
5471         PRI_MACROS_BROKEN.
5472         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
5473
5474         * m4/imaxabs.m4: New file.
5475
5476         * m4/imaxdiv.m4: New file.
5477
5478 2006-08-26  Bruno Haible  <bruno@clisp.org>
5479
5480         * lib/inttypes_.h: New file.
5481         * lib/inttypes.h: Remove file.
5482         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
5483
5484         * lib/imaxabs.c: New file.
5485
5486         * lib/imaxdiv.c: New file.
5487
5488 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5489
5490         New config-h module, so that "make" output needn't be cluttered
5491         by -DHAVE_CONFIG_H.
5492         * MODULES.html.sh (Support for building libraries and executables):
5493         Add config-h.
5494         * modules/config-h: New file.
5495         * gnulib-tool (nl, sed_transform_lib_file): New vars.
5496         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
5497         the config-h module is used.
5498
5499         New configmake module, so that "make" output needn't be cluttered
5500         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
5501         * MODULES.html.sh (Support for building libraries and executables):
5502         Add configmake.
5503         * modules/configmake: New file.
5504
5505 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
5506
5507         * m4/config-h.m4: New file.
5508
5509 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5510
5511         * config/srclist.txt: Add elisp-comp.
5512
5513 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
5514
5515         * MODULES.html.sh (Support for building libraries and executables):
5516         Add elisp-comp.
5517         * build-aux/elisp-comp: New file.
5518         * modules/elisp-comp: New file.
5519
5520 2006-08-24  Bruno Haible  <bruno@clisp.org>
5521
5522         * gnulib-tool (func_create_testdir): Use non-default values of
5523         sourcebase and m4base.
5524
5525 2006-08-24  Bruno Haible  <bruno@clisp.org>
5526
5527         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
5528         HTML structure.
5529
5530 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
5531
5532         * modules/openat (Depends-on): Add lchown.
5533
5534 2006-08-23  Bruno Haible  <bruno@clisp.org>
5535
5536         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
5537         of gl_LOCK_EARLY instead of gl_LOCK.
5538
5539 2006-08-23  Bruno Haible  <bruno@clisp.org>
5540
5541         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
5542         on OSF/1 to no.
5543         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
5544
5545 2006-08-23  Bruno Haible  <bruno@clisp.org>
5546
5547         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
5548         as unusable.
5549
5550         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
5551         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
5552         (gl_LOCK): New macro.
5553
5554 2006-08-22  Simon Josefsson  <jas@extundo.com>
5555
5556         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
5557         to md5 module.
5558
5559 2006-08-22  Simon Josefsson  <jas@extundo.com>
5560
5561         * MODULES.html.sh: Add "Support for maintaining and release
5562         projects".
5563
5564         * build-aux/gnupload: New file, from coreutils.
5565
5566 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5567
5568         Avoid the need for AC_LIBSOURCES in m4 macros.
5569         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
5570         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
5571         * modules/check-version (EXTRA_DIST): Add check-version.h.
5572         * modules/crc (EXTRA_DIST): Add crc.h.
5573         * modules/des (EXTRA_DIST): Add des.h.
5574         * modules/gc (EXTRA_DIST): Add gc.h.
5575         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
5576         * modules/getline (EXTRA_DIST): Add getline.h.
5577         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
5578         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
5579         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
5580         * modules/md2 (EXTRA_DIST): Add md2.h.
5581         * modules/md4 (EXTRA_DIST): Add md4.h.
5582         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
5583         * modules/read-file (EXTRA_DIST): Add read-file.h.
5584         * modules/readline (EXTRA_DIST): Add readline.h.
5585         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
5586         rijndael-api-fst.h.
5587
5588 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5589
5590         * m4/rijndael.m4 (gl_ARCFOUR):
5591         * m4/arctwo.m4 (gl_ARCTWO):
5592         * m4/check-version.m4 (gl_CHECK_VERSION):
5593         * m4/crc.m4 (gl_CRC):
5594         * m4/des.m4 (gl_DES):
5595         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
5596         * m4/gc.m4 (gl_GC):
5597         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
5598         * m4/getline.m4 (gl_FUNC_GETLINE):
5599         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
5600         * m4/hmac-md5.m4 (gl_HMAC_MD5):
5601         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
5602         * m4/md2.m4 (gl_MD2):
5603         * m4/md4.m4 (gl_MD4):
5604         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
5605         * m4/read-file.m4 (gl_FUNC_READ_FILE):
5606         * m4/readline.m4 (gl_FUNC_READLINE):
5607         * m4/rijndael.m4 (gl_RIJNDAEL):
5608         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5609         to get the necessary .h files and whatnot.
5610
5611 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
5612
5613         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
5614         gnulib rather than the other way around.
5615         * config/srclistvars.sh (COREUTILS): Remove.
5616
5617 2006-08-22  Jim Meyering  <jim@meyering.net>
5618
5619         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
5620
5621         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
5622
5623 2006-08-22  Eric Blake  <ebb9@byu.net>
5624
5625         * modules/regexprops-generic: New file.
5626         * MODULES.html.sh (Support for building documentation): List it.
5627
5628 2006-08-22  Eric Blake  <ebb9@byu.net>
5629
5630         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
5631         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
5632         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
5633         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
5634
5635 2006-08-22  Bruno Haible  <bruno@clisp.org>
5636
5637         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
5638         and lib_LTLIBRARIES like the other lib_* variables.
5639
5640 2006-08-22  Bruno Haible  <bruno@clisp.org>
5641
5642         * build-aux/x-to-1.in: New file, from GNU gettext.
5643
5644 2006-08-22  Bruno Haible  <bruno@clisp.org>
5645
5646         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
5647         <utmpx.h> exists.
5648
5649 2006-08-22  Bruno Haible  <bruno@clisp.org>
5650
5651         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
5652         <utmpx.h> exists.
5653
5654 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5655
5656         BeOS portability.
5657         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
5658         exist.
5659         Problem reported by Bruno Haible.
5660
5661 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5662
5663         Avoid the need for AC_LIBSOURCES in m4 macros.
5664         * modules/acl (EXTRA_DIST): Add acl.h.
5665         * modules/argmatch (Files): Add m4/argmatch.m4.
5666         (configure.ac): Add gl_ARGMATCH.
5667         (EXTRA_DIST): Renamed from lib_SOURCES, for
5668         consistency with the other modules.  Remove argmatch.c.
5669         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
5670         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
5671         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
5672         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
5673         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
5674         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
5675         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
5676         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
5677         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
5678         * modules/closeout (EXTRA_DIST): Add closeout.h.
5679         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
5680         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
5681         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
5682         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
5683         dirname.h; remove basename.c and stripslash.c.
5684         * modules/exclude (EXTRA_DIST): Add exclude.h.
5685         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
5686         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
5687         * modules/file-type (EXTRA_DIST): Add file-type.h.
5688         * modules/filemode (EXTRA_DIST): Add filemode.h.
5689         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
5690         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5691         * modules/fpending (EXTRA_DIST): Add __fpending.h.
5692         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
5693         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
5694         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
5695         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
5696         * modules/getdate (EXTRA_DIST): Add getdate.c.
5697         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
5698         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
5699         * modules/getpass (EXTRA_DIST): Add getpass.h.
5700         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
5701         * modules/group-member (EXTRA_DIST): Add group-member.h.
5702         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
5703         * modules/hash (EXTRA_DIST): Add hash.h.
5704         * modules/human (EXTRA_DIST): Add human.h.
5705         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
5706         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
5707         * modules/lchown (EXTRA_DIST): Add lchown.h.
5708         * modules/long-options (EXTRA_DIST): Add long-options.h.
5709         * modules/lstat (EXTRA_DIST): Add lstat.h.
5710         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
5711         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
5712         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
5713         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
5714         * modules/memxor (EXTRA_DIST): Add memxor.h.
5715         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
5716         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
5717         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
5718         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
5719         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
5720         * modules/physmem (EXTRA_DIST): Add physmem.h.
5721         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
5722         * modules/posixver (EXTRA_DIST): Add posixver.h.
5723         * modules/quote (EXTRA_DIST): Add quote.h.
5724         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
5725         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
5726         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
5727         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
5728         regex_internal.h regexec.c.
5729         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
5730         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
5731         * modules/same (EXTRA_DIST): Add same.h.
5732         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
5733         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
5734         * modules/savedir (EXTRA_DIST): Add savedir.h.
5735         * modules/sha1 (EXTRA_DIST): Add sha1.h.
5736         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
5737         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
5738         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
5739         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
5740         * modules/strdup (EXTRA_DIST): Add strdup.h.
5741         * modules/strftime (EXTRA_DIST): Add strftime.h.
5742         * modules/strndup (EXTRA_DIST): Add strndup.h.
5743         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
5744         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
5745         * modules/time_r (EXTRA_DIST): Add time_r.h.
5746         * modules/timespec (EXTRA_DIST): Add timespec.h.
5747         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
5748         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
5749         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
5750         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
5751         * modules/userspec (EXTRA_DIST): Add userspec.h.
5752         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
5753         * modules/utimens (EXTRA_DIST): Add utimens.h.
5754         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
5755         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
5756         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
5757         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
5758         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
5759         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
5760         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
5761         * modules/yesno (EXTRA_DIST): Add yesno.h.
5762
5763 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
5764
5765         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
5766
5767         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
5768         * m4/dev-ino.m4, same-inode.m4: Remove.
5769
5770         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
5771         * m4/acl.m4 (AC_FUNC_ACL):
5772         * m4/backupfile.m4 (gl_BACKUPFILE):
5773         * m4/c-strtod.m4 (gl_C99_STRTOLD):
5774         * m4/canon-host.m4 (gl_CANON_HOST):
5775         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
5776         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
5777         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
5778         * m4/cloexec.m4 (gl_CLOEXEC):
5779         * m4/close-stream.m4 (gl_CLOSE_STREAM):
5780         * m4/closeout.m4 (gl_CLOSEOUT):
5781         * m4/dirfd.m4 (gl_FUNC_DIRFD):
5782         * m4/dirname.m4 (gl_DIRNAME):
5783         * m4/exclude.m4 (gl_EXCLUDE):
5784         * m4/exitfail.m4 (gl_EXITFAIL):
5785         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
5786         * m4/file-type.m4 (gl_FILE_TYPE):
5787         * m4/filemode.m4 (gl_FILEMODE):
5788         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
5789         * m4/fpending.m4 (gl_FUNC_FPENDING):
5790         * m4/fprintftime.m4 (gl_FPRINTFTIME):
5791         * m4/fts.m4 (gl_FUNC_FTS):
5792         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
5793         * m4/getdate.m4 (gl_GETDATE):
5794         * m4/gethrxtime.m4 (gl_GETHRXTIME):
5795         * m4/getpagesize.m4 (gl_GETPAGESIZE):
5796         * m4/getpass.m4 (gl_FUNC_GETPASS):
5797         * m4/gettime.m4 (gl_GETTIME):
5798         * m4/getugroups.m4 (gl_GETUGROUPS):
5799         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
5800         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
5801         * m4/hard-locale.m4 (gl_HARD_LOCALE):
5802         * m4/hash.m4 (gl_HASH):
5803         * m4/idcache.m4 (gl_IDCACHE):
5804         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
5805         * m4/lchown.m4 (gl_FUNC_LCHOWN):
5806         * m4/long-options.m4 (gl_LONG_OPTIONS):
5807         * m4/lstat.m4 (gl_FUNC_LSTAT):
5808         * m4/md5.m4 (gl_MD5):
5809         * m4/memcasecmp.m4 (gl_MEMCASECMP):
5810         * m4/memcoll.m4 (gl_MEMCOLL):
5811         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
5812         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
5813         * m4/memxor.m4 (gl_MEMXOR):
5814         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
5815         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
5816         * m4/modechange.m4 (gl_MODECHANGE):
5817         * m4/mountlist.m4 (gl_MOUNTLIST):
5818         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
5819         * m4/openat.m4 (gl_FUNC_OPENAT):
5820         * m4/pathmax.m4 (gl_PATHMAX):
5821         * m4/physmem.m4 (gl_PHYSMEM):
5822         * m4/posixtm.m4 (gl_POSIXTM):
5823         * m4/posixver.m4 (gl_POSIXVER):
5824         * m4/quote.m4 (gl_QUOTE):
5825         * m4/quotearg.m4 (gl_QUOTEARG):
5826         * m4/readtokens.m4 (gl_READTOKENS):
5827         * m4/readutmp.m4 (gl_READUTMP):
5828         * m4/regex.m4 (gl_REGEX):
5829         * m4/safe-read.m4 (gl_SAFE_READ):
5830         * m4/safe-write.m4 (gl_SAFE_WRITE):
5831         * m4/same.m4 (gl_SAME):
5832         * m4/save-cwd.m4 (gl_SAVE_CWD):
5833         * m4/savedir.m4 (gl_SAVEDIR):
5834         * m4/settime.m4 (gl_SETTIME):
5835         * m4/sha1.m4 (gl_SHA1):
5836         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
5837         * m4/stat-macros.m4 (gl_STAT_MACROS):
5838         * m4/stat-time.m4 (gl_STAT_TIME):
5839         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
5840         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
5841         * m4/strdup.m4 (gl_FUNC_STRDUP):
5842         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
5843         * m4/strndup.m4 (gl_FUNC_STRNDUP):
5844         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
5845         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
5846         * m4/time_r.m4 (gl_TIME_R):
5847         * m4/timespec.m4 (gl_TIMESPEC):
5848         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
5849         * m4/unlinkdir.m4 (gl_UNLINKDIR):
5850         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
5851         * m4/userspec.m4 (gl_USERSPEC):
5852         * m4/utimecmp.m4 (gl_UTIMECMP):
5853         * m4/utimens.m4 (gl_UTIMENS):
5854         * m4/xalloc.m4 (gl_XALLOC):
5855         * m4/xgetcwd.m4 (gl_XGETCWD):
5856         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
5857         * m4/xreadlink.m4 (gl_XREADLINK):
5858         * m4/xstrtod.m4 (gl_XSTRTOD):
5859         * m4/yesno.m4 (gl_YESNO):
5860         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
5861         to get the necessary .h files and whatnot.
5862
5863 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
5864             Bruno Haible  <bruno@clisp.org>
5865
5866         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
5867         /bin/sh understanding of '!' conditional negation.
5868
5869 2006-08-21  Jim Meyering  <jim@meyering.net>
5870
5871         * modules/openat (Depends-on): Really alphabetize.
5872
5873         * modules/acl (Depends-on): Add error and quote.
5874
5875         * check-module (find_included_lib_files): Add at-func.c to the
5876         ok-to-include-more-than-once white list.
5877
5878         * modules/openat (Depends-on): Add lstat.  Alphabetize.
5879
5880 2006-08-21  Bruno Haible  <bruno@clisp.org>
5881
5882         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
5883         Emit a pkgdata_DATA variable only if some snippets add contents to it.
5884         Reported by Martin Lambers <marlam@marlam.de>.
5885
5886 2006-08-21  Bruno Haible  <bruno@clisp.org>
5887
5888         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
5889         specify an installation location, don't emit a noinst_LIBRARIES or
5890         noinst_LTLIBRARIES assignment.
5891
5892 2006-08-21  Bruno Haible  <bruno@clisp.org>
5893
5894         BeOS portability.
5895         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
5896         BeOS has mbrtowc() but no <wctype.h>.
5897
5898 2006-08-21  Bruno Haible  <bruno@clisp.org>
5899
5900         BeOS portability.
5901         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
5902         exist.
5903
5904 2006-08-21  Bruno Haible  <bruno@clisp.org>
5905
5906         BeOS portability.
5907         * lib/mbchar.h: Include <wctype.h> only if it exists.
5908
5909 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5910
5911         Remove files that are no longer needed by their respective modules.
5912         * m4/obstack.m4: Remove.
5913         * m4/strerror_r.m4: Remove.
5914         * m4/uint32_t.m4: Remove.
5915         * m4/uintptr_t.m4: Remove.
5916         * m4/ullong_max.m4: Remove.
5917         * m4/xstrtoimax.m4: Remove.
5918         * m4/xstrtoumax.m4: Remove.
5919
5920         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
5921         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
5922         dependencies now capture this.
5923
5924         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
5925         Do not use AC_LIBSOURCES, since gnulib modules now do this.
5926         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
5927         * m4/human.m4 (gl_HUMAN): Likewise.
5928         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
5929         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
5930
5931         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
5932
5933         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
5934         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
5935         stdint.
5936         * m4/human.m4 (gl_HUMAN): Likewise.
5937         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
5938         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
5939         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5940         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5941         * m4/xstrtol (gl_XSTRTOL): Likewise.
5942
5943         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
5944         AC_TYPE_LONG_LONG_INT.
5945         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
5946         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
5947         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
5948         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
5949
5950         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
5951         on stdbool.
5952
5953         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
5954         (gl_PREREQ_XSTRTOUL): Remove.
5955
5956         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
5957
5958         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
5959         mode.
5960
5961 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
5962
5963         Add and change modules to make it easier for coreutils to use
5964         gnulib-tool.
5965         * modules/backupfile (Files): Remove m4/d-ino.m4.
5966         (Depends-on): Add d-ino.
5967         * modules/cycle-check (Depends-on): Add stdint.
5968         (lib_SOURCES): Add cycle-check.h.
5969         * modules/d-ino: New module.
5970         * modules/d-type: New module.
5971         * modules/error (Files): Remove m4/strerror_r.m4.
5972         * modules/filemode (Files): Add m4/st_dm_mode.m4.
5973         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
5974         m4/inttypes_h.m4, m4/uintmax_t.m4.
5975         (Depends-on): Add stdint.
5976         (lib_SOURCES): Add fsusage.h.
5977         * modules/getcwd (Files): Remove d-ino.m4.
5978         (Depends-on): Add d-ino.
5979         * modules/getndelim2 (Depends-on): Add stdint.
5980         * modules/glob (Files): Remove m4/d-type.m4.
5981         (Depends-on): Add d-type.
5982         * modules/host-os: New module.
5983         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
5984         m4/inttypes_h.m4, m4/uintmax_t.m4.
5985         * Depends-on: Add stdint.
5986         (lib_SOURCES): Add human.h.
5987         * modules/inttostr (Files): Remove m4/intmax_t.m4,
5988         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
5989         m4/uintmax_t.m4, m4/ulonglong.m4.
5990         (Depends-on): Add stdint.
5991         (EXTRA_DIST): Add inttostr.h.
5992         * modules/lchmod: New module.
5993         * modules/link-follow: New module.
5994         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
5995         (Depends-on): Add lchmod.
5996         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
5997         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
5998         (Depends-on): Add stdint.
5999         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
6000         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
6001         (Depends-on): Add stdint.
6002         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
6003         * modules/perl: New module.
6004         * modules/regex (Depends-on): Add stdint.
6005         * modules/rmdir-errno: New module.
6006         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6007         m4/intmax_t.m4.
6008         (Depends-on): Add stdint.
6009         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
6010         m4/uintmax_t.m4.
6011         (Depends-on): Add stdint.
6012         * modules/unlink-busy: New module.
6013         * modules/utimecmp (Depends-on): Add stdint.
6014         * modules/uptime: New module.
6015         * modules/winsz-ioctl: New module.
6016         * modules/winsz-termios: New module.
6017         * modules/xnanosleep (Depends-on): Add nanosleep.
6018         * modules/ullong_max: Remove.
6019         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
6020         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
6021         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
6022         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
6023         (Depends-on): Add inttypes.
6024         (lib_SOURCES): Add xstrtol.h.
6025         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
6026         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
6027         * MODULES.html.sh: Move 'assert' into the assert section.
6028         Move 'dummy' into the linking section.
6029         Remove ullong_max.
6030         Add section for compatibility checks for POSIX:2001 functions,
6031         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
6032         winsz-ioctl, and winsz-termios into it.
6033         Add lchmod.
6034         Add top-level Misc section and put host-os, perl, and uptime
6035         into it.
6036
6037 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
6038
6039         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
6040         now assume the stdint module.  Do not include inttypes.h.
6041         * lib/fsusage.h: Likewise.
6042         * lib/getndelim2.c: Likewise.
6043         * lib/human.h: Likewise.
6044         * lib/inttostr.h: Likewise.
6045         * lib/obstack.c: Likewise.
6046         * lib/regex_internal.h: Likewise.
6047         * lib/tempname.c: Likewise.
6048         * lib/utimecmp.c: Likewise.
6049         * lib/xstrtol.h: Likewise.
6050
6051         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
6052
6053         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
6054         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
6055         * lib/xtime.h: Likewise.
6056
6057 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6058
6059         * modules/openat (Files): Add lib/fchmodat.c.
6060         Fixes problem reported by Jay Youngman.
6061
6062 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
6063
6064         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
6065         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
6066
6067 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
6068             Bruno Haible  <bruno@clisp.org>
6069
6070         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
6071         and is a script that invokes bison. Tighten the code. Add comments.
6072
6073 2006-08-18  Jim Meyering  <jim@meyering.net>
6074
6075         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
6076         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
6077         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
6078         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
6079
6080 2006-08-18  Bruno Haible  <bruno@clisp.org>
6081
6082         * modules/bison-i18n: New file.
6083         * MODULES.html.sh (Internationalization functions): Add it.
6084
6085 2006-08-18  Bruno Haible  <bruno@clisp.org>
6086
6087         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
6088         sys/statvfs.h. When getmntinfo was found, check its declaration and
6089         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
6090
6091 2006-08-18  Bruno Haible  <bruno@clisp.org>
6092
6093         * m4/bison-i18n.m4: New file, from bison.
6094
6095 2006-08-18  Bruno Haible  <bruno@clisp.org>
6096
6097         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
6098         (ME_DUMMY): Treat "kernfs" as a dummy.
6099         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
6100
6101 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6102
6103         Update from coreutils.
6104
6105         2006-08-15  Jim Meyering  <jim@meyering.net>
6106
6107         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
6108
6109         2006-01-17  Jim Meyering  <jim@meyering.net>
6110
6111         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
6112
6113         2006-01-11  Jim Meyering  <jim@meyering.net>
6114
6115         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
6116         Check for the lchmod function.
6117
6118 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
6119
6120         Update from coreutils.
6121
6122         * lib/__fpending.h: Add copyright notice.
6123         * lib/fprintftime.h: Likewise.
6124         * lib/savedir.c: Use (C) in copyright notice.
6125         * lib/savedir.h: Likewise.
6126
6127         2006-08-15  Jim Meyering  <jim@meyering.net>
6128
6129         * lib/at-func.c: New file, with the logic of all emulated at-functions.
6130         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
6131         in support of the EXPECTED_ERRNO macro.
6132         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
6133         definitions.  Instead, define the appropriate symbols and include
6134         "at-func.c".
6135         * lib/mkdirat.c (mkdirat): Likewise.
6136         * lib/fchmodat.c (fchmodat): Likewise.
6137         (ENOSYS): Remove definition.
6138         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
6139         it.  Don't include "unistd--.h" -- it wasn't ever used.
6140
6141         2006-01-17  Jim Meyering  <jim@meyering.net>
6142
6143         Rewrite fts.c not to change the current working directory,
6144         by using openat, fstatat, fdopendir, etc..
6145
6146         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
6147         (HAVE_OPENAT_SUPPORT): Define.
6148         [_LIBC] (fchdir): Don't undef or define; no longer used.
6149         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
6150         Now, this `function' always succeeds, and consumes its file descriptor
6151         parameter -- so callers must not close such FDs.  Update callers.
6152         (diropen_fd, opendirat, cwd_advance_fd): New functions.
6153         (diropen): Add parameter, SP.  Adjust all callers.
6154         Implement using diropen_fd, rather than open.
6155         (fts_open): Initialize new member, fts_cwd_fd.
6156         Remove fts_rft-setting code.
6157         (fts_close): Close fts_cwd_fd, if necessary.
6158         (__opendir2): Define in terms of opendir or opendirat,
6159         depending on whether the FST_NOCHDIR flag is set.
6160         (fts_build): Since fts_safe_changedir consumes its FD, and since
6161         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
6162         and close the dup'd file descriptor upon failure.
6163         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
6164         (fts_safe_changedir): Tweak semantics to reflect that this function
6165         now calls cwd_advance_fd and hence consumes its FD argument.
6166         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
6167         [struct FTS] (fts_rft): Remove now-unused member.
6168         [struct FTS] (fts_cycle.state): Improve comment.
6169
6170         * lib/openat.c (openat_needs_fchdir): New function.
6171         * lib/openat.h (openat_needs_fchdir): Declare it.
6172
6173 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
6174
6175         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
6176         Problem and fix reported by Pádraig Brady in
6177         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
6178
6179 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6180
6181         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
6182
6183 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6184
6185         * lib/memcoll.c (memcoll): Optimize for the common case where the
6186         arguments are bytewise equal.
6187
6188 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
6189
6190         * doc/regexprops-generic.texi: Add a copyright notice.
6191
6192 2006-08-15  Bruno Haible  <bruno@clisp.org>
6193
6194         * modules/tmpdir (License): Change to LGPL.
6195
6196 2006-08-15  Bruno Haible  <bruno@clisp.org>
6197
6198         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
6199         module.
6200
6201 2006-08-14  Simon Josefsson  <jas@extundo.com>
6202
6203         * config/srclist.txt: Add gnupload.
6204
6205 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6206
6207         Change copyright notice from LGPL 2 to GPL 2, since that's the
6208         standard form used in the gnulib repository.
6209         * tests/test-lock.c: Likewise.
6210         * tests/test-stdint.c: Likewise.
6211         * tests/test-tls.c: Likewise.
6212
6213         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
6214         prelude-manager.  User shorter URLs for GNU projects, without '?'.
6215         Add copyright notice.
6216
6217         * check-module: Add copyright notice.  Output a copyright
6218         notice if "--version" is specified.
6219         * modules/COPYING: New file.
6220         * tests/test-getaddrinfo.c: Add copyright notice.
6221         * tests/test-verify.c: Likewise.
6222
6223 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6224
6225         Change copyright notice from LGPL 2 to GPL 2, since that's the
6226         standard form used in the gnulib repository.
6227         * lib/lock.c: LGPL -> GPL.
6228         * lib/lock.h: Likewise.
6229         * lib/strnlen1.c: Likewise.
6230         * lib/strnlen1.h: Likewise.
6231         * lib/tls.c: Likewise.
6232         * lib/tls.h: Likewise.
6233         * lib/tmpdir.c: Likewise.
6234
6235         * lib/TODO: Remove; this belongs only in coreutils.
6236
6237 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6238
6239         Add copyright notices to long-enough files that lack them, since
6240         otherwise the files aren't clearly free.  Use the same notice that
6241         getdate.texi already uses.
6242         * doc/alloca-opt.texi: Add copyright notice.
6243         * doc/alloca.texi: Likewise.
6244         * doc/ctime.texi: Likewise.
6245         * doc/functions.texi: Likewise.
6246         * doc/gcd.texi: Likewise.
6247         * doc/gnulib-tool.texi: Likewise.
6248         * doc/inet_ntoa.texi: Likewise.
6249         * doc/visibility.texi: Likewise.
6250
6251         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
6252         * doc/quote.texi: Add copyright notice.
6253
6254         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
6255         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
6256         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
6257         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
6258         is now obsolete, and give a pointer to the Sun list.
6259         Add copyright notice.
6260
6261 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
6262
6263         * config/srclistvars.sh: Add copyright notice.
6264
6265 2006-08-14  Eric Blake  <ebb9@byu.net>
6266
6267         Import the following change from libc:
6268
6269         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
6270
6271         Upstream bug 2997.
6272         * lib/misc/error.c: Add space between program name and message if file
6273         name is missing.
6274
6275 2006-08-12  Karl Berry  <karl@gnu.org>
6276
6277         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
6278         remove, these originate in gnulib now.
6279
6280 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6281
6282         * doc/Makefile (standards.info standards.html standards.dvi):
6283         Also depend on make-stds.texi.
6284
6285 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
6286
6287         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
6288         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
6289
6290         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
6291         in wchar_t.  Problem reported by Eric Blake.
6292
6293         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
6294         LEN is smaller than SIZE.  Suggested by Bruno Haible.
6295         Also, help the compiler to keep LEN in a register.
6296
6297 2006-08-11  Eric Blake  <ebb9@byu.net>
6298
6299         * users.txt: Sort.  Add tar.
6300
6301 2006-08-11  Bruno Haible  <bruno@clisp.org>
6302
6303         * users.txt: New file.
6304
6305 2006-08-11  Bruno Haible  <bruno@clisp.org>
6306
6307         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
6308         before <wchar.h>. Needed for OSF/1 and BSD/OS.
6309
6310 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6311
6312         * modules/snprintf (Depends-on): Remove minmax.
6313         (Maintainer): Add self and Bruno.
6314
6315 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
6316
6317         * lib/.cppi-disable: Add snprintf.h, socket_.h.
6318         * lib/snprintf.c: Include <errno.h> and <limits.h>.
6319         (EOVERFLOW): Define if the system does not.
6320         Do not include "minmax.h"; it wasn't used.
6321         (snprintf): Don't assume size_t promotes to an unsigned type.
6322         Fix bug when generated string was too long for the buffer: the
6323         buffer's contents are supposed to be the initial prefix of the
6324         output.  Don't assume vasnprintf returns EOVERFLOW if the size
6325         exceeds INT_MAX; do the check ourselves.
6326
6327         Import the following changes from libc:
6328
6329         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
6330
6331         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
6332         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
6333         set wc to the byte which couldn't be converted.
6334         (re_string_reconstruct): Don't clear valid_raw_len before calling
6335         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
6336         tip_context using re_string_context_at.
6337
6338         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
6339
6340         * lib/posix/regex.h: g++ still cannot handled [restrict].
6341
6342         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
6343
6344         * lib/posix/regex.h: Remove special handling for VMS.
6345
6346 2006-08-10  Jim Meyering  <jim@meyering.net>
6347
6348         * modules/same-inode: New module.
6349         * modules/dev-ino: New module.
6350         * modules/cycle-check: Depend on these modules, rather than simply
6351         including their .h files.
6352         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
6353         required via m4/cycle-check.m4.
6354         * modules/same: Depend on new same-inode module, rather than
6355         including same-inode.h.
6356         * modules/chdir-safer: New file.
6357
6358         * modules/chown (Depends-on): Add stat-macros.
6359
6360 2006-08-10  Jim Meyering  <jim@meyering.net>
6361
6362         * m4/cycle-check.m4: New file.
6363         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
6364         * m4/dev-ino.m4, m4/same-inode.m4: New files.
6365
6366 2006-08-10  Eric Blake  <ebb9@byu.net>
6367
6368         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
6369         in from original proposal.
6370
6371 2006-08-10  Eric Blake  <ebb9@byu.net>
6372         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
6373
6374         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
6375         namespace.
6376
6377 2006-08-10  Bruno Haible  <bruno@clisp.org>
6378
6379         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
6380         as well.
6381
6382 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6383
6384         Sync from coreutils.
6385
6386         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
6387
6388         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
6389         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
6390
6391 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6392
6393         * modules/restrict: Remove; no longer needed now that we assume
6394         Autoconf 2.59 or later.
6395         * MODULES.html.sh: Remove 'restrict'.
6396         * modules/argp (Depends-on): Remove 'restrict'.
6397         * modules/base64 (Depends-on): Likewise.
6398         * modules/gc (Depends-on): Likewise.
6399         * modules/getaddrinfo (Depends-on): Likewise.
6400         * modules/glob (Depends-on): Likewise.
6401         * modules/inet_ntop (Depends-on): Likewise.
6402         * modules/inet_pton (Depends-on): Likewise.
6403         * modules/memxor (Depends-on): Likewise.
6404         * modules/regex (Depends-on): Likewise.
6405         * modules/strtok_r (Depends-on): Likewise.
6406         * modules/time_r (Depends-on): Likewise.
6407
6408 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
6409
6410         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
6411         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
6412         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
6413         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
6414         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
6415         * m4/memxor.m4 (gl_MEMXOR): Likewise.
6416         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
6417         gl_C_RESTRICT replaced by AC_C_RESTRICT.
6418
6419         Merge from coreutils.
6420         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
6421         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
6422         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
6423         * m4/time_r.m4 (gl_TIME_R): Likewise.
6424
6425 2006-08-09  Karl Berry  <karl@gnu.org>
6426
6427         * config/srclist.txt: no more gettext-tools, per Bruno.
6428
6429 2006-08-08  Eric Blake  <ebb9@byu.net>
6430
6431         * modules/verror: New module.
6432         * MODULES.html.sh: Document it.
6433
6434 2006-08-08  Eric Blake  <ebb9@byu.net>
6435
6436         * lib/verror.h, lib/verror.c: New files.
6437
6438 2006-08-08  Eric Blake  <ebb9@byu.net>
6439
6440         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
6441         verror_at_line output complies with GNU Coding Standards even when
6442         file is NULL.
6443
6444 2006-08-07  Bruno Haible  <bruno@clisp.org>
6445
6446         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
6447         versions of AIX.
6448         Reported by Ralf Wildenhues.
6449
6450 2006-08-07  Bruno Haible  <bruno@clisp.org>
6451
6452         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
6453         in an AC_DEFUN. Needed so that the autoconf snippets can use
6454         AC_REQUIRE.
6455
6456 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6457
6458         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6459         Initialize pkgdata_DATA.
6460         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
6461         overriding it.
6462
6463 2006-08-06  Eric Blake  <ebb9@byu.net>
6464
6465         * lib/error.h: Fold in some upstream changes from glibc.
6466         * lib/error.c: Likewise.
6467
6468 2006-08-04  Bruno Haible  <bruno@clisp.org>
6469
6470         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6471         Make the mostlyclean-local rule depend on mostlyclean-generic.
6472         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
6473
6474 2006-07-31  Bruno Haible  <bruno@clisp.org>
6475
6476         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
6477         <stdlib.h>, <string.h>.
6478
6479 2006-07-30  Bruno Haible  <bruno@clisp.org>
6480
6481         * modules/readlink (License): Change to LGPL.
6482
6483 2006-07-30  Bruno Haible  <bruno@clisp.org>
6484
6485         * modules/javaversion (Makefile.am): Distribute javaversion.java and
6486         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
6487         set PKGDATADIR to point to it.
6488
6489 2006-07-30  Bruno Haible  <bruno@clisp.org>
6490
6491         * modules/csharpexec (configure.ac): Comment out macro invocation.
6492         * modules/javaexec (configure.ac): Likewise.
6493         * modules/javacomp-script (configure.ac): Likewise.
6494
6495         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
6496
6497 2006-07-30  Bruno Haible  <bruno@clisp.org>
6498
6499         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
6500         linked-list.
6501
6502 2006-07-30  Bruno Haible  <bruno@clisp.org>
6503
6504         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
6505
6506 2006-07-30  Bruno Haible  <bruno@clisp.org>
6507
6508         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
6509         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
6510         get removed.
6511
6512 2006-07-29  Bruno Haible  <bruno@clisp.org>
6513
6514         Make it possible for gnulib-tool to work with locally modified or
6515         augmented gnulib repositories.
6516         * gnulib-tool (func_usage): Document --local-dir option.
6517         (local_gnulib_dir): New variable.
6518         Handle --local-dir option.
6519         (func_lookup_file): New function.
6520         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
6521         (func_get_description, func_get_filelist, func_get_description,
6522         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
6523         func_get_automake_snippet, func_get_include_directive,
6524         func_get_license, func_get_maintainer): Use func_lookup_file.
6525         (func_import, func_create_testdir): Use func_lookup_file.
6526
6527 2006-07-29  Bruno Haible  <bruno@clisp.org>
6528
6529         * modules/setenv (Depends-on): Add unistd.
6530
6531 2006-07-29  Bruno Haible  <bruno@clisp.org>
6532
6533         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
6534
6535 2006-07-29  Bruno Haible  <bruno@clisp.org>
6536
6537         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
6538
6539 2006-07-29  Bruno Haible  <bruno@clisp.org>
6540
6541         * gnulib-tool (import, update): If there is no Makefile.am, look at
6542         aclocal.m4, instead of bailing out.
6543
6544 2006-07-29  Bruno Haible  <bruno@clisp.org>
6545
6546         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
6547         Categorize the options by when they are useful.
6548
6549 2006-07-29  Bruno Haible  <bruno@clisp.org>
6550
6551         * gnulib-tool (func_usage): Document option --no-libtool.
6552         Handle option --no-libtool.
6553         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
6554         for changed semantics of $libtool variable.
6555         (func_import): Likewise. If libtool is not used, show this through
6556         an option --no-libtool.
6557         (func_create_testdir): Update.
6558
6559 2006-07-29  Bruno Haible  <bruno@clisp.org>
6560
6561         * gnulib-tool (func_import): Extend error message about missing
6562         --doc-base.
6563
6564 2006-07-29  Bruno Haible  <bruno@clisp.org>
6565
6566         * gnulib-tool (func_import): Don't create the $docbase directory if
6567         there is no file to store there.
6568
6569 2006-07-29  Bruno Haible  <bruno@clisp.org>
6570
6571         * gnulib-tool (autoconf_minversion): If a --dir option is given and
6572         relevant, look for configure.ac there, not in the current directory.
6573         Also use a simple search for AC_PREREQ, not "autoconf --trace".
6574
6575 2006-07-29  Bruno Haible  <bruno@clisp.org>
6576
6577         * gnulib-tool (SORT): New variable.
6578         (func_usage): Undocument --assume-autoconf option.
6579         Remove --assume-autoconf option handling.
6580         (autoconf_minversion): Determine from the contents of configure.ac.
6581         (func_import): Remove autoconf_minversion handling.
6582         Suggested by Eric Blake.
6583
6584 2006-07-29  Bruno Haible  <bruno@clisp.org>
6585
6586         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
6587
6588 2006-07-29  Bruno Haible  <bruno@clisp.org>
6589
6590         * config/srclist.txt (*setenv.[ch]): Remove rules.
6591
6592 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6593
6594         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
6595
6596 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6597
6598         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
6599         arpa/inet.h.
6600
6601 2006-07-28  Simon Josefsson  <jas@extundo.com>
6602
6603         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
6604         * modules/inet_pton (Depends-on): Likewise.
6605
6606 2006-07-28  Simon Josefsson  <jas@extundo.com>
6607
6608         * m4/netinet_in_h.m4: New file.
6609
6610 2006-07-28  Simon Josefsson  <jas@extundo.com>
6611
6612         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
6613         #include's.
6614
6615 2006-07-28  Simon Josefsson  <jas@extundo.com>
6616
6617         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
6618         #include's.
6619
6620 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
6621
6622         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
6623         setgid on directories only if they set these bits.
6624         * lib/modechange.h: Remove obsolete comment about masks.
6625
6626 2006-07-28  Eric Blake  <ebb9@byu.net>
6627
6628         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
6629         macro expansion.
6630
6631 2006-07-28  Bruno Haible  <bruno@clisp.org>
6632
6633         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
6634
6635 2006-07-28  Bruno Haible  <bruno@clisp.org>
6636
6637         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
6638
6639 2006-07-28  Bruno Haible  <bruno@clisp.org>
6640
6641         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
6642         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
6643         Define fallbacks.
6644         Avoids link error on FreeBSD 4.x.
6645         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
6646
6647         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
6648         encoding.
6649         * lib/mbswidth.c (iswcntrl): Likewise.
6650
6651 2006-07-27  Bruno Haible  <bruno@clisp.org>
6652
6653         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
6654         test.
6655
6656 2006-07-27  Bruno Haible  <bruno@clisp.org>
6657
6658         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
6659         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
6660         defined.
6661
6662 2006-07-26  Eric Blake  <ebb9@byu.net>
6663
6664         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
6665
6666 2006-07-26  Eric Blake  <ebb9@byu.net>
6667
6668         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
6669         like mingw that lack mkstemp.
6670         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
6671         avoid compilation warning on mingw.
6672
6673 2006-07-26  Bruno Haible  <bruno@clisp.org>
6674
6675         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
6676         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
6677         INT_FAST*_MIN, INTPTR_MIN.
6678
6679 2006-07-25  Bruno Haible  <bruno@clisp.org>
6680
6681         * modules/version-etc (Depends-on): Add stdarg.
6682
6683 2006-07-25  Bruno Haible  <bruno@clisp.org>
6684
6685         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
6686         complex commands.
6687
6688 2006-07-25  Bruno Haible  <bruno@clisp.org>
6689
6690         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
6691         defined in <stdarg.h> or config.h.
6692
6693 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6694
6695         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
6696         (gl_STDIO_SAFER): Remove.
6697
6698 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
6699
6700         * MODULES.html.sh (File stream based Input/Output):
6701         Add fopen-safer, tmpfile-safer; remove stdio-safer.
6702         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
6703         * modules/fopen-safer, modules/tmpfile-safer: New files.
6704         * modules/stdio-safer: Remove.
6705
6706 2006-07-24  Bruno Haible  <bruno@clisp.org>
6707
6708         * modules/tmpdir: New file.
6709         * MODULES.html.sh (File system functions): Add it.
6710
6711 2006-07-24  Bruno Haible  <bruno@clisp.org>
6712
6713         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
6714         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
6715
6716 2006-07-24  Bruno Haible  <bruno@clisp.org>
6717
6718         * modules/clean-temp: New file.
6719
6720 2006-07-24  Bruno Haible  <bruno@clisp.org>
6721
6722         * m4/tmpdir.m4: New file, from GNU gettext.
6723
6724 2006-07-24  Bruno Haible  <bruno@clisp.org>
6725
6726         * lib/tmpdir.h: New file, from GNU gettext.
6727         * lib/tmpdir.c: New file, from GNU gettext.
6728
6729 2006-07-24  Bruno Haible  <bruno@clisp.org>
6730
6731         * lib/clean-temp.h: New file, from GNU gettext.
6732         * lib/clean-temp.c: New file, from GNU gettext.
6733
6734 2006-07-23  Eric Blake  <ebb9@byu.net>
6735
6736         * modules/stdio-safer (Files): Add tmpfile-safer.c.
6737         (Depends-on): Add binary-io.
6738
6739 2006-07-23  Eric Blake  <ebb9@byu.net>
6740
6741         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
6742
6743 2006-07-23  Eric Blake  <ebb9@byu.net>
6744
6745         * lib/tmpfile-safer.c: New file.
6746         * lib/stdio-safer.h (fopen_safer): Add prototype.
6747         * lib/stdio--.h (tmpfile): Make safer.
6748
6749 2006-07-23  Bruno Haible  <bruno@clisp.org>
6750
6751         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
6752         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
6753         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
6754         gl_linked_remove_at): Use it.
6755
6756 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6757         and Simon Josefsson <jas@extundo.com>
6758
6759         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
6760
6761         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
6762
6763 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6764
6765         * modules/close-stream: New file.
6766         * modules/closeout (Description): Make it clear that it exits
6767         with a diagnostic on error.
6768         (Depends-on): Add close-stream.  Remove fpending, stdbool.
6769         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
6770
6771 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6772
6773         * m4/close-stream.m4: New file.
6774
6775 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
6776
6777         * lib/close-stream.c, lib/close-stream.h: New files.
6778
6779 2006-07-22  Bruno Haible  <bruno@clisp.org>
6780
6781         Merge from GNU gettext 0.15.
6782
6783         2006-05-01  Bruno Haible  <bruno@clisp.org>
6784
6785                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
6786
6787         2006-07-22  Bruno Haible  <bruno@clisp.org>
6788
6789                 * modules/javaversion: New file.
6790                 * MODULES.html.sh (Java): Add javaversion.
6791
6792         2006-03-12  Bruno Haible  <bruno@clisp.org>
6793
6794                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
6795
6796         2005-12-04  Bruno Haible  <bruno@clisp.org>
6797
6798                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
6799                 (untested).
6800
6801         2006-06-21  Bruno Haible  <bruno@clisp.org>
6802
6803                 Avoid warnings from recent versions of mcs.
6804                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
6805                 -o, -L, -r any more. Use options documented since mcs-1.0
6806                 instead. Similarly for -g.
6807
6808         2005-12-04  Bruno Haible  <bruno@clisp.org>
6809
6810                 * build-aux/csharpcomp.sh.in: Suffix for resources is
6811                 .resources, not .resource.
6812
6813         2005-07-09  Bruno Haible  <bruno@clisp.org>
6814
6815                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
6816                 add a .dll suffix.
6817                 Reported by Mark Junker <mjscod@gmx.de>.
6818
6819         2006-07-22  Bruno Haible  <bruno@clisp.org>
6820
6821                 * modules/gettext: Upgrade to gettext-0.15.
6822                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
6823                 m4/visibility.m4.
6824                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
6825
6826 2006-07-22  Bruno Haible  <bruno@clisp.org>
6827
6828         Merge from GNU gettext 0.15.
6829
6830         2006-03-25  Bruno Haible  <bruno@clisp.org>
6831
6832                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
6833
6834         2006-07-21  Bruno Haible  <bruno@clisp.org>
6835
6836                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
6837                 "1.1".
6838
6839         2006-05-09  Bruno Haible  <bruno@clisp.org>
6840
6841                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
6842                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
6843                 for the conftestver execution.
6844
6845         2006-05-01  Bruno Haible  <bruno@clisp.org>
6846
6847                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
6848                 optional target-version argument. Verify that the compiler
6849                 groks source of the specified source-version, or add -source
6850                 option as necessary. Verify that the compiler produces
6851                 bytecode in the specified target-version, or add -target and
6852                 -source options as necessary. Make the result of the test
6853                 available as variable CONF_JAVAC. Also log error output in
6854                 config.log.
6855
6856         2006-03-11  Bruno Haible  <bruno@clisp.org>
6857
6858                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
6859
6860         2006-05-09  Bruno Haible  <bruno@clisp.org>
6861
6862                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
6863                 CLASSPATH_SEPARATOR to a semicolon.
6864
6865         2006-03-12  Bruno Haible  <bruno@clisp.org>
6866
6867                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
6868                 available as variable CONF_JAVA, for subsequent autoconf
6869                 tests. Also log error output in config.log.
6870
6871         2006-07-19  Bruno Haible  <bruno@clisp.org>
6872
6873                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
6874                 that getline works on glibc2 systems. Needed to avoid trouble
6875                 in relocatable.c.
6876                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
6877
6878         2005-12-04  Bruno Haible  <bruno@clisp.org>
6879
6880                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
6881                 launcher (untested).
6882
6883         2005-12-04  Bruno Haible  <bruno@clisp.org>
6884
6885                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
6886
6887         2006-07-22  Bruno Haible  <bruno@clisp.org>
6888
6889                 * gettext.m4: Update from GNU gettext-0.15.
6890                 * nls.m4: Likewise.
6891                 * po.m4: Likewise.
6892                 * inttypes-pri.m4: Likewise.
6893                 * inttypes-h.m4: Renamed from inttypes.m4.
6894                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
6895
6896 2006-07-22  Bruno Haible  <bruno@clisp.org>
6897
6898         Merge from GNU gettext 0.15.
6899
6900         2005-07-05  Bruno Haible  <bruno@clisp.org>
6901
6902                 * printf-args.c (printf_fetchargs): Work around broken
6903                 definition of wint_t on mingw.
6904
6905         2005-02-12  Bruno Haible  <bruno@clisp.org>
6906
6907                 * xallocsa.h: Add extern "C" for C++.
6908
6909         2006-05-17  Bruno Haible  <bruno@clisp.org>
6910
6911                 Cygwin portability.
6912                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
6913
6914         2006-04-30  Bruno Haible  <bruno@clisp.org>
6915
6916                 * progreloc.c: Include <mach-o/dyld.h> if available.
6917                 (find_executable): Use _NSGetExecutablePath when possible.
6918
6919         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
6920
6921                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
6922                 function.
6923
6924         2005-12-29  Bruno Haible  <bruno@clisp.org>
6925
6926                 * progreloc.c (set_program_name_and_installdir): Fix
6927                 compilation error.
6928
6929         2005-12-04  Bruno Haible  <bruno@clisp.org>
6930
6931                 Cygwin portability.
6932                 * progreloc.c: Include <windows.h> also on Cygwin.
6933                 (find_executable): Add support for Cygwin.
6934                 (set_program_name_and_installdir): Handle also platforms with
6935                 nonempty EXEEXT.
6936
6937         2006-07-11  Bruno Haible  <bruno@clisp.org>
6938
6939                 * javacomp.c: Fix a comment.
6940                 Reported by Jim Meyering.
6941
6942         2006-04-30  Bruno Haible  <bruno@clisp.org>
6943
6944                 * javacomp.h (compile_java_class): Add source_version,
6945                 target_version arguments.
6946                 * javacomp.c: Rewritten to choose only a compiler that
6947                 respects the specified source_version and target_version.
6948
6949         2006-06-27  Bruno Haible  <bruno@clisp.org>
6950
6951                 Assume correct S_ISDIR macro.
6952                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
6953
6954         2006-07-22  Bruno Haible  <bruno@clisp.org>
6955
6956                 * javaversion.h: New file, from GNU gettext.
6957                 * javaversion.c: New file, from GNU gettext.
6958                 * javaversion.java: New file, from GNU gettext.
6959                 * javaversion.class: New file, from GNU gettext.
6960
6961         2006-05-17  Bruno Haible  <bruno@clisp.org>
6962
6963                 Cygwin portability.
6964                 * javaexec.c (execute_java_class): Test for jview program
6965                 also on Cygwin.
6966
6967         2006-04-09  Bruno Haible  <bruno@clisp.org>
6968
6969                 * fatal-signal.c: Don't include string.h.
6970                 (at_fatal_signal): Use a copying loop instead of memcpy.
6971
6972         2005-12-04  Bruno Haible  <bruno@clisp.org>
6973
6974                 * csharpexec.c: Add support for 'clix' launcher (untested).
6975                 (execute_csharp_using_sscli): New function.
6976                 (execute_csharp_program): Call it.
6977
6978         2006-06-21  Bruno Haible  <bruno@clisp.org>
6979
6980                 Avoid warnings from recent versions of mcs.
6981                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
6982                 -o, -L, -r any more. Use options documented since mcs-1.0
6983                 instead. Similarly for -g.
6984
6985         2005-07-09  Bruno Haible  <bruno@clisp.org>
6986
6987                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
6988                 add a .dll suffix.
6989                 Reported by Mark Junker <mjscod@gmx.de>.
6990
6991         2006-06-17  Bruno Haible  <bruno@clisp.org>
6992
6993                 * config.charset: Update for NetBSD 3.0.
6994
6995         2006-05-17  Bruno Haible  <bruno@clisp.org>
6996
6997                 Cygwin portability.
6998                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
6999
7000         2006-05-16  Bruno Haible  <bruno@clisp.org>
7001
7002                 * localcharset.c [CYGWIN]: Include <windows.h>.
7003                 (get_charset_aliases): For Cygwin, return the same CPxxx
7004                 aliases list as under WIN32.
7005                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
7006                 the environment variables. Fall back to GetACP().
7007
7008         2006-04-05  Bruno Haible  <bruno@clisp.org>
7009
7010                 * config.charset: Update Juan Manuel Guerrero's address.
7011
7012         2005-02-12  Bruno Haible  <bruno@clisp.org>
7013
7014                 * allocsa.h: Add extern "C" for C++.
7015
7016         2005-02-10  Bruno Haible  <bruno@clisp.org>
7017
7018                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
7019                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
7020
7021         2006-07-22  Bruno Haible  <bruno@clisp.org>
7022
7023                 * gettext.h: Update to GNU gettext-0.15.
7024
7025 2006-07-22  Bruno Haible  <bruno@clisp.org>
7026
7027         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
7028         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
7029         lib-prefix.m4, longdouble.m4, ssize_t.m4.
7030
7031 2006-07-21  Eric Blake  <ebb9@byu.net>
7032
7033         * modules/stdlib-safer: New file.
7034         * MODULES.html.sh (File stream based Input/Output): Add
7035         stdlib-safer.
7036
7037 2006-07-21  Eric Blake  <ebb9@byu.net>
7038
7039         * lib/stdlib-safer.h: New file from coreutils, required by
7040         stdlib--.h.
7041
7042 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
7043
7044         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
7045
7046 2006-07-20  Bruno Haible  <bruno@clisp.org>
7047
7048         * gnulib-tool: Recognize new option --assume-autoconf.
7049         (autoconf_minversion): New variable.
7050         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
7051
7052 2006-07-20  Bruno Haible  <bruno@clisp.org>
7053
7054         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
7055
7056 2006-07-19  Derek R. Price  <derek@ximbiot.com>
7057
7058         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
7059         Reindent and repaginate.
7060
7061 2006-07-19  Derek Price  <derek@ximbiot.com>
7062
7063         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
7064         Correct grammar.
7065
7066 2006-07-17  Bruno Haible  <bruno@clisp.org>
7067
7068         * modules/list: New file.
7069         * modules/array-list: New file.
7070         * modules/carray-list, modules/carray-list-tests: New files.
7071         * modules/linked-list, modules/linked-list-tests: New files.
7072         * modules/avltree-list, modules/avltree-list-tests: New files.
7073         * modules/rbtree-list, modules/rbtree-list-tests: New files.
7074         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
7075         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
7076         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
7077         * modules/oset: New file.
7078         * modules/array-oset: New file.
7079         * modules/avltree-oset, modules/avltree-oset-tests: New files.
7080         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
7081         * tests/test-carray_list.c: New file.
7082         * tests/test-linked_list.c: New file.
7083         * tests/test-avltree_list.c: New file.
7084         * tests/test-rbtree_list.c: New file.
7085         * tests/test-linkedhash_list.c: New file.
7086         * tests/test-avltreehash_list.c: New file.
7087         * tests/test-rbtreehash_list.c: New file.
7088         * tests/test-avltree_oset.c: New file.
7089         * tests/test-rbtree_oset.c: New file.
7090         * MODULES.html.sh (Container data structures): New section.
7091
7092 2006-07-17  Bruno Haible  <bruno@clisp.org>
7093
7094         * m4/gl_list.m4: New file.
7095
7096 2006-07-17  Bruno Haible  <bruno@clisp.org>
7097
7098         * lib/gl_list.h: New file.
7099         * lib/gl_list.c: New file.
7100         * lib/gl_array_list.h: New file.
7101         * lib/gl_array_list.c: New file.
7102         * lib/gl_carray_list.h: New file.
7103         * lib/gl_carray_list.c: New file.
7104         * lib/gl_linked_list.h: New file.
7105         * lib/gl_linked_list.c: New file.
7106         * lib/gl_anylinked_list1.h: New file.
7107         * lib/gl_anylinked_list2.h: New file.
7108         * lib/gl_avltree_list.h: New file.
7109         * lib/gl_avltree_list.c: New file.
7110         * lib/gl_anyavltree_list1.h: New file.
7111         * lib/gl_anyavltree_list2.h: New file.
7112         * lib/gl_rbtree_list.h: New file.
7113         * lib/gl_rbtree_list.c: New file.
7114         * lib/gl_anyrbtree_list1.h: New file.
7115         * lib/gl_anyrbtree_list2.h: New file.
7116         * lib/gl_anytree_list1.h: New file.
7117         * lib/gl_anytree_list2.h: New file.
7118         * lib/gl_linkedhash_list.h: New file.
7119         * lib/gl_linkedhash_list.c: New file.
7120         * lib/gl_anyhash_list1.h: New file.
7121         * lib/gl_anyhash_list2.h: New file.
7122         * lib/gl_avltreehash_list.h: New file.
7123         * lib/gl_avltreehash_list.c: New file.
7124         * lib/gl_rbtreehash_list.h: New file.
7125         * lib/gl_rbtreehash_list.c: New file.
7126         * lib/gl_anytreehash_list1.h: New file.
7127         * lib/gl_anytreehash_list2.h: New file.
7128
7129         * lib/gl_oset.h: New file.
7130         * lib/gl_oset.c: New file.
7131         * lib/gl_array_oset.h: New file.
7132         * lib/gl_array_oset.c: New file.
7133         * lib/gl_avltree_oset.h: New file.
7134         * lib/gl_avltree_oset.c: New file.
7135         * lib/gl_rbtree_oset.h: New file.
7136         * lib/gl_rbtree_oset.c: New file.
7137         * lib/gl_anytree_oset.h: New file.
7138
7139 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7140
7141         * m4/mkancesdirs.m4: New file.
7142         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
7143         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
7144         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
7145         it.
7146
7147 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7148
7149         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
7150         * lib/mkancesdirs.h: New files.
7151         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
7152         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
7153         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
7154         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
7155         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
7156         callers changed.  Revamp internals significantly, by not
7157         attempting to create directories that are temporarily more
7158         permissive than the final results.  Do not attempt to use
7159         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
7160         This removes some race conditions, fixes some bugs, and simplifies
7161         things.  Use new dirchownmod function to do owner and mode changes.
7162         * lib/mkdir-p.h: Likewise.
7163         * lib/modechange.c (octal_to_mode): New function.
7164         (struct mode_change): New member mentioned.
7165         (make_node_op_equals): New arg mentioned.  All callers changed.
7166         (mode_compile): Keep track of which mode bits the user has explicitly
7167         mentioned.
7168         (mode_adjust): New arg DIR, so that we implement the X op correctly.
7169         New arg PMODE_BITS, to keep track of which mode bits the user
7170         mentioned; it treats S_ISUID and S_ISGID speciall.
7171         All callers changed.
7172         * lib/modechange.h: Likewise.
7173
7174 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
7175
7176         * MODULES.html.sh: Add mkancestors.
7177         * modules/mkancesdirs: New module.
7178         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
7179         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
7180         The chdir-safer and afs files are now orphans; I'll remove them
7181         unless someone speaks up.
7182         Add lib/dirchownmod.c, lib/dirchownmod.h.
7183         (Depends-on): Remove alloca, chown, save-cwd, dirname.
7184         Add lchown, mkancesdirs.
7185         (Maintainer): Add self.
7186
7187 2006-07-15  Karl Berry  <karl@gnu.org>
7188
7189         * gnulib-tool: help message wording/arrangement.
7190
7191 2006-07-14  Simon Josefsson  <jas@extundo.com>
7192
7193         * doc/gnulib.texi (Libtool and Windows): New section.
7194
7195 2006-07-12  Simon Josefsson  <jas@extundo.com>
7196
7197         * modules/gendocs (License): Fix license, approved by Karl.
7198
7199 2006-07-12  Eric Blake  <ebb9@byu.net>
7200
7201         * MODULES.html.sh: Add gendocs.
7202
7203 2006-07-11  Eric Blake  <ebb9@byu.net>
7204
7205         * modules/fdl: New module, to install doc/fdl.texi.
7206         * MODULES.html.sh: Add new section for documentation modules.
7207         * gnulib-tool: Avoid space-tab.
7208         (--doc-base): New option, to manage files from doc.
7209
7210 2006-07-11  Eric Blake  <ebb9@byu.net>
7211
7212         * m4/absolute-header.m4: Fix comments to match recent change.
7213
7214 2006-07-11  Eric Blake  <ebb9@byu.net>
7215
7216         * gnulib-tool: List --doc-base before --tests-base.
7217
7218 2006-07-11  Derek R. Price  <derek@ximbiot.com>
7219
7220         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
7221
7222 2006-07-11  Bruno Haible  <bruno@clisp.org>
7223
7224         * README: Mention where to put documentation.
7225
7226 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7227
7228         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
7229
7230 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7231
7232         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
7233         to stdint.m4.
7234
7235 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
7236
7237         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
7238         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
7239         "no/such/file/stdint.h" when there is no such file, so that
7240         the resulting C code can be parsed by dodgy compilers.
7241         Problems reported by Bob Proulx.
7242
7243 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7244
7245         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
7246         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7247         macros into the GNU _D_EXACT_NAMLEN.
7248         * lib/savedir.c:  Likewise.
7249         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
7250
7251 2006-07-10  Derek R. Price  <derek@ximbiot.com>
7252         and Paul Eggert  <eggert@cs.ucla.edu>
7253
7254         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
7255         * m4/savedir.m4:
7256         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
7257         macros into the GNU _D_EXACT_NAMLEN.
7258
7259 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7260
7261         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
7262         around the absolute name, to work around a problem with the HP-UX
7263         11.23 native C compiler, reported by Bob Proulx.
7264
7265 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7266
7267         * doc/maintain.texi, make-stds.texi: Sync from
7268         <http://savannah.gnu.org/projects/gnustandards>.
7269
7270 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
7271
7272         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
7273
7274 2006-07-09  Jim Meyering  <jim@meyering.net>
7275
7276         * m4/glob.m4: Remove a doubled word in a comment.
7277
7278 2006-07-09  Jim Meyering  <jim@meyering.net>
7279
7280         * lib/argp-pv.c: Remove a doubled word in a comment.
7281         * lib/check-version.c (check_version): Likewise.
7282         * lib/javacomp.c (compile_java_class): Likewise.
7283
7284 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
7285
7286         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
7287         for the benefit of people using Autoconf 2.60.  If you want to
7288         support older Autoconf versions you can copy m4/onceonly_2_57.m4
7289         (or m4/onceonly.m4, if pre-2.57) manually.
7290
7291 2006-07-08  Jim Meyering  <jim@meyering.net>
7292
7293         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
7294         comment.
7295         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
7296         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
7297         comment.
7298
7299 2006-07-08  Jim Meyering  <jim@meyering.net>
7300
7301         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
7302
7303 2006-07-07  Simon Josefsson  <jas@extundo.com>
7304
7305         * tests/test-crc.c: Change expected crc value, the test vector
7306         were probably computed using the old broken crc.c?
7307
7308 2006-07-06  Simon Josefsson  <jas@extundo.com>
7309
7310         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
7311         now the canonical place for the M4 file).
7312
7313         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
7314         from the sys_socket dependency now.
7315
7316         * modules/inet_pton (Files): Ditto.
7317
7318         * modules/inet_ntop (Files): Ditto.
7319
7320 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7321
7322         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
7323         not gl_PREREQ_GETUSERSHELL.
7324
7325 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7326
7327         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
7328         with only one argument, for Autoconf 2.60.
7329         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
7330         expand to nothing, so add a shell command to avoid syntax error.
7331         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
7332
7333 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7334
7335         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
7336
7337 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7338
7339         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
7340         no longer needed.  Check for isblank decl.
7341         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
7342         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
7343         of existence.
7344
7345 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7346
7347         * lib/getloadavg.c: Use __VMS, not VMS.
7348         * lib/getopt.c: Likewise.
7349         * lib/getpagesize.h: Likewise.
7350         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
7351         and probably does not work.
7352
7353 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
7354
7355         * lib/.cppi-disable: Add wcwidth.
7356         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
7357         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
7358         (ISGRAPH): Remove.  All uses changed to isgraph.
7359         (FOLD) [!defined _LIBC]: Remove special case.
7360         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
7361         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
7362         HAVE_ISBLANK.
7363         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
7364         case.
7365
7366 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7367
7368         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
7369         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
7370         brackets.  Other minor changes to suppress some compiler
7371         warnings.
7372
7373 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7374         and Paul Eggert  <eggert@cs.ucla.edu>
7375
7376         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
7377         of invoking obsolescent AC_HEADER_DIRENT macro.
7378         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
7379         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
7380         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
7381         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
7382         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
7383         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
7384         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
7385         * m4/readdir.m4: Remove; no longer needed.
7386
7387 2006-07-06  Derek R. Price  <derek@ximbiot.com>
7388         and Paul Eggert  <eggert@cs.ucla.edu>
7389
7390         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
7391         Don't worry about this obsolete case any more.
7392         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
7393         directories.
7394         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
7395         worry about this obsolete case any more.
7396         * lib/fts.c: Likewise.
7397         * lib/getcwd.c: Likewise.
7398         * lib/glob.h: Likewise.
7399         * lib/savedir.c: Likewise.
7400
7401 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7402
7403         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
7404         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
7405         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
7406         needed.
7407         All uses removed.
7408         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7409         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7410         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
7411         needed.
7412         * m4/getdate.m4 (gl_GETDATE): Likewise.
7413         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7414         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7415         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7416         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7417         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
7418         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7419         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
7420         needed.
7421
7422 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
7423
7424         * lib/memcasecmp.c: Include <limits.h>.
7425         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
7426         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
7427         Don't assume isdigit succeeds only on '0' through '9'.
7428
7429 2006-07-05  Eric Blake  <ebb9@byu.net>
7430
7431         * modules/getaddrinfo (Depends-on): Add snprintf.
7432
7433 2006-07-05  Eric Blake  <ebb9@byu.net>
7434
7435         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
7436         to avoid 'header present but could not be compiled' on cygwin.
7437
7438 2006-07-05  Eric Blake  <ebb9@byu.net>
7439
7440         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
7441         missing from netdb.h.
7442         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
7443
7444 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7445
7446         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
7447         no longer needed.
7448         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
7449         * m4/getdate.m4 (gl_GETDATE): Likewise.
7450         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
7451         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
7452         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
7453         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
7454         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
7455
7456 2006-07-05  Derek R. Price  <derek@ximbiot.com>
7457
7458         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
7459         All uses of is_space replaced by isspace.
7460         * lib/exit.h: Don't talk about STDC_HEADERS.
7461         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
7462         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
7463         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
7464         replaced by isprint etc.
7465         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
7466         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7467         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
7468         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
7469         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
7470         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
7471
7472 2006-07-05  Bruno Haible  <bruno@clisp.org>
7473
7474         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
7475         the function exists, before testing against AIX.
7476         Reported by Martin Lambers <marlam@marlam.de>.
7477
7478 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7479
7480         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
7481         From Mark D. Baushke.
7482
7483 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
7484
7485         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
7486         to the absolute name, not just one, to bypass Sun C 5.8's
7487         "warning: #include of /usr/include/... may be non-portable".
7488
7489 2006-07-04  Eric Blake  <ebb9@byu.net>
7490
7491         * modules/dirname-tests: New test module.
7492         * tests/test-dirname.c: New file, replacing dirname.c
7493         TEST_DIRNAME section that was recently deleted.
7494
7495 2006-07-04  Bruno Haible  <bruno@clisp.org>
7496
7497         Assume ANSI C header files and <ctype.h> functions.
7498         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
7499         (mbsnwidth): Use isprint, iscntrl instead.
7500
7501 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7502
7503         Merge from coreutils.
7504         * MODULES.html.sh: Add xstrtold.
7505         * modules/xstrtold: New file.
7506         * modules/cycle-check (Files): Add lib/same-inode.h.
7507         * modules/dirname (Files): Add m4/double-slash-root.m4.
7508         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
7509         * modules/mkdir-p (Files): Add lib/same-inode.h.
7510         * modules/same (Files): Add lib/same-inode.h.
7511
7512 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7513
7514         * m4/absolute-header.m4: Renamed from full-header-path.m4.
7515         This is to keep the terminology clean; POSIX talks about
7516         "absolute pathnames", not "full pathnames", but the GNU
7517         Coding Standards say to use "path" for something else;
7518         so use "absolute" to keep both sides happy.
7519         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
7520         Set gl_absolute_header, not gl_full_header_path.
7521         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
7522         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
7523         All uses changed.
7524
7525         Merge from coreutils.
7526
7527         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7528
7529         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
7530         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
7531         want to require the building of c-strtod.o.
7532         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
7533         needs -lm directly.
7534         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
7535
7536         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
7537
7538         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
7539         --as-needed option if available.  Problem reported by Albert Chin in
7540         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
7541         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
7542         cc merely issues a bunch of annoying warnings for --as-needed
7543         (this problem was reported by Bob Proulx).  Also, try linking with
7544         -lm to detect a bug in binutils 2.16 (this problem was reported
7545         by Ralf Wildenhues).
7546
7547         2006-06-18  Jim Meyering  <jim@meyering.net>
7548
7549         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
7550         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
7551         macro.
7552         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
7553         also check for glibc-2.4's abort-inducing bug.
7554
7555         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
7556         Low-probability clean-up should be to use rmdir to get rid of
7557         the just-created directory, not unlink.
7558
7559         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
7560         configure fail, and request a bug report to inform us about it.
7561         Add a comment that, barring reports to the contrary, in 2007 we'll
7562         assume ftruncate is universally available.
7563
7564         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7565
7566         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
7567
7568         2006-03-12  Jim Meyering  <jim@meyering.net>
7569
7570         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
7571         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
7572         * m4/same.m4 (gl_SAME): Likewise.
7573         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
7574
7575         2006-03-11  Eric Blake  <ebb9@byu.net>
7576
7577         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
7578         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
7579         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
7580         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
7581
7582 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
7583
7584         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
7585         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
7586         reported by Mark D. Baushke, one in
7587         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
7588
7589         Merge from coreutils.
7590
7591         * lib/.cppi-disable: Add stdint_.h.
7592         * lib/.cvsignore: Add stdint.h.
7593
7594         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
7595
7596         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
7597         both double and long double versions.
7598         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
7599         * lib/xstrtold.c: New file.
7600         * lib/xstrtod.h (xstrtold): New decl.
7601
7602         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
7603
7604         * lib/filemode.c (setst): Remove.
7605         (strmode): Rewrite to avoid setst.  This makes the code shorter,
7606         (arguably) clearer, and the generated code is a bit smaller on my
7607         Debian GNU/Linux stable x86 host.
7608
7609         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
7610
7611         * lib/filemode.c: Include "filemode.h" first, to test the interface.
7612         Assume that filemode.h includes sys/types.h and sys/stat.h.
7613         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
7614         (ftypelet): Reorder to put common cases first, for efficiency.
7615         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
7616         to do 'M'.
7617         (strmode): Renamed from mode_string, and now stores 12 bytes instead
7618         of 10, for compatibility with FreeBSD.  All callers changed.
7619         (filemodestring): Now stores 12 bytes instead of 10, and sets file
7620         types that can't be deduced solely from st_mode.  First arg is now a
7621         const pointer.
7622         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
7623         (strmode): Renamed from mode_string.
7624         (filemodestring): New decl.
7625         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
7626         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
7627         needed.
7628         (S_ISPORT, S_ISWHT): New macros, if not already defined.
7629
7630         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
7631
7632         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
7633         fsusage.h now does that.  Include fsusage.h first, to test interface.
7634         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
7635         at most one method (the old code could have generated decls that
7636         didn't conform to C89, not that this was ever exercised).
7637         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
7638
7639         2006-03-19  Jim Meyering  <jim@meyering.net>
7640
7641         Work even in a chroot where d_ino values for entries in "/"
7642         don't match the stat.st_ino values for the same names.
7643         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
7644         number, iterate through all entries again, using lstat instead.
7645         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
7646         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
7647
7648         * lib/getcwd.c (__getcwd): Clarify a comment.
7649         Use memcpy in place of a call to strcpy.
7650
7651         2006-03-12  Jim Meyering  <jim@meyering.net>
7652
7653         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
7654         matches that of the current directory (which we're about to chdir ".."
7655         out of), then save the dev-ino of the parent, instead.
7656
7657         * lib/same-inode.h (SAME_INODE): New file/macro.
7658         * lib/chdir-safer.c (SAME_INODE): Remove definition.
7659         Include "same-inode.h", instead.
7660         * lib/same.c: Likewise.
7661         * lib/cycle-check.h: Include "same-inode.h".
7662         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
7663         * lib/cycle-check.c (SAME_INODE): Remove definition.
7664         * lib/root-dev-ino.h: Include "same-inode.h".
7665
7666         2006-03-11  Eric Blake  <ebb9@byu.net>
7667
7668         * lib/same.c (same_name): s/base_name/last_component/
7669         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
7670         * lib/filenamecat.c (file_name_concat): Likewise.
7671
7672         2006-03-11  Eric Blake  <ebb9@byu.net>,
7673                     Paul Eggert  <eggert@cs.ucla.edu>
7674
7675         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
7676         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
7677         drive prefix.
7678         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
7679         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
7680         (last_component): New method.
7681         * lib/dirname.c (dir_len): Determine when drive letters need a
7682         subsequent slash.  Preserve // when it is special.
7683         (dir_name): Don't append dot when drive letter is absolute.
7684         [TEST_DIRNAME]: Move into a full-blown gnulib test.
7685         * lib/basename.c (base_name): New semantics - malloc the result.
7686         Preserve // when it is special.  Preserve relative files that look
7687         like drive letters.
7688         (base_len): Preserve // when it is special.
7689         (last_component): New method, similar to old base_name semantics.
7690         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
7691         base_name.  Strip redundant slashes from ///.
7692
7693 2006-07-03  Jim Meyering  <jim@meyering.net>
7694
7695         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
7696         macro is used before the first cycle_check call.
7697
7698 2006-07-03  Eric Blake  <ebb9@byu.net>
7699
7700         * modules/dirname (Depends-on): Add xstrndup.
7701
7702 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7703
7704         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
7705         test cases, so that config.log is a bit easier to follow.
7706
7707 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
7708
7709         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
7710         both are 64 bits, since this seems to be the tradition, and this
7711         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
7712         we ever run into a host that prefers long long to long in this
7713         case, we'll need another configure-time test.  Problem reported by
7714         Jim Meyering.
7715
7716 2006-07-02  Eric Blake  <ebb9@byu.net>
7717
7718         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
7719
7720 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7721
7722         * modules/inttypes (Depends-on): No longer depends on stdint.
7723         * modules/stdint (Description): Say more about assumptions.
7724         Say that the fast types might differ.  Say macros are used.
7725         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
7726         (Makefile.am): Revise list of substituted symbols to match
7727         new stdint.m4.
7728         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
7729         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
7730         * tests/test-stdint.c (verify_same_types)
7731         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
7732         the code conforms to C99/C89.
7733         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
7734         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
7735
7736 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7737
7738         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
7739         but fix a bug, by requiring at least 64 bits.
7740         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
7741         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
7742         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
7743         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
7744
7745         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
7746         changes.  Make 2.59 a prerequisite.  Check and substitute for
7747         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
7748         inttypes.h.  Do not use special include files; just use the
7749         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
7750         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
7751         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
7752         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
7753         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
7754         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
7755         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
7756         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
7757         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
7758         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
7759         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
7760         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
7761         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
7762         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
7763         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
7764         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
7765         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
7766         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
7767         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
7768         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
7769         WINT_MAX.  Check for C99 conformance more strictly, by detecting
7770         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
7771         not check for things that C99 does not require, e.g., int8_t.  If
7772         a test isn't needed unless <stdint.h> isn't working, and is
7773         unlikely to be needed for any other reason, then don't do it
7774         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
7775         size_t, since we assume C89 freestanding at least.  Do not check
7776         for sig_atomic_t, wchar_t, or wint_t, since the code now does
7777         the right thing even if the types are not defined.  Instead use:
7778         (gl_STDINT_TYPE_PROPERTIES): New macro.
7779         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
7780         testing whether <sys/types.h> clashes, as Autoconf does this for
7781         us now.  All uses removed.
7782         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
7783         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
7784         (gl_CHECK_TYPE_SAME):
7785         Remove; no longer needed.
7786         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
7787         exists, since we'll return 0 anyway in that case.
7788         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
7789
7790 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
7791
7792         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
7793         possible collision with system files.
7794         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
7795         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
7796         WCHAR_MIN and WCHAR_MAX in this case.
7797         (<stddef.h>): Do not include; no longer needed.
7798         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
7799         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
7800         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
7801         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
7802         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
7803         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
7804         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
7805         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
7806         !defined(__c99))]: Include in this case too, since it's harmless
7807         now.
7808         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
7809         dangerous to do so.
7810         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
7811         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
7812         (_STDINT_MIN, _STDINT_MAX): New macros.
7813         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
7814         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
7815         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
7816         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
7817         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
7818         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
7819         macros, not typedefs; this simplifies things quite a bit.
7820         Use long int for all types narrower than int64_t.
7821         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
7822         Define in terms of long long int or int64_t or long int,
7823         not int64_t or int32_t.  This saves some compile-time testing.
7824         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
7825         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
7826         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
7827         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
7828         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
7829         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
7830         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
7831         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
7832         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
7833         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
7834         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7835         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7836         undef any previous version and define our own version, for
7837         simplicity and consistency with the new macros for types.
7838         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
7839         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
7840         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
7841         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
7842         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
7843         @WINT_T_SUFFIX@ to keep things simple here.
7844         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
7845         Simplify by assuming typical 8/16/32/64 host, since we're
7846         already doing that elsewhere anyway.
7847         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
7848         and assume long long int is 64 bits if available.  This
7849         speeds up 'configure'.
7850
7851 2006-07-01  Eric Blake  <ebb9@byu.net>
7852
7853         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
7854         Reported by Andreas Buening.
7855
7856 2006-07-01  Eric Blake  <ebb9@byu.net>
7857
7858         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
7859
7860 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
7861
7862         * lib/getaddrinfo.c: fixed typo
7863
7864 2006-06-29  Jim Meyering  <jim@meyering.net>
7865
7866         * modules/strftime (Maintainer): Add my name, since with the
7867         FPRINTFTIME changes strftime.c has forked from glibc.
7868
7869 2006-06-29  Eric Blake  <ebb9@byu.net>
7870
7871         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
7872
7873 2006-06-29  Eric Blake  <ebb9@byu.net>
7874
7875         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
7876
7877 2006-06-29  Eric Blake  <ebb9@byu.net>
7878
7879         * lib/stat_.h: New file.
7880
7881 2006-06-29  Eric Blake  <ebb9@byu.net>
7882
7883         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
7884         unused static function.
7885
7886 2006-06-29  Eric Blake  <ebb9@byu.net>
7887
7888         * doc/functions.texi (Function Portability): Document missing lstat
7889         on mingw.
7890
7891 2006-06-29  Eric Blake  <ebb9@byu.net>
7892
7893         * MODULES.html.sh: Add sys_stat.
7894         * modules/sys_stat: New module.
7895         * modules/mkstemp (Depends-on): Add sys_stat.
7896
7897 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7898
7899         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
7900
7901 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7902
7903         * m4/c-bs-a.m4: Removed.
7904
7905 2006-06-29  Derek R. Price  <derek@ximbiot.com>
7906
7907         * lib/strftime.c: Assume strftime() exists.
7908
7909 2006-06-29  Derek Price  <derek@ximbiot.com>
7910
7911         * modules/c-bs-a: Removed - \a is C89.
7912         * MODULES.html.sh: Remove c-bs-a.
7913
7914 2006-06-29  Bruno Haible  <bruno@clisp.org>
7915
7916         * modules/wcwidth (License): Change to LGPL.
7917
7918 2006-06-28  Simon Josefsson  <jas@extundo.com>
7919
7920         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
7921         on _WIN32.
7922
7923         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
7924         getnameinfo.
7925
7926 2006-06-28  Simon Josefsson  <jas@extundo.com>
7927
7928         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
7929
7930 2006-06-28  Simon Josefsson  <jas@extundo.com>
7931
7932         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
7933         functions there.  It will succeed on Windows XP, but on Windows
7934         2000 and (presumably) earlier, it will fail, and use the internal
7935         re-implementation.
7936         (use_win32_p): New function.
7937         (getaddrinfo): Use strtoul on servname, to support numeric ports.
7938         Support AI_NUMERICSERV to disable getservbyname.
7939         (getnameinfo): New function, only supports
7940         NI_NUMERICHOST|NI_NUMERICSERV for now.
7941
7942         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
7943         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
7944         getnameinfo.
7945
7946 2006-06-28  Eric Blake  <ebb9@byu.net>
7947
7948         * modules/wcwidth: New file.
7949         * modules/mbchar (Depends-on): Add wcwidth.
7950         * modules/mbswidth (Depends-on): Add wcwidth.
7951         * MODULES.html.sh: Add wcwidth.
7952
7953 2006-06-28  Eric Blake  <ebb9@byu.net>
7954
7955         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
7956         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
7957
7958 2006-06-28  Eric Blake  <ebb9@byu.net>
7959
7960         * lib/xvasprintf.h: Fix comments.
7961
7962 2006-06-28  Eric Blake  <ebb9@byu.net>
7963
7964         * lib/mbchar.h (wcwidth): Include wcwidth.h.
7965         * lib/mbswidth.c (wcwidth): Move from here...
7966         * lib/wcwidth.h: ...to this new file.
7967
7968 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7969
7970         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
7971
7972         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
7973         it's obsolete.
7974         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
7975
7976 2006-06-28  Derek R. Price  <derek@ximbiot.com>
7977
7978         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
7979         Autoconf 2.60 says this stuff was obsolete.
7980
7981 2006-06-28  Bruno Haible  <bruno@clisp.org>
7982
7983         * modules/wcwidth (Files): Add m4/wchar_t.m4.
7984
7985 2006-06-28  Bruno Haible  <bruno@clisp.org>
7986
7987         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
7988         gt_TYPE_WCHAR_T.
7989
7990 2006-06-28  Bruno Haible  <bruno@clisp.org>
7991
7992         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
7993         declaration for wcwidth.
7994         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
7995
7996 2006-06-28  Bruno Haible  <bruno@clisp.org>
7997
7998         * lib/mkdtemp.c [MINGW]: Include <io.h>.
7999         (mkdir): Define using _mkdir.
8000
8001 2006-06-28  Bruno Haible  <bruno@clisp.org>
8002
8003         * lib/getaddrinfo.h: Fix POSIX URL.
8004         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
8005         _WIN32.
8006         (use_win32_p): Make static.
8007         (getaddrinfo): Reject service name if it is empty or does not consist
8008         solely of decimal digits, or if its value is > 65535.
8009         (getnameinfo): Remove useless casts.
8010
8011 2006-06-27  Simon Josefsson  <jas@extundo.com>
8012
8013         * modules/sys_select: New file, suggested by Bruno Haible, Paul
8014         Eggert and Martin Lambers.
8015
8016 2006-06-27  Simon Josefsson  <jas@extundo.com>
8017
8018         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
8019         Eggert and Martin Lambers.
8020
8021 2006-06-27  Bruno Haible  <bruno@clisp.org>
8022
8023         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
8024         result to 0, not to empty.
8025         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
8026
8027 2006-06-27  Bruno Haible  <bruno@clisp.org>
8028
8029         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
8030
8031 2006-06-26  Simon Josefsson  <jas@extundo.com>
8032
8033         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
8034         present.
8035
8036 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
8037
8038         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
8039         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
8040         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
8041
8042 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
8043
8044         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
8045
8046 2006-06-26  Bruno Haible  <bruno@clisp.org>
8047
8048         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
8049
8050 2006-06-26  Bruno Haible  <bruno@clisp.org>
8051
8052         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
8053
8054 2006-06-26  Bruno Haible  <bruno@clisp.org>
8055
8056         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
8057         SGI C compiler in pre-C99 mode.
8058         Suggested by Mark D. Baushke and Larry Jones.
8059
8060 2006-06-26  Bruno Haible  <bruno@clisp.org>
8061
8062         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
8063         WCHAR_MAX.
8064         Reported by Mark D. Baushke and Larry Jones.
8065
8066 2006-06-26  Bruno Haible  <bruno@clisp.org>
8067
8068         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
8069         in pre-C99 mode.
8070         Suggested by Mark D. Baushke and Larry Jones.
8071
8072 2006-06-23  Simon Josefsson  <jas@extundo.com>
8073             Bruno Haible  <bruno@clisp.org>
8074
8075         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
8076         Emit mostlyclean-local rule.
8077         (func_emit_tests_Makefile_am): Likewise.
8078         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
8079
8080 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
8081
8082         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
8083
8084 2006-06-23  Bruno Haible  <bruno@clisp.org>
8085
8086         * tests/test-stdint.c: Update to match ISO C 99 Technical
8087         Corrigendum 1.
8088
8089 2006-06-23  Bruno Haible  <bruno@clisp.org>
8090
8091         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
8092
8093 2006-06-23  Bruno Haible  <bruno@clisp.org>
8094
8095         * lib/stdint_.h: Treat IRIX like OpenBSD.
8096
8097 2006-06-23  Bruno Haible  <bruno@clisp.org>
8098
8099         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
8100         ISO C 99 Technical Corrigendum 1.
8101
8102 2006-06-22  Simon Josefsson  <jas@extundo.com>
8103
8104         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
8105         MinGW.
8106
8107 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
8108
8109         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
8110         needed.  Some compiler complained about some of them.  Problem reported
8111         by Larry Jones in
8112         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
8113
8114 2006-06-21  Simon Josefsson  <jas@extundo.com>
8115
8116         * tests/test-getaddrinfo.c: New file.
8117
8118         * modules/getaddrinfo-tests: New file.
8119
8120         * MODULES.html.sh: Add inet_pton.
8121
8122         * modules/inet_pton: New file.
8123
8124 2006-06-21  Simon Josefsson  <jas@extundo.com>
8125
8126         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
8127         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
8128         of using the (limited) gnulib implementation on Windows XP.
8129
8130         * m4/inet_pton.m4: New file.
8131
8132 2006-06-21  Simon Josefsson  <jas@extundo.com>
8133
8134         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
8135         variable.
8136
8137         * lib/socket_.h: Don't define WINVER.
8138
8139         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
8140         slightly modified to work in gnulib.
8141
8142 2006-06-21  Simon Josefsson  <jas@extundo.com>
8143
8144         * doc/gnulib.texi (Windows sockets): Add.
8145
8146 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
8147
8148         * lib/read-file.c (fread_file): Start with buffer allocation of
8149         0 bytes rather than 1 byte; this simplifies the code.
8150         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
8151         code to free buffer and save/restore errno.
8152         (internal_read_file): Remove unused local.
8153
8154 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
8155
8156         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
8157         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
8158         Problem reported by Denis Excoffier in
8159         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
8160
8161 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
8162
8163         * modules/sys_socket, modules/socklen: Include sys/types since
8164         FreeBSD 4.x's sys/socket.h needs it.
8165
8166 2006-06-19  Simon Josefsson  <jas@extundo.com>
8167
8168         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
8169
8170 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
8171
8172         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
8173
8174 2006-06-19  Bruno Haible  <bruno@clisp.org>
8175
8176         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
8177         and FULL_PATH_INTTYPES_H in angle brackets.
8178         Reported by Mark D. Baushke <mdb@gnu.org>.
8179
8180 2006-06-17  Eric Blake  <ebb9@byu.net>
8181
8182         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
8183         errno.
8184
8185 2006-06-17  Bruno Haible  <bruno@clisp.org>
8186
8187         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
8188         <sys/inttypes.h>.
8189
8190 2006-06-17  Bruno Haible  <bruno@clisp.org>
8191
8192         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
8193         whether errno is declared. Assume <errno.h> declares errno.
8194
8195 2006-06-17  Bruno Haible  <bruno@clisp.org>
8196
8197         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
8198
8199 2006-06-17  Bruno Haible  <bruno@clisp.org>
8200
8201         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
8202         problem on Solaris 2.5.1.
8203
8204 2006-06-16  Eric Blake  <ebb9@byu.net>
8205
8206         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
8207         * lib/unicodeio.c [!defined errno]: Likewise.
8208         * lib/strtol.c [!defined errno]: Likewise.
8209         * lib/strtod.c [!defined errno]: Likewise.
8210
8211 2006-06-15  Eric Blake  <ebb9@byu.net>
8212
8213         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
8214
8215 2006-06-15  Eric Blake  <ebb9@byu.net>
8216
8217         * config/srclist.txt (ssize_t.m4): Lose sync.
8218
8219 2006-06-15  Bruno Haible  <bruno@clisp.org>
8220
8221         * modules/stdint (Files): Include m4/full-header-path.m4,
8222         m4/size_max.m4, m4/wchar_t.m4.
8223         (Makefile.am): Many more substitutions.
8224         * modules/stdint-tests: New file.
8225         * tests/test-stdint.c: New file.
8226
8227 2006-06-15  Bruno Haible  <bruno@clisp.org>
8228
8229         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
8230         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
8231         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
8232         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
8233         gl_CHECK_TYPE_SAME): New macros.
8234
8235 2006-06-15  Bruno Haible  <bruno@clisp.org>
8236
8237         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
8238
8239 2006-06-15  Bruno Haible  <bruno@clisp.org>
8240
8241         * lib/stdint_.h: Rewritten to be fully auto-configured.
8242         Fixes bug on HP-UX/IA64.
8243
8244 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
8245
8246         * lib/getdate.y (__attribute__): Don't define if already defined.
8247         Problem reported by Larry Jones.
8248         * lib/utimens.c (__attribute__): Likewise.
8249
8250 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
8251
8252         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
8253         reported by Andreas Schwab.
8254
8255 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8256             Bruno Haible  <bruno@clisp.org>
8257
8258         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
8259         check for the declaration of strnlen and a run test that exposes the
8260         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
8261         rpl_strndup.
8262
8263 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8264             Bruno Haible  <bruno@clisp.org>
8265
8266         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
8267
8268 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8269
8270         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
8271         compile test, for Tru64 4.0D.
8272
8273 2006-05-28  Karl Berry  <karl@gnu.org>
8274
8275         * config/srclist.txt (printf-args.c): lose sync.
8276
8277 2006-05-26  Martin Lambers  <marlam@marlam.de>
8278
8279         * lib/getpass.c: Updates the test for the native W32 API, and adds
8280         missing includes, thus fixing compilation warnings.
8281
8282 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
8283
8284         * lib/exclude.c (exclude_fnmatch): New function.
8285         (excluded_file_name): Call exclude_fnmatch.
8286         * lib/exclude.h (excluded_file_name): New prototype
8287
8288 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
8289
8290         * lib/tempname.c (small_open, large_open): New macros.
8291         (__open, __open64) [!_LIBC]: Remove.
8292         (__gen_tempname): Use small_open and large_open instead of __open
8293         and __open64.  This fixes a portability bug on HP-UX 11.11i
8294         reported by Simon Wing-Tang in
8295         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
8296
8297 2006-05-24  Bruno Haible  <bruno@clisp.org>
8298
8299         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
8300         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
8301         Reported by Thorsten Maerz <torte@netztorte.de> via
8302         Aaron Stone <aaron@serendipity.cx>.
8303
8304 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8305
8306         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
8307         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
8308         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
8309         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
8310         not really conditional on the cache.
8311         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
8312
8313 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
8314
8315         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
8316         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
8317         (my_usleep): Don't mishandle maximum value.
8318
8319 2006-05-19  Jim Meyering  <jim@meyering.net>
8320
8321         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
8322
8323 2006-05-17  Bruno Haible  <bruno@clisp.org>
8324
8325         Cygwin portability.
8326         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
8327
8328 2006-05-17  Bruno Haible  <bruno@clisp.org>
8329
8330         * lib/stdint_.h: Fix recognition of Cygwin.
8331
8332 2006-05-15  Bruno Haible  <bruno@clisp.org>
8333
8334         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
8335         on libtool patch by Ralf Wildenhues.
8336
8337 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
8338
8339         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
8340         test for C99 conformance; (bool) 0.5 is an integer constant
8341         expression, but (bool) -0.5 is not.  Problem reported by Fedor
8342         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
8343
8344 2006-05-11  Simon Josefsson  <jas@extundo.com>
8345
8346         * m4/xvasprintf.m4: Fix obvious typo.
8347
8348 2006-05-11  Jim Meyering  <jim@meyering.net>
8349
8350         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
8351         James Lemley.
8352
8353 2006-05-10  Simon Josefsson  <jas@extundo.com>
8354
8355         * lib/md4.c: Typo fix, update copyright years.
8356         (K1, K2): Don't use L because it turn computations into 64-bit on
8357         64-bit platforms.
8358
8359 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
8360
8361         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
8362         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
8363         unwanted sign propagation, e.g., on hosts with 64-bit int.
8364         There still are some problems with reeelly weird theoretical hosts
8365         (e.g., 33-bit int) but it's not worth worrying about now.
8366         * lib/sha1.c (rol): Likewise.
8367         (K1, K2, K3, K4): Remove unnecessary L suffix.
8368
8369 2006-05-10  Bruno Haible  <bruno@clisp.org>
8370
8371         * lib/des.c: Cast to avoid warnings.
8372
8373 2006-05-09  Bruno Haible  <bruno@clisp.org>
8374
8375         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
8376         (Depends-on): Depend also on xsize, stdarg.
8377         (configure.ac): Add gl_XVASPRINTF.
8378
8379 2006-05-09  Bruno Haible  <bruno@clisp.org>
8380
8381         * m4/xvasprintf.m4: New file.
8382
8383 2006-05-09  Bruno Haible  <bruno@clisp.org>
8384
8385         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
8386         (EOVERFLOW): Define fallback value.
8387         (xstrcat): New function.
8388         (xvasprintf): Recognize the special case of a string concatenation.
8389
8390 2006-05-08  Eric Blake  <ebb9@byu.net>
8391
8392         * gnulib-tool (func_version): Base copyright year on CVS date.
8393         (func_emit_copyright_notice): New function.
8394         (func_emit_lib_Makefile_am): Use it.
8395         (func_emit_tests_Makefile_am): Likewise.
8396         (func_import): Likewise.
8397
8398 2006-05-08  Bruno Haible  <bruno@clisp.org>
8399
8400         * modules/stdarg: New file.
8401         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
8402
8403 2006-05-08  Bruno Haible  <bruno@clisp.org>
8404
8405         * m4/stdarg.m4: New file, from GNU gettext.
8406
8407 2006-05-08  Bruno Haible  <bruno@clisp.org>
8408
8409         * config/srclist.txt (build-aux/config.rpath): different from latest
8410         release.
8411
8412 2006-05-08  Bruno Haible  <bruno@clisp.org>
8413
8414         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
8415
8416 2006-05-05  Jim Meyering  <jim@meyering.net>
8417
8418         * m4/warning.m4: New file, derived from bison's file by the same name.
8419
8420 2006-05-03  Bruno Haible  <bruno@clisp.org>
8421
8422         * lib/stdint_.h: Shorter URL.
8423         * lib/inttypes.h: Likewise.
8424
8425 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8426
8427         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
8428
8429 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8430
8431         * lib/verify.h: Document the internals better.  Most of this change
8432         was written by Bruno Haible.
8433
8434 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
8435
8436         * doc/verify.texi: New file, partly based on a proposal by
8437         Bruno Haible.
8438
8439 2006-05-02  Bruno Haible  <bruno@clisp.org>
8440
8441         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
8442         test from here...
8443         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
8444
8445 2006-04-29  Bruno Haible  <bruno@clisp.org>
8446
8447         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
8448         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
8449
8450 2006-04-29  Bruno Haible  <bruno@clisp.org>
8451
8452         * gnulib-tool: Make --update option actually work.
8453
8454 2006-04-29  Bruno Haible  <bruno@clisp.org>
8455
8456         * doc/gcd.texi: New file.
8457         * doc/gnulib.texi: Include it.
8458
8459 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
8460
8461         * lib/getdate.y (get_date): When adding relative date, start with the
8462         initial time, not with the result of the first mktime call.
8463
8464 2006-04-25  Bruno Haible  <bruno@clisp.org>
8465
8466         * gnulib-tool (func_import): Output the include directives in three
8467         blocks, sorted separately.
8468         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8469
8470 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8471
8472         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
8473         to define main with arguments, for C++.  Reported by Eric Blake.
8474         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
8475         Prefer 'int main ()' to 'int main (void)', for C++.
8476         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
8477         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
8478         for 'main', for C99 and C++.
8479
8480 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
8481
8482         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
8483         Don't assume that exit status -1 is valid.
8484         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
8485         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
8486         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
8487         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
8488         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
8489         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
8490         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
8491         functions can be used without declaring them, or that you can
8492         exit with status -1.
8493         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
8494
8495 2006-04-24  Karl Berry  <karl@gnu.org>
8496
8497         * config/srclist.txt (longdouble.m4): sync lost.
8498
8499 2006-04-24  Eric Blake  <ebb9@byu.net>
8500
8501         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
8502
8503 2006-04-24  Bruno Haible  <bruno@clisp.org>
8504
8505         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
8506         poll() implementation in AIX.
8507         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8508
8509 2006-04-24  Bruno Haible  <bruno@clisp.org>
8510
8511         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
8512         assigned exactly once.
8513
8514 2006-04-23  Claudio Fontana  <claudio@gnu.org>
8515             Bruno Haible  <bruno@clisp.org>
8516
8517         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
8518         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
8519         for AM_CPPFLAGS.
8520
8521 2006-04-23  Bruno Haible  <bruno@clisp.org>
8522
8523         * modules/copy-file: Depend on unistd.
8524         * modules/execute: Likewise.
8525         * modules/fatal-signal: Likewise.
8526         * modules/findprog: Likewise.
8527         * modules/mkdtemp : Likewise.
8528         * modules/pipe: Likewise.
8529         * modules/wait-process: Likewise.
8530
8531 2006-04-23  Bruno Haible  <bruno@clisp.org>
8532
8533         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
8534         condition was already detected.
8535         Reported by Ben Pfaff <blp@cs.stanford.edu>.
8536
8537 2006-04-23  Bruno Haible  <bruno@clisp.org>
8538
8539         * lib/copy-file.c: Include <unistd.h> unconditionally.
8540         * lib/execute.c: Likewise.
8541         * lib/fatal-signal.c: Likewise.
8542         * lib/findprog.c: Likewise.
8543         * lib/mkdtemp.c: Likewise.
8544         * lib/pipe.h: Likewise.
8545         * lib/pipe.c: Likewise.
8546         * lib/wait-process.h: Likewise.
8547
8548 2006-04-23  Bruno Haible  <bruno@clisp.org>
8549
8550         * gnulib-tool (func_usage): Fix --import description. Document
8551         --update.
8552         (func_import): Create temporary file in a temporary directory, if
8553         --dry-run is specified. Silence errors from 'grep' when there are no
8554         m4 files in $m4dir.
8555         (func_create_testdir): Silence errors from 'grep' when there are no
8556         m4 files in $m4dir.
8557         Reported by Karl Berry <karl@freefriends.org>.
8558
8559 2006-04-20  Bruno Haible  <bruno@clisp.org>
8560
8561         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
8562         one argument, so that the code will be portable to Autoconf 2.60.
8563         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
8564         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
8565         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
8566
8567 2006-04-19  Derek Price  <derek@ximbiot.com>
8568             Eric Blake  <ebb9@byu.net>
8569
8570         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
8571         rather than "/full/path.h".  Update comment to match.  Shorten &
8572         generalize m4_translit call via AS_TR_CPP.
8573
8574 2006-04-19  Derek Price  <derek@ximbiot.com>
8575             Eric Blake  <ebb9@byu.net>
8576
8577         * lib/inttypes.h: Correct grammar in comment.
8578
8579 2006-04-18  Derek Price  <derek@ximbiot.com>
8580             Paul Eggert  <eggert@cs.ucla.edu>
8581
8582         * modules/inttypes: New file.
8583         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
8584
8585 2006-04-18  Derek Price  <derek@ximbiot.com>
8586             Paul Eggert  <eggert@cs.ucla.edu>
8587
8588         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
8589         New files.
8590
8591 2006-04-18  Derek Price  <derek@ximbiot.com>
8592             Paul Eggert  <eggert@cs.ucla.edu>
8593
8594         * lib/inttypes.h: New file.
8595         * lib/strtoimax.c: Assume <inttypes.h>.
8596
8597 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
8598
8599         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
8600         isn't mounted.  Problem reported by Kir Kolyshkin.
8601
8602 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
8603
8604         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
8605         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
8606         Derek R. Price.
8607         * lib/regex.h (RE_DUP_MAX): Update comment to match current
8608         implementation.
8609
8610 2006-04-12  Eric Blake  <ebb9@byu.net>
8611
8612         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
8613         is now done automatically by the corresponding Autoconf macro.
8614
8615 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
8616
8617         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
8618         time_r.h.
8619
8620 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8621
8622         Merge regex changes from libc, removing some of our
8623         POSIX-conformance changes that were rejected and redoing them in a
8624         less-intrusive way.
8625
8626         * lib/regcomp.c (re_compile_internal, init_dfa):
8627         Length arg is now size_t, not Idx.  All uses changed.
8628         (peek_token): Forward decl now says internal_function.
8629         (__re_error_msgid, __re_error_msgid_idx):
8630         Now static rather than extern with attribute_hidden.
8631         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
8632         For some reason libc prefers K&R style defns for external functions.
8633         (regerror) [!defined _LIBC]: Likewise.
8634         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
8635         (seek_collating_symbol_entry, lookup_collation_sequence_value):
8636         (build_range_exp, build_collating_symbol):
8637         Use K&R-style defn.
8638         (re_compile_fastmap): Use '\0' to memset, not 0.
8639         (utf8_sb_map): Make the calculations more obvious.
8640         (init_dfa, parse_bracket_exp, build_charclass_op):
8641         Call calloc and cast result, as glibc does.
8642         (init_word_char, fetch_token, peek_token, peek_token_bracket):
8643         (build_range_exp, build_collating_symbol):
8644         Now internal functions.
8645
8646         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
8647
8648         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
8649         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
8650         Don't depend on VMS; depend on __VMS instead, for POSIX
8651         namespace cleanness.
8652         (regoff_t): Define to ssize_t, not long int.
8653
8654         Remove the REG_ macros named below.  Instead, make the old names
8655         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
8656         __USE_GNU_REGEX.
8657         (REG_BACKSLASH_ESCAPE_IN_LISTS):
8658         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
8659         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
8660         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
8661         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
8662         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
8663         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
8664         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
8665         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
8666         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
8667         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
8668         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
8669         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
8670         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
8671         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
8672         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
8673         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
8674         (REG_NREGS):
8675         Remove.  All uses replaced by the old RE_* names.
8676         (RE_BACKSLASH_ESCAPE_IN_LISTS):
8677         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
8678         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
8679         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
8680         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
8681         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
8682         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
8683         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
8684         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
8685         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
8686         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
8687         Don't bother having these macros be independent of each others'
8688         values, since they no longer exist in the POSIX name space.
8689
8690         Rename the following member names back to their old names,
8691         unless !__USE_GNU_REGEX.  All uses changed back.
8692         (buffer): Renamed from re_buffer.
8693         (allocated): Renamed from re_allocated.
8694         (used): Renamed from re_used.
8695         (syntax): Renamed from re_syntax.
8696         (fastmap): Renamed from re_fastmap.
8697         (translate): Renamed from re_translate.
8698         (can_be_null): Renamed from re_can_be_null.
8699         (regs_allocated): Renamed from re_regs_allocated.
8700         (fastmap_accurate): Renamed from re_fastmap_accurate.
8701         (no_sub): Renamed from re_no_sub.
8702         (not_bol): Renamed from re_not_bol.
8703         (not_eol): Renamed from re_not_eol.
8704         (newline_anchor): Renamed from re_newline_anchor.
8705         (num_regs): Renamed from rm_num_regs.
8706         (start): Renamed from rm_start.
8707         (end): Renamed from rm_end.
8708
8709         (free_state): Move up a bit.
8710
8711         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
8712         #define to be empty.
8713         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
8714         when that is what is intended.
8715         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
8716         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
8717         (MAX): New macro.
8718         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
8719         All uses changed back to re_malloc, etc.  It's now the caller's
8720         responsibility to check for overflow; all callers changed.
8721         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
8722         (re_x2nrealloc): Remove.
8723         (free_state): Remove decl.
8724
8725         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
8726         (re_set_registers, re_exec):
8727         Use K&R-style defn.
8728
8729         2006-01-31  Roland McGrath  <roland@redhat.com>
8730
8731         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
8732         Reported by Mike Frysinger <vapier@gentoo.org>.
8733
8734         2006-01-15  Andreas Jaeger  <aj@suse.de>
8735
8736         [BZ #1950]
8737         * lib/regex_internal.c (re_string_reconstruct): Adjust for
8738         build_wcs_upper_buffer change.
8739         (build_wcs_upper_buffer): Change return type.
8740
8741         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
8742
8743         * lib/regex_internal.h: Include <stdint.h> if available.
8744
8745         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
8746
8747         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
8748
8749         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
8750
8751         * lib/regcomp.c: Adjust for changed secondary hash function.
8752
8753         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
8754
8755         * lib/regex.h: Pretty printing.
8756         Clean up namespace a bit.
8757
8758         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
8759
8760         * lib/regexec.c (update_cur_sifted_state, check_arrival,
8761         check_arrival_add_next_nodes): Avoid using uninitialized variable.
8762
8763         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
8764                     Ulrich Drepper  <drepper@redhat.com>
8765
8766         [BZ #1302]
8767         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
8768         changed.
8769         (bitset_word_t): Renamed from bitset_word.  All uses changed.
8770
8771         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
8772
8773         [BZ #281]
8774         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
8775         * lib/regcomp.c: Remove unnecessary uses of
8776         unsigned RE_TRANSLATE_TYPE.
8777         * lib/regex_internal.h: Likewise.
8778         * lib/regex_internal.c: Likewise.
8779         * lib/regexec.c: Likewise.
8780         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
8781
8782         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
8783
8784         * lib/regexec.c (find_recover_state): Remove unnecessary
8785         initialization.
8786         (transit_state_bkref): Make DFA a const pointer.
8787         (get_subexp): Likewise.
8788         (check_arrival): Likewise.
8789         (update_cur_sifted_state): Likewise.
8790         (re_search_internal): Likewise.
8791         (prune_impossible_nodes): Likewise.
8792         (acquire_init_state_context): Likewise.
8793         (proceed_next_node): Likewise.
8794         (set_regs): Likewise.
8795         (free_fail_stack_return): Likewise.
8796         (check_arrival_expand_ecl): Mark DFA parameter as const.
8797         (check_arrival_expand_ecl_sub): Likewise.
8798         (check_subexp_limits): Likewise.
8799         (sub_epsilon_src_nodes):  Likewise.
8800         (add_epsilon_src_nodes):  Likewise.
8801         (merge_state_array): Likewise.
8802         (update_regs): Likewise.
8803         (build_trtable): Likewise.
8804         (sift_states_backward): Mark MCTX parameter as const.
8805         (build_sifted_states): Likewise.
8806         (update_cur_sifted_state): Likewise.
8807         (sift_states_mkref): Likewise.
8808         (check_arrival_expand_ecl): Mark eclosure as const.
8809         (check_dst_limits_calc_pos_1): Likewise.
8810         * lib/regex_internal.h (re_match_context_t): Make dfa a const
8811         pointer.
8812
8813         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
8814
8815         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
8816         (transit_state_sb): Likewise.
8817         (transit_state_mb): Likewise.
8818         (sift_states_iter_mb): Likewise.
8819         (check_arrival_add_next_nodes): Likewise.
8820         (check_node_accept_bytes): Change first parameter to pointer-to-const.
8821         [_LIBC] (re_search_2_stub): Use mempcpy.
8822
8823         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
8824         mbrtowc for very simple UTF-8 case.
8825
8826         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
8827         a pointer-to-const.
8828         (re_acquire_state_context): Likewise.
8829         * lib/regex_internal.h: Adjust prototypes.
8830
8831         * lib/regex.c: Prevent using C++ compilers.
8832
8833         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
8834         (re_acquire_state_context): Likewise.
8835
8836 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8837
8838         * modules/regex (Depends-on): Add ssize_t.
8839
8840 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8841
8842         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
8843         translation table.
8844
8845 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
8846
8847         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
8848
8849 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
8850             Bruno Haible  <bruno@clisp.org>
8851
8852         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
8853         <sys/types.h> and <inttypes.h>.
8854
8855 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8856
8857         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
8858         `__error_t_defined', so argp.h will not typedef the former.
8859
8860 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
8861
8862         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
8863         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
8864         glibc names.  Even if glibc is changed to conform to POSIX, the
8865         traditional names will be available anyway, since regex depends on
8866         the extensions module.  Also, fix a longstanding typo in the
8867         implementation of Spencer ERE test #75 from grep 2.3.  Problems
8868         reported by Emanuele Giaquinta.  Also, change sense of cached
8869         variable, so that the message makes sense.
8870
8871 2006-03-24  Simon Josefsson  <jas@extundo.com>
8872
8873         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
8874         including some doc fixes.
8875         (base64_encode_alloc): Fix +1 bug on allocation failures.
8876
8877 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
8878
8879         * lib/base64.c (base64_encode): Do not read past end of array with
8880         unsanitized input on systems with CHAR_BIT > 8.
8881
8882 2006-03-24  Eric Blake  <ebb9@byu.net>
8883
8884         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
8885
8886 2006-03-22  Karl Berry  <karl@gnu.org>
8887
8888         * config/srclist.txt (*setenv.[ch]): get from coreutils.
8889         * config/srclistvars.sh (COREUTILS): new var.
8890
8891 2006-03-17  Jim Meyering  <jim@meyering.net>
8892
8893         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
8894         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
8895
8896 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8897
8898         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
8899         no longer needs it.  Instead, check that regoff_t is as least
8900         as wide as ptrdiff_t.
8901
8902         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
8903         so that our regex.h stays compatible with the installed regex.
8904         This is helpful for installers who configure --without-included-regex.
8905         Problem reported by Emanuele Giaquinta.
8906
8907 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
8908
8909         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
8910         Typedef to long int, not to off_, as POSIX will likely change
8911         in that direction.
8912
8913 2006-03-15  Eric Blake  <ebb9@byu.net>
8914
8915         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
8916
8917 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
8918
8919         * lib/argp-help.c (validate_uparams): Fix typo
8920         * lib/argp-parse.c (argp_default_options): Consistently begin help
8921         messages with a lowercase letter.
8922
8923 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
8924
8925         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
8926         overrun buffers and shouldn't be used (much as gets shouldn't be
8927         used).
8928         * lib/time_r.c (asctime_r, ctime_r): Likewise.
8929
8930 2006-03-08  Simon Josefsson  <jas@extundo.com>
8931
8932         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
8933         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8934
8935 2006-03-08  Simon Josefsson  <jas@extundo.com>
8936
8937         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
8938         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8939
8940 2006-03-08  Simon Josefsson  <jas@extundo.com>
8941
8942         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
8943         signal that configure disabled the device.
8944
8945 2006-03-08  Simon Josefsson  <jas@extundo.com>
8946
8947         * build-aux/maint.mk: Fix refresh-po, to handle no translated
8948         languages.
8949
8950 2006-03-07  Simon Josefsson  <jas@extundo.com>
8951
8952         * modules/getopt (Depends-on): Add unistd.
8953
8954         * modules/unistd: New file.
8955
8956 2006-03-07  Simon Josefsson  <jas@extundo.com>
8957
8958         * modules/gc-random: New file.
8959
8960 2006-03-07  Simon Josefsson  <jas@extundo.com>
8961
8962         * m4/unistd_h.m4: New file.
8963
8964 2006-03-07  Simon Josefsson  <jas@extundo.com>
8965
8966         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
8967         test to be side-effect free by storing the result in the cache
8968         variable gl_cv_lib_readline, and moving the assignment of
8969         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
8970         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8971
8972 2006-03-07  Simon Josefsson  <jas@extundo.com>
8973
8974         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
8975         error on missing devices (the functions will return an error).
8976
8977         * m4/gc.m4: Move random stuff to gc-random.m4
8978
8979 2006-03-07  Simon Josefsson  <jas@extundo.com>
8980
8981         * lib/unistd_.h: New file.
8982
8983 2006-03-07  Simon Josefsson  <jas@extundo.com>
8984
8985         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
8986
8987 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8988
8989         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
8990         Problem reported by Juan Manuel Guerrero.
8991
8992 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
8993
8994         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
8995         the unistd module.
8996         * lib/getlogin_r.c: Likewise.
8997         * lib/getlogin_r.h: Likewise.
8998         * lib/glob.c: Likewise.
8999         * lib/pagealign_alloc.c: Likewise.
9000         * lib/unistd_.h: Remove; no longer needed.
9001
9002 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
9003
9004         * MODULES.html.sh (Support for systems lacking POSIX:2001):
9005         Add unistd.
9006         * modules/c-stack (Depends-on): Add unistd.
9007         * modules/getlogin_r: Likewise.
9008         * modules/glob: Likewise.
9009         * modules/pagealign_alloc: Likewise.
9010         * modules/unistd (Files): Remove lib/unistd_.h.
9011         (EXTRA_DIST): Remove.
9012         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
9013         need unistd_.h.
9014         (MOSTLYCLEANFILES): Remove unistd.h-t.
9015
9016 2006-03-03  Simon Josefsson  <jas@extundo.com>
9017
9018         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
9019
9020 2006-03-03  Simon Josefsson  <jas@extundo.com>
9021
9022         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
9023         libidn and bison.
9024
9025 2006-03-03  Simon Josefsson  <jas@extundo.com>
9026
9027         * build-aux/maint.mk: Add indent target.
9028
9029 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
9030
9031         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
9032         our replacement poll.h in any case, to avoid a differing
9033         declaration from a system header.  Seen on AIX.
9034
9035 2006-03-01  Simon Josefsson  <jas@extundo.com>
9036
9037         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
9038         <kasal@ucw.cz>.
9039
9040 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9041
9042         * modules/gettime (Depends-on): Add extensions module.
9043         * modules/nanosleep (Depends-on): Likewise.
9044         * modules/settime (Depends-on): Likewise.
9045
9046 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
9047
9048         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
9049         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
9050         pedantically.
9051         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
9052         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
9053
9054         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
9055         not "==".  Reported by Ralf Wildenhues.
9056
9057 2006-03-01  Karl Berry  <karl@gnu.org>
9058
9059         * doc/Copyright/request-*: new files, synced from gnuorg.
9060
9061 2006-03-01  Karl Berry  <karl@gnu.org>
9062
9063         * config/srclist.txt (Copyright/*): new entries.
9064
9065 2006-02-28  Simon Josefsson  <jas@extundo.com>
9066
9067         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
9068
9069 2006-02-27  Simon Josefsson  <jas@extundo.com>
9070
9071         * lib/base64.h: Indent #define's.  From Jim Meyering
9072         <jim@meyering.net>.
9073
9074 2006-02-27  Jim Meyering  <jim@meyering.net>
9075
9076         Revert the change of 2006-02-24, so these files can continue
9077         to be sync'd from gettext.
9078         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
9079         of `config.h'.
9080
9081 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
9082
9083         * modules/intprops: New file.
9084         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
9085         Add intprops.
9086         * modules/getloadavg (Files): Remove lib/intprops.h.
9087         (Depends-on): Add intprops.
9088         * modules/human: Likewise.
9089         * modules/inttostr: Likewise.
9090         * modules/openat: Likewise.
9091         * modules/sig2str: Likewise.
9092         * modules/userspec: Likewise.
9093         * modules/utimecmp: Likewise.
9094         * modules/xnanosleep: Likewise.
9095         * modules/xstrtol: Likewise.
9096
9097 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
9098
9099         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
9100         * modules/lock-tests (TESTS): Use $(EXEEXT).
9101         * modules/tls-tests: Likewise.
9102         * modules/argp-tests: Likewise.
9103         (check_PROGRAMS): New var, replacing...
9104         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
9105
9106 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9107
9108         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
9109         `config.h'.
9110
9111 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
9112
9113         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
9114
9115 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9116
9117         Sync from coreutils.
9118         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
9119         gl_CHDIR_SAFER.
9120
9121 2006-02-22  Jim Meyering  <jim@meyering.net>
9122
9123         Sync from coreutils.
9124         * m4/chdir-safer.m4: New file.
9125
9126 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
9127
9128         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
9129         AT_FDCWD exceeds INT_MAX.
9130         * lib/openat.h (AT_FDCWD): Likewise.
9131
9132 2006-02-17  Eric Blake  <address@hidden>
9133
9134         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
9135
9136 2006-02-16  Simon Josefsson  <jas@extundo.com>
9137
9138         * modules/getaddrinfo (Depends-on): Add sys_socket.
9139
9140 2006-02-15  Simon Josefsson  <jas@extundo.com>
9141
9142         * build-aux/maint.mk: Add dsyntax-check rule.
9143
9144 2006-02-15  Eric Blake  <ebb9@byu.net>
9145
9146         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
9147         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
9148         'present but cannot compile' warnings on cygwin.
9149         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
9150         use ws2tcpip.h if sys/socket.h works.
9151         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
9152         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
9153
9154 2006-02-14  Simon Josefsson  <jas@extundo.com>
9155
9156         * modules/maintainer-makefile (Files): Rename.
9157
9158         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
9159         and (the local) Makefile.cfg to maint-cfg.mk.
9160
9161         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
9162         to the latter.
9163
9164         * modules/maintainer-makefile: New module.
9165
9166         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
9167         severaly stripped to make it possible to build it up from scratch
9168         with reliable tests.
9169
9170         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
9171         fixes to permit overriding the default actions when configure and
9172         makefile are not available.
9173
9174 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
9175
9176         Sync from coreutils.
9177         * modules/lstat (Depends-on): Don't depend on xalloc.
9178         (License): Change from GPL to LGPL, since this is now simply a
9179         replacement for a libc function.
9180
9181 2006-02-14  Jim Meyering  <jim@meyering.net>
9182
9183         Sync from coreutils.
9184
9185         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
9186         failure on deficient systems, and simplify gnulib lgpl dependencies.
9187         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
9188         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
9189
9190         * lib/xalloc-die.c: Remove unused definition of N_.
9191
9192 2006-02-14  Jim Meyering  <jim@meyering.net>
9193
9194         Sync from coreutils.
9195         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
9196         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
9197         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
9198         double-quote uses of that variable, to accommodate the rare case in
9199         which getmntent is available in none of the libraries checked.  This
9200         happens at least on FreeBSD 5.0.
9201
9202 2006-02-13  Simon Josefsson  <jas@extundo.com>
9203
9204         * gnulib-tool (Usage): Fix --import, from
9205         karl@freefriends.org (Karl Berry).
9206
9207 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
9208
9209         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
9210
9211 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
9212
9213         * lib/argp-namefrob.h: Restore changes accidentally lost during the
9214         "autoupdate" on 2005-12-12.
9215
9216 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9217
9218         * modules/closeout (Depends-on): Remove atexit.
9219
9220 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
9221
9222         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
9223         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
9224
9225 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
9226
9227         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
9228         __EXTENSIONS__ if this causes compilation to fail.  Problem
9229         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
9230         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
9231
9232 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
9233
9234         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
9235         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
9236         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
9237         All uses changed.
9238
9239 2006-01-26  Simon Josefsson  <jas@extundo.com>
9240
9241         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
9242         prototype is visible on mingw32.
9243
9244         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
9245         for mingw32.
9246
9247         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
9248         mingw32).
9249
9250 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
9251
9252         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
9253         attempt to open for write; this always fails, at least on POSIX
9254         hosts.  This reinstates the 2006-01-09 change, which was
9255         inadvertently removed.
9256
9257 2006-01-26  Bruno Haible  <bruno@clisp.org>
9258
9259         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
9260         Reported by Paul Eggert.
9261
9262 2006-01-26  Bruno Haible  <bruno@clisp.org>
9263             Paul Eggert  <eggert@cs.ucla.edu>
9264
9265         * lib/stdbool_.h (_Bool)
9266         [(! (defined __cplusplus || defined __BEOS__)
9267           && !defined __GNUC__
9268           && !(defined __HP_cc || defined __xlc__
9269                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
9270                || defined __sgi))]:
9271         #define to signed char in these cases too; this simplifies
9272         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
9273         etc., separately) and makes it more conservative.
9274
9275 2006-01-25  Simon Josefsson  <jas@extundo.com>
9276
9277         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
9278         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
9279         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
9280
9281 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
9282
9283         * lib/argp-namefrob.h: Bugfix. Remove stray #
9284
9285 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
9286
9287         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
9288         so that we test the test.
9289         Check for yet another HP-UX cc bug involving *bool |= bool.
9290
9291 2006-01-25  Karl Berry  <karl@gnu.org>
9292
9293         * config/srclist.txt (vasnprintf.c): sync lost.
9294
9295 2006-01-25  Jim Meyering  <jim@meyering.net>
9296
9297         Sync from the stable (b5) branch of coreutils:
9298
9299         * lib/fts.c (fts_children): Don't let close() clobber errno from
9300         failed fchdir().
9301
9302         * lib/fts.c (fts_stat): When following a symlink-to-directory,
9303         don't necessarily interpret stat-fails+lstat-succeeds as indicating
9304         a dangling symlink.  That can also happen at least for ELOOP.
9305         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
9306         FYI, this bug predates the inclusion of fts.c in coreutils.
9307
9308         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
9309         in their own block, so pre-c99 compilers don't object.
9310
9311         Avoid the double-free (first in fts_read, second in fts_close) that
9312         would occur when an `active' directory is made inaccessible (e.g.,
9313         via chmod a-x) during a traversal.
9314         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9315         before returning.  Reproduce this failure by
9316         mkdir -p a/b; cd a; chmod a-x . b
9317         Reported by Stavros Passas.
9318
9319 2006-01-25  Jim Meyering  <jim@meyering.net>
9320
9321         * lib/fileblocks.c: Remove more useless parentheses.
9322         * lib/readutmp.h: Likewise.
9323
9324 2006-01-25  Bruno Haible  <bruno@clisp.org>
9325
9326         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
9327         warnings.
9328         Reported by Paul Eggert.
9329
9330 2006-01-25  Bruno Haible  <bruno@clisp.org>
9331
9332         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
9333         rid of a trap command. For Solaris sh.
9334         Reported by Mark D. Baushke <mdb@gnu.org>.
9335
9336 2006-01-24  Simon Josefsson  <jas@extundo.com>
9337
9338         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
9339         Bruno.
9340
9341 2006-01-24  Karl Berry  <karl@gnu.org>
9342
9343         * config/srclist.txt (argp-namefrob.h): sync lost.
9344
9345 2006-01-24  Jim Meyering  <jim@meyering.net>
9346
9347         * modules/openat (Files): Add lib/intprops.h.
9348         From Mark D. Baushke.
9349
9350 2006-01-24  Jim Meyering  <jim@meyering.net>
9351
9352         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
9353         Reported by Mark D. Baushke.
9354
9355 2006-01-24  Jim Meyering  <jim@meyering.net>
9356
9357         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
9358
9359 2006-01-24  Bruno Haible  <bruno@clisp.org>
9360
9361         * modules/strnlen (Maintainer): Change from glibc to all.
9362
9363 2006-01-24  Bruno Haible  <bruno@clisp.org>
9364
9365         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
9366         Patch by Paul Eggert.
9367
9368 2006-01-24  Bruno Haible  <bruno@clisp.org>
9369
9370         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
9371         already has it.
9372         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
9373         2005-11-26.
9374
9375         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
9376         'signed char' to avoid problems with the built-in _Bool type.
9377         Reported by Paul Eggert on 2005-11-26.
9378
9379 2006-01-24  Bruno Haible  <bruno@clisp.org>
9380
9381         * gnulib-tool (func_import): Avoid constructing complicated sed
9382         expressions inside backquote.
9383         Report and solution by Mark D. Baushke <mdb@gnu.org>.
9384
9385 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
9386
9387         These changes imported from libc.
9388         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
9389         test and two separate function calls.
9390         * lib/strndup.c (__strndup): Add libc_hidden_def.
9391
9392 2006-01-23  Simon Josefsson  <jas@extundo.com>
9393
9394         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
9395         Remove the test_*_SOURCES variable: automake infers it by default.
9396         * modules/tls-tests: Likewise.
9397
9398 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9399
9400         Work around porting bugs reported by Dieter in
9401         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
9402         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
9403         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
9404         Include "getopt.h" first, to check interface.
9405         (getenv): Declare only if defined HAVE_DECL_GETENV &&
9406         !HAVE_DECL_GETENV.
9407         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
9408         (__strndup): Revert to K&R-style function dfns, the glibc style.
9409         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
9410         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
9411         Include strnlen.h first, to get prototype properly.
9412         (strnlen): Renamed from __strnlen.
9413         Remove weak alias.
9414
9415 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9416
9417         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
9418
9419 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
9420
9421         * config/srclist.txt: Adjust to reflect glibc reorganization.
9422         This affects only comments.
9423
9424 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9425
9426          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
9427          Reported by Bruce Korb <bkorb@gnu.org>.
9428
9429 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
9430
9431         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
9432         to pacify gcc -Wswitch-default.
9433
9434 2006-01-22  Bruno Haible  <bruno@clisp.org>
9435
9436         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
9437         temporary buffer for sprintf, take into account the precision also
9438         for 'd', 'i', 'u', 'o', 'x', 'X'.
9439
9440 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9441
9442         * modules/argp-tests: New module
9443         * tests/test-argp.c: New file
9444         * tests/test-argp-2.sh: New file
9445
9446 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
9447
9448         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
9449         (__argp_base_name): Removed
9450         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
9451         typo.
9452         (__argp_base_name): Provide macro definition or extern declaration
9453         depending on the configuration
9454
9455 2006-01-20  Simon Josefsson  <jas@extundo.com>
9456
9457         * modules/inet_ntop (Depends-on): Depend on sys_socket.
9458
9459 2006-01-20  Simon Josefsson  <jas@extundo.com>
9460
9461         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
9462
9463 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
9464
9465         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
9466         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
9467         Suggested by Bruno Haible.
9468
9469 2006-01-20  Karl Berry  <karl@gnu.org>
9470
9471         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
9472         until changes propagate, I guess.
9473
9474 2006-01-19  Simon Josefsson  <jas@extundo.com>
9475
9476         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
9477
9478 2006-01-19  Simon Josefsson  <jas@extundo.com>
9479
9480         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
9481
9482 2006-01-19  Simon Josefsson  <jas@extundo.com>
9483
9484         * gnulib-tool: Set check_PROGRAMS.
9485
9486         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9487         modules/des-tests, modules/gc-arcfour-tests,
9488         modules/gc-arctwo-tests, modules/gc-des-tests,
9489         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9490         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9491         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9492         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9493         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9494         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
9495         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
9496         test_*_SOURCES.
9497
9498 2006-01-18  Simon Josefsson  <jas@extundo.com>
9499
9500         * modules/socklen (Depends-on): Depend on sys_socket.
9501
9502 2006-01-18  Simon Josefsson  <jas@extundo.com>
9503
9504         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
9505         modules/des-tests, modules/gc-arcfour-tests,
9506         modules/gc-arctwo-tests, modules/gc-des-tests,
9507         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
9508         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
9509         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
9510         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
9511         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
9512         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
9513         $(EXEEXT) to automake TESTS variable, for mingw32.
9514
9515 2006-01-17  Simon Josefsson  <jas@extundo.com>
9516
9517         * modules/socklen (Include): Need sys/socket.h.
9518
9519 2006-01-17  Bruno Haible  <bruno@clisp.org>
9520
9521         * modules/ssize_t (Include): Add <sys/types.h>.
9522
9523 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
9524
9525         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
9526         it's not portable and it doesn't work with cross-compiles.
9527         Problem reported by Bruno Haible.  Fix missing-$ typo in
9528         'test "gl_cv_ignore_unused_libraries" ...' that prevented
9529         -zignore from being used with Sun's C compiler.
9530
9531 2006-01-12  Simon Josefsson  <jas@extundo.com>
9532
9533         * lib/base64.c: Fix warning, reported by Bruno Haible
9534         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
9535
9536 2006-01-12  Bruno Haible  <bruno@clisp.org>
9537
9538         * modules/ldd: New file.
9539         * build-aux/ldd.sh.in: New file.
9540         * MODULES.html.sh (Support for building libraries and executables): Add
9541         ldd.
9542
9543 2006-01-12  Bruno Haible  <bruno@clisp.org>
9544
9545         * m4/ldd.m4: New file.
9546
9547 2006-01-12  Bruno Haible  <bruno@clisp.org>
9548
9549         * gnulib-tool (func_import, func_create_testdir): Don't go into an
9550         endless loop while replacing $auxdir with build-aux.
9551
9552 2006-01-11  Simon Josefsson  <jas@extundo.com>
9553
9554         * lib/stdint_.h (SIZE_MAX): Add missing (.
9555
9556 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
9557
9558         Sync from coreutils.
9559         * lib/md5.c: Fix commentary typos.
9560         (alignof, UNALIGNED_P): No need for a GCC-specific version.
9561         * lib/md5.h (__attribute__): Remove; unused.
9562         * lib/sha1.c: Fix commentary to match md5 better.
9563         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
9564         so that we don't need to worry about alignment.  All uses changed.
9565         This merges the 2005-10-28 md5 change into sha1.
9566
9567 2006-01-11  Jim Meyering  <jim@meyering.net>
9568
9569         Sync from coreutils.
9570         * lib/md5.c (OP): Fix spacing.
9571
9572 2006-01-11  Bruno Haible  <bruno@clisp.org>
9573
9574         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9575         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
9576         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
9577
9578 2006-01-11  Bruno Haible  <bruno@clisp.org>
9579
9580         Ensure automatic ordering between gl_LOCK and gl_ARGP.
9581         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
9582         the "early" section as well.
9583
9584 2006-01-11  Bruno Haible  <bruno@clisp.org>
9585
9586         Avoid "ar: no archive members specified" error on MacOS X.
9587         * gnulib-tool (func_modules_add_dummy): New function.
9588         (func_import, func_create_testdir): Invoke it.
9589
9590 2006-01-11  Bruno Haible  <bruno@clisp.org>
9591
9592         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
9593         with $auxdir in AC_CONFIG_FILES statements.
9594
9595 2006-01-11  Bruno Haible  <bruno@clisp.org>
9596
9597         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
9598         Initialize also noinst_HEADERS to empty.
9599
9600 2006-01-11  Bruno Haible  <bruno@clisp.org>
9601
9602         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
9603         variables.
9604         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
9605         autoreconf.
9606
9607 2006-01-11  Bruno Haible  <bruno@clisp.org>
9608
9609         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
9610         overridable by the user.
9611         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
9612
9613 2006-01-10  Simon Josefsson  <jas@extundo.com>
9614
9615         * modules/sys_socket: New file.
9616
9617 2006-01-10  Simon Josefsson  <jas@extundo.com>
9618
9619         * m4/sys_socket_h.m4: New file.
9620
9621 2006-01-10  Simon Josefsson  <jas@extundo.com>
9622
9623         * lib/socket_.h: New file.
9624
9625 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9626
9627         * modules/readutmp (Maintainer): Add myself.
9628
9629 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9630
9631         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
9632         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
9633         People who are still concerned with buggy memcmp implementations
9634         can invoke gl_FUNC_MEMCMP themselves.
9635
9636 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
9637
9638         * lib/regex_internal.h (BITSET_WORD_BITS):
9639         Work around a bug in 64-bit PGC (before version 6.1-2), where the
9640         preprocessor mishandles large unsigned values as if they were signed.
9641         Problem reported by Claudio Fontana in
9642         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
9643
9644 2006-01-10  Jim Meyering  <jim@meyering.net>
9645
9646         Avoid the double-free (first in fts_read, second in fts_close) that
9647         would occur when an `active' directory is made inaccessible (e.g.,
9648         via chmod a-x) during a traversal.
9649         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
9650         before returning.  Reproduce this failure by
9651         mkdir -p a/b; cd a; chmod a-x . b
9652         Reported by Stavros Passas.
9653
9654         Sync from coreutils.
9655         * lib/sha1.c: Tweak grammar in a comment.
9656
9657 2006-01-10  Jim Meyering  <jim@meyering.net>
9658
9659         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
9660         Patch by Joerg Sonnenberger.
9661
9662 2006-01-10  Bruno Haible  <bruno@clisp.org>
9663
9664         * modules/readutmp: Depend on module free.
9665         * modules/strtok_r: Depend on module restrict.
9666
9667 2006-01-10  Bruno Haible  <bruno@clisp.org>
9668
9669         * modules/gettext (configure.ac): Add an invocation of
9670         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
9671
9672 2006-01-10  Bruno Haible  <bruno@clisp.org>
9673
9674         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
9675         Reported by Werner Lemberg <wl@gnu.org>.
9676
9677 2006-01-10  Bruno Haible  <bruno@clisp.org>
9678
9679         * lib/localcharset.c: Update from GNU gettext.
9680
9681 2006-01-10  Bruno Haible  <bruno@clisp.org>
9682
9683         * lib/argp.h (__const): Remove macro. Use const instead.
9684         * lib/argp-fmtstream.h (__const): Likewise.
9685         * lib/glob_.h (__const): Remove macro.
9686         * lib/glob-libc.h: Use const instead of __const.
9687
9688 2006-01-10  Bruno Haible  <bruno@clisp.org>
9689
9690         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
9691         variable.
9692         Needed to avoid an automake error regarding the 'gettext' module.
9693
9694 2006-01-09  Simon Josefsson  <jas@extundo.com>
9695
9696         * modules/inet_ntop (Depends-on): Add restrict.
9697
9698 2006-01-09  Simon Josefsson  <jas@extundo.com>
9699
9700         * modules/gc-rijndael-tests (License): Put under LGPL.
9701
9702         * modules/gc-des-tests (License): Likewise.
9703
9704         * modules/gc-arcfour-tests (License): Likewise.
9705
9706         * modules/gc-arctwo-tests (License): Likewise.
9707
9708         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
9709
9710         * modules/gc-hmac-sha1-tests (Files): Likewise.
9711
9712         * modules/gc-hmac-md5-tests (License): Likewise.
9713
9714         * modules/gc-sha1-tests (License): Likewise.
9715
9716         * modules/gc-md5-tests (License): Likewise.
9717
9718         * modules/gc-md4-tests (License): Likewise.
9719
9720         * modules/gc-md2-tests (License): Likewise.
9721
9722         * modules/gc-tests (License): Likewise.
9723
9724         * modules/des-tests (License): Likewise.
9725
9726         * modules/md4-tests (License): Likewise.
9727
9728         * modules/md2-tests (License): Likewise.
9729
9730 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9731
9732         Sync from coreutils:
9733
9734         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
9735         * modules/lib-ignore: New file.
9736         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
9737         chdir-safer.m4, lchmod.m4.
9738         * modules/openat: Add mkdirat.c, openat-priv.h.
9739
9740 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9741
9742         Sync from coreutils.
9743         * m4/lib-ignore.m4: New file.
9744         * m4/lchmod.m4: New file.
9745
9746 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9747
9748         Sync from coreutils.
9749         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
9750         for write access: POSIX says that must fail.
9751         * lib/fts.c (diropen): Likewise.
9752         * lib/save-cwd.c (save_cwd): Likewise.
9753         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
9754         well, for minor improvements on hosts that lack O_DIRECTORY.
9755         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
9756         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
9757         Fall back on chown if open failed with EACCES.
9758
9759         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
9760         Report an error at compile-time if only a 1-second nominal clock
9761         resolution is found.
9762
9763         * lib/lchmod.h: New file.
9764         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
9765         (make_dir_parents): Use lchown rather than chown, and
9766         lchmod rather than chmod.
9767
9768         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
9769         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
9770         "proc" reported by n0dalus.
9771
9772         * lib/mountlist.c: Include <limits.h>.
9773         (dev_from_mount_options)
9774         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
9775         New function.  It no longer assumes "dev=" has the System V meaning
9776         on Linux (since it doesn't).  It also parses "dev=" more carefully.
9777         (read_file_system_list)
9778         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
9779         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
9780         dev= in that case.
9781
9782         * lib/posixtm.h (PDS_PRE_2000): New macro.
9783         * lib/posixtm.c (year): Arg is now syntax_bits rather than
9784         allow_century.  All usages changed.  Reject dates outside the range
9785         1969-1999 if PDS_PRE_2000 is used.
9786
9787 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
9788
9789         Sync from coreutils.
9790         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
9791         (Time of day items): Mention the possibility of leap seconds.
9792         Problem reported by Dr. David Alan Gilbert.
9793
9794 2006-01-09  Jim Meyering  <jim@meyering.net>
9795
9796         Sync from coreutils.
9797
9798         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
9799
9800         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
9801
9802         * lib/modechange.c (mode_compile): Reject an invalid mode string
9803         that starts with an octal digit.  From Andreas Gruenbacher.
9804
9805         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
9806         and dup to open_safer and dup_safer, respectively.
9807         (openat_permissive): Fix typo in comment.
9808
9809         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
9810         "gettext.h"; either no longer needed or are guaranteed by openat.h.
9811         (_): Remove; no longer needed.
9812         (openat): Renamed from rpl_openat; no need for rpl_openat
9813         since openat.h renames openat for us.
9814         Replace most of the body with a call to openat_permissive,
9815         to avoid duplicate code.
9816         Port to (probably hypothetical) environments were mode_t is
9817         wider than int.
9818         (openat_permissive): Require mode arg, so that we can check
9819         types better.  Put it just after flags.  Change cwd failure
9820         indicator from pointer-to-bool to pointer-to-errno-value.
9821         All callers changed.
9822         Invoke openat_save_fail and/or openat_restore_fail if
9823         cwd_errno is null, so that openat can call us.
9824         (openat_permissive, fdopendir, fstatat, unlinkat):
9825         Simplify errno handling to avoid some duplicate code,
9826         as it's OK to set errno on success.
9827         * lib/openat.h: Revamp code so that function macros depend on
9828         __OPENAT_PREFIX only, not also on AT_FDCWD.
9829         (openat_ro): Remove.  Caller changed to use openat_permissive.
9830         (openat_permissive): Now a macro, if not a function.
9831         (openat_restore_fail, openat_save_fail): Now always functions,
9832         since mkdirat needs them even if __OPENAT_PREFIX is defined.
9833
9834         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
9835         and openat.c.
9836         * lib/mkdirat.c: Include openat-priv.h.
9837         Remove definitions of macros defined therein.
9838         * lib/openat.c: Likewise.
9839
9840         * lib/mkdirat.c (mkdirat): New file and function.
9841         * lib/openat.h (mkdirat): Declare.
9842
9843         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
9844
9845         * lib/openat.h (openat_permissive): Declare.
9846         (openat_ro): Define.
9847
9848         * lib/openat.c (EXPECTED_ERRNO): New macro.
9849         (openat_permissive): New function -- used in remove.c rewrite.
9850         (all functions): Set errno just before returning, only if there
9851         was an actual failure.
9852         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
9853
9854         Emulate openat-family functions using Linux's procfs, if possible.
9855         Idea and some code based on Ulrich Drepper's glibc changes.
9856
9857         * lib/openat.c: (BUILD_PROC_NAME): New macro.
9858         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
9859         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
9860         before falling back on save_cwd and restore_cwd.
9861         (fdopendir, fstatat, unlinkat): Likewise.
9862
9863         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
9864         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
9865
9866         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
9867         as second argument to va_arg.  Otherwise, some versions of gcc
9868         warn that `if this code is reached, the program will abort'.
9869
9870 2006-01-09  Jim Meyering  <jim@meyering.net>
9871
9872         Sync from coreutils.
9873         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
9874         Require openat-priv.h.
9875
9876 2006-01-09  Bruno Haible  <bruno@clisp.org>
9877
9878         * modules/strnlen (Include): Use strnlen.h.
9879
9880 2006-01-09  Bruno Haible  <bruno@clisp.org>
9881
9882         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
9883
9884 2006-01-09  Bruno Haible  <bruno@clisp.org>
9885
9886         * lib/sysexit_.h (EX_OK): New macro.
9887         Suggested by Martin Lambers <marlam@marlam.de>.
9888
9889 2006-01-09  Bruno Haible  <bruno@clisp.org>
9890
9891         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
9892         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
9893
9894 2006-01-09  Bruno Haible  <bruno@clisp.org>
9895
9896         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
9897         numbers.
9898
9899 2006-01-09  Bruno Haible  <bruno@clisp.org>
9900
9901         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
9902         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
9903         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
9904         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
9905
9906 2006-01-09  Bruno Haible  <bruno@clisp.org>
9907
9908         * build-aux/javacomp.sh.in: New file, moved from lib/.
9909         * modules/javacomp-script (Files): Update.
9910         (configure.ac): Add AC_CONFIG_FILES invocation.
9911         (EXTRA_DIST): Remove variable.
9912
9913         * build-aux/javaexec.sh.in: New file, moved from lib/.
9914         * modules/javaexec (Files): Update.
9915         (configure.ac): Add AC_CONFIG_FILES invocation.
9916         (EXTRA_DIST): Remove javaexec.sh.in.
9917
9918         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
9919         * modules/csharpcomp-script (Files): Update.
9920         (configure.ac): Add AC_CONFIG_FILES invocation.
9921         (EXTRA_DIST): Remove variable.
9922
9923         * build-aux/csharpexec.sh.in: New file, moved from lib/.
9924         * modules/csharpexec (Files): Update.
9925         (configure.ac): Add AC_CONFIG_FILES invocation.
9926         (EXTRA_DIST): Remove csharpexec.sh.in.
9927
9928 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9929
9930         Sync from coreutils.
9931
9932         Add POSIX ACL support
9933         * lib/acl.h (copy_acl, set_acl): Add declarations.
9934         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
9935         systems other than Linux.
9936         (chmod_or_fchmod): New function: use fchmod when possible,
9937         and chmod otherwise.
9938         (file_has_acl): Add a POSIX ACL implementation, with a
9939         Linux-specific subcase.
9940         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
9941         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
9942         acls are unsupported.
9943         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
9944         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
9945         are unsupported.
9946
9947 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
9948
9949         Sync from coreutils.
9950         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
9951
9952 2006-01-07  Bruno Haible  <bruno@clisp.org>
9953
9954         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
9955         gl_EARLY.
9956
9957 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9958
9959         * lib/strftime.c (tzname): Don't declare if it is already #defined.
9960         Problem reported for Mingw by Mark Junker.
9961
9962 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
9963
9964         * README: Gnulib normally doesn't generate a tarball.
9965
9966 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
9967
9968         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
9969         long int, not int, for nanosecond counts, so that people who are
9970         used to POSIX struct timespec won't be surprised.  Reported by Jim
9971         Meyering.
9972
9973 2005-12-28  Bruno Haible  <bruno@clisp.org>
9974
9975         * build-aux/config.rpath: Update from GNU gettext.
9976
9977 2005-12-16  Jim Meyering  <jim@meyering.net>
9978
9979         * modules/fprintftime: New module.
9980         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
9981
9982 2005-12-16  Jim Meyering  <jim@meyering.net>
9983
9984         * m4/fprintftime.m4: New file.
9985
9986 2005-12-16  Jim Meyering  <jim@meyering.net>
9987
9988         * lib/fprintftime.c, lib/fprintftime.h: New files.
9989
9990 2005-12-15  Simon Josefsson  <jas@extundo.com>
9991
9992         * modules/socklen (configure.ac): Fix M4 macro name, to align with
9993         new m4/socklen.m4.
9994
9995 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
9996
9997         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
9998         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
9999
10000 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
10001
10002         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
10003         * lib/argp-help.c (fill_in_uparams): Check if the constructed
10004         struct uparams is valid. Fall back to the default values if it is
10005         not.
10006
10007 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10008
10009         * modules/argp (Files): Add argp-pin.c
10010         (Depends-on): dirname
10011         (lib_SOURCES): Add argp-pin.c
10012
10013 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10014
10015         * m4/argp.m4:  Check if program_invocation_name and
10016         program_invocation_short_name are declared and define appropriate
10017         macros if they are not.
10018
10019 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
10020
10021         * lib/argp-help.c (__argp_base_name): New function
10022         (__argp_short_program_name): Rewrite using __argp_base_name
10023         * lib/argp-namefrob.h: Define program_invocation_name and
10024         program_invocation_short_name if requested
10025         (__argp_base_name): Add prototype
10026         * lib/argp-parse.c (argp_def): Use gettext wrappers
10027         (argp_default_parser): Use __argp_base_name
10028         * lib/argp-pin.c: New file. Defines program_invocation_name and
10029         program_invocation_short_name on systems that lack them.
10030
10031 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10032
10033         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
10034         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10035         porting problem reported by Georg Schwarz in
10036         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10037
10038 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
10039
10040         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
10041         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
10042         porting problem reported by Georg Schwarz in
10043         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
10044
10045 2005-12-05  Bruno Haible  <bruno@clisp.org>
10046
10047         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
10048         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
10049         Reported by Mark Junker <mjscod@gmx.de>.
10050
10051 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
10052
10053         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
10054         Use implementation from Albert Chin, with some
10055         comments/corrections by Stepan Kasal and myself.
10056
10057 2005-12-02  Bruno Haible  <bruno@clisp.org>
10058
10059         * gnulib-tool (func_import): Accept GPLed build tool modules when
10060         --lgpl is given.
10061         * modules/csharpcomp-script: New file.
10062         * modules/csharpcomp: Depend on it.
10063         * modules/javacomp-script: New file.
10064         * modules/javacomp: Depend on it.
10065         Suggested by Simon Josefsson.
10066
10067 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
10068
10069         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
10070         statement, to work around an HP-UX 10.20 compiler bug reported by
10071         Peter O'Gorman.
10072
10073 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10074
10075         * modules/savedir (Depends-on): Add openat.
10076
10077 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
10078
10079         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
10080         (uintmax_t) [defined uintmax_t]: Do not declare.
10081         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
10082         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
10083         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
10084         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
10085         sake of portability to weird hosts that C allows (though we don't
10086         know of any practical examples).
10087
10088         * lib/savedir.h (fdsavedir): New decl.
10089         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
10090         contains most of the former guts of savedir.
10091         (savedir): Use savedirstream.
10092         Include "openat.h".
10093
10094 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
10095
10096         * modules/obstack (Files): Add m4/ulonglong.m4.
10097         Problem reported by Davide Angelocola.
10098
10099 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
10100
10101         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
10102         coreutils no longer futzes with rounding modes.
10103
10104 2005-11-14  Jim Meyering  <jim@meyering.net>
10105
10106         * lib/mkstemp-safer.c: Include <config.h>, required for possible
10107         replacement of mkstemp.
10108
10109 2005-11-10  Simon Josefsson  <jas@extundo.com>
10110
10111         * lib/readline.c: Remove EOL.
10112
10113 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10114
10115         * modules/gethrxtime (Depends-on): Add gettime.
10116
10117 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10118
10119         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
10120         or gettimeofday; no longer needed.
10121
10122 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
10123
10124         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
10125         time business.
10126         (gethrxtime) [! (HAVE_NANOUPTIME
10127         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
10128         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
10129         our own approximation.
10130
10131 2005-11-08  Eric Blake  <ebb9@byu.net>
10132
10133         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10134
10135 2005-11-08  Eric Blake  <ebb9@byu.net>
10136
10137         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
10138
10139 2005-11-04  Bruno Haible  <bruno@clisp.org>
10140
10141         * gnulib-tool: Implement --update mode.
10142
10143 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10144
10145         Fix porting problem reported by Theodoros V. Kalamatianos.
10146         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
10147         Don't assume that futimes failing means we must fail.
10148
10149 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
10150
10151         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
10152         variables to suggest the intended function of the PATH_MAX check.
10153
10154 2005-10-30  Kean Johnston  <jkj@sco.com>
10155
10156         Trivial changes to support SCO systems.
10157         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
10158         as PATH_MAX.
10159         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
10160         where __ptr is null when no I/O is pending.
10161
10162 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
10163
10164         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
10165         leave errno alone.  Problem reported by Dmitry V. Levin.
10166
10167 2005-10-28  Simon Josefsson  <jas@extundo.com>
10168
10169         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
10170         Test more.
10171
10172         * tests/test-gc-md2.c, tests/test-md2.c: New files.
10173
10174         * modules/md2, modules/md2-tests: New files.
10175
10176 2005-10-28  Simon Josefsson  <jas@extundo.com>
10177
10178         * m4/inet_ntop.m4: More tests.
10179
10180         * m4/gc-md2.m4, md2.m4: New file.
10181
10182 2005-10-28  Simon Josefsson  <jas@extundo.com>
10183
10184         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
10185         "restrict" keywords, as per POSIX.  Protect the function
10186         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
10187         Don't use K&R prototypes.  Check the sprintf return values.
10188         Re-define EAFNOSUPPORT if not present.  Indent.
10189
10190         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
10191         suggested by Bruno Haible <bruno@clisp.org>.
10192
10193         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
10194
10195         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
10196
10197         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
10198         libgcrypt).
10199
10200         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
10201
10202         * lib/md2.h, lib/md2.c: New files.
10203
10204 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
10205
10206         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
10207         errno alone.  Problem reported by Frederic Jolliton.
10208
10209 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
10210
10211         * modules/verify (License): Change from GPL to LGPL.  This is a
10212         tiny module and there are apparently near-equivalents that are
10213         under the BSD license.
10214
10215 2005-10-24  Simon Josefsson  <jas@extundo.com>
10216
10217         * modules/sha1: Relicense to LGPL.
10218
10219 2005-10-24  Simon Josefsson  <jas@extundo.com>
10220
10221         * lib/md4.h: Shrink buffer size, now that we changed the type.
10222
10223 2005-10-23  Simon Josefsson  <jas@extundo.com>
10224
10225         * gnulib-tool (func_import): Fix --tests-base.
10226
10227 2005-10-22  Simon Josefsson  <jas@extundo.com>
10228
10229         * modules/arcfour (Depends-on): Need stdint.
10230
10231 2005-10-22  Simon Josefsson  <jas@extundo.com>
10232
10233         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
10234         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
10235
10236 2005-10-22  Simon Josefsson  <jas@extundo.com>
10237
10238         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
10239         suggested by Bruno Haible <bruno@clisp.org>.
10240
10241 2005-10-22  Simon Josefsson  <jas@extundo.com>
10242
10243         * lib/crc.h: Include stddef.h, for size_t.
10244
10245 2005-10-22  Simon Josefsson  <jas@extundo.com>
10246
10247         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
10248         arcfour_context struct (simplify test vector testing in GNU
10249         Shishi).
10250
10251 2005-10-21  Simon Josefsson  <jas@extundo.com>
10252
10253         * modules/des, modules/des-tests: New files.
10254
10255         * modules/gc-des, modules/gc-des-tests: New files.
10256
10257         * tests/test-des.c, tests/test-gc-des.c: New file.
10258
10259 2005-10-21  Simon Josefsson  <jas@extundo.com>
10260
10261         * modules/arctwo, modules/arctwo-tests: New files.
10262
10263         * tests/test-arctwo.c: New file.
10264
10265         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
10266
10267         * tests/test-gc-arctwo.c: New file.
10268
10269 2005-10-21  Simon Josefsson  <jas@extundo.com>
10270
10271         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
10272         Bruno Haible <bruno@clisp.org>.
10273
10274         * m4/gc-des.m4: New file.
10275
10276 2005-10-21  Simon Josefsson  <jas@extundo.com>
10277
10278         * m4/arctwo.m4: New file.
10279
10280         * m4/gc-arctwo.m4: New file.
10281
10282 2005-10-21  Simon Josefsson  <jas@extundo.com>
10283
10284         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
10285         block.
10286
10287 2005-10-21  Simon Josefsson  <jas@extundo.com>
10288
10289         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
10290         <bruno@clisp.org>.
10291
10292         * lib/hmac-sha1.c (hmac_sha1): Likewise.
10293
10294         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
10295         Bruno Haible <bruno@clisp.org>.
10296
10297         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
10298         <bruno@clisp.org>.
10299
10300 2005-10-21  Simon Josefsson  <jas@extundo.com>
10301
10302         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
10303
10304 2005-10-21  Simon Josefsson  <jas@extundo.com>
10305
10306         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
10307
10308 2005-10-21  Simon Josefsson  <jas@extundo.com>
10309
10310         * lib/des.h, lib/des.c: New files.
10311
10312         * lib/gc-gnulib.c: Support DES.c
10313
10314 2005-10-21  Simon Josefsson  <jas@extundo.com>
10315
10316         * lib/arctwo.h, lib/arctwo.c: New files.
10317
10318         * lib/gc-gnulib.c: Support ARCTWO.
10319
10320 2005-10-21  Simon Josefsson  <jas@extundo.com>
10321
10322         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
10323         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
10324
10325 2005-10-21  Simon Josefsson  <jas@extundo.com>
10326
10327         * gnulib-tool (func_import, func_create_testdir): Define automake
10328         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
10329         Makefile.am snippet),
10330         suggested by Bruno Haible <bruno@clisp.org>.
10331
10332         * modules/gc (Makefile.am): Use it.
10333
10334 2005-10-21  Bruno Haible  <bruno@clisp.org>
10335
10336         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
10337         patch.
10338
10339 2005-10-19  Simon Josefsson  <jas@extundo.com>
10340
10341         * tests/test-gc-rijndael.c: New file.
10342
10343         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
10344
10345 2005-10-19  Simon Josefsson  <jas@extundo.com>
10346
10347         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
10348         interface too.
10349
10350 2005-10-19  Simon Josefsson  <jas@extundo.com>
10351
10352         * tests/test-gc-arcfour.c: New file.
10353
10354         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
10355
10356 2005-10-19  Simon Josefsson  <jas@extundo.com>
10357
10358         * modules/gc-md4, modules/gc-md4-tests: New file.
10359
10360         * tests/test-gc-md4.c: New file.
10361
10362 2005-10-19  Simon Josefsson  <jas@extundo.com>
10363
10364         * m4/gc-md4.m4: New file.
10365
10366 2005-10-19  Simon Josefsson  <jas@extundo.com>
10367
10368         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
10369         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
10370         <kasal@ucw.cz>.
10371
10372 2005-10-19  Simon Josefsson  <jas@extundo.com>
10373
10374         * m4/gc-arcfour.m4: New file.
10375
10376         * m4/gc-rijndael.m4: New file.
10377
10378 2005-10-19  Simon Josefsson  <jas@extundo.com>
10379
10380         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
10381
10382 2005-10-19  Simon Josefsson  <jas@extundo.com>
10383
10384         * lib/gc-gnulib.c: Support ARCFOUR.
10385
10386 2005-10-19  Simon Josefsson  <jas@extundo.com>
10387
10388         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
10389         support.
10390
10391         * lib/gc.h: Add ECB enum type.
10392
10393         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
10394
10395 2005-10-18  Simon Josefsson  <jas@extundo.com>
10396
10397         * tests/test-md5.c: New file.
10398
10399         * modules/md5-tests: New file.
10400
10401 2005-10-18  Simon Josefsson  <jas@extundo.com>
10402
10403         * tests/test-md4.c: New file.
10404
10405         * modules/md4, modules/md4-tests: New files.
10406
10407 2005-10-18  Simon Josefsson  <jas@extundo.com>
10408
10409         * m4/md4.m4: New file.
10410
10411 2005-10-18  Simon Josefsson  <jas@extundo.com>
10412
10413         * lib/md4.h, lib/md4.c: New files, based on md5.?.
10414
10415 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
10416
10417         * gnulib-tool (func_create_testdir): Omit the second check whether
10418         BUILT_SOURCES in nonempty.
10419
10420 2005-10-17  Simon Josefsson  <jas@extundo.com>
10421
10422         * tests/test-rijndael.c: New file.
10423
10424 2005-10-17  Simon Josefsson  <jas@extundo.com>
10425
10426         * modules/sha1: Depend on stdint instead of md5.
10427
10428         * modules/md5: Depend on stdint, remove uint32_t.
10429
10430 2005-10-17  Simon Josefsson  <jas@extundo.com>
10431
10432         * modules/gc-sha1-tests: New file.
10433
10434         * tests/test-gc-sha1.c: New file.
10435
10436 2005-10-17  Simon Josefsson  <jas@extundo.com>
10437
10438         * m4/md5.m4: Remove call to uint32_t.m4.
10439
10440 2005-10-17  Simon Josefsson  <jas@extundo.com>
10441
10442         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
10443
10444         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
10445         md5.h.
10446
10447         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
10448
10449         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
10450
10451 2005-10-17  Simon Josefsson  <jas@extundo.com>
10452
10453         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
10454
10455 2005-10-17  Simon Josefsson  <jas@extundo.com>
10456
10457         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
10458
10459 2005-10-17  Simon Josefsson  <jas@extundo.com>
10460
10461         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
10462
10463         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
10464
10465 2005-10-17  Bruno Haible  <bruno@clisp.org>
10466
10467         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
10468         that it can also be used in a test.
10469
10470 2005-10-16  Bruno Haible  <bruno@clisp.org>
10471
10472         * gnulib-tool (func_emit_tests_Makefile_am): Also define
10473         TESTS_ENVIRONMENT, so that individual tests can augment it.
10474
10475         * gnulib-tool (func_create_testdir): Use an intermediate target for
10476         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
10477         macros, like $(ALLOCA_H), which cannot be passed through the command
10478         line.
10479
10480 2005-10-15  Simon Josefsson  <jas@extundo.com>
10481
10482         * modules/rijndael-tests: New file.
10483
10484         * modules/rijndael: New file.
10485
10486 2005-10-15  Simon Josefsson  <jas@extundo.com>
10487
10488         * m4/rijndael.m4: New file.
10489
10490 2005-10-15  Simon Josefsson  <jas@extundo.com>
10491
10492         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
10493
10494         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
10495
10496 2005-10-14  Simon Josefsson  <jas@extundo.com>
10497
10498         * tests/test-arcfour.c: New file.
10499
10500         * modules/arcfour, modules/arcfour-tests: New files.
10501
10502 2005-10-14  Simon Josefsson  <jas@extundo.com>
10503
10504         * m4/arcfour.m4: New file.
10505
10506 2005-10-14  Simon Josefsson  <jas@extundo.com>
10507
10508         * lib/arcfour.h, lib/arcfour.c: New files.
10509
10510 2005-10-14  Roland McGrath  <roland@redhat.com>
10511
10512         Import from libc.  [BZ #1331]
10513         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
10514         macro argument.
10515         Reported by Matej Vela <vela@debian.org>.
10516
10517 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10518
10519         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
10520         include <wchar.h>; no longer needed.
10521
10522 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
10523
10524         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
10525
10526 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
10527         and  Ulrich Drepper  <drepper@redhat.com>
10528
10529         Import from libc.
10530         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
10531         instead of inline stream orientation test and two separate
10532         function calls.  Pay no attention to USE_IN_LIBIO.
10533
10534 2005-10-13  Simon Josefsson  <jas@extundo.com>
10535
10536         * modules/gc-hmac-md5-tests: New file.
10537
10538         * tests/test-gc-hmac-sha1.c: New file.
10539
10540         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
10541
10542         * modules/gc-hmac-md5-tests: New file.
10543
10544         * tests/test-gc-md5.c: New file.
10545
10546         * modules/gc-md5-tests: New file.
10547
10548 2005-10-13  Simon Josefsson  <jas@extundo.com>
10549
10550         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
10551         Move memory allocation outside of loop.
10552
10553 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
10554
10555         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
10556         intermediate directory is in a read-only file system.  Problem
10557         reported by Eric Blake.
10558
10559 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
10560
10561         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
10562
10563 2005-10-12  Simon Josefsson  <jas@extundo.com>
10564
10565         * tests/test-hmac-sha1.c: New file.
10566
10567         * modules/hmac-sha1-tests: New file.
10568
10569         * modules/hmac-sha1: New file.
10570
10571 2005-10-12  Simon Josefsson  <jas@extundo.com>
10572
10573         * modules/gc-sha1: New file.
10574
10575 2005-10-12  Simon Josefsson  <jas@extundo.com>
10576
10577         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
10578
10579         * tests/test-gc-pbkdf2-sha1.c: New file.
10580
10581 2005-10-12  Simon Josefsson  <jas@extundo.com>
10582
10583         * modules/gc-md5, modules/gc-hmac-md5: New files.
10584
10585         * modules/gc (Files): Remove md5, memxor and hmac files.
10586
10587 2005-10-12  Simon Josefsson  <jas@extundo.com>
10588
10589         * m4/gc-pbkdf2-sha1.m4: New file.
10590
10591         * m4/gc-hmac-sha1.m4: New file.
10592
10593         * m4/gc-sha1: New file.
10594
10595         * m4/hmac-sha1.m4: New file.
10596
10597 2005-10-12  Simon Josefsson  <jas@extundo.com>
10598
10599         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
10600
10601         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
10602
10603 2005-10-12  Simon Josefsson  <jas@extundo.com>
10604
10605         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
10606         suggested by Bruno Haible <bruno@clisp.org>.
10607
10608 2005-10-12  Simon Josefsson  <jas@extundo.com>
10609
10610         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
10611
10612 2005-10-12  Simon Josefsson  <jas@extundo.com>
10613
10614         * lib/gc-pbkdf2-sha1.c: New file.
10615
10616         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
10617
10618 2005-10-12  Simon Josefsson  <jas@extundo.com>
10619
10620         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
10621
10622         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
10623
10624 2005-10-12  Simon Josefsson  <jas@extundo.com>
10625
10626         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
10627         GC_USE_HMAC_MD5, respectively.
10628
10629         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
10630         (gc_md5): Fix typo.
10631
10632         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
10633
10634         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
10635
10636         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
10637
10638 2005-10-12  Bruno Haible  <bruno@clisp.org>
10639
10640         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
10641         Reported by Stepan Kasal <kasal@ucw.cz>.
10642
10643 2005-10-11  Simon Josefsson  <jas@extundo.com>
10644
10645         * tests/test-crc.c: New file.
10646
10647         * modules/crc, modules/crc-tests: New files.
10648
10649 2005-10-11  Simon Josefsson  <jas@extundo.com>
10650
10651         * m4/crc.m4: New file.
10652
10653 2005-10-11  Simon Josefsson  <jas@extundo.com>
10654
10655         * lib/gc.h: Add gc_hash and gc_hash_buffer.
10656
10657         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
10658
10659         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
10660
10661 2005-10-11  Simon Josefsson  <jas@extundo.com>
10662
10663         * lib/crc.h, lib/crc.c: New files.
10664
10665         * lib/gc.h (gc_hash_buffer): Add doc.
10666
10667 2005-10-11  Bruno Haible  <bruno@clisp.org>
10668
10669         * modules/c-strcasestr: New file.
10670         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
10671
10672 2005-10-11  Bruno Haible  <bruno@clisp.org>
10673
10674         * modules/c-strcase: New file.
10675         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
10676
10677 2005-10-11  Bruno Haible  <bruno@clisp.org>
10678
10679         * lib/strcasecmp.c: Include limits.h.
10680         (strcasecmp): Avoid integer overflow on exotic platforms.
10681         * lib/strncasecmp.c: Include limits.h.
10682         (strncasecmp): Avoid integer overflow on exotic platforms.
10683         Reported by Paul Eggert.
10684
10685 2005-10-11  Bruno Haible  <bruno@clisp.org>
10686
10687         * lib/c-strcasestr.h: New file, from GNU gettext.
10688         * lib/c-strcasestr.c: New file, from GNU gettext.
10689
10690 2005-10-11  Bruno Haible  <bruno@clisp.org>
10691
10692         * lib/c-strcase.h: New file, from GNU gettext.
10693         * lib/c-strcasecmp.c: New file, from GNU gettext.
10694         * lib/c-strncasecmp.c: New file, from GNU gettext.
10695
10696 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
10697
10698         * modules/mempcpy (License): GPL -> LGPL.
10699         * modules/strchrnul (License): Likewise.
10700         * modules/sysexits (License): Likewise.
10701
10702 2005-10-08  Simon Josefsson  <jas@extundo.com>
10703
10704         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
10705
10706 2005-10-07  Simon Josefsson  <jas@extundo.com>
10707
10708         * m4/memxor.m4: Remove gl_C_RESTRICT call.
10709
10710 2005-10-06  Simon Josefsson  <jas@extundo.com>
10711
10712         * tests/test-hmac-md5.c: New file.
10713
10714         * modules/hmac-md5-tests: New file.
10715
10716         * modules/hmac-md5: New file.
10717
10718 2005-10-06  Simon Josefsson  <jas@extundo.com>
10719
10720         * m4/hmac-md5.m4: New file.
10721
10722         * m4/memxor.m4: Require gl_C_RESTRICT.
10723
10724 2005-10-06  Simon Josefsson  <jas@extundo.com>
10725
10726         * lib/memxor.c (memxor): Avoid casts and warnings.
10727
10728 2005-10-06  Simon Josefsson  <jas@extundo.com>
10729
10730         * lib/hmac-md5.c: New file.
10731
10732         * lib/hmac.h: New file.
10733
10734 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
10735
10736         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
10737         promotes to int, not unsigned int, to catch the AIX 5.3
10738         compiler bug.
10739
10740 2005-10-05  Simon Josefsson  <jas@extundo.com>
10741
10742         * modules/memxor: New file.
10743
10744         * modules/iconv (Files): Move config.rpath to havelib, it is used
10745         there.
10746
10747         * modules/havelib (Files): Add config.rpath.
10748
10749 2005-10-05  Simon Josefsson  <jas@extundo.com>
10750
10751         * m4/memxor.m4: New file.
10752
10753 2005-10-05  Simon Josefsson  <jas@extundo.com>
10754
10755         * lib/memxor.c (memxor): Fix compiler error.
10756
10757         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
10758         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
10759
10760         * lib/memxor.h, lib/memxor.c: New files.
10761
10762         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
10763         we assume all systems have it, suggested by Jim Meyering
10764         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
10765         any systems lack sys/socket.h; mingw32 is known to lack it, but we
10766         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
10767         same reasons.
10768
10769 2005-10-05  Simon Josefsson  <jas@extundo.com>
10770
10771         * config/srclist.txt: Add glibc bug 1423 for md5.h.
10772
10773 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
10774
10775         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
10776         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
10777         needed, since the source code now assumes these .h files.
10778
10779 2005-10-05  Derek Price  <derek@ximbiot.com>
10780
10781         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
10782
10783 2005-10-05  Bruno Haible  <bruno@clisp.org>
10784
10785         * modules/stdint (License): Change to LGPL.
10786
10787 2005-10-04  Simon Josefsson  <jas@extundo.com>
10788
10789         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
10790         D. Baushke" <mdb@gnu.org>.
10791
10792 2005-10-04  Bruno Haible  <bruno@clisp.org>
10793
10794         * lib/verify.h (verify_true): Provide alternative definition for C++.
10795
10796 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
10797
10798         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
10799         (SSIZE_MAX): New macro, if not already defined.
10800         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
10801         than 2 GiB.
10802
10803 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10804
10805         Sync from coreutils.
10806         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
10807         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
10808         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
10809         ULLONG_MAX doesn't work with 2.7.2.1.
10810
10811 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10812
10813         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
10814         From Ben Pfaff.
10815
10816         * modules/exclude (Depends-on): Depend on verify.
10817         * modules/strtoimax (Depends-on): Likewise.
10818         * modules/utimecmp (Depends-on): Likewise.
10819
10820 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
10821
10822         * lib/exclude.c: Include verify.h.
10823         (verify): Remove.  All callers changed to use verify.h's version.
10824         * lib/strtoimax.c: Likewise.
10825         * lib/utimecmp.c: Likewis.e
10826
10827         Sync from coreutils.
10828         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
10829         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
10830         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
10831         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
10832         bother returning ENOSYS if settimeofday or stime fails; just let
10833         them return whatever errno they want to return.
10834         * lib/utimens.c: Include unistd.h, for dup2.
10835         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
10836         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
10837
10838 2005-10-02  Jim Meyering  <jim@meyering.net>
10839
10840         Sync from coreutils.
10841         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
10842         from glibc-2.2.5 that fails for read-only files.
10843
10844 2005-10-02  Jim Meyering  <jim@meyering.net>
10845
10846         Sync from coreutils.
10847         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
10848         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
10849         `#if HAVE_CONFIG_H'.
10850         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
10851         Remove AT_FDCWD test.
10852         Do not consume the fd unless successful.
10853         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
10854         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
10855         block, so that we don't even try to compile it if settimeofday is
10856         available.  This works around a compilation failure on OSF1 V5.1,
10857         due to stime requiring a `long int*' while tv_sec is `int'.
10858
10859 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
10860
10861         Sync from coreutils.
10862         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
10863         against `yes', rather than just testing for nonempty.
10864
10865 2005-10-01  Simon Josefsson  <jas@extundo.com>
10866
10867         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
10868         and Darwin.
10869
10870         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
10871         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
10872         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
10873         freeaddrinfo and gai_strerror are declared by the POSIX headers.
10874         Check if struct addrinfo is declared.
10875
10876 2005-10-01  Simon Josefsson  <jas@extundo.com>
10877
10878         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
10879         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
10880         AI_* and EAI_* definitions.  Protect function declarations.
10881
10882 2005-10-01  Jim Meyering  <jim@meyering.net>
10883
10884         Sync from coreutils.
10885
10886         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
10887         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
10888         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
10889         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10890         in the inet and nsl libraries.  Required on Solaris 5.7.
10891
10892 2005-10-01  Jim Meyering  <jim@meyering.net>
10893
10894         Sync from coreutils.
10895         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
10896         in the inet and nsl libraries.  Required on Solaris 5.7.
10897
10898 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
10899
10900         * lib/getdelim.c (getdelim): Remove unused variables.
10901
10902 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
10903
10904         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
10905         so that the code works even with ancient cpp.  Portability problem
10906         with GCC 2.7.2.1 reported by Thomas M.Ott.
10907
10908 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
10909
10910         * modules/regex (Depends-on): Add strcase.
10911
10912         * modules/gethostname (Licence): Change from GPL to LGPL, since
10913         gethostname.c is a trivial implementation of a standard library
10914         function.
10915         * modules/poll (License): Change from GPL to LGPL, since it's
10916         derived from LGPL code.
10917
10918 2005-09-27  Jim Meyering  <jim@meyering.net>
10919
10920         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
10921         HAVE_CONFIG_H.
10922
10923         * lib/intprops.h (signed_type_or_expr__): Define.
10924         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
10925         for unsigned types.
10926
10927 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
10928
10929         * lib/verify.h (verify_expr): Remove, replacing with:
10930         (verify_true): New macro that returns true instead of void.
10931         (verify_type__): Remove.
10932         (verify): Use verify_true rather than verify_type__.
10933
10934 2005-09-26  Bruno Haible  <bruno@clisp.org>
10935
10936         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
10937         is necessary.
10938         (lib_SOURCES): Remove mbchar.c.
10939         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
10940         (Files): Add m4/mbrtowc.m4.
10941         * modules/mbiter: Likewise.
10942         * modules/mbuiter: Likewise.
10943
10944 2005-09-26  Bruno Haible  <bruno@clisp.org>
10945
10946         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
10947         compile mbchar.c if they are not both present.
10948         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
10949         * m4/mbiter.m4 (gl_MBITER): Likewise.
10950         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
10951         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
10952         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
10953
10954 2005-09-25  Jim Meyering  <jim@meyering.net>
10955
10956         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
10957         also uses socklen_t.
10958
10959 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
10960
10961         * lib/utimens.c (ENOSYS): Define if not already defined.
10962         (futimens): Support having a null PATH if the file descriptor
10963         is nonnegative.
10964
10965         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
10966         Remove.
10967         (__attribute): Define to empty unless GCC 3.1 or later.
10968         This works around a core dump on OpenBSD 3.4, which has GCC
10969         2.95.3, which dumps core when given __attribute__(()).  It also
10970         simplifies other tests, since we really don't want to bother with
10971         worrying about which ancient version of GCC supported what.
10972         Original problem reported by Yoann Vandoorselaere, with part of
10973         the fix suggested by Derek Price.
10974
10975 2005-09-24  Jim Meyering  <jim@meyering.net>
10976
10977         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
10978         so we can once again use a positive bitfield width of 1 -- now we
10979         don't have to explain why we were using a bitfield width of 2.
10980
10981 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10982
10983         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
10984         and similarly for the other external symbols.  Problem reported
10985         by James Gallager.
10986
10987         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
10988         bug reported by Jim Meyering.
10989
10990         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
10991         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
10992         not needed, since socklen is a prerequisite module.
10993
10994 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
10995
10996         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
10997         Problem reported by Eric Blake.
10998         (getaddrinfo): Initialize se so that it's not garbage.
10999         Redo internal storage allocation so that it doesn't make unportable
11000         assumptions about alignment.
11001         Fix a memory leak.
11002
11003         * lib/utimens.c (futimens): Use futimesat if available.
11004         Prefer it to futimes since it doesn't have the futimes bug.
11005
11006         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
11007         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
11008         Instead, declare a function that returns a pointer to an array,
11009         and use verify_type__ to declare the size of the array.
11010         Problem and germ of a solution reported by Bruno Haible.
11011         (verify_type__): Use 2, not 1, for bitfield size, to avoid
11012         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
11013
11014 2005-09-23  Jim Meyering  <jim@meyering.net>
11015
11016         Sync from coreutils.
11017         Correct build failure (socklen_t not defined) on at least
11018         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
11019         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
11020
11021 2005-09-23  Jim Meyering  <jim@meyering.net>
11022
11023         * modules/getaddrinfo (Depends-on): Add socklen.
11024
11025 2005-09-23  Bruno Haible  <bruno@clisp.org>
11026
11027         * tests/test-verify.c: New file.
11028
11029 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11030
11031         Sync from coreutils.
11032
11033         * modules/argmatch (Depends-on): Add verify.
11034         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
11035         unistd-safer.
11036         * modules/save-cwd (Depends-on): Likewise.
11037
11038         * modules/openat (Files): Add lib/openat-die.c.
11039         (Depends-on): Remove error, exitfail.
11040         Add dirname.
11041
11042         * modules/verify: New file.
11043         * MODULES.html.sh (Diagnostics <assert.h>): New section,
11044         with "verify" module.
11045
11046 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11047
11048         Sync from coreutils.
11049
11050         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
11051         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
11052         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
11053         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
11054         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
11055         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
11056         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
11057         Don't bother checking for string.h, stdlib.h, unistd.h.
11058         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
11059         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
11060         module's job.
11061         * m4/jm-macros.m4 (gl_MACROS): Likewise.
11062         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
11063
11064         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
11065         (gl_GETDATE): Use it.
11066
11067         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
11068
11069 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11070
11071         Sync from coreutils.
11072
11073         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
11074         stat-time.h.
11075         * lib/argmatch.h: Include verify.h
11076         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
11077         (ARGMATCH_ASSERT): Remove; unused.
11078         * lib/canonicalize.c: Assume STDC_HEADERS.
11079         * lib/exclude.c: Include "strcase.h".
11080         * lib/regex_internal.h [!defined _LIBC]: Likewise.
11081         * lib/getusershell.c: Include stdio--.h rather than stdio.h
11082         and stdio-safer.h.
11083         (getusershell): Call fopen, not fopen_safer.
11084         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
11085         Do not include unistd-safer.h.
11086         (save_cwd): Don't call fd_safer; no longer needed
11087         now that we include fcntl--.h.
11088
11089         * lib/getdate.y (relative_time): New type.
11090         (RELATIVE_TIME_0): New constant.
11091         (parser_control): Use relative_time instead of doing it ourselves.
11092         (%union): Add new relative_time rel member.
11093         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
11094         Now typeless.
11095         (relunit, relunit_snumber): Now of type rel.
11096         (zone, rel, relunit, get_date): Adjust to above changes.
11097
11098         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
11099         Do not include unistd-safer.h.
11100         (getloadavg): Don't call fd_safer; no longer needed
11101         now that we include fcntl--.h.
11102
11103         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
11104         (make_dir_parents): Treat ENOSYS like EEXIST.
11105
11106         Improve quality of diagnostics on restore_cwd failure.
11107         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
11108         (make_dir_parents): Last arg is now int * (for errno), not bool *.
11109         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
11110         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
11111         each time through the loop.  Do not diagnose restore_cwd failure;
11112         that is the caller's job (and perhaps the caller does not care).
11113
11114         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
11115         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
11116         If the file already exists but is not a directory, don't bother
11117         to try to make its parents.
11118         Close potential file descriptor leak if we can't chdir("/") (!).
11119         Don't always return true if chdir($PWD) fails; return true only
11120         if the requested action was done successfully (except for the
11121         chdir($PWD)).
11122         Don't log final directory unless we actually made it.
11123         Refactor to avoid duplicate code to fix up permissions.
11124         Don't attempt to fix up parent permissions if chdir($PWD) fails.
11125
11126         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
11127         to make it a bit faster and (I hope) clearer.
11128         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
11129         Fix bug in formats like %2N.
11130
11131         * lib/verify.h: New file.
11132
11133 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
11134
11135         Sync from coreutils.
11136         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
11137
11138 2005-09-22  Jim Meyering  <jim@meyering.net>
11139
11140         Sync from coreutils.
11141
11142         * m4/lstat.m4 (gl_FUNC_LSTAT):
11143         Use AC_LIBSOURCES to require lstat.c and lstat.h.
11144         Remove obsolete comment.
11145         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
11146         * m4/xstrtod.m4: Likewise.
11147
11148         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
11149
11150 2005-09-22  Jim Meyering  <jim@meyering.net>
11151
11152         Sync from coreutils.
11153
11154         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
11155
11156         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
11157         the .tm_year member, since otherwise gcc-4.0 would now warn about
11158         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
11159
11160         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
11161         order to avoid an unsuppressible warning from gcc on 64-bit systems.
11162
11163         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
11164         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
11165         when run in a time zone for which daylight savings time is in effect
11166         for the starting date.
11167
11168         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
11169         stop us from restricting permissions of just-created absolute-named
11170         directories.
11171         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
11172         to restore initial working directory.
11173         * lib/mkdir-p.c (make_dir_parents): New parameter:
11174         different_working_dir, to tell caller if/when we change the working
11175         directory and are unable to return to the initial one.
11176         * lib/mkdir-p.h (make_dir_parents): Update prototype.
11177         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
11178         `return false'.  This fixes a bug introduced on 2004-07-30.
11179
11180         * lib/openat.c (fdopendir): Be sure to close the supplied
11181         file descriptor before returning.  This makes our replacement
11182         implementation a little closer to Solaris's, where fdopendir
11183         ties the file descriptor to the returned DIR* pointer.
11184         * lib/openat.c (unlinkat): New function.
11185         * lib/openat.h (unlinkat): Add prototype.
11186         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
11187         (openat_restore_fail): Rename from openat_restore_die.
11188         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
11189
11190         Provide an alternative to exiting immediately upon save_cwd or
11191         restore_cwd failure.  Now, an application can arrange e.g.,
11192         to perform a longjump in that case.
11193         * lib/openat.c: Include dirname.h.
11194         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
11195         (rpl_openat, fdopendir, fstatat): Call openat_save_die
11196         and openat_restore_die rather than calling error directly.
11197         Don't include "error.h" or "exitfail.h"; they're no longer needed.
11198
11199         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
11200         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
11201         define.
11202
11203         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
11204         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
11205                             int utc, int nanoseconds);
11206         Background:
11207         date should not have to allocate a megabyte of virtual memory to
11208         handle a format argument like +%1048575T.  When implemented with
11209         strftime, it must allocate such a buffer, use strftime to fill it
11210         in, print it, then free it.
11211         With fprintftime, it simply prints everything and exits.
11212         With no need for memory allocation, that's one fewer way to fail.
11213         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
11214         optional field width, not before, so we accept %9:z, not %:9z.
11215         (my_strftime): Be sure to use L_('x') for literals.
11216
11217         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
11218         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
11219         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
11220         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
11221         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
11222         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
11223         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
11224         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
11225         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
11226         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
11227         * lib/xgethostname.c, lib/xreadlink.c:
11228         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
11229
11230         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
11231         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
11232         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
11233         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11234         and don't include <sys/file.h>).
11235
11236 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
11237
11238         Sync from coreutils.
11239
11240         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
11241         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
11242         [!LDAV_DONE]: Avoid unused variable warning.
11243
11244 2005-09-21  Bruno Haible  <bruno@clisp.org>
11245
11246         * lib/unicodeio.h (unicode_to_mb): New declaration.
11247
11248 2005-09-20  Derek Price  <derek@ximbiot.com>
11249
11250         * lib/getaddrinfo.c: Don't include <netdb.h> included from
11251         getaddrinfo.h.
11252
11253 2005-09-20  Bruno Haible  <bruno@clisp.org>
11254
11255         * gnulib-tool: Remove trailing slashes from the values specified for
11256         --source-base, --m4-base, --tests-base, --aux-dir.
11257         Suggested by Simon Josefsson <jas@extundo.com>.
11258
11259 2005-09-20  Bruno Haible  <bruno@clisp.org>
11260
11261         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
11262         func_modules_to_filelist, func_import, func_create_testdir): Make all
11263         sorting results locale-independent, so that gnulib-cache.m4 doesn't
11264         change when gnulib-tool is invoked in a different locale.
11265
11266 2005-09-19  Simon Josefsson  <jas@extundo.com>
11267
11268         * m4/socklen.m4: Fix typo.
11269
11270 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
11271
11272         Use a consistent style for including <config.h>.
11273         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
11274         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
11275         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
11276         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
11277         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
11278         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
11279         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
11280         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
11281         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
11282         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
11283         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
11284         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
11285         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
11286         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
11287         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
11288         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
11289         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
11290         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
11291         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
11292         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
11293         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
11294         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
11295         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
11296         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
11297         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
11298         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
11299         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
11300         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
11301         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
11302         lib/xstrtoumax.c, lib/yesno.c:
11303         Standardize inclusion of config.h.
11304         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
11305         lib/inttostr.h:  Removed inclusion of config.h from header files.
11306         * lib/inttostr.c:  Adjusted in-tree users.
11307         * lib/timespec.h: Remove superfluous warning to include config.h.
11308         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
11309         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
11310         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
11311         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
11312         config.h with HAVE_CONFIG_H.
11313
11314 2005-09-19  Jim Meyering  <jim@meyering.net>
11315
11316         * modules/pathmax (License): Change to LGPL.
11317
11318 2005-09-19  Derek Price  <derek@ximbiot.com>
11319
11320         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
11321
11322 2005-09-19  Bruno Haible  <bruno@clisp.org>
11323
11324         * gnulib-tool (import): Provide default for --tests-base.
11325
11326 2005-09-19  Bruno Haible  <bruno@clisp.org>
11327
11328         * doc/quote.texi: New file, extracted from gnulib.texi.
11329         * doc/ctime.texi: New file, extracted from gnulib.texi.
11330         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
11331         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
11332         * doc/gnulib.texi: Include them.
11333
11334 2005-09-18  Bruno Haible  <bruno@clisp.org>
11335
11336         Portability fix.
11337         * gnulib-tool (func_readlink): New function.
11338         (func_ln_if_changed): Use it.
11339
11340 2005-09-18  Bruno Haible  <bruno@clisp.org>
11341
11342         * gnulib-tool: Support --with-tests also with --import.
11343         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
11344         (func_import): Use variables $testsbase and $inctests. Emit a
11345         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
11346         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
11347         SUBDIRS += $testsdir.
11348         (func_create_testdir): Update.
11349
11350 2005-09-18  Bruno Haible  <bruno@clisp.org>
11351
11352         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
11353         instead of $dry_run.
11354         (func_cp_if_changed, func_mv_if_changed): Remove functions.
11355         (func_ln_if_changed): Don't handle dry-run here.
11356         (func_import): In dry-run mode, detect more precisely which actions
11357         would be performed, and don't use "...ing" verbs.
11358
11359 2005-09-18  Bruno Haible  <bruno@clisp.org>
11360
11361         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
11362         (func_import): Use join on two temporary files instead of three nested
11363         loops, in order to determine which files are new or old.
11364
11365 2005-09-18  Bruno Haible  <bruno@clisp.org>
11366
11367         * gnulib-tool (func_import): Comment out code that spits out the
11368         new files with --dry-run.
11369
11370 2005-09-18  Bruno Haible  <bruno@clisp.org>
11371
11372         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
11373
11374 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11375
11376         * lib/stat-time.h: New file.
11377         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
11378         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
11379         in a different way.
11380         (timespec_cmp): New function.
11381         * lib/utimecmp.c: Include stat-time.h.
11382         (SYSCALL_RESOLUTION): Depend on whether various struct stat
11383         members exist, not on the obsolescent ST_MTIM_NSEC.
11384         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
11385
11386 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11387
11388         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
11389
11390 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
11391
11392         * MODULES.html.sh (File system functions): Add stat-time.
11393         * modules/stat-time: New file.
11394         * modules/timespec (Files): Remove m4/st_mtim.m4; this
11395         is now done in a different way, by the stat-time module.
11396         * modules/utimecmp (Depends-on): Add stat-time.
11397
11398 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
11399
11400         * m4/st_mtim.m4: Remove.  Superseded by...
11401         * m4/stat-time.m4: New file.
11402         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
11403         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
11404
11405 2005-09-15  Derek Price  <derek@ximbiot.com>
11406
11407         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
11408
11409 2005-09-15  Derek Price  <derek@ximbiot.com>
11410
11411         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
11412         * lib/regex_internal.c: Ditto, using this...
11413         (__GNUC_PREREQ): ...new macro.
11414         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
11415         using...
11416         (__GNUC_PREREQ): ...this new macro.
11417
11418         * lib/strstr.h: Include string.h. Define strstr as a macro here.
11419
11420 2005-09-15  Derek Price  <derek@ximbiot.com>
11421             Paul Eggert  <eggert@cs.ucla.edu>
11422
11423         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
11424         changes, consolidating in...
11425         * lib/regex_internal.h: ...this file.
11426
11427 2005-09-13  Jim Meyering  <jim@meyering.net>
11428
11429         * lib/canon-host.c: Filter through gnu indent and reword comments
11430         slightly.
11431         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
11432
11433 2005-09-13  Derek Price  <derek@ximbiot.com>
11434
11435         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
11436         failure.
11437         Reported by Jim Meyering  <jim@meyering.net>.
11438
11439 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
11440
11441         * lib/base64.c: Typo.
11442         (base64_encode): Put b64str in initialized data section.
11443
11444 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
11445
11446         Merge glibc and coreutils changes into gnulib, plus a few
11447         extra fixes.
11448         * lib/md5.c: Use #error rather than a string.
11449         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
11450         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
11451         (__attribute__): Define to empty for non recent-GCC.
11452         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
11453         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
11454         Renamed from their non-__ counterparts, with new macros replacing
11455         them if not _LIBC.  Add __THROW attribute.
11456         (rol): Remove.
11457         (struct md5_ctx): Align buffer if using GCC.
11458         * lib/sha1.h (struct sha1_ctx): Likewise.
11459         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
11460         The old name was backwards.
11461         (NOTSWAP): Remove; not used.
11462         (rol): New macro, moved here from md5.h.
11463         (sha1_process_block): Remove a FIXME that doesn't make sense.
11464
11465 2005-09-12  Derek Price  <derek@ximbiot.com>
11466
11467         Return usable errors from canon-host.
11468         * lib/canon-host.h: New file.
11469         * lib/canon-host.c (canon_host): Wrap...
11470         (canon_host_r): ...this new function, which now relies exclusively on
11471         getaddrinfo.
11472         (ch_strerror): New function.
11473         (last_cherror): New global.
11474         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
11475         interface.
11476         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
11477         void *.
11478         (freeaddrinfo): Free ai->ai_canonname when set.
11479
11480 2005-09-12  Derek Price  <derek@ximbiot.com>
11481
11482         Make canon-host require getaddrinfo.
11483         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
11484         AC_LIBSOURCE canon-host.h.  Call...
11485         (gl_PREREQ_CANON_HOST): ...this new function, which requires
11486         gl_GETADDRINFO.
11487         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
11488
11489 2005-09-12  Derek Price  <derek@ximbiot.com>
11490
11491         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
11492         LGPL.
11493         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
11494
11495 2005-09-12  Derek Price  <derek@ximbiot.com>
11496
11497         * lib/gai_strerror.c: Include config.h when available.  Include
11498         getaddrinfo.h before other headers to test interface.
11499         Reported by Larry Jones <lawrence.jones@ugs.com>.
11500
11501 2005-09-12  Derek Price  <derek@ximbiot.com>
11502             Paul Eggert  <eggert@cs.ucla.edu>
11503
11504         * modules/glob (Files): Add glob-libc.h.
11505
11506 2005-09-12  Derek Price  <derek@ximbiot.com>
11507             Paul Eggert  <eggert@cs.ucla.edu>
11508
11509         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
11510         glob_.h, glob-libc.h.
11511         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
11512
11513 2005-09-12  Derek Price  <derek@ximbiot.com>
11514             Paul Eggert  <eggert@cs.ucla.edu>
11515
11516         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
11517         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
11518         protecting things that should be done only in gnulib contexts.
11519         * lib/glob_.h: New file, containing only the glob things needed for
11520         gnulib.
11521         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
11522         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
11523         (glob, globfree, glob_pattern_p): Now defined simply in terms of
11524         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
11525         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
11526         and to respect the namespace rules better.
11527
11528 2005-09-08  Simon Josefsson  <jas@extundo.com>
11529
11530         * modules/socklen: New file.
11531
11532 2005-09-08  Simon Josefsson  <jas@extundo.com>
11533
11534         * m4/socklen.m4: New file.
11535
11536 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11537
11538         * modules/utimens (Files): Add m4/utimbuf.m4, since
11539         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
11540         Reported by Sergey Poznyakoff.
11541
11542 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11543
11544         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
11545         definitions, since that's the preferred style in glibc.
11546         Fix a minor spacing issue, and update copyright notice to match
11547         glibc's.
11548
11549 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
11550
11551         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
11552
11553 2005-09-06  Simon Josefsson  <jas@extundo.com>
11554
11555         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
11556         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
11557
11558 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11559
11560         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
11561         warning.
11562
11563 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
11564
11565         * config/srclist.txt: Add glibc bug 1302.
11566
11567 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
11568
11569         Change bitset word type from unsigned int to unsigned long int,
11570         as this has better performance on typical 64-bit hosts.
11571         Port bitset code to hosts with unusual word sizes.
11572         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
11573         (build_collating_symbol):
11574         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
11575         argument is a bitset.  This is merely a style issue, but it makes
11576         it clearer that an entire array is expected.
11577         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
11578         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
11579         Port to the case where bitset_word is not the same as unsigned int.
11580         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11581         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
11582         Likewise.
11583         * lib/regexec.c (check_dst_limits_calc_pos_1,
11584         check_subexp_matching_top):
11585         (build_trtable, group_nodes_into_DFAstates):
11586         Likewise.
11587         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
11588         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
11589         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
11590         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
11591         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
11592         * lib/regcomp.c (optimize_subexps, lower_subexp):
11593         Work even if bitset_word has holes in its bitwise representation.
11594         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
11595         * lib/regexec.c (check_dst_limits_calc_pos_1,
11596         check_subexp_matching_top):
11597         Likewise.
11598         * lib/regex_internal.c (re_string_reconstruct):
11599         Don't assume UCHAR_MAX == 255.
11600         * lib/regex_internal.h (bitset_set_all): Likewise.
11601         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
11602         All uses changed.
11603         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
11604         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
11605         All uses changed.
11606         (BITSET_WORD_MAX): New macro.
11607         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
11608         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
11609         (bitset_empty, bitset_copy):
11610         Prefer sizeof (bitset) to multiplying it out ourselves.
11611         (bitset_not_merge): Remove; unused.
11612         (bitset_contain): Return bool, not unsigned int with one bit on.
11613         All callers changed.
11614         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
11615         alignment than re_node_set; do this by defining a new internal
11616         type struct dests_alloc and using it to allocate memory.
11617
11618 2005-09-05  Bruno Haible  <bruno@clisp.org>
11619
11620         * gnulib-tool (func_import): Fix comparison in handling of symbolic
11621         links.
11622
11623 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
11624
11625         * modules/size_max (Makefile.am): Add size_max.h
11626
11627 2005-09-04  Derek Price  <derek@ximbiot.com>
11628
11629         * gnulib-tool (func_import): Fix reversed $symbolic logic.
11630
11631 2005-09-03  Simon Josefsson  <jas@extundo.com>
11632
11633         * gnulib-tool: Fix typo.
11634
11635 2005-09-03  Simon Josefsson  <jas@extundo.com>
11636
11637         * config/srclist.txt: Add glibc bug 1293.
11638
11639 2005-09-03  Derek Price  <derek@ximbiot.com>
11640
11641         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
11642         From Larry Jones <lawrence.jones@ugs.com>.
11643
11644 2005-09-02  Simon Josefsson  <jas@extundo.com>
11645
11646         * modules/socklen: New file.
11647
11648 2005-09-02  Simon Josefsson  <jas@extundo.com>
11649
11650         * modules/havelib: New module.
11651
11652         * modules/gettext, modules/iconv, modules/lock, modules/readline:
11653         Use havelib.
11654
11655 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11656
11657         Check for arithmetic overflow when calculating sizes, to prevent
11658         some buffer-overflow issues.  These patches are conservative, in the
11659         sense that when I couldn't determine whether an overflow was possible,
11660         I inserted a run-time check.
11661         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
11662         macros.
11663         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
11664         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
11665         (re_xnrealloc, re_x2nrealloc): New inline functions.
11666         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
11667         parse_bracket_exp):
11668         (build_equiv_class, build_charclass): Check for arithmetic overflow
11669         in size expression calculations.
11670         * lib/regex_internal.c (re_string_realloc_buffers):
11671         (build_wcs_upper_buffer, re_node_set_add_intersect):
11672         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
11673         (re_dfa_add_node, register_state): Likewise.
11674         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
11675         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
11676         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
11677         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
11678
11679 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
11680
11681         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
11682         m4/ulonglong.m4.  Problem reported by Martin Lambers.
11683
11684 2005-09-02  Bruno Haible  <bruno@clisp.org>
11685
11686         Support for lib vs. lib64 distinction on biarch platforms.
11687         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
11688         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
11689         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
11690
11691 2005-09-02  Bruno Haible  <bruno@clisp.org>
11692
11693         * gnulib-tool (import): In the other first-use case, provide defaults
11694         as well.
11695
11696 2005-09-02  Bruno Haible  <bruno@clisp.org>
11697
11698         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
11699         patches not yet found in the latest gettext release.
11700
11701 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11702
11703         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
11704         to avoid a collision with bits/local_lim.h in glibc.
11705         All uses changed.  Problem reported by Dmitry V. Levin in
11706         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
11707
11708         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
11709         bugs in int versus size_t comparisons.
11710         (re_string_context_at): Fix bug where the code assumed that
11711         Idx is signed.
11712
11713         Use bool where appropriate.
11714         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
11715         All callers changed.
11716         (calc_eclosure_iter): Likewise, for ROOT arg.
11717         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
11718         (build_charclass_op): Likewise, for NON_MATCH arg.
11719         * lib/regex_internal.c (re_string_allocate, re_string_construct):
11720         (re_string_construct_common): Likewise, for ICASE arg.
11721         * lib/regexec.c (re_search_2_stub, re_search_stub):
11722         Likewise, for RET_LEN arg.
11723         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
11724         (set_regs): Likewise, for FL_BACKTRACK arg.
11725         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
11726         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
11727         (calc_eclosure_iter, parse_bracket_exp):
11728         Use bool for internal variables that are booleans.
11729         * lib/regexec.c (re_search_internal, check_matching,
11730         proceed_next_node):
11731         (set_regs, build_sifted_states, sift_states_bkref):
11732         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
11733         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
11734         (find_collation_sequence_value):
11735         Likewise.
11736         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
11737         (re_node_set_compare):
11738         Return bool, not int. All callers changed.
11739         * lib/regexec.c (check_halt_node_context, check_dst_limits):
11740         (build_trtable, check_node_accept): Likewise.
11741         * lib/regex_internal.h: Include stdbool.h.
11742
11743         Fix bugs uncovered when converting to bool.
11744         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
11745         failure instead of charging ahead blindly.
11746         * lib/regex_internal.c (register_state): Likewise.
11747         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
11748         for freeing internal storage.
11749         (group_nodes_into_DFA_states): Use unsigned int, not int, for
11750         bitset pieces used as boolean, to avoid undefined behavior
11751         on hosts that do int overflow checking.
11752
11753 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
11754
11755         * config/srclist.txt: Add glibc bugs 1285-1287.
11756
11757 2005-09-01  Jim Meyering  <jim@meyering.net>
11758
11759         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
11760         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
11761         Require gl_STAT_MACROS, too.
11762
11763 2005-09-01  Bruno Haible  <bruno@clisp.org>
11764
11765         * gnulib-tool (import): In the first-use case, provide defaults.
11766
11767 2005-09-01  Bruno Haible  <bruno@clisp.org>
11768
11769         * gnulib-tool (func_import): Remove the .tmp files.
11770
11771 2005-09-01  Bruno Haible  <bruno@clisp.org>
11772
11773         * gnulib-tool (func_import): Fix handling of symbolic links.
11774
11775 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11776
11777         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
11778         old glibc regex code mishandles strings longer than 2**31 bytes.
11779         This patch fixes this when the regex code is used in gnulib
11780         (i.e., outside glibc).
11781
11782         This patch should not affect the use of the regex code inside
11783         glibc.  No doubt this problem also needs to be handled for glibc
11784         as well, but the result will be an incompatible change to the
11785         glibc ABI, and the old ABI will have to be supported too.  That
11786         can be the the subject for another patch.
11787
11788         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
11789         governing whether the rest of this patch is active.  By default,
11790         the macro is disabled and the patch has no effect.
11791         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
11792         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
11793         (struct re_pattern_buffer, re_search, re_search_2, re_match):
11794         (re_match_2, re_set_registers): Use the new types.
11795         * lib/regex_internal.h (Idx, re_hashval_t): New types.
11796         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
11797         New macros.
11798         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
11799         (re_string_context_at, bin_tree_t, re_dfastate_t):
11800         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
11801         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
11802         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
11803         (re_string_char_size_at, re_string_wchar_at):
11804         (re_string_elem_size_at):
11805         Use the new types and macros to port to 64-bit hosts.
11806         Use unsigned types for internal values, so that the code
11807         mostly works even for arrays larger than SSIZE_MAX.
11808         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
11809         (search_duplicated_node, calc_eclosure_iter, fetch_number):
11810         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
11811         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
11812         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
11813         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
11814         (calc_inveclosure, parse_dup_op, build_range_exp):
11815         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
11816         (fetch_number, create_token_tree, mark_opt_subexp):
11817         Likewise.
11818         * lib/regex_internal.c (re_string_construct_common,
11819         create_ci_newstate):
11820         (create_cd_newstate, re_string_allocate, re_string_construct):
11821         (re_string_realloc_buffers, build_wcs_upper_buffer):
11822         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
11823         (re_string_reconstruct, re_string_peek_byte_case):
11824         (re_string_fetch_byte_case, re_string_context_at):
11825         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
11826         (re_node_set_init_copy, re_node_set_add_intersect):
11827         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
11828         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
11829         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
11830         (re_acquire_state, re_acquire_state_context, register_state):
11831         Likewise.
11832         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
11833         search_cur_bkref_entry):
11834         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
11835         (re_search_internal, re_search_2_stub, re_search_stub)
11836         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
11837         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
11838         (update_cur_sifted_state, check_dst_limits):
11839         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11840         (check_subexp_limits, sift_states_bkref, merge_state_array):
11841         (check_subexp_matching_top, get_subexp, get_subexp_sub):
11842         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
11843         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
11844         (expand_bkref_cache, check_node_accept_bytes):
11845         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
11846         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
11847         (acquire_init_state_context, check_halt_node_context):
11848         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
11849         (sift_states_backward, clean_state_log_if_needed):
11850         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
11851         (find_recover_state, transit_state_sb, transit_state_mb):
11852         (transit_state_bkref, build_trtable, match_ctx_clean):
11853         Likewise.
11854         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
11855         to work around an assumption that REG_MISSING is negative.
11856
11857         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
11858         (seek_collating_symbol_entry) [defined _LIBC]:
11859         (lookup_collation_sequence_value) [defined _LIBC]:
11860         (build_range_exp, build_collating_symbol) [defined _LIBC]:
11861         Use prototypes rather than old-style function definitions.
11862         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
11863         (transit_state_sb) [0]:
11864         (find_collation_sequence_value) [defined _LIBC]: Likewise.
11865
11866         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
11867         rm_eo.
11868
11869         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
11870         (optimize_subexps, lower_subexp):
11871         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
11872         since the signed shift might overflow.  Use 1u<<31 instead.
11873         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
11874         Likewise.
11875         * lib/regexec.c (check_dst_limits_calc_pos_1,
11876         check_subexp_matching_top): Likewise.
11877
11878         * lib/regcomp.c (optimize_subexps, lower_subexp):
11879         Use CHAR_BIT rather than 8, for clarity.
11880         * lib/regexec.c (check_dst_limits_calc_pos_1):
11881         (check_subexp_matching_top): Likewise.
11882         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
11883         have to worry about portability issues when shifting it left.
11884         Remove no-longer-needed test for table_size > 0.
11885         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
11886         in a word, as the resulting behavior is undefined.
11887         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
11888         in one case, a <= should have been an <, and in another case the
11889         whole test was missing.
11890         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
11891         the standard name CHAR_BIT.
11892         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
11893         this is not true on one's complement and signed-magnitude hosts.
11894
11895         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
11896         next_last_offset.
11897         (struct re_dfa_t): Remove unused member states_alloc.
11898         * lib/regcomp.c (init_dfa): Don't initialize unused members.
11899
11900 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11901
11902         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
11903         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
11904         and large-file glibc and in 32-bit large-file Solaris.
11905
11906 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11907
11908         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
11909         lengths fit in regoff_t; this isn't true if regoff_t is the same
11910         width as size_t.
11911         * lib/regex.c (re_search_internal): 5th arg is LAST_START
11912         (= START + RANGE) instead of RANGE.  This avoids overflow
11913         problems when regoff_t is the same width as size_t.
11914         All callers changed.
11915         (re_search_2_stub): Check for overflow when adding the
11916         sizes of the two strings.
11917         (re_search_stub): Check for overflow when adding START
11918         to RANGE; if it occurs, substitute the extreme value.
11919
11920 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
11921
11922         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
11923
11924 2005-08-31  Jim Meyering  <jim@meyering.net>
11925
11926         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
11927         a pointer-to-const.
11928         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
11929         (register_state): Likewise.
11930         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
11931         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
11932         (group_nodes_into_DFAstates): Likewise.
11933
11934 2005-08-31  Jim Meyering  <jim@meyering.net>
11935
11936         * check-module: Add a FIXME comment.
11937
11938 2005-08-31  Eric Blake  <ebb9@byu.net>
11939
11940         * modules/unistd-safer (Files): Add unistd--.h.
11941         * modules/stdio-safer (Files): Add stdio--.h.
11942
11943 2005-08-31  Derek Price  <derek@ximbiot.com>
11944
11945         * lib/getdelim.c (getdelim): Return EOF on EOF.
11946         Reported by Larry Jones <lawrence.jones@ugs.com>.
11947
11948 2005-08-31  Bruno Haible  <bruno@clisp.org>
11949
11950         Avoid unnecessary diffs in the generated lib/Makefile.am.
11951         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
11952         the generated files.
11953         (func_import): Don't set cmd.
11954
11955 2005-08-31  Bruno Haible  <bruno@clisp.org>
11956
11957         * lib/strstr.c: Include <stddef.h>, for NULL.
11958         * lib/strcasestr.c: Likewise.
11959         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11960
11961 2005-08-31  Bruno Haible  <bruno@clisp.org>
11962
11963         * gnulib-tool: New option --macro-prefix.
11964         (func_import): Use macro_prefix.
11965         (import): Handle option --macro-prefix.
11966
11967 2005-08-31  Bruno Haible  <bruno@clisp.org>
11968
11969         * gnulib-tool (import): Rename most ac_* variables to cached_*.
11970         Also use new variables cached_lgpl, cached_libtool.
11971
11972 2005-08-31  Bruno Haible  <bruno@clisp.org>
11973
11974         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
11975         always instantiating them.
11976
11977 2005-08-31  Bruno Haible  <bruno@clisp.org>
11978
11979         * gnulib-tool (func_import): Read the previous cached settings
11980         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
11981         earlier added by gnulib but are now dropped. Warn when a gnulib file
11982         overwrites a non-gnulib file.
11983
11984 2005-08-31  Bruno Haible  <bruno@clisp.org>
11985
11986         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
11987         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
11988         projects that don't keep autogenerated files in CVS. Put into
11989         actioncmd only the specified modules, not the transitive closure.
11990
11991 2005-08-31  Bruno Haible  <bruno@clisp.org>
11992
11993         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
11994         Create directories that shall be filled.
11995         (import): Don't look for gl_* macros in configure.ac. Recurse across
11996         all directories containing a gnulib-cache.m4 files, if meaningful.
11997
11998 2005-08-31  Bruno Haible  <bruno@clisp.org>
11999
12000         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
12001         (import): Set seen_libtool when we see gl_LIBTOOL.
12002
12003 2005-08-31  Bruno Haible  <bruno@clisp.org>
12004
12005         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
12006         declaration macro definitions from generated gnulib.m4.
12007
12008 2005-08-30  Oskar Liljeblad  <oskar@osk.mine.nu>
12009
12010         * lib/iconvme.h: Add prototype for iconv_alloc.
12011
12012 2005-08-29  Simon Josefsson  <jas@extundo.com>
12013
12014         * lib/iconvme.c: Fix errno.
12015
12016 2005-08-29  Bruno Haible  <bruno@clisp.org>
12017
12018         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
12019         that it works when the directory contains spaces.
12020
12021 2005-08-29  Bruno Haible  <bruno@clisp.org>
12022
12023         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
12024
12025 2005-08-29  Bruno Haible  <bruno@clisp.org>
12026
12027         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
12028         Emit more advice.
12029
12030 2005-08-29  Bruno Haible  <bruno@clisp.org>
12031         and Stepan Kasal  <kasal@ucw.cz>
12032
12033         * check-module: If more parameters are given, check each of them
12034         separately; add more exceptions, as noted by Jim Meyering.
12035         (check_module): New procedure.
12036         (%exempt_header): Now contains all exceptions.
12037
12038 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
12039
12040         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
12041
12042 2005-08-29  Oskar Liljeblad  <oskar@osk.mine.nu>
12043
12044         * lib/iconvme.c: Split iconv_string into iconv_alloc.
12045
12046 2005-08-28  Bruno Haible  <bruno@clisp.org>
12047
12048         * m4/gnulib-tool.m4: New file.
12049
12050 2005-08-27  Jim Meyering  <jim@meyering.net>
12051
12052         * modules/unistd-safer (Files): Add pipe-safer.c.
12053         * modules/fcntl-safer (Files): Add creat-safer.c.
12054
12055 2005-08-27  Jim Meyering  <jim@meyering.net>
12056
12057         * m4/stdlib-safer.m4: New file.  From coreutils.
12058         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
12059         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
12060         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
12061         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
12062         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
12063
12064 2005-08-27  Jim Meyering  <jim@meyering.net>
12065
12066         * lib/fopen-safer.c: Merge minor changes from coreutils.
12067         * lib/dup-safer.c: Likewise.
12068         * lib/fd-safer.c: Likewise.
12069
12070         Merge from coreutils.
12071         * lib/stdio--.h: New file.
12072         * lib/stdlib--.h: New file.
12073         * lib/mkstemp-safer.c: New file.
12074
12075         GNU tar needs these.
12076         * lib/pipe-safer.c: New file.
12077         * lib/creat-safer.c: New file.
12078         * lib/fcntl--.h (creat): Define to creat_safer.
12079         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
12080         * lib/unistd--.h (pipe): Define to pipe_safer.
12081         * lib/unistd-safer.h: Declare pipe_safer.
12082
12083 2005-08-26  Simon Josefsson  <jas@extundo.com>
12084
12085         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
12086         Haible <bruno@clisp.org>.
12087
12088 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
12089
12090         * lib/regex_internal.h: Remove all references to
12091         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
12092         or better.
12093         (bitset_not, bitset_merge, bitset_not_merge):
12094         (bitset_mask, re_string_allocate, re_string_construct):
12095         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
12096         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
12097         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
12098         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
12099         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12100         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12101         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
12102         (re_acquire_state_context):
12103         Remove unnecessary forward decls.
12104         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
12105         Put __attribute at function definition,
12106         now that the function decl has been removed.
12107         * lib/regex_internal.c (re_string_peek_byte_case):
12108         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
12109         Likewise.
12110
12111 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
12112
12113         * m4/regex.m4: Add AC_PREREQ(2.50).
12114         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
12115
12116 2005-08-25  Simon Josefsson  <jas@extundo.com>
12117
12118         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
12119         __fsetlocking.
12120
12121 2005-08-25  Simon Josefsson  <jas@extundo.com>
12122
12123         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
12124         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
12125         GLIBC specific code.
12126
12127 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12128
12129         Make regex safe for g++.  This fixes one real bug (an "err"
12130         that should have been "*err").  g++ problem reported by
12131         Sam Steingold.
12132         * lib/regex_internal.h (re_calloc): New macro, consistent with
12133         re_malloc etc.  All callers of calloc changed to use re_calloc.
12134         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
12135         not int.  All callers changed.
12136         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
12137         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
12138         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
12139         (find_recover_state): Change "err" to "*err"; this fixes what
12140         appears to be a real bug.
12141         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
12142         versus int.
12143
12144 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12145
12146         * modules/regex (Depends-on): Add malloc, since the code
12147         assumes that !malloc(0) means failure.
12148
12149 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12150
12151         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
12152
12153         alloca modernization/simplification for regex.
12154         * lib/regex.c: Remove portability cruft for alloca.  This no longer
12155         needs to be at the start of the file, and can be moved into
12156         regex_internal.h and simplified.
12157         * lib/regex_internal.h: Include <alloca.h>.
12158         (__libc_use_alloca) [!defined _LIBC]: New macro.
12159         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
12160         now works outside glibc.
12161
12162 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
12163
12164         * config/srclist.txt: Add glibc bugs 1241, 1245.
12165
12166 2005-08-25  Jim Meyering  <jim@meyering.net>
12167
12168         * lib/open-safer.c: Include <config.h>.
12169         Otherwise, we'd lose LARGEFILE support in any file using
12170         e.g. "fcntl--.h"
12171
12172 2005-08-25  Bruno Haible  <bruno@clisp.org>
12173
12174         * m4/minmax.m4: Require autoconf 2.52.
12175         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
12176         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
12177         alternatives of translit over the alphabet.
12178         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
12179
12180 2005-08-24  Simon Josefsson  <jas@extundo.com>
12181
12182         * tests/test-getpass.c: New file.
12183
12184 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12185
12186         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
12187         for GNU regex features.
12188
12189 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12190
12191         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
12192         * lib/regex.h (regerror): Likewise.
12193
12194         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
12195         requires this.  (The code never needed it.)
12196
12197         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
12198         All uses of recently-renamed identifiers changed to use the new,
12199         POSIX-compliant names.  The code will build and run just fine
12200         without these changes, but it's better to eat our own dog food
12201         and use the standard-conforming names.
12202
12203         * lib/regex.h: Fix a multitude of POSIX name space violations.
12204         These changes have an effect only for programs that define
12205         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
12206         do not change anything for programs compiled in the normal way.
12207         Also, there is no effect on the ABI.
12208
12209         (_REGEX_SOURCE): New macro.
12210         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
12211         defined and _GNU_SOURCE is not; this fixes a name space violation.
12212
12213         Rename the following macros to obey POSIX requirements.
12214         The old names are still visible as macros if _REGEX_SOURCE is defined.
12215         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
12216         RE_BACKSLASH_ESCAPE_IN_LISTS.
12217         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
12218         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
12219         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
12220         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
12221         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
12222         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
12223         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
12224         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
12225         (REG_INTERVALS): renamed from RE_INTERVALS.
12226         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
12227         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
12228         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
12229         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
12230         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
12231         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
12232         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
12233         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
12234         RE_UNMATCHED_RIGHT_PAREN_ORD.
12235         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
12236         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
12237         (REG_DEBUG): renamed from RE_DEBUG.
12238         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
12239         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
12240         unusual, since we can't clash with the POSIX REG_ICASE.
12241         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
12242         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
12243         (REG_NO_SUB): renamed from RE_NO_SUB.
12244         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
12245         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
12246         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
12247         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
12248         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
12249         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
12250         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
12251         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
12252         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
12253         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
12254         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
12255         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
12256         RE_SYNTAX_POSIX_MINIMAL_BASIC.
12257         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
12258         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
12259         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
12260         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
12261         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
12262         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
12263         (REG_FIXED): Renamed from REGS_FIXED.
12264         (REG_NREGS): Renamed from RE_NREGS.
12265
12266         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
12267         of other REG_* macros, since POSIX says the user is allowed to
12268         #undef these macros selectively.
12269
12270         (reg_errcode_t): Update comment stating what other tables need
12271         to be consistent.
12272
12273         Rename the following enum values to obey POSIX requirements.
12274         The old names are still visible as macros.
12275         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
12276         is not defined, since GNU is supposed to be a superset of POSIX as
12277         much as possible, and since we want reg_errcode_t to be a signed
12278         type for implementation consistency.
12279         (_REG_NOERROR): Renamed from REG_NOERROR.
12280         (_REG_NOMATCH): Renamed from REG_NOMATCH.
12281         (_REG_BADPAT): Renamed from REG_BADPAT.
12282         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
12283         (_REG_ECTYPE): Renamed from REG_ECTYPE.
12284         (_REG_EESCAPE): Renamed from REG_EESCAPE.
12285         (_REG_ESUBREG): Renamed from REG_ESUBREG.
12286         (_REG_EBRACK): Renamed from REG_EBRACK.
12287         (_REG_EPAREN): Renamed from REG_EPAREN.
12288         (_REG_EBRACE): Renamed from REG_EBRACE.
12289         (_REG_BADBR): Renamed from REG_BADBR.
12290         (_REG_ERANGE): Renamed from REG_ERANGE.
12291         (_REG_ESPACE): Renamed from REG_ESPACE.
12292         (_REG_BADRPT): Renamed from REG_BADRPT.
12293         (_REG_EEND): Renamed from REG_EEND.
12294         (_REG_ESIZE): Renamed from REG_ESIZE.
12295         (_REG_ERPAREN): Renamed from REG_ERPAREN.
12296         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
12297         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
12298         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
12299         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
12300
12301         (_REG_RE_NAME, _REG_RM_NAME): New macros.
12302         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
12303         changed.  But support the old name if the new one is not defined
12304         and if _REGEX_SOURCE.
12305
12306         Change the following member names in struct re_pattern_buffer.
12307         The old names are still supported if !_REGEX_SOURCE.
12308         The new names are always supported, regardless of _REGEX_SOURCE.
12309         (re_buffer): Renamed from buffer.
12310         (re_allocated): Renamed from allocated.
12311         (re_used): Renamed from used.
12312         (re_syntax): Renamed from syntax.
12313         (re_fastmap): Renamed from fastmap.
12314         (re_translate): Renamed from translate.
12315         (re_can_be_null): Renamed from can_be_null.
12316         (re_regs_allocated): Renamed from regs_allocated.
12317         (re_fastmap_accurate): Renamed from fastmap_accurate.
12318         (re_no_sub): Renamed from no_sub.
12319         (re_not_bol): Renamed from not_bol.
12320         (re_not_eol): Renamed from not_eol.
12321         (re_newline_anchor): Renamed from newline_anchor.
12322
12323         Change the following member names in struct re_registers.
12324         The old names are still supported if !_REGEX_SOURCE.
12325         The new names are always supported, regardless of _REGEX_SOURCE.
12326         (rm_num_regs): Renamed from num_regs.
12327         (rm_start): Renamed from start.
12328         (rm_end): Renamed from end.
12329
12330         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
12331         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
12332         Prepend __ to parameter names.
12333
12334         Undo yesterday's changes.
12335
12336 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
12337
12338         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
12339         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
12340         lib/regex.c.
12341
12342 2005-08-24  Jim Meyering  <jim@meyering.net>
12343
12344         Sync from coreutils.
12345         * m4/fcntl-safer.m4: New file.
12346
12347         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
12348         and object files for this module.
12349
12350 2005-08-24  Jim Meyering  <jim@meyering.net>
12351
12352         Sync from coreutils.
12353         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
12354
12355 2005-08-24  Jim Meyering  <jim@meyering.net>
12356
12357         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
12358         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
12359
12360 2005-08-24  Jim Meyering  <jim@meyering.net>
12361
12362         * modules/fcntl-safer: New module.
12363         * modules/fts (Depends-on): Add fcntl-safer.
12364         * MODULES.html.sh (File descriptor based Input/Output):
12365         Add fcntl-safer.
12366
12367 2005-08-24  Bruno Haible  <bruno@clisp.org>
12368
12369         Support for unit test modules.
12370         * modules/README: Mention tests modules.
12371         * modules/TEMPLATE-TESTS: New file.
12372         * gnulib-tool: New options --extract-tests-module, --with-tests and
12373         --tests-base (unused for the moment).
12374         (testsbase, inctests): New variables.
12375         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
12376         (func_verify_module): Exclude TEMPLATE-TESTS.
12377         (func_verify_nontests_module, func_verify_tests_module): New functions.
12378         (func_get_dependencies): Add implicit dependency for tests modules.
12379         (func_get_tests_module): New function.
12380         (func_modules_transitive_closure): When --with-tests was specified,
12381         include the unit tests as well, unless explicitly avoided.
12382         (func_emit_lib_Makefile_am): Ignore the tests modules here.
12383         (func_emit_tests_Makefile_am): New function.
12384         (func_create_testdir): When --with-tests was specified, emit a
12385         tests/ directory.
12386         * MODULES.html.sh (Future developments): Update.
12387
12388 2005-08-24  Bruno Haible  <bruno@clisp.org>
12389
12390         * modules/tls-tests: New file.
12391         * tests/test-tls.c: New file, from GNU gettext.
12392
12393 2005-08-24  Bruno Haible  <bruno@clisp.org>
12394
12395         * modules/lock-tests: New file.
12396         * tests/test-lock.c: New file, from GNU gettext.
12397
12398 2005-08-24  Bruno Haible  <bruno@clisp.org>
12399
12400         * lib/lock.h: Add multiple inclusion guard.
12401         * lib/tls.h: Add multiple inclusion guard.
12402
12403 2005-08-24  Bruno Haible  <bruno@clisp.org>
12404
12405         * gnulib-tool: Add support for the --aux-dir option to
12406         --create-testdir, --create-megatestdir, --test, --megatest.
12407         (func_create_testdir, func_create_megatestdir): Optionally emit a
12408         AC_CONFIG_AUX_DIR directive.
12409         (create-testdir, create-megatestdir, test, megatest): Provide a
12410         default value for $auxdir.
12411
12412 2005-08-24  Bruno Haible  <bruno@clisp.org>
12413
12414         * gnulib-tool (import): Use compound statement instead of subshell
12415         where possible.
12416
12417 2005-08-24  Bruno Haible  <bruno@clisp.org>
12418
12419         * gnulib-tool (import): Change --aux-dir default to "build-aux".
12420
12421 2005-08-24  Bruno Haible  <bruno@clisp.org>
12422
12423         * gnulib-tool (func_version): Update.
12424
12425 2005-08-24  Bruno Haible  <bruno@clisp.org>
12426
12427         * gnulib-tool (func_import, func_create_testdir,
12428         func_create_megatestdir): Quote all autoconf macro arguments.
12429
12430 2005-08-24  Bruno Haible  <bruno@clisp.org>
12431
12432         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
12433         option --force, because --force causes the aclocal.m4 of each
12434         subdirectory to be newer than the corresponding config.h.in.
12435
12436 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12437
12438         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
12439         All contents moved to gl_REGEX.
12440         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
12441         assume that it does.
12442
12443 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12444
12445         * lib/regex.h (REG_NOSYS)
12446         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
12447         Define, since POSIX requires it as of 2001.
12448         (_REG_ENOSYS)
12449         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
12450         New private symbol, used to keep the enum signed in all cases.
12451         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
12452         Youngman in
12453         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
12454
12455         * lib/regex_internal.c (re_string_skip_chars, register_state):
12456         (calc_state_hash):
12457         Remove forward decls; no longer needed now that we use prototypes.
12458         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
12459         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
12460         (clean_state_log_if_needed): Likewise.
12461
12462 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
12463
12464         * config/srclist.txt: Add glibc bugs 1231-1233.
12465
12466 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12467
12468         Fix problems reported by Sam Steingold in
12469         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
12470         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
12471         assumed that reg_errcode_t is a signed type, which is not
12472         necessarily true if _XOPEN_SOURCE is not defined.
12473         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
12474         since some compilers warn about it otherwise.
12475
12476 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12477
12478         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
12479         (init_word_char, create_initial_state, duplicate_node_closure):
12480         (fetch_token, peek_token_bracket, build_range_exp):
12481         (build_collating_symbol): Remove forward decls; no longer needed
12482         now that we use prototypes.
12483
12484         * lib/regcomp.c:
12485         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
12486         (re_compile_fastmap_iter, regcomp, regerror, regfree):
12487         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
12488         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
12489         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
12490         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
12491         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
12492         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
12493         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
12494         (build_range_exp, build_collating_symbol, parse_bracket_exp):
12495         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
12496         (build_charclass, build_charclass_op, fetch_number, create_tree):
12497         (create_token_tree, mark_opt_subexp, duplicate_tree):
12498         Use prototypes rather than old-style definitions.
12499
12500         * lib/regex_internal.c:
12501         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
12502         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
12503         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
12504         (re_string_reconstruct, re_string_peek_byte_case):
12505         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
12506         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
12507         (re_node_set_init_copy, re_node_set_add_intersect):
12508         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
12509         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
12510         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
12511         (re_acquire_state, re_acquire_state_context, register_state):
12512         (create_ci_newstate, create_cd_newstate, free_state):
12513         Likewise.
12514         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
12515         re_search_2):
12516         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
12517         (re_search_internal, prune_impossible_nodes):
12518         (acquire_init_state_context, check_matching, static):
12519         (check_halt_node_context, check_halt_state_context, proceed_next_node):
12520         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
12521         (update_regs, sift_states_backward, build_sifted_states):
12522         (clean_state_log_if_needed, merge_state_array):
12523         (update_cur_sifted_state, add_epsilon_src_nodes):
12524         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
12525         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
12526         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
12527         (find_recover_state, check_subexp_matching_top, transit_state_mb):
12528         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
12529         (check_arrival, check_arrival_add_next_nodes):
12530         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
12531         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
12532         (check_node_accept_bytes, check_node_accept, extend_buffers):
12533         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
12534         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
12535         (sift_ctx_init):
12536         Likewise.
12537
12538         * lib/regex_internal.h:
12539         (re_string_allocate, re_string_construct, re_string_reconstruct):
12540         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
12541         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
12542         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
12543         (re_string_context_at, re_string_peek_byte_case):
12544         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
12545         is defined, since we now use prototypes always.
12546
12547         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
12548         C89 or better.  All uses removed.
12549
12550 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
12551
12552         * config/srclist.txt: Add glibc bugs 1220-1227.
12553
12554 2005-08-20  Jim Meyering  <jim@meyering.net>
12555
12556         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
12557         of unused local, dfa.
12558
12559 2005-08-20  Bruno Haible  <bruno@clisp.org>
12560
12561         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
12562
12563 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12564
12565         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
12566         (re_node_set_insert_last, re_dfa_add_node):
12567         Rename local variables to avoid GCC shadowing warnings.
12568
12569 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12570
12571         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
12572         [defined lint]: Suppress bogus uninitialized-variable warnings.
12573
12574         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
12575         and let the caller return REG_ESPACE if out of space.  This
12576         removes an uninitialied-variable warning with GCC 4.0.1, and also
12577         avoids taking the address of a local variable.  All callers
12578         changed.
12579
12580 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
12581
12582         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
12583         $LIBCSRC/posix/regexec.c.
12584         Add glibc bug 1217 for regcomp.c.
12585
12586 2005-08-19  Jim Meyering  <jim@meyering.net>
12587
12588         * lib/regexec.c (proceed_next_node): Redo local variables to
12589         avoid GCC shadowing warnings.
12590
12591 2005-08-18  Bruno Haible  <bruno@clisp.org>
12592
12593         * lib/strstr.c (strstr): Fix return value in multibyte case.
12594         * lib/strcasestr.c (strcasestr): Likewise.
12595
12596 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
12597
12598         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
12599
12600 2005-08-17  Jim Meyering  <jim@meyering.net>
12601
12602         Make the %s format (seconds since the epoch) work for a negative
12603         number and when used with a zero-padded field width, e.g. %015s.
12604
12605         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
12606         label so that it precedes the code to set `digits'.  Otherwise,
12607         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
12608         print `00-22'.  Now, it prints `-0022', as it should.
12609
12610 2005-08-17  Bruno Haible  <bruno@clisp.org>
12611
12612         * modules/strstr (Files): Add m4/mbrtowc.m4.
12613         (Depends-on): Add mbuiter.
12614
12615 2005-08-17  Bruno Haible  <bruno@clisp.org>
12616
12617         * modules/strcasestr: New file.
12618         * MODULES.html.sh (String handling, based on ANSI C 89): Add
12619         strcasestr.
12620
12621 2005-08-17  Bruno Haible  <bruno@clisp.org>
12622
12623         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
12624
12625 2005-08-17  Bruno Haible  <bruno@clisp.org>
12626
12627         * modules/mbuiter: New file.
12628         * MODULES.html.sh (Extended multibyte and wide character utilities):
12629         Add mbuiter.
12630
12631 2005-08-17  Bruno Haible  <bruno@clisp.org>
12632
12633         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
12634         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
12635
12636 2005-08-17  Bruno Haible  <bruno@clisp.org>
12637
12638         * m4/strcasestr.m4: New file.
12639
12640 2005-08-17  Bruno Haible  <bruno@clisp.org>
12641
12642         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
12643         * lib/strstr.c: Completely rewritten, with multibyte locale support.
12644
12645 2005-08-17  Bruno Haible  <bruno@clisp.org>
12646
12647         * lib/strcasestr.h: New file.
12648         * lib/strcasestr.c: New file.
12649
12650 2005-08-17  Bruno Haible  <bruno@clisp.org>
12651
12652         * lib/strcasecmp.c: Use mbuiter.h.
12653
12654 2005-08-17  Bruno Haible  <bruno@clisp.org>
12655
12656         * lib/mbuiter.h: New file.
12657
12658 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
12659
12660         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
12661         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
12662         and gl_GETOPT are both invoked via different paths (as happens
12663         with GNU tar CVS because it uses both argp and getopt), the former
12664         wins.
12665
12666 2005-08-16  Bruno Haible  <bruno@clisp.org>
12667
12668         * modules/tls: New file.
12669         * MODULES.html.sh (Multithreading): Add tls.
12670
12671 2005-08-16  Bruno Haible  <bruno@clisp.org>
12672
12673         * modules/strnlen1: New file.
12674         * MODULES.html.sh (String handling): Add strnlen1.
12675
12676 2005-08-16  Bruno Haible  <bruno@clisp.org>
12677
12678         * modules/strcase (Files): Add m4/mbrtowc.m4.
12679         (Depends-on): Add strnlen1, mbchar.
12680
12681 2005-08-16  Bruno Haible  <bruno@clisp.org>
12682
12683         * modules/mbiter: New file.
12684         * MODULES.html.sh (Extended multibyte and wide character utilities):
12685         Add mbiter.
12686
12687 2005-08-16  Bruno Haible  <bruno@clisp.org>
12688
12689         * modules/mbfile: New file.
12690         * MODULES.html.sh (Extended multibyte and wide character utilities):
12691         Add mbfile.
12692
12693 2005-08-16  Bruno Haible  <bruno@clisp.org>
12694
12695         * modules/mbchar: New file.
12696         * MODULES.html.sh (Extended multibyte and wide character utilities):
12697         New section.
12698
12699 2005-08-16  Bruno Haible  <bruno@clisp.org>
12700
12701         * m4/tls.m4: New file, from GNU gettext.
12702
12703 2005-08-16  Bruno Haible  <bruno@clisp.org>
12704
12705         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
12706         always.
12707         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
12708
12709 2005-08-16  Bruno Haible  <bruno@clisp.org>
12710
12711         * m4/mbiter.m4: New file.
12712
12713 2005-08-16  Bruno Haible  <bruno@clisp.org>
12714
12715         * m4/mbfile.m4: New file.
12716
12717 2005-08-16  Bruno Haible  <bruno@clisp.org>
12718
12719         * m4/mbchar.m4: New file.
12720
12721 2005-08-16  Bruno Haible  <bruno@clisp.org>
12722
12723         * lib/tls.h: New file, from GNU gettext.
12724         * lib/tls.c: New file, from GNU gettext.
12725
12726 2005-08-16  Bruno Haible  <bruno@clisp.org>
12727
12728         * lib/strnlen1.h: New file.
12729         * lib/strnlen1.c: New file.
12730
12731 2005-08-16  Bruno Haible  <bruno@clisp.org>
12732
12733         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
12734         (mbi_init): Update.
12735         (mbi_avail, mbi_advance): Let the iteration end before the terminating
12736         NUL byte, not after it.
12737
12738 2005-08-16  Bruno Haible  <bruno@clisp.org>
12739
12740         * lib/strcase.h (strcasecmp): Add note in comments.
12741         * lib/strncasecmp.c: Use code from strcasecmp.c.
12742         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
12743         (strcasecmp): Work correctly in multibyte locales.
12744
12745 2005-08-16  Bruno Haible  <bruno@clisp.org>
12746
12747         * lib/mbiter.h: New file.
12748
12749 2005-08-16  Bruno Haible  <bruno@clisp.org>
12750
12751         * lib/mbfile.h: New file.
12752
12753 2005-08-16  Bruno Haible  <bruno@clisp.org>
12754
12755         * lib/mbchar.h: New file.
12756         * lib/mbchar.c: New file.
12757
12758 2005-08-16  Bruno Haible  <bruno@clisp.org>
12759
12760         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
12761         the valid ones. Makes the comparison operations transitive:
12762         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
12763         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
12764
12765 2005-08-15  Simon Josefsson  <jas@extundo.com>
12766
12767         * modules/ssize_t (License): Change to 'unlimited'.
12768
12769         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
12770
12771 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
12772
12773         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
12774         Add comments for each pending glibc patch.
12775
12776 2005-08-15  Bruno Haible  <bruno@clisp.org>
12777
12778         * lib/regex.h (__restrict_arr): Don't define to __restrict if
12779         __cplusplus is defined.
12780
12781 2005-08-14  Jim Meyering  <jim@meyering.net>
12782
12783         Sync from coreutils.
12784
12785         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
12786         Use the hash-table-based cycle-detection code not just when
12787         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
12788         Reported by James Youngman in
12789         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
12790         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
12791         FTS_TIGHT_CYCLE_CHECK.
12792         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
12793         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
12794         once again.
12795         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
12796         * lib/fts.c (fd_safer): Remove decl.
12797         Include fcntl--.h rather than unistd-safer.h
12798         (fts_safe_changedir): Don't call fd_safer; no longer needed
12799         now that we include fcntl--.h.
12800
12801 2005-08-12  Simon Josefsson  <jas@extundo.com>
12802
12803         * modules/getndelim2: Use ssize_t module.
12804         * modules/getnline: Likewise.
12805         * modules/safe-read: Likewise.
12806         * modules/xreadlink: Likewise.
12807
12808         * modules/ssize_t: New file.
12809
12810 2005-08-12  Simon Josefsson  <jas@extundo.com>
12811
12812         * m4/readline.m4: Look for termcap, curses or ncurses if required.
12813
12814 2005-08-12  Simon Josefsson  <jas@extundo.com>
12815
12816         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
12817         ssize_t.
12818
12819 2005-08-12  Simon Josefsson  <jas@extundo.com>
12820
12821         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
12822         readline, getdelim and check_version.
12823         (Support for systems lacking ISO C 99: Sizes of integer types):
12824         Add size_max.
12825
12826 2005-08-12  Bruno Haible  <bruno@clisp.org>
12827
12828         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
12829
12830 2005-08-11  Simon Josefsson  <jas@extundo.com>
12831
12832         * modules/readline: New file.
12833
12834         * modules/strnlen (Files): Add strnlen.h.
12835
12836 2005-08-11  Simon Josefsson  <jas@extundo.com>
12837
12838         * m4/readline.m4: New file.
12839
12840 2005-08-11  Simon Josefsson  <jas@extundo.com>
12841
12842         * lib/readline.h, readline.c: New file.
12843
12844 2005-08-11  Simon Josefsson  <jas@extundo.com>
12845
12846         * doc/gnulib.texi (Initial import, Finishing touches): Mention
12847         gl_AVOID.
12848
12849 2005-08-11  Bruno Haible  <bruno@clisp.org>
12850
12851         * lib/strnlen.h (strnlen): Change parameter name to match comment.
12852
12853 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
12854
12855         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
12856
12857 2005-08-10  Simon Josefsson  <jas@extundo.com>
12858
12859         * tests/test-iconvme.c: New file.
12860
12861 2005-08-10  Simon Josefsson  <jas@extundo.com>
12862
12863         * m4/strnlen.m4: New file.
12864
12865         * m4/strndup.m4: Don't check for strnlen declaration, done in
12866         strnlen.m4.
12867
12868 2005-08-10  Simon Josefsson  <jas@extundo.com>
12869
12870         * lib/strndup.c: Use strnlen.h.
12871
12872         * lib/strnlen.h: New file.
12873
12874 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
12875
12876         * README: Typos.
12877
12878 2005-08-02  Simon Josefsson  <jas@extundo.com>
12879
12880         * modules/readline: New file.
12881
12882 2005-08-02  Simon Josefsson  <jas@extundo.com>
12883
12884         * modules/getdelim: New file.
12885
12886         * modules/getline: Rewrite, don't use getndelim2.
12887
12888 2005-08-02  Simon Josefsson  <jas@extundo.com>
12889
12890         * m4/getline.m4: Separate out getdelim stuff into separate module.
12891
12892         * m4/getdelim.m4: New file.
12893
12894 2005-08-02  Simon Josefsson  <jas@extundo.com>
12895
12896         * lib/getline.h, getline.c: Rewrite.
12897
12898         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
12899
12900 2005-07-31  Bruno Haible  <bruno@clisp.org>
12901
12902         * lib/lock.h (gl_lock_initializer): New macro.
12903         (gl_lock_define_initialized): Use it.
12904         (gl_rwlock_initializer): New macro.
12905         (gl_rwlock_define_initialized): Use it.
12906         (gl_recursive_lock_initializer): New macro.
12907         (gl_recursive_lock_define_initialized): Use it.
12908
12909 2005-07-30  Karl Berry  <karl@gnu.org>
12910
12911         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
12912         Report from Ben Pfaff, regarding getopt.
12913
12914 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
12915
12916         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
12917         normal way.
12918         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
12919         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
12920         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
12921         (gl_GETOPT): Use the new macros.  Most of the implementation
12922         is moved to the new macros.  This is for programs like Emacs
12923         that don't want all the functionality of gl_GETOPT.
12924
12925 2005-07-26  Bruno Haible  <bruno@clisp.org>
12926
12927         * m4/lock.m4: Update from GNU gettext.
12928
12929 2005-07-26  Bruno Haible  <bruno@clisp.org>
12930
12931         * lib/lock.h: Update from GNU gettext.
12932         * lib/lock.c: Update from GNU gettext.
12933
12934 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
12935
12936         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
12937         obsolescent AC_TRY_RUN.  Include the default includes files, for
12938         'exit'.
12939
12940 2005-07-24  Bruno Haible  <bruno@clisp.org>
12941
12942         * modules/visibility: New file.
12943         * MODULES.html.sh (Misc): Add visibility.
12944
12945 2005-07-24  Bruno Haible  <bruno@clisp.org>
12946
12947         * m4/visibility.m4: New file.
12948
12949 2005-07-24  Bruno Haible  <bruno@clisp.org>
12950
12951         * doc/visibility.texi: New file.
12952
12953 2005-07-22  Bruno Haible  <bruno@clisp.org>
12954
12955         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
12956         $(ALLOCA_H), redundant through BUILT_SOURCES.
12957         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
12958         redundant through BUILT_SOURCES.
12959         * modules/byteswap (Makefile.am): Remove explicit dependency on
12960         $(BYTESWAP_H), redundant through BUILT_SOURCES.
12961         * modules/fnmatch (Makefile.am): Remove explicit dependency on
12962         $(FNMATCH_H), redundant through BUILT_SOURCES.
12963         * modules/getopt (Makefile.am): Remove explicit dependency on
12964         $(GETOPT_H), redundant through BUILT_SOURCES.
12965         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
12966         redundant through BUILT_SOURCES.
12967         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
12968         redundant through BUILT_SOURCES.
12969         * modules/stdbool (Makefile.am): Remove explicit dependency on
12970         $(STDBOOL_H), redundant through BUILT_SOURCES.
12971         * modules/stdint (Makefile.am): Remove explicit dependency on
12972         $(STDINT_H), redundant through BUILT_SOURCES.
12973         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
12974         Remove explicit dependency on $(SYSEXITS_H).
12975         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
12976
12977 2005-07-18  Simon Josefsson  <jas@extundo.com>
12978
12979         * lib/check-version.c (check_version): Accept identical versions too.
12980
12981 2005-07-18  Bruno Haible  <bruno@clisp.org>
12982
12983         * modules/lock: New file.
12984         * MODULES.html.sh (Multithreading): New section.
12985
12986 2005-07-18  Bruno Haible  <bruno@clisp.org>
12987
12988         * m4/lock.m4: New file, from GNU gettext.
12989
12990 2005-07-18  Bruno Haible  <bruno@clisp.org>
12991
12992         * lib/lock.h: New file, from GNU gettext.
12993         * lib/lock.c: New file, from GNU gettext.
12994
12995 2005-07-18  Bruno Haible  <bruno@clisp.org>
12996
12997         * lib/lock.h (gl_once_t): New type.
12998         (gl_once_define, gl_once): New macros.
12999         * lib/lock.c (fresh_once): New variable.
13000         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
13001         functions.
13002
13003 2005-07-16  Simon Josefsson  <jas@extundo.com>
13004
13005         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
13006         workaround, suggested by Bruno.
13007
13008 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13009
13010         * modules/xalloc (Depends-on): Add xalloc-die.
13011         * modules/xvasprintf (Depends-on): Add xalloc-die.
13012
13013 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
13014
13015         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
13016         with a minor change.
13017
13018 2005-07-15  Bruno Haible  <bruno@clisp.org>
13019
13020         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
13021         When using lib/poll.c, define poll as rpl_poll.
13022
13023 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
13024
13025         * modules/argp (Depends-on): Remove unlocked-io.
13026
13027 2005-07-14  Derek Price  <derek@ximbiot.com>
13028
13029         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
13030         for glob symlink bug.
13031
13032 2005-07-14  Bruno Haible  <bruno@clisp.org>
13033
13034         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
13035         Instead, test for *_unlocked function declarations directly.
13036
13037 2005-07-11  Simon Josefsson  <jas@extundo.com>
13038
13039         * modules/size_max: New file.
13040
13041         * modules/xsize: Depend on size_max module for size_max.m4.
13042
13043 2005-07-11  Simon Josefsson  <jas@extundo.com>
13044
13045         * lib/size_max.h: New file.
13046
13047 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
13048
13049         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
13050         copyright symbol and the year.
13051         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
13052         (version_etc_va): Use parameterized copyright notice.
13053         Reword to conform to the current GNU coding standards.
13054
13055 2005-07-11  Karl Berry  <karl@gnu.org>
13056
13057         * doc/gnulib.texi (Quoting): new node.
13058         (Initial import): more info, from Patrice.
13059
13060 2005-07-11  Bruno Haible  <bruno@clisp.org>
13061
13062         * gnulib-tool (func_usage): Document option --avoid.
13063         (Command line options): Handle --avoid.
13064         (func_acceptable): New function.
13065         (func_modules_transitive_closure): Use it.
13066
13067 2005-07-11  Bruno Haible  <bruno@clisp.org>
13068
13069         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
13070         Reported by Jim Meyering.
13071
13072 2005-07-10  Bruno Haible  <bruno@clisp.org>
13073
13074         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
13075         Needed when size_t is smaller than 'unsigned int'.
13076         Reported by Paul Eggert.
13077
13078 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13079
13080         * modules/argp (Depends-on): Add unlocked-io
13081
13082 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
13083
13084         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
13085         block of defines.
13086
13087 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
13088
13089         * config/srclist.txt: Comment out regcomp.c, since we have a porting
13090         fix now.
13091
13092 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
13093         and Paul Eggert  <eggert@cs.ucla.edu>
13094
13095         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
13096         in wint_t, not wchar_t.  Remove now-unnecessary cast.
13097
13098 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13099
13100         * modules/regex (Files): Add lib/regex_internal.c,
13101         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
13102         (Depends-on): Add extensions.
13103         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
13104
13105 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13106
13107         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
13108         pathconf.
13109         * m4/same.m4 (gl_SAME): Likewise.
13110         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
13111
13112         * m4/regex.m4: Adjust to new libc regex implementation.
13113         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
13114         all the .c and .h parts of (the new) regex.
13115         Quote the m4 stuff better.
13116         Check for RE_ICASE bug of old gnulib.
13117         Check for REG_STARTEND of recent libc.
13118         Rename local variables from jm_* to gl_*.
13119         Quote operand of "test -f".
13120         Say "recent enough" version of libc, not "version 2".
13121         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
13122         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
13123         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
13124         Remove check for btowc, isascii.
13125         Require AM_LANGINFO_CODESET.
13126
13127 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13128
13129         * lib/regex.c, regex.h: Sync from libc.
13130         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
13131         * lib/regexec.c:
13132         New files, synced from libc, except that regex_internal.h
13133         currently has a small porting fix.
13134
13135 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
13136
13137         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
13138         regex_internal.c, regexec.c.
13139         Add regex_internal.h too, but as a comment, since the libc version
13140         is currently broken in gnulib mode.
13141
13142 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
13143
13144         Support programs like Emacs that use gnulib but not gettext.
13145         * MODULES.html.sh (Internationalization functions): Add gettext-h.
13146         * modules/gettext-h: New file.
13147         * modules/gettext (Files): Remove lib/gettext.h.
13148         (Depends-on): Add gettext-h.
13149         (Makefile.am): Remove lib_SOURCES.
13150         * modules/argmatch, modules/c-stack, modules/closeout:
13151         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
13152         * modules/execute, modules/file-type, modules/getaddrinfo:
13153         * modules/getopt, modules/human, modules/javacomp:
13154         * modules/javaexec, modules/mkdir-p, modules/obstack:
13155         * modules/openat, modules/pagealign_alloc, modules/pipe:
13156         * modules/quotearg, modules/regex, modules/rpmatch:
13157         * modules/unicodeio, modules/userspec, modules/version-etc:
13158         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
13159         * modules/xsetenv:
13160         Depend on gettext-h, not gettext.
13161
13162 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
13163
13164         * gnulib-tool (func_import): Add support for 'public domain' license.
13165         * modules/alloca, modules/atexit, modules/memmove:
13166         Now public domain, not GPL.
13167         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
13168         * modules/realloc, modules/strerror, modules/strtod:
13169         Now LGPL, not GPL.
13170
13171 2005-07-05  Bruno Haible  <bruno@clisp.org>
13172
13173         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
13174         autoconf CVS. Needed for mingw.
13175
13176 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13177
13178         Remove the dependency of the strftime module on the tzset module.
13179         * modules/strftime (Depends-on): Remove dependency on tzset.
13180
13181 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13182
13183         Remove the dependency of the strftime module on the tzset module.
13184         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
13185         gl_FUNC_TZSET_CLOBBER.
13186
13187 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
13188
13189         Remove the dependency of the strftime module on the tzset module.
13190         * lib/strftime.c (my_strftime)
13191         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
13192         Copy the input structure, to work around some of the bug with
13193         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
13194         Solaris releases, you should also use the tzset module, but we won't
13195         require it as a dependency any more since we don't want LGPLed code
13196         to depend on GPLed code.
13197
13198 2005-07-02  Jim Meyering  <jim@meyering.net>
13199
13200         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
13201         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
13202         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
13203         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
13204
13205 2005-07-02  Jim Meyering  <jim@meyering.net>
13206
13207         * lib/backupfile.c (backup_args): Change a `0' to NULL.
13208
13209 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
13210
13211         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
13212         declares only 'struct timespec;' (!).
13213
13214 2005-07-01  Jim Meyering  <jim@meyering.net>
13215
13216         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
13217         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
13218         * lib/save-cwd.c, tempname.c:
13219         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
13220         and don't include <sys/file.h>).
13221
13222 2005-06-29  Jim Meyering  <jim@meyering.net>
13223
13224         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
13225         type name.  Use the variable name instead.
13226         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
13227         Likewise.
13228
13229 2005-06-28  Simon Josefsson  <jas@extundo.com>
13230
13231         * modules/check-version (Files): Add check-version.m4.
13232
13233 2005-06-28  Simon Josefsson  <jas@extundo.com>
13234
13235         * m4/check-version.m4: New file, suggested by Jim Meyering
13236         <jim@meyering.net>.
13237
13238 2005-06-28  Simon Josefsson  <jas@extundo.com>
13239
13240         * lib/check-version.h, lib/check-version.c: New files.
13241
13242 2005-06-28  Simon Josefsson  <jas@extundo.com>
13243
13244         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
13245         collision with global variable.  Better indentation.  Don't
13246         increment buffer pointer beyond buffer end.  Based on comments
13247         from Paul Eggert <eggert@cs.ucla.edu>.
13248
13249         * lib/base64.h: Indent.
13250
13251 2005-06-28  Simon Josefsson  <jas@extundo.com>
13252
13253         * doc/gnulib.texi (Library version handling): New section.
13254
13255 2005-06-28  Jim Meyering  <jim@meyering.net>
13256
13257         * check-module (find_included_lib_files): Hard-code another
13258         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
13259         but modules/fts-lgpl (correctly) does not list those files.
13260
13261         * modules/canonicalize (Files): Add lib/pathmax.h.
13262
13263 2005-06-25  Simon Josefsson  <jas@extundo.com>
13264
13265         * modules/check-version: New file.
13266
13267 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
13268
13269         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
13270         initializer of struct addrinfo, as an indication that we don't
13271         care how many members the structure has.
13272
13273 2005-06-24  Derek Price  <derek@ximbiot.com>
13274         and Bruno Haible  <bruno@clisp.org>
13275
13276         Remove stat module & update lstat.
13277         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
13278         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
13279         * m4/stat.m4: Remove this file.
13280
13281 2005-06-24  Derek Price  <derek@ximbiot.com>
13282         and Bruno Haible  <bruno@clisp.org>
13283
13284         Remove stat module & update lstat.
13285         * lib/stat.c: Remove this file...
13286         (slash_aware_lstat): ...moving this content and its support...
13287         * lib/lstat.c (rpl_lstat): ...into here.
13288         * lib/lstat.h: New file.
13289
13290 2005-06-24  Derek Price  <derek@ximbiot.com>
13291         and Bruno Haible  <bruno@clisp.org>
13292
13293         Remove stat module & update lstat.
13294         * config/srclist.txt (libc sources): Remove stat.
13295
13296 2005-06-24  Derek Price  <derek@ximbiot.com>
13297         and Bruno Haible  <bruno@clisp.org>
13298
13299         Remove stat module & update lstat.
13300         * MODULES.html.sh (stat): Remove.
13301         * MODULES.html: Regenerated.
13302         * modules/lstat (Description): Correct function name.
13303         (Files): Add "lstat.h".
13304         (Depends-on): Remove stat, add xalloc, stat-macros.
13305         * modules/stat: Remove this file.
13306         (Include): Add "lstat.h", remove <sys/stat.h>.
13307
13308 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
13309
13310         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
13311         (ranged_convert): Don't save conversion in a temporary struct.
13312         This causes a warning with GCC 4.0.0, and anyway in the typical
13313         case it's not worth the extra 100 bytes or so of code.
13314         (ranged_convert, __mktime_internal): When calling a function via a
13315         pointer P, use P () rather than (*P) (), as we now assume C89 or
13316         better.
13317
13318 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
13319
13320         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
13321         "who -r" failed to give output.  Problem reported by Tim Waugh.
13322
13323         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
13324         (xcalloc): Use it to avoid needless tests.
13325         Problem reported by Jim Meyering.
13326
13327 2005-06-20  Derek Price  <derek@ximbiot.com>
13328
13329         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
13330         unnecessary for Autoconfs > 2.59c.
13331
13332 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13333
13334         * lib/argp.h (__option_is_short): Check upper limit of
13335         __key. Isprint() requires its argument to have the value
13336         of an unsigned char or EOF.
13337
13338 2005-06-16  Jim Meyering  <jim@meyering.net>
13339
13340         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
13341         when either N or S is zero.
13342
13343 2005-06-16  Derek Price  <derek@ximbiot.com>
13344
13345         * m4/bison.m4: Declare YACC & YFLAGS precious.
13346
13347 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
13348
13349         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
13350         multibyte string or pattern, fall back on unibyte matching.
13351         Problem reported by James Youngman.
13352
13353 2005-06-08  Bruno Haible  <bruno@clisp.org>
13354
13355         * modules/csharpcomp: New file.
13356         * MODULES.html.sh (C#): Add csharpcomp.
13357
13358 2005-06-08  Bruno Haible  <bruno@clisp.org>
13359
13360         * m4/csharpcomp.m4: New file, from GNU gettext.
13361
13362 2005-06-08  Bruno Haible  <bruno@clisp.org>
13363
13364         * lib/csharpcomp.h: New file, from GNU gettext.
13365         * lib/csharpcomp.c: New file, from GNU gettext.
13366         * lib/csharpcomp.sh.in: New file, from GNU gettext.
13367
13368 2005-06-08  Bruno Haible  <bruno@clisp.org>
13369
13370         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
13371         warning on mingw.
13372
13373 2005-06-07  Derek Price  <derek@ximbiot.com>
13374
13375         Sync from CVS.
13376         * lib/glob_.h: Indent nested #ifdef.
13377
13378 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13379
13380         Sync from coreutils.
13381         Use "file name" when talking about file names, instead of "filename"
13382         or "path", as per the GNU coding standards.
13383         * lib/mkdir-p.c: Renamed from makepath.c.
13384         (make_dir_parents): Renamed from make_path.  All callers changed.
13385         * lib/mkdir-p.h: Likewise.  All includers changed.
13386         * lib/filenamecat.c: Renamed from path-concat.c.
13387         (file_name_concat): Renamed from path_concat.  All callers changed.
13388         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
13389         * lib/filenamecat.h: Likewise.  All includers changed.
13390         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
13391         in comments or local variable names.
13392         * lib/basename.c: Likewise.
13393         * lib/canonicalize.c, canonicalize.h: Likewise.
13394         * lib/dirname.c, dirname.h: Likewise.
13395         * lib/euidaccess.c: Likewise.
13396         * lib/exclude.c: Likewise
13397         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
13398         * lib/fsusage.c, fsuage.h: Likewise.
13399         * lib/fts.c, fts_.h: Likewise.
13400         * lib/getcwd.c: Likewise.
13401         * lib/getloadavg.c: Likewise.
13402         * lib/mkstemp.c: Likewise.
13403         * lib/mountlist.c, mountlist.h: Likewise.
13404         * lib/openat.c, openat.h: Likewise.
13405         * lib/readlink-stub.c: Likewise.
13406         * lib/readutmp.c, readutmp.h: Likewise.
13407         * lib/rename.c: Likewise.
13408         * lib/rmdir.c: Likewise.
13409         * lib/same.c: Likewise.
13410         * lib/savedir.c: Likewise.
13411         * lib/stripslash.c: Likewise.
13412         * lib/tempname.c: Likewise.
13413         * lib/xreadlink.c: Likewise.
13414         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
13415         All uses changed.
13416         * lib/exclude.h: Likewise.
13417
13418         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
13419         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13420         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
13421         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13422         * lib/pathmax.h: Include <limits.h> unconditionally, since other
13423         files have been getting away with it for years (MORE/BSD 4.3
13424         is extinct now).
13425         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
13426         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
13427
13428         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
13429         Define to 256, not 255, as per modern POSIX.
13430
13431 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13432
13433         Sync from coreutils.
13434         Use "file name" when talking about file names, instead of "filename"
13435         or "path", as per the GNU coding standards.
13436         * MODULES.html.sh: mkdir-p renamed from makepath.
13437         filenamecat renamed from path-concat.
13438         * modules/filenamecat: Renamed from modules/path-concat.
13439         (Files): filenamecat.h and filenamecat.c renamed from
13440         path-concat.h and path-concat.c.
13441         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
13442         (Include): filenamecat.h, not path-concat.h.
13443         * modules/mkdir-p: Renamed from modules/makepath.
13444         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
13445         makepath.c.
13446         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
13447         (Include): mkdir-p.h, not makepath.h.
13448
13449 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
13450
13451         Sync from coreutils.
13452         * m4/mkdir-p.m4: Renamed from makepath.m4.
13453         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
13454         Rename files from makepath.c to mkdir-p.c, and from
13455         makepath.h to mkdir-p.h.
13456         * m4/filenamecat.m4: Renamed from path-concat.m4.
13457         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
13458         Rename files from path-concat.c to filenamecat.c,
13459         and from path-concat.h to filenamecat.h.
13460         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
13461         "file name" in local variables or comments.
13462         * m4/rename.m4: Likewise.
13463
13464 2005-06-01  Bruno Haible  <bruno@clisp.org>
13465
13466         * modules/csharpexec: New file.
13467         * MODULES.html.sh (C#): New section.
13468
13469 2005-06-01  Bruno Haible  <bruno@clisp.org>
13470
13471         * m4/csharp.m4: New file, from GNU gettext.
13472         * m4/csharpexec.m4: New file, from GNU gettext.
13473
13474 2005-06-01  Bruno Haible  <bruno@clisp.org>
13475
13476         * lib/csharpexec.h: New file, from GNU gettext.
13477         * lib/csharpexec.c: New file, from GNU gettext.
13478         * lib/csharpexec.sh.in: New file, from GNU gettext.
13479
13480 2005-05-31  Derek Price  <derek@ximbiot.com>
13481             Paul Eggert  <eggert@cs.ucla.edu>
13482
13483         Sync from cvs.
13484         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13485
13486 2005-05-31  Derek Price  <derek@ximbiot.com>
13487             Paul Eggert  <eggert@cs.ucla.edu>
13488
13489         Sync from cvs.
13490         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
13491
13492 2005-05-29  Derek Price  <derek@ximbiot.com>
13493
13494         * config/srclist.txt (glob_.h, glob.c): Add these files.
13495
13496 2005-05-29  Derek Price  <derek@ximbiot.com>
13497
13498         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
13499         * modules/glob: New file.
13500         * modules/getlogin_r: Add link to POSIX spec in description.
13501
13502 2005-05-29  Derek Price  <derek@ximbiot.com>
13503             Paul Eggert  <eggert@cs.ucla.edu>
13504
13505         * m4/glob.m4: New file.
13506
13507 2005-05-29  Derek Price  <derek@ximbiot.com>
13508             Paul Eggert  <eggert@cs.ucla.edu>
13509
13510         * lib/glob_.h, lib/glob.c: New files.
13511
13512 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13513
13514         * modules/fts (Files): Remove m4/inttypes-pri.m4.
13515         * modules/fts-lgpl (Depends-on): Remove gettext.
13516
13517 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13518
13519         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
13520         and don't require gt_INTTYPES_PRI.
13521
13522 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
13523
13524         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
13525
13526         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
13527         the configuration hassle isn't worth it.
13528         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
13529         (LONGEST_MODIFIER, PRIuMAX): Remove.
13530
13531 2005-05-27  Bruno Haible  <bruno@clisp.org>
13532
13533         * lib/getlogin_r.h: Remove second include of <stddef.h>.
13534
13535 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
13536
13537         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
13538         _POSIX_PTHREAD_SEMANTICS for Solaris.
13539
13540 2005-05-25  Derek Price  <derek@ximbiot.com>
13541
13542         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
13543
13544 2005-05-25  Derek Price  <derek@ximbiot.com>
13545             Paul Eggert  <eggert@cs.ucla.edu>
13546
13547         * modules/getlogin_r, m4/getlogin_r.m4: New files.
13548         * lib/getlogin_r.c, getlogin_r.h: New files.
13549
13550 2005-05-25  Bruno Haible  <bruno@clisp.org>
13551             Derek Price  <derek@ximbiot.com>
13552
13553         * lib/getlogin_r.h: Simplify API documentation.
13554
13555 2005-05-23  Derek Price  <derek@ximbiot.com>
13556
13557         * modules/minmax (Files): Add m4/minmax.m4.
13558         (configure.ac): Add gl_MINMAX.
13559
13560 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
13561
13562         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
13563         so that unistd-safer.h (GPL'ed code) need not be included.
13564
13565 2005-05-22  Bruno Haible  <bruno@clisp.org>
13566
13567         * m4/minmax.m4: New file.
13568         Based on a patch by Derek Price <derek@ximbiot.com>.
13569
13570 2005-05-22  Bruno Haible  <bruno@clisp.org>
13571
13572         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
13573         (INT64_MIN): Fix definition.
13574         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
13575
13576         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
13577         NEED_SIGNED_INT_TYPES.
13578
13579         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
13580         HAVE_SYSTEM_INTTYPES.
13581
13582 2005-05-22  Bruno Haible  <bruno@clisp.org>
13583
13584         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
13585         Also include <sys/param.h> if it defines MIN, MAX.
13586         Based on a patch by Derek Price <derek@ximbiot.com>.
13587
13588 2005-05-21  Jim Meyering  <jim@meyering.net>
13589
13590         * modules/fts (Files): Add m4/inttypes-pri.m4.
13591         (Depends-on): Add lstat and remove gettext.  Alphabetize.
13592
13593 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13594
13595         New fts module.
13596         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
13597         (setup_dir, free_dir): New functions.
13598         (enter_dir, leave_dir): Define trivial
13599         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
13600         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
13601         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
13602         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
13603         Move to fts-cycle.c.
13604         (fts_open): Use setup_dir.
13605         (fts_close): Use free_dir.
13606         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
13607         This adds a label and some gotos, but the alternatives were messier.
13608         Check for memory allocation failure when entering a dir.
13609         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
13610         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
13611         (FTS): New member fts_cycle, that is a union that contains the
13612         old active_dir_ht and cycle_state.  All uses changed to mention
13613         fts_cycle.ht and fts_cycle.state.
13614         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
13615         fts.c, with the following changes:
13616         (setup_dir, free_dir): New functions.
13617         (enter_dir): Now returns bool.  Return true if successful, false
13618         if memory exhausted.  All callers changed.
13619         Do not bother partly cleaning up on
13620         memory allocation failure; that is free_dir's job.
13621         However, free ad if hash_insert fails, to avoid memory leak.
13622         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
13623         fts->fts_options to see which union member to use.
13624
13625 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13626
13627         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
13628         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
13629
13630 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
13631
13632         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
13633
13634 2005-05-20  Jim Meyering  <jim@meyering.net>
13635
13636         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
13637         Now a macro, to pacify GCC.
13638
13639 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13640
13641         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
13642         of -1.
13643
13644 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
13645
13646         * lib/chown.c (rpl_chown): Return -1 on failure.
13647
13648 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13649
13650         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
13651         Don't check for stddef.h.
13652         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
13653         don't use its results.
13654         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
13655         since we include them unconditionally.  Don't require
13656         AM_STDBOOL_H, since stdbool is a prerequisite.
13657         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
13658         since we assume C89 or better.
13659         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
13660         as we don't use their results.
13661         Don't check for fchdir, memmove, memset, strrchr, as we use
13662         them unconditionally.
13663         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
13664         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
13665
13666 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
13667
13668         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
13669         Include <stddef.h> unconditionally, since we assume C89 now.
13670         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
13671         * lib/fts.c: Include fts_.h first, to check interface.
13672         Do not include intprops.h; no longer needed.
13673         Include cycle-check.h and hash.h, since fts_.h no longer does.
13674         Remove unnecessary casts of closedir to void.
13675         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
13676         decide whether to decrement nlinks.
13677         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
13678         (FTS): Use struct hash_table * instead of Hash_table, so that
13679         we no longer need to include hash.h here.
13680
13681 2005-05-18  Jim Meyering  <jim@meyering.net>
13682
13683         * modules/dirfd (License): Change to LGPL.  Most of the code
13684         is already in the public domain.
13685
13686 2005-05-18  Jim Meyering  <jim@meyering.net>
13687
13688         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
13689         Reported by Yoann Vandoorselaere.
13690
13691 2005-05-17  Jim Meyering  <jim@meyering.net>
13692
13693         * m4/fts.m4: New file, from coreutils.
13694
13695 2005-05-17  Jim Meyering  <jim@meyering.net>
13696
13697         * lib/fts.c, lib/fts_.h: New files, from coreutils.
13698
13699 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13700
13701         Sync from coreutils.
13702         * m4/unlinkdir.m4: New file.
13703
13704 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13705
13706         Sync from coreutils.
13707         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
13708         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
13709         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
13710         White space changes only.
13711         * lib/makepath.c (make_path): Port to hosts where leading "//" is
13712         special.
13713         * lib/yesno.c: Include getline.h, not ctype.h.
13714         (yesno): Don't remove leading white space; POSIX doesn't allow it.
13715         Use getline to remove arbitrary restriction on response length.
13716
13717 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
13718
13719         * config/srclist-update: Spell out "Street" in FSF postal
13720         mail address; this is the style the FSF seems to prefer.
13721
13722         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
13723         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
13724         this updates FSF postal mail address.
13725
13726         Sync from coreutils.
13727         * modules/unlinkdir: New file.
13728         * modules/yesno (Depends-on): Add getline.
13729         * MODULES.html.sh (File system functions): Add unlinkdir.
13730
13731 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13732
13733         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
13734         lib/strsep.h:
13735         Change the initial comment to refer to GPL, not LGPL.
13736         gnulib-tool will change it to LGPL as needed.
13737
13738         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
13739         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
13740         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
13741         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
13742         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
13743         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
13744         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
13745         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
13746         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
13747         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
13748         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
13749         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
13750         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
13751         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
13752         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
13753         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
13754         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
13755         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
13756         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
13757         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
13758         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
13759         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
13760         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
13761         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
13762         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
13763         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
13764         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
13765         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
13766         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
13767         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
13768         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
13769         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
13770         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
13771         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
13772         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
13773         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
13774         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
13775         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
13776         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
13777         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
13778         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
13779         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
13780         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
13781         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
13782         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
13783         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
13784         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
13785         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
13786         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
13787         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
13788         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
13789         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
13790         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
13791         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
13792         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
13793         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
13794         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
13795         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
13796         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
13797         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
13798         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
13799         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
13800         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
13801         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
13802         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
13803         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
13804         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
13805         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
13806         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
13807         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
13808         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
13809         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
13810         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
13811         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
13812         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
13813         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
13814         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
13815         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
13816         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
13817         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
13818         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
13819         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
13820         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
13821         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
13822         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
13823         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
13824         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
13825         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
13826         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
13827         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
13828         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
13829         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
13830         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
13831         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
13832         lib/yesno.c, lib/yesno.h:
13833         Update FSF postal mail address.
13834
13835 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
13836
13837         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
13838         tests/test-memmem.c, tests/test-stpncpy.c:
13839         Update FSF postal mail address.
13840
13841 2005-05-13  Bruno Haible  <bruno@clisp.org>
13842
13843         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
13844         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
13845         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
13846         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
13847         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
13848         Add support for 64-bit integers in the MSVC compiler.
13849
13850 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13851
13852         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
13853
13854 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
13855
13856         * gnulib-tool (func_import): Sort and uniquify recommended includes.
13857
13858 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
13859
13860         * doc/getdate.texi (General date syntax): Don't say that date
13861         date --iso-8601=ns generates acceptable dates; it doesn't yet.
13862         Problem reported by Nic Ferrier.
13863
13864 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13865
13866         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
13867         specified in ai_socktype. Fix invalid ai_protocol
13868         check. ai_protocol is usually set to 0 or depending on
13869         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
13870         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
13871         ai_socktype / ai_protocol in the returned addrinfo structure.
13872
13873 2005-05-10  Simon Josefsson  <jas@extundo.com>
13874
13875         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
13876         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
13877
13878 2005-05-10  Karl Berry  <karl@gnu.org>
13879
13880         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
13881         (from http://www.gnu.org/licenses).
13882         * doc/COPYING.LIB: also rename to COPYING.LESSER.
13883         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
13884         fdl.texi suffices.
13885
13886 2005-05-10  Karl Berry  <karl@gnu.org>
13887
13888         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
13889         (COPYING.DOC): remove.
13890
13891         * config/srclist-update: new FSF address.
13892
13893 2005-05-10  Derek Price  <derek@ximbiot.com>
13894
13895         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
13896         possible.
13897
13898 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13899             Bruno Haible  <bruno@clisp.org>
13900
13901         * modules/inet_ntop: New file.
13902         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13903         inet_ntop.
13904
13905 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13906             Bruno Haible  <bruno@clisp.org>
13907
13908         * m4/inet_ntop.m4: New file.
13909
13910 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
13911             Bruno Haible  <bruno@clisp.org>
13912
13913         * lib/inet_ntop.h: New file.
13914         * lib/inet_ntop.c: New file, from glibc with modifications.
13915
13916 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
13917
13918         * modules/time_r (License): Change to LGPL.
13919         * modules/extensions (License): Change to LGPL.  Actually,
13920         the license is more permissive than that, but currently gnulib-tool
13921         doesn't know how to handle more-permissive licenses.
13922
13923         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
13924         Problem reported by Dave Love.
13925
13926 2005-05-08  Jim Meyering  <jim@meyering.net>
13927
13928         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
13929         blank.
13930
13931 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
13932
13933         * modules/argmatch (Depends-on): Add stdbool.
13934         * modules/backupfile (Depends-on): Likewise.
13935         * modules/chdir-long (Depends-on): Likewise.
13936         * modules/closeout (Depends-on): Likewise.
13937         * modules/cycle-check (Depends-on): Likewise.
13938         * modules/dirname (Depends-on): Likewise.
13939         * modules/fnmatch (Depends-on): Likewise.
13940         * modules/fsusage (Depends-on): Likewise.
13941         * modules/fwriteerror (Depends-on): Likewise.
13942         * modules/getcwd (Depends-on): Likewise.
13943         * modules/getloadavg (Depends-on): Likewise.
13944         * modules/hard-locale (Depends-on): Likewise.
13945         * modules/makepath (Depends-on): Likewise.
13946         * modules/mountlist (Depends-on): Likewise.
13947         * modules/nanosleep (Depends-on): Likewise.
13948         * modules/posixtm (Depends-on): Likewise.
13949         * modules/quotearg (Depends-on): Likewise.
13950         * modules/readtokens (Depends-on): Likewise.
13951         * modules/readtokens0 (Depends-on): Likewise.
13952         * modules/readutmp (Depends-on): Likewise.
13953         * modules/save-cwd (Depends-on): Likewise.
13954         * modules/strftime (Depends-on): Likewise.
13955         * modules/userspec (Depends-on): Likewise.
13956         * modules/utimecmp (Depends-on): Likewise.
13957         * modules/xgetcwd (Depends-on): Likewise.
13958         * modules/xnanosleep (Depends-on): Likewise.
13959         * modules/xstrtod (Depends-on): Likewise.
13960         * modules/yesno (Depends-on): Likewise.
13961
13962 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
13963
13964         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
13965         needless checks.
13966
13967 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
13968
13969         Merge from coreutils.  Among other things,
13970         add bulletproofing for cases where stdin, stdout, or stderr are closed.
13971         * lib/fd-safer.c: New file.
13972         * lib/fcntl-safer.h, open-safer.c: Remove.
13973         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
13974         * lib/dup-safer.c: Include unistd-safer.h first.
13975         Don't include errno.h.
13976         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
13977         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
13978         * lib/file-type.c: Rely on file-type.h change.
13979         * lib/getloadavg.c: Include unistd-safer.h.
13980         (getloadavg): Use safer open.
13981         * lib/getusershell.c: Include "stdio-safer.h".
13982         (getusershell): Use safer fopen.
13983         * lib/long-options.c (long_options): Use NULL rather than 0.
13984         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
13985         'free'.
13986         * lib/modechange.c: Likewise.
13987         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
13988         (MODE_DONE): New constant.
13989         (struct mode_change): Remove 'next' member.
13990         (make_node_op_equals): New function; like the old one of the
13991         same name, except it allocates an array.
13992         (mode_compile, mode_create_from_ref): Use it.
13993         (mode_compile): Allocate result as an array, not a linked list.
13994         Parse octal string ourself, so that we catch mistakes like "+0".
13995         (mode_adjust): Arg is an array, not a linked list.
13996         * lib/modechange.c: Include stat-macros.h, xalloc.h.
13997         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
13998         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
13999         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
14000         Remove.  This is now stat-macros.h's job.
14001         (talloc): Remove.  All callers replaced by xalloc, so that
14002         our invokers don't have to worry about reporting memory failures.
14003         (make_node_op_equals): Remove.
14004         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14005         New constants.
14006         (struct mode_change): Moved here from modechange.h.
14007         (mode_append_entry): Remove.
14008         (mode_compile): Remove MASKED_OPS arg, since it encouraged
14009         apps to have incorrect behavior.  Use simpler algorithm for head
14010         and tail.  Don't futz with umask; that's now the job of mode_adjust.
14011         Detect more invalid usages rather than having somewhat-random behavior.
14012         Don't insert an "a=" action, as that leads to incorrect behavior.
14013         (mode_compile, mode_create_from_ref): Return NULL on error instead
14014         of an enum, since now there's only one way to have an error.  All
14015         callers changed.
14016         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
14017         at the correct time.  Simplify calculation of "+u" and its ilk.
14018         Don't mishandle "+X".
14019         (mode_free): Remove "register" and localize decls.
14020         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
14021         (struct mode_change): Move to modechange.c; callers don't
14022         need to see this stuff.
14023         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
14024         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
14025         (mode_change, mode_adjust): Reflect the new signatures noted above.
14026         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
14027         that might redefine system include files.
14028         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
14029         (my_usleep): Use NULL rather than (void *) 0.
14030         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
14031         Use siginterrupt to specify that system calls should be interrupted.
14032         (rpl_nanosleep): Move initialization of suspended closer to call of
14033         my_usleep.
14034         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
14035         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
14036         (desirable_utmp_entry): New function.
14037         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
14038         using x2nrealloc, to simplify logic.
14039         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
14040         size calculation.  Do not assume utmp file is a regular file.
14041         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
14042         (READ_UTMP_CHECK_PIDS): New constant.
14043         * lib/save-cwd.c: Include unistd-safer.h.
14044         (save_cwd): Use fd_safer.
14045         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
14046         [!_LIBC] Include "stat-macros.h" instead.
14047         * lib/unistd-safer.h (fd_safer): New decl.
14048
14049 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14050
14051         * modules/getloadavg (Depends-on): Add unistd-safer.
14052         * modules/getusershell (Depends-on): Add stdio-safer.
14053         * modules/lstat (Depends-on): Remove xalloc.
14054         * modules/mkstemp (Depends-on): Add stat-macros.
14055         * modules/modechange (Depends-on): Remove xstrtol.
14056         Add stat-macros, xalloc.
14057         * modules/save-cwd (Depends-on): Add unistd-safer.
14058         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
14059         * modules/unistd-safer (Files): Add lib/fd-safer.c
14060         (Makefile.am): Remove lib_SOURCES.
14061
14062         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
14063         Remove fcntl-safer; unistd-safer supersedes it.
14064
14065 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14066
14067         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
14068         AC_HEADER_STAT.
14069         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
14070         (gl_PREREQ_CHOWN): Remove.
14071         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
14072         it.  Don't require AC_HEADER_STAT.
14073         (gl_PREREQ_LSTAT): Remove.
14074         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
14075         Don't require AC_HEADER_STAT.
14076         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
14077         (gl_PREREQ_RMDIR): Remove.
14078         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
14079         mention stat-macros.h or AC_HEADER_STAT, since we'll make
14080         the stat-macros module a prerequisite.
14081         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
14082         * m4/filemode.m4 (gl_FILEMODE): Likewise.
14083         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
14084         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
14085         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
14086         variable names.
14087         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
14088         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
14089         variable prefixes.
14090         * m4/fcntl-safer.m4: Remove.
14091         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
14092         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
14093         Invoke gl_PREREQ_FD_SAFER.
14094         (gl_PREREQ_FD_SAFER): New macro.
14095         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
14096         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
14097         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
14098         Remove duplicate call to AC_LIBOBJ(readutmp).
14099         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
14100
14101         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
14102         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
14103
14104 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
14105
14106         * MODULES.html.sh (Misc): Add byteswap.
14107
14108 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14109
14110         * modules/getcwd (Depends-on): Add extensions.
14111         * modules/openat (Depends-on): Likewise.
14112
14113 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14114
14115         * modules/byteswap: New file.
14116
14117 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14118
14119         * m4/byteswap.m4: New file.
14120
14121 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
14122
14123         * lib/byteswap_.h: New file.
14124
14125 2005-04-25  Karl Berry  <karl@gnu.org>
14126
14127         * m4/gettext.m4: Update from GNU gettext 0.14.4.
14128
14129 2005-04-25  Albert Chin  <china@thewrittenword.com>
14130
14131         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
14132         Toolkit C bug.
14133
14134 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
14135
14136         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
14137         (func_ln_if_changed) Remove forcibly for no error message
14138         in case file does not exist.
14139
14140 2005-04-19  Simon Josefsson  <jas@extundo.com>
14141
14142         * gnulib-tool (Options): Make --symlink mean --symbolic.
14143
14144 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
14145
14146         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
14147
14148 2005-04-16  Simon Josefsson  <jas@extundo.com>
14149
14150         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
14151
14152 2005-04-15  Simon Josefsson  <jas@extundo.com>
14153
14154         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
14155
14156 2005-04-15  Simon Josefsson  <jas@extundo.com>
14157
14158         * gnulib-tool: Rename --symlink to --symbolic.
14159
14160 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
14161
14162         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
14163         symbolic links to files instead of copying/moving.  Add --aux-dir,
14164         specifying directory relative --dir where auxiliary build tools
14165         are placed.
14166
14167 2005-04-14  Bruno Haible  <bruno@clisp.org>
14168
14169         * modules/allocsa (License): Change to LGPL.
14170         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
14171
14172 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
14175         that "UTC +1 second" continues to work.  Problem reported
14176         by Dmitry V. Levin.
14177         (relunit_snumber): New rule.
14178         (relunit): Use it.
14179
14180 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
14181
14182         * lib/getdate.y (universal_time_zone_table): New constant.
14183         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
14184         universal_time_zone_table.
14185         (lookup_zone): Prefer universal_time_zone_table to
14186         local_time_zone_table, so that "GMT" time stamps are allowed in
14187         London during the summer.  Problem reported by Ian Abbott.
14188
14189 2005-04-12  Jim Meyering  <jim@meyering.net>
14190
14191         * lib/human.c (humblock): Set *options even when returning due to
14192         xstrtoumax conversion failure.  Thanks to a used-uninitialized
14193         warning from gcc-4.
14194
14195 2005-04-09  Jim Meyering  <jim@meyering.net>
14196
14197         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
14198         -Wuninitialized: initialize tm0.tm_year.
14199
14200 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
14201
14202         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
14203         count, since there's no maximum.  All uses changed.
14204         Add member dsts_seen.
14205         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
14206         not being INT_MAX.
14207         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
14208         Use pc_rels_seen to decide whther a date is absolute.
14209
14210         * lib/getdate.y (number): Don't overwrite year.
14211         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
14212         check.
14213
14214 2005-04-02  Simon Josefsson  <jas@extundo.com>
14215
14216         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
14217         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
14218
14219 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
14220
14221         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
14222         where no absolute path name can be longer than PATH_MAX.
14223
14224 2005-03-27  Jim Meyering  <jim@meyering.net>
14225
14226         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
14227
14228 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
14229
14230         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
14231         "one's complement" -> "ones' complement" in comment, as per Knuth.
14232         "value of type" -> "type or expression" in comment.
14233         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
14234
14235 2005-03-26  Jim Meyering  <jim@meyering.net>
14236
14237         Comment nits.
14238         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
14239         Correct typos: s/or/of/.
14240
14241 2005-03-26  Jim Meyering  <jim@meyering.net>
14242
14243         * modules/check-include-files: Move to ../ and rename to...
14244         * check-module: ...this.
14245
14246 2005-03-25  Jim Meyering  <jim@meyering.net>
14247
14248         * modules/xvasprintf (Files): Add xalloc.h.
14249
14250 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
14251
14252         * modules/gettext (Files): config/config.rpath ->
14253         build-aux/config.rpath
14254         * modules/iconv (Files): Likewise.
14255         Problem reported by Oskar Liljeblad.
14256
14257 2005-03-23  Jim Meyering  <jim@meyering.net>
14258
14259         * modules/check-include-files: New script to check for
14260         missing dependencies, multiple includes, etc.
14261
14262         * modules/c-strtold (Depends-on): Add xalloc.
14263         * modules/c-strtod (Depends-on): Add xalloc.
14264         * modules/hash (Depends-on): Add xalloc.
14265         (Files): Remove lib/xalloc.h.
14266
14267         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
14268         * modules/userspec (Files): Add lib/inttostr.h.
14269
14270 2005-03-23  Jim Meyering  <jim@meyering.net>
14271
14272         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
14273
14274 2005-03-22  Jim Meyering  <jim@meyering.net>
14275
14276         * modules/stat-macros: New module.
14277         * modules/canonicalize, modules/euidaccess, modules/file-type,
14278         * modules/filemode, modules/lchown, modules/makepath,
14279         * modules/rmdir, modules/stat: Depend on new stat-macros module
14280         rather than listing lib/stat-macros.h manually.
14281         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
14282
14283 2005-03-22  Jim Meyering  <jim@meyering.net>
14284
14285         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
14286
14287 2005-03-22  Bruno Haible  <bruno@clisp.org>
14288
14289         * config/srclist.txt: Replace target directory 'config' with
14290         'build-aux'.
14291         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
14292         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
14293         ../build-aux/.
14294
14295 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         * modules/chdir-long (Depends-on): Add mempcpy.
14298
14299         * modules/acl, modules/backupfile, modules/c-strtod,
14300         modules/c-strtold, modules/canon-host, modules/canonicalize,
14301         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
14302         modules/exclude, modules/exitfail, modules/file-type,
14303         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
14304         modules/getdate, modules/getline, modules/getpagesize,
14305         modules/getpass, modules/getugroups, modules/group-member,
14306         modules/hard-locale, modules/hash, modules/human, modules/idcache,
14307         modules/inttostr, modules/long-options, modules/makepath,
14308         modules/md5, modules/memcasecmp, modules/memcoll,
14309         modules/modechange, modules/mountlist, modules/path-concat,
14310         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
14311         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
14312         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
14313         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
14314         modules/strftime, modules/strndup, modules/strverscmp,
14315         modules/timespec, modules/unlocked-io, modules/userspec,
14316         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
14317         modules/yesno:
14318         Remove lib_SOURCES line from Makefile.am section, as this is now
14319         done automatically by the corresponding Autoconf macro.
14320
14321 2005-03-21  Jim Meyering  <jim@meyering.net>
14322
14323         Changes imported from coreutils.
14324
14325         * lib/cycle-check.c: Don't include xalloc.h.
14326
14327         * lib/path-concat.c: Don't include assert.h.
14328         (path_concat): Remove assertion that would have triggered
14329         for ABASE starting with more than one slash.
14330         Reported by Andreas Schwab.
14331
14332         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
14333         properly when ABASE is an absolute file name.
14334         Correct the description of this function.
14335         Include <assert.h>.
14336         Add an assertion and a test driver.
14337         This fixes a bug introduced on 2004-07-02.
14338         Andreas Schwab reported the resulting failure of cp --parents:
14339         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
14340
14341 2005-03-21  Jim Meyering  <jim@meyering.net>
14342
14343         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
14344         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
14345
14346 2005-03-21  Jim Meyering  <jim@meyering.net>
14347         and  Paul Eggert  <eggert@cs.ucla.edu>
14348
14349         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
14350         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
14351         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
14352         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
14353         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
14354         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
14355         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
14356         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
14357         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
14358         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
14359         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
14360         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
14361         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
14362         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
14363         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
14364         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
14365         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
14366         for these modules.
14367
14368 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
14369
14370         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
14371         (which shouldn't happen), generate nothing instead of returning 0
14372         immediately, so that nstrftime (NULL, ...) doesn't return 0.
14373
14374 2005-03-16  Bruno Haible  <bruno@clisp.org>
14375
14376         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
14377         HAVE_LONGLONG_64BIT.
14378
14379 2005-03-16  Bruno Haible  <bruno@clisp.org>
14380
14381         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
14382         HAVE_LONGLONG_64BIT.
14383
14384 2005-03-16  Bruno Haible  <bruno@clisp.org>
14385
14386         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
14387         HAVE_LONGLONG_64BIT.
14388
14389 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14390
14391         * lib/strftime.c (my_strftime): Prepend space to format so that we can
14392         reliably distinguish strftime failure from empty output on POSIX
14393         hosts.
14394
14395 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
14396
14397         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
14398         (iconv_string): Don't guess a size-zero buffer, as that might cause
14399         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
14400         result would be 'too large', where 'too large' is (heuristically)
14401         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
14402         overflow concerns.  This will prevent some unwanted malloc failures
14403         when the inputs are very large.
14404
14405 2005-03-15  Karl Berry  <karl@gnu.org>
14406
14407         * config/srclist.txt (config.rpath): from gettext.
14408         * config/config.rpath: update.
14409
14410 2005-03-15  Bruno Haible  <bruno@clisp.org>
14411
14412         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
14413         to 'negate'.
14414
14415         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
14416         variable.
14417
14418         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
14419         results.
14420
14421 2005-03-14  Simon Josefsson  <jas@extundo.com>
14422
14423         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
14424         <fx@gnu.org>.
14425
14426 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
14427
14428         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
14429         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
14430         intprops.h.
14431         * lib/strtol.c: Likewise.
14432
14433 2005-03-14  Jim Meyering  <jim@meyering.net>
14434
14435         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
14436         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
14437         to be nonzero so that we (and caller) can detect the difference
14438         between a valid zero-length expansion and an error return, even
14439         when the underlying strftime fails before writing anything into
14440         that location.
14441
14442 2005-03-14  Bruno Haible  <bruno@clisp.org>
14443
14444         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
14445         Update from GNU gettext 0.14.3.
14446
14447 2005-03-10  Jim Meyering  <jim@meyering.net>
14448
14449         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
14450
14451 2005-03-10  Jim Meyering  <jim@meyering.net>
14452
14453         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
14454         so that this module works on systems without fchdir.
14455
14456 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
14457
14458         Factor int-properties macros into a single file, except for
14459         glibc-related files.
14460         * lib/intprops.h: New file.
14461         * lib/getloadavg.c: Include it instead of limits.h.
14462         (INT_STRLEN_BOUND): Remove.
14463         * lib/human.c: Include intprops.h.
14464         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
14465         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
14466         302/1000.
14467         * lib/inttostr.h: Include intprops.h instead of limits.h.
14468         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
14469         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
14470         for consistency with intprops.h.
14471         (time_t_is_integer, twos_complement_arithmetic): Use them.
14472         * lib/sig2str.h: Include <signal.h>, intprops.h.
14473         (INT_STRLEN_BOUND): Remove.
14474         * lib/strftime.c (TYPE_SIGNED): Remove.
14475         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
14476         * lib/strtol.c: Adjust comments to match intprops.h.
14477         * lib/userspec.c: Include intprops.h.
14478         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
14479         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
14480         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
14481         instead of rolling our own expressions.
14482         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
14483
14484         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
14485         instead of int.
14486         (my_strftime): Do not mishandle years close to INT_MAX, by doing
14487         the right thing even if adding 1900 would overflow.  Similarly
14488         for tm_mon + 1 and tm_yday + 1.
14489         Make %Y always equivalent to %C%y, and similarly for %G and %g.
14490         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
14491         (DO_SIGNED_NUMBER): New macro.
14492         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
14493
14494 2005-03-07  Bruno Haible  <bruno@clisp.org>
14495
14496         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
14497
14498 2005-03-07  Bruno Haible  <bruno@clisp.org>
14499
14500         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
14501
14502 2005-03-04  Derek R. Price  <derek@ximbiot.com>
14503
14504         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
14505         (func_import): Only replace files via --import when they have actually
14506         changed.
14507
14508 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14509
14510         * m4/mmap-anon.m4: New file.
14511         * m4/pagealign_alloc.m4: New file.
14512
14513 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14514             Bruno Haible  <bruno@clisp.org>
14515
14516         * modules/pagealign_alloc: New file.
14517         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
14518
14519 2005-03-03  Derek R. Price  <derek@ximbiot.com>
14520             Bruno Haible  <bruno@clisp.org>
14521
14522         * lib/pagealign_alloc.h: New file.
14523         * lib/pagealign_alloc.c: New file.
14524
14525 2005-03-03  Bruno Haible  <bruno@clisp.org>
14526
14527         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
14528         Use an all-permissive copyright notice, recommended by RMS.
14529
14530 2005-03-02  Bruno Haible  <bruno@clisp.org>
14531
14532         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
14533         of AIX, the replacement has to be done only after <string.h> is
14534         included, therefore not in config.h. stpncpy.h does the replacement,
14535         and stpncpy.c uses it.
14536
14537 2005-03-02  Bruno Haible  <bruno@clisp.org>
14538
14539         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
14540         stpncpy.c uses it.
14541
14542 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14543
14544         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
14545         The workaround isn't strictly needed for POSIX conformance, and
14546         it's too much of a pain to configure and maintain.  We'll ask
14547         people to fix their kernels instead.
14548         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
14549         (NANOSLEEP_BUG_WORKAROUND): Remove.
14550         (xnanosleep): Remove the workaround.
14551
14552 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14553
14554         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
14555         Reported by Derek Price.
14556         (Include): Add "timespec.h".
14557
14558         * modules/xnanosleep (Depends-on): Remove gethrxtime.
14559
14560 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
14561
14562         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
14563         to detect nanosleep bug.
14564
14565 2005-03-01  Bruno Haible  <bruno@clisp.org>
14566
14567         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
14568
14569 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
14570
14571         * modules/gethrxtime: New file.
14572         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
14573         (Depends-on): Add gethrxtime.
14574         (configure.ac): Add gl_XNANOSLEEP.
14575         (Makefile.am): Remove lib_SOURCES line.
14576
14577 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14578
14579         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
14580         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
14581
14582 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
14583
14584         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
14585         * lib/timespec.h (gettime): Return void, since it always
14586         succeeds now.  All uses changed.
14587         * lib/gettime.c (gettime) Likewise.
14588         [HAVE_NANOTIME]: Prefer nanotime.
14589         Assume gettimeofday succeeds, as POSIX requires.
14590         Assime time () succeeds, since other code already does.
14591         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
14592         (timespec_subtract): Remove.
14593         (NANOSLEEP_BUG_WORKAROUND): New constant.
14594         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
14595         things considerably.  Use it only on GNU/Linux hosts, since the
14596         workaround shouldn't be needed elsewhere.
14597
14598 2005-02-24  Bruno Haible  <bruno@clisp.org>
14599
14600         * modules/gettext (Files): Add m4/glibc2.m4.
14601
14602 2005-02-24  Bruno Haible  <bruno@clisp.org>
14603
14604         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
14605         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
14606         * m4/progtest.m4:
14607         Update from GNU gettext 0.14.2.
14608         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
14609
14610 2005-02-24  Bruno Haible  <bruno@clisp.org>
14611
14612         * lib/localcharset.c: Update from GNU gettext 0.14.2.
14613         * lib/config.charset: Update from GNU gettext 0.14.2.
14614
14615 2005-02-24  Bruno Haible  <bruno@clisp.org>
14616
14617         * lib/gettext.h: Update from GNU gettext 0.14.2.
14618
14619 2005-02-23  Simon Josefsson  <jas@extundo.com>
14620
14621         * m4/iconvme.m4: New file.
14622
14623 2005-02-23  Jim Meyering  <jim@meyering.net>
14624
14625         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
14626         change.
14627         Thanks to Bruno Haible for catching it.
14628
14629 2005-02-22  Simon Josefsson  <jas@extundo.com>
14630
14631         * modules/iconvme: New file.
14632
14633         * MODULES.html.sh: Add iconvme.
14634
14635 2005-02-22  Simon Josefsson  <jas@extundo.com>
14636
14637         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
14638
14639 2005-02-22  Simon Josefsson  <jas@extundo.com>
14640
14641         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
14642
14643 2005-02-22  Jim Meyering  <jim@meyering.net>
14644
14645         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
14646         s/ifndef/ifdef/.
14647
14648 2005-02-20  Neil Conway  <neilc@samurai.com>
14649
14650         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
14651         returned by OSX/Darwin if the specified buffer is not large
14652         enough for the hostname.
14653
14654 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14655
14656         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
14657         pass it to _help, otherwise the latter coredumps trying to
14658         dereference state.root_argp.
14659
14660 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14661
14662         * modules/chdir-long (Depends-on): Add memrchr.
14663         * modules/memrchr (Files): Add lib/memrchr.h.
14664         (Include): "memrchr.h".
14665
14666 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14667
14668         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
14669
14670 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
14671
14672         * lib/memrchr.h: New file.
14673         * lib/chdir-long.c: Include it.
14674         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
14675         Don't bother including stddef.h.
14676
14677 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
14678
14679         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
14680         inclusion.
14681         Include <sys/types.h>, for dev_t.
14682         (ME_DUMMY, ME_REMOTE): Move from here....
14683         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
14684         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
14685         Dmitry V. Levin.
14686         Include mountlist.h first, to test the interface.
14687
14688 2005-01-29  Bruno Haible  <bruno@clisp.org>
14689
14690         * lib/progname.c (program_name): Initialize.
14691         Needed when linking statically on MacOS X.
14692
14693 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14694
14695         Sync from coreutils.
14696         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
14697         (Depends-on): Add c-strtod.
14698         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
14699
14700 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
14701
14702         Sync from coreutils.
14703         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
14704
14705         Remove files that are specific to coreutils.
14706         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
14707
14708 2005-01-28  Bruno Haible  <bruno@clisp.org>
14709
14710         * modules/javacomp: New file.
14711         * MODULES.html.sh (Java): Add javacomp.
14712
14713 2005-01-28  Bruno Haible  <bruno@clisp.org>
14714
14715         * m4/javacomp.m4: New file, from GNU gettext.
14716
14717 2005-01-28  Bruno Haible  <bruno@clisp.org>
14718
14719         * lib/javacomp.sh.in: New file, from GNU gettext.
14720         * lib/javacomp.h: New file, from GNU gettext.
14721         * lib/javacomp.c: New file, from GNU gettext.
14722
14723 2005-01-26  Simon Josefsson  <jas@extundo.com>
14724
14725         * lib/gai_strerror.c: Use GPL in header.
14726
14727 2005-01-26  Bruno Haible  <bruno@clisp.org>
14728
14729         * modules/javaexec: New file.
14730         * MODULES.html.sh (Java): Add javaexec.
14731
14732 2005-01-26  Bruno Haible  <bruno@clisp.org>
14733
14734         * m4/javaexec.m4: New file, from GNU gettext.
14735
14736 2005-01-26  Bruno Haible  <bruno@clisp.org>
14737
14738         * lib/javaexec.sh.in: New file, from GNU gettext.
14739         * lib/javaexec.h: New file, from GNU gettext.
14740         * lib/javaexec.c: New file, from GNU gettext.
14741
14742 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14743
14744         * modules/lchown (Depends-on): Remove lchown.h
14745
14746 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14747
14748         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
14749         must be defined if the header file was not found, in order
14750         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
14751
14752 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14753
14754         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
14755         initializers for struct pentry_state.
14756         (__argp_error): Check return value of __asprintf
14757         (__argp_failure): Translate error message
14758
14759         * lib/argp-parse.c: Removed braces around the expansion of N_()
14760
14761 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
14762
14763         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
14764         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
14765         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
14766         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
14767         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
14768         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
14769         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
14770         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
14771         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
14772         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
14773         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
14774         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
14775         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
14776         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
14777         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
14778         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
14779         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
14780         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
14781         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
14782         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
14783         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
14784         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
14785         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
14786         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
14787         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
14788         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
14789         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
14790         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
14791         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
14792         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
14793         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
14794         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
14795         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
14796         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
14797         xstrtol.m4, xstrtoumax.m4, yesno.m4:
14798         Use an all-permissive copyright notice, recommended by RMS.
14799
14800 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
14801
14802         * modules/chdir-long (Depends-on): Remove mempcpy.
14803
14804 2005-01-21  Jim Meyering  <jim@meyering.net>
14805
14806         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
14807         same value as for Solaris 9.
14808
14809         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
14810         component length.  This included changing the parameter to be
14811         of type `char *' rather than `char const *'.
14812         * lib/chdir-long.h (chdir_long): Update prototype.
14813
14814         * lib/openat.c (fdopendir, fstatat): New functions.
14815         * lib/openat.h: Include headers required for use of DIR and struct
14816         stat.
14817         [AT_SYMLINK_NOFOLLOW]: Define.
14818         (fdopendir, fstatat): Add prototypes.
14819
14820 2005-01-21  Bruno Haible  <bruno@clisp.org>
14821
14822         * modules/classpath: New file.
14823         * MODULES.html.sh (Java): Add classpath.
14824
14825 2005-01-21  Bruno Haible  <bruno@clisp.org>
14826
14827         * lib/classpath.h: New file, from GNU gettext.
14828         * lib/classpath.c: New file, from GNU gettext.
14829
14830 2005-01-20  Simon Josefsson  <jas@extundo.com>
14831
14832         * modules/version-etc-fsf: New file.
14833
14834 2005-01-20  Simon Josefsson  <jas@extundo.com>
14835
14836         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
14837         * lib/version-etc.c: Remove version_etc_copyright.
14838         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
14839         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
14840
14841 2005-01-20  Simon Josefsson  <jas@extundo.com>
14842
14843         * lib/base64.h (isbase64): Add.
14844
14845         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
14846         using a unsigned prototype, don't inline.
14847         (base64_decode): Use it.
14848
14849 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14850
14851         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
14852         it.
14853
14854 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14855
14856         * lib/save-cwd.c (save_cwd): Remove code to support the case
14857         where fchdir is missing or flaky.
14858
14859 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
14860
14861         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
14862
14863 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
14864
14865         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
14866         AC_LIBSOURCES now does this.
14867         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
14868         with new ullong_max module.
14869
14870 2005-01-19  Bruno Haible  <bruno@clisp.org>
14871
14872         * modules/sh-quote: New file.
14873         * MODULES.html.sh (Executing programs): Add sh-quote.
14874
14875 2005-01-19  Bruno Haible  <bruno@clisp.org>
14876
14877         * lib/sh-quote.h: New file, from GNU gettext.
14878         * lib/sh-quote.c: New file, from GNU gettext.
14879
14880 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14881
14882         Merge from coreutils.
14883         * m4/ullong_max.m4: New file.
14884         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
14885         (gl_MACROS): Assume localeconv exists.
14886
14887 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14888
14889         Merge changes from coreutils, as described below in several
14890         changelogs dated today.
14891
14892         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
14893         (O_DIRECTORY): Remove; not needed here, since "." must be
14894         a directory.  All uses removed.
14895         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
14896         universal on Suns, and we also need to test for IRIX.
14897         Revamp code to use 'if' rather than '#if'.
14898         Avoid unnecessary comparison of cwd->desc to 0.
14899
14900         * lib/utimens.c (futimens): Robustify the previous patch, by checking
14901         for known valid error numbers rather than observed invalid ones.
14902
14903 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
14904
14905         * modules/ullong_max: New file.
14906
14907         * modules/chdir-long, modules/openat: New files.
14908         * modules/save-cwd (Depends-on): Depend on chdir-long.
14909         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
14910
14911 2005-01-18  Jim Meyering  <jim@meyering.net>
14912
14913         Merge from coreutils.
14914         * m4/chdir-long.m4, m4/openat.m4: New files.
14915         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
14916         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
14917         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
14918         is sane and DOES follow symlinks.  Besides, testing 20 different
14919         systems found no broken chown implementations.
14920         Prompted by a change in rsync's copy of this macro.
14921         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
14922
14923         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
14924
14925         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
14926         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
14927         NULL-means-set-to-current-time semantics.
14928         Remove temporary file immediately, rather than waiting
14929         for configure's at-exit trap code to do it.
14930
14931 2005-01-18  Jim Meyering  <jim@meyering.net>
14932
14933         * lib/version-etc.c (version_etc_copyright): Update copyright date.
14934
14935         * lib/utimens.c (futimens): Account for the fact that futimes
14936         can also fail with errno == ENOSYS or errno == ENOENT.
14937         Patch from Dmitry V. Levin.
14938
14939         Change the name of the robust chdir function from chdir to chdir_long.
14940         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
14941         (restore_cwd): Use chdir_long, not chdir.
14942         * lib/chdir-long.c: Renamed from chdir.c.
14943         * lib/chdir-long.h: Renamed from chdir.h.
14944         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
14945         Hurd.
14946
14947 2005-01-18  Bruno Haible  <bruno@clisp.org>
14948
14949         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
14950         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
14951         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
14952         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
14953         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
14954         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
14955         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
14956         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
14957         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
14958         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
14959         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
14960         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
14961         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
14962         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
14963         Use an all-permissive copyright notice, recommended by RMS.
14964
14965 2005-01-18  Bob Proulx  <bob@proulx.com>
14966
14967         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
14968         simplify offsetof() macro construct to avoid compile failure with
14969         native HP-UX 11.0 ANSI C compiler.
14970
14971 2005-01-17  Bruno Haible  <bruno@clisp.org>
14972
14973         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
14974         redundant because stpncpy.m4 takes care of it.
14975
14976 2005-01-17  Bruno Haible  <bruno@clisp.org>
14977
14978         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
14979
14980 2005-01-17  Bruno Haible  <bruno@clisp.org>
14981
14982         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
14983         used.
14984
14985 2005-01-17  Bruno Haible  <bruno@clisp.org>
14986
14987         * lib/fwriteerror.h (fwriteerror): Change specification to include
14988         fclose.
14989         * lib/fwriteerror.c: Include <stdbool.h>.
14990         (fwriteerror): At the end, close the file stream. Record whether
14991         stdout was already closed.
14992
14993 2005-01-17  Bruno Haible  <bruno@clisp.org>
14994
14995         * lib/execute.c (environ): Declare if needed.
14996         * lib/pipe.c (environ): Likewise.
14997         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
14998
14999 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15000
15001         * modules/argp: Depend on vsnprintf
15002
15003 2005-01-10  Jim Meyering  <jim@meyering.net>
15004
15005         * modules/closeout (Depends-on): Add atexit.
15006
15007 2005-01-06  Bruno Haible  <bruno@clisp.org>
15008
15009         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
15010
15011 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
15012
15013         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
15014         definitions to be after all include files, to avoid collisions.
15015         Problem reported by Bob Proulx.
15016
15017 2005-01-04  Jim Meyering  <jim@meyering.net>
15018
15019         Changes imported from coreutils.
15020         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
15021         as the mkstemp template, use a temporary directory and an
15022         8.3-friendly template to avoid trouble on systems like DJGPP.
15023         Reported by Juan M. Guerrero via Stepan Kasal.
15024         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
15025         close. Remove the temporary directory right away, rather than waiting
15026         for configure's at-exit trap code to do it.
15027         Suggestion from Stepan Kasal.
15028
15029 2005-01-01  Simon Josefsson  <jas@extundo.com>
15030
15031         * gnulib-tool: Print #include directives when --import'ing.
15032
15033 2004-12-28  Simon Josefsson  <jas@extundo.com>
15034
15035         * tests/test-base64.c: Include required header files.  Remove
15036         unused variables.
15037
15038 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15039
15040         * modules/error (Depends-on): Remove gettext.
15041
15042 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
15043
15044         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
15045         not needed.  This removes a dependency on the gettext module.
15046         [defined _LIBC]: Do not include <libintl.h>; not needed.
15047
15048 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15049
15050         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
15051         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
15052
15053 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
15054
15055         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
15056         HAVE_DECL_STRTOLD.
15057
15058 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15059
15060         * modules/getdate (Depends-on): Remove alloca-opt.
15061
15062 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15063
15064         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
15065
15066 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
15067
15068         * lib/argp-parse.c: Include <stddef.h>.
15069         (alignof, alignto): New macros.
15070         (parser_init): Don't assume that void * is aligned sufficiently
15071         for struct option.
15072
15073         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
15074         need to extend the stack.
15075         (YYINITDEPTH): New macro, so that the initial stack isn't overly
15076         large.
15077
15078 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15079
15080         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
15081
15082 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15083
15084         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
15085         (2004-10-24) change.  Apparently this was a false alarm.
15086
15087         * modules/getdate: Depend on alloca-opt, not alloca.
15088
15089 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
15090
15091         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
15092         Remove now-obsolete comment about AIX.
15093         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
15094         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
15095         (YYMAXDEPTH): New macro.
15096
15097 2004-12-18  Simon Josefsson  <jas@extundo.com>
15098
15099         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
15100
15101 2004-12-18  Bruno Haible  <bruno@clisp.org>
15102
15103         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
15104
15105 2004-12-18  Bruno Haible  <bruno@clisp.org>
15106
15107         * lib/fatal-signal.c (fatal_signals): Make non-const.
15108         (init_fatal_signals): New function.
15109         (uninstall_handlers, install_handlers): Ignore signals that were set to
15110         SIG_IGN.
15111         (at_fatal_signal): Call init_fatal_signals.
15112         (init_fatal_signal_set): Likewise. Ignore signals that were set to
15113         SIG_IGN.
15114         Reported by Paul Eggert.
15115
15116 2004-12-18  Bruno Haible  <bruno@clisp.org>
15117
15118         * doc/alloca.texi: New file.
15119         * doc/alloca-opt.texi: New file.
15120
15121 2004-12-17  Jim Meyering  <jim@meyering.net>
15122
15123         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
15124         Otherwise, install-sh could exit with improper exit status when
15125         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
15126
15127 2004-12-16  Simon Josefsson  <jas@extundo.com>
15128
15129         * tests/test-base64.c: Add license.
15130
15131 2004-12-15  Stepan Kasal  <address@hidden>
15132
15133         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
15134
15135 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
15136
15137         * modules/getcwd (Files): Add m4/d-ino.m4.
15138         Suggested by Mark D. Baushke.
15139
15140 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15141
15142         * lib/getdate.y (textint): New member "negative".
15143         (time_zone_hhmm): New function.
15144         Expect 14 shift-reduce conflicts, not 13.
15145         (o_colon_minutes): New rule.
15146         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
15147         (yylex): Set the "negative" member of signed numbers.
15148
15149 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
15150
15151         * doc/getdate.texi (Time of day items, Time zone items):
15152         Describe new formats +00:00, UTC+00:00.
15153
15154 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
15155
15156         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
15157         spurious "-l"s.  Problem reported by Stepan Kasal.
15158
15159 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
15160
15161         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
15162         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
15163
15164 2004-12-04  Simon Josefsson  <jas@extundo.com>
15165
15166         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
15167         Vandoorselaere <yoann@prelude-ids.org>.
15168
15169 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15170
15171         Changes imported from coreutils.
15172         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
15173         exist.
15174         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
15175
15176 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15177
15178         Changes imported from coreutils.
15179         * lib/hard-locale.c: Assume <locale.h> exists.
15180         Include "strdup.h".
15181         (GLIBC_VERSION): New macro.
15182         (hard_locale): Assume setlocale exists.
15183         Rewrite to avoid #ifdef.
15184         Use strdup rather than malloc + strcpy.
15185         * lib/human.c: Assume <locale.h> exists.
15186         (human_readable): Assume localeconv exists.
15187
15188 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
15189
15190         * modules/hard-locale (Depends-on): Add strdup.
15191
15192 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
15193
15194         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
15195         convert T2, not T.  (Imported from libc.)
15196
15197 2004-11-30  Simon Josefsson  <jas@extundo.com>
15198
15199         * modules/restrict (License): Change to LGPL.
15200
15201 2004-11-30  Simon Josefsson  <jas@extundo.com>
15202
15203         * m4/restrict.m4: Add copyright and copying conditions.
15204
15205 2004-11-30  Simon Josefsson  <jas@extundo.com>
15206
15207         * m4/base64.m4: New file.
15208
15209 2004-11-30  Simon Josefsson  <jas@extundo.com>
15210
15211         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
15212         base64.
15213
15214         * tests/test-base64.c: New file.
15215
15216         * modules/base64: New file.
15217
15218 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15219
15220         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
15221         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
15222
15223         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
15224
15225 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
15226
15227         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
15228         (__getcwd.c): Don't restore errno; glibc doesn't.
15229         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
15230         first, falling back to our code only if its results look suspicious.
15231         Ensure that the resulting buffer is only as large as necessary.
15232
15233         * lib/readutmp.c: Include readutmp.h first.
15234         Include <errno.h>, since readutmp.h no longer does that.
15235         * lib/readutmp.h: Don't include <errno.h>,
15236         <sys/param.h>, <time.h>; not needed to establish interface.
15237         (errno): Remove decl.
15238         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
15239         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
15240         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
15241
15242 2004-11-28  Simon Josefsson  <jas@extundo.com>
15243
15244         * lib/base64.h, base64.c: New file.
15245
15246 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
15247
15248         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
15249
15250 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
15251
15252         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
15253         (Depends-on): Remove pathmax, same.  Add mempcpy.
15254         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
15255         (Makefile.am): Append getcwd.h to lib_SOURCES.
15256         (Include): Add getcwd.h.
15257         (Maintainer): Change from Jim Meyering to "all, glibc",
15258         since getdate now uses intended-for-glibc code.
15259         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
15260         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
15261
15262 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15263
15264         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
15265         HP's ANSI C compiler.
15266         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
15267         Declaring int functions causes warnings on some modern systems and
15268         shouldn't be needed to compile on ancient ones.
15269         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
15270         defined.
15271
15272         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
15273         with the following changes.
15274         (__set_errno): Parenthesize properly.
15275         Include <stdbool.h>.
15276         (MIN, MAX, MATCHING_INO): New macros.
15277         (__getcwd): Define with prototype, not K&R form.
15278         Use heuristics to allocate default buffer on stack if possible.
15279         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
15280         behavior, and to avoid the PATH_MAX limit when computing
15281         ../../../../...
15282         Use MATCHING_INO to compare inode number to file.
15283         Check for arithmetic overflow in size calculations.
15284         Fix bug in reallocation of dot array that caused getcwd to fail
15285         on directories nested deeper than 75.
15286         Be more careful about saving errno on error.
15287         Do not use realloc; use only free+malloc, as this is a bit
15288         more flexible and avoids a needless copy operation.
15289         Do not inspect st_dev and st_ino for symbolic links; POSIX
15290         doesn't specify the latter.
15291         Check for closedir errors.
15292         Avoid needless casts.
15293         Use "#ifdef weak_alias" around weak_alias, to be like other
15294         glibc code.
15295         The following changes to getcwd.c have effect only when used in
15296         gnulib; they have no effect inside glibc proper.
15297         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
15298         as alloca isn't used.
15299         (alloca, __alloca): Likewise.
15300         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
15301         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
15302         unconditionally, as gnulib assumes C89 or better.
15303         Do not include <sys/param.h>.
15304         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
15305         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
15306         better.
15307         (NULL) [!defined NULL]: Remove; we assume C89 or better.
15308         Include <dirent.h> in a way that is compatible with modern Autoconf.
15309         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
15310         New macros, if not already defined.
15311         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
15312         Use "_LIBC", not "defined _LIBC", for consistency.
15313         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
15314         a mempcpy module.
15315         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
15316         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
15317         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
15318         credit only to Jim Meyering and adjust the copyright dates.
15319         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
15320         <stdlib.h>, <unistd.h>, "pathmax.h".
15321         Instead, include "xgetcwd.h" (first) and "getcwd.h".
15322         (INITIAL_BUFFER_SIZE): Remove.
15323         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
15324
15325 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
15326
15327         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
15328         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
15329         Use the _ONCE methods, for efficiency.
15330         Check for fcntl.h.  In test program, include <errno.h>
15331         and <fcntl.h> if available.  Remove old K&R cruft from
15332         test program.  Check for common errors in GNU/Linux,
15333         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
15334         don't do AC_LIBOBJ, as that's getcwd.m4's job.
15335         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
15336         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
15337         name accordingly.
15338         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
15339         accommodate new getcwd.c.
15340         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
15341         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
15342         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
15343         that's all we need now.
15344
15345 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15346
15347         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
15348         argp-parse.c depends on getopt internals, that means we should
15349         always use our getopt, to be on the safe side.
15350         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
15351         order not to spoil the result of an eventual previous invocation
15352         of gl_GETOPT_SUBSTITUTE.
15353
15354 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15355
15356         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
15357         redefinition warnings. To avoid them, include the defines
15358         in `#if !defined __need_getopt ... #endif'. The only place
15359         where __getopt_argv_const is used is in definitions
15360         of getopt_long and getopt_long_only below, which are as well
15361         protected by `#ifndef __need_getopt'.
15362         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
15363         __need_getopt after including <stdio.h> and <unistd.h> These
15364         headers might have defined it.
15365
15366 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15367
15368         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
15369
15370 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
15371
15372         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
15373         (futimens): New function, which uses futimes if available.
15374         (futimens, utimens): Support timespec==NULL, with same semantics
15375         as utime and utimens.
15376         * lib/utimens.h (futimens): New decl.
15377
15378 2004-11-23  Jim Meyering  <jim@meyering.net>
15379
15380         * lib/getopt_.h: Remove trailing blanks.
15381
15382 2004-11-23  Jim Meyering  <jim@meyering.net>
15383
15384         * lib/__fpending.c: Add comment.
15385
15386 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
15387
15388         * modules/canonicalize (Depends-on): Add xreadlink.
15389         Problem reported by James Youngman.
15390
15391 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
15392
15393         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
15394         New macros.
15395         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
15396         optopt): Use them instead of invoking ## directly; otherwise, the
15397         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
15398
15399 2004-11-19  Bruno Haible  <bruno@clisp.org>
15400
15401         * lib/strtok_r.c: Move comments from here...
15402         * lib/strtok_r.h: ... to here.
15403
15404 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15405
15406         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
15407         implementations that mishandle size_t overflow.
15408
15409 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
15410
15411         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
15412         might fail.  Problem reported by Yoann Vandoorselaere.
15413         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
15414         implementations that mishandle size_t overflow.
15415
15416 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15417
15418         * modules/canon-host (Depends-on): Add strdup.
15419
15420 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15421
15422         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
15423
15424 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15425
15426         * lib/canon-host.c: Include "strdup.h".
15427         (canon_host): Use getaddrinfo if available, so that IPv6 works.
15428         Use strdup instead of malloc/strcpy to duplicate strings.
15429
15430         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
15431         (human_space_before_unit): New constant.
15432         * lib/human.c (human_readable): Support it.
15433
15434         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
15435         (xgetcwd): Set errno correctly when failing.
15436         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
15437         the failure is actually due to a PATH_MAX problem.
15438
15439         Further getopt changes to make it more likely that glibc will
15440         buy the changes back.
15441         * lib/getopt.c (POSIXLY_CORRECT): New constant.
15442         (getopt): Use it, so to preserve glibc semantic
15443         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
15444         when compiling for libc.
15445         * lib/getopt_.h (__getopt_argv_const): Bring it back.
15446         (getopt_long, getopt_long_only): Use it.
15447
15448         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15449         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
15450         (getopt): Argv is now char * const *, as per standard.
15451         (_getopt_internal_r, _getopt_internal): Argv is now char **,
15452         not char *__getopt_argv_const *.
15453         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15454         _getopt_long_only_r): Likewise.
15455         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
15456         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15457         _getopt_long_r, _getopt_long_only_r): Likewise.
15458         * lib/getopt_.h (__getopt_argv_const): Remove.
15459         (getopt): Argv is now char * const *, as per standard.
15460
15461         * lib/getdate.y (tORDINAL): New token.
15462         (day, relunit): Allow it for relative times.
15463         (relative_time_table): Use tORDINAL for ordinals.
15464
15465 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
15466
15467         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
15468         Document that "second" isn't allowed as an ordinal number.
15469
15470 2004-11-16  Jim Meyering  <jim@meyering.net>
15471
15472         * modules/closeout (Depends-on): Add fpending.
15473
15474 2004-11-15  Jim Meyering  <jim@meyering.net>
15475
15476         * lib/closeout.c: Include "__fpending.h" once again.
15477         Include <stdbool.h>.
15478         (close_stdout): Don't fail just because stdout was closed initially,
15479         since some programs don't write to stdout in the normal course of
15480         operation (other than --version and --help), and we don't want this
15481         function to make e.g. `touch file >&-' fail.
15482         But do fail if it was closed and someone has tried to write to it.
15483         E.g., `printf foo >&-' must fail.
15484
15485 2004-11-13  Jim Meyering  <jim@meyering.net>
15486
15487         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
15488
15489 2004-11-12  Simon Josefsson  <jas@extundo.com>
15490
15491         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
15492         small doc fix is still pending.
15493
15494 2004-11-11  Simon Josefsson  <jas@extundo.com>
15495
15496         * modules/strtok_r: New file.
15497
15498         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15499         strtok_r.
15500
15501 2004-11-11  Simon Josefsson  <jas@extundo.com>
15502
15503         * m4/strtok_r.m4: New file.
15504
15505         * m4/getopt.m4: Replace opterr.
15506
15507 2004-11-11  Simon Josefsson  <jas@extundo.com>
15508
15509         * lib/strtok_r.h, strtok_r.c: New file.
15510
15511 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15512
15513         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
15514         of replacing opterr, getopt, etc.  This should handle the
15515         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
15516
15517 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
15518
15519         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
15520         we can stop lying to compilers about the constness of argv when we
15521         are compiled outside glibc.
15522         (getopt, getopt_long, getopt_long_only): Use it.
15523         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
15524         _getopt_internal, getopt): Likewise.
15525         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
15526         _getopt_long_only_r): Likewise.
15527         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
15528         _getopt_long_r, _getopt_long_only_r): Likewise.
15529
15530         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
15531         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
15532         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
15533         the other external symbols.
15534         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
15535         declaration, since the above renaming now works around collisions.
15536
15537 2004-11-11  Jim Meyering  <jim@meyering.net>
15538
15539         * lib/linebreak.c: Remove trailing blanks.
15540         * lib/alloca_.h: Likewise.
15541         * lib/acosl.c: Likewise.
15542         * lib/euidaccess.c: Likewise.
15543         * lib/allocsa.h: Likewise.
15544
15545 2004-11-10  Simon Josefsson  <jas@extundo.com>
15546
15547         * m4/getaddrinfo.m4: New file.
15548
15549 2004-11-10  Simon Josefsson  <jas@extundo.com>
15550
15551         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
15552
15553 2004-11-10  Simon Josefsson  <jas@extundo.com>
15554
15555         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
15556         getaddrinfo.
15557
15558         * modules/getaddrinfo: New file.
15559
15560 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15561
15562         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
15563
15564 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
15565
15566         * lib/mktime.c (SHR): New macro, which is a portable
15567         substitute for >> that should work even on Crays.
15568         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
15569         Problem reported by Mark D. Baushke in
15570         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
15571         * lib/getdate.y (SHR): Likewise.
15572         (tm_diff): Use it.
15573         * lib/strftime.c (SHR): Likewise.
15574         (tm_diff): Use it.
15575         * lib/quotearg.c (struct quoting_options): Use unsigned int for
15576         quote_these_too, so that right shifts are well defined.  All uses
15577         changed.
15578
15579 2004-11-10  Jim Meyering  <jim@meyering.net>
15580
15581         Ensure that no close failure goes unreported.
15582         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
15583         return early when it seems there's nothing to flush.
15584         Don't include __fpending.h.
15585
15586 2004-11-10  Jim Meyering  <jim@meyering.net>
15587
15588         * modules/closeout (Depends-on): Remove fpending.
15589
15590 2004-11-10  Jim Meyering  <jim@meyering.net>
15591
15592         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
15593
15594 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15595
15596         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
15597         gl_FUNC_STRFTIME.
15598         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
15599         and AC_REQUIRE when possible, to avoid duplicate checks.
15600         Check for <wchar.h>.
15601
15602 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
15603
15604         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
15605
15606 2004-11-09  Bruno Haible  <bruno@clisp.org>
15607
15608         * m4/sockpfaf.m4: New file.
15609
15610 2004-11-05  Bruno Haible  <bruno@clisp.org>
15611
15612         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
15613         Reported by Mark D. Baushke <mdb@cvshome.org>.
15614
15615 2004-11-04  Bruno Haible  <bruno@clisp.org>
15616
15617         2004-09-11  Bruno Haible  <bruno@clisp.org>
15618                 * allocsa.valgrind: New file.
15619         2004-02-06  Bruno Haible  <bruno@clisp.org>
15620                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
15621                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
15622                 Reported by Christopher Seip <chris.seip@hp.com>.
15623
15624 2004-11-04  Bruno Haible  <bruno@clisp.org>
15625
15626         * modules/allocsa (Files): Add lib/allocsa.valgrind.
15627         (Makefile.am): Distribute it.
15628
15629 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
15630
15631         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
15632         with errno == ERANGE if the buffer is too small.
15633         Problem reported by Mark D. Baushke.
15634
15635 2004-11-03  Albert Chin  <china@thewrittenword.com>
15636             Paul Eggert  <eggert@cs.ucla.edu>
15637
15638         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
15639         equivalent, substitute $ac_type for equivalent type rather than
15640         blindly using uint32_t *always* which won't work if uint32_t is not
15641         available.  Define _UINT32_T to work around typedef of uint32_t if
15642         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
15643         2.5.1.
15644
15645 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15646
15647         * m4/jm-macros.m4: Sync from coreutils.
15648         (gl_MACROS): Check for mbrlen, for pathchk.
15649         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
15650
15651 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15652
15653         * lib/xreadlink.c (MAXSIZE): New macro.
15654         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
15655         size does not exceed MAXSIZE.  Avoid cast.
15656         As suggested by Mark D. Baushke in
15657         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
15658         if readlink fails with buffer size just under MAXSIZE, try again
15659         with MAXSIZE.
15660
15661 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
15662
15663         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
15664
15665 2004-11-02  Derek R. Price  <derek@ximbiot.com>
15666         and  Paul Eggert  <eggert@cs.ucla.edu>
15667
15668         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
15669         (get_date): Overparenthesize to avoid GCC warning.
15670
15671 2004-11-02  Bruno Haible  <bruno@clisp.org>
15672
15673         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
15674         returns void.
15675
15676 2004-11-02  Bruno Haible  <bruno@clisp.org>
15677
15678         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
15679         function returns void.
15680
15681 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15682
15683         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
15684         fflush_unlocked, flockfile, funlockfile, funlockfile,
15685         fputs_unlocked, putc_unlocked.
15686
15687 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
15688
15689         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15690         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
15691         already declared.
15692
15693 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15694
15695         * modules/getdate (Files): Add doc/getdate.texi.
15696         (Depends-on): Add setenv, xalloc.
15697
15698 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15699
15700         * lib/getdate.y: Add support for TZ="foo" within a date string.
15701         Fix some bugs near time_t boundaries.  Reject dates with
15702         out-of-range components, e.g., "Sept 31".
15703         Include <stdlib.h>, "setenv.h", "xalloc.h".
15704         (ISDIGIT_LOCALE): Remove; unused.
15705         Note that the TZ and time functions used here are not reentrant.
15706         (mktime_ok, get_tz): New functions.
15707         (TZBUFSIZE): New constant.
15708         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
15709         This requires that we sometimes generate our own TZ="XXX..." setting.
15710
15711 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
15712
15713         * doc/getdate.texi: New file, from coreutils with modifications for
15714         the new TZ parsing.
15715
15716 2004-10-27  Derek R. Price  <derek@ximbiot.com>
15717
15718         * lib/mktime.c (not_equal_tm): Remove redundant check.
15719
15720 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15721
15722         * modules/regex (lib_SOURCES): Add regex.c.
15723         Reported by James Youngman in
15724         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
15725
15726 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
15727
15728         * lib/getdate.y: Use Bison 1.875 features, and some minor
15729         code cleanups.  This change does not affect semantics.
15730         Don't include <stdlib.h>; no longer needed.
15731         Don't include unlocked-io.h; only the "#if TEST" code uses
15732         stdio, and performance isn't crucial there.
15733         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
15734         Bison 1.875 features as described below.
15735         All uses of "PC." replaced by "pc->".
15736         (YYSTYPE): Add a forward declaration.
15737         (yylex, yyerror): Use full prototypes in forward decls.
15738         Use "%pure-parser" rather than obsolescent "%pure_parser".
15739         Use %parse-param and %lex-param instead of obsolescent
15740         YYPARSE_PARAM and YYLEX_PARAM.
15741         (meridian_table, month_and_day_table, time_units_table,
15742         relative_time_table, time_zone_table, military_table,
15743         lookup_zone, lookup_word, get_date):
15744         Use NULL instead of 0 where appropriate.
15745         (to_hour): Avoid abort (), to avoid a dependency on
15746         stdlib.h.
15747         (yyerror, yylex): Now accepts parser_control * arg.
15748         (main) [TEST]: Use '\0' rather than 0 for char.
15749
15750 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15751
15752         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
15753
15754 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
15755
15756         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
15757         It's now the caller's responsibility to handle the case where
15758         !HAVE_GETPAGESIZE && !defined getpagesize.
15759
15760         * lib/mktime.c (leapyear): Arg is long int, not int.
15761
15762 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
15763
15764         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
15765
15766 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
15767
15768         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
15769         missing.  Problem reported by James Youngman.
15770
15771 2004-10-16  Simon Josefsson  <jas@extundo.com>
15772
15773         * gnulib-tool: Fix comments.  Fix parse problem.
15774         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
15775
15776 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
15777
15778         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
15779         implementation of getopt_long.  Problem reported by Alexander Taler in:
15780         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
15781
15782 2004-10-15  Bruno Haible  <bruno@clisp.org>
15783
15784         * gnulib-tool: Untabify. Initialize supplied_libname.
15785         (func_usage): More homogenous output.
15786         (func_modules_transitive_closure, func_modules_to_filelist,
15787         func_emit_lib_Makefile_am): New functions.
15788         (func_import): New function, extracted from big case statement. Use
15789         func_get_license, func_modules_transitive_closure,
15790         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
15791         opt_lgpl. Don't use test -a, as it's not portable.
15792         (func_create_testdir): Use func_modules_transitive_closure,
15793         func_modules_to_filelist, func_emit_lib_Makefile_am.
15794
15795 2004-10-15  Bruno Haible  <bruno@clisp.org>
15796
15797         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
15798
15799 2004-10-15  Bruno Haible  <bruno@clisp.org>
15800
15801         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
15802         the portions belonging to each module.
15803         Suggested by Derek Robert Price <derek@ximbiot.com>.
15804
15805 2004-10-12  Simon Josefsson  <jas@extundo.com>
15806
15807         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
15808         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
15809         to real functions.
15810
15811 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15812
15813         * modules/vsnprintf: New file.
15814
15815 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15816
15817         * m4/vsnprintf.m4: New file.
15818
15819 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15820
15821         * lib/vsnprintf.h: New file.
15822         * lib/vsnprintf.c: New file.
15823
15824 2004-10-11  Bruno Haible  <bruno@clisp.org>
15825
15826         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
15827         vsnprintf.
15828
15829 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
15830
15831         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
15832
15833 2004-10-07  Bruno Haible  <bruno@clisp.org>
15834
15835         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
15836         fits into the provided buffer.
15837
15838 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
15839
15840         * lib/diacrit.c, diacrit.h: Add GPL notice.
15841
15842         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
15843         notice.
15844         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
15845         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
15846         This avoids a potential constant-folding bug.
15847
15848 2004-10-05  Bruno Haible  <bruno@clisp.org>
15849
15850         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
15851         for the declaration of strsep.
15852
15853 2004-10-05  Bruno Haible  <bruno@clisp.org>
15854
15855         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
15856
15857 2004-10-04  Simon Josefsson  <jas@extundo.com>
15858
15859         * modules/memmem: New file.
15860         * tests/test-memmem.c: New file.
15861         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
15862
15863 2004-10-04  Simon Josefsson  <jas@extundo.com>
15864
15865         * m4/memmem.m4: New file.
15866
15867 2004-10-04  Simon Josefsson  <jas@extundo.com>
15868
15869         * lib/memmem.h: New file.
15870         * lib/memmem.c: New file, taken from glibc.
15871
15872 2004-10-04  Simon Josefsson  <jas@extundo.com>
15873
15874         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
15875         '#ifdef USE_UNLOCKED_IO'.
15876
15877 2004-10-04  Simon Josefsson  <jas@extundo.com>
15878
15879         * config/srclist.txt: Add memmem from glibc.
15880
15881 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15882
15883         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
15884
15885         * modules/argmatch, modules/argp, modules/closeout, modules/error,
15886         modules/exclude, modules/getdate, modules/getline,
15887         modules/getndelim2, modules/getpass, modules/getpass-gnu,
15888         modules/getusershell, modules/linebuffer, modules/md5,
15889         modules/mountlist, modules/posixtm, modules/readtokens,
15890         modules/readutmp, modules/regex, modules/sha1,
15891         modules/version-etc, modules/yesno:
15892         Remove dependency on unlocked-io.
15893
15894 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15895
15896         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
15897
15898         * m4/unlocked-io.m4: Add copyright notice.
15899         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
15900
15901 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15902
15903         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
15904         * lib/xmalloc.c (xmemdup): Likewise.
15905         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
15906         XFREE): Remove these long-obsolescent macros.
15907         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
15908         * lib/xstrdup.c: Remove.
15909
15910         * lib/regex.c (re_comp): Cast gettext return value to char *,
15911         Problem reported by Martin Neitzel via Mark D. Baushke.
15912
15913 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
15914
15915         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
15916         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
15917         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
15918         regex.c, sha1.c, version-etc.c, yesno.c:
15919         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
15920         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
15921         the includer's responsibility.
15922
15923         Sync from coreutils.
15924
15925         * lib/modechange.c (mode_compile): Don't decrement a pointer that
15926         points to the start of a string, as the C Standard says the
15927         resulting behavior is undefined.
15928
15929         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
15930         simple -> simple_backups, numbered_existing ->
15931         numbered_existing_backups, numbered -> numbered_backups
15932         to avoid shadowing problems.  All uses changed.
15933         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
15934         * lib/backupfile.c (check_extension, numbered_backup):
15935         Rename locals to avoid shadowing 'basename'.
15936         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
15937         once.
15938
15939         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
15940         * lib/.cvsignore: Add getopt.h.
15941
15942 2004-10-04  Bruno Haible  <bruno@clisp.org>
15943
15944         * modules/README: New file.
15945         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
15946         not a module.
15947
15948 2004-10-02  Jim Meyering  <jim@meyering.net>
15949
15950         * lib/dirfd.h, getpagesize.h: Add copyright notice.
15951
15952 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15953
15954         * modules/strsep: New file.
15955
15956 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15957
15958         * m4/strsep.m4: New file.
15959
15960 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
15961
15962         * lib/strsep.h: New file.
15963         * lib/strsep.c: New file.
15964
15965 2004-10-01  Simon Josefsson  <jas@extundo.com>
15966
15967         * lib/snprintf.c (snprintf): Handle size==0.
15968
15969 2004-10-01  Simon Josefsson  <jas@extundo.com>
15970             Bruno Haible  <bruno@clisp.org>
15971
15972         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
15973         (snprintf): Declare 'args'.
15974
15975 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
15976
15977         * lib/snprintf.c: Remove comments as to why each header is needed.
15978
15979 2004-10-01  Bruno Haible  <bruno@clisp.org>
15980
15981         * MODULES.html.sh: Add strsep.
15982
15983 2004-09-30  Simon Josefsson  <jas@extundo.com>
15984
15985         * modules/snprintf: New file.
15986
15987 2004-09-30  Simon Josefsson  <jas@extundo.com>
15988
15989         * m4/snprintf.m4: New file.
15990
15991 2004-09-30  Simon Josefsson  <jas@extundo.com>
15992
15993         * lib/snprintf.h, lib/snprintf.c: New files.
15994
15995 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
15996
15997         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
15998         (hol_entry_help): Never translate an empty string.
15999         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
16000         * lib/argp.h (OPTION_NO_TRANS): New option.
16001
16002 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16003
16004         * modules/argp (Maintainer): Replace Simon Josefsson
16005         by Sergey Poznyakoff.
16006
16007 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16008
16009         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
16010         changes merged back into glibc.
16011
16012 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
16013
16014         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
16015
16016 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
16017
16018         * lib/xvasprintf.c: Include xalloc.h.
16019         (xvasprintf): Use xalloc_die, not xmalloc_die.
16020
16021 2004-09-29  Bruno Haible  <bruno@clisp.org>
16022
16023         * modules/alloca-opt: New file, derived from modules/alloca.
16024         * modules/allocsa: Depend on alloca-opt instead of alloca.
16025         * modules/setenv: Likewise.
16026         * modules/vasnprintf: Likewise.
16027         * MODULES.html.sh: Add alloca-opt.
16028
16029 2004-09-28  Simon Josefsson  <jas@extundo.com>
16030
16031         * gnulib-tool: New parameter --lgpl, to asseert that modules are
16032         LGPL, and to replace license template from GPL to LGPL.
16033
16034 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16035
16036         * modules/dummy: Change license to LGPL.
16037
16038 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
16039
16040         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
16041
16042 2004-09-24  Simon Josefsson  <jas@extundo.com>
16043
16044         * modules/minmax (License): Change from GPL to LGPL.
16045
16046 2004-09-23  Simon Josefsson  <jas@extundo.com>
16047
16048         * gnulib-tool (--import): Typo.
16049
16050 2004-09-23  Simon Josefsson  <jas@extundo.com>
16051
16052         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
16053
16054 2004-09-22  Bruno Haible  <bruno@clisp.org>
16055
16056         * modules/*: Add 'License' field.
16057         * gnulib-tool: Accept --extract-license option.
16058         (func_get_license): New function.
16059
16060 2004-09-21  Bruno Haible  <bruno@clisp.org>
16061
16062         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
16063         Reported by Simon Josefsson.
16064
16065 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16066
16067         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
16068         gl_AC_TYPE_LONG_LONG.
16069
16070 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
16071
16072         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
16073
16074 2004-09-18  Simon Josefsson  <jas@extundo.com>
16075         and  Paul Eggert  <eggert@cs.ucla.edu>
16076
16077         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
16078         calls with autoreconf.  Define GL_LIB.
16079
16080 2004-09-14  Karl Berry  <karl@gnu.org>
16081
16082         * config/srclist.txt: unsync setenv.c, sigh.
16083
16084 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16085
16086         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
16087         Problem reported by Bruno Haible in:
16088         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
16089
16090 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
16091
16092         * config/srclist.txt: Comment out argp-pvh.c.
16093
16094 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
16095
16096         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
16097         in case some system header has #define'd it.  Problem reported by
16098         Soeren D. Schulze in
16099         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
16100
16101 2004-09-09  Karl Berry  <karl@gnu.org>
16102
16103         * regex.[ch]: delete from the root.  These were supposed to be
16104                 synced with emacs cvs, but this has not happened for about
16105                 a year, and anyway nothing else uses emacs regex.[ch].
16106                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
16107                 lib/regex[.ch] is untouched.
16108
16109 2004-09-09  Bruno Haible  <bruno@clisp.org>
16110
16111         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
16112
16113 2004-09-09  Bruno Haible  <bruno@clisp.org>
16114
16115         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
16116         modifications.
16117         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
16118
16119 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16120
16121         * modules/xvasprintf: New file.
16122         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
16123
16124 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
16125
16126         * lib/xvasprintf.h: New file.
16127         * lib/xvasprintf.c: New file.
16128         * lib/xasprintf.c: New file.
16129
16130 2004-09-08  Bruno Haible  <bruno@clisp.org>
16131
16132         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
16133
16134 2004-09-08  Bruno Haible  <bruno@clisp.org>
16135
16136         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
16137         length is > INT_MAX.
16138         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
16139         more.
16140
16141 2004-09-08  Bruno Haible  <bruno@clisp.org>
16142
16143         * lib/stdint_.h: New file, taken from GNU clisp.
16144
16145 2004-09-08  Bruno Haible  <bruno@clisp.org>
16146             Oskar Liljeblad  <oskar@osk.mine.nu>
16147
16148         * modules/stdint: New file.
16149         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
16150
16151 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16152
16153         Import from coreutils.
16154         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
16155         strings on unbounded length.  alloca's performance benefits aren't
16156         that important here.
16157         (V_STRDUP): Remove.
16158         (parse_with_separator): New function, with most of the internals
16159         of the old parse_user_spec.  Allow user to omit both user and group,
16160         for compatibility with FreeBSD.
16161         Clone only the user name, not the entire spec.
16162         Do not set *uid, *gid unless entirely successful.
16163         Avoid memory leak in some failing cases.
16164         Fix regression for USER.GROUP reported by Dmitry V. Levin in
16165         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
16166         (parse_user_spec): Rewrite to use parse_with_separator.
16167
16168 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16169
16170         * modules/userspec: Don't depend on alloca.
16171
16172 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
16173
16174         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
16175
16176 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
16177
16178         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
16179         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
16180         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
16181
16182 2004-08-16  Simon Josefsson  <jas@extundo.com>
16183
16184         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
16185         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
16186         Add --dry-run for --import.
16187         Let user provided command line parameters override configure.ac
16188         settings.
16189
16190 2004-08-12  Simon Josefsson  <jas@extundo.com>
16191
16192         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
16193         as discussed with Paul Eggert in threads rooted at
16194         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
16195         and
16196         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
16197         Before, the test was empty, and relied on ELIDE_CODE in source
16198         code.)
16199         (gl_PREREQ_GETOPT): New macro.
16200         (gl_GETOPT): Use them.
16201
16202 2004-08-12  Simon Josefsson  <jas@extundo.com>
16203
16204         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
16205         * lib/getopt_.h: Renamed from getopt.h.
16206
16207 2004-08-12  Simon Josefsson  <jas@extundo.com>
16208
16209         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
16210         Change default library name from libfoo to libgnu.
16211         Now, if you have a configure.ac that says:
16212                 gl_SOURCE_BASE(gl)
16213                 gl_M4_BASE(gl/m4)
16214                 gl_MODULES(error getopt etcetera)
16215                 gl_INIT
16216         you can import all you need by running:
16217                 ../gnulib/gnulib-tool --import
16218
16219         * modules/getopt (Files): Rename getopt.h to getopt_.h.
16220         (Makefile.am): Rewrite, use logic from argz.
16221         (Include): Use <getopt.h> instead of "getopt.h".
16222
16223 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16224
16225         * modules/argp (Files): Add m4/unlocked-io.m4.
16226         (Depends-on): Add extensions.
16227
16228 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16229
16230         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
16231         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
16232         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
16233         Check for program_invocation_name, program_invocation_short_name,
16234         flockfile, funlockfile, features.h, _getopt_long_only_r.
16235
16236 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16237
16238         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
16239         its complicated substitute.
16240         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
16241         and program_invocation_name.
16242         (__argp_basename) [!_LIBC]: Remove; the only use was
16243         replaced by its body.
16244         (__argp_short_program_name): Change condition from
16245         !defined __argp_short_program_name to
16246         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
16247         to match argp-namefrob.h.
16248         (__argp_failure): Don't assume strerror_r returns char *.
16249         * lib/argp-parse.c (N_): Define unconditionally.
16250         (argp_default_options): Fill out initializers with 0 to avoid
16251         gcc warnings.
16252
16253 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
16254
16255         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
16256         getopt1.c.
16257
16258 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16259
16260         Merge from coreutils.
16261
16262         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
16263
16264         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
16265         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
16266
16267 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16268
16269         Merge from coreutils.
16270
16271         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
16272         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
16273         for Reliant Unix 5.43.
16274
16275         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
16276         (union fooround): Use uintmax_t, not long int.
16277         The rest is a merge from libc:
16278         [defined _LIBC]: Include <shlib-compat.h>.
16279         (_obstack) [defined _LIBC]: Remove after 2.3.4.
16280
16281         * lib/settime.c (settime): Recode to avoid warning with
16282         Sun Forte C 6U2.
16283
16284         * lib/strverscmp.c: Convert to UTF-8.
16285
16286 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
16287
16288         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
16289         m4/uintmax_t.m4.
16290
16291 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16292
16293         * modules/xalloc-die: New file.
16294         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
16295
16296         * modules/md5 (Files): Add m4/uint32_t.m4.
16297         * modules/sha1: Renamed from modules/sha.
16298         (Files):
16299         Rename lib/sha.h to lib/sha1.h.
16300         Rename lib/sha.c to lib/sha1.c.
16301         Rename m4/sha.m4 to m4/sha1.m4.
16302         (lib_SOURCES): Likewise.
16303         (configure.ac): Rename gl_SHA to gl_SHA1.
16304         (Include): sha.h -> sha1.h.
16305
16306 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16307
16308         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
16309         * m4/sha1.m4: Renamed from sha.m4.
16310         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
16311
16312 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
16313
16314         * lib/obstack.h (obstack_empty_p):
16315         Don't assume that chunk->contents is suitably aligned.
16316         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
16317         Likewise. Problem reported by Benno in
16318         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
16319
16320         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
16321         readable.  This could be improved further but it'd take some work.
16322
16323 2004-08-08  Simon Josefsson  <jas@extundo.com>
16324
16325         * modules/xgethostname (Depends-on): Remove exit and error (not
16326         used).
16327
16328         * modules/getpass-gnu: Add getpass.h.
16329         (Depends-on): Add stdbool.
16330         * modules/getpass: Add getpass.h.
16331
16332 2004-08-08  Simon Josefsson  <jas@extundo.com>
16333
16334         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
16335         Check getpass declaration.
16336
16337 2004-08-08  Simon Josefsson  <jas@extundo.com>
16338
16339         * lib/xgethostname.c: Don't include error.h (not used).
16340
16341         * lib/getpass.h: Add.
16342         * lib/getpass.c: Include getpass.h first.
16343
16344 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
16345
16346         * lib/xalloc-die.c: New file.
16347         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
16348         All uses removed.
16349         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
16350         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
16351         xalloc-die.c.
16352         (_, N_, xalloc_die): Move to xalloc-die.c.
16353         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
16354         so that we needn't mess with xalloc_msg_memory_exhausted.
16355
16356         * lib/sha1.h: Renamed from sha.h.
16357         (SHA1_H): Renamed from _SHA_H.
16358         (sha1_ctx): Renamed from sha_ctx.
16359         (sha1_init_ctx): Renamed from sha_init_ctx.
16360         (sha1_process_block): Renamed from sha_process_block.
16361         (sha1_process_bytes): Renamed from sha_process_bytes.
16362         (sha1_finish_ctx): Renamed from sha_finish_ctx.
16363         (sha1_read_ctx): Renamed from sha_read_ctx.
16364         (sha1_stream): Renamed from sha_stream.
16365         (sha1_buffer): Renamed from sha_buffer.
16366         * lib/sha1.c: Likewise; renamed from sha.c.
16367         Do not include <sys/types.h>.
16368         Include <stddef.h> rather than <stdlib.h>.
16369
16370 2004-08-08  Bruno Haible  <bruno@clisp.org>
16371
16372         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
16373         FILESYSTEM_PREFIX_LEN.
16374         * lib/progreloc.c: Likewise.
16375         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
16376
16377 2004-08-06  Simon Josefsson  <jas@extundo.com>
16378
16379         * modules/progname (Depends-on): Don't depend on stdbool.
16380
16381 2004-08-06  Simon Josefsson  <jas@extundo.com>
16382
16383         * modules/getsubopt: New file.
16384         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
16385         getsubopt.
16386
16387 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16388
16389         More merge from coreutils.
16390
16391         * m4/utimens.m4, m4/utimecmp.m4: New files.
16392         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
16393         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
16394         prereq.m4, sha.m4: Import changes from coreutils.
16395
16396 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16397
16398         More merge from coreutils.
16399         * modules/raise, modules/readtokens0, modules/utimens:
16400         * modules/utimecmp, module/xnanosleep: New files.
16401         * modules/strftime: Add lib/strftime.h.
16402         Change include from <time.h> to "strftime.h".
16403         * modules/yesno: Add lib/yesno.h.
16404         * modules/backupfile: Remove lib/addext.c.
16405         * modules/euidaccess: Add stat-macros.h.
16406         * modules/canonicalize, modules/euidaccess,
16407         modules/filemode, modules/lchown, modules/makepath,
16408         modules/rmdir, modules/stat: Likewise.
16409
16410 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
16411
16412         Merge from tar.
16413         * lib/argp-help.c (make_hol, hol_append): Don't assume that
16414         SIZE_MAX is a valid preprocessor constant.
16415         (__argp_basename): Change from "#ifndef _LIBC"
16416         to "#ifndef __argp_short_program_name", so that
16417         we don't compile these functions for tar.
16418
16419         More merges from coreutils.
16420         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
16421         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
16422         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
16423         * lib/addext.c: Remove; no longer needed.
16424         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
16425         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
16426         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
16427         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
16428         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
16429         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
16430         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
16431         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
16432         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
16433         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
16434         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
16435         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
16436         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
16437         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
16438         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
16439         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
16440         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
16441         Import changes from coreutils.
16442
16443 2004-08-05  Simon Josefsson  <jas@extundo.com>
16444
16445         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
16446
16447 2004-08-05  Simon Josefsson  <jas@extundo.com>
16448
16449         * m4/getsubopt.m4: New file.
16450
16451 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16452
16453         Merge from coreutils.
16454
16455         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
16456         * m4/getcwd-path-max.m4: New files.
16457
16458         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
16459         FILESYSTEM_PREFIX_LEN ->
16460         FILE_SYSTEM_PREFIX_LEN.
16461         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
16462         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
16463         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
16464         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
16465
16466         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
16467         prerequisite modules now handle the DOS stuff.
16468         Don't check for unistd.h.
16469
16470 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16471
16472         Merge from coreutils.
16473
16474         * lib/.gdb-history: Remove; this doesn't belong here.
16475
16476         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
16477         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
16478         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
16479         * lib/getcwd.c: New files.
16480
16481         * lib/dirname.h: Include <stdbool.h>.
16482         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
16483         for consistency with POSIX terminology.  All uses changed.
16484         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
16485         (strip_trailing_slashes): Use bool for booleans.
16486         * lib/stripslash.c (strip_trailing_slashes): Likewise.
16487
16488         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
16489         sometimes returns a positive errno value even when it succeeds.
16490         (print_errno_message) [!LIBC]: Fall back on strerror if
16491         __strerror_r fails.
16492
16493         * lib/path-concat.c (mempcpy): Don't define if a system header defines
16494         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
16495         (longest_relative_suffix): New function.
16496         (path_concat): Use it.  Assume first argument is not NULL.
16497         Port to DOS.  Omit redundant separators.
16498         Report an error instead of returning NULL.
16499         Use mempcpy instead of memcpy.
16500         (xpath_concat): Remove: not declared or used.
16501
16502         * lib/same.h: Include <stdbool.h>
16503         (same_name): Return bool, not int.
16504         * lib/same.c (same_name): Likewise.
16505         (errno): Don't declare; we assume C89 or better now.
16506
16507         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
16508         if not already defined.
16509
16510         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
16511         * lib/dup-safer.c (errno): Likewise.
16512
16513 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
16514
16515         Merge from coreutils.
16516         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
16517         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
16518         * modules/path-concat: Don't depend on strdup.
16519
16520 2004-08-03  Simon Josefsson  <jas@extundo.com>
16521
16522         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
16523         * lib/progname.h: Don't include stdbool.h.
16524
16525 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16526
16527         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
16528         * MODULES.html.sh (func_all_modules): Remove fatal.
16529
16530 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16531
16532         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
16533
16534 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
16535
16536         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
16537         working.
16538
16539 2004-08-02  Simon Josefsson  <jas@extundo.com>
16540
16541         * lib/getsubopt.h: New file, with comments from Bruno Haible.
16542         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
16543         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
16544
16545 2004-08-01  Simon Josefsson  <jas@extundo.com>
16546
16547         * lib/xgetdomainname.c: Include stdlib.h, for free().
16548
16549 2004-07-19  Bruno Haible  <bruno@clisp.org>
16550
16551         * MODULES.html.sh (func_all_modules): Add dummy.
16552
16553 2004-07-16  Simon Josefsson  <jas@extundo.com>
16554
16555         * modules/dummy: New file.
16556
16557 2004-07-16  Simon Josefsson  <jas@extundo.com>
16558
16559         * lib/dummy.c: New file.
16560
16561 2004-07-16  Bruno Haible  <bruno@clisp.org>
16562
16563         * lib/backupfile.h: Add extern "C" for C++.
16564         * lib/closeout.h: Likewise.
16565         * lib/copy-file.h: Likewise.
16566         * lib/findprog.h: Likewise.
16567         * lib/full-write.h: Likewise.
16568         * lib/pathname.h: Likewise.
16569         * lib/progname.h: Likewise.
16570         * lib/stpcpy.h: Likewise.
16571         * lib/stpncpy.h: Likewise.
16572         * lib/strcase.h: Likewise.
16573         * lib/strstr.h: Likewise.
16574         * lib/xalloc.h: Likewise.
16575
16576         * lib/mbswidth.h: Add extern "C" for C++.
16577         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
16578
16579 2004-07-13  Robert Millan  <robertmh@gnu.org>
16580
16581         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
16582
16583 2004-07-09  Simon Josefsson  <jas@extundo.com>
16584
16585         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
16586         failed without this.)
16587
16588 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16589
16590         * modules/chown (Files): Add lib/fchown-stub.c, since
16591         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
16592
16593 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
16594
16595         * lib/fchown-stub.c: New file.
16596
16597 2004-06-24  Jim Meyering  <jim@meyering.net>
16598
16599         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
16600
16601 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16602
16603         * modules/argz: Omit "#include".
16604
16605         * MODULES.html.sh (func_all_modules): Add calloc, to match
16606         2004-06-01 addition of calloc module.
16607
16608 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16609
16610         * m4/argz.m4: New file, which is autoupdated from libtool.
16611
16612 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16613
16614         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
16615         libtool.
16616
16617 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
16618
16619         * config/srclist-update: Don't insist on "USA." before the
16620         close-comment, as libtool omits the period and puts the */ on a
16621         separate line.
16622         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
16623         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
16624
16625 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
16626
16627         * modules/argz: New file.
16628         * MODULES.html.sh (func_all_modules): Add argz.
16629
16630 2004-06-12  Jim Meyering  <jim@meyering.net>
16631         and  Paul Eggert  <eggert@cs.ucla.edu>
16632
16633         * modules/hash (Files): Add lib/xalloc.h.
16634         * modules/pipe (Depends-on): Add wait-process.
16635         * modules/stat (Depends-on): Add xalloc.
16636         * modules/userspec (Files): Add lib/userspec.h.
16637         * modules/xstrto
16638
16639         Upgrade from gettext-0.13.
16640         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
16641         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
16642         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
16643
16644 2004-06-10  Jim Meyering  <jim@meyering.net>
16645
16646         * lib/calloc.c: New file.
16647
16648 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
16649
16650         * lib/getdate.y (yylex): Allow space between sign and number.
16651         Problem reported by Dan Jacobson.
16652
16653 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16654
16655         Merge from coreutils CVS.
16656
16657         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
16658         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
16659         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
16660         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
16661         xstrtol.m4: Fix copyright date and/or serial number.
16662
16663         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
16664         See if we need an fchown replacement.
16665         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
16666         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
16667         and use the replacement function if we detect either defect.
16668
16669         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
16670         gl_UTIMECMP.
16671
16672 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
16673         and  Jim Meyering  <jim@meyering.net>
16674
16675         Merge from coreutils CVS.
16676
16677         * lib/stat-macros.h: New file, with contents from file-type.h
16678         and coreutils' system.h.
16679         * lib/file-type.c: Include "stat-macros.h".
16680         * lib/file-type.h (file_type): Move all macro definitions to new file,
16681         stat-macros.h.
16682
16683         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
16684         Wrap old code with this conditional.
16685         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
16686         function that does not dereference symlinks.
16687         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
16688
16689         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
16690         dependency problems.
16691         (xreadlink): Accept new arg SIZE, for efficiency.
16692         All decls and uses changed.
16693         * lib/xreadlink.h: Include <stddef.h>, for size_t.
16694
16695         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
16696         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
16697
16698         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
16699         sysexits.h.
16700
16701 2004-06-01  Jim Meyering  <jim@meyering.net>
16702
16703         * m4/calloc.m4: New file.
16704
16705 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
16706
16707         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
16708         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
16709         Also, fix a typo in a diagnostic.
16710
16711 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16712
16713         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
16714         or AC_FUNC_REALLOC.
16715
16716 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
16717
16718         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
16719         macros to be defined.
16720         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
16721         the allocator returns NULL because the requested size is zero.
16722
16723 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
16724
16725         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
16726         var.  Add comment explaining why libc still defines it.  This
16727         merges the following patch from glibc:
16728         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
16729
16730 2004-05-20  Andreas Schwab  <schwab@suse.de>
16731
16732         * m4/free.m4: Replace free if it not known to work, not the other
16733         way round.
16734
16735 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
16736
16737         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
16738         present in glibc since revision 1.1 of this file.
16739         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
16740         obstack_alignment_mask, obstack_alloc, obstack_base,
16741         obstack_blank, obstack_blank_fast, obstack_chunk_size,
16742         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
16743         obstack_grow0, obstack_init, obstack_int_grow,
16744         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
16745         obstack_next_free, obstack_object_size, obstack_ptr_grow,
16746         obstack_ptr_grow_fast, obstack_room): Remove declarations of
16747         nonexistent functions.
16748
16749 2004-05-18  Karl Berry  <karl@gnu.org>
16750
16751         * config/srclist.txt: break link for vasnprintf.c.
16752
16753 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16754
16755         Port obstack to the AS/400, where pointers are 16 bytes wide and
16756         you cannot cast an integer to a valid pointer.  This patch is
16757         currently waiting to be integrated into glibc; see
16758         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
16759
16760         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
16761         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
16762         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
16763         (struct obstack): temp member is now a union of a pointer and
16764         an integer, instead of an integer.  All integer uses changed.
16765         This does not affect the physical layout of struct obstack,
16766         except on hosts (like the AS/400) where the size or alignment of
16767         void * is greater than that of ptrdiff_t.
16768         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
16769         __STDC__)]: Store temporary in pointer member of union, not
16770         integer member.
16771         * lib/obstack.c: Include <stddef.h>, for offsetof.
16772         (struct fooalign): Remove; it doesn't need a name.
16773         (union fooround): Change double to long double, and add void *.
16774         (DEFAULT_ALIGNMENT): Use offsetof to compute.
16775         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
16776         not a macro.  Hence the values are always int; so remove all
16777         casts-to-int in uses.
16778
16779 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
16780
16781         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
16782         we can get this patch merged into glibc.
16783
16784 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16785             Paul Eggert  <eggert@cs.ucla.edu>
16786
16787         * m4/argp: Depend on alloca.
16788
16789 2004-05-17  Derek R. Price  <derek@ximbiot.com>
16790             Paul Eggert  <eggert@cs.ucla.edu>
16791
16792         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
16793         freecoding.
16794
16795 2004-05-17  Bruno Haible  <bruno@clisp.org>
16796
16797         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
16798         precision that consists of a '.' followed by an empty digit string.
16799         Patch by Tor Lillqvist <tml@iki.fi>.
16800
16801 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16802
16803         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
16804         for backward compatibility with older code.  We need our own
16805         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
16806         it under some other name, and our alloca.h will define it.
16807
16808 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
16809             Derek Price  <derek@ximbiot.com>
16810
16811         * lib/alloca.c: Include <alloca.h>, to get our interface.
16812         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
16813         include <alloca.h> first.  Use C89 prototype for alloca; this
16814         requires including <stddef.h> for size_t.  Use extern "C" if C++.
16815         Use #elif for simplicity, since we can assume C89 now.
16816         Don't try to source the system alloca.h since it will not be found
16817         and to prevent recursively including its replacement.
16818         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
16819         * lib/regex.c: Likewise.
16820
16821 2004-05-16  Derek Price  <derek@ximbiot.com>
16822             Paul Eggert  <eggert@cs.ucla.edu>
16823
16824         getline cleanup.  This changes the getndelim2 API: both order of
16825         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
16826         no delimiter).
16827
16828         * lib/getline.c: Don't include stddef.h or stdio.h, since our
16829         interface does that.
16830         (getline): Always use getdelim, so that we don't have two
16831         copies of this code.
16832         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
16833         if available.
16834         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
16835         (GETNDELIM2_MAXIMUM): New macro.
16836         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
16837         instead of the old practice of delim2==0.  All callers changed.
16838         Return -1 on overflow, instead of returning junk.
16839         Do not set *linesize unless allocation succeeds.
16840         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
16841         that we include sys/types.h.
16842         * lib/getnline.h: Likewise.
16843         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
16844         (getndelim2): Reorder arguments.
16845         * lib/getnline.c (getnline, getndelim):
16846         Don't discard the NMAX argument.
16847         (getnline): Invoke getndelim, to avoid code duplication.
16848         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
16849         of (size_t) -1 by callers of the getnline family.
16850
16851 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16852
16853         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
16854         Check for gettimeofday.
16855         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
16856         Check for settimeofday, stime.
16857
16858 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
16859
16860         * lib/nanosleep.c (suspended): Change its type from int to
16861         sig_atomic_t volatile.
16862         (first_call): Make it private to rpl_nanosleep, and have it
16863         be zero initially as that's a bit faster.
16864         (my_usleep): Round up fractional times instead of truncating them,
16865         as this is the usual meaning for 'sleep'.
16866
16867         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
16868         doesn't work.
16869         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
16870         (ENOSYS): Define if not defined.
16871         (settime): Fall back on stime if it exists and settimeofday fails.
16872         But don't bother with fallbacks if a method fails with errno == EPERM.
16873
16874 2004-05-11  Jim Meyering  <jim@meyering.net>
16875
16876         Prior to this change, the save_cwd caller required read access to the
16877         current directory on most systems (ones with the fchdir function).
16878
16879         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
16880         fails, try write-only, and finally, resort to using xgetcwd.
16881
16882 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
16883
16884         * lib/obstack.c, obstack.h: Import changes from libc.
16885
16886 2004-04-28  Bruno Haible  <bruno@clisp.org>
16887
16888         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
16889         also implicitly appends .exe to executables.
16890         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
16891         accepts Windows pathnames.
16892         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16893         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16894         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
16895         Treat Cygwin like Windows, since it now accepts Windows pathnames.
16896         Reported by Derek Robert Price <derek@ximbiot.com>.
16897
16898 2004-04-21  Karl Berry  <karl@gnu.org>
16899
16900         * config/srclist.txt (localcharset.c): break sync.
16901
16902 2004-04-20  Paul Eggert  <eggert@twinsun.com>
16903
16904         * m4/host-os.m4: Add a copyright notice.
16905
16906 2004-04-20  Jim Meyering  <jim@meyering.net>
16907
16908         Change UTILS_ to gl_ in AC_DEFINE'd names.
16909         Change utils_- and jm_-prefixed variables, too.
16910         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
16911         UTILS_FUNC_MKDIR_TRAILING_SLASH.
16912         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
16913
16914         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
16915         Don't emit trailing blanks.
16916         Also rename jm_-prefixed variables to have gl_ prefix.
16917
16918         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
16919         Also rename jm_-prefixed variables to have gl_ prefix.
16920
16921         * m4/jm-macros.m4: Reflect the renamings.
16922         * m4/prereq.m4: Likewise.
16923
16924 2004-04-20  Jim Meyering  <jim@meyering.net>
16925
16926         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
16927         memory.
16928
16929 2004-04-20  Jim Meyering  <jim@meyering.net>
16930             Bruno Haible  <bruno@clisp.org>
16931
16932         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
16933         memory when realloc fails.
16934
16935 2004-04-19  Jim Meyering  <jim@meyering.net>
16936
16937         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
16938         now that readutmp.c may call `free (0)'.
16939
16940 2004-04-19  Bruno Haible  <bruno@clisp.org>
16941
16942         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
16943         * m4/inttypes_h.m4: Likewise.
16944         * m4/stdint_h.m4: Likewise.
16945         * m4/intmax_t.m4: Likewise.
16946         * m4/uintmax_t.m4: Likewise.
16947
16948 2004-04-18  Jim Meyering  <jim@meyering.net>
16949
16950         * m4/prereq.m4: Don't forbid jm_ prefix.
16951
16952         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
16953         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
16954         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
16955         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
16956         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
16957         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
16958         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
16959         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
16960         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
16961         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
16962         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
16963         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
16964         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
16965         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
16966         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
16967         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
16968         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
16969         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
16970         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
16971
16972 2004-04-18  Jim Meyering  <jim@meyering.net>
16973
16974         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
16975         failure, don't leak memory and do call END_UTMP_ENT.
16976
16977 2004-04-16  Jim Meyering  <jim@meyering.net>
16978
16979         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
16980         coreutils' stat program.
16981         (gl_PREREQ): Don't require jm_PREREQ_STAT.
16982
16983 2004-04-11  Paul Eggert  <eggert@twinsun.com>
16984
16985         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
16986         C89.
16987         (CHAR_BIT): Remove, since we assume C89.
16988         Include <stdint.h> if available, as per current Autoconf CVS advice.
16989
16990 2004-03-31  Jim Meyering  <jim@meyering.net>
16991
16992         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
16993         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
16994         * m4/xalloc.m4: Likewise.
16995
16996 2004-03-30  Paul Eggert  <eggert@twinsun.com>
16997
16998         Merge from coreutils.
16999
17000         * m4/inttostr.m4: New file.
17001         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
17002         Require AM_STDBOOL_H and gl_TIMESPEC instead.
17003         Require gl_CLOCK_TIME.
17004         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
17005
17006 2004-03-30  Paul Eggert  <eggert@twinsun.com>
17007
17008         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
17009         not bool, to be more consistent with Unix conventions.
17010         Suggested by Bruno Haible.
17011
17012         Merge from coreutils.
17013
17014         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
17015         * lib/umaxtostr.c: New files.
17016
17017         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
17018         the usual <time.h> dance.
17019         (get_date): Change signature to support fractional time stamps.
17020         All callers changed.
17021         * lib/getdate.y: Include "getdate.h" first, as we can now
17022         assume C89 and don't need to worry about 'const'.
17023         Similarly, include "unlocked-io.h" near start, not in middle.
17024         Include <limits.h>.
17025         (textint.value): Use long int rather than int.
17026         (textint.digits): Use size_t rather than int.
17027         (BILLION, LOG10_BILLION): New constants.
17028         (parser_control): New member rel_ns.  Members day_ordinal,
17029         time_zone, month, day, hour, minutes, rel_year, rel_month,
17030         rel_day, rel_hour, rel_minutes, rel_seconds
17031         are now long int, not int.  Member seconds is now struct timespec,
17032         not int.  New member timespec_seen.  Members dates_seen, days_seen,
17033         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
17034         not int.
17035         (%union.intval): Now long int, not int.
17036         New member timespec.
17037         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
17038         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
17039         (spec): Now is a timespec or an item list.
17040         (timespec, items): New nonterminals.
17041         (time, rel, relunit, number, get_date):
17042         Add support for fractional seconds.
17043         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
17044         (gmtime, localtime, mktime): Remove decls; not needed with C89.
17045         (to_hour): First arg is now long int, not int.
17046         (to_year): Returns long int, not int.
17047         Don't treat year -70 like 70.
17048         (tm_diff): Returns long int, not int.
17049         (lookup_word): Use bool instead of int when appropriate.
17050         (yylex): Use size_t for count, not int.
17051         Detect overflow when parsing large integer constants.
17052         Add support for fractions.
17053         (get_date): Make pointers 'const' if possible.
17054         Use more-portable code to detect integer overflow.
17055         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
17056         Don't use ctime; it's not reliable if the year has >4 digits.
17057
17058         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
17059         This is for compatibility with BSD.
17060
17061         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
17062         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
17063         From coreutils' system.h.
17064
17065         * lib/userspec.c: Don't include "posixver.h".
17066         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
17067         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
17068         compatible extension.  Simplify code by removing a boolean int
17069         that was always nonzero if a string was nonnull.
17070
17071 2004-03-30  Jim Meyering  <jim@meyering.net>
17072
17073         Merge from coreutils.
17074
17075         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
17076         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
17077         on some systems one must include <grp.h> before it.
17078         Reported by Christian Krackowizer.
17079
17080 2004-03-30  Jim Meyering  <jim@meyering.net>
17081
17082         Merge from coreutils.
17083
17084         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
17085
17086         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
17087         an empty input stream.
17088
17089         * lib/readtokens.c: Include <stdbool.h>.
17090         (readtoken): Use `size_t' rather than int/long.
17091         All callers adjusted.
17092         Use `bool' rather than `int' where appropriate.
17093         Use memset rather than an explicit loop.
17094         Use x2nrealloc rather than xrealloc.
17095         Allow the use of `\0' as a delimiter.
17096         (readtokens): Likewise.
17097         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
17098
17099 2004-03-30  Jim Meyering  <jim@meyering.net>
17100
17101         * m4/realloc.m4: Remove file, since now it does no more than
17102         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
17103         the `configure.ac' section of module/realloc.
17104         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
17105
17106 2004-03-30  Bruno Haible  <bruno@clisp.org>
17107
17108         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
17109         nonnull.
17110
17111 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17112
17113         Merge changes to getloadavg.c from coreutils and Emacs.
17114
17115         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
17116         Define to an expression, not to the empty string.
17117         Include cloexec.h and xalloc.h.
17118         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
17119         Use set_cloexec_flag rather than rolling our own.
17120         * lib/cloexec.c, lib/cloexec.h: New files.
17121
17122 2004-03-29  Paul Eggert  <eggert@twinsun.com>
17123
17124         * m4/cloexec.m4: New file.
17125
17126 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17127
17128         * lib/getopt.h: Sync with libc CVS.
17129
17130 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17131             Bruno Haible  <bruno@clisp.org>
17132
17133         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
17134         mbswidth.
17135
17136 2004-03-18  Paul Eggert  <eggert@twinsun.com>
17137             Bruno Haible  <bruno@clisp.org>
17138
17139         * lib/mbswidth.h: Include <wchar.h> only if
17140         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
17141         <wchar.h>.
17142         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
17143
17144 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17145
17146         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
17147         Sync with libc CVS.
17148         * lib/getopt_int.h: New file, also synced from libc.
17149
17150 2004-03-09  Paul Eggert  <eggert@twinsun.com>
17151
17152         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
17153         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
17154         Bring back getopt.c, getopt.h, getopt1.c.
17155
17156 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17157
17158         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
17159         All uses changed.  Check for sa_sigaction member; this fixes
17160         a bug first reported by Jason Andrade in
17161         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17162
17163 2004-03-07  Paul Eggert  <eggert@twinsun.com>
17164
17165         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
17166         '#if' expressions.  Unlike the code it replaces, it does not
17167         depend on (defined _SC_PAGESIZE).  However, it does depend on
17168         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
17169         first reported by Jason Andrade in
17170         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
17171
17172 2004-02-25  Simon Josefsson  <jas@extundo.com>
17173
17174         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
17175
17176 2004-02-25  Simon Josefsson  <jas@extundo.com>
17177
17178         * lib/strdup.h: New file.
17179         * lib/strdup.c: Include it.
17180         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
17181         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
17182
17183 2004-02-23  Karl Berry  <karl@gnu.org>
17184
17185         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
17186         (from fencepost.gnu.org:/gd/gnuorg).
17187
17188 2004-02-23  Karl Berry  <karl@gnu.org>
17189
17190         * config/srclistvars.sh (GNUORG) [karl]: redefine.
17191         * config/srclist.txt: add maintain/standards documents.
17192
17193 2004-02-18  Bruno Haible  <bruno@clisp.org>
17194
17195         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
17196         Reported by Derek Robert Price <derek@ximbiot.com>.
17197
17198 2004-02-16  Karl Berry  <karl@gnu.org>
17199
17200         * config/mkinstalldirs, install-sh: update from automake.
17201
17202 2004-02-06  Karl Berry  <karl@gnu.org>
17203
17204         * m4/po.m4: update from gettext 0.14.1.
17205
17206 2004-02-06  Karl Berry  <karl@gnu.org>
17207
17208         * lib/config.charset: update from gettext 0.14.1.
17209
17210 2004-02-05  Paul Eggert  <eggert@twinsun.com>
17211
17212         Add comments and code, prompted by suggestions from Bruno Haible
17213         for sh-quote.
17214         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
17215         describing the enum quoting_style values.
17216         * lib/quotearg.c (quotearg_alloc): New function.
17217         (quotearg_buffer_restyled): Treat lone { and } as special.
17218         Treat = as special.  Work around bug with older shells
17219         that "see" a '\' that is really the 2nd byte of a multibyte char.
17220         Quote empty string with shell_quoting_style.
17221
17222 2004-02-03  Bruno Haible  <bruno@clisp.org>
17223
17224         * m4/pipe.m4: New file, from GNU gettext.
17225
17226 2004-02-03  Bruno Haible  <bruno@clisp.org>
17227
17228         * lib/pipe.h: New file, from GNU gettext.
17229         * lib/pipe.c: New file, from GNU gettext.
17230
17231 2004-01-27  Bruno Haible  <bruno@clisp.org>
17232
17233         * m4/execute.m4: New file, from GNU gettext.
17234
17235 2004-01-27  Bruno Haible  <bruno@clisp.org>
17236
17237         * lib/execute.h: New file, from GNU gettext.
17238         * lib/execute.c: New file, from GNU gettext.
17239         * lib/w32spawn.h: New file, from GNU gettext.
17240
17241 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17242
17243         Merge from diffutils.
17244
17245         * lib/file-type.c (file_type): Add typed memory objects.
17246         * lib/file-type.h (S_TYPEISTMO): New macro.
17247
17248         * lib/c-stack.h (c_stack_action): Remove argv argument.
17249         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
17250         (die): Don't calculate message unless segv_action returns.
17251         (get_stack_location, min_address_from_argv, max_address_from_argv,
17252         volatile stack_base, volatile_stack_size): Remove.
17253         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
17254         that every segmentation violation is a stack overflow.  (Ouch!)
17255         See Debian bug 136249 (still outstanding) for more info about why
17256         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
17257
17258 2004-01-24  Paul Eggert  <eggert@twinsun.com>
17259
17260         Exit-status fix from coreutils.
17261
17262         Use exit_failure consistently in place of EXIT_FAILURE,
17263         so that program exit statuses are consistent on failure.
17264
17265         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
17266         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
17267         * lib/argmatch.h: Comment fix to match the above.
17268         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
17269         Now a macro referring to exit_failure, instead of a separate
17270         variable.  Include "exitfail.h" to get it.
17271         * lib/xstrtol.h: Include "exitfail.h".
17272         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
17273
17274         * lib/long-options.c (parse_long_options): Use prototype
17275         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
17276         for clarity.
17277
17278 2004-01-21  Jim Meyering  <jim@meyering.net>
17279
17280         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
17281         so as not to conflict with a different-sized __mktime_internal
17282         function in GNU libc.
17283         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
17284         Problem building statically-linked `ls' reported by Michael Brunnbauer.
17285
17286 2004-01-20  Karl Berry  <karl@gnu.org>
17287
17288         * config/config.guess: update from config.
17289
17290         * config/srclistvars.sh: GNUWWWLICENSES for karl.
17291
17292 2004-01-20  Bruno Haible  <bruno@clisp.org>
17293
17294         Safer stack allocation.
17295         * lib/setenv.c: Include allocsa.h.
17296         (alloca): Remove fallback definition.
17297         (freea): Remove macro.
17298         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
17299         instead of freea.
17300
17301 2004-01-20  Bruno Haible  <bruno@clisp.org>
17302
17303         * m4/eealloc.m4: New file, from GNU gettext.
17304
17305 2004-01-20  Bruno Haible  <bruno@clisp.org>
17306
17307         * m4/allocsa.m4: New file, from GNU gettext.
17308
17309 2004-01-20  Bruno Haible  <bruno@clisp.org>
17310
17311         * lib/xallocsa.h: New file, from GNU gettext.
17312         * lib/xallocsa.c: New file, from GNU gettext.
17313
17314 2004-01-20  Bruno Haible  <bruno@clisp.org>
17315
17316         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
17317
17318 2004-01-20  Bruno Haible  <bruno@clisp.org>
17319
17320         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
17321         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
17322         specially.
17323
17324 2004-01-20  Bruno Haible  <bruno@clisp.org>
17325
17326         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
17327         patch.
17328
17329 2004-01-20  Bruno Haible  <bruno@clisp.org>
17330
17331         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
17332
17333 2004-01-20  Bruno Haible  <bruno@clisp.org>
17334
17335         * lib/eealloc.h: New file.
17336
17337 2004-01-20  Bruno Haible  <bruno@clisp.org>
17338
17339         * lib/binary-io.h: Avoid warnings on Cygwin.
17340
17341 2004-01-20  Bruno Haible  <bruno@clisp.org>
17342
17343         * lib/allocsa.h: New file, from GNU gettext.
17344         * lib/allocsa.c: New file, from GNU gettext.
17345
17346 2004-01-18  Karl Berry  <karl@gnu.org>
17347
17348         * doc/gpl.texi, doc/lgpl.texi: new files.
17349
17350 2004-01-18  Karl Berry  <karl@gnu.org>
17351
17352         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
17353         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
17354
17355 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17356
17357         Merge from coreutils.
17358
17359         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
17360         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
17361         (gl_DEFAULT_POSIX2_VERSION): Move
17362         the documentation from 'configure' into 'config.hin',
17363         so that 'configure --help' isn't burdened by it and
17364         we don't have to worry about its formatting there.
17365         Reword the documentation so that it's more succinct
17366         and can be run together into a single paragraph.
17367         * m4/same.m4 (gl_SAME): Check for pathconf.
17368
17369 2004-01-15  Paul Eggert  <eggert@twinsun.com>
17370
17371         Merge from coreutils.
17372
17373         * lib/posixver.c: Include posixver.h.
17374
17375         * lib/same.c: Include <stdbool.h>, <limits.h>.
17376         (_POSIX_NAME_MAX): Define if not defined.
17377         (MIN): New macro.
17378         (same_name): If file names are silently truncated, report
17379         that the file names are the same if they are the same after
17380         the silent truncation.
17381
17382         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
17383         conversion function.
17384         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
17385         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
17386         longer needed.
17387
17388 2004-01-15  Jim Meyering  <jim@meyering.net>
17389
17390         Merge from coreutils.
17391
17392         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
17393         if no library is required.
17394         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
17395         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
17396         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
17397         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
17398         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
17399         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
17400         value, $ac_cv_search_crypt, if it's "none required".
17401         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
17402         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
17403         not gl_FUNC_GETLOADAVG.
17404         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
17405         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
17406
17407 2004-01-15  Jim Meyering  <jim@meyering.net>
17408
17409         Merge from coreutils.
17410
17411         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
17412         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
17413         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
17414
17415         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
17416         optional configure-time default.
17417
17418         * lib/version-etc.c (version_etc_copyright): Update copyright date.
17419
17420         * lib/xreadlink.c (xreadlink): Correct outdated comment.
17421
17422 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
17423
17424         Merge from coreutils.
17425
17426         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
17427         value, $ac_cv_search_nanosleep, if it's "none required".
17428
17429 2004-01-14  Paul Eggert  <eggert@twinsun.com>
17430
17431         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
17432         with like-named macro in fnmatch.c.
17433         (EXT): Use an internal constant instead.
17434
17435         Merge fnmatch patches from glibc.
17436         * lib/fnmatch.c (mbsinit): Remove define.
17437         Add libc_hidden_ver (__fnmatch, fnmatch).
17438         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
17439         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
17440
17441 2004-01-14  Karl Berry  <karl@gnu.org>
17442
17443         * config/install-sh: update from automake.
17444
17445 2004-01-13  Karl Berry  <karl@gnu.org>
17446
17447         * config/install-sh: update from automake.
17448
17449 2004-01-09  Karl Berry  <karl@gnu.org>
17450
17451         * config/install-sh: update from automake.
17452
17453 2004-01-05  Karl Berry  <karl@gnu.org>
17454
17455         * config/config.{sub,guess}: update from config.
17456
17457 2003-12-31  Karl Berry  <karl@gnu.org>
17458
17459         * config/depcomp: update from automake.
17460
17461 2003-12-14  Karl Berry  <karl@gnu.org>
17462
17463         * lib/config.charset: update from gettext-runtime.
17464
17465 2003-12-03  Paul Eggert  <eggert@twinsun.com>
17466
17467         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
17468         Bug reported by Alfred M. Szmidt.
17469
17470 2003-12-03  Bruno Haible  <bruno@clisp.org>
17471
17472         * m4/gettext.m4: Upgrade from gettext-0.13.
17473         * m4/po.m4: Upgrade from gettext-0.13.
17474         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
17475         * m4/intmax.m4: New file, from gettext-0.13.
17476         * m4/printf-posix.m4: New file, from gettext-0.13.
17477
17478 2003-11-29  Karl Berry  <karl@gnu.org>
17479
17480         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
17481
17482 2003-11-25  Paul Eggert  <eggert@twinsun.com>
17483             Bruno Haible  <bruno@clisp.org>
17484
17485         * lib/printf-parse.h: Don't include sys/types.h.
17486         (ARG_NONE): New macro.
17487         (char_directive): Change type of *arg_index fields to size_t.
17488         * lib/printf-parse.c: Don't include sys/types.h.
17489         (SSIZE_MAX): Remove macro.
17490         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
17491         Remove unnecessary overflow check.
17492         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
17493         fields.
17494
17495 2003-11-25  Bruno Haible  <bruno@clisp.org>
17496
17497         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
17498
17499 2003-11-25  Bruno Haible  <bruno@clisp.org>
17500
17501         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
17502         gt_TYPE_SSIZE_T.
17503
17504 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17505
17506         * modules/alloca: Remove dependency on xalloc.
17507
17508 2003-11-24  Paul Eggert  <eggert@twinsun.com>
17509
17510         * lib/alloca.c: Remove dependency on xalloc module.
17511         (xalloc_die): Remove.
17512         (memory_full) [!defined emacs]: New macro.
17513         [!defined emacs]: Don't include xalloc.h.
17514         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
17515         address arithmetic overflows.  Change datatypes a bit to avoid
17516         unnecessary casts.
17517
17518 2003-11-22  Jim Meyering  <jim@meyering.net>
17519
17520         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
17521         s/size/size_t/.
17522
17523 2003-11-21  Karl Berry  <karl@gnu.org>
17524
17525         * config/config.{sub,guess}: update from config.
17526
17527 2003-11-18  Karl Berry  <karl@gnu.org>
17528
17529         * config/config.{sub,guess}: update from config.
17530
17531         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
17532
17533 2003-11-17  Paul Eggert  <eggert@twinsun.com>
17534
17535         * README: Mention that S+T cannot overflow if S is the size of
17536         an existing object and T is sufficiently small.
17537
17538 2003-11-17  Jim Meyering  <jim@meyering.net>
17539
17540         On systems without utime and without a utimes function capable of
17541         dealing with a NULL struct utimbuf* argument, this utime replacement
17542         could -- in unusual circumstances -- leak a file descriptor.
17543         * lib/utime.c: Include <unistd.h> and <errno.h>.
17544         (utime_null): Be sure to close `fd' and to preserve errno.
17545         Reported by Geoff Collyer via Arnold Robbins.
17546
17547 2003-11-17  Bruno Haible  <bruno@clisp.org>
17548
17549         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
17550         (Depends-on): Add xsize.
17551
17552 2003-11-17  Bruno Haible  <bruno@clisp.org>
17553
17554         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
17555
17556 2003-11-17  Bruno Haible  <bruno@clisp.org>
17557
17558         * lib/vasnprintf.c (alloca): Remove fallback definition.
17559         (freea): Remove definition.
17560         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
17561         Reported by Paul Eggert.
17562
17563 2003-11-16  Paul Eggert  <eggert@twinsun.com>
17564             Bruno Haible  <bruno@clisp.org>
17565
17566         Protect against address arithmetic overflow.
17567         * lib/printf-args.h: Include stddef.h.
17568         (arguments): Change type of field 'count' to size_t.
17569         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
17570         'unsigned int' where appropriate.
17571         * lib/printf-parse.h: Include sys/types.h.
17572         (char_directive): Change type of *arg_index fields to ssize_t.
17573         (char_directives): Change type of fields 'count', max_*_length to
17574         size_t.
17575         * lib/printf-parse.c: Include sys/types.h and xsize.h.
17576         (SSIZE_MAX): Define fallback value.
17577         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
17578         instead of 'int' where appropriate. Check a_allocated, d_allocated
17579         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
17580         * lib/vasnprintf.c: Include xsize.h.
17581         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
17582         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
17583         overflow. Avoid wraparound when converting a width or precision from
17584         decimal to binary.
17585
17586 2003-11-16  Bruno Haible  <bruno@clisp.org>
17587
17588         Update from GNU gettext.
17589         * lib/printf-parse.c: Generalize to it can be compiled for wide
17590         strings.
17591         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
17592         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
17593         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
17594         SNPRINTF): New macros.
17595         Don't include <alloca.h> if the file is used inside libintl.
17596         (local_wcslen): New function, for Solaris 2.5.1.
17597         (VASNPRINTF): Use it instead of wcslen.
17598
17599 2003-11-16  Bruno Haible  <bruno@clisp.org>
17600
17601         * lib/xsize.h (xmax): New function.
17602         (xsum, xsum3, xsum4): Declare as "pure" functions.
17603
17604 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17605
17606         * modules/xalloc (Files): Undo latest change, since xalloc.h
17607         no longer needs SIZE_MAX or PTRDIFF_MAX.
17608
17609 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17610
17611         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
17612         gl_PTRDIFF_MAX.
17613
17614 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17615
17616         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
17617         "return", to pacify some unknown compiler.  Problem reported
17618         by Joerg Schilling.
17619
17620 2003-11-12  Paul Eggert  <eggert@twinsun.com>
17621
17622         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
17623         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
17624         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
17625         heuristic is just as accurate as far as we know, and it removes a
17626         dependency on size_max.m4 and ptrdiff_max.m4.
17627
17628 2003-11-11  Bruno Haible  <bruno@clisp.org>
17629
17630         * modules/xsize (Files): Add m4/size_max.m4.
17631         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
17632
17633 2003-11-11  Bruno Haible  <bruno@clisp.org>
17634
17635         * m4/size_max.m4: New file.
17636         * m4/ptrdiff_max.m4: New file.
17637         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
17638         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
17639         (gl_XALLOC): Invoke it.
17640
17641 2003-11-11  Bruno Haible  <bruno@clisp.org>
17642
17643         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
17644         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
17645         defined.
17646
17647 2003-11-10  Paul Eggert  <eggert@twinsun.com>
17648
17649         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
17650         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
17651         rejected some allocations of exactly SIZE_MAX - 2 bytes.
17652         From Bruno Haible.
17653         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
17654         not (size_t) -1, since it's defined here.
17655
17656 2003-11-09  Karl Berry  <karl@gnu.org>
17657
17658         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
17659
17660 2003-11-06  Paul Eggert  <eggert@twinsun.com>
17661
17662         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
17663         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
17664         Reject sizes of exactly SIZE_MAX bytes.
17665         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
17666         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
17667
17668 2003-11-05  Bruno Haible  <bruno@clisp.org>
17669
17670         * lib/xsize.h: Include limits.h, to avoid a possible collision with
17671         SIZE_MAX defined in <limits.h> on Solaris.
17672
17673 2003-11-04  Jim Meyering  <jim@meyering.net>
17674
17675         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
17676         variable names, rather than @VAR@.
17677         * modules/poll: Likewise.
17678
17679 2003-11-04  Bruno Haible  <bruno@clisp.org>
17680
17681         * modules/xsize: New file.
17682         * modules/linebreak: Depend on xsize.
17683         * MODULES.html.sh (func_all_modules): Add xsize.
17684
17685 2003-11-04  Bruno Haible  <bruno@clisp.org>
17686
17687         * m4/xsize.m4: New file.
17688
17689 2003-11-04  Bruno Haible  <bruno@clisp.org>
17690
17691         * lib/xsize.h: New file.
17692         * lib/linebreak.c: Include xsize.h.
17693         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
17694         argument for overflow.
17695         Suggested by Paul Eggert.
17696
17697 2003-11-03  Karl Berry  <karl@gnu.org>
17698
17699         * config/config.{guess,sub}: update from config.
17700
17701 2003-11-03  Jim Meyering  <jim@meyering.net>
17702
17703         * modules/userspec (lib_SOURCES): Add userspec.h.
17704         (Include): Add "userspec.h".
17705         Improve description.
17706
17707 2003-11-03  Jim Meyering  <jim@meyering.net>
17708
17709         * lib/userspec.c: Include "userspec.h".
17710         * lib/userspec.h: New file.
17711
17712 2003-11-03  Bruno Haible  <bruno@clisp.org>
17713
17714         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
17715
17716 2003-11-03  Bruno Haible  <bruno@clisp.org>
17717
17718         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
17719         available, to avoid (extremely rare) race condition.
17720         Suggested by Paul Eggert.
17721
17722 2003-11-02  Karl Berry  <karl@gnu.org>
17723
17724         * config/srclist.txt (vasprintf.c): sync broken, sigh.
17725
17726 2003-10-31  Paul Eggert  <eggert@twinsun.com>
17727
17728         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
17729         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
17730         (read_filesystem_list): Set and use me_type_malloced.
17731         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
17732         whatever the type happens to be), for brevity and consistency.
17733         Check for size calculation overflow on Alphas running OSF/1.
17734
17735 2003-10-31  Jim Meyering  <jim@meyering.net>
17736
17737         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
17738
17739         * lib/linebuffer.c: Include <string.h> for declaration of memset.
17740
17741 2003-10-30  Paul Eggert  <eggert@twinsun.com>
17742             Bruno Haible  <bruno@clisp.org>
17743
17744         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
17745         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
17746
17747 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
17748
17749         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
17750         netbsd*-gnu*.  Suggested by Robert Millan.
17751
17752 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17753
17754         * modules/group-member: Depend on stdbool.
17755
17756 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17757
17758         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
17759
17760 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17761
17762         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
17763         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
17764         after the 'gnu' in these cases.  This fixes some bugs in the
17765         previous change, and is based on suggestions by Robert Millan.
17766
17767 2003-10-29  Paul Eggert  <eggert@twinsun.com>
17768
17769         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
17770         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
17771         no longer needed.
17772         * lib/quotearg.c (quotearg_n_options): Use it.
17773         * lib/group-member.c: Include <stdbool.h>.
17774         (free_group_info): Arg is now const *; don't free arg.
17775         (get_group_info): Now returns bool and accepts struct group_info *,
17776         rather than returning a malloc'ed struct group_info *.
17777         All uses changed.  Check for overflow in internal size calculation.
17778
17779         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
17780         rather than xmalloc/xrealloc.
17781         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
17782         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
17783         conformance bug: the old code used a pointer after freeing the
17784         storage that it addressed.
17785         * lib/hash.c (hash_initialize): Simplify the code by using
17786         xalloc_oversized rather than doing it by hand.
17787         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
17788         the buffer preserved.  Use free and xmalloc instead.
17789         * lib/quotearg.c (quotearg_n_options): Likewise.
17790         Use a simpler test for size overflow.  Don't use xalloc_oversized
17791         because unsigned int might be wider than size_t (!); this suggests
17792         that we should switch from unsigned int to size_t for slot numbers.
17793
17794 2003-10-28  Paul Eggert  <eggert@twinsun.com>
17795
17796         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
17797         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
17798         NetBSD kernels.  Requested by Richard Stallman.
17799
17800 2003-10-27  Paul Eggert  <eggert@twinsun.com>
17801
17802         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
17803         to allocate the returned structure.  Do not allocate a subarray,
17804         as x2nrealloc will do that.
17805         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
17806         instead of xnrealloc.
17807         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
17808
17809 2003-10-27  Bruno Haible  <bruno@clisp.org>
17810
17811         * lib/stdbool_.h: Better support for BeOS.
17812
17813 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17814
17815         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
17816         now uses inline.
17817
17818 2003-10-26  Paul Eggert  <eggert@twinsun.com>
17819
17820         * lib/xalloc.h (xalloc_oversized): New static inline function, for
17821         callers that want to do their own size-overflow checking.  Include
17822         <stdbool.h>, since xalloc_oversized returns bool.
17823         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
17824         to use xalloc_oversized.
17825
17826         Add two functions x2realloc, x2nrealloc, for programs that grow
17827         arrays dynamically by doubling their sizes.
17828         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
17829         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
17830         New functions.
17831
17832         Port to C99 semantics for 'inline' of external functions.
17833         Bug reported by Bruno Haible.
17834         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
17835         with the old contents of xnmalloc.
17836         (xnmalloc, xmalloc): Use it.
17837         (xnrealloc_inline): New static inline function,
17838         with the old contents of xnrealloc.
17839         (xnrealloc, xrealloc): Use it.
17840
17841         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
17842         that.
17843
17844 2003-10-26  Karl Berry  <karl@gnu.org>
17845
17846         * config/srclist.txt (COPYING.DOC): no longer available from
17847         /gd/gnuorg; don't know where the ultimate source is.
17848
17849 2003-10-25  Paul Eggert  <eggert@twinsun.com>
17850
17851         Fix several address-calculation bugs in the hash modules,
17852         plus some minor code cleanup.
17853
17854         * lib/hash.h: Include <stdbool.h>, for bool.
17855         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
17856         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
17857         hash_get_n_entries, hash_get_max_bucket_length,
17858         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
17859         hash_rehash): Use size_t rather than unsigned.
17860         * lib/hash.c (struct hash_table, hash_get_n_buckets,
17861         hash_get_n_buckets_used, hash_get_n_entries,
17862         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
17863         hash_get_entries, hash_do_for_each, hash_string, is_prime,
17864         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
17865         Likewise.
17866         (SIZE_MAX): Define if not defined.
17867         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
17868         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
17869         hash_print):
17870         Use const * when possible.
17871         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
17872         (check_tuning): Fix bug: if tuning parameters were very close to
17873         0 or 1, rounding errors could have caused subscript violations.
17874         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
17875         (hash_initialize): Add 'fail:' label
17876         to free table and return NULL, and use it to simplify code.
17877         Use calloc rather than clearing the storage ourself.
17878         (hash_initialize, hash_rehash): Check for arithmetic overflow in
17879         buffer size calculations.
17880         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
17881         Include <stddef.h>, for size_t.
17882         * lib/hash-pjw.c (hash_pjw): Likewise.
17883         Switch to method described by Bruno Haible.
17884         Include <limits.h>, for CHAR_BIT.
17885         (SIZE_BITS): New macro.
17886
17887 2003-10-23  Paul Eggert  <eggert@twinsun.com>
17888
17889         * m4/getline.m4 (AM_FUNC_GETLINE):
17890         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
17891         hosts.  Problem reported by Derek Robert Price in
17892         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
17893         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
17894         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
17895
17896 2003-10-21  Paul Eggert  <eggert@twinsun.com>
17897
17898         * lib/getndelim2.c (getndelim2): When size calculation overflows,
17899         ceiling the allocation at NMAX bytes rather than silently
17900         discarding input bytes before NMAX is reached.  This makes
17901         a difference only if NMAX exceeds SIZE_MAX / 2.
17902
17903         * lib/obstack.c: Merge from glibc.
17904         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
17905         Add libc_hidden_def (_obstack_newchunk).
17906         (_obstack_free) [! defined _LIBC]: Remove.
17907         [defined _LIBC]: Make a strong alias from obstack_free, rather than
17908         a clone of the function body.
17909         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
17910         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
17911
17912         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
17913         glibc.
17914         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
17915         arg to memcpy.
17916
17917         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
17918         (obstack_ptr_grow_fast, obstack_int_grow_fast):
17919         Don't use lvalue casts, as GCC plans to remove support for them
17920         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
17921         was also present in the non-GCC version, indicating that this
17922         code had always been buggy and had never been widely used.
17923         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
17924         Use the fast variant of each macro, rather than copying the
17925         definiens of the fast variant; that way, we'll be more likely to
17926         catch future bugs in the fast variants.
17927
17928 2003-10-20  Bruno Haible  <bruno@clisp.org>
17929
17930         * modules/wait-process: New file.
17931         * MODULES.html.sh (func_all_modules): Add wait-process.
17932
17933 2003-10-20  Bruno Haible  <bruno@clisp.org>
17934
17935         * m4/wait-process.m4: New file.
17936
17937 2003-10-20  Bruno Haible  <bruno@clisp.org>
17938
17939         * lib/wait-process.h: New file, from GNU gettext.
17940         * lib/wait-process.c: New file, from GNU gettext.
17941
17942 2003-10-19  Jim Meyering  <jim@meyering.net>
17943
17944         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
17945         HPUX 10.20.
17946
17947 2003-10-18  Karl Berry  <karl@gnu.org>
17948
17949         * config/config.guess: update from config.
17950
17951 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17952
17953         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
17954         (getgroups): First arg is int, not size_t.
17955         Don't let 'free' mangle errno.
17956
17957 2003-10-16  Paul Eggert  <eggert@twinsun.com>
17958
17959         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
17960
17961 2003-10-16  Karl Berry  <karl@gnu.org>
17962
17963         * config/config.{guess,sub}: update from config.
17964
17965 2003-10-16  Jim Meyering  <jim@meyering.net>
17966
17967         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
17968         memcpy.
17969
17970 2003-10-15  Paul Eggert  <eggert@twinsun.com>
17971
17972         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
17973         (SIZE_MAX): Remove.
17974         (new_exclude, add_exclude_file): Initial size no longer needs to
17975         be a power of 2.
17976         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
17977         our own address arithmetic overflow checking.
17978
17979         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
17980         (fnmatch): Do not alloca more than 2000 wide characters;
17981         instead, use malloc for large buffers.
17982         Check for address arithmetic overflow, and return -1
17983         with errno set to ENOMEM in that case.
17984         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
17985         (NEW_PATTERN): Do not alloca more than 8000 bytes;
17986         instead, return -1.  Check for address arithmetic overflow.
17987
17988 2003-10-14  Paul Eggert  <eggert@twinsun.com>
17989
17990         Handle invalid suffixes and overflow independently, so that
17991         callers can treat them independently as needed.  Fix some bugs in
17992         suffix handling, e.g., "100k@" was not diagnosed as an invalid
17993         suffix for a human-readable blocksize.  The major caller-visible
17994         change is the addition of a new
17995         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
17996         that both overflow and suffix chars were found.
17997
17998         * lib/human.c (humblock): Don't check separately for invalid suffix
17999         char; that is xstrtoumax's job (now that its bug is fixed).
18000         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
18001         INTMAX_MAX]: New macros.
18002         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
18003         TYPE_MAXIMUM): New macros.
18004         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
18005         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
18006         if overflow occurs, as it's what __strtol does and it's more useful
18007         in practice.
18008         (__xstrtol): If __strtol reports some error other than ERANGE,
18009         reflect it to the caller as LONGINT_INVALID.  If it reports
18010         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
18011         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
18012         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
18013         value.
18014         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
18015         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
18016         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
18017         [defined UINTMAX_MAX]: New macros.
18018
18019 2003-10-14  Bruno Haible  <bruno@clisp.org>
18020
18021         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
18022
18023 2003-10-14  Bruno Haible  <bruno@clisp.org>
18024
18025         * m4/sig_atomic_t: New file, from GNU gettext.
18026         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
18027
18028 2003-10-14  Bruno Haible  <bruno@clisp.org>
18029
18030         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
18031         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
18032         Also use volatile where needed.
18033
18034 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18035
18036         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
18037         Change maintainer from Bruno Haible to 'all'.
18038
18039 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18040
18041         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
18042
18043 2003-10-12  Paul Eggert  <eggert@twinsun.com>
18044
18045         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
18046         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
18047         and define in terms of the other primitives.
18048         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
18049         (SIZE_MAX): Define if not already defined.
18050         (array_size_overflow): New function.
18051         (xalloc_die): Abort instead of exiting if 'error' returns.
18052         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
18053         (xmalloc, xrealloc): Use them.
18054         (xcalloc): Check for address arithmetic overflow.
18055         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
18056         a bit faster than strcpy.
18057
18058 2003-10-10  Simon Josefsson  <jas@extundo.com>
18059
18060         * modules/argp (Depends-on): Add restrict and strcase.
18061
18062 2003-10-10  Simon Josefsson  <jas@extundo.com>
18063
18064         * m4/argp.m4: Add AC_C_INLINE.
18065
18066 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18067
18068         Merge getpass from libc, plus a few fixes.
18069
18070         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
18071         Include <stdbool.h>.
18072         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
18073         __fsetlocking to empty.
18074         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
18075         do include <bits/libc-lock.h>.
18076         Do not include <fcntl.h>; not needed.
18077         [_LIBC]: Include <wchar.h>.
18078         (NOTCANCEL_MODE): New macro.
18079         (flockfile, funlockfile) [_LIBC]: New macros.
18080         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
18081         [!_LIBC]: New macros.
18082         (call_fclose): New function.
18083         (getpass): Use it.  Save tty stream separately; this simplifies the
18084         code and makes it more reliable if stdin happens to equal stdout.
18085         Invoke __fsetlocking on tty.
18086         Handle thread cancellation if needed.
18087         Namespace cleanup (use __tcgetattr, __getline).
18088         Use bool for Booleans.
18089         [USE_IN_LIBIO]: Handle wide streams.
18090         [!_LIBC]: Unconditionally do the fseek, since we don't know what
18091         stream might go where.
18092
18093         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
18094         doesn't have to include <stdio.h> before us.
18095         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
18096         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
18097         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
18098         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
18099         if not declared, so that we can use getpass.c code from libc without
18100         rewriting it.
18101         (flockfile, ftrylockfile, funlockfile): New macros.
18102
18103 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18104
18105         * modules/getpass: Depend on stdbool.
18106
18107 2003-10-08  Paul Eggert  <eggert@twinsun.com>
18108
18109         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
18110
18111 2003-10-07  Karl Berry  <karl@gnu.org>
18112
18113         * config/config.{guess,sub}: update from config.
18114
18115 2003-10-06  Jim Meyering  <jim@meyering.net>
18116             Bruno Haible  <bruno@clisp.org>
18117
18118         This lets translators provide better translations for the
18119         "Written by ..." part of --version output.
18120         * lib/version-etc.h: Include stdarg.h.
18121         (version_etc_copyright): Declare as readonly.
18122         (version_etc): Make this function variadic with a NULL-terminated list
18123         of author name strings.
18124         (version_etc_va): New declaration.
18125         * lib/version-etc.c: Include stdarg.h, stdlib.h.
18126         (version_etc_copyright): Declare as readonly.
18127         (version_etc_va): New function. Provide a different translatable string
18128         for each possible number of authors < 10. Abbreviate when there are 10
18129         authors or more.
18130         (version_etc): Make this function variadic. Call version_etc_va.
18131         Suggestion from Gary V. Vaughan.
18132
18133         * lib/long-options.h (parse_long_options): Change prototype: the
18134         authors string is moved to the end and becomes variadic.
18135         * lib/long-options.c: Include stdarg.h.
18136         (parse_long_options): Make this function variadic, too.
18137         Call version_etc_va, not version_etc.
18138
18139 2003-10-06  Bruno Haible  <bruno@clisp.org>
18140
18141         * modules/version-etc-2: Remove file.
18142         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
18143
18144 2003-10-06  Bruno Haible  <bruno@clisp.org>
18145
18146         * modules/fatal-signal: New file.
18147         * MODULES.html.sh (func_all_modules): Add fatal-signal.
18148
18149 2003-10-06  Bruno Haible  <bruno@clisp.org>
18150
18151         * m4/fatal-signal.m4: New file.
18152         * m4/signalblocking.m4: New file, from GNU gettext.
18153
18154 2003-10-06  Bruno Haible  <bruno@clisp.org>
18155
18156         * lib/version-etc-2.h: Remove file.
18157         * lib/version-etc-2.c: Remove file.
18158
18159 2003-10-06  Bruno Haible  <bruno@clisp.org>
18160
18161         * lib/fatal-signal.h: New file, from GNU gettext.
18162         * lib/fatal-signal.c: New file, from GNU gettext.
18163
18164 2003-10-05  Paul Eggert  <eggert@twinsun.com>
18165
18166         * README: Rework advice for preventing empty .o files.
18167         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
18168         not <sys/types.h>.
18169
18170 2003-10-04  Karl Berry  <karl@gnu.org>
18171
18172         * lib/argp*: update from libc.
18173
18174 2003-10-04  Karl Berry  <karl@gnu.org>
18175
18176         * config/config.{guess,sub}: update from config.
18177
18178 2003-10-02  Bruno Haible  <bruno@clisp.org>
18179
18180         * modules/lchown (Include): Add lchown.h.
18181         * modules/time_r (Include): Use "..." syntax.
18182         * modules/xgetdomainname (Include): Add xgetdomainname.h.
18183
18184 2003-10-01  Simon Josefsson  <jas@extundo.com>
18185
18186         * MODULES.html.sh (func_all_modules): Move gethostname from section
18187         'based on' to section 'lacking' POSIX:2001.
18188
18189 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
18190
18191         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
18192         to output mode on the same stream.
18193
18194 2003-09-29  Paul Eggert  <eggert@twinsun.com>
18195
18196         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
18197         Fix arg typo in previous patch.
18198
18199 2003-09-28  Jim Meyering  <jim@meyering.net>
18200
18201         * lib/error.c: Correct cpp indentation.
18202
18203 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18204
18205         * modules/free: New file.
18206
18207 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18208
18209         * m4/free.m4: New file.
18210
18211 2003-09-27  Paul Eggert  <eggert@twinsun.com>
18212
18213         * lib/minmax.h (MIN, MAX)
18214         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
18215         Omit the special code that used __typeof__, since we worry that
18216         it could be more trouble than it's worth.  See:
18217         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
18218         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
18219
18220         * lib/free.c: New file.
18221
18222 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
18223
18224         Trivial fixes to Makefile.am parts of module listings.
18225         * modules/strstr: Append strstr.h to lib_SOURCES.
18226         * modules/strcase: Likewise, for strcase.h.
18227
18228 2003-09-27  Karl Berry  <karl@gnu.org>
18229
18230         * config/mkinstalldirs: update from automake.
18231
18232 2003-09-26  Paul Eggert  <eggert@twinsun.com>
18233
18234         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
18235         (error_tail): Do not loop, reallocating temporary buffer, since
18236         the output cannot contain more wide characters than the input
18237         contains bytes, the size must be big enough already.  This avoids
18238         one potential size overflow calculation.  Check for size overflow
18239         when calculating temporary buffer size.  Free temporary buffer
18240         when done, if it was allocated with malloc; this plugs a memory
18241         leak.  Remove casts from void * to pointers, that are no longer
18242         needed now that we're assuming C89 or better.
18243
18244         Merge error changes from glibc.
18245
18246         * lib/error.c, error.h: Update copyright notice header to match glibc.
18247         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
18248         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
18249         Disable cancellation while printing error.
18250         * lib/error.h: Prepend __ to parameter names.
18251
18252 2003-09-26  Jim Meyering  <jim@meyering.net>
18253
18254         * lib/error.c (error_tail): Move some declarations
18255         into inner scope where the local variables are used.
18256
18257 2003-09-26  Bruno Haible  <bruno@clisp.org>
18258
18259         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
18260         stpncpy().
18261         Don't define stpncpy through config.h; it's now done through stpncpy.h.
18262
18263 2003-09-26  Bruno Haible  <bruno@clisp.org>
18264
18265         * lib/stpncpy.h (gnu_stpncpy): New declaration.
18266         (stpncpy): Define as alias for gnu_stpncpy.
18267         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
18268
18269 2003-09-25  Simon Josefsson  <jas@extundo.com>
18270
18271         * lib/xgetdomainname.h: New file.
18272         * lib/xgetdomainname.c: New file.
18273
18274 2003-09-25  Simon Josefsson  <jas@extundo.com>
18275             Bruno Haible  <bruno@clisp.org>
18276
18277         * modules/getdomainname: New file.
18278         * modules/xgetdomainname: New file.
18279         * MODULES.html.sh (func_all_modules): Add getdomainname,
18280         xgetdomainname.
18281
18282 2003-09-25  Simon Josefsson  <jas@extundo.com>
18283             Bruno Haible  <bruno@clisp.org>
18284
18285         * m4/getdomainname.m4: New file.
18286
18287 2003-09-25  Simon Josefsson  <jas@extundo.com>
18288             Bruno Haible  <bruno@clisp.org>
18289
18290         * lib/getdomainname.h: New file.
18291         * lib/getdomainname.c: New file.
18292
18293 2003-09-25  Karl Berry  <karl@gnu.org>
18294
18295         * lib/argp-fmtstream.c, argp-help.c: update from libc.
18296
18297 2003-09-25  Karl Berry  <karl@gnu.org>
18298
18299         * config/install-sh: update from automake.
18300
18301 2003-09-25  Bruno Haible  <bruno@clisp.org>
18302
18303         * modules/version-etc-2: New file, from modules/version-etc with
18304         modifications.
18305         * MODULES.html.sh (func_all_modules): Add version-etc-2.
18306
18307 2003-09-25  Bruno Haible  <bruno@clisp.org>
18308
18309         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
18310         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
18311
18312 2003-09-24  Simon Josefsson  <jas@extundo.com>
18313
18314         * modules/xgethostname: Add xgethostname.h.
18315
18316 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18317
18318         * lib/linebuffer.c (freebuffer): Don't free the argument, just
18319         the buffer associated with the argument.  Bug reported by
18320         Simon Josefsson.
18321
18322 2003-09-24  Paul Eggert  <eggert@twinsun.com>
18323
18324         * README: Document assumptions that 'int' is at least 32 bits
18325         wide, that integer arithmetic is 2's complement without overflow,
18326         that there are no holes in integer values, that adding sizes of
18327         two nonoverlapping objects can't overflow, and that all-bits-zero
18328         yields scalar zero.  Fix spelling and capitalization typos.
18329
18330 2003-09-19  Karl Berry  <karl@gnu.org>
18331
18332         * lib/argp.h: update from libc.
18333
18334 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18335
18336         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
18337         to avoid spurious warnings like "AC_RUN_IFELSE was called before
18338         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
18339
18340 2003-09-17  Paul Eggert  <eggert@twinsun.com>
18341
18342         * gnulib-tool: Use "test -h", not "test -L", for portability
18343         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
18344         (tags_regexp): Remove, since \| doesn't conform to POSIX.
18345         (sed_extract_prog): Issue s commands one-by-one, rather than
18346         using \| in one s command.
18347
18348 2003-09-16  Paul Eggert  <eggert@twinsun.com>
18349
18350         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
18351         input error, instead of returning NULL the next time we are called
18352         (and therefore losing track of errno).
18353
18354 2003-09-16  Bruno Haible  <bruno@clisp.org>
18355
18356         * gnulib-tool (func_create_testdir): Warn about duplicated
18357         dependencies.
18358
18359 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18360
18361         * modules/argmatch, modules/fatal, modules/obstack,
18362         modules/xalloc, modules/xgethostname: Sort dependencies by
18363         importance, not alphabetically.
18364
18365 2003-09-15  Paul Eggert  <eggert@twinsun.com>
18366
18367         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
18368         fails, so that the caller gets the proper errno.
18369
18370         * lib/readutmp.c (read_utmp): Likewise.
18371         Check for fstat error.  Close stream and free storage
18372         when failing.
18373
18374 2003-09-14  Karl Berry  <karl@gnu.org>
18375
18376         * config/srclist.txt (strdup.c): disable for c89 changes.
18377
18378 2003-09-14  Jim Meyering  <jim@meyering.net>
18379
18380         * lib/getloadavg.c: Correct cpp indentation.
18381         * lib/strdup.c: Likewise.
18382         * lib/vasnprintf.c: Likewise.
18383
18384 2003-09-14  Bruno Haible  <bruno@clisp.org>
18385
18386         * modules/fwriteerror: New file.
18387         * MODULES.html.sh (func_all_modules): Add fwriteerror.
18388
18389 2003-09-14  Bruno Haible  <bruno@clisp.org>
18390
18391         * lib/fwriteerror.h: New file.
18392         * lib/fwriteerror.c: New file.
18393
18394 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18395
18396         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
18397         modules/xgethostname, modules/xalloc: Depend on exit.
18398
18399 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18400
18401         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
18402
18403         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
18404         and AC_MINIX, too, so that their extensions are available.
18405
18406         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
18407         This macro has been superseded by gl_BACKUPFILE.
18408
18409         More patches to assume C89 or better.
18410
18411         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
18412
18413         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
18414         unconditionally.
18415         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
18416         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
18417         Include <string.h>, <stdlib.h> unconditionally.
18418         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
18419         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
18420         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
18421         headers or for string.h.
18422         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
18423         or strtoul.
18424
18425         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
18426         headers.
18427         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
18428         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18429         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
18430         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
18431         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18432         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
18433         memcpy, memset.
18434         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
18435         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
18436         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
18437         strtol.
18438         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
18439         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
18440         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
18441         strtoul.
18442
18443 2003-09-12  Paul Eggert  <eggert@twinsun.com>
18444
18445         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
18446         * lib/obstack.c [!defined _LIBC]: Likewise.
18447         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
18448         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
18449         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
18450
18451         More changes to assume C89 or better.
18452
18453         * lib/error.c (error_tail): Assume vprintf.
18454
18455         * lib/argmatch.c (getenv): Remove decl.
18456         * lib/progreloc.c (get_full_program_name): Define via prototype.
18457         * lib/setenv.c (clearenv): Likewise.
18458         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
18459         needed.
18460         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
18461         (malloc, memcpy): Remove decls.
18462         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
18463         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
18464         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18465         (memcpy): Remove macro.
18466         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
18467         (__P): Remove.  All uses removed.
18468         (PTR): Remove.  All uses changed to void *.
18469         (CHAR_BIT, NULL): Remove.
18470         (spaces, zeros, memset_space, memset_zero)
18471         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
18472         Remove.
18473         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
18474         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
18475         Define with prototype.
18476         Remove now-unnecessary prototype decl.
18477         (extra_args_spec): Assume ANSI C.  All uses changed.
18478         (extra_args_spec_iso): Remove.
18479         (my_strftime, emacs_strftimeu): Define via prototype.
18480         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
18481         unconditionally.
18482         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
18483         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
18484         (strtoul, strtol): Remove decls.
18485         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
18486         LONG_MAX): Remove.
18487         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
18488         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
18489         (LOCALE_PARAM_PROTO): New macro.
18490         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
18491         (INTERNAL (strtol), strtol): Define with a prototype.
18492         (PARAMS): Remove.  All uses removed.
18493         * lib/tempname.c: Include <string.h> unconditionally.
18494         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
18495         * lib/xgethostname.c (main): Define with a prototype.
18496         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
18497         Include <stdlib.h> unconditionally.
18498         (calloc, malloc, realloc, free): Remove decls.
18499         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
18500         Include <stdlib.h> unconditionally.  Sort include file names.
18501         (strtod): Remove.
18502         (xstrtod): Define with a prototype.
18503         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
18504         (strtol, strtoul): Remove decls.
18505
18506 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18507
18508         More patches to assume C89 or better.
18509         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
18510         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
18511         string.h, memchr, STDC_HEADERS.
18512
18513 2003-09-11  Paul Eggert  <eggert@twinsun.com>
18514
18515         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
18516         Include <stdlib.h>, <string.h> unconditionally.
18517         Remove now-unnecessary cast to char *.
18518         * lib/strnlen.c: Include <string.h> unconditionally.
18519         * lib/yesno.c (yesno): Define with a prototype.
18520
18521 2003-09-11  Bruno Haible  <bruno@clisp.org>
18522
18523         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
18524
18525 2003-09-10  Jim Meyering  <jim@meyering.net>
18526
18527         * lib/error.c: Correct indentation of cpp directives.
18528
18529 2003-09-10  Bruno Haible  <bruno@clisp.org>
18530
18531         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
18532         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
18533         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
18534         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
18535         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
18536         <stdlib.h> and <string.h> checks.
18537         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
18538         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
18539
18540 2003-09-10  Bruno Haible  <bruno@clisp.org>
18541
18542         * lib/strcspn.c: Include <string.h> unconditionally.
18543         * lib/strpbrk.c: Include <string.h> unconditionally.
18544         * lib/strstr.c: Include <string.h> unconditionally.
18545         * lib/unicodeio.c: Include <string.h> unconditionally.
18546         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
18547         * lib/unsetenv.c: Likewise.
18548         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
18549         * lib/yesno.c: Include <stdlib.h> unconditionally.
18550         (rpmatch): Add prototype.
18551
18552 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18553
18554         More patches to assume C89 or better.
18555         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
18556         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
18557         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
18558         or for string.h.
18559         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
18560         stdlib.h.
18561         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
18562         C headers.
18563         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
18564         string.h.
18565         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
18566         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
18567         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
18568         or for string.h.
18569         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
18570         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
18571         C headers.
18572         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
18573         memcpy.
18574         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
18575         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
18576         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
18577         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
18578         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
18579         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
18580         string.h, free.
18581         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
18582         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
18583         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
18584         C headers, or for string.h.
18585         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
18586         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
18587         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
18588         headers, memory.h, stdlib.h, string.h, strings.h.
18589         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
18590         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
18591         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
18592         strchr.
18593         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
18594         headers, memory.h, string.h.
18595         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
18596         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
18597         free.
18598         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
18599         headers.
18600         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
18601         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
18602         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
18603         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
18604         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
18605
18606 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18607
18608         More K&R removal.
18609
18610         * lib/acosl.c (main): Use a prototype.
18611         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
18612         tanl.c: Likewise.
18613
18614         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
18615
18616         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
18617         (getopt, etopt_long, getopt_long_only, _getopt_internal)
18618         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
18619         with a prototype.
18620         * lib/getopt.c (const): Remove macro.
18621         Include <string.h> unconditionally.
18622         (my_index): Remove; all uses changed to strchr.
18623         (strlen): Remove decl.
18624         (exchange): Remove forward decl; no longer needed.
18625         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
18626         Define with prototype.
18627         * lib/getopt1.c (const): Remove macro.
18628         (getopt_long, getopt_long_only, main): Define with prototype.
18629
18630         * lib/getugroups.c: Include <string.h> unconditionally.
18631
18632         * lib/getusershell.c: Include <stdlib.h> unconditionally.
18633         (getusershell, setusershell, endusershell, readname, main):
18634         Define with prototypes.
18635
18636         * lib/group-member.c: Include group-member.h first.
18637         Include <stdlib.h> unconditionally.
18638
18639         * lib/hard-locale.c: Include hard-locale.h first.
18640         Include <stdlib.h>, <string.h> unconditionally.
18641
18642         * lib/hash.c (free, malloc): Remove decls.
18643         Include <stdlib.h> unconditionally.
18644
18645         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
18646         (getenv): Do not declare.
18647
18648         * lib/idcache.c: Include <string.h> unconditionally.
18649
18650         * lib/long-options.c: Include long-options.h first, to test interface.
18651         Include <stdlib.h> unconditionally.
18652
18653         * lib/makepath.c: Include makepath.h first, to test interface.
18654         Include <stdlib.h> and <string.h> unconditionally.
18655
18656         * lib/linebuffer.c: Include <stdlib.h>.
18657         (free): Remove decl.
18658
18659         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
18660         stddef.h. rpl_malloc returns void *, not char *.
18661         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
18662         prototype.
18663
18664         * lib/md5.h: Include <limits.h> unconditionally.
18665         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
18666         (__P): Remove; all uses removed.
18667         * lib/md5.c: Include "md5.h" first.
18668         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
18669         md5_buffer, md5_process_bytes, md5_process_block):
18670         Define with prototypes.
18671         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
18672         * lib/sha.c: Include "sha.h" first.
18673         Include <stdlib.h>, <string.h> unconditionally.
18674
18675         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
18676         * lib/memcmp.c (__ptr_t): Likewise.
18677         * lib/memrchr.c (__ptr_t): Likewise.
18678         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
18679         Include <string.h> unconditionally.
18680         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
18681         * lib/memchr.c: Include <stdlib.h> unconditionally.
18682         * lib/memchr.c (LONG_MAX): Remove.
18683         * lib/memrchr.c (LONG_MAX): Likewise.
18684         * lib/memchr.c (__memchr): Define via a prototype.
18685         * lib/memrchr.c (__memrchr): Likewise.
18686         * lib/memcmp.c (__P): Remove, and remove all uses.
18687         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
18688         Remove forward decls; no longer needed.
18689         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
18690         Use types required by C89 in prototype.
18691
18692         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
18693         * lib/savedir.c: Likewise.
18694         * lib/mkdir.c (free): Remove decl.
18695         * lib/rmdir.c (rmdir): Define with a prototype.
18696         * lib/savedir.c: Include savedir.h first, to test interface.
18697
18698         * lib/mktime.c (STDC_HEADERS): Remove.
18699         Include <stdlib.h>, <string.h> unconditionally.
18700
18701         * lib/modechange.c: Include <stdlib.h> unconditionally.
18702         (malloc): Remove decl.
18703
18704         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
18705         (free): Remove decl.
18706
18707         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
18708         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
18709         (This type really should be intptr_t, but that's a C99ism.)
18710         (_obstack_memcpy): Remove: all uses changed to memcpy.
18711         Include <string.h> unconditionally.
18712         (struct obstack): Assume __STDC__ for types of members
18713         chunkfun, freefun, extra_arg.
18714         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
18715         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
18716         obstack_begin, obstack_specify_allocation,
18717         obstack_specify_allocation_with_arg, obstack_chunkfun,
18718         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
18719         Remove unprototyped decls and the macros that use them.
18720         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
18721         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
18722         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
18723         (defined __STDC__ && __STDC__)]:
18724         Remove nonprototyped code.
18725         Include <stdlib.h> unconditionally.
18726         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
18727         _obstack_allocated_p, _obstack_free, obstack_free,
18728         _obstack_memory_used, print_and_abort):
18729         Define using prototypes.
18730         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
18731         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
18732         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
18733         obstack_next_free, obstack_object_size, obstack_room) [0]:
18734         Remove unused, unprototyped code.
18735
18736         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
18737
18738         * lib/physmem.c (physmem_total, physmem_available, main): Define
18739         with prototypes.
18740
18741         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
18742         (main): Define with a prototype.
18743
18744         * lib/posixver.c (getenv): Remove decl.
18745
18746         * lib/putenv.c (malloc): Returns void *, not char *.
18747         Include <string.h> unconditionally.
18748         (strchr, memcpy, NULL): Do not define.
18749
18750         * lib/readtokens.c: Include readtokens.h first, to test interface.
18751         Include <stdlib.h>, <string.h> unconditionally.
18752         (init_tokenbuffer): Define with a prototype.
18753
18754         * lib/regex.c (PARAMS): Remove.  All uses removed.
18755         All uses of _RE_ARGS removed, too.
18756         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
18757         unconditionally.
18758         (bzero): Assume memset exists.
18759         (memcmp, memcpy, NULL): Remove.
18760         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
18761         char, or assignments to local vars of type signed char.
18762         (init_syntax_once, PREFIX(extract_number_and_incr),
18763         PREFIX(print_partial_compiled_pattern),
18764         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
18765         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
18766         PREFIX(regex_grow_registers), PREFIX(regex_compile),
18767         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
18768         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
18769         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
18770         wcs_compile_range, byte_compile_range, truncate_wchar,
18771         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
18772         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
18773         count_mbs_length, wcs_re_match_2_internal,
18774         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
18775         PREFIX(alt_match_null_string_p),
18776         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
18777         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
18778         regfree, PREFIX(extract_number)): Define with prototype.  Remove
18779         now-unnecessary declaration, if any.
18780         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
18781         regcomp, regexec):
18782         Remove now-unnecessary casts among pointer types.
18783         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
18784
18785         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
18786         (free): Remove decl.
18787
18788         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
18789
18790         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
18791         (free): Remove decl.
18792
18793         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
18794         * lib/xgetcwd.c: Likewise.
18795
18796         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
18797         (free): Remove decl.
18798
18799         * lib/strchrnul.c (strchrnul): Define with a prototype.
18800         Fix bug: c_in was not converted to char before searching.
18801
18802         The following changes are not K&R related:
18803
18804         * lib/group-member.h: Include <sys/types.h>, so that this file is
18805         self-contained.
18806         * lib/makepath.h: Likewise.
18807
18808         * lib/getusershell.c (readname, default_index, line_size, readname):
18809         Use size_t, not int, for sizes.
18810         (readname): If the size overflows, report an error instead of
18811         looping forever.
18812
18813 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18814
18815         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
18816         libc.
18817
18818 2003-09-09  Paul Eggert  <eggert@twinsun.com>
18819
18820         * README: New section: portability guidelines.
18821
18822 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18823
18824         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
18825         C89 spec.
18826
18827 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
18828
18829         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
18830
18831 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18832
18833         Assume C89 or better; remove K&R cruft.
18834         A few of these changes were first proposed by Derek Robert Price
18835         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
18836
18837         * lib/addext.c: Include <string.h> unconditionally.
18838         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
18839         Don't declare getenv or malloc.
18840
18841         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
18842         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
18843         (NULL): Remove.
18844         (find_stack_direction, alloca): Use prototypes.
18845
18846         * lib/atexit.c (atexit): Define using a prototype.
18847
18848         * lib/basename.c, dirname.c, stripslash.c:
18849         Include <string.h> unconditionally.
18850
18851         * lib/bcopy.c: Include <stddef.h>.
18852         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
18853
18854         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
18855
18856         * lib/error.h (error, error_at_line, error_print_progname)
18857         [! (defined (__STDC__) && __STDC__)]: Remove decls.
18858         * lib/error.c: Include error.h first, to check interface.
18859         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18860         (VA_START): Remove; all uses changeed to va_start.
18861         (exit, strerror): Remove decls.
18862         (error_print_progname): Prototype uncondionally.
18863         Don't include <errno.h>; no longer needed.
18864         (private_strerror): Remove.
18865         (error_tail): Always define.
18866         (error, error_at_line): Assume C89 or better; always use prototypes.
18867         * lib/fatal.c: Include "fatal.h" first, to test interface.
18868         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
18869         (VA_START): Remove; all uses changed to va_start.
18870         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
18871         this case.
18872         (exit): Remove decl.
18873         (fatal): Prototype unconditionally.  Assume va_start works.
18874         Abort at end, to pacify gcc.
18875
18876         * lib/euidaccess.c (main): Define with a prototype.
18877
18878         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
18879
18880         * lib/exitfail.c: Include <stdlib.h> unconditionally.
18881
18882         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
18883         prototypes.
18884         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
18885         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
18886         (getenv): Remove decl.
18887         (fnmatch): Define using a prototype.
18888         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
18889         (FCT): Define using a prototype.
18890
18891         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
18892
18893         * lib/gethostname.c: Include <stddef.h>.
18894         (gethostname): Define with prototype.  Length is size_t, not int.
18895
18896 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18897
18898         Assume C89 or better; remove K&R cruft.
18899         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
18900         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
18901         string.h, getenv, malloc.
18902         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
18903         headers.
18904         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
18905         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
18906         do not check for strerror.
18907         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
18908         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
18909         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
18910         do not check for doprnt or vprintf.
18911         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
18912         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
18913
18914 2003-09-08  Paul Eggert  <eggert@twinsun.com>
18915
18916         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
18917         getversion.c should have been removed then, but was accidentally
18918         preserved.
18919
18920         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
18921         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
18922
18923 2003-09-08  Karl Berry  <karl@gnu.org>
18924
18925         * config/config.sub, config.guess, srclistvars.sh: update from savannah
18926                 config, forget about prep.
18927
18928         * config/depcomp, missing: update from automake.
18929
18930 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18931
18932         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
18933         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18934
18935 2003-09-07  Paul Eggert  <eggert@twinsun.com>
18936
18937         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
18938         copy_tm_result.  Bug reported by Simon Josefsson in
18939         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
18940
18941 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18942
18943         * m4/time_r.m4: New file.
18944         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
18945         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
18946         is. Check for timegm declaration.
18947         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
18948         Do not check for gmtime_r.
18949         Replace mktime if __mktime_internal does not exist and if mktime
18950         hasn't been replaced already.
18951
18952 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18953
18954         * lib/time_r.c, lib/time_r.h: New files.
18955
18956         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
18957         __localtime_r.
18958         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
18959         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
18960
18961         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
18962         __gmtime_r.
18963         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
18964         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
18965         Include <time_r.h>.
18966
18967         * lib/timegm.c: Switch to glibc implementation, with the following
18968         changes:
18969         [defined HAVE_CONFIG_H]: Include <config.h>.
18970         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
18971         (__mktime_internal) [!defined _LIBC]: New decl.
18972         (__gmtime_r) [!defined _LIBC]: New macro and function.
18973         (timegm): Use a prototype, since gnulib assumes C89.
18974         Do not bother declaring tmp to be const, as it's not really usefu.
18975         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
18976         (timegm): Declare only if HAVE_DECL_TIMEGM.
18977
18978 2003-09-06  Paul Eggert  <eggert@twinsun.com>
18979
18980         * MODULES.html.sh (func_all_modules): Add time_r.
18981         * modules/time_r: New file.
18982         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
18983         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
18984
18985 2003-09-03  Paul Eggert  <eggert@twinsun.com>
18986
18987         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
18988         Bug reported by Lute Kamstra in
18989         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
18990
18991         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
18992         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
18993         course with correspondingly smaller numbers for tomorrow and
18994         yesterday.  From Tadayoshi Funaba.  Originally installed into
18995         sh-utils on 1999-08-07, but the patch got lost (I guess during the
18996         coreutils merge?).
18997
18998 2003-08-31  Simon Josefsson  <jas@extundo.com>
18999
19000         * modules/timegm: New file.
19001         * MODULES.html.sh (func_all_modules): Add timegm.
19002
19003 2003-08-31  Simon Josefsson  <jas@extundo.com>
19004
19005         * m4/timegm.m4: New file.
19006
19007 2003-08-31  Simon Josefsson  <jas@extundo.com>
19008
19009         * lib/timegm.h: New file.
19010         * lib/timegm.c: New file.  Based on
19011         wget-1.8.2/src/http.c:mktime_from_utc.
19012
19013 2003-08-31  Karl Berry  <karl@gnu.org>
19014
19015         * lib/argp.h: update from libc.
19016
19017 2003-08-28  Bruno Haible  <bruno@clisp.org>
19018
19019         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
19020         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
19021         followed by '#define fnmatch fnmatch_posix' gives an error.
19022
19023 2003-08-28  Bruno Haible  <bruno@clisp.org>
19024
19025         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
19026         warning on QNX, which defines O_BINARY to 000000.
19027
19028 2003-08-27  Jim Meyering  <jim@meyering.net>
19029
19030         * m4/mkstemp.m4: Require that the system mkstemp be able to create
19031         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
19032         would fail after 32.  Reported by Danny Levinson.  Details here:
19033         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
19034
19035 2003-08-24  Bruno Haible  <bruno@clisp.org>
19036
19037         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
19038         MSVC7 <stdio.h> is included later.
19039
19040 2003-08-22  Simon Josefsson  <jas@extundo.com>
19041
19042         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
19043
19044 2003-08-20  Karl Berry  <karl@gnu.org>
19045
19046         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
19047
19048 2003-08-20  Bruno Haible  <bruno@clisp.org>
19049
19050         * modules/progname: New file.
19051         * MODULES.html.sh (func_all_modules): Add progname.
19052
19053 2003-08-20  Bruno Haible  <bruno@clisp.org>
19054
19055         * lib/progname.h: New file, from GNU gettext.
19056         * lib/progname.c: New file, from GNU gettext.
19057         * lib/progreloc.c: New file, from GNU gettext.
19058
19059 2003-08-19  Jim Meyering  <jim@meyering.net>
19060
19061         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
19062         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
19063
19064 2003-08-19  Bruno Haible  <bruno@clisp.org>
19065
19066         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
19067         more.
19068
19069 2003-08-19  Bruno Haible  <bruno@clisp.org>
19070
19071         * lib/xstrdup.c: Assume <string.h> exists.
19072
19073 2003-08-18  Paul Eggert  <eggert@twinsun.com>
19074
19075         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
19076         in makefile rules.
19077
19078 2003-08-18  Jim Meyering  <jim@meyering.net>
19079
19080         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
19081         * m4/lib-ld.m4: Likewise.
19082
19083 2003-08-18  Jim Meyering  <jim@meyering.net>
19084
19085         * lib/setenv.h: Indent nested cpp directive.
19086         * lib/vasnprintf.c: Remove trailing blanks.
19087
19088 2003-08-17  Simon Josefsson  <jas@extundo.com>
19089
19090         * modules/xstrndup: New file.
19091         * MODULES.html.sh (func_all_modules): Add xstrndup.
19092
19093 2003-08-17  Simon Josefsson  <jas@extundo.com>
19094
19095         * modules/argp: Fix autoconf macro name. Add more dependencies.
19096
19097 2003-08-17  Simon Josefsson  <jas@extundo.com>
19098
19099         * m4/xstrndup.m4: New file.
19100
19101 2003-08-17  Simon Josefsson  <jas@extundo.com>
19102
19103         * m4/argp.m4: New file.
19104
19105 2003-08-17  Simon Josefsson  <jas@extundo.com>
19106             Bruno Haible  <bruno@clisp.org>
19107
19108         * lib/xstrndup.h: New file.
19109         * lib/xstrndup.c: New file.
19110
19111 2003-08-17  Bruno Haible  <bruno@clisp.org>
19112
19113         * modules/strndup (Files, Include): Add lib/strndup.h.
19114
19115 2003-08-17  Bruno Haible  <bruno@clisp.org>
19116
19117         * modules/euidaccess (Files): Add lib/euidaccess.h.
19118
19119 2003-08-17  Bruno Haible  <bruno@clisp.org>
19120
19121         * lib/strndup.h: New file.
19122
19123 2003-08-17  Bruno Haible  <bruno@clisp.org>
19124
19125         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
19126         like AC_GNU_SOURCE.
19127         * modules/extensions (configure.ac): Comment out the invocation of
19128         gl_USE_SYSTEM_EXTENSIONS.
19129
19130 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19131
19132         Merges from coreutils, etc.
19133         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
19134         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
19135         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
19136         fixing a typo.
19137         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
19138         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
19139
19140 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19141
19142         Document merge from coreutils.
19143         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
19144         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
19145         * modules/utime: Add m4/utimes-null.m4.
19146
19147 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19148
19149         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
19150         space, undoing this 2003-08-12 change:
19151         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19152
19153 2003-08-16  Paul Eggert  <eggert@twinsun.com>
19154
19155         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
19156         strtoul.c from libc, undoing this 2003-08-12 change:
19157         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
19158
19159 2003-08-16  Jim Meyering  <jim@meyering.net>
19160
19161         Merges from coreutils.
19162         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
19163         prefix.  Adjust cache variables similarly.  Create 500 rather than
19164         just 300 files, to exercise bug on Darwin6.5, too.
19165         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
19166         $missing_dir.
19167         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
19168         AM_SYS_POSIX_TERMIOS.
19169         Reported by mkc@mathdogs.com.
19170         Also change use of $am_cv_sys_posix_termios
19171         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
19172         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
19173         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
19174         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
19175         in /proc/mounts until it finds one with matching device number.  This
19176         is unnecessary when the FILE argument *is* a mount point.  No stat call
19177         is necessary in that case.  So, disable the statvfs-testing code on
19178         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
19179         as RedHat bug# 84846.
19180         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19181         to 1MB, so as not to render systems with no stack size limit (e.g.,
19182         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19183         Include <unistd.h>.  On some systems,
19184         it is required for the definition of _SC_PAGESIZE.
19185
19186 2003-08-16  Jim Meyering  <jim@meyering.net>
19187
19188         Merge from coreutils.
19189         * lib/xstrtoimax.c: #else #if -> #elif.
19190         * lib/xstrtoumax.c: Likewise.
19191
19192 2003-08-16  Jim Meyering  <jim@meyering.net>
19193
19194         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
19195         * m4/utimes.m4: Removed.
19196         * m4/utimes-null.m4: Renamed from utimes.m4.
19197
19198         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
19199         to 1MB, so as not to render systems with no stack size limit (e.g.,
19200         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
19201         Include <unistd.h>.  On some systems,
19202         it is required for the definition of _SC_PAGESIZE.
19203
19204 2003-08-16  Jim Meyering  <jim@meyering.net>
19205         and Paul Eggert  <eggert@cs.ucla.edu>
19206
19207         Merges from coreutils, etc.
19208
19209         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
19210         using the latest version from cvs.  This avoids problems with #line
19211         directives using a vendor (Sun) compiler.
19212         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
19213         Don't set GETGROUPS_LIB here; now it's
19214         done via getgroups.m4's wrapper function.
19215         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
19216         rather than just in sh-util/configure.in, so that the
19217         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
19218         same.
19219         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
19220         AC_FUNC_GETLOADAVG where to find getloadavg.c.
19221         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
19222         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
19223         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
19224         Remove code that is now done by the newly-required macros.
19225         Append $(EXEEXT) to DF_PROG.
19226         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
19227         Do not invoke or require the following here,
19228         since prereq.m4 or some gnulib .m4 now does this for us:
19229         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
19230         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
19231         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
19232         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
19233         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
19234         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
19235         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
19236         AC_FUNC_OBSTACK.
19237         Do not replace the following functions, as this is now the job
19238         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
19239         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
19240         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
19241         atexit getpass, strdup, getpagesize.
19242         Replace 'raise'.
19243         Do not check for the following functions, as this is now the job
19244         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
19245         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
19246         setregid.
19247         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
19248         Check for sys/sysctl.h.
19249         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
19250         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
19251         of checking for ssize_t ourselves.
19252
19253         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
19254         Require every macro that gnulib/modules/* suggests for us.
19255         (jm_PREREQ_ADDEXT): New macro.
19256         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
19257         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
19258
19259         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
19260         (gl_PHYSMEM): Use it.
19261         Also check for `table' function.
19262         Check for new headers and functions.
19263         Add check for sys/sysmp.h.
19264         With suggestions from Kaveh Ghazi.
19265         Ignore headers that are present but cannot be compiled.  This
19266         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
19267         C 5.4.
19268
19269 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19270
19271         Document merge from coreutils.
19272         * modules/userspec: Depend on posixver.
19273         * modules/strftime: Depend on tzset.
19274
19275 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19276
19277         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
19278         rather than tab, after '#' in shell-script copyright notices.
19279         Suggested by Bruno Haible.
19280
19281 2003-08-15  Paul Eggert  <eggert@twinsun.com>
19282
19283         * config/srclist-update: Use three spaces, rather than tab, after '#'
19284         in shell-script copyright notices.  Suggested by Bruno Haible.
19285         Remove unnecessary parenthesization in regular expression.
19286
19287 2003-08-15  Jim Meyering  <jim@meyering.net>
19288
19289         Merge from coreutils.
19290         * lib/xgethostname.c: Include <stdlib.h>.
19291         (xghostname): Don't exit for anything other than memory-related
19292         failure; just return NULL.
19293         * lib/userspec.c: Include "posixver.h".
19294         (parse_user_spec): Accept `.' as a separator only
19295         in pre-POSIX-200112 mode.
19296         * lib/strtoimax.c: Use #elif rather than #else #if.
19297         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
19298         Remove function, now that we can rely on a working tzset function.
19299         [!_LIBC]: Ensure that the required autoconf test has been run.
19300         [!defined _NL_CURRENT && HAVE_STRFTIME]:
19301         Use underlying_strftime for %r.
19302         * lib/sha.c: Merge in some clean-up and optimization changes from
19303         glibc.
19304         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
19305         Ensure that it is a multiple of 64.
19306         Rearrange loop exit tests so as to avoid performing an
19307         additional fread after encountering an error or EOF.
19308         * lib/realloc.c: Update copyright date.
19309
19310 2003-08-15  Jim Meyering  <jim@meyering.net>
19311         and Paul Eggert  <eggert@twinsun.com>
19312
19313         Merge from coreutils.
19314         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
19315         member but strut utmpx does not.  Needed for AIX 4.3.3.
19316         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
19317
19318 2003-08-15  Jim Meyering  <jim@meyering.net>
19319         and Paul Eggert  <eggert@cs.ucla.edu>
19320
19321         Merges from coreutils, etc.
19322         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
19323         Require gl_FUNC_TZSET_CLOBBER.
19324         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
19325         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
19326         members.
19327
19328 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19329
19330         Help the merge from coreutils.
19331         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
19332         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
19333         * m4/tzset.m4: Use it too.
19334
19335 2003-08-14  Paul Eggert  <eggert@twinsun.com>
19336
19337         * modules/tzset: New file.
19338
19339 2003-08-14  Jim Meyering  <jim@meyering.net>
19340
19341         Merges from coreutils.
19342         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
19343         variable names, rather than @FNMATCH_H@.
19344         * modules/alloca: Likewise for $(ALLOCA_H).
19345
19346         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
19347         the three copies of the literal target, `fnmatch.h'.
19348         * modules/alloca (alloca.h): Likewise.
19349
19350 2003-08-14  Jim Meyering  <jim@meyering.net>
19351
19352         Merge from coreutils.
19353         * m4/tzset.m4: New file.
19354         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
19355         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
19356         otherwise, AIX 5.1 systems would end up using the latter.
19357         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
19358         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
19359         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
19360         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
19361
19362 2003-08-14  Jim Meyering  <jim@meyering.net>
19363
19364         Merge from coreutils.
19365         * lib/obstack.h: Whitespace changes.
19366         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
19367         and xcalloc return values.
19368         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
19369         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
19370         hang on OSF/1 5.1 for DIR on both local and remote file systems.
19371         Reported by (and fix confirmed by) Nelson H. F. Beebe.
19372         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
19373         error from mntctl.
19374         Use mntctl's return value to drive the entry-processing loop, since
19375         we can't rely on the value of the vmt_length member in the last
19376         entry.  On some systems doing so could result in exhausting
19377         virtual memory.  Based in part on a patch from Mike Jetzer.
19378
19379 2003-08-14  Jim Meyering  <jim@meyering.net>
19380         and Paul Eggert  <eggert@twinsun.com>
19381
19382         Merges from coreutils, plus other fixes.
19383         * lib/physmem.c: Merge in portability changes from gcc/libiberty
19384         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
19385         for credits and details.  Thanks to Kaveh Ghazi for helping
19386         to keep these files in sync.
19387         (ARRAY_SIZE): Define it.
19388         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
19389         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
19390         (memcasecmp): Don't assume size_t fits in unsigned int.
19391         Remove casts and duplicate code.
19392         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
19393         (memcpy): Remove definition.
19394         Merge in some clean-up and optimization changes from glibc.
19395         [BLOCKSIZE]: Move definition to top of file.
19396         Ensure that it is a multiple of 64.
19397         Rearrange loop exit tests so as to avoid performing an
19398         additional fread after encountering an error or EOF.
19399         * lib/md5.h (md5_uintptr): Define.
19400         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
19401         return to the initial working directory.  Preserve errno
19402         for caller.
19403         * lib/idcache.c: Include "xalloc.h".
19404         (xmalloc, xrealloc): Remove decls.
19405         (getuser): Remove casts no longer required in C89.
19406         * lib/human.c: Include stdio.h, for sprintf.
19407         * lib/group-member.c: Include "xalloc.h".
19408         (xmalloc, xrealloc): Remove decls.
19409         (get_group_info): Remove casts no longer required in C89.
19410         * lib/getusershell.c (readname): Remove casts no longer required in
19411         C89.
19412         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
19413         * lib/getline.c: Whitespace fix, from coreutils.
19414
19415 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19416
19417         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
19418         Check for isascii.
19419
19420         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19421         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19422         Undo previous (whitespace-only) change.
19423
19424 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19425
19426         * lib/exclude.c: Include <ctype.h>
19427         (IN_CTYPE_DOMAIN): New macro.
19428         (is_space): New fn.
19429         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
19430         and empty lines.
19431
19432         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19433         Undo previous (whitespace-only) change.
19434
19435 2003-08-13  Paul Eggert  <eggert@twinsun.com>
19436
19437         * config/srclist-update: Change update back to the old behavior,
19438         leaving whitespace alone.  Use one 'sed' command rather than a
19439         pipeline.
19440         (fixlicense): Now a variable, not a function.
19441         (remove_trailing_blanks): Remove.
19442         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
19443         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19444         Undo previous (whitespace-only) change.
19445
19446 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19447
19448         Merge from coreutils.
19449         * modules/euidaccess: Add lib_SOURCES, include for new
19450         file euidaccess.h
19451
19452 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19453
19454         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
19455         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
19456         Normalize leading white space and remove trailing white space.
19457
19458         Merge from coreutils
19459         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
19460
19461         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
19462         0.12.1.  These files are now being upgraded automatically by
19463         ../config/srclist-update.
19464
19465 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19466
19467         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
19468         Normalize leading white space and remove trailing white space.
19469         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
19470         notice, as per ../config/srclist-update.
19471
19472         Merge from coreutils.
19473         * lib/euidaccess.h: New file.
19474         * lib/euidaccess.c: Include it.
19475         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
19476         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
19477         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
19478
19479 2003-08-12  Paul Eggert  <eggert@twinsun.com>
19480
19481         * config/srclist-update: Add copyright notice.
19482         (remove_id_lines, remove_trailing_blanks): New constants.
19483         (fixfile): Use them to normalize spacing a bit in copied files.
19484         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
19485         Normalize leading white space and remove trailing white space.
19486
19487         * config/texinfo.tex: Sync with texinfo.
19488
19489         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
19490         strtoul.c from libc, to merge coreutils whitespace changes.
19491
19492         * config/srclist.txt: Get the following m4 files from gettext:
19493         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
19494         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
19495         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
19496         wint_t.m4.
19497
19498 2003-08-12  Karl Berry  <karl@gnu.org>
19499
19500         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
19501         been made.
19502
19503 2003-08-11  Paul Eggert  <eggert@twinsun.com>
19504
19505         * modules/gnu-source, m4/gnu-source.m4:
19506         Remove; we're assuming Autoconf 2.54 or later now.
19507         Suggested by Bruno Haible.
19508         * MODULES.html.sh (func_all_modules): Remove gnu-source.
19509
19510 2003-08-11  Bruno Haible  <bruno@clisp.org>
19511
19512         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
19513
19514 2003-08-11  Bruno Haible  <bruno@clisp.org>
19515
19516         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
19517         (vasnprintf): Use it instead of wcslen.
19518
19519 2003-08-11  Bruno Haible  <bruno@clisp.org>
19520
19521         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
19522         value to ensure that _Bool promotes to int. Use #define for _Bool when
19523         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
19524
19525 2003-08-10  Karl Berry  <karl@gnu.org>
19526
19527         * lib/regex.h: update from libc (whitespace fix).
19528
19529 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19530
19531         Merge some files from coreutils.  These changes were
19532         originally made by Jim Meyering.
19533         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
19534         many older Unixes require this.
19535         * lib/alloca.c (alloca): Remove cast to argument of free;
19536         no longer needed in C89.
19537         * lib/alloca_.h, regex.h: Fix white space to match
19538         what GNU indent does.
19539
19540 2003-08-09  Paul Eggert  <eggert@twinsun.com>
19541
19542         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
19543         apparently Emacs's Unicode mode got confused before my 2003-08-05
19544         checkin.
19545
19546 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19547
19548         * m4/extensions.m4: New file.
19549         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
19550         Require gl_USE_SYSTEM_EXTENSIONS.
19551         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
19552         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
19553
19554 2003-08-08  Paul Eggert  <eggert@twinsun.com>
19555
19556         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
19557         * modules/extensions, modules/gnu-source: New files.
19558         * modules/timespec, modules/unlocked-io: Depend on extensions.
19559
19560 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19561
19562         * modules/restrict: New file.
19563         * MODULES.html.sh (func_all_modules): Add restrict.
19564         * modules/regex: Depend on restrict.
19565
19566 2003-08-07  Paul Eggert  <eggert@twinsun.com>
19567
19568         * m4/restrict.m4: New file.
19569         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
19570
19571 2003-08-07  Bruno Haible  <bruno@clisp.org>
19572
19573         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
19574         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
19575
19576 2003-08-07  Bruno Haible  <bruno@clisp.org>
19577
19578         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
19579         makes the module 'getndelim2' compatible with the module 'getline'.
19580
19581 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19582
19583         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
19584         byte with "\201" to avoid glitches when editing that source file
19585         with multi-gnome-terminal.
19586
19587 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19588
19589         * lib/bumpalloc.h: Remove.
19590
19591 2003-08-05  Paul Eggert  <eggert@twinsun.com>
19592
19593         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
19594         * modules/bumpalloc: Remove.
19595
19596 2003-08-04  Paul Eggert  <eggert@twinsun.com>
19597
19598         * lib/getloadavg.c: Change copyright notice and spacing to conform to
19599         GNU coding style.
19600
19601         Merge from coreutils.
19602         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
19603         1. From glibc.
19604         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
19605         from Karl Berry, implemented by Jim Meyering.
19606         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
19607         from Dmitry V. Levin.
19608         Remove anachronistic cast of xrealloc.
19609         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
19610         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
19611         type. Otherwise, it wouldn't compile with at least /bin/cc on
19612         ymp-cray-unicos9.0.2.X.
19613         Combine two mostly-identical uses of alloca into one.
19614         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
19615
19616 2003-08-04  Dave Love  <d.love@dl.ac.uk>
19617
19618         [From Emacs.]
19619
19620         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
19621         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
19622         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
19623         obsolete NLIST_NAME_UNION.
19624         [__GNU__]: Undef BSD and FSCALE.
19625         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
19626
19627 2003-08-03  Paul Eggert  <eggert@twinsun.com>
19628
19629         * lib/stdbool_.h (_Bool): Make it signed char, instead of
19630         an enum type, so that it's guaranteed to promote to int.  See:
19631         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
19632
19633 2003-08-03  Karl Berry  <karl@gnu.org>
19634
19635         * config/depcomp: update from automake.
19636
19637 2003-07-31  Paul Eggert  <eggert@twinsun.com>
19638
19639         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
19640         (strerror): Don't assume that a printable int fits in 14 bytes.
19641
19642 2003-07-31  Bruno Haible  <bruno@clisp.org>
19643
19644         * modules/getpass-gnu: New file.
19645         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
19646
19647 2003-07-31  Bruno Haible  <bruno@clisp.org>
19648
19649         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
19650
19651 2003-07-24  Karl Berry  <karl@gnu.org>
19652
19653         * config/missing: update from automake.
19654
19655 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
19656             Bruno Haible  <bruno@clisp.org>
19657
19658         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
19659         * lib/getline.c (getline, getdelim): Likewise.
19660         Remove _GNU_SOURCE define; now it's defined in config.h through
19661         m4/getline.m4.
19662
19663 2003-07-23  Karl Berry  <karl@gnu.org>
19664
19665         * config/config.sub: update from prep.
19666
19667 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19668
19669         * modules/xalloc (Depends-on): Add exitfail.
19670         * modules/xmemcoll: Likewise.
19671
19672 2003-07-22  Paul Eggert  <eggert@twinsun.com>
19673
19674         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
19675         over-parenthesization in macros.
19676
19677         Sync with coreutils.
19678
19679         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
19680         required by C99.
19681
19682         Use `exit_failure' for xalloc and xmemcoll instead of their own
19683         private exit-failure variables.
19684         * lib/xalloc.h (xalloc_exit_failure): Remove.
19685         * lib/xmalloc.c: Likewise.  Include exitfail.h.
19686         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
19687         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
19688         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
19689         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
19690
19691 2003-07-20  Jim Meyering  <jim@meyering.net>
19692
19693         * modules/closeout (Depends-on): Add exitfail.
19694         Suggestion from Bruno Haible.
19695
19696 2003-07-19  Karl Berry  <karl@gnu.org>
19697
19698         * config/config.sub: update from prep.
19699
19700 2003-07-18  Paul Eggert  <eggert@twinsun.com>
19701
19702         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
19703         Remove.
19704         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
19705         to test that it can stand by itself.  Include "exitfail.h".
19706         Clients should set exit_failure instead.
19707         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
19708
19709 2003-07-18  Bruno Haible  <bruno@clisp.org>
19710
19711         * modules/getndelim2: New file.
19712         * modules/getline: Share files with module getndelim2.
19713         * modules/getnline: Depend on getndelim2 instead of sharing files with
19714         it. Add getnline.c to lib_SOURCES.
19715         * MODULES.html.sh (func_all_modules): Add getndelim2.
19716
19717 2003-07-18  Bruno Haible  <bruno@clisp.org>
19718
19719         * m4/getndelim2.m4: New file.
19720         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
19721         invoke gl_PREREQ_GETNDELIM2.
19722         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
19723         gl_PREREQ_GETNDELIM2.
19724         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
19725         gl_GETNDELIM2.
19726
19727 2003-07-18  Bruno Haible  <bruno@clisp.org>
19728
19729         * lib/getndelim2.h: New file.
19730         * lib/getndelim2.c: Make into a module of its own. Include config.h,
19731         getndelim2.h.
19732         (getndelim2): Make non-static. Change return type to ssize_t.
19733         * lib/getline.h: Change argument names.
19734         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
19735         * lib/getnline.c: Include getndelim2.h.
19736
19737 2003-07-18  Andreas Schwab  <schwab@suse.de>
19738
19739         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
19740
19741 2003-07-17  Karl Berry  <karl@gnu.org>
19742
19743         * config/config.sub: update from prep.
19744
19745 2003-07-17  Bruno Haible  <bruno@clisp.org>
19746
19747         * modules/getnline: New file.
19748         * modules/getline: Add lib/getndelim2.c to source file list.
19749         * MODULES.html.sh (func_all_modules): Add getnline.
19750
19751 2003-07-17  Bruno Haible  <bruno@clisp.org>
19752
19753         * m4/getnline.m4: New file.
19754
19755 2003-07-17  Bruno Haible  <bruno@clisp.org>
19756
19757         * m4/Makefile.am.in: Remove file.
19758         * m4/Makefile.am: Remove file.
19759         * m4/Makefile.in: Remove file.
19760
19761 2003-07-17  Bruno Haible  <bruno@clisp.org>
19762
19763         * lib/getnline.h: New file.
19764         * lib/getnline.c: New file.
19765         * lib/getndelim2.c: New file, extracted from getline.c.
19766         (getndelim2): Renamed from getdelim2, with added nmax argument.
19767         * lib/getline.c: Include getndelim2.c.
19768         (getdelim2): Moved out to getndelim2.c.
19769         (getline, getdelim): Update.
19770
19771 2003-07-17  Bruno Haible  <bruno@clisp.org>
19772
19773         * lib/Makefile.am: Remove file.
19774         * lib/Makefile.in: Remove file.
19775
19776 2003-07-17  Bruno Haible  <bruno@clisp.org>
19777
19778         * configure.in: Remove file.
19779         * Makefile.in: Remove file.
19780
19781 2003-07-17  Bruno Haible  <bruno@clisp.org>
19782
19783         * MODULES.html.sh: Put the </BODY> right before </HTML>.
19784
19785 2003-07-16  Karl Berry  <karl@gnu.org>
19786
19787         * config/srclist-update: was running fixlicense twice, which caused
19788                 texinfo.tex to be nullified for some reason.  Simplify,
19789                 $gplsrc is no longer needed as far as I can see?
19790
19791 2003-07-16  Jim Meyering  <jim@meyering.net>
19792
19793         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
19794
19795 2003-07-15  Paul Eggert  <eggert@twinsun.com>
19796
19797         * config/srclist.txt: Get the following files from gettext-runtime/intl
19798         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
19799         ref-del.sin.  From Bruno Haible.
19800         * config/srclist-update (fixfile): Change grep pattern again, since the
19801         previous fix didn't work (there was another trailing $).  Use
19802         '[$]' to escape the $s.
19803
19804 2003-07-15  Karl Berry  <karl@gnu.org>
19805
19806         * lib/vasnprintf.c: update from gettext.
19807
19808 2003-07-15  Karl Berry  <karl@gnu.org>
19809
19810         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
19811         gets expanded when surrounded by '$'.
19812
19813 2003-07-15  Jim Meyering  <jim@meyering.net>
19814
19815         * modules/save-cwd: Don't depend on error.  From Derek Price.
19816
19817 2003-07-15  Jim Meyering  <jim@meyering.net>
19818
19819         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
19820
19821 2003-07-14  Simon Josefsson  <jas@extundo.com>
19822
19823         * modules/mempcpy: New file.
19824         * MODULES.html.sh (func_all_modules): Add mempcpy.
19825
19826 2003-07-14  Simon Josefsson  <jas@extundo.com>
19827
19828         * m4/mempcpy.m4: New file.
19829
19830 2003-07-14  Simon Josefsson  <jas@extundo.com>
19831
19832         * lib/mempcpy.h: New file.
19833         * lib/mempcpy.c: New file.
19834
19835 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19836
19837         * modules/getdate, modules/posixtm: Depend on mktime.
19838
19839 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19840
19841         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
19842         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
19843         unicodeio.c, unicodeio.h, unlocked-io.h:
19844         Switch from LGPL to GPL.
19845
19846 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19847
19848         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
19849         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
19850         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
19851         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
19852         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
19853         updated automatically by ../config/srclist-update.  This changes
19854         their license from LPGL to GPL.
19855
19856 2003-07-14  Paul Eggert  <eggert@twinsun.com>
19857
19858         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
19859         assumed to refer to the root of the most recent stable gettext version.
19860         * config/srclistvars.sh: Add defaults for eggert.
19861         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
19862         Match "This program" as well as "The program".  This is needed
19863         for gettext.
19864
19865 2003-07-14  Jim Meyering  <jim@meyering.net>
19866
19867         Don't emit diagnostics.  Let callers do that.
19868         * lib/save-cwd.c: Don't include "error.h".
19869         (save_cwd): Don't call error.  Ensure that errno is valid
19870         when returning nonzero.
19871
19872         * lib/save-cwd.h (restore_cwd): Update prototype.
19873         * lib/save-cwd.c (restore_cwd): Remove two parameters.
19874         Simplify.  Don't call error upon failure.  Let callers do that.
19875         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
19876         when auditing is enabled.  But don't bother updating the #if.
19877
19878 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
19879
19880         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
19881         it breaks C++ compilation.
19882         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
19883
19884 2003-07-10  Simon Josefsson  <jas@extundo.com>
19885
19886         * modules/strchrnul (Makefile.am): Add strchrnul.h.
19887
19888 2003-07-10  Jim Meyering  <jim@meyering.net>
19889
19890         * m4/clock_time.m4: Remove trailing blank.
19891         * m4/intmax_t.m4: Likewise.
19892
19893 2003-07-10  Jim Meyering  <jim@meyering.net>
19894
19895         * lib/vasnprintf.c: Remove trailing blanks.
19896         Make cpp indentation consistent.
19897
19898 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19899
19900         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
19901         posixver.c, strftime.c, strnlen.c, strverscmp.c:
19902         Switch from LGPL to GPL.
19903
19904 2003-07-09  Paul Eggert  <eggert@twinsun.com>
19905
19906         * config/srclist.txt: Sort sublists.  Add
19907         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
19908         that differ from gnulib for one reason or another; we'd like this list
19909         to be smaller but for now let's document what we have.
19910
19911 2003-07-08  Paul Eggert  <eggert@twinsun.com>
19912
19913         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
19914         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
19915         and sweeter "eval x=$x".
19916         * config/srclist.txt: Get lib/argp* from glibc.
19917
19918 2003-07-07  Paul Eggert  <eggert@twinsun.com>
19919
19920         * lib/mktime.c: Fix some boundary cases and remove need for floating
19921         point.
19922
19923         Issue a compile-time diagnostic if time_t is floating point, or if
19924         two's complement arithmetic is not in effect, or if arithmetic
19925         right shift does not propagate the sign.  These assumptions were
19926         all in the original code but they weren't checked.
19927
19928         (TIME_T_MIDPOINT, verify): New macros.
19929         (__isleap): Remove; it has integer overflow problems.
19930         (leapyear): New function, without those problems.
19931         (ydhms_tm_diff): Remove; splitting into two parts.
19932         (ydhms_diff): New function, containing the arithmetic part of
19933         the old ydhms_tm_diff function.  Issue a compile-time
19934         diagnostic if we are not using C99 integer division.
19935         Avoid casts when possible.
19936         (guess_time_tm): New function, containing the checking part of
19937         the old ydhms_tm_diff function.  Return the new value, rather than
19938         the difference between it and the old.  Accept a new argument T
19939         so that *T specifies the old value.  Check for overflow in the result.
19940
19941         (__mktime_internal): Use a time_t offset, not a long int offset.
19942         This undoes the 2003-06-04 change, which is no longer needed now
19943         that we have better overflow checking.
19944         (localtime_offset): Likewise.
19945
19946         (__mktime_internal): Avoid harmful overflow on hosts where time_t
19947         and long are 64-bit but int is only 32-bit.
19948         (ydhms_diff): Use long int to store year1 and yday1.
19949         Issue a compile-time diagnostic if long int is not wide enough.
19950
19951         (__mktime_internal): Use long int to store adjusted year and yday.
19952         Use plain C rather than preprocessor commands, if that doesn't
19953         affect efficiency.
19954         Check for overflow (and try to repair) after each probe
19955         rather than checking only at the very end.  This avoids some bugs
19956         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
19957         does not equal GMT offset at maximum time).
19958         Use integer to check for overflow rather than floating point; this
19959         is more portable to non-IEEE hosts, and is a tad faster.
19960         When we detect that we are oscillating between two values,
19961         don't check whether tm_isdst has the requested value, since
19962         we already know the answer.  When tm_isdst has the wrong value,
19963         use a different heuristic to find the right one, based on the
19964         extreme values actually observed in practice in tz2003a,
19965         rather than the (overly optimistic) "previous 3 calendar quarters".
19966
19967         (not_equal_tm, print_tm, check_result): Use "const T" rather than
19968         "T const" to accommodate glibc style.
19969         (check_result): Use less-confusing report format.  "long" -> "long int.
19970         (main): Likewise.
19971         Don't loop if the iteration overflows time_t.
19972         Allow a negative step in the iteration.
19973
19974 2003-07-06  Karl Berry  <karl@gnu.org>
19975
19976         * config/depcomp: update from automake.
19977         * config/config.sub: update from prep.
19978
19979 2003-07-03  Karl Berry  <karl@gnu.org>
19980
19981         * config/config.guess: update from prep.
19982
19983 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19984
19985         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
19986         xreadlink.c now includes it unconditionally.
19987
19988 2003-07-01  Paul Eggert  <eggert@twinsun.com>
19989
19990         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
19991         having it depend on HAVE_SYS_TYPES_H.
19992
19993 2003-07-01  Bruno Haible  <bruno@clisp.org>
19994
19995         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
19996         <sys/types.h> should be sufficient.
19997         Reported by Paul Eggert.
19998
19999 2003-06-26  Karl Berry  <karl@gnu.org>
20000
20001         * config/depcomp: update from automake.
20002
20003 2003-06-26  Bruno Haible  <bruno@clisp.org>
20004
20005         * modules/human: Depend on module stdbool.
20006
20007 2003-06-25  Bruno Haible  <bruno@clisp.org>
20008
20009         * modules/readlink: New file.
20010         * modules/xreadlink: Depend on it.
20011         * MODULES.html.sh (func_all_modules): Add readlink.
20012
20013 2003-06-25  Bruno Haible  <bruno@clisp.org>
20014
20015         * m4/readlink.m4: New file.
20016
20017 2003-06-25  Bruno Haible  <bruno@clisp.org>
20018
20019         * lib/readlink.c: New file.
20020
20021 2003-06-22  Karl Berry  <karl@gnu.org>
20022
20023         * config/srclist.txt: update mkinstalldirs from automake.
20024         * config/mkinstalldirs: update.
20025
20026 2003-06-22  Bruno Haible  <bruno@clisp.org>
20027
20028         Portability to mingw32.
20029         * m4/ssize_t.m4: New file, from GNU gettext.
20030         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
20031         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
20032
20033 2003-06-22  Bruno Haible  <bruno@clisp.org>
20034
20035         * modules/safe-read: Add m4/ssize_t.m4.
20036         * modules/xreadlink: Add m4/ssize_t.m4.
20037
20038 2003-06-20  Bruno Haible  <bruno@clisp.org>
20039
20040         Assume C89, so PARAMS isn't needed.
20041         * lib/unicodeio.h (PARAMS): Remove.
20042         * lib/unicodeio.c: Don't use PARAMS.
20043
20044 2003-06-18  Karl Berry  <karl@gnu.org>
20045
20046         * config/config.{guess,sub}: update from prep.
20047
20048 2003-06-18  Jim Meyering  <jim@meyering.net>
20049
20050         Merge changes from coreutils.
20051         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
20052         Remove explicit declarations of xmalloc and realloc.
20053         Include xalloc.h.
20054         (read_utmp): Remove anachronistic cast of xmalloc.
20055
20056 2003-06-17  Paul Eggert  <eggert@twinsun.com>
20057
20058         Assume C89, so PARAMS isn't needed.
20059         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
20060         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
20061         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
20062         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
20063         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
20064         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
20065         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
20066         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
20067         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
20068         lib/xstrtod.h, lib/xstrtol.h: Likewise.
20069         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
20070         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
20071         no longer needed. Anyway, config.h should always be included before any
20072         other file.
20073
20074 2003-06-11  Simon Josefsson  <jas@extundo.com>
20075
20076         * modules/sysexits: New file.
20077         * MODULES.html.sh (func_all_modules): Add sysexits.
20078
20079 2003-06-11  Simon Josefsson  <jas@extundo.com>
20080
20081         * lib/sysexit_.h: New file.
20082
20083 2003-06-11  Derek Price  <derek@ximbiot.com>
20084
20085         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
20086         necessary.
20087
20088 2003-06-11  Bruno Haible  <bruno@clisp.org>
20089
20090         * m4/sysexits.m4: New file.
20091
20092 2003-06-10  Simon Josefsson  <jas@extundo.com>
20093
20094         * lib/argp.h: New file, from glibc.
20095         * lib/argp-ba.c: New file, from glibc.
20096         * lib/argp-eexst.c: New file, from glibc.
20097         * lib/argp-fmtstream.c: New file, from glibc.
20098         * lib/argp-fmtstream.h: New file, from glibc.
20099         * lib/argp-fs-xinl.c: New file, from glibc.
20100         * lib/argp-help.c: New file, from glibc.
20101         * lib/argp-namefrob.h: New file, from glibc.
20102         * lib/argp-parse.c: New file, from glibc.
20103         * lib/argp-pv.c: New file, from glibc.
20104         * lib/argp-pvh.c: New file, from glibc.
20105         * lib/argp-xinl.c: New file, from glibc.
20106
20107 2003-06-10  Simon Josefsson  <jas@extundo.com>
20108
20109         * modules/strchrnul: New file.
20110
20111 2003-06-10  Simon Josefsson  <jas@extundo.com>
20112
20113         * modules/argp: New file.
20114
20115 2003-06-10  Simon Josefsson  <jas@extundo.com>
20116
20117         * m4/strchrnul.m4: New file.
20118
20119 2003-06-10  Simon Josefsson  <jas@extundo.com>
20120
20121         * lib/strchrnul.h: New file.
20122         * lib/strchrnul.c: New file.
20123
20124 2003-06-10  Bruno Haible  <bruno@clisp.org>
20125
20126         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
20127
20128 2003-06-07  Karl Berry  <karl@gnu.org>
20129
20130         * config/config.{guess,sub}: update from prep.
20131
20132 2003-06-07  Jim Meyering  <jim@meyering.net>
20133
20134         * modules/strtod: Use $(...) notation, not @...@ for
20135         AC_REPLACE'd variables.
20136         * modules/localcharset: Likewise.
20137
20138 2003-06-07  Jim Meyering  <jim@meyering.net>
20139
20140         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
20141         in place of my name in the copyright comment.
20142         Remove definition and uses of __P.
20143
20144         From coreutils.
20145         * lib/stat.c: Don't declare xmalloc explicitly.
20146         Instead, include "xalloc.h".
20147         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
20148         xrealloc, and xcalloc return values.
20149         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
20150         Improve comment.
20151         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
20152
20153 2003-06-07  Bruno Haible  <bruno@clisp.org>
20154
20155         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
20156         avoid AC_CONFIG_LINKS.
20157         * modules/fnmatch (Makefile.am): Use explicit creation rule for
20158         fnmatch.h, to avoid AC_CONFIG_LINKS.
20159         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
20160
20161 2003-06-07  Bruno Haible  <bruno@clisp.org>
20162
20163         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
20164         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
20165         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20166         directory.
20167         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
20168         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
20169         directory.
20170
20171 2003-06-06  Jim Meyering  <jim@meyering.net>
20172
20173         Merge from coreutils.
20174         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
20175         Consolidate declarations and initializations of *_base* locals.
20176
20177         Merge from coreutils.
20178         This avoids a core dump on systems without GNU putenv,
20179         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
20180         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
20181         (unsetenv): New static function, from GNU libc.
20182         (rpl_putenv): Use it.
20183
20184         * lib/modechange.c: Remove trailing blanks.
20185
20186         Merge from coreutils.
20187         * lib/fsusage.c: Remove declaration of statfs.
20188         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
20189
20190         * lib/posixtm.c: Include <stdbool.h> unconditionally.
20191
20192 2003-06-06  Jim Meyering  <jim@meyering.net>
20193
20194         * lib/stdbool_.h: Renamed from stdbool.h.in.
20195
20196 2003-06-06  Jim Meyering  <jim@meyering.net>
20197             Bruno Haible  <bruno@clisp.org>
20198
20199         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
20200         Adjust Makefile.am snippet not to redirect directly to target.
20201         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
20202
20203 2003-06-05  Paul Eggert  <eggert@twinsun.com>
20204
20205         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
20206         mismatch, look in future quarters as well as past.  This fixes a
20207         bug when processing fall-backwards gaps immediately after a long
20208         period of daylight-saving time.
20209
20210         * lib/mktime.c: Assume freestanding C89 or better.
20211         (HAVE_LIMITS_H): Remove.  Assume it's 1.
20212         (__P): Remove; not used.
20213         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
20214         (mktime, not_equal_tm, print_tm, check_result,
20215         main): Use prototypes.  Use const * where appropriate.
20216         (main): Fix typo in testing code that uncovered by above changes.
20217         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
20218
20219 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20220
20221         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
20222         locale.h, localeconv.  This merges changes from coreutils.
20223
20224         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
20225         It can be removed after the next Autoconf is released.
20226         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
20227         needed.
20228
20229 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20230
20231         * lib/mktime.c: Fix Debian bug 177940
20232         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
20233         (localtime_offset): Now long int, not time_t, because we want it
20234         to be guaranteed to be signed.  All uses changed.
20235         (__mktime_internal): If overflow would occur when adding offset,
20236         don't add it.
20237
20238         Merge 'human' changes from coreutils.  Rewrite to support
20239         locale-specific notations like thousands separators.
20240         * lib/human.c: Simplify authorship notice.
20241         Include human.h immediately after config.h.
20242         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
20243         <limits.h>: Do not include, since human.h does.
20244         (SIZE_MAX, UINTMAX_MAX): New macros.
20245         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
20246         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
20247         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
20248         (power_letter): Renamed from suffixes.
20249         (generate_suffix_backwards): Remove.
20250         (adjust_value): Now takes int style (because of human.h changes)
20251         and long double value (for greater precision on some platforms).
20252         (group_number): New function.
20253         (human_readable): Use it.  Use integer options, not enum.
20254         Put the options before the sizes in the arg list.
20255         Support all the new options.
20256         The old human_readable function has been removed;
20257         use inttostr.h instead.
20258         (human_readable, default_block_size, humblock):
20259         Use uintmax_t, not int, for block sizes.
20260         (human_readable_inexact, block_size_types): Remove.
20261         (block_size_opts): New constant.
20262         (human_options): Renamed from human_block_size, with new signature
20263         that allows block sizes up to UINTMAX_MAX.  All callers changed.
20264         * lib/human.h: Add copyright and authorship notice.
20265         Include <limits.h> and <stdbool.h> unconditionally.
20266         (PARAMS): Remove.  All uses removed.
20267         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
20268         (enum human_inexact_style): Remove tag; now a nameless enum.
20269         (human_floor, human_ceiling, human_round_to_even): Now have
20270         values 2, 0, 1 rather than -1, 1, 0.
20271         (human_group_digits, human_suppress_point_zero, human_autoscale,
20272         human_base_1024, human_SI, human_B): New constants.
20273         (human_readable_inexact, human_block_size): Remove.
20274         (human_readable): Size args are now uintmax_t, not int.
20275         (human_options): New decl.
20276
20277         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
20278         unnecessary now that we assume C89 or better.  This change
20279         imported from coreutils.
20280
20281         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20282         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
20283         in the 2003-05-30 sync from glibc.
20284
20285         .h files should stand alone, but we shouldn't include <sys/types.h>
20286         if we can get away with just <stddef.h>.
20287
20288         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
20289         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
20290         rather than <sys/types.h>, as we merely need size_t.
20291         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
20292         to get size_t.
20293         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
20294         Include <stdio.h>, to get FILE.
20295         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
20296         memcasecmp.h has included <stddef.h> and all we need is size_t.
20297         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
20298         our interface, instead of including <sys/types.h>
20299
20300 2003-06-04  Paul Eggert  <eggert@twinsun.com>
20301
20302         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
20303         now, as glibc mktime is buggy on non-glibc systems.
20304
20305 2003-06-03  Karl Berry  <karl@gnu.org>
20306
20307         * config/config.sub: update from prep.
20308
20309 2003-06-02  Paul Eggert  <eggert@twinsun.com>
20310
20311         [from coreutils]
20312         Fix some minor time-related bugs with POSIX time arguments.
20313         Some valid time stamps were being rejected (notably -1, and
20314         time stamps before 1900 on 64-bit hosts).  And some invalid
20315         time stamps were being accepted, e.g. September 31.
20316
20317         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
20318         that we can return (time_t) -1 successfully.
20319         * lib/posixtm.c: Likewise.
20320         [HAVE_STDBOOL_H]: Include <stdbool.h>.
20321         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
20322         (t): Remove static var.
20323         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
20324         of static var.  All uses changed.
20325         (year): Do not reject years before 1900; they can occur with
20326         64-bit time_t.
20327         (posix_time_parse): Do not check for out-of-range components;
20328         that is now the caller's responsibility, since our checks were
20329         only approximations.
20330         (posixtime): Use mktime to check for out-of-range components,
20331         since it knows them exactly.
20332         If mktime returns (time_t) -1, check whether an error actually occurred
20333         by invoking localtime on -1.
20334         (main) [TEST_POSIXTIME]: Check for input data errors, and report
20335         posixtime failures better.
20336         Improve the test data (in comments only).
20337
20338 2003-06-02  Karl Berry  <karl@gnu.org>
20339
20340         * config/mkinstalldirs (version): new variable.
20341         (--version): new option.
20342         (usage): improve message.
20343
20344 2003-05-30  Karl Berry  <karl@gnu.org>
20345
20346         * lib/mktime.c: update from libc.
20347
20348 2003-05-30  Bruno Haible  <bruno@clisp.org>
20349
20350         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
20351         * config/config.rpath: Upgrade to gettext-0.12.1.
20352
20353 2003-05-30  Bruno Haible  <bruno@clisp.org>
20354
20355         * m4/gettext.m4: Upgrade to gettext-0.12.1.
20356         * m4/nls.m4: New file, from gettext-0.12.1.
20357         * m4/po.m4: New file, from gettext-0.12.1.
20358         * m4/progtest.m4: Upgrade to gettext-0.12.1.
20359
20360 2003-05-30  Bruno Haible  <bruno@clisp.org>
20361
20362         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
20363         * lib/localcharset.h: Likewise.
20364         * lib/localcharset.c: Likewise.
20365
20366 2003-05-29  Karl Berry  <karl@gnu.org>
20367
20368         * config/config.rpath: update from gettext.
20369
20370 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20371
20372         Assume the headers required for C89 freestanding compilers.
20373         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
20374         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
20375         * m4/human.m4 (gl_HUMAN): Likewise.
20376         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
20377         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
20378         * m4/userspec.m4 (gl_USERSPEC): Likewise.
20379         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
20380         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
20381         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
20382
20383 2003-05-28  Paul Eggert  <eggert@twinsun.com>
20384
20385         Assume the headers required for C89 freestanding compilers.
20386         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
20387         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
20388         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
20389         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
20390         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
20391         define, since <limits.h> is guaranteed to do that.
20392         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
20393         * lib/exclude.c: Include <stdbool.h> unconditionally.
20394         * lib/tempname.c: Include <stddef.h> unconditionally.
20395         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
20396         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
20397         <stddef.h> does that.
20398         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
20399         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
20400         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
20401         needed.
20402         * lib/xstrtol.c: Likewise.
20403         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
20404         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
20405
20406         * lib/addext.c (addext): Use assignment rather than cast, to avoid
20407         warnings on some platforms.
20408
20409         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
20410         arbitrarily.
20411
20412 2003-05-26  Jim Meyering  <jim@meyering.net>
20413
20414         Merge in a change from coreutils:
20415         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
20416         that is guaranteed to be `no'.  Use `no_such_member' to indicate
20417         that condition, rather than `-1' which is slightly misleading.
20418         Change the name of the cache variable to have the gl_ prefix.
20419         Prompted by a patch from Richard Dawe for DJGPP.
20420
20421 2003-05-24  Karl Berry  <karl@gnu.org>
20422
20423         * config/config.guess: update from prep.
20424
20425 2003-05-22  Karl Berry  <karl@gnu.org>
20426
20427         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
20428
20429 2003-05-20  Karl Berry  <karl@gnu.org>
20430
20431         * config/config.guess: update from prep.
20432
20433 2003-05-18  Karl Berry  <karl@gnu.org>
20434
20435         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
20436         might actually be set by the user.
20437
20438         * config/depcomp, install-sh, mdate-sh: update from automake.
20439
20440 2003-05-17  Bruno Haible  <bruno@clisp.org>
20441
20442         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
20443         invalid expansion for AC_EGREP_CPP.
20444         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
20445         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
20446         Suggested by Akim Demaille <akim@epita.fr> in
20447         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
20448
20449 2003-05-12  Jim Meyering  <jim@meyering.net>
20450
20451         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
20452         the space-padded-by-default conversion specifiers, %e, %k, %l.
20453
20454 2003-05-12  Bruno Haible  <bruno@clisp.org>
20455
20456         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
20457         the string is longer than 4 KB.
20458
20459 2003-05-11  Karl Berry  <karl@gnu.org>
20460
20461         * config/config.{guess,sub}: update from prep.
20462
20463 2003-05-09  Bruno Haible  <bruno@clisp.org>
20464
20465         * modules/error: Add m4/strerror_r.m4 to file list.
20466
20467 2003-05-03  Bruno Haible  <bruno@clisp.org>
20468
20469         Upgrade to Unicode-4.0.
20470         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
20471         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
20472         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
20473         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
20474         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
20475         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
20476         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
20477         Change width of U+E0100..U+E01EF from 1 to 0.
20478
20479 2003-04-25  Jim Meyering  <jim@meyering.net>
20480
20481         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
20482         of type size_t, not int.
20483
20484 2003-04-25  Bruno Haible  <bruno@clisp.org>
20485
20486         * lib/copy-file.c: Include <stddef.h>, for size_t.
20487
20488 2003-04-21  Paul Eggert  <eggert@twinsun.com>
20489
20490         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
20491         code which expansion is under static control.  Patch imported from
20492         Akim Demaille's patch to Bison; see
20493         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
20494
20495 2003-04-14  Bruno Haible  <bruno@clisp.org>
20496
20497         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
20498
20499 2003-04-11  Jim Meyering  <jim@meyering.net>
20500
20501         Merge changes from Coreutils.
20502
20503         2003-03-22  Jim Meyering  <jim@meyering.net>
20504
20505         * lib/strftime.c (widen): Cast alloca return value to proper type.
20506
20507         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
20508
20509         From GNU libc.
20510         * lib/strftime.c (my_strftime): Handle very large width
20511         specifications for numeric values correctly.  Improve checks for
20512         overflow.
20513
20514         2003-01-19  Jim Meyering  <jim@meyering.net>
20515
20516         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
20517         definitions.
20518         (nl_get_alt_digit) [! defined my_strftime]: Define.
20519         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
20520         _nl_get_alt_digit and _nl_get_walt_digit.
20521
20522         * lib/strftime.c (my_strftime): Merge in locale-related changes from
20523         libc. These changes have no effect outside of _LIBC.
20524
20525 2003-04-10  Bruno Haible  <bruno@clisp.org>
20526
20527         * modules/findprog: New file.
20528         * MODULES.html.sh (func_all_modules): Add it.
20529
20530 2003-04-10  Bruno Haible  <bruno@clisp.org>
20531
20532         * m4/findprog.m4: New file.
20533         * m4/eaccess.m4: New file.
20534
20535 2003-04-10  Bruno Haible  <bruno@clisp.org>
20536
20537         * lib/findprog.h: New file, from GNU gettext.
20538         * lib/findprog.c: New file, from GNU gettext.
20539
20540 2003-04-05  Jim Meyering  <jim@meyering.net>
20541
20542         Merge changes from Coreutils.
20543
20544         * lib/exclude.h (PARAMS): Remove definition and uses.
20545         * lib/exclude.c: Remove uses of `PARAMS'.
20546
20547         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
20548         Add test-cases for DOS filenames. Declare program_name.
20549         (main): Set up program_name.  Patch by Rich Dawe.
20550
20551         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
20552         error from mntctl.
20553         Use mntctl's return value to drive the entry-processing loop, since
20554         we can't rely on the value of the vmt_length member in the last
20555         entry.  On some systems doing so could result in exhausting
20556         virtual memory.  Based in part on a patch from Mike Jetzer.
20557
20558 2003-04-04  Bruno Haible  <bruno@clisp.org>
20559
20560         * modules/linebreak: New file.
20561         * MODULES.html.sh (func_all_modules): Add it.
20562
20563 2003-04-04  Bruno Haible  <bruno@clisp.org>
20564
20565         * m4/linebreak.m4: New file.
20566
20567 2003-04-04  Bruno Haible  <bruno@clisp.org>
20568
20569         * lib/linebreak.h: New file, from GNU gettext.
20570         * lib/linebreak.c: New file, from GNU gettext with slight
20571         modifications.
20572         * lib/lbrkprop.h: New file, from GNU gettext.
20573
20574 2003-04-03  Bruno Haible  <bruno@clisp.org>
20575
20576         * modules/utf8-ucs4: New file.
20577         * modules/utf16-ucs4: New file.
20578         * modules/ucs4-utf8: New file.
20579         * modules/ucs4-utf16: New file.
20580         * MODULES.html.sh (func_all_modules): Add them.
20581
20582 2003-04-03  Bruno Haible  <bruno@clisp.org>
20583
20584         * m4/utf-ucs4.m4: New file.
20585         * m4/ucs4-utf.m4: New file.
20586
20587 2003-04-03  Bruno Haible  <bruno@clisp.org>
20588
20589         * lib/utf8-ucs4.h: New file, from GNU gettext.
20590         * lib/utf16-ucs4.h: New file, from GNU gettext.
20591         * lib/ucs4-utf8.h: New file, from GNU gettext.
20592         * lib/ucs4-utf16.h: New file, from GNU gettext.
20593
20594 2003-04-02  Bruno Haible  <bruno@clisp.org>
20595
20596         * modules/binary-io: New file.
20597         * MODULES.html.sh (func_all_modules): Add it.
20598
20599 2003-04-02  Bruno Haible  <bruno@clisp.org>
20600
20601         * lib/binary-io.h: New file, from GNU gettext.
20602
20603 2003-04-01  Bruno Haible  <bruno@clisp.org>
20604
20605         * modules/pathname: New file.
20606         * MODULES.html.sh (func_all_modules): Add it.
20607
20608 2003-04-01  Bruno Haible  <bruno@clisp.org>
20609
20610         * lib/pathname.h: New file, from GNU gettext.
20611         * lib/concatpath.c: New file, from GNU gettext.
20612
20613 2003-03-30  Bruno Haible  <bruno@clisp.org>
20614
20615         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
20616
20617 2003-03-30  Bruno Haible  <bruno@clisp.org>
20618
20619         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
20620         function chown() doesn't exist.
20621
20622 2003-03-28  Bruno Haible  <bruno@clisp.org>
20623
20624         * modules/copy-file: New file.
20625         * MODULES.html.sh (func_all_modules): Add it.
20626
20627 2003-03-28  Bruno Haible  <bruno@clisp.org>
20628
20629         * m4/copy-file.m4: New file.
20630
20631 2003-03-28  Bruno Haible  <bruno@clisp.org>
20632
20633         * lib/copy-file.h: New file, from GNU gettext.
20634         * lib/copy-file.c: New file, from GNU gettext.
20635
20636 2003-03-18  Jim Meyering  <jim@meyering.net>
20637
20638         * lib/quote.c (quote_n): Fix typo in comment.
20639
20640 2003-03-18  Bruno Haible  <bruno@clisp.org>
20641
20642         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
20643         checking.
20644         * m4/onceonly_2_57.m4: Likewise.
20645
20646 2003-03-17  Bruno Haible  <bruno@clisp.org>
20647
20648         * m4/onceonly.m4: Require autoconf 2.54 or newer.
20649         (m4_quote): Remove macro.
20650         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
20651
20652 2003-03-14  Jim Meyering  <jim@meyering.net>
20653
20654         Merge changes from Coreutils.
20655         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
20656         to be const, in order to avoid warnings.
20657         (obstack_room): Likewise.
20658         (obstack_empty_p): Likewise.
20659
20660 2003-03-14  Bruno Haible  <bruno@clisp.org>
20661
20662         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
20663         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
20664
20665 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20666
20667         Merge changes from Bison.
20668         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
20669         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
20670         when compiling Bison 1.875's `bitset bset = obstack_alloc
20671         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
20672         * lib/hash.c: Include <stdbool.h> unconditionally.
20673
20674 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20675
20676         * m4/onceonly.m4 (m4_quote): New macro.
20677         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
20678         Quote AC_FOREACH variable-expansions properly.
20679
20680 2003-03-13  Paul Eggert  <eggert@twinsun.com>
20681
20682         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
20683
20684 2003-03-09  Paul Eggert  <eggert@twinsun.com>
20685
20686         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
20687         Reported by Bruce Becker; see:
20688         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
20689
20690 2003-03-03  Paul Eggert  <eggert@twinsun.com>
20691             Bruno Haible  <bruno@clisp.org>
20692
20693         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
20694         Reported by John Hughes, see
20695         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
20696
20697 2003-02-20  Bruno Haible  <bruno@clisp.org>
20698
20699         * MODULES.html.sh (func_all_modules): Add poll.
20700
20701 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20702
20703         * modules/poll: New file.
20704
20705 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20706
20707         * lib/poll_.h: New file.
20708         * lib/poll.c: New file.
20709
20710 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
20711
20712         * m4/poll.m4: New file.
20713
20714 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20715
20716         * modules/mathl: New file.
20717
20718 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20719
20720         * lib/mathl.h: New file.
20721         * lib/acosl.c: New file.
20722         * lib/asinl.c: New file.
20723         * lib/atanl.c: New file.
20724         * lib/ceill.c: New file.
20725         * lib/cosl.c: New file.
20726         * lib/expl.c: New file.
20727         * lib/floorl.c: New file.
20728         * lib/frexpl.c: New file.
20729         * lib/ldexpl.c: New file.
20730         * lib/logl.c: New file.
20731         * lib/sincosl.c: New file.
20732         * lib/sinl.c: New file.
20733         * lib/sqrtl.c: New file.
20734         * lib/tanl.c: New file.
20735         * lib/trigl.c: New file.
20736         * lib/trigl.h: New file.
20737
20738 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
20739
20740         * m4/mathl.m4: New file.
20741
20742 2003-02-18  Bruno Haible  <bruno@clisp.org>
20743
20744         * MODULES.html.sh (func_all_modules): Add mathl.
20745
20746 2003-02-17  Bruno Haible  <bruno@clisp.org>
20747
20748         * modules/mkdtemp: New module.
20749         * MODULES.html.sh (func_all_modules): Add it.
20750
20751 2003-02-17  Bruno Haible  <bruno@clisp.org>
20752
20753         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
20754
20755 2003-02-17  Bruno Haible  <bruno@clisp.org>
20756
20757         * lib/mkdtemp.h: New file, from GNU gettext.
20758         * lib/mkdtemp.c: New file, from GNU gettext.
20759
20760 2003-02-02  Jim Meyering  <jim@meyering.net>
20761
20762         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
20763         e.g. glibc-2.2.93.
20764
20765 2003-01-31  Bruno Haible  <bruno@clisp.org>
20766
20767         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
20768         'rpl_rename'.
20769         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
20770         'rpl_strnlen'.
20771         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
20772         'rpl_strtod'.
20773         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
20774         'rpl_utime'.
20775
20776 2003-01-31  Bruno Haible  <bruno@clisp.org>
20777
20778         * lib/rename.c: #undef rename before defining rpl_rename.
20779         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
20780
20781 2003-01-30  Bruno Haible  <bruno@clisp.org>
20782
20783         * modules/vasnprintf, modules/vasprintf: New modules.
20784         * MODULES.html.sh (func_all_modules): Add them.
20785
20786 2003-01-30  Bruno Haible  <bruno@clisp.org>
20787
20788         * m4/signed.m4: New file, from GNU gettext.
20789         * m4/longdouble.m4: New file, from GNU gettext.
20790         * m4/wchar_t.m4: New file, from GNU gettext.
20791         * m4/wint_t.m4: New file, from GNU gettext.
20792         * m4/vasnprintf.m4: New file.
20793         * m4/vasprintf.m4: New file.
20794
20795 2003-01-30  Bruno Haible  <bruno@clisp.org>
20796
20797         * lib/printf-args.h: New file, from GNU gettext.
20798         * lib/printf-args.c: New file, from GNU gettext.
20799         * lib/printf-parse.h: New file, from GNU gettext.
20800         * lib/printf-parse.c: New file, from GNU gettext.
20801         * lib/vasnprintf.h: New file, from GNU gettext.
20802         * lib/vasnprintf.c: New file, from GNU gettext.
20803         * lib/asnprintf.c: New file, from GNU gettext.
20804         * lib/vasprintf.h: New file, from GNU gettext with modifications.
20805         * lib/vasprintf.c: New file, from GNU gettext.
20806         * lib/asprintf.c: New file, from GNU gettext.
20807
20808 2003-01-29  Bruno Haible  <bruno@clisp.org>
20809
20810         * modules/stpncpy: New module.
20811         * MODULES.html.sh (func_all_modules): Add it.
20812
20813 2003-01-29  Bruno Haible  <bruno@clisp.org>
20814
20815         * m4/stpncpy.m4: New file.
20816
20817 2003-01-29  Bruno Haible  <bruno@clisp.org>
20818
20819         * lib/stpncpy.h: New file, from GNU gettext with modifications.
20820         * lib/stpncpy.c: New file, from GNU gettext with modifications.
20821
20822 2003-01-28  Bruno Haible  <bruno@clisp.org>
20823
20824         * modules/c-ctype: New module.
20825         * MODULES.html.sh (func_all_modules): Add it.
20826
20827 2003-01-28  Bruno Haible  <bruno@clisp.org>
20828
20829         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
20830         Paul Eggert.
20831         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
20832         Paul Eggert.
20833
20834 2003-01-27  Bruno Haible  <bruno@clisp.org>
20835
20836         * modules/xsetenv: New module.
20837         * MODULES.html.sh (func_all_modules): Add it.
20838
20839 2003-01-27  Bruno Haible  <bruno@clisp.org>
20840
20841         * lib/xsetenv.h: New file, from GNU gettext.
20842         * lib/xsetenv.c: New file, from GNU gettext.
20843
20844 2003-01-23  Jim Meyering  <jim@meyering.net>
20845
20846         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
20847         from working on systems without dirfd (at least Irix and OSF1/Tru64).
20848
20849 2003-01-23  Bruno Haible  <bruno@clisp.org>
20850
20851         * modules/minmax: New module.
20852         * MODULES.html.sh (func_all_modules): Add it.
20853
20854 2003-01-23  Bruno Haible  <bruno@clisp.org>
20855
20856         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
20857         Eggert.
20858
20859 2003-01-22  Bruno Haible  <bruno@clisp.org>
20860
20861         * modules/exit: New module.
20862         * MODULES.html.sh (func_all_modules): Add it.
20863
20864 2003-01-22  Bruno Haible  <bruno@clisp.org>
20865
20866         * lib/exit.h: New file, from GNU gettext.
20867
20868 2003-01-19  Bruno Haible  <bruno@clisp.org>
20869
20870         * gnulib-tool: Recognize option --extract-maintainer.
20871         (func_get_maintainer): New function.
20872         * modules/*: Add Maintainer entry.
20873
20874 2003-01-16  Jim Meyering  <jim@meyering.net>
20875
20876         * m4/regex.m4: The `regex' struct is both input and output.
20877         Initialize it before each use.  Patch by Tim Waugh.
20878
20879 2003-01-16  Bruno Haible  <bruno@clisp.org>
20880
20881         * MODULES.html.sh: Add a table of contents. Add the module name as
20882         leftmost column. Add hyperlinks.
20883
20884 2003-01-15  Bruno Haible  <bruno@clisp.org>
20885
20886         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
20887
20888 2003-01-15  Bruno Haible  <bruno@clisp.org>
20889
20890         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
20891         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
20892         suffix.
20893
20894 2003-01-15  Bruno Haible  <bruno@clisp.org>
20895
20896         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
20897
20898 2003-01-15  Bruno Haible  <bruno@clisp.org>
20899
20900         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
20901         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
20902
20903 2003-01-14  Jim Meyering  <jim@meyering.net>
20904
20905         * lib/same.c (same_name): Tweak a comment.
20906
20907 2003-01-14  Bruno Haible  <bruno@clisp.org>
20908
20909         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
20910         when a string comparison is sufficient.
20911
20912 2003-01-14  Bruno Haible  <bruno@clisp.org>
20913
20914         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
20915         'unsigned int'.
20916
20917 2003-01-14  Bruno Haible  <bruno@clisp.org>
20918
20919         * lib/hash-pjw.c: Add comment about low quality of this function.
20920
20921 2003-01-13  Bruno Haible  <bruno@clisp.org>
20922
20923         * modules/stpcpy: Distribute lib/stpcpy.h.
20924         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
20925
20926 2003-01-13  Bruno Haible  <bruno@clisp.org>
20927
20928         * modules/*: Add a description.
20929         * modules/strpbrk: Fix Makefile.am snippet.
20930         * modules/strtoimax: Fix dependencies.
20931         * modules/strtoumax: Likewise.
20932
20933 2003-01-13  Bruno Haible  <bruno@clisp.org>
20934
20935         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
20936         * modules/alloca (Makefile.am): All object files depend on alloca.h.
20937         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
20938
20939 2003-01-13  Bruno Haible  <bruno@clisp.org>
20940
20941         * gnulib-tool (func_create_testdir): Store config/* files in the main
20942         directory.
20943         * config.rpath: Move to ...
20944         * config/config.rpath: ... here.
20945         * modules/gettext: Contains config/config.rpath, not config.rpath.
20946         * modules/iconv: Likewise.
20947
20948 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20949
20950         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20951         to avoid collisions with libcurses and libreadline.
20952
20953         * m4/getstr.m4: Remove.
20954         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
20955
20956 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20957
20958         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20959         to avoid collisions with libcurses and libreadline.
20960
20961         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
20962         * lib/getstr.h, getstr.c: Remove.
20963         * lib/getline.c: Include "getline.h", to check interface.
20964         Move body of old getstr.c here: this defines MIN_CHUNK and
20965         declares getdelim2, which is renamed from getstr.
20966         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
20967
20968         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
20969         All uses changed.
20970         * lib/linebuffer.h: Likewise.
20971         (readline): Remove backward-compatibility macro.
20972
20973 2003-01-12  Paul Eggert  <eggert@twinsun.com>
20974
20975         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
20976         to avoid collisions with libcurses and libreadline.
20977         * getstr: Remove.
20978         * MODULES.html.sh: Remove getstr.
20979         * modules/getline: Depend on unlocked-io, not getstr.
20980
20981 2003-01-12  Jim Meyering  <jim@meyering.net>
20982
20983         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
20984
20985 2003-01-10  Bruno Haible  <bruno@clisp.org>
20986
20987         * modules/alloca: Change Makefile.am requirements. Simplify Include
20988         requirements. Add lib/alloca_.h to file list.
20989
20990 2003-01-10  Bruno Haible  <bruno@clisp.org>
20991
20992         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
20993
20994 2003-01-10  Bruno Haible  <bruno@clisp.org>
20995
20996         * lib/alloca_.h: New file.
20997         * lib/getdate.y: Unconditionally include alloca.h.
20998         * lib/makepath.c: Likewise.
20999         * lib/setenv.c: Likewise.
21000         * lib/userspec.c: Likewise.
21001
21002 2003-01-09  Karl Berry  <karl@gnu.org>
21003
21004         * MODULES.html.sh: include `dirname $0` in PATH, to find
21005         gnulib-tool.
21006
21007 2003-01-09  Bruno Haible  <bruno@clisp.org>
21008
21009         * modules/stdbool: Change configure.ac, Makefile.am requirements.
21010         Simplify Include requirements. Add lib/stdbool.h.in to file list.
21011
21012 2003-01-09  Bruno Haible  <bruno@clisp.org>
21013
21014         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
21015
21016 2003-01-09  Bruno Haible  <bruno@clisp.org>
21017
21018         * lib/stdbool.h.in: New file.
21019
21020 2003-01-09  Bruno Haible  <bruno@clisp.org>
21021
21022         * gnulib-tool (func_all_modules): Ignore files ending in ~.
21023         * MODULES.html.sh: Likewise.
21024
21025 2003-01-08  Jim Meyering  <jim@meyering.net>
21026
21027         * lib/full-write.c: Undefine and define-away `const' after inclusion
21028         of errno.h, not before.  Suggestion from Bruno Haible.
21029
21030 2003-01-08  Bruno Haible  <bruno@clisp.org>
21031
21032         * modules/full-read: Depend on full-write.
21033
21034 2003-01-08  Bruno Haible  <bruno@clisp.org>
21035
21036         * lib/safe-read.c: Include specification header first, to ensure its
21037         selfcontainedness.
21038         * lib/full-write.c: Likewise.
21039
21040 2003-01-07  Jim Meyering  <jim@meyering.net>
21041
21042         * lib/full-write.c: Rework so that it may serve to define full_read,
21043         too.
21044         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
21045
21046 2003-01-07  Bruno Haible  <bruno@clisp.org>
21047
21048         * lib/strtoimax.c: Include <stdint.h> as an alternative to
21049         <inttypes.h>.
21050         * lib/xstrtol.h: Likewise.
21051         * lib/xstrtoimax.c: Likewise.
21052         * lib/xstrtoumax.c: Likewise.
21053         * lib/human.h: Likewise.
21054
21055         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
21056         on systems that have <inttypes.h> but not <stdint.h>.
21057
21058 2003-01-07  Bruno Haible  <bruno@clisp.org>
21059
21060         * MODULES.html.sh: Add copyright notice.
21061         (missed_files): Omit CVS directory entries.
21062         (func_module): Make it work with sed-3.02.
21063         * MODULES.txt: Remove file.
21064
21065 2003-01-06  Jim Meyering  <jim@meyering.net>
21066
21067         * lib/version-etc.c: Update year in translatable copyright string.
21068
21069 2003-01-03  Karl Berry  <karl@gnu.org>
21070
21071         * config/config.{guess,sub}: update from prep.
21072
21073 2003-01-02  Karl Berry  <karl@gnu.org>
21074
21075         * doc/COPYING.DOC: belatedly updated to 1.2.
21076
21077 2003-01-01  Karl Berry  <karl@gnu.org>
21078
21079         * gnulib-tool (func_verify_module): report module name $module in
21080         error message, not $1.
21081         * gnulib-tool (create-testdir): don't complain if destdir couldn't
21082         be created, only if it doesn't exist.
21083         * gnulib-tool (last_checkin_date): don't expand the $Date here.
21084
21085 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21086
21087         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
21088
21089 2002-12-31  Paul Eggert  <eggert@twinsun.com>
21090
21091         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
21092         memcmp if strcoll doesn't work.
21093
21094 2002-12-31  Bruno Haible  <bruno@clisp.org>
21095
21096         * lib/utime.c (utime_null): No need to call ftruncate if the file was
21097         nonempty.
21098
21099 2002-12-31  Bruno Haible  <bruno@clisp.org>
21100
21101         * lib/memcoll.c (STRCOLL): New macro.
21102         (memcoll): Use it.
21103
21104 2002-12-31  Bruno Haible  <bruno@clisp.org>
21105
21106         * lib/localcharset.h: New file.
21107         * lib/localcharset.c: Include it.
21108         * lib/unicodeio.c: Likewise.
21109
21110 2002-12-31  Bruno Haible  <bruno@clisp.org>
21111
21112         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
21113         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
21114
21115 2002-12-31  Bruno Haible  <bruno@clisp.org>
21116
21117         * lib/getline.h: Include <stddef.h>, for size_t.
21118
21119         * lib/unicodeio.h: Include <stddef.h>, for size_t.
21120         * lib/unicodeio.c: Don't include <stddef.h>.
21121
21122 2002-12-31  Bruno Haible  <bruno@clisp.org>
21123
21124         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
21125         HAVE_TM_ZONE.
21126
21127 2002-12-24  Karl Berry  <karl@gnu.org>
21128
21129         * config/config.guess: update from prep.
21130
21131 2002-12-24  Bruno Haible  <bruno@clisp.org>
21132
21133         General infrasructure.
21134         * m4/README: Rewritten.
21135         * m4/onceonly.m4: New file.
21136         * m4/onceonly_2_57.m4: New file.
21137
21138         Module atexit.
21139         * m4/atexit.m4: New file.
21140
21141         Module strtod.
21142         * m4/strtod.m4: New file.
21143
21144         Module strtol.
21145         * m4/strtol.m4: New file.
21146
21147         Module strtoul.
21148         * m4/strtoul.m4: New file.
21149
21150         Module memchr.
21151         * m4/memchr.m4: New file.
21152
21153         Module memcmp.
21154         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
21155         (jm_FUNC_MEMCMP): Invoke it.
21156
21157         Module memcpy.
21158         * m4/memcpy.m4: New file.
21159
21160         Module memmove.
21161         * m4/memmove.m4: New file.
21162
21163         Module memset.
21164         * m4/memset.m4: New file.
21165
21166         Module strcspn.
21167         * m4/strcspn.m4: New file.
21168
21169         Module strpbrk.
21170         * m4/strpbrk.m4: New file.
21171
21172         Module strstr.
21173         * m4/strstr.m4: New file.
21174
21175         Module strerror.
21176         * m4/strerror.m4: New file.
21177
21178         Module mktime.
21179         * m4/mktime.m4: Renamed from jm-mktime.m4.
21180         (gl_PREREQ_MKTIME): New macro.
21181         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
21182
21183         Module malloc.
21184         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
21185         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
21186         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
21187
21188         Module realloc.
21189         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
21190         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
21191         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
21192
21193         Module strftime.
21194         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
21195         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
21196         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
21197         gl_TM_GMTOFF.
21198         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
21199
21200         Module xalloc.
21201         * m4/xalloc.m4: New file.
21202
21203         Module alloca.
21204         * m4/alloca.m4: New file.
21205
21206         Module putenv.
21207         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
21208         (jm_FUNC_PUTENV): Invoke it.
21209
21210         Module setenv.
21211         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
21212         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
21213         when invoked twice.
21214         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
21215         gt_FUNC_SETENV.
21216
21217         Module memrchr.
21218         * m4/memrchr.m4: New file.
21219
21220         Module stpcpy.
21221         * m4/stpcpy.m4: New file.
21222
21223         Module strcase.
21224         * m4/strcase.m4: New file.
21225
21226         Module strdup.
21227         * m4/strdup.m4: New file.
21228
21229         Module strnlen.
21230         * m4/strnlen.m4: New file.
21231
21232         Module strndup.
21233         * m4/strndup.m4: New file.
21234
21235         Module xstrtod.
21236         * m4/xstrtod.m4: New file.
21237
21238         Module xstrtol.
21239         * m4/xstrtol.m4: New file.
21240
21241         Module getdate.
21242         * m4/getdate.m4: New file.
21243
21244         Module unlocked-io.
21245         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
21246         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
21247         * m4/jm-glibc-io.m4n: Remove file.
21248
21249         Module long-options.
21250         * m4/long-options.m4: New file.
21251
21252         Module md5.
21253         * m4/md5.m4: New file.
21254
21255         Module sha.
21256         * m4/sha.m4: New file.
21257
21258         Module getstr.
21259         * m4/getstr.m4: New file.
21260
21261         Module getline.
21262         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
21263         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
21264         <sys/types.h>, for size_t. Use the function name gnu_getline, not
21265         simply getline. Infoke gl_PREREQ_GETLINE.
21266
21267         Module obstack.
21268         * m4/obstack.m4: New file.
21269
21270         Module hash.
21271         * m4/hash.m4: New file.
21272
21273         Module readtokens.
21274         * m4/readtokens.m4: New file.
21275
21276         Module strverscmp.
21277         * m4/strverscmp.m4: New file.
21278
21279         Module stdbool.
21280         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
21281         OSF/1.
21282
21283         Module strtoll.
21284         * m4/strtoll.m4: New file.
21285
21286         Module strtoull.
21287         * m4/strtoull.m4: New file.
21288
21289         Module strtoimax.
21290         * m4/strtoimax.m4: New file.
21291
21292         Module strtoumax.
21293         * m4/strtoumax.m4: New file.
21294
21295         Module xstrtoimax.
21296         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
21297         jm_AC_PREREQ_XSTRTOIMAX.
21298         Moved the strtol prerequisites to strtol.m4.
21299         Moved the strtoll prerequisites to strtoll.m4.
21300         Moved the strtoimax prerequisites to strtoimax.m4.
21301
21302         Module xstrtoumax.
21303         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
21304         jm_AC_PREREQ_XSTRTOUMAX.
21305         Moved the strtoul prerequisites to strtoul.m4.
21306         Moved the strtoull prerequisites to strtoull.m4.
21307         Moved the strtoumax prerequisites to strtoumax.m4.
21308
21309         Module chown.
21310         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
21311         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
21312
21313         Module dup2.
21314         * m4/dup2.m4: New file.
21315
21316         Module ftruncate.
21317         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
21318         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
21319
21320         Module getgroups.
21321         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
21322         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
21323
21324         Module gettimeofday.
21325         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
21326         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
21327         gl_PREREQ_GETTIMEOFDAY.
21328
21329         Module mkdir.
21330         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
21331         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
21332
21333         Module mkstemp.
21334         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
21335         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
21336         jm_AC_TYPE_UINTMAX_T.
21337         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
21338
21339         Module stat.
21340         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
21341         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
21342
21343         Module lstat.
21344         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
21345         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
21346
21347         Module timespec.
21348         * m4/timespec.m4 (gl_TIMESPEC): New macro.
21349         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
21350         * m4/st_mtim.m4: Indentation.
21351
21352         Module nanosleep.
21353         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
21354         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
21355         gl_PREREQ_NANOSLEEP.
21356
21357         Module regex.
21358         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
21359         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
21360         (gl_REGEX): New macro.
21361
21362         Module rename.
21363         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
21364         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
21365
21366         Module rmdir.
21367         * m4/rmdir.m4: New file.
21368
21369         Module utime.
21370         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
21371         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
21372         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
21373
21374         Module dirname.
21375         * m4/dirname.m4: New file.
21376
21377         Module getopt.
21378         * m4/getopt.m4: New file.
21379
21380         Module unistd-safer.
21381         * m4/unistd-safer.m4: New file.
21382
21383         Module fnmatch.
21384         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
21385         declaration.
21386         (gl_PREREQ_FNMATCH_EXTRA): New macro.
21387         (gl_FUNC_FNMATCH_POSIX): New macro.
21388         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
21389         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
21390         simply fnmatch.
21391
21392         Module exclude.
21393         * m4/exclude.m4: New file.
21394
21395         Module human.
21396         * m4/human.m4: New file.
21397
21398         Module acl.
21399         * m4/acl.m4: Nop.
21400
21401         Module backupfile.
21402         * m4/backupfile.m4: New file.
21403         * m4/d-ino.m4: Indentation.
21404
21405         Module fsusage.
21406         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
21407         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
21408         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
21409
21410         Module dirfd.
21411         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
21412         requirements.
21413
21414         Module euidaccess.
21415         * m4/euidaccess.m4: New file.
21416
21417         Module file-type.
21418         * m4/file-type.m4: New file.
21419
21420         Module fileblocks.
21421         * m4/fileblocks.m4: New file.
21422
21423         Module filemode.
21424         * m4/filemode.m4: New file.
21425
21426         Module isdir.
21427         * m4/isdir.m4: New file.
21428
21429         Module lchown.
21430         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
21431         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
21432
21433         Module makepath.
21434         * m4/makepath.m4: New file.
21435
21436         Module modechange.
21437         * m4/modechange.m4: New file.
21438
21439         Module mountlist.
21440         * m4/mountlist.m4: New file.
21441         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
21442         Indentation.
21443
21444         Module path-concat.
21445         * m4/path-concat.m4: New file.
21446
21447         Module pathmax.
21448         * m4/pathmax.m4: New file.
21449
21450         Module same.
21451         * m4/same.m4: New file.
21452
21453         Module save-cwd.
21454         * m4/save-cwd.m4: New file.
21455
21456         Module savedir.
21457         * m4/savedir.m4: New file.
21458
21459         Module xgetcwd.
21460         * m4/xgetcwd.m4: New file.
21461         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
21462
21463         Module xreadlink.
21464         * m4/xreadlink.m4: New file.
21465
21466         Module safe-read.
21467         * m4/safe-read.m4: New file.
21468
21469         Module safe-write.
21470         * m4/safe-write.m4: New file.
21471
21472         Module closeout.
21473         * m4/closeout.m4: New file.
21474
21475         Module stdio-safer.
21476         * m4/stdio-safer.m4: New file.
21477
21478         Module getpass.
21479         * m4/getpass.m4: New file.
21480
21481         Module getugroups.
21482         * m4/getugroups.m4: New file.
21483
21484         Module group-member.
21485         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
21486         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
21487
21488         Module idcache.
21489         * m4/idcache.m4: New file.
21490
21491         Module userspec.
21492         * m4/userspec.m4: New file.
21493
21494         Module gettime.
21495         * m4/clock_time.m4: New file.
21496         * m4/gettime.m4: New file.
21497
21498         Module settime.
21499         * m4/settime.m4: New file.
21500
21501         Module posixtm.
21502         * m4/posixtm.m4: New file.
21503
21504         Module gethostname.
21505         * m4/gethostname.m4: New file.
21506
21507         Module canon-host.
21508         * m4/canon-host.m4: New file.
21509
21510         Module gettext.
21511         * m4/codeset.m4: New file, from gettext-0.11.5.
21512         * m4/gettext.m4: New file, from gettext-0.11.5.
21513         * m4/glibc21.m4: New file, from gettext-0.11.5.
21514         * m4/iconv.m4: New file, from gettext-0.11.5.
21515         * m4/intdiv0.m4: New file, from gettext-0.11.5.
21516         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
21517         * m4/inttypes.m4: New file, from gettext-0.11.5.
21518         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
21519         * m4/isc-posix.m4: New file, from gettext-0.11.5.
21520         * m4/lcmessage.m4: New file, from gettext-0.11.5.
21521         * m4/lib-ld.m4: New file, from gettext-0.11.5.
21522         * m4/lib-link.m4: New file, from gettext-0.11.5.
21523         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
21524         * m4/progtest.m4: New file, from gettext-0.11.5.
21525         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
21526         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
21527         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
21528
21529         Module localcharset.
21530         * m4/localcharset.m4: New file.
21531
21532         Module hard-locale.
21533         * m4/hard-locale.m4: New file.
21534
21535         Module mbswidth.
21536         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
21537         onceonly macros.
21538         * m4/mbrtowc.m4: Add comment.
21539
21540         Module memcasecmp.
21541         * m4/memcasecmp.m4: New file.
21542
21543         Module memcoll.
21544         * m4/memcoll.m4: New file.
21545
21546         Module unicodeio.
21547         * m4/unicodeio.m4: New file.
21548
21549         Module rpmatch.
21550         * m4/rpmatch.m4: New file.
21551
21552         Module yesno.
21553         * m4/yesno.m4: New file.
21554
21555         Module exitfail.
21556         * m4/exitfail.m4: New file.
21557
21558         Module c-stack.
21559         * m4/c-stack.m4 (gl_C_STACK): New macro.
21560         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
21561
21562         Module error.
21563         * m4/error.m4 (gl_ERROR): New macro.
21564         (jm_PREREQ_ERROR): Use onceonly macros.
21565
21566         Module fatal.
21567         * m4/fatal.m4: New file.
21568
21569         Module getloadavg.
21570         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
21571         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
21572
21573         Module getpagesize.
21574         * m4/getpagesize.m4: New file.
21575
21576         Module getusershell.
21577         * m4/getusershell.m4: New file.
21578
21579         Module physmem.
21580         * m4/physmem.m4: New file.
21581
21582         Module posixver.
21583         * m4/posixver.m4: New file.
21584
21585         Module quotearg.
21586         * m4/quotearg.m4: New file.
21587
21588         Module quote.
21589         * m4/quote.m4: New file.
21590
21591         Module readutmp.
21592         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
21593
21594         Module sig2str.
21595         * m4/sig2str.m4: New file.
21596
21597         Other.
21598         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
21599         ulonglong.m4.
21600         * m4/intmax_t.m4: New file.
21601         * m4/d-type.m4: Indentation.
21602         * m4/jm-macros.m4: Update.
21603         * m4/prereq.m4 (jm_PREREQ): Update.
21604         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
21605         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
21606         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
21607         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
21608         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
21609         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
21610         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
21611         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
21612         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
21613         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
21614         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
21615         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
21616         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
21617         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
21618         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
21619         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
21620         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
21621         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
21622         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
21623
21624 2002-12-24  Bruno Haible  <bruno@clisp.org>
21625
21626         * MODULES.txt: Update according to m4/ changes.
21627
21628         Module gettext.
21629         * config.rpath: New file, from gettext-0.11.5.
21630
21631         * modules/*: New module descriptions.
21632         * gnulib-tool: New file.
21633         * MODULES.html.sh: New file.
21634
21635 2002-12-21  Karl Berry  <karl@gnu.org>
21636
21637         * doc/fdl.texi: update to version 1.2.
21638
21639 2002-12-19  Karl Berry  <karl@gnu.org>
21640
21641         * config/config.guess: update from prep.
21642
21643 2002-12-18  Bruno Haible  <bruno@clisp.org>
21644
21645         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
21646         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
21647
21648 2002-12-17  Bruno Haible  <bruno@clisp.org>
21649
21650         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
21651         stdlib.h, string.h.
21652
21653 2002-12-17  Bruno Haible  <bruno@clisp.org>
21654
21655         * lib/canon-host.c (strdup): Remove unused declaration.
21656
21657         * lib/fsusage.c: Include full_read.h.
21658         (get_fs_usage): Use full_read instead of safe_read.
21659
21660         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
21661
21662 2002-12-12  Karl Berry  <karl@gnu.org>
21663
21664         * config/config.guess: update from prep.
21665
21666 2002-12-11  Bruno Haible  <bruno@clisp.org>
21667
21668         * m4/setenv.m4: New file, from gettext-0.11.5.
21669
21670 2002-12-11  Bruno Haible  <bruno@clisp.org>
21671
21672         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
21673         not unsetenv().
21674         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
21675         modifications:
21676
21677         2002-12-11  Bruno Haible  <bruno@clisp.org>
21678
21679                 * setenv.c (alloca): Fall back to malloc.
21680                 (freea): New macro.
21681                 (setenv): Use freea() to free memory allocated with alloca().
21682
21683         2002-11-13  Bruno Haible  <bruno@clisp.org>
21684
21685                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
21686                 function declarations.
21687                 * unsetenv.c (unsetenv): Likewise.
21688
21689         2002-03-04  Bruno Haible  <bruno@clisp.org>
21690
21691                 Portability to AIX 4.3.3.
21692                 * unsetenv.c: New file, extracted from setenv.c.
21693                 * setenv.c: Move the unsetenv() function to unsetenv.c.
21694
21695         2001-12-20  Bruno Haible  <bruno@clisp.org>
21696
21697                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
21698                 use malloc instead. For SunOS 4.
21699
21700         2001-12-11  Bruno Haible  <bruno@clisp.org>
21701
21702                 * setenv.c: Declare alloca.
21703                 (compar_fn_t): New typedef.
21704                 (KNOWN_VALUE, STORE_VALUE): Use it.
21705
21706         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
21707         setenv.h.
21708
21709 2002-12-10  Paul Eggert  <eggert@twinsun.com>
21710
21711         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
21712         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
21713         Choose values that are less likely to collide with system fnmatch
21714         options.
21715         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
21716         defined (e.g., a pure POSIX system).
21717         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
21718         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
21719
21720 2002-12-06  Paul Eggert  <eggert@twinsun.com>
21721
21722         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
21723         a pain in practice to deal with generated m4 files.  This change
21724         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
21725
21726         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
21727         and jm-glibc-io.m4, as they are no longer a special case.
21728         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
21729         kludge and the auto-generation stuff.  Check only whether the
21730         functions are declared, not whether they exist, since older hosts
21731         that don't declare the functions can't use the optimization anyway.
21732
21733 2002-12-06  Jim Meyering  <jim@meyering.net>
21734
21735         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
21736
21737         Merge in changes from libc's misc/error.c, in preparation
21738         for the merge of gnulib's changes back into libc.
21739
21740         * lib/error.c (_): Define only if not already defined.
21741         Move definition to follow all #include directives.
21742         Include unlocked-io.h only if !_LIBC.
21743         [_LIBC]: Include <libio/libioP.h>.
21744         [USE_IN_LIBIO]: Include <libio/iolibio.h>
21745         (fflush): Tweak definition to use INTUSE.
21746         (putc): Define.
21747
21748 2002-12-05  Paul Eggert  <eggert@twinsun.com>
21749
21750         * lib/alloca.c [defined emacs]: Include "lisp.h".
21751         (xalloc_die) [defined emacs]: New macro.
21752         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
21753         [! defined emacs]: Include <xalloc.h>.
21754         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
21755         (pointer): Typedef to POINTER_TYPE *.
21756         (malloc): Remove decl; we now always use xmalloc.
21757         (alloca): Use old-style definition, since Emacs needs this.
21758         Check for arithmetic overflow when computing combined size.
21759
21760 2002-12-04  Paul Eggert  <eggert@twinsun.com>
21761
21762         Do not generate unlocked-io.h automatically, since it's easier to
21763         maintain it by hand.
21764
21765         * lib/unlocked-io.h: New file, from GNU diffutils,
21766         but with proper copyright notice and attribution.
21767         * lib/gen-uio: Remove.
21768         * lib/Makefile.am: Add copyright notice.
21769         (libfetish_a_SOURCES): Add unlocked-io.h.
21770         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
21771         (DISTCLEANFILES, io_functions): Remove macros.
21772         (EXTRA_DIST): Remove gen_uio.
21773         (unlocked-io.h): Remove rule.
21774
21775 2002-12-04  Jim Meyering  <jim@meyering.net>
21776
21777         Reflect the fact that stat.c and lstat.c are no longer generated.
21778         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
21779         (DISTCLEANFILES): Likewise.
21780         (EXTRA_DIST): Likewise.
21781         (all_local): Don't depend on stat.c or lstat.c.
21782         (stat.c, lstat.c): Remove rules.
21783         (EXTRA_DIST): Remove xstat.in.
21784
21785         * lib/xstat.in: Remove file.  Contents moved into stat.c.
21786         * lib/stat.c: New file.  Contents mostly from xstat.in.
21787         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
21788         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
21789
21790         * lib/safe-read.c: Rework so that it may serve to define safe_write,
21791         too.
21792         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
21793
21794 2002-12-03  Jim Meyering  <jim@meyering.net>
21795
21796         * lib/safe-read.c, safe-write.c: Change variable names and comments,
21797         but not semantics, to minimize the differences between these two files.
21798         (safe_read): Change comment to mention SAFE_READ_ERROR.
21799
21800         * lib/safe-read.c (IS_EINTR): Define.
21801         (safe_read): Use IS_EINTR in place of in-function cpp directives.
21802
21803 2002-12-02  Jim Meyering  <jim@meyering.net>
21804
21805         * lib/safe-read.c (EINTR): Define.
21806         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
21807         (INT_MAX): Provide fallback.
21808         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
21809
21810         * lib/safe-read.h (SAFE_READ_ERROR): Define.
21811
21812 2002-12-02  Bruno Haible  <bruno@clisp.org>
21813
21814         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
21815         Define, taken from safe-read.c.
21816         (INT_MAX): Provide fallback.
21817         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
21818         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
21819
21820         * lib/safe-read.c (EINTR): Remove definition.
21821         (safe_read): Don't use EINTR if it is absent.
21822
21823 2002-12-01  Jim Meyering  <jim@meyering.net>
21824
21825         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
21826         zero.
21827         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
21828
21829 2002-11-27  Paul Eggert  <eggert@twinsun.com>
21830
21831         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
21832         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
21833         with `if (! (value < limit)) abort ();', for readability.
21834
21835 2002-11-26  Karl Berry  <karl@gnu.org>
21836
21837         * lib/strdup.c: copy from libc again, with jim's ok.
21838         * lib/.cppi-disable: re-add strdup.c
21839
21840 2002-11-25  Karl Berry  <karl@gnu.org>
21841
21842         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
21843         instead of "strtol.c".
21844
21845 2002-11-25  Karl Berry  <karl@gnu.org>
21846
21847         * config/install-sh: update from automake for variable quoting, $0 in
21848         error msgs, etc.
21849
21850         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
21851         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
21852         entry.
21853
21854 2002-11-25  Jim Meyering  <jim@meyering.net>
21855
21856         * lib/mktime.c: Sync from libc, now that it has the latest fix.
21857
21858 2002-11-24  Karl Berry  <karl@gnu.org>
21859
21860         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
21861         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
21862
21863 2002-11-24  Jim Meyering  <jim@meyering.net>
21864
21865         Update from coreutils:
21866
21867         * lib/mktime.c: Merge in changes from libc.
21868
21869         Avoid a link-time failure on some Linux systems.
21870         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
21871         (otherwise).
21872         (__mon_yday): Declare with the STATIC attribute.
21873         (__mktime_internal): Likewise.
21874         Based on a report from Greg Schafer.
21875
21876 2002-11-23  Jim Meyering  <jim@meyering.net>
21877
21878         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
21879         Use `unsigned', not `int', as type of index.
21880
21881         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
21882
21883         * lib/fsusage.c: Remove unneeded parentheses around operands of
21884         `defined'.
21885
21886 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21887
21888         * lib/quotearg.h: Allow multiple inclusion by surrounding with
21889         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
21890         so that we can be included first.
21891         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
21892         * lib/quotearg.c: Include quotearg.h immediately after config.h.
21893         No need to include stddef.h or sys/types.h any more.
21894         Surround local include files with "", not "<>".
21895         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
21896         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
21897         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
21898         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
21899         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
21900         (ISPRINT): Remove; no longer needed now that we assume C89.
21901
21902         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
21903         Preserve errno.
21904
21905         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
21906         quotearg_char): Use SIZE_MAX rather than
21907         (size_t) -1 when we are talking about "infinity".
21908
21909         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
21910
21911 2002-11-22  Paul Eggert  <eggert@twinsun.com>
21912
21913         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
21914         hint that one should use `if (! x) abort ();' rather than `assert
21915         (x);', and anyway it's one less thing to worry about configuring.
21916         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
21917         hash_rehash, hash_insert): Use abort rather than assert.
21918
21919 2002-11-22  Bruno Haible  <bruno@clisp.org>
21920
21921         * lib/safe-read.h: Assume C89. Add comments.
21922         (safe_read): Change return type to size_t.
21923         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
21924         byte counts > SSIZE_MAX correctly.
21925         * lib/safe-write.h: New file.
21926         * lib/safe-write.c: New file.
21927         * lib/full-read.h: New file.
21928         * lib/full-read.c: New file.
21929         * lib/full-write.h: Assume C89. Add comments.
21930         * lib/full-write.c: Include safe-write.h.
21931         (full_write): Rewritten to use safe_write.
21932         Suggested by Jim Meyering and Paul Eggert.
21933
21934 2002-11-21  Jim Meyering  <jim@meyering.net>
21935
21936         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
21937
21938         Merge in changes from the coreutils.
21939
21940         2002-09-25  Paul Eggert  <eggert@twinsun.com>
21941         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
21942         <stdint.h>.
21943         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
21944         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
21945         int.  Work more efficiently if X is the same width as uintmax_t.
21946         Do not compare X to -1, to avoid bogus compiler warning.
21947         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
21948         Don't assume that f_frsize and f_bsize are the same type.
21949
21950         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
21951         warning on FreeBSD.
21952
21953         * lib/makepath.c (make_path): Restore umask *before* creating the final
21954         component.
21955         (make_path): Minor reformatting.
21956
21957         * lib/xmalloc.c: Adjust to work with new autoconf macros,
21958         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
21959         HAVE_MALLOC/HAVE_REALLOC.
21960
21961         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
21962         dummy ones.  At least on GNU/Linux systems, `auto' means something
21963         else.
21964         From Michael Stone.
21965
21966 2002-11-21  Bruno Haible  <bruno@clisp.org>
21967
21968         Remove case insensitive option matching.
21969         * lib/argmatch.h (argcasematch): Remove declaration.
21970         (ARGCASEMATCH): Remove macro.
21971         (__xargmatch_internal): Remove case_sensitive argument.
21972         (XARGMATCH): Update.
21973         (XARGCASEMATCH): Remove macro.
21974         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
21975         case_sensitive argument.
21976         (argcasematch): Remove function.
21977         (__xargmatch_internal): Remove case_sensitive argument.
21978         (main): Use XARGMATCH instead of XARGCASEMATCH.
21979
21980         * lib/xmalloc.c: Change compile-time error message. Add comment about
21981         required autoconf version.
21982
21983 2002-11-20  Paul Eggert  <eggert@twinsun.com>
21984
21985         Merge argmatch cleanups from Bison.  Assume C89.
21986
21987         * lib/argmatch.c: Include config.h here, not in argmatch.h.
21988         Include stdlib.h, for EXIT_FAILURE.
21989         Always include <string.h>, since we assume C89.
21990         (EXIT_FAILURE): Remove pre-C89 bug workaround.
21991         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
21992         Include <stddef.h> instead, since it's all we need for size_t.
21993         (PARAMS): Remove.  All uses removed.
21994         (ARRAY_CARDINALITY): Do not bother to #undef.
21995         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
21996         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21997         Remove unnecessary parentheses.
21998         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
21999         Insert necessary parentheses.
22000         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
22001         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
22002
22003 2002-11-19  Bruno Haible  <bruno@clisp.org>
22004
22005         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
22006         * lib/mbswidth.h: Include <stddef.h>, for size_t.
22007
22008         * lib/mbswidth.h (PARAMS): Remove macro.
22009         (mbswidth, mbsnwidth): Use ANSI C function declarations.
22010         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
22011
22012         * lib/gcd.h (PARAMS): Remove macro.
22013         (gcd): Use ANSI C function declarations.
22014         * lib/gcd.c (gcd): Likewise.
22015
22016 2002-11-15  Bruno Haible  <bruno@clisp.org>
22017
22018         * lib/strcspn.c: Include <stddef.h>.
22019         (strcspn): Use ANSI C function declaration. Change return type to
22020         size_t. Use NULL.
22021         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
22022         (strpbrk): Use NULL.
22023         * lib/strpbrk.h (PARAMS): Remove macro.
22024         (strpbrk): Use ANSI C function declaration.
22025         * lib/strstr.c: Don't include <sys/types.h>.
22026         * lib/strstr.h (PARAMS): Remove macro.
22027         (strstr): Use ANSI C function declarations.
22028
22029 2002-11-14  Karl Berry  <karl@gnu.org>
22030
22031         * config/mkinstalldirs: `do' on separate line, instead of
22032         `for var; do'.
22033
22034 2002-11-06  Bruno Haible  <bruno@clisp.org>
22035
22036         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
22037         * lib/gcd.c (gcd): Likewise.
22038
22039 2002-11-05  Bruno Haible  <bruno@clisp.org>
22040
22041         * lib/gcd.h: New file, from gettext-0.11.5.
22042         * lib/gcd.c: New file, from gettext-0.11.5.
22043
22044 2002-11-05  Bruno Haible  <bruno@clisp.org>
22045
22046         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22047         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22048         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22049         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
22050
22051         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
22052         <libintl.h>.
22053         * lib/makepath.c: Include gettext.h instead of <locale.h> and
22054         <libintl.h>.
22055
22056         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
22057         * lib/human.c: Include gettext.h instead of <libintl.h>.
22058         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
22059         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
22060         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
22061         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
22062         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
22063         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
22064         (textdomain): Remove definition.
22065         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
22066
22067         * lib/long-options.c: Remove include of <libintl.h> and definition of
22068         _.
22069         * lib/same.c: Remove include of <libintl.h> and definition of _.
22070
22071 2002-11-04  Owen Taylor  <otaylor@redhat.com>
22072
22073         * lib/config.charset: A few additions for Solaris.
22074
22075 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22076
22077         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
22078         * lib/localcharset.c (locale_charset): Declare as extern "C".
22079
22080 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
22081
22082         * lib/config.charset: msdos in uk_UA uses CP1125.
22083
22084 2002-11-04  Bruno Haible  <bruno@clisp.org>
22085
22086         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
22087         * lib/strcase.h: New file, from GNU gettext-0.11.5.
22088         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
22089         * lib/strstr.h: New file, from GNU gettext-0.11.5.
22090         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
22091
22092 2002-11-04  Bruno Haible  <bruno@clisp.org>
22093
22094         * lib/localcharset.c (locale_charset): Don't return an empty string.
22095
22096 2002-11-04  Bruno Haible  <bruno@clisp.org>
22097
22098         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
22099         aliases.
22100
22101 2002-11-04  Bruno Haible  <bruno@clisp.org>
22102
22103         * lib/config.charset: Update for newest glibc. Add canonical names
22104         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
22105
22106 2002-11-04  Bruno Haible  <bruno@clisp.org>
22107
22108         * lib/config.charset: Add support for NetBSD.
22109
22110 2002-11-04  Bruno Haible  <bruno@clisp.org>
22111
22112         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
22113
22114 2002-11-01  Bruno Haible  <bruno@clisp.org>
22115
22116         * configure.in: Add AC_CONFIG_AUX_DIR call.
22117         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
22118         test/Makefile.
22119         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
22120
22121 2002-09-28  Karl Berry  <karl@gnu.org>
22122
22123         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
22124         installed automake until the next release, since changes have been
22125         made.
22126
22127 2002-09-25  Karl Berry  <karl@gnu.org>
22128
22129         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
22130         * lib/getopt*: copy from libc/posix.
22131         * lib/gettext.h: copy from gettext.
22132         * lib/.cppi-disable: add strdup.c, gettext.h.
22133
22134 2002-09-25  Karl Berry  <karl@gnu.org>
22135
22136         * config/srclist.txt: enable gettext.h check.
22137         * config/config.{guess,sub}: update from prep.
22138         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
22139                 from automake 1.6.3.
22140         See srclist*.
22141
22142 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
22143
22144         * regex.c (PATFETCH): Remove the translating fetch.
22145         (PATFETCH_RAW): Rename to PATFETCH.
22146         (set_image_of_range): New fun.
22147         (SET_RANGE_TABLE_WORK_AREA): Use it.
22148         (regex_compile): Don't translate the pattern chars so eagerly.
22149         Only do it when inserting an `exactn' bytecode or when handling
22150         a char-range.
22151         (mutually_exclusive_p): Avoid empty statement.
22152
22153 2002-07-06  Jim Meyering  <meyering@lucent.com>
22154
22155         * m4/README: Don't mention Makefile.am.in.
22156         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
22157
22158 2002-07-01  Jim Meyering  <meyering@lucent.com>
22159
22160         * lib/c-stack.c: Include sys/time.h.
22161         From Volker Borchert.
22162
22163 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22164
22165         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
22166
22167 2002-06-26  Paul Eggert  <eggert@twinsun.com>
22168
22169         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
22170         New macro.  Use it uniformly instead of
22171         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
22172         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
22173         reported by Vin Shelton.
22174
22175 2002-06-22  Paul Eggert  <eggert@twinsun.com>
22176
22177         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
22178         Do not assume SA_SIGINFO behavior.
22179         Bug reported by Jim Meyering on NetBSD 1.5.2.
22180
22181 2002-06-22  Jim Meyering  <meyering@lucent.com>
22182
22183         * m4/c-stack.m4: New file, from diffutils-2.8.2.
22184         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
22185
22186         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
22187         now that configure.ac uses AC_GNU_SOURCE.
22188         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
22189         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
22190
22191         Update to latest tools.  Suggestions from Paul Eggert.
22192         * m4/stdbool.m4: New file, from diffutils-2.8.2.
22193         * m4/gnu-source.m4: Update from diffutils-2.8.2.
22194         * m4/fnmatch.m4: Likewise.
22195         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
22196         to AC_HEADER_STDBOOL
22197
22198 2002-06-22  Jim Meyering  <meyering@lucent.com>
22199
22200         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
22201         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
22202
22203 2002-06-22  Jim Meyering  <meyering@lucent.com>
22204
22205         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
22206
22207         * lib/exitfail.c, exitfail.h: Likewise.
22208         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
22209
22210         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
22211         of fnmatch.h.
22212         (EXTRA_DIST): Add fnmatch_loop.c.
22213         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
22214
22215         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
22216         * lib/fnmatch.c: Update from diffutils-2.8.2.
22217         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
22218         * lib/fnmatch.h: Remove file.
22219
22220 2002-06-21  Jim Meyering  <meyering@lucent.com>
22221
22222         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
22223         * m4/mbrtowc.m4: Likewise.
22224
22225         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
22226         * m4/mbswidth.m4: Reflect name change:
22227         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
22228         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
22229
22230         * m4/lib-link.m4: Update from gettext-0.11.2.
22231         * m4/gettext.m4: Likewise.
22232
22233         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
22234         From Alfred M. Szmidt.
22235
22236 2002-06-18  Paul Eggert  <eggert@twinsun.com>
22237
22238         * lib/file-type.h: Report an error if neither S_ISREG nor
22239         S_IFREG is defined, instead of using a test specific to glibc
22240         2.2.  This should be safe, since POSIX requires S_ISREG and
22241         Unix Version 7 had S_IFREG.  We don't need to check for
22242         <sys/types.h> since we don't use any symbols that it defines.
22243
22244 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
22245
22246         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
22247         $@-t, so that each temporary file name is unique and valid in the first
22248         8 characters, for operation under DOS.
22249
22250 2002-06-15  Paul Eggert  <eggert@twinsun.com>
22251
22252         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
22253
22254 2002-06-15  Jim Meyering  <meyering@lucent.com>
22255
22256         Work even with DJGPP 2.03, which lacks support for symlinks.
22257         From Richard Dawe.
22258         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
22259         is defined.
22260         * lib/lchown.c (S_ISLNK): Likewise.
22261
22262 2002-06-15  Jim Meyering  <meyering@lucent.com>
22263
22264         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
22265         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
22266         have been included before this file.
22267
22268 2002-06-14  Jim Meyering  <meyering@lucent.com>
22269
22270         * lib/file-type.h: Use the version from diffutils-2.8.2.
22271         * lib/file-type.c: Likewise.
22272
22273 2002-06-07  Jim Meyering  <meyering@lucent.com>
22274
22275         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
22276         They're needed at least for NetBSD 1.5.2.
22277         ($statxfs_includes): Include those same headers.
22278         ($statxfs_includes): Include sys/vfs.h if available.
22279         ($statxfs_includes): Likewise for sys/statvfs.h.
22280         Check for the following members in both structs statfs and statvfs:
22281         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
22282
22283 2002-06-01  Jim Meyering  <meyering@lucent.com>
22284
22285         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
22286         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
22287
22288 2002-05-28  Jim Meyering  <meyering@lucent.com>
22289
22290         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
22291         Reported by Volker Borchert.
22292
22293 2002-05-27  Jim Meyering  <meyering@lucent.com>
22294
22295         Fix a problem seen only on nonconforming systems whereby ls.c's
22296         use of localtime, and then of gettimeofday would cause trouble:
22297         the localtime call used to initialize rpl_gettimeofday's save
22298         mechanism would clobber ls's current local time information so
22299         that in any long listing the first file would always be listed
22300         with date 1970-01-01.  Analysis by Volker Borchert.
22301
22302         * lib/gettimeofday.c (localtime): Undefine.
22303         (rpl_localtime): New function.
22304
22305 2002-05-27  Jim Meyering  <meyering@lucent.com>
22306
22307         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
22308         localtime.
22309
22310         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
22311         use the replacement function; it wouldn't resolve at link time.
22312         Reported by Volker Borchert.
22313
22314 2002-05-22  Jim Meyering  <meyering@lucent.com>
22315
22316         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
22317         file-type.h.
22318         * lib/file-type.h: New file.
22319         * lib/file-type.c (file_type): New file/function.  Extracted from
22320         diffutils.
22321
22322 2002-04-30  Jim Meyering  <meyering@lucent.com>
22323
22324         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
22325
22326 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22327
22328         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
22329
22330 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22331
22332         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
22333         Do not check for alloca.h (no longer used) or stdbool.h (was never
22334         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
22335
22336 2002-04-29  Paul Eggert  <eggert@twinsun.com>
22337
22338         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
22339
22340 2002-04-29  Jim Meyering  <meyering@lucent.com>
22341
22342         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
22343         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
22344         Use AC_FUNC_STRNLEN here instead.
22345
22346         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
22347         With autoconf-2.53a, it's part of AC_PROG_CC.
22348
22349 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22350
22351         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
22352         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
22353
22354 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22355
22356         * lib/sig2str.h, lib/sig2str.c: New files.
22357         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
22358
22359 2002-04-28  Paul Eggert  <eggert@twinsun.com>
22360
22361         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
22362         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
22363         of 127, since 64 is the largest conceivable number for ancient
22364         nonstandard hosts.
22365         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
22366
22367 2002-04-28  Jim Meyering  <meyering@lucent.com>
22368
22369         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
22370
22371 2002-04-24  Jim Meyering  <meyering@lucent.com>
22372
22373         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
22374         (jm_PREREQ): Use it.
22375
22376         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
22377         mach/mach.h fcntl.h.
22378         Check for this function: setlocale.
22379
22380 2002-04-24  Jim Meyering  <meyering@lucent.com>
22381
22382         * lib/gettext.h: New file, from Gettext.
22383         * lib/Makefile.am (INCLUDES): Remove -I../intl.
22384         (libfetish_a_SOURCES): Add gettext.h.
22385
22386 2002-04-16  Jim Meyering  <meyering@lucent.com>
22387
22388         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
22389         ut_pid, ut_id, ut_exit.
22390
22391 2002-04-16  Jim Meyering  <meyering@lucent.com>
22392
22393         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
22394         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
22395         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
22396
22397 2002-04-12  Jim Meyering  <meyering@lucent.com>
22398
22399         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
22400         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
22401         existence of the getmntinfo function.  Needed for Darwin 5.3.
22402
22403         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
22404         This is necessary at least on Darwin 5.3.
22405
22406         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
22407         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
22408         strnlen.o in the library, and that makes some versions of ranlib
22409         object.
22410
22411 2002-04-12  Jim Meyering  <meyering@lucent.com>
22412
22413         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
22414
22415 2002-04-09  Jim Meyering  <meyering@lucent.com>
22416
22417         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
22418         to be more precise.  Rather than saying we're checking whether the
22419         function `works', say what we're testing.
22420         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
22421         Reported by Bruno Haible.
22422
22423 2002-03-10  Jim Meyering  <meyering@lucent.com>
22424
22425         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
22426         Suggestion from Santiago Vila.
22427
22428 2002-03-08  Jim Meyering  <meyering@lucent.com>
22429
22430         * lib/rename.c: Mention that this wrapper is needed also on
22431         mips-dec-ultrix4.4 systems.
22432
22433 2002-03-02  Jim Meyering  <meyering@lucent.com>
22434
22435         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
22436         not HAVE_CLOCK_SETTIME.
22437
22438 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22439
22440         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
22441         Check for clock_settime.
22442
22443 2002-02-27  Paul Eggert  <eggert@twinsun.com>
22444
22445         * lib/nanosleep.h: Rename to....
22446         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
22447
22448         * lib/gettime.c: New file.
22449         * lib/settime.c: New file.
22450         * lib/stime.c: Remove.
22451
22452         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
22453         timespec.h.  Remove nanosleep.h.
22454
22455 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22456
22457         * m4/acl.m4: New file.
22458         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
22459         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
22460
22461 2002-02-25  Paul Eggert  <eggert@twinsun.com>
22462
22463         * lib/acl.c, lib/acl.h: New files.
22464         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
22465
22466 2002-02-24  Jim Meyering  <meyering@lucent.com>
22467
22468         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
22469         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
22470         cause trouble.  Reported by Nelson Beebe.
22471
22472 2002-02-23  Paul Eggert  <eggert@twinsun.com>
22473
22474         * lib/path-concat.c (xpath_concat): Reorder code to pacify
22475         compilers that don't know that xalloc_die never returns.
22476
22477 2002-02-20  Jim Meyering  <meyering@lucent.com>
22478
22479         * lib/getdate.c: Regenerate using bison-1.33.
22480
22481 2002-02-17  Jim Meyering  <meyering@lucent.com>
22482
22483         * config/config.guess (main): Don't use `head -1'; it's no longer
22484         portable. Use `sed 1q' instead.
22485
22486 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
22487
22488         * m4/codeset.m4: Upgrade to gettext-0.11.
22489         * m4/gettext.m4: Upgrade to gettext-0.11.
22490         * m4/glibc21.m4: Upgrade to gettext-0.11.
22491         * m4/iconv.m4: Upgrade to gettext-0.11.
22492         * m4/isc-posix.m4: Upgrade to gettext-0.11.
22493         * m4/lcmessage.m4: Upgrade to gettext-0.11.
22494         * m4/lib-ld.m4: New file, from gettext-0.11.
22495         * m4/lib-link.m4: New file, from gettext-0.11.
22496         * m4/lib-prefix.m4: New file, from gettext-0.11.
22497         * m4/progtest.m4: Upgrade to gettext-0.11.
22498
22499 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22500
22501         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
22502         (jm_PREREQ): Use it.
22503
22504 2002-02-15  Paul Eggert  <eggert@twinsun.com>
22505
22506         * lib/posixver.c, lib/posixver.h: New files.
22507         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22508
22509 2002-02-02  Paul Eggert  <eggert@twinsun.com>
22510             Bruno Haible  <bruno@clisp.org>
22511
22512         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
22513         (fwrite_success_callback): New declaration.
22514         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
22515         print_unicode_char. Call failure callback instead of error.
22516         (fwrite_success_callback): New function.
22517         (exit_failure_callback): New function.
22518         (fallback_failure_callback): New function.
22519         (print_unicode_char): Call unicode_to_mb.
22520
22521 2002-01-26  Jim Meyering  <meyering@lucent.com>
22522
22523         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
22524         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
22525
22526 2002-01-26  Jim Meyering  <meyering@lucent.com>
22527
22528         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
22529
22530 2002-01-22  Paul Eggert  <eggert@twinsun.com>
22531
22532         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
22533
22534 2002-01-22  Jim Meyering  <meyering@lucent.com>
22535
22536         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
22537         Otherwise, some versions of automake would omit the rule that makes
22538         Makefile from Makefile.in.
22539
22540 2002-01-21  Paul Eggert  <eggert@twinsun.com>
22541
22542         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
22543         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
22544         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
22545         (memcoll): Set errno to zero if there is no error.
22546
22547         * lib/quotearg.c (quotearg_buffer_restyled):
22548         Fix bug with quoting buffers containing NUL when backslashing escapes.
22549         This bug was exposed by the other changes in this patch.
22550         (quotearg_n_options): New arg ARGSIZE.
22551         All callers changed.
22552         (quoting_options_from_style): New function.
22553         (quotearg_n_style): Use it.
22554         (quotearg_n_style_mem): New function.
22555
22556         * lib/quotearg.h (quotearg_n_style_mem): New function.
22557
22558 2002-01-19  Jim Meyering  <meyering@lucent.com>
22559
22560         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
22561         Remove useless quotes: DF_PROG="df".
22562         * m4/strnlen.m4: New file.
22563
22564 2002-01-16  Paul Eggert  <eggert@twinsun.com>
22565
22566         * lib/backupfile.c (ISDIGIT): Comment fix.
22567         * lib/getdate.y (ISDIGIT): Likewise.
22568         * lib/posixtm.c (ISDIGIT, year): Likewise.
22569         * lib/strverscmp.c (ISDIGIT): Likewise.
22570         * lib/userspec.c (ISDIGIT): Likewise.
22571
22572 2002-01-16  Jim Meyering  <meyering@lucent.com>
22573
22574         * lib/getdate.y: Add three semicolons, each just before a closing
22575         brace. Bison (as of version 1.31) no longer papers over that mistake.
22576
22577 2002-01-05  Jim Meyering  <meyering@lucent.com>
22578
22579         * lib/version-etc.c (version_etc_copyright): Update copyright year.
22580
22581 2001-12-19  Paul Eggert  <eggert@twinsun.com>
22582
22583         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
22584         not silently exit merely because the output buffer happens to
22585         have nothing pending.
22586
22587 2001-12-18  Paul Eggert  <eggert@twinsun.com>
22588
22589         See the big note in ../ChangeLog.
22590         * lib/human.c (suffixes): Prefer K to k for 1024.
22591         (generate_suffix_backwards): New function.
22592         (human_readable_inexact): Use it.
22593         * lib/xstrtol.c (__xstrtol): If there is no number but there
22594         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
22595         Accept 'K' as well as 'k'.
22596
22597 2001-12-15  Jim Meyering  <meyering@lucent.com>
22598
22599         * lib/regex.h (__restrict_arr): Update from libc.
22600
22601         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
22602         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
22603         (STREQ): Define.
22604
22605 2001-12-14  Jim Meyering  <meyering@lucent.com>
22606
22607         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
22608         Suggestion from Bruno Haible.
22609
22610 2001-12-10  Jim Meyering  <meyering@lucent.com>
22611
22612         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
22613         xrealloc, Instead, include "xalloc.h".
22614         (initbuffer): Don't cast xmalloc return value to char*.
22615         (readline): Reword comment.
22616         Don't cast xrealloc return value to char*
22617         Return NULL, not 0.
22618
22619 2001-12-09  Jim Meyering  <meyering@lucent.com>
22620
22621         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
22622         about `signed and unsigned type in conditional expression'.
22623         * lib/posixtm.c (posix_time_parse): Likewise.
22624
22625         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
22626
22627         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
22628         to avoid a pedantic warning.
22629
22630         * lib/getstr.c: Don't include assert.h.
22631         (getstr): Remove warning-evoking assertions.
22632         Return -1 if offset parameter is out of bounds.
22633         Change the type of a local from int to size_t.
22634
22635         * lib/strftime.c (my_strftime_localtime_r): Include this function
22636         definition in the `#if ! HAVE_TM_GMTOFF' block.
22637
22638         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
22639         Include xalloc.h instead.
22640
22641 2001-12-02  Jim Meyering  <meyering@lucent.com>
22642
22643         * lib/tempname.c: Don't declare getenv, thus reverting the change of
22644         2001-11-18.  It's no longer necessary, now that stdlib.h is always
22645         included.
22646
22647         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
22648         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
22649
22650 2001-11-30  Akim Demaille  <akim@epita.fr>
22651
22652         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
22653         before being defined.
22654
22655 2001-11-27  Paul Eggert  <eggert@twinsun.com>
22656
22657         * lib/quotearg.h (quotearg_n, quotearg_n_style):
22658         First arg is int, not unsigned.
22659         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
22660         (SIZE_MAX, UINT_MAX): New macros.
22661         (quotearg_n_options): Abort if N is negative.
22662         Avoid overflow check on hosts where size_t is 64 bits and int
22663         is 32 bits, as overflow is impossible there.
22664         Fix off-by-one typo that caused unnecessary reallocation.
22665
22666 2001-11-27  Jim Meyering  <meyering@lucent.com>
22667
22668         * lib/tempname.c: Merge with version from libc.
22669         * lib/regex.c: Likewise.
22670
22671         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
22672         systems for which STDC_HEADERS is 0, it was not included, resulting in
22673         a warning about an integer-to-pointer conversion problem with getenv.
22674         Reported by Volker Borchert.
22675
22676 2001-11-26  Jim Meyering  <meyering@lucent.com>
22677
22678         * lib/gtod.h: Remove file.
22679         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
22680         * lib/gettimeofday.c: Don't include gtod.h.
22681         (GTOD_init): Remove function.
22682         (rpl_gettimeofday): Do its job here instead, rather than aborting.
22683         Suggestion from Volker Borchert.
22684
22685 2001-11-23  Jim Meyering  <meyering@lucent.com>
22686
22687         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
22688         it.
22689         * lib/hash.c (struct hash_table): Define it here instead.
22690
22691 2001-11-22  Jim Meyering  <meyering@lucent.com>
22692
22693         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
22694
22695 2001-11-20  Jim Meyering  <meyering@lucent.com>
22696
22697         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
22698         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
22699
22700 2001-11-19  Jim Meyering  <meyering@lucent.com>
22701
22702         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
22703         directory.  Use "conftestXXXXXX" as the template.
22704         Suggestion from Paul Eggert.
22705
22706         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
22707         immediately, so the test doesn't mistakenly hit the max-open-files
22708         limit.
22709
22710 2001-11-18  Paul Eggert  <eggert@twinsun.com>
22711
22712         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
22713         (TEMPORARIES): New macro.
22714         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
22715         removes an artificial limitation (e.g. HP-UX 10.20, where
22716         TMP_MAX is 17576).
22717
22718 2001-11-18  Jim Meyering  <meyering@lucent.com>
22719
22720         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
22721
22722 2001-11-18  Jim Meyering  <meyering@lucent.com>
22723
22724         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
22725         on SunOS 4.
22726
22727         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
22728         files will be created before anything else.
22729
22730 2001-11-17  Paul Eggert  <eggert@twinsun.com>
22731
22732         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
22733         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
22734
22735 2001-11-17  Jim Meyering  <meyering@lucent.com>
22736
22737         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
22738         Prompted by a report from Bob Proulx.
22739
22740         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
22741         Instead, require UTILS_FUNC_MKSTEMP.
22742
22743 2001-11-17  Jim Meyering  <meyering@lucent.com>
22744
22745         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
22746         Now, that's done as part of AC_FUNC_STRTOD.
22747
22748 2001-11-17  Jim Meyering  <meyering@lucent.com>
22749
22750         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
22751         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
22752         rather than group writable.  Patch by Juan F. Codagnone.
22753
22754         * lib/readtokens.c: Remove explicit declarations of xmalloc and
22755         xrealloc, Instead, include "xalloc.h".
22756
22757         * lib/mountlist.c: Include unlocked-io.h after all system headers.
22758         Remove explicit declarations of xmalloc, xrealloc,
22759         and xstrdup.  Instead, include "xalloc.h".
22760
22761         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
22762         unlocked-io.h.
22763         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
22764         Likewise.
22765         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
22766
22767         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
22768         Reported by Padraig Brady.
22769
22770         * lib/mkstemp.c: #undef mkstemp.
22771         Include config.h.
22772         (rpl_mkstemp): Rename from mkstemp.
22773         Protoize.
22774
22775 2001-11-16  Jim Meyering  <meyering@lucent.com>
22776
22777         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
22778         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
22779         determine the amount of total physical memory, use pstat_getstatic.
22780         HPUX-11 doesn't define _SC_PHYS_PAGES.
22781         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
22782         If sysconf couldn't be used to determine the amount of available
22783         physical memory, use both pstat_getstatic and pstat_getdynamic.
22784         Based on a patch from Bob Proulx.
22785
22786 2001-11-10  Jim Meyering  <meyering@lucent.com>
22787
22788         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
22789         (jm_PREREQ): Use it.
22790
22791 2001-11-09  Jim Meyering  <meyering@lucent.com>
22792
22793         * m4/jm-macros.m4: Require autoconf-2.52f.
22794         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
22795         Use these AC_-prefixed names, not the AM_-prefixed ones.
22796
22797         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
22798
22799 2001-11-05  Jim Meyering  <meyering@lucent.com>
22800
22801         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
22802
22803 2001-11-04  Jim Meyering  <meyering@lucent.com>
22804
22805         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
22806         $DEFS.
22807
22808 2001-11-03  Jim Meyering  <meyering@lucent.com>
22809
22810         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
22811         of AC_DEFUN.
22812
22813         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
22814         know the name of the variable in the macro definition.
22815
22816 2001-11-03  Jim Meyering  <meyering@lucent.com>
22817
22818         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
22819         in argmatch_to_argument call.
22820
22821         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
22822         argument.
22823
22824         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
22825         e.g., a fault due to an attempt to free a NULL pointer.
22826
22827 2001-11-01  Jim Meyering  <meyering@lucent.com>
22828
22829         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
22830         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
22831
22832 2001-11-01  Jim Meyering  <meyering@lucent.com>
22833
22834         * lib/dirfd.c, lib/dirfd.h: New files.
22835         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
22836
22837         * lib/hash.c (hash_print) [TESTING]: Clean up.
22838
22839 2001-10-22  Paul Eggert  <eggert@twinsun.com>
22840
22841         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
22842         to avoid a warning if -Wall.
22843
22844 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
22845
22846         * README: New file
22847         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
22848         (per RMS's instructions, this is now the canonical source)
22849         * lgpl/, gpl/: New directories.
22850
22851 2001-10-21  Paul Eggert  <eggert@twinsun.com>
22852
22853         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
22854
22855 2001-10-21  Jim Meyering  <meyering@lucent.com>
22856
22857         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
22858         this code would end up calling gettext even in packages built
22859         with --disable-nls.
22860         * lib/getopt.c (_): Likewise.
22861         * lib/regex.c (_): Likewise.
22862
22863 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22864
22865         * m4/error.m4 (jm_PREREQ_ERROR):
22866         Do not invoke AC_CHECK_FUNCS with strerror_r, as
22867         AC_FUNC_STRERROR_R does that.
22868         Check for strerror declaration.
22869
22870         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
22871         are supposed to have them these days.
22872         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
22873         Merge changes from latest Autoconf CVS.
22874         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
22875         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
22876         POSIX decided to standardize on the int flavor of strerror_r.
22877
22878 2001-10-20  Paul Eggert  <eggert@twinsun.com>
22879
22880         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
22881         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
22882         Use strerror_r that is only a macro, even if it is not a function.
22883         (strerror): Check for HAVE_DECL_STRERROR before declaring.
22884         (private_strerror): Use prototypes, not old-style function definition.
22885         (print_errno_message): New function.
22886         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
22887         char*-flavored one.
22888         (error_tail, error, error_at_line): Use it.
22889
22890 2001-10-11  Jim Meyering  <meyering@lucent.com>
22891
22892         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
22893         and quote_n (1, ... to avoid clobbering a buffer.
22894
22895 2001-10-05  Jim Meyering  <meyering@lucent.com>
22896
22897         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
22898         hash-pjw.h.
22899         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
22900         * lib/hash-pjw.h: New file.
22901
22902 2001-09-30  Jim Meyering  <meyering@lucent.com>
22903
22904         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
22905         `struct fsstat' has the `f_fstypename' member.
22906         Use that to define FS_TYPE, which is now used to make
22907         the getfsstat link test tighter.
22908
22909 2001-09-30  Jim Meyering  <meyering@lucent.com>
22910
22911         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
22912         Include <sys/ucred.h>, for Apple Darwin.
22913         Include sys/mount.h and sys/fs_types.h only if available.
22914         (FS_TYPE): Define.
22915         (read_filesystem_list): Use FS_TYPE.
22916
22917 2001-09-29  Paul Eggert  <eggert@twinsun.com>
22918
22919         * lib/exclude.c (excluded_filename): 0 -> false, since it's
22920         a boolean context.
22921
22922 2001-09-29  Jim Meyering  <meyering@lucent.com>
22923
22924         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22925         [one-argument getmntent function]): Include stdio.h before mntent.h.
22926         SunOS 4.1.x needs it for the declaration of `FILE'.
22927         Patch by Volker Borchert.
22928
22929         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
22930         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
22931         sys/fs_types.h, and make the link-test for getfsstat guard #include
22932         directives with appropriate #if HAVE_*_H tests so that we can
22933         detect getfsstat on Apple Darwin1.3.7 systems.
22934         Reported by Nelson Beebe.
22935         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
22936
22937 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22938
22939         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22940         #defines strtoimax.  Also treat the other strto* functions
22941         like strtoimax.
22942
22943         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
22944         Check for strtoul and strtoumax,
22945         as those declarations are made even in the signed case.
22946         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
22947         Likewise, for strtol and strtoimax.
22948
22949 2001-09-28  Paul Eggert  <eggert@twinsun.com>
22950
22951         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
22952         #defines strtoimax.  Also treat the other strto* functions
22953         like strtoimax.
22954
22955         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
22956         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
22957         (strtoimax, strtoumax): Do not declare if already defined as a macro.
22958
22959 2001-09-26  Jim Meyering  <meyering@lucent.com>
22960
22961         Most macros in unlocked-io.h had the wrong number of arguments.
22962         * lib/gen-uio: New script.
22963         (USE_UNLOCKED_IO): Define to 1 if not already defined.
22964         * lib/unlocked-io.hin: Remove file.
22965         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
22966         rather than trying to embed it here.
22967         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
22968         Reported by Padraig Brady.
22969
22970 2001-09-25  Volker Borchert  <bt@teknon.de>
22971
22972         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
22973         `result'.
22974
22975 2001-09-24  Jim Meyering  <meyering@lucent.com>
22976
22977         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
22978
22979 2001-09-23  Jim Meyering  <meyering@lucent.com>
22980
22981         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
22982         instead of the mere test for existence of mntent.h.  The latter
22983         would get a false-positive on AIX 3.4 systems.
22984         In the outer getmntent if-block, don't die if neither of the getmntent
22985         tests succeeds.  Instead, just fall through and continue with the
22986         remaining tests.
22987
22988 2001-09-23  Jim Meyering  <meyering@lucent.com>
22989
22990         * lib/mountlist.c: Remove useless parentheses in #if directives.
22991         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
22992         the deprecated MOUNTED symbol is no longer defined in mntent.h.
22993
22994 2001-09-22  Jim Meyering  <meyering@lucent.com>
22995
22996         * m4/gettext.m4: New file.  From gettext.
22997         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
22998         * m4/progtest.m4: Likewise
22999         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
23000         * m4/glibc21.m4: Likewise.
23001
23002         * m4/libintl.m4: Remove.  No longer used.
23003
23004 2001-09-22  Jim Meyering  <meyering@lucent.com>
23005
23006         * lib/localcharset.c: Update from latest gettext.
23007         * lib/config.charset: Likewise.
23008
23009 2001-09-20  Jim Meyering  <meyering@lucent.com>
23010
23011         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
23012         strtoimax.
23013         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
23014         strtoumax.
23015
23016 2001-09-20  Jim Meyering  <meyering@lucent.com>
23017
23018         * lib/xstrtol.c (strtoimax): Guard declaration with
23019         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
23020         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
23021         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
23022         (strtoumax): Likewise, for completeness (it wasn't necessary).
23023
23024 2001-09-17  Paul Eggert  <eggert@twinsun.com>
23025
23026         * lib/strtoimax.c (HAVE_LONG_LONG):
23027         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
23028         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
23029         to work around bug in IBM C compiler.
23030
23031 2001-09-17  Jim Meyering  <meyering@lucent.com>
23032
23033         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
23034         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
23035         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
23036         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
23037         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
23038         whenever the right hand side need not be expanded by the shell.
23039
23040 2001-09-16  Paul Eggert  <eggert@twinsun.com>
23041
23042         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
23043         library.  It's not correct, as some older glibcs are buggy.
23044         fnmatch wasn't fixed until glibc 2.2.
23045
23046         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
23047         special shell magic here.
23048
23049 2001-09-16  Jim Meyering  <meyering@lucent.com>
23050
23051         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
23052         * m4/jm-macros.m4: Require it.
23053
23054 2001-09-16  Jim Meyering  <meyering@lucent.com>
23055
23056         * lib/mkdir.c: New file.
23057
23058 2001-09-15  Jim Meyering  <meyering@lucent.com>
23059
23060         * m4/jm-macros.m4: Check for help2man.
23061
23062 2001-09-11  Jim Meyering  <meyering@lucent.com>
23063
23064         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
23065         The body, by Paul Eggert, was moved here from configure.in.
23066         * m4/jm-macros.m4: Require UTILS_HOST_OS.
23067
23068 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23069
23070         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
23071         (jm_PREREQ): Use it.
23072
23073 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23074
23075         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
23076         Use ssize_t, not int, to store result of readlink.
23077         Check for ssize_t overflow as well as size_t overflow,
23078         as POSIX says the result of readlink is implementation-defined
23079         when ssize_t overflows.
23080         Remove unnecessary cast to char*.
23081         Use free+malloc instead of realloc, as the storage doesn't need
23082         to be preserved and it's clearer and can be more efficient that way.
23083         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
23084         * lib/xreadlink.h (xreadlink): Update prototype.
23085
23086 2001-09-04  Paul Eggert  <eggert@twinsun.com>
23087
23088         * lib/xgetcwd.c: Revert some of the previous change; intead,
23089         fix the HAVE_GETCWD_NULL code to behave more like the
23090         !HAVE_GETCWD_NULL code used to.
23091
23092         Include "xalloc.h".
23093         (xgetcwd): Do not return NULL when memory is exhausted; instead,
23094         invoke xalloc_die.
23095
23096 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23097
23098         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
23099         sys/param.h, as pathmax.h includes them.
23100
23101 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23102
23103         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
23104         (jm_PREREQ_XGETCWD): New macro.
23105
23106         * m4/getcwd.m4: New file.
23107
23108 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23109
23110         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
23111         like the HAVE_GETCWD_NULL code.
23112         Include pathmax.h if not HAVE_GETCWD.
23113         Do not include xalloc.h.
23114         (INITIAL_BUFFER_SIZE): New symbol.
23115         Do not use xmalloc / xrealloc, since the caller is responsible for
23116         handling errors.  Preserve errno around `free' during failure.
23117         Do not overrun buffer when using getwd.
23118
23119 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23120
23121         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
23122         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
23123         getcwd (NULL, 0).
23124
23125 2001-09-03  Paul Eggert  <eggert@twinsun.com>
23126
23127         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
23128         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
23129         spotted by Jim Meyering.
23130
23131 2001-09-03  Jim Meyering  <meyering@lucent.com>
23132
23133         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
23134         failure.
23135
23136 2001-09-02  Jim Meyering  <meyering@lucent.com>
23137
23138         * lib/error.c: Update from GNU libc.
23139
23140 2001-09-01  Jim Meyering  <meyering@lucent.com>
23141
23142         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
23143         Used by df.
23144
23145 2001-09-01  Jim Meyering  <meyering@lucent.com>
23146
23147         * lib/xreadlink.c: New file.
23148         * lib/xreadlink.h: New file.
23149         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
23150         xreadlink.h.
23151
23152         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
23153         doesn't conflict with sparc Solaris 7's definition in
23154         /usr/include/sys/int_types.h.
23155
23156         * lib/exclude.c: Use `""', not `<>' to #include non-system header
23157         files.
23158         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
23159         and strncasecmp as r-values.  Unixware didn't have declarations.
23160
23161 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23162
23163         * lib/xstrtol.h: Add copyright notice.
23164         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
23165         LONGINT_INVALID_SUFFIX_CHAR.
23166
23167 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23168
23169         * lib/xstrtol.c (strtoimax): New decl.
23170
23171 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23172
23173         * lib/xgetcwd.c: Don't include pathmax.h.
23174         Include stdlib.h and unistd.h if available.
23175         Include xalloc.h.
23176         (xmalloc, xstrdup, free): Remove decls.
23177         (xgetcwd): Don't assume sizes fit in unsigned.
23178         Check for overflow when computing sizes.
23179         Simplify reallocation code.
23180
23181 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23182
23183         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
23184         a directory's st_size can have an arbitrary value, so the old
23185         usage could waste an arbitrary amount of memory.  All uses
23186         changed.
23187         * lib/savedir.h: Update prototype.
23188
23189 2001-08-31  Paul Eggert  <eggert@twinsun.com>
23190
23191         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
23192
23193         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
23194         old strtoimax.c.
23195
23196         Also, make the following further changes to make this file's
23197         configuration more similar to that of strtol.c:
23198         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
23199         (strtoumax, uintmax_t, strtoull, strtol): Remove.
23200         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
23201         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
23202         changed to signed values.
23203
23204         And make the following changes as well:
23205         Fix copyright notice, as 1999 was missing.
23206         (verify): New macro.
23207         (strtoimax): Check sizes at compile-time, not run-time.
23208         Prefer strtol to strtoll if both work.
23209         (main): Remove; it was not that useful and was a pain to maintain.
23210
23211         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
23212
23213 2001-08-31  Jim Meyering  <meyering@lucent.com>
23214
23215         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
23216         Use an initial, malloc'd, buffer of length 128 rather than
23217         a statically allocated one of length 1024.
23218
23219 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23220
23221         Simplify code, partly by assuming autoconf 2.52 semantics.
23222
23223         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
23224
23225         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
23226         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
23227         All uses removed.
23228         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
23229         Move AC_REQUIRE to next-to-top level, to avoid confusion.
23230         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
23231         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
23232         jm_AC_HEADER_INTTYPES_H.
23233         * m4/jm-macros.m4 (jm_MACROS): Likewise.
23234
23235         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
23236
23237         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
23238         Quote first arg of AC_DEFUN.
23239         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
23240         since they are needed to parse the include file even if we need
23241         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
23242         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
23243         but with opposite signedness.
23244
23245 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23246
23247         Merge 'exclude' changes from tar 1.13.22.
23248         This fixes one or two unlikely storage allocation overflow bugs,
23249         but doesn't change user-visible behavior otherwise.
23250
23251 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23252
23253         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
23254         (jm_PREREQ_EXCLUDE): New macro.
23255
23256 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23257
23258         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
23259         tm to be declared.
23260
23261 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23262
23263         * lib/hash.c: Remove '2001' from copyright notice.
23264
23265 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23266
23267         * lib/full-write.h: New file.
23268         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
23269         * lib/full-write.c: Correct credits, as cccp.c no longer
23270         exists and anyway it was so heavily changed from the old cccp
23271         code as to be unrecognizable.  Include full-write.h.
23272         (full_write) Return size_t, with short writes meaning failure.
23273         All callers changed.  This fixes a bug with large buffers
23274         on 64-bit hosts.
23275         * lib/utime.c: Include full-write.h.
23276
23277 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23278
23279         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
23280         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
23281         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
23282         Include if available.
23283         (<xalloc.h>): Include
23284         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
23285         (verify): New macro.  Use it to verify that EXCLUDE macros do not
23286         collide with FNM macros.
23287         (struct patopts): New struct.
23288         (struct exclude): Use it, as exclude patterns now come with options.
23289         (new_exclude): Support above changes.
23290         (new_exclude, add_exclude_file):
23291         Initial size must now be a power of two to simplify overflow checking.
23292         (free_exclude, fnmatch_no_wildcards): New function.
23293         (excluded_filename): No longer requires options arg, as the options
23294         are determined by add_exclude.  Now returns bool, not int.
23295         (excluded_filename, add_exclude):
23296         Add support for the fancy new exclusion options.
23297         (add_exclude, add_exclude_file): Now takes int options arg.
23298         Check for arithmetic overflow when computing sizes.
23299         (add_exclude_file): xrealloc might modify errno, so don't
23300         realloc until after errno might be used.
23301
23302         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
23303         New macros.
23304         (free_exclude): New decl.
23305         (add_exclude, add_exclude_file): Now takes int options arg.
23306         (excluded_filename): No longer requires options arg, as the options
23307         are determined by add_exclude.  Now returns bool, not int.
23308
23309 2001-08-30  Paul Eggert  <eggert@twinsun.com>
23310
23311         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
23312
23313 2001-08-27  Jim Meyering  <meyering@lucent.com>
23314
23315         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
23316
23317         * lib/version-etc.c (N_): Remove definition.
23318         Revert most of last change.
23319         Instead, simply don't mark the `Copyright...' string for translation.
23320         Based on advice from Paul Eggert.
23321
23322         * lib/strtoxmax.c: Tweak comment.
23323
23324 2001-08-26  Jim Meyering  <meyering@lucent.com>
23325
23326         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
23327
23328         * m4/xstrtoimax.m4: New file.
23329         * m4/xstrtoumax.m4: Add comments explaining why we
23330         AC_REPLACE_FUNCS(strtol).
23331
23332 2001-08-26  Jim Meyering  <meyering@lucent.com>
23333
23334         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
23335         of copyright with `%s' so translators don't get an untranslated
23336         message in 2002.
23337         (COPYRIGHT_YEAR): Define.
23338         (version_etc): Use fprintf rather than fputs.
23339         Suggestion from Ulrich Drepper.
23340
23341         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
23342
23343         * lib/strtoll.c: New file, from GNU libc.
23344         * lib/xstrtoimax.c: New file.
23345
23346         * lib/xstrtol.h: Add xstrtoimax.
23347         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
23348         * lib/strtoimax.c: New file.  Likewise, but first define
23349         STRTOUXMAX_SIGNED.
23350
23351         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
23352         ...
23353         * lib/strtoxmax.c: ... then renamed to this.
23354
23355 2001-08-18  Paul Eggert  <eggert@twinsun.com>
23356
23357         * m4/inttypes.m4: Add AC_PREREQ(2.13).
23358         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
23359         (jm_AC_TYPE_INTMAX_T): New macro.
23360         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
23361
23362         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
23363
23364         * m4/longlong.m4: Renamed from ulonglong.m4.
23365         * m4/inttypes.m4: Renamed from inttypes_h.m4.
23366         * m4/uintmax_t.m4: Removed.
23367
23368 2001-08-13  Paul Eggert  <eggert@twinsun.com>
23369
23370         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
23371         Port to Solaris 8, where 'sed' requires a space after the 'r'
23372         command, and where sh dislikes "$/".  Clean up the spacing a bit.
23373         Redirect output to $tmp just once.
23374
23375 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
23376
23377         * lib/addext.c (<errno.h>): Include.
23378         (errno): Declare if not defined.
23379         (addext): Work correctly when pathconf returns -1 and leaves
23380         errno alone because there is no limit.  Also, work even if
23381         pathconf returns a value greater than SIZE_MAX.
23382
23383 2001-08-12  Jim Meyering  <meyering@lucent.com>
23384
23385         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
23386         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
23387         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
23388         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
23389         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
23390         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
23391         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
23392         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
23393         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
23394         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
23395         utime.m4, utimes.m4, xstrtoumax.m4:
23396         Quote the first argument in each use of AC_DEFUN.
23397
23398 2001-08-12  Jim Meyering  <meyering@lucent.com>
23399
23400         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
23401         Simply `return getcwd (NULL, 0);'.
23402         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
23403         Use 1300 as initial value for length, not PATH_MAX.
23404
23405         * lib/pathmax.h: Clean up cpp syntax.
23406
23407 2001-08-12  Jim Meyering  <meyering@lucent.com>
23408
23409         * lib/gettimeofday.c: New file.
23410         * lib/gtod.h: New file.
23411         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
23412
23413 2001-08-05  Jim Meyering  <meyering@lucent.com>
23414
23415         * m4/jm-macros.m4: Require autoconf-2.52.
23416
23417 2001-08-04  Jim Meyering  <meyering@lucent.com>
23418
23419         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
23420         stmt, to get in sync with glibc.
23421
23422 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23423
23424         The following changes are from gettext 0.10.39 as maintained by
23425         Bruno Haible.
23426
23427         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
23428         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
23429         with inverted sense.  All uses changed.
23430
23431         * lib/mbswidth.c: Don't include <limits.h>.
23432         Include <stdlib.h> and <string.h> unconditionally.
23433         (iswcntrl, mbsinit, ISCNTRL): New macros.
23434         (mbsnwidth): Use K&R style function declarations.
23435         Don't bother checking for MB_LEN_MAX == 1, since the compiler
23436         can optimize it when MB_CUR_MAX == 1.
23437         The width of control characters is zero, not 1.
23438
23439 2001-08-03  Paul Eggert  <eggert@twinsun.com>
23440
23441         The following changes are from gettext 0.10.39 as maintained by
23442         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
23443
23444         * m4/codeset.m4: Upgrade to serial AM1.
23445         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
23446         all uses changed.  Quote first arg of AC_DEFUN.
23447         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
23448
23449         * m4/iconv.m4: Upgrade to serial AM2.
23450         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
23451         Add --with-libconv-prefix.
23452         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
23453         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
23454         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
23455         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
23456         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
23457
23458         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
23459         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
23460         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
23461         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
23462         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
23463         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
23464         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
23465         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
23466         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
23467
23468         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
23469         string.h any more.
23470
23471         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
23472         not the default value.
23473
23474         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
23475         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
23476         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
23477         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
23478         Also check for iswcntrl, used for wcwidth fallback.
23479         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
23480         to Autoconf 2.13.
23481
23482 2001-08-03  Jim Meyering  <meyering@lucent.com>
23483
23484         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
23485         as it was in the original.  Reported by Paul Eggert.
23486
23487 2001-07-16  Jim Meyering  <meyering@lucent.com>
23488
23489         * m4/gettimeofday.m4: New file.
23490         Prompted by a report from Bernhard Baehr.
23491
23492 2001-07-15  Jim Meyering  <meyering@lucent.com>
23493
23494         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
23495         stuff. Now it's in ../Makefile.cfg.
23496
23497 2001-07-15  Jim Meyering  <meyering@lucent.com>
23498
23499         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
23500         (BUILT_SOURCES): Add unlocked-io.h.
23501         (io_functions): Define.
23502         (unlocked-io.h): New rule.
23503         (DISTCLEANFILES): Add unlocked-io.h.
23504         (all-local): Depend on unlocked-io.h, to ensure it is created.
23505
23506         * lib/unlocked-io.hin: New file
23507
23508         * lib/regex.c: Update from glibc.
23509
23510 2001-07-05  Jim Meyering  <meyering@lucent.com>
23511
23512         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
23513         recommendation.
23514         (libfetish_a_SOURCES): Put all .h files here instead.
23515         Remove a thus-exposed (better checks in automake) duplicate and
23516         two unnecessary .h files.
23517
23518 2001-07-04  Jim Meyering  <meyering@lucent.com>
23519
23520         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
23521         that generates jm-glibc-io.m4 so that it doesn't trigger any make
23522         distcheck failure.
23523
23524 2001-07-02  Jim Meyering  <meyering@lucent.com>
23525
23526         The following changes were prompted by suggestions from Bruno Haible.
23527
23528         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
23529         is now generated.
23530         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
23531         definition of EXTRA_DIST.
23532         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
23533         ensure that the generated file is created/updated whenever the list
23534         of $(unlocked_functions) is changed.
23535         (jm-glibc-io.m4): New rule.
23536         (unlocked-io.h): New rule -- currently unused.
23537
23538 2001-06-24  Jim Meyering  <meyering@lucent.com>
23539
23540         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
23541         unmatched right bracket, rather than kludging it with an extra,
23542         falsely-matching quote in a comment.  Patch by Akim Demaille.
23543
23544 2001-06-11  Jim Meyering  <meyering@lucent.com>
23545
23546         * lib/regex.c: Update from GNU libc.
23547
23548 2001-05-27  Jim Meyering  <meyering@lucent.com>
23549
23550         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
23551         Check for ut_type in struct utmp.
23552
23553 2001-05-27  Jim Meyering  <meyering@lucent.com>
23554
23555         * lib/readutmp.h (UT_TYPE): Define.
23556
23557 2001-05-24  Jim Meyering  <meyering@lucent.com>
23558
23559         * lib/argmatch.c: Include "quote.h".
23560         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
23561         quote function.  Reported by Göran Uddeborg.
23562
23563 2001-05-22  Jim Meyering  <meyering@lucent.com>
23564
23565         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
23566         now that we use the package-supplied version unconditionally.
23567         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
23568
23569 2001-05-21  Jim Meyering  <meyering@lucent.com>
23570
23571         * m4/regex.m4: Change a couple backticks to single quotes to avoid
23572         shell syntax errors.
23573
23574 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23575
23576         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
23577
23578 2001-05-20  Paul Eggert  <eggert@twinsun.com>
23579
23580         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
23581         Don't bother to check library strftime, since
23582         we'll be using our own my_strftime function anyway.
23583         Define my_strftime instead of strftime.
23584
23585 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
23586
23587         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
23588         which is not yet declared.
23589
23590 2001-05-15  Jim Meyering  <meyering@lucent.com>
23591
23592         * m4/regex.m4: Use proper quoting so brackets appear in the test
23593         program.
23594         Reported by, and with help from, Bruno Haible.
23595
23596 2001-05-13  Jim Meyering  <meyering@lucent.com>
23597
23598         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
23599         undefined.
23600
23601 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23602
23603         dirname code cleanup.  base_name now behaves more compatibly
23604         with POSIX basename when given file names that have trailing
23605         slashes, and similarly for dir_name.  Add new primitives
23606         base_len and dir_len.  Put the directory-name-related decls
23607         into dirname.h.
23608
23609         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
23610         * lib/backupfile.c (base_name): Likewise.
23611         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
23612         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
23613         * lib/makepath.c (strip_trailing_slashes): Likewise.
23614         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
23615         ISSLASH): Likewise.
23616         * lib/rename.c (strip_trailing_slashes): Likewise.
23617         * lib/same.c (base_name): Likewise.
23618         * lib/stripslash.c (ISSLASH): Likewise.
23619
23620         * lib/addext.c: Include <dirname.h> after size_t is defined.
23621         * lib/backupfile.c: Likewise.
23622
23623         * lib/addext.c (addext): Use base_len to trim redundant
23624         trailing slashes instead of doing it ourselves.
23625         But do not trim the last slash if it is not redundant.
23626
23627         * lib/backupfile.c (find_backup_file_name,
23628         max_backup_version): Use base_len instead of rolling it ourselves.
23629         Handle the case of "" and (on DOS) "C:" correctly.
23630
23631         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
23632         needed. Include <string.h>, <dirname.h>.
23633         (base_name): Allow file names ending in slashes, other than names
23634         that are all slashes.  In this case, return the basename followed
23635         by the slashes.  This is more general, and can be used in places
23636         where the original base_name purposely had an assertion failure.
23637         (base_len): New function.
23638
23639         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
23640         Do not include <assert.h>; no longer needed.
23641         Include xalloc.h.
23642         (memrchr): Remove decl.
23643         (dir_name_r): Remove.
23644         (dir_len): Renamed from dirlen.  All callers changed.
23645         Rewrite in terms of base_name, for simplicity and consistency.
23646         (dir_name): Never return NULL.  All callers changed.
23647         Do not include <stdlib.h> in test program; no longer needed.
23648         return 0; is fine for test program.
23649
23650         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
23651         New macros.
23652         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
23653
23654         * lib/path-concat.c (path_concat): Use base_len to compute
23655         base length, not strlen; this means we cannot rely on memcpy
23656         to null-terminate.
23657
23658         * lib/same.c (STREQ): Remove.
23659         (same_name): Handle the case where the basename ends in trailing '/'.
23660
23661         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
23662         a slash was stripped.  Do not strip the last slash after a
23663         file system prefix.
23664
23665 2001-05-11  Paul Eggert  <eggert@twinsun.com>
23666
23667         * lib/Makefile.am (libfetish_a_SOURCES):
23668         Add strftime.c, since we now compile it on all hosts.
23669
23670         * lib/strftime.c (my_strftime):
23671         Define to nstrftime if emacs, but only if my_strftime is not defined.
23672         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
23673         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
23674         Add one more extra argument: a nanoseconds value.
23675         All uses changed.
23676         (ns): New macro.
23677         (my_strftime function): Add %N format.
23678         (emacs_strftimeu): Renamed from emacs_strftime,
23679         with extra ut argument.
23680
23681 2001-05-09  Paul Eggert  <eggert@twinsun.com>
23682
23683         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
23684
23685 2001-04-21  Jim Meyering  <meyering@lucent.com>
23686
23687         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
23688         doesn't interfere.
23689
23690 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
23691
23692         * m4/ftruncate.m4: Check for chsize.
23693         Link with ftruncate.o unconditionally if ftruncate is missing.
23694         This was required when cross-compiling to i586-mingw32msvc.
23695
23696 2001-04-08  Jim Meyering  <meyering@lucent.com>
23697
23698         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
23699         recomputed; that's necessary when the offset spans a DST transition.
23700         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
23701
23702 2001-04-02  Jim Meyering  <meyering@lucent.com>
23703
23704         * lib/regex.h, regex.c: Update from GNU libc.
23705
23706 2001-03-24  Jim Meyering  <meyering@lucent.com>
23707
23708         * m4/jm-macros.m4: Require autoconf-2.49d.
23709
23710 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
23711
23712         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
23713
23714 2001-03-19  Paul Eggert  <eggert@twinsun.com>
23715
23716         * lib/version-etc.c (version_etc_copyright): Update to 2001.
23717
23718 2001-03-17  Jim Meyering  <meyering@lucent.com>
23719
23720         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
23721         now that the version in autoconf is equivalent.
23722         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
23723
23724         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
23725         Suggestion from Akim Demaille.
23726
23727         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
23728         (jm_PREREQ_TEMPNAME): New function.
23729
23730 2001-03-16  Paul Eggert  <eggert@twinsun.com>
23731
23732         * lib/tempname.c (uint64_t): Define to uintmax_t if
23733         not defined, and if UINT64_MAX is not defined.
23734         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
23735         Reported by John David Anglin.
23736
23737 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
23738
23739         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
23740         resolve alias if codeset is empty.
23741         * lib/config.charset (BeOS): Use wildcard syntax.
23742
23743 2001-03-13  Jim Meyering  <meyering@lucent.com>
23744
23745         * lib/path-concat.c (path_concat)
23746         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
23747         concatenating e.g., `C:' and `foo'.
23748         From Bruno Haible.
23749
23750 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23751
23752         * lib/localcharset.c (locale_charset): Don't use
23753         setlocale(LC_CTYPE,NULL). Don't return NULL.
23754         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
23755
23756 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
23757
23758         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
23759         support for DOS/DJGPP.
23760
23761 2001-03-01  Paul Eggert  <eggert@twinsun.com>
23762
23763         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
23764         lacks mkstemp.  Compile our own tempname.c if we compile our own
23765         mkstemp.c, as mkstemp relies on tempname.
23766
23767 2001-03-01  Jim Meyering  <meyering@lucent.com>
23768
23769         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
23770         AH_VERBATIM really does output its argument verbatim.
23771
23772 2001-02-28  Paul Eggert  <eggert@twinsun.com>
23773
23774         * lib/Makefile.am (libfetish_a_SOURCES):
23775         Add dup-safer.c, fopen-safer.c.
23776         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
23777
23778         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
23779         * lib/unistd-safer.h: New files.
23780
23781 2001-02-25  Paul Eggert  <eggert@twinsun.com>
23782
23783         The mkstemp replacement is taken from glibc 2.2.2, with some
23784         portability fixes for use outside glibc, as follows:
23785
23786         * lib/tempname.c (struct_stat64): New macro.
23787         (direxists, __gen_tempname): Use it.
23788         This avoids a portability problem with Solaris 8.
23789
23790         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
23791         (<stddef.h>, <stdint.h>, <string.h>):
23792         Include only if STDC_HEADERS || _LIBC.
23793         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
23794         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
23795         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
23796         (__set_errno): Define this macro if <errno.h> doesn't.
23797         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
23798         Define these macros if <stdio.h> doesn't.
23799         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
23800         Define these macros if <sys/stat.h>
23801         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
23802         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
23803         __xstat64): Define if not _LIBC.
23804         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
23805         (__gen_tempname): Invoke gettimeofday only if
23806         HAVE_GETTIMEOFDAY || _LIBC;
23807         otherwise, fall back on plain "time".
23808         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
23809
23810         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
23811
23812         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
23813
23814 2001-02-18  Paul Eggert  <eggert@twinsun.com>
23815
23816         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
23817
23818 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23819
23820         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
23821         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
23822         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
23823         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
23824
23825 2001-02-17  Paul Eggert  <eggert@twinsun.com>
23826
23827         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
23828         Remove workaround macros for hosts that have mbrtowc but not
23829         mbstate_t, as we now insist on proper declarations for both
23830         before using mbrtowc.
23831
23832 2001-02-17  Jim Meyering  <meyering@lucent.com>
23833
23834         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
23835         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
23836         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
23837         UnixWare 7.1.1.
23838
23839         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
23840         rather than AC_CACHE_VAL.
23841
23842 2001-02-17  Jim Meyering  <meyering@lucent.com>
23843
23844         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
23845         around included file name.
23846
23847         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
23848
23849         * lib/strftime.c: Update from GNU libc (the only changes were to
23850         comments).
23851
23852 2001-02-17  Jim Meyering  <meyering@lucent.com>
23853
23854         * lib/regex.c: Update from libc.
23855
23856 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
23857
23858         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
23859         clash.
23860
23861 2001-02-16  Paul Eggert  <eggert@twinsun.com>
23862
23863         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
23864         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
23865         Reported by Mark Hounschell via Paul Eggert.
23866
23867 2001-02-07  Jim Meyering  <meyering@lucent.com>
23868
23869         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
23870
23871 2001-02-05  Jim Meyering  <meyering@lucent.com>
23872
23873         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
23874         it includes the patch required for `large file' support with at least
23875         HP-UX's 10.20 /bin/cc.
23876
23877 2001-02-03  Jim Meyering  <meyering@lucent.com>
23878
23879         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
23880         AS_IF, now that it works once again (mysteriously).
23881         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23882
23883 2001-01-30  Jim Meyering  <meyering@lucent.com>
23884
23885         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
23886         * m4/chown.m4: Rename conftestchown to conftest.chown.
23887         * m4/rename.m4: s/conftestdir/conftest.d1/ and
23888         s/conftestdir2/conftest.d2/.
23889         * m4/utimes.m4: s/conftestdata/conftest.data/
23890         Inspired by Pavel Roskin's change in autoconf.
23891
23892 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
23893
23894         * lib/config.charset: Update for FreeBSD 4.2.
23895
23896 2001-01-27  Jim Meyering  <meyering@lucent.com>
23897
23898         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
23899         a use of AS_IF.
23900         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
23901
23902 2001-01-26  Jim Meyering  <meyering@lucent.com>
23903
23904         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
23905         quotearg.c includes it.
23906
23907 2001-01-26  Jim Meyering  <meyering@lucent.com>
23908
23909         * lib/quotearg.c: Include stddef.h.
23910         * lib/quote.c: Include stddef.h.
23911         Reported by Axel Kittenberger.
23912
23913         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
23914         line in double quotes so that it evokes a better diagnostic.
23915         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
23916         Reported by Axel Kittenberger.
23917
23918 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
23919
23920         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
23921         as if it was a `charset'.
23922
23923 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23924
23925         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
23926         has const.
23927
23928 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
23929
23930         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
23931         to avoid a warning.  Add back 'const' to inptr.
23932
23933 2001-01-20  Jim Meyering  <meyering@lucent.com>
23934
23935         Be sure that headers are checked before used in code compiled
23936         for the type checks.
23937         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
23938         In place of that, invoke jm_CHECK_ALL_TYPES.
23939         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
23940         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
23941         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
23942         The check for ssize_t was mistakenly run before the test for unistd.h.
23943
23944         The configure-time check for stdbool.h was missing.
23945         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
23946         (jm_PREREQ_HASH): New function.
23947
23948 2001-01-17  Jim Meyering  <meyering@lucent.com>
23949
23950         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
23951         for autoconf-2.49c.
23952         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
23953
23954 2001-01-16  Jim Meyering  <meyering@lucent.com>
23955
23956         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
23957         From Bruno Haible.
23958
23959 2001-01-14  Jim Meyering  <meyering@lucent.com>
23960
23961         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
23962         foo and bar.  Create conftestdir/ in the script, not in the C code.
23963         Remove directories in the script, not in the C code.
23964         Remove conftestdir{,2} before trying to create the directory.
23965         Make the entire configure script fail if the mkdir fails.
23966
23967 2001-01-14  Jim Meyering  <meyering@lucent.com>
23968
23969         * lib/rename.c: New file.  From Volker Borchert.
23970         Include stdlib.h, string.h or strings.h, and xalloc.h.
23971         Use strip_trailing_slashes rather than open-coding it.
23972
23973 2001-01-03  Paul Eggert  <eggert@twinsun.com>
23974
23975         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
23976
23977 2001-01-03  Jim Meyering  <meyering@lucent.com>
23978
23979         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
23980         of local `inptr' to avoid warning with some system declarations of
23981         iconv.
23982
23983 2001-01-02  Volker Borchert  <bt@teknon.de>
23984
23985         * m4/rename.m4: New file.
23986         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
23987
23988 2001-01-01  Jim Meyering  <meyering@lucent.com>
23989
23990         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
23991         even on systems with utmpx.h.  It's necessary for the declaration of
23992         utmp's ut_user member.  Reported by Andreas Jaeger.
23993
23994         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
23995         available. They are required for the declarations of getgrgid and
23996         getpwuid resp.
23997         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
23998         Reported by Andreas Jaeger.
23999
24000 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
24001
24002         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
24003         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
24004         so `make install' also works in VPATH builds.
24005
24006 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
24007
24008         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
24009         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
24010         can be used in subdirectories.
24011
24012 2000-12-29  Paul Eggert  <eggert@twinsun.com>
24013
24014         * lib/modechange.c: Do not assume that mode_t uses the
24015         traditional octal encoding.  E.g. "chmod 1 FOO" should set
24016         the other-execute bit of FOO even if S_IXOTH != 1.
24017
24018         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
24019         WOTH, XOTH, ALLM): New macros.
24020         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
24021          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
24022         Use them.
24023         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
24024         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
24025         (mode_compile):
24026         No need to use uintmax_t; unsigned long is long enough.
24027         Don't bother to get suffix since we don't use it.
24028
24029 2000-12-26  Jim Meyering  <meyering@lucent.com>
24030
24031         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
24032         better with autoheader.
24033
24034 2000-12-24  Jim Meyering  <meyering@lucent.com>
24035
24036         * lib/hash.c (is_prime): Return explicit boolean values.
24037         (hash_get_first): Return NULL to appease Irix5.6's 89.
24038         Reported by Nelson Beebe.
24039
24040 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
24041
24042         * lib/localcharset.c (locale_charset): Add support for Win32.
24043
24044 2000-12-18  Paul Eggert  <eggert@twinsun.com>
24045
24046         * lib/physmem.h, lib/physmem.c: New files.
24047
24048         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
24049         (noinst_HEADERS): Add physmem.h.
24050
24051         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
24052         't' for compatibility with Solaris 8 sort.
24053
24054 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
24055
24056         * lib/config.charset: Add support for BeOS.
24057
24058 2000-12-17  Jim Meyering  <meyering@lucent.com>
24059
24060         * m4/dos.m4 (jm_AC_DOS): New file and macro.
24061         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
24062
24063 2000-12-16  Jim Meyering  <meyering@lucent.com>
24064
24065         This bug had a serious impact on chown: `chown N:M FILE' (for integer
24066         N and M) would have treated it like `chown N:N FILE'.
24067
24068         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
24069
24070 2000-12-16  Jim Meyering  <meyering@lucent.com>
24071
24072         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
24073         SHELLS_FILE to a file name that's useful on djgpp systems.
24074         Include stdlib.h.
24075         (ADDITIONAL_DEFAULT_SHELLS): Define.
24076         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
24077         Based mostly on a patch from Prashant TR.
24078
24079 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
24080
24081         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
24082         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
24083         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
24084
24085 2000-12-08  Andreas Schwab  <schwab@suse.de>
24086
24087         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
24088         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
24089
24090 2000-12-07  Jim Meyering  <meyering@lucent.com>
24091
24092         * lib/stripslash.c (ISSLASH): Define.
24093         (strip_trailing_slashes): Use ISSLASH rather than comparing against
24094         `/'.
24095         From Prashant TR.
24096
24097         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
24098         (dir_name_r): Declare this function as static.
24099         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
24100         manifest itself on a name containing a mix of slashes and
24101         backslashes.
24102         Make this function work with names starting with a DOS-style
24103         drive letter and colon prefix.
24104         (dir_name): Append `.' if necessary.
24105         Based mostly on patches from Prashant TR and Eli Zaretskii.
24106
24107         * lib/dirname.h (dir_name_r): Remove prototype.
24108
24109 2000-12-06  Paul Eggert  <eggert@twinsun.com>
24110
24111         * m4/off_t-format.m4: Remove this file.
24112         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
24113
24114 2000-12-06  Jim Meyering  <meyering@lucent.com>
24115
24116         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
24117         replacement strtoull, we may well need the replacement strtoul, too.
24118         Check for declarations of strtoul and strtoull.
24119         Check for strtol.  Mainly as a cue to cause automake to include
24120         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
24121         Check for limits.h -- strtol.c needs it.
24122
24123 2000-12-05  Jim Meyering  <meyering@lucent.com>
24124
24125         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
24126
24127 2000-12-04  Jim Meyering  <meyering@lucent.com>
24128
24129         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
24130         Also include memory.h, stdlib.h, unistd.h if appropriate.
24131         Reported by Andreas Jaeger (conflicting declaration of malloc).
24132
24133 2000-12-02  Jim Meyering  <meyering@lucent.com>
24134
24135         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
24136         * m4/jm-macros.m4 (jm_MACROS): require it.
24137
24138 2000-12-02  Jim Meyering  <meyering@lucent.com>
24139
24140         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
24141
24142 2000-12-01  Paul Eggert  <eggert@twinsun.com>
24143
24144         * lib/memrchr.c: Include <config.h> before any system include file.
24145
24146 2000-11-30  Jim Meyering  <meyering@lucent.com>
24147
24148         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
24149
24150 2000-11-30  Jim Meyering  <meyering@lucent.com>
24151
24152         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
24153
24154 2000-11-29  Paul Eggert  <eggert@twinsun.com>
24155
24156         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
24157
24158 2000-11-26  Jim Meyering  <meyering@lucent.com>
24159
24160         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
24161
24162 2000-11-22  Paul Eggert  <eggert@twinsun.com>
24163
24164         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
24165         size of (size_t) -1; it's not portable.
24166
24167 2000-11-17  Jim Meyering  <meyering@lucent.com>
24168
24169         * lib/strstr.c: Update from GNU libc.
24170
24171 2000-11-17  Akim Demaille  <akim@epita.fr>
24172
24173         * lib/obstack.h: Formatting changes.
24174         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
24175         prevent type checking.
24176         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
24177         cast the value to (void *): assigning a `foo *' to a `void *'
24178         variable is valid.
24179         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
24180
24181 2000-11-16  Jim Meyering  <meyering@lucent.com>
24182
24183         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
24184
24185 2000-11-11  Jim Meyering  <meyering@lucent.com>
24186
24187         * lib/error.c: Add a couple #includes, merging from GNU libc version.
24188
24189 2000-11-10  Jim Meyering  <meyering@lucent.com>
24190
24191         * lib/obstack.h: Update from GNU libc.
24192         * lib/obstack.c: Likewise.
24193
24194 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
24195
24196         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
24197
24198 2000-11-06  Paul Eggert  <eggert@twinsun.com>
24199
24200         * lib/getusershell.c (setusershell): Use rewind rather than
24201         fseek/fseeko, to avoid configuration hassles with fseeko.
24202         Don't bother opening SHELLS_FILE if shellstream is NULL;
24203         it's not necessary.
24204
24205 2000-11-05  Jim Meyering  <meyering@lucent.com>
24206
24207         * lib/makepath.h (make_dir): Declare.
24208         * lib/makepath.c (make_dir): Remove `static' attribute.
24209         Tweak a comment.
24210
24211 2000-11-04  Jim Meyering  <meyering@lucent.com>
24212
24213         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
24214
24215 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
24216
24217         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
24218         last one in a bucket, advance to the next bucket.
24219
24220 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
24221
24222         * lib/fnmatch.c: Do not comment out all the code if we are using
24223         the GNU C library, because in some cases we are replacing buggy
24224         code in the GNU C library itself.
24225
24226 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
24227
24228         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
24229         (regex_compile): Catch bogus \(\1\).
24230
24231 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24232
24233         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
24234         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
24235         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
24236
24237 2000-10-30  Paul Eggert  <eggert@twinsun.com>
24238
24239         * lib/error.h, getline.h, modechange.h:
24240         Remove "2000" from Copyright line, as the file hasn't been
24241         changed this year other than in the copyright notice.
24242
24243         * lib/xalloc.h: Add "2000" to Copyright line, as this file
24244         was changed this year.
24245
24246 2000-10-29  Jim Meyering  <meyering@lucent.com>
24247
24248         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
24249         renaming.
24250         * m4/ls-mntd-fs.m4: Likewise
24251
24252 2000-10-29  Jim Meyering  <meyering@lucent.com>
24253
24254         * lib/xstat.in: Fix grammar in comment.
24255
24256 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
24257
24258         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
24259         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
24260         doesn't define __restrict_arr.
24261
24262 2000-10-28  Jim Meyering  <meyering@lucent.com>
24263
24264         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
24265         (jm_PREREQ_MEMCHR): New function.
24266
24267 2000-10-28  Jim Meyering  <meyering@lucent.com>
24268
24269         * lib/memchr.c: Update from libc.
24270         Adjust for portability:
24271         [HAVE_STDLIB_H]: Include stdlib.h.
24272         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
24273         Undef __memchr, too.
24274         [!weak_alias]: Define __memchr to memchr.
24275
24276         * lib/regex.c: Update from libc.
24277         * lib/regex.h: Likewise.
24278         * lib/getopt1.c: Likewise.
24279         * lib/memcmp.c: Likewise.
24280
24281         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
24282         Avoid using fseek, when possible -- it's broken by design.
24283         Patch by Ulrich Drepper.
24284
24285 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
24286
24287         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
24288         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
24289         Giving in to popular pressure to shut up the compiler with casts.
24290
24291 2000-10-26  Jim Meyering  <meyering@lucent.com>
24292
24293         * lib/strftime.c: Update from libc.
24294
24295 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
24296
24297         * regex.c: More `unsigned char' -> `re_char' changes.
24298         Also change several `int' into `re_wchar_t'.
24299         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
24300         (PUSH_FAILURE_POINTER): Don't cast any more.
24301         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
24302         We want GCC to complain, since this piece of code makes
24303         re_match non-reentrant, which *should* be fixed.
24304         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
24305         (EXTEND_BUFFER): Use RETALLOC.
24306         (SET_LIST_BIT): Don't cast.
24307         (re_wchar_t): New type.
24308         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
24309         that those two functions will always properly return.
24310         (IMMEDIATE_QUIT_CHECK): Cast to void.
24311         (analyse_first): Use recursion rather than an explicit stack.
24312         (re_compile_fastmap): Can't fail anymore.
24313         (re_search_2): Don't check re_compile_fastmap for failure.
24314         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
24315         Now also sets the new value (passed in a new argument).
24316         (re_match_2_internal): Use it.
24317         Also, use a new var `reg' of type size_t when looping through regs
24318         rather than reuse the inappropriate `mcnt'.
24319
24320 2000-10-25  Jim Meyering  <meyering@lucent.com>
24321
24322         * lib/obstack.c: Update from libc.
24323
24324 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
24325
24326         * regex.c (regex_compile): Change the way of handling a range from
24327         a char less than 256 to a char not less than 256.
24328
24329 2000-10-24  Andrew Innes  <andrewi@gnu.org>
24330
24331         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
24332         NT-Emacs only.
24333         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
24334         so that re_search functions only quit when callers expect them to.
24335
24336 2000-10-23  Jim Meyering  <meyering@lucent.com>
24337
24338         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
24339         wrong.  That set_locale call must not have any side effects.
24340         From Paul Eggert.
24341
24342 2000-10-22  Jim Meyering  <meyering@lucent.com>
24343
24344         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
24345         [CYCLIC]: Remove now-unused definition.
24346
24347         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
24348         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
24349         Suggestion from Ulrich Drepper.
24350
24351 2000-10-21  Jim Meyering  <meyering@lucent.com>
24352
24353         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
24354         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
24355         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
24356
24357 2000-10-21  Jim Meyering  <meyering@lucent.com>
24358
24359         * lib/dirname.c (memrchr): Declare if necessary.
24360         (dir_name): Remove the restriction that there be no
24361         trailing slashes.  Now, this code skips past them, effectively
24362         ignoring them.
24363         [TEST_DIRNAME] (main): New unit tests.
24364
24365         * lib/memrchr.c: New file from GNU libc.
24366         Undef __memrchr, too.
24367         [!weak_alias]: Define __memrchr to memrchr.
24368         Guard weak_alias use with `#ifdef weak_alias'.
24369
24370 2000-10-21  Jim Meyering  <meyering@lucent.com>
24371
24372         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
24373         (dir_name): Use dir_name_r.
24374         * lib/dirname.h (dir_name_r): Declare it.
24375
24376 2000-10-17  Jim Meyering  <meyering@lucent.com>
24377
24378         * lib/quote.h (PARAMS): Define and use.
24379         Reported by Akim Demaille.
24380
24381         * lib/getopt.c: Update from libc.
24382
24383 2000-10-16  Jim Meyering  <meyering@lucent.com>
24384
24385         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
24386         setlocale.
24387         From Jan Fedak.
24388
24389 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
24390
24391         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
24392
24393 2000-09-25  Jim Meyering  <meyering@lucent.com>
24394
24395         * lib/md5.h (rol): Define (from GnuPG).
24396
24397         * lib/sha.c: Give credit (GnuPG) where due.
24398         (M): Use rol rather than open-coding it.
24399         Add a FIXME comment.
24400
24401 2000-09-21  Jim Meyering  <meyering@lucent.com>
24402
24403         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
24404         Reported by Michael Stone.
24405
24406 2000-09-20  Jim Meyering  <meyering@lucent.com>
24407
24408         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
24409         (noinst_HEADERS): Add sha.h.
24410         Based on code from Scott G. Miller and from GnuPG.
24411
24412 2000-09-18  Jim Meyering  <meyering@lucent.com>
24413
24414         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
24415         LIBS. Otherwise, everyone ends up linking with -lelf for some
24416         configurations.
24417         Reported by Mike Stone.
24418
24419 2000-09-15  Jim Meyering  <meyering@lucent.com>
24420
24421         * lib/regex.c: Update from libc.
24422
24423 2000-09-10  Jim Meyering  <meyering@lucent.com>
24424
24425         * lib/getopt.c (_getopt_internal): Update from glibc.
24426
24427 2000-09-09  Jim Meyering  <meyering@lucent.com>
24428
24429         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
24430         think it should be used as a general replacement for isascii.
24431         * lib/fnmatch.c: Likewise.
24432         * lib/mbswidth.c: Likewise
24433         * lib/regex.c: Likewise.
24434
24435         Don't use atoi.
24436         * lib/userspec.c: Include sys/param.h and limits.h.
24437         Include xstrtol.h.
24438         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
24439         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
24440         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
24441         UID, GID.  Check range.
24442
24443 2000-09-06  Jim Meyering  <meyering@lucent.com>
24444
24445         * lib/getopt.c (_getopt_internal): Update from glibc.
24446
24447 2000-08-30  Jim Meyering  <meyering@lucent.com>
24448
24449         * lib/strftime.c: Merge in changes from GNU libc.
24450
24451 2000-08-26  Jim Meyering  <meyering@lucent.com>
24452
24453         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
24454         * m4/fpending.m4: New file.
24455
24456 2000-08-26  Jim Meyering  <meyering@lucent.com>
24457
24458         * lib/closeout.c: Include "__fpending.h".
24459         (close_stdout_status): Return right away if there's nothing to flush.
24460
24461         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
24462         * lib/__fpending.c: New file.
24463         * lib/__fpending.h: New file.
24464
24465 2000-08-20  Jim Meyering  <meyering@lucent.com>
24466
24467         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
24468         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
24469         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
24470
24471 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
24472
24473         Improve fileutils installation on systems where running
24474         programs (like install) can't be unlinked.
24475         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
24476         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
24477
24478 2000-08-07  Paul Eggert  <eggert@twinsun.com>
24479
24480         Standardize on "memory exhausted" instead of "Memory exhausted"
24481         or "virtual memory exhausted".
24482         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
24483         "virtual memory exhausted".
24484         * lib/same.c (same_name): Invoke xalloc_die instead of printing
24485         our own message.
24486         * lib/userspec.c (parse_user_spec): Likewise.
24487         * lib/bumpalloc.h: comment fix
24488         * lib/same.c, userspec.c: Include xalloc.h.
24489
24490         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
24491         not char *const and pointing to a constant array.
24492         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
24493         (xrealloc): Comment fix.
24494
24495         * lib/userspec.c (parse_user_spec):
24496         Don't translate a message until just before returning,
24497         to avoid unnecessary translation.
24498
24499 2000-08-07  Jim Meyering  <meyering@lucent.com>
24500
24501         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
24502         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
24503         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
24504         getgroups.c, gethostname.c, getopt.h, group-member.c,
24505         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
24506         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
24507         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
24508         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
24509         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
24510         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
24511         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
24512         yesno.c: Back out Copyright date changes for each file with no change
24513         this year.  This eases coordination with other programs using the same
24514         source code modules.  From Paul Eggert.
24515
24516 2000-08-06  Paul Eggert  <eggert@twinsun.com>
24517
24518         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
24519         not char, for compatibility with glibc 2.1.3 strftime.c.
24520
24521 2000-08-03  Greg McGary  <greg@mcgary.org>
24522
24523         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
24524         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
24525         (EXTEND_BUFFER): Use them.
24526
24527 2000-08-01  Jim Meyering  <meyering@lucent.com>
24528
24529         * lib/dirname.c (ISSLASH): Define.
24530         (BACKSLASH_IS_PATH_SEPARATOR): Define.
24531         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
24532         both `\' and `/' may be use as path separators.
24533         Based on a patch from Prashant TR.
24534
24535 2000-07-31  Paul Eggert  <eggert@twinsun.com>
24536
24537         * lib/quotearg.c (quotearg_n_options): Don't make the initial
24538         slot vector a constant, since it might get modified.
24539
24540 2000-07-31  Jim Meyering  <meyering@lucent.com>
24541
24542         * lib/xmalloc.c: Use `virtual memory exhausted', not
24543         `Memory exhausted'.
24544         * lib/obstack.c (print_and_abort): Likewise.
24545
24546 2000-07-30  Paul Eggert  <eggert@twinsun.com>
24547
24548         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
24549         buffer, so that the caller can always quote one small
24550         component of a "memory exhausted" message in slot 0.
24551         From a suggestion by Jim Meyering.
24552
24553 2000-07-30  Jim Meyering  <meyering@lucent.com>
24554
24555         * lib/makepath.c (make_path): Quote the other instance, too.
24556
24557         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
24558         (STATIC_BUF_SIZE): Define.
24559         (quotearg_n_options): Use only statically allocated storage when
24560         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
24561         than STATIC_BUF_SIZE.
24562
24563 2000-07-29  Jim Meyering  <meyering@lucent.com>
24564
24565         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
24566         * lib/dirname.c (dir_name): Likewise.
24567
24568         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
24569         `/'.
24570
24571         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
24572         (dir_name): Assert that there are no trailing slashes.
24573
24574 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
24575
24576         * lib/mbswidth.h (mbswidth): Add a flags argument.
24577         (mbswidth): New declaration.
24578         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
24579         * lib/mbswidth.c (mbswidth): Add a flags argument.
24580         (mbsnwidth): New function.
24581
24582 2000-07-24  Jim Meyering  <meyering@lucent.com>
24583
24584         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
24585
24586 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24587
24588         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
24589
24590 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24591
24592         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
24593         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
24594         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
24595         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
24596         invoke multibyte primitives.
24597
24598 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24599
24600         * lib/quotearg.c:
24601         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
24602         so that mbstate_t is always defined.
24603
24604         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
24605         be 1 in at least one GCC installation, and this configuration
24606         error is likely to be common.  Ignoring MB_LEN_MAX hurts
24607         performance on hosts that have mbrtowc but have only unibyte
24608         locales, but I assume these hosts are rare.
24609
24610 2000-07-23  Paul Eggert  <eggert@twinsun.com>
24611
24612         * lib/mbswidth.c (_XOPEN_SOURCE):
24613         Don't define; this causes problems on Solaris 7.
24614         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
24615
24616 2000-07-23  Jim Meyering  <meyering@lucent.com>
24617
24618         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
24619         too: getgrgid, getpwuid, getuid.
24620
24621 2000-07-23  Jim Meyering  <meyering@lucent.com>
24622
24623         * lib/basename.c (base_name): Add an assertion.
24624
24625 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
24626
24627         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
24628         shadow its mbsinit function.
24629
24630 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24631
24632         * lib/mbswidth.h: New file.
24633         * lib/mbswidth.c: New file.
24634         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
24635         (noinst_HEADERS): Add mbswidth.h.
24636
24637 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
24638
24639         * lib/config.charset: Add support for FreeBSD. Improve support for
24640         HP-UX and IRIX 6.
24641
24642 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
24643
24644         * m4/mbswidth.m4: New file.
24645         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
24646
24647 2000-07-15  Jim Meyering  <meyering@lucent.com>
24648
24649         * lib/makepath.c: Include quote.h.
24650         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
24651         corresponding argument in a `quote (...)' call.
24652         Give better diagnostics.
24653
24654         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
24655         (noinst_HEADERS): Add quote.h.
24656
24657         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
24658         from tar's src/misc.c.
24659         * lib/quote.h: New file.  Prototypes for same.
24660
24661 2000-07-14  Paul Eggert  <eggert@twinsun.com>
24662
24663         From a suggestion by Bruno Haible.
24664         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
24665         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
24666         to decide whether to define the BeOS workaround macro;
24667         this adjusts to the change to AC_MBSTATE_T.
24668
24669 2000-07-14  Jim Meyering  <meyering@lucent.com>
24670
24671         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
24672         jm_AC_TYPE_UINTMAX_T.
24673
24674 2000-07-13  Paul Eggert  <eggert@twinsun.com>
24675
24676         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
24677
24678         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
24679         quotearg_buffer_restyled): Add support for
24680         clocale_quoting_style.  Undo previous change to
24681         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
24682         and "{RIGHT QUOTATION MARK}" msgids.
24683
24684 2000-07-10  Paul Eggert  <eggert@twinsun.com>
24685
24686         From a suggestion by Bruno Haible.
24687         * m4/mbstate_t.m4 (AC_MBSTATE_T):
24688         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
24689         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
24690         and mbstate_t, to a single-part test that simply defines mbstate_t.
24691         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
24692         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
24693
24694 2000-07-10  Jim Meyering  <meyering@lucent.com>
24695
24696         * m4/strerror_r.m4: Mirror the correction made in autoconf.
24697
24698         * m4/gnu-source.m4: Output to confdefs.h directly.
24699         Suggestion from Akim Demaille.
24700
24701 2000-07-09  Paul Eggert  <eggert@twinsun.com>
24702
24703         The old behavior of quoting `like this' doesn't look good with
24704         newer, ISO-style fonts.  See:
24705         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
24706
24707         Instead, quote "like this" by default.  Let the translator
24708         tailor the locale-specific quoting behavior by providing
24709         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
24710
24711         * lib/quotearg.c (N_): New macro.
24712         (gettext_default): New function.
24713         (quotearg_buffer_restyled): Use
24714         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
24715         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
24716
24717 2000-07-09  Jim Meyering  <meyering@lucent.com>
24718
24719         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
24720         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
24721
24722         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
24723         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
24724
24725 2000-07-09  Jim Meyering  <meyering@lucent.com>
24726
24727         * lib/Most files: Update copyright dates to include 2000.
24728
24729 2000-07-08  Jim Meyering  <meyering@lucent.com>
24730
24731         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
24732         if not defined.
24733         (xgethostname): Remove now-unnecessary #ifdef.
24734         Move declaration of `err' into loop where it's used.
24735
24736 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24737         and Bruno Haible  <haible@clisp.cons.org>
24738
24739         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
24740         only if the test for an object-type mbstate_t fails.  This
24741         prevents us from mistakenly reporting that mbstate_t is a
24742         system object type after we "#define mbstate_t int" to work
24743         around its lack.
24744
24745 2000-07-05  Paul Eggert  <eggert@twinsun.com>
24746         and Bruno Haible  <haible@clisp.cons.org>
24747
24748         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
24749
24750 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24751
24752         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
24753         to strerror_r.
24754         Include <ctype.h> for use of isalpha.
24755
24756 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24757
24758         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
24759         by allocating a larger buffer. Test the gethostname return value for
24760         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
24761         returns an error and ENAMETOOLONG isn't defined.
24762
24763 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
24764
24765         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
24766         dimension.
24767
24768 2000-07-04  Jim Meyering  <meyering@lucent.com>
24769
24770         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
24771         of the deprecated AC_CHECKING.
24772
24773 2000-07-04  Jim Meyering  <meyering@lucent.com>
24774
24775         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
24776         Reported by Bruno Haible.
24777
24778 2000-07-04  Jim Meyering  <meyering@lucent.com>
24779
24780         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
24781         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
24782         lacks mbrtowc.
24783
24784 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24785
24786         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
24787         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
24788
24789 2000-07-03  Paul Eggert  <eggert@twinsun.com>
24790         and Bruno Haible  <haible@clisp.cons.org>
24791
24792         * lib/quotearg.c (mbrtowc):
24793         Assign to *pwc, and return 1 only if result is nonzero.
24794         (iswprint): Use ISPRINT when substituting our own mbrtowc.
24795
24796 2000-07-03  Jim Meyering  <meyering@lucent.com>
24797
24798         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
24799
24800 2000-07-03  Jim Meyering  <meyering@lucent.com>
24801
24802         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
24803         This is necessary to get a definition of e.g., UTMP_FILE on
24804         HP-UX 10.20.
24805         From Bob Proulx.
24806
24807 2000-07-02  Jim Meyering  <meyering@lucent.com>
24808
24809         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
24810
24811         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
24812         AC_LIBOBJ(function_name).
24813         * m4/chown.m4: Likewise.
24814         * m4/fnmatch.m4: Likewise.
24815         * m4/ftruncate.m4: Likewise.
24816         * m4/getgroups.m4: Likewise.
24817         * m4/getline.m4: Likewise.
24818         * m4/group-member.m4: Likewise.
24819         * m4/jm-macros.m4: Likewise.
24820         * m4/lstat.m4: Likewise.
24821         * m4/malloc.m4: Likewise.
24822         * m4/memcmp.m4: Likewise.
24823         * m4/nanosleep.m4: Likewise.
24824         * m4/putenv.m4: Likewise.
24825         * m4/realloc.m4: Likewise.
24826         * m4/regex.m4: Likewise.
24827         * m4/stat.m4: Likewise.
24828         * m4/strftime.m4: Likewise.
24829
24830 2000-07-02  Jim Meyering  <meyering@lucent.com>
24831
24832         * lib/quotearg.c (mbstate_t): Don't define here.
24833
24834 2000-07-02  Jim Meyering  <meyering@lucent.com>
24835
24836         * lib/nanosleep.c (SIGCONT): Define if not already defined.
24837
24838 2000-07-01  Jim Meyering  <meyering@lucent.com>
24839
24840         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
24841
24842 2000-07-01  Jim Meyering  <meyering@lucent.com>
24843
24844         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
24845         problem.
24846
24847 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24848
24849         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
24850         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
24851
24852 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
24853
24854         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
24855         per change in ../m4/ls-mntd-fs.m4.
24856         (read_filesystem_list): Ignore symbolic links.
24857
24858 2000-06-29  Jim Meyering  <meyering@lucent.com>
24859
24860         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
24861         for declaration of strcmp.
24862
24863         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
24864
24865         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
24866         Avoid warning by casting result to `char *' to remove `const'.
24867
24868 2000-06-28  Jim Meyering  <meyering@lucent.com>
24869
24870         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
24871         included by quotearg.c, for which we perform this test.  From
24872         Bruno Haible.
24873
24874 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24875
24876         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
24877         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
24878         <utmpx.h> exists, put readutmp.o into LIBOBJS.
24879
24880 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
24881
24882         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
24883
24884 2000-06-26  Paul Eggert  <eggert@twinsun.com>
24885
24886         savedir now sets errno on failure and invokes xmalloc to get memory.
24887         Fix a couple of other minor bugs while we're at it.
24888
24889         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
24890         (NAMLEN): Remove macro.
24891         (malloc, realloc): Remove decls.
24892         (stpcpy): Likewise.
24893         ("xalloc.h"): Include.
24894         (NAME_SIZE_DEFAULT): New macro.
24895         (savedir): Use xmalloc / xrealloc to allocate memory.
24896         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
24897         Skip "" directory entries.
24898         Use strlen to calculate directory entry length, since the old method
24899         is rarely used these days and isn't worth supporting.
24900         Don't use a pointer after freeing it.
24901         Check for integer overflow when calculating allocation size.
24902         Use memcpy to copy entries, instead of stpcpy.
24903         Set errno properly when returning NULL.
24904         Check for readdir error.
24905
24906 2000-06-26  Jim Meyering  <meyering@lucent.com>
24907
24908         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
24909
24910 2000-06-25  Jim Meyering  <meyering@lucent.com>
24911
24912         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
24913         Linux header bug when _XOPEN_SOURCE is defined to 500.
24914
24915 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24916
24917         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
24918         deficiency.
24919
24920 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
24921
24922         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
24923         Include xalloc.h.
24924         Don't include <stdlib.h>.  Don't declare malloc, realloc.
24925
24926 2000-06-24  Jim Meyering  <meyering@lucent.com>
24927
24928         * m4/strerror_r.m4: Revive this file -- to try out an experimental
24929         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
24930         for which strerror does return char*, but which lacks a conveniently
24931         accessible declaration of the function.  If the compile-test says
24932         strerror_r doesn't work, then resort to a `run'-test that works on
24933         BeOS and segfaults on DEC Unix.
24934
24935 2000-06-24  Jim Meyering  <meyering@lucent.com>
24936
24937         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
24938
24939 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24940
24941         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
24942         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
24943
24944 2000-06-23  Paul Eggert  <eggert@twinsun.com>
24945
24946         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
24947         (mbrtowc, mbstate_t): Define substitutes if
24948         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
24949         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
24950         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
24951
24952 2000-06-23  Jim Meyering  <meyering@lucent.com>
24953
24954         * m4/afs.m4: Add missing AC_MSG_RESULT.
24955         Reported by Bruno Haible.
24956
24957         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
24958         Suggestion from Bruno Haible.
24959
24960 2000-06-23  Jim Meyering  <meyering@lucent.com>
24961
24962         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
24963
24964 2000-06-21  Jim Meyering  <meyering@lucent.com>
24965
24966         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
24967
24968 2000-06-21  Jim Meyering  <meyering@lucent.com>
24969
24970         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
24971         (noinst_HEADERS): Add getstr.h.
24972
24973         * lib/getline.c (getstr): Move into a separate file.
24974         * lib/getstr.c (getstr): New file, extracted from getline.c, with
24975         the following changes: new parameter, delim2; both delim[12]
24976         parameters have type `int', not `char'.  The latter would lose
24977         with 8-bit delimiters.
24978         * lib/getstr.h: New file.
24979
24980 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24981
24982         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
24983         than 1024, return a memory chunk of least possible size, instead
24984         of size PATH_MAX + 2. In the loop, increment the size proportionally.
24985         Use free/xmalloc instead of xrealloc to avoid copying for very long
24986         paths.
24987
24988 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24989
24990         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
24991         the empty string.
24992
24993 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
24994
24995         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
24996         address, not strdup.  Include <stdlib.h> and don't declare free().
24997
24998 2000-06-19  Jim Meyering  <meyering@lucent.com>
24999
25000         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
25001
25002 2000-06-18  Jim Meyering  <meyering@lucent.com>
25003
25004         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
25005
25006         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
25007         `checking whether...' message to be consistent with that of the
25008         lstat test.
25009
25010 2000-06-18  Jim Meyering  <meyering@lucent.com>
25011
25012         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
25013         Besides, these days every porting target provides a mkdir function.
25014
25015         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
25016         needed. (this snippet comes from src/system.h).
25017
25018 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
25019
25020         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
25021
25022 2000-06-15  Paul Eggert  <eggert@twinsun.com>
25023
25024         * lib/human.c (adjust_value): New function.
25025         (human_readable_inexact): Apply rounding style even when
25026         printing approximate values.
25027
25028 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25029
25030         * lib/human.c (human_readable_inexact): Allow an input block
25031         size that is not a multiple of the output block size, and vice versa.
25032         Reported by Piergiorgio Sartor.
25033
25034 2000-06-14  Paul Eggert  <eggert@twinsun.com>
25035
25036         * lib/getdate.y (get_date): Apply relative times after time
25037         zone indicator, not before.  Reported by Todd A. Jacobs.
25038
25039 2000-06-13  Jim Meyering  <meyering@lucent.com>
25040
25041         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
25042
25043         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
25044
25045 2000-06-12  Paul Eggert  <eggert@twinsun.com>
25046
25047         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
25048
25049 2000-06-12  Jim Meyering  <meyering@lucent.com>
25050
25051         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
25052         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
25053         optional argument.
25054         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
25055         the optional argument, `lib'.
25056
25057 2000-06-08  Jim Meyering  <meyering@lucent.com>
25058
25059         * m4/largefile.m4: Remove file (now that it's part of autoconf).
25060
25061 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25062
25063         Rewrite largefile configuration so that we don't need to run
25064         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
25065         AC_CANONICAL_HOST in configure.in -- jmm]
25066
25067         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
25068         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
25069         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
25070         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
25071         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
25072         All uses changed.
25073         Instead of inspecting the output of getconf, try to compile the
25074         test program without and with the macro definition.
25075         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
25076         for getconf.  Instead, check for the needed flags by compiling
25077         test programs.
25078
25079 2000-06-04  Paul Eggert  <eggert@twinsun.com>
25080
25081         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
25082
25083 2000-06-04  Jim Meyering  <meyering@lucent.com>
25084
25085         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
25086         SunOS 4.1.4 for which gid_t is an unsigned type.
25087
25088 2000-06-03  Jim Meyering  <meyering@lucent.com>
25089
25090         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
25091         now that autoconf requires that.
25092
25093         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
25094         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
25095         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
25096
25097 2000-06-03  Jim Meyering  <meyering@lucent.com>
25098
25099         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
25100
25101 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25102
25103         * m4/glibc21.m4: New file.
25104         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
25105
25106 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
25107
25108         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
25109         newer, don't install charset.alias.
25110         * lib/config.charset: Change the Linux/glibc rules so they become empty
25111         on glibc-2.1 or newer.
25112
25113 2000-06-02  Jim Meyering  <meyering@lucent.com>
25114
25115         * lib/mountlist.c: Back out last change.  Instead, do this...
25116         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
25117         me_dummy member using the same `ignore'-testing code.
25118         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
25119         fs_type strings.
25120         From Mark D. Roth.
25121
25122 2000-05-29  Jim Meyering  <meyering@lucent.com>
25123
25124         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
25125         mounts with the `ignore' attribute.  Based on a patch from
25126         Mark D. Roth.
25127
25128 2000-05-28  Jim Meyering  <meyering@lucent.com>
25129
25130         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
25131         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25132         * m4/stat.m4: Likewise.
25133         * m4/lstat.m4: Likewise.
25134         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
25135
25136         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
25137         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
25138
25139 2000-05-26  Jim Meyering  <meyering@lucent.com>
25140
25141         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
25142
25143 2000-05-24  Jim Meyering  <meyering@lucent.com>
25144
25145         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
25146         autoconf requires that.
25147         * m4/lib-check.m4: Likewise.
25148         * m4/jm-macros.m4: Likewise.
25149         * m4/strftime.m4: Likewise.
25150
25151         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
25152         AC_CHECK_DECLS, now that autoconf requires that.
25153
25154 2000-05-22  Jim Meyering  <meyering@lucent.com>
25155
25156         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25157         * m4/lstat.m4: Likewise.
25158
25159 2000-05-22  Jim Meyering  <meyering@lucent.com>
25160
25161         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
25162
25163 2000-05-20  Jim Meyering  <meyering@lucent.com>
25164
25165         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
25166         (jm_PREREQ): Use it.
25167
25168 2000-05-18  Jim Meyering  <meyering@lucent.com>
25169
25170         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
25171         back, too, since it may have been modified by allocate_entry.
25172         (hash_delete): Rewrite to use neither the assignment operator
25173         nor the comma operator in an if-expression.
25174
25175 2000-05-15  Paul Eggert  <eggert@twinsun.com>
25176
25177         * lib/closeout.c:
25178         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
25179         Remove; no longer needed.
25180         "quotearg.h": Add include.
25181         (file_name): Do not bother to explicitly initialize to NULL; it's less
25182         efficient on some hosts.
25183         (close_stdout_status): Remove test as to whether stdout was already
25184         closed; it breaks for the case "echo x | sort >&-".
25185         Quote file name colons.
25186         Do not assume that _("write error") lacks format strings.
25187
25188 2000-05-15  Jim Meyering  <meyering@lucent.com>
25189
25190         * lib/version-etc.c (version_etc_copyright): Update the copyright
25191         string used in all --version output.
25192
25193 2000-05-14  Jim Meyering  <meyering@lucent.com>
25194
25195         * lib/closeout.c (close_stdout_set_file_name): New function.
25196         (close_stdout_status): Use new file-scoped global.
25197         Return right away if fstat says the stdout file descriptor is invalid.
25198         * lib/closeout.h (close_stdout_set_file_name): Declare.
25199
25200 2000-05-10  Jim Meyering  <meyering@lucent.com>
25201
25202         * lib/closeout.c [default_exit_status]: New file-scoped variable.
25203         (close_stdout_set_status): New function.
25204         * lib/closeout.h (close_stdout_set_status): Declare.
25205
25206 2000-05-09  Jim Meyering  <meyering@lucent.com>
25207
25208         * m4/gettext.m4: Rename this...
25209         * m4/libintl.m4: ...to this.
25210
25211 2000-05-08  Jim Meyering  <meyering@lucent.com>
25212
25213         * lib/long-options.c: Don't include closeout.h.
25214         (parse_long_options): Don't call close_stdout for --version.
25215
25216 2000-05-06  Paul Eggert  <eggert@twinsun.com>
25217
25218         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
25219         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
25220         2.1.3 bug.  This avoids a clash when files like regex.c define
25221         _GNU_SOURCE.
25222
25223 2000-05-06  Jim Meyering  <meyering@lucent.com>
25224
25225         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
25226         (AC_REPLACE_FUNCS): Add strnlen.
25227
25228         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
25229         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
25230
25231         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
25232         AC_SEARCH_LIBS call for nanosleep.
25233         (LIB_NANOSLEEP): Set and AC_SUBST.
25234
25235 2000-05-06  Jim Meyering  <meyering@lucent.com>
25236
25237         * lib/strnlen.c: Undefine __strnlen and strnlen.
25238         [!weak_alias]: Define __strnlen to strnlen.
25239
25240         * lib/atexit.c: New file, from libiberty.
25241
25242 2000-05-06  Jim Meyering  <meyering@lucent.com>
25243
25244         * lib/closeout.c (close_stdout_status): Also check for errors on the
25245         stderr stream.
25246
25247 2000-05-05  Jim Meyering  <meyering@lucent.com>
25248
25249         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
25250         AC_SEARCH_LIBS call for clock_gettime.
25251         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
25252
25253         * m4/search-libs.m4: Update from autoconf.
25254
25255         su doesn't work on Solaris 2.6.
25256         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
25257         <shadow.h>.  Reported by Dragos Harabor.
25258
25259 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
25260
25261         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
25262         memcpy instead of xmalloc, xrealloc, path_concat.
25263         (locale_charset): Treat empty environment variables as absent.
25264         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
25265
25266 2000-05-04  Jim Meyering  <meyering@lucent.com>
25267
25268         * lib/getopt.c: Update from glibc.
25269         * lib/obstack.c: Likewise.
25270         * lib/obstack.h: Likewise.
25271         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
25272         file
25273
25274         * lib/regex.h: Likewise.
25275         * lib/strndup.c: Likewise.
25276         * lib/strnlen.c: New file, from glibc.
25277
25278 2000-05-03  Jim Meyering  <meyering@lucent.com>
25279
25280         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
25281
25282 2000-05-02  Paul Eggert  <eggert@twinsun.com>
25283
25284         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
25285         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
25286         compile-time test, rather than inspecting host and OS, to
25287         decide whether to define _LARGEFILE_SOURCE.
25288
25289 2000-05-01  Jim Meyering  <meyering@lucent.com>
25290
25291         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
25292
25293         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
25294         Based on a patch from Bruno Haible.
25295
25296 2000-05-01  Jim Meyering  <meyering@lucent.com>
25297
25298         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
25299
25300 2000-04-29  Jim Meyering  <meyering@lucent.com>
25301
25302         * lib/path-concat.c: Declare strdup only if it's not defined.
25303         * lib/canon-host.c: Likewise.
25304
25305 2000-04-28  Jim Meyering  <meyering@lucent.com>
25306
25307         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
25308         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
25309         is included first, then limits.h is included by locale.h by libintl.h.
25310         From John David Anglin.
25311
25312 2000-04-25  Jim Meyering  <meyering@lucent.com>
25313
25314         * lib/makepath.c (S_IRWXUGO): Define.
25315         (make_path): Always perform explicit chmod if MODE specifies any
25316         of the `special' permission bits.  Prompted by a bug report against
25317         install from Mate Wierdl and Joost van Baal.
25318
25319 2000-04-18  Jim Meyering  <meyering@lucent.com>
25320
25321         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
25322         (jm_PREREQ): Use it.
25323
25324 2000-04-18  Jim Meyering  <meyering@lucent.com>
25325
25326         * lib/README: New file.
25327
25328         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
25329         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
25330
25331 2000-04-17  Jim Meyering  <meyering@lucent.com>
25332
25333         Get it right :-)
25334         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
25335         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
25336         Suggestion from Akim Demaille.
25337
25338 2000-04-17  Jim Meyering  <meyering@lucent.com>
25339
25340         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
25341         the definition of it to rpl_strftime also defined-away the system's
25342         declaration.
25343
25344 2000-04-15  Jim Meyering  <meyering@lucent.com>
25345
25346         Use `C' to denote so-called `contiguous' files, the same way
25347         that tar does.
25348         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
25349         (ftypelet): Use S_ISCTG.
25350         From Michael Deutschmann.
25351
25352 2000-04-14  Jim Meyering  <meyering@lucent.com>
25353
25354         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
25355         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
25356         clobbered.
25357
25358 2000-04-14  Jim Meyering  <meyering@lucent.com>
25359
25360         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
25361
25362 2000-04-13  Jim Meyering  <meyering@lucent.com>
25363
25364         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
25365         AH_VERBATIM to insert required #ifndef into config.h.in.
25366         Suggestion from Akim Demaille.
25367
25368 2000-04-12  Jim Meyering  <meyering@lucent.com>
25369
25370         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
25371         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
25372         Christian Krackowizer.
25373
25374         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
25375         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
25376         (AC_SYS_LARGEFILE): Require.
25377         (AM_C_PROTOTYPES): Require.
25378
25379 2000-04-08  Jim Meyering  <meyering@lucent.com>
25380
25381         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
25382         names don't conflict.  Reported by Eli Zaretskii.
25383
25384 2000-04-07  Jim Meyering  <meyering@lucent.com>
25385
25386         * lib/putenv.c: Move inclusion of errno.h so it follows that of
25387         sys/types.h, to work around system header problems on AIX 3.2.5.
25388         From Bruno Haible.
25389
25390 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
25391
25392         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
25393         bug.  Deal with the different error behavior of Irix iconv.
25394
25395 2000-04-05  Paul Eggert  <eggert@twinsun.com>
25396
25397         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
25398         IRIX if the installer said otherwise.
25399
25400 2000-04-05  Jim Meyering  <meyering@lucent.com>
25401
25402         Portability tweaks required for ultrix4.3.
25403         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
25404         (jm_CHECK_DECLS): Add getutent to the list of functions.
25405         (_jm_DECL_HEADERS): Add utmpx.h.
25406         From John David Anglin.
25407
25408         * m4/strftime.m4: Back out the 2000-04-02 change.
25409         Instead of that change, simply undefine putenv in the test program.
25410
25411 2000-04-05  Jim Meyering  <meyering@lucent.com>
25412
25413         Portability tweaks required for ultrix4.3.
25414         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
25415         getutent.
25416         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
25417         * lib/canon-host.c: Declare strdup.
25418         * lib/path-concat.c: Likewise.
25419         From John David Anglin.
25420
25421 2000-04-04  Jim Meyering  <meyering@lucent.com>
25422
25423         Be more DOS 8.3-friendly.
25424         * lib/ref-add.sin: Renamed from ref-add.sed.in.
25425         * lib/ref-del.sin: Renamed from ref-del.sed.in.
25426         * lib/Makefile.am: Reflect renaming.
25427         Reported by Eli Zaretskii.
25428
25429         Use a temporary file name that won't clash with `charset.alias'
25430         in the DOS 8.3 name space.
25431         * lib/Makefile.am (charset_tmp): Define.
25432         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
25433         (uninstall-local): Likewise.
25434         Reported by Eli Zaretskii.
25435
25436 2000-04-03  Jim Meyering  <meyering@lucent.com>
25437
25438         * m4/gettext.m4: Fix typo in comment.
25439
25440         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
25441         textutils/configure.in).  Suggestion from Paul Eggert.
25442         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
25443
25444 2000-04-02  Paul Eggert  <eggert@twinsun.com>
25445
25446         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
25447         variable in the shell rather than using putenv, which isn't
25448         portable.  This avoids the configure-time inter-test dependency
25449         on the potentially-renamed putenv function.
25450
25451 2000-03-30  Paul Eggert  <eggert@twinsun.com>
25452
25453         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
25454         before checking struct stat.st_blksize, so that
25455         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
25456
25457 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25458
25459         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
25460         since strftime.c uses HAVE_STRFTIME to decide whether to use
25461         the underlying strftime.
25462
25463 2000-03-29  Paul Eggert  <eggert@twinsun.com>
25464
25465         * lib/time/strftime.c (my_strftime): Make sure we call the system
25466         strftime, not ourselves, when invoking the underlying strftime.
25467
25468 2000-03-24  Jim Meyering  <meyering@lucent.com>
25469
25470         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
25471         (charset_alias): Define.
25472         (install-exec-local): Factor out common code.
25473         (uninstall-local): Split lines longer than 80.
25474         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
25475         (SUFFIXES): Define.
25476         (.sed.in.sed): New rule.  Don't redirect directly to $@.
25477         (CLEANFILES): Add ref-add.sed and ref-del.sed.
25478
25479 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
25480
25481         * lib/config.charset: Output a line containing "Packages using this
25482         file".
25483         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
25484         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
25485         ref-del.sed): New rules.
25486
25487 2000-03-17  Jim Meyering  <meyering@lucent.com>
25488
25489         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
25490         Otherwise, include <strings.h>
25491
25492 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
25493
25494         * lib/unicodeio.c (utf8_wctomb): New function.
25495         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
25496         format instead of in UCS-4 with platform dependent endianness.
25497
25498 2000-03-10  Jim Meyering  <meyering@lucent.com>
25499
25500         * m4/lib-check.m4: Look for getspnam in -lgen, too.
25501         From Marco Franzen.
25502
25503 2000-03-07  Paul Eggert  <eggert@twinsun.com>
25504
25505         * lib/savedir.c (savedir): Work even if directory size is
25506         negative; this can happen with some screwy NFS configurations.
25507
25508 2000-03-06  Jim Meyering  <meyering@lucent.com>
25509
25510         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
25511         if it's NULL (because we ran out of memory).  From Bruno Haible.
25512
25513 2000-03-05  Jim Meyering  <meyering@lucent.com>
25514
25515         * lib/localcharset.c ("path-concat.h"): Include.
25516         (get_charset_aliases): Use path_concat instead of ANSI string
25517         concatenation.
25518
25519         * lib/unicodeio.h (PARAMS): Define.
25520         Use it to guard prototype.
25521
25522 2000-03-04  Jim Meyering  <meyering@lucent.com>
25523
25524         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
25525         for lib/localcharset.c.
25526
25527 2000-03-04  Jim Meyering  <meyering@lucent.com>
25528
25529         * lib/Makefile.am (install-exec-local): Create $(libdir) before
25530         installing into it.
25531         (uninstall-local): Uncomment this rule so `make distcheck' works
25532         once again.
25533
25534         * lib/unicodeio.c (<errno.h>): Include it.
25535         (errno): Declare if not defined.
25536
25537         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
25538
25539         * lib/config.charset: New version, incorporating remarks from a linux
25540         i18n mailing list.  From Bruno Haible.
25541
25542 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
25543
25544         * m4/codeset.m4: New file.
25545         * m4/iconv.m4: New file.
25546         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
25547
25548 2000-03-03  Jim Meyering  <meyering@lucent.com>
25549
25550         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
25551
25552 2000-03-02  Jim Meyering  <meyering@lucent.com>
25553
25554         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
25555         the messages come out on separate lines.
25556
25557         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
25558         rather than jm_CHECK_DECLARATIONS.
25559         * m4/decl.m4: Remove now-unused file.
25560
25561         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
25562         geteuid.
25563
25564 2000-03-02  Jim Meyering  <meyering@lucent.com>
25565
25566         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
25567
25568 2000-03-01  Jim Meyering  <meyering@lucent.com>
25569
25570         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
25571         * lib/unicodeio.c: Likewise.
25572
25573 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
25574
25575         * lib/config.charset: New file.
25576         * lib/localcharset.c: New file.
25577         * lib/unicodeio.h, lib/unicodeio.c: New files.
25578         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
25579         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
25580         (noinst_HEADERS): Add unicodeio.h.
25581         (all-local, install-exec-local, charset.alias): New targets.
25582
25583 2000-02-28  Paul Eggert  <eggert@twinsun.com>
25584
25585         * lib/quotearg.c (ALERT_CHAR): New macro.
25586         (quotearg_buffer_restyled): Use it.
25587
25588 2000-02-27  Jim Meyering  <meyering@lucent.com>
25589
25590         * m4/check-decl.m4: Add getenv to the list.
25591
25592 2000-02-27  Jim Meyering  <meyering@lucent.com>
25593
25594         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
25595         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
25596
25597         * lib/backupfile.c: Guard inclusion of stdlib.h with
25598         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
25599         Declare malloc if needed.
25600
25601         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
25602         `#ifndef HAVE_DECL..'
25603         now that autoconf always defines the HAVE_DECL_ symbols.
25604         * lib/human.c: Likewise.
25605         * lib/same.c: Likewise.
25606         * lib/strtoumax.c: Likewise.
25607
25608         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
25609         declaration check was not run.
25610         * lib/hash.c: Likewise.
25611         * lib/human.c: Likewise.
25612         * lib/same.c: Likewise.
25613         * lib/strtoumax.c: Likewise.
25614
25615         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
25616         `.', then first look up the entire `.'-containing string as a login
25617         name.
25618
25619 2000-02-23  Jim Meyering  <meyering@lucent.com>
25620
25621         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
25622         in place of my hack.
25623
25624 2000-02-18  Paul Eggert  <eggert@twinsun.com>
25625
25626         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
25627         (textint): New typedef.
25628         (parser_control): Member year changed from int to textint.
25629         All uses changed.
25630         (YYSTYPE): Removed; replaced by %union with int and textint members.
25631         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
25632         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
25633         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
25634         (tSNUMBER, tUNUMBER): Now of type <textintval>.
25635         (date, number, to_year): Use width of number in digits, not its value,
25636         to determine whether it's a 2-digit year, or a 2-digit time.
25637         (yylex): Store number of digits of numeric tokens.
25638         Reported by John Kendall.
25639
25640         (parser_control): Changed from struct parser_control to typedef (for
25641         consistency).  All uses changed.
25642
25643         (tID): Removed; not used.
25644         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
25645
25646 2000-02-14  Paul Eggert  <eggert@twinsun.com>
25647
25648         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
25649         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
25650
25651 2000-02-12  Jim Meyering  <meyering@lucent.com>
25652
25653         * lib/userspec.c (ISDIGIT): Define it.
25654         (isdigit): Remove definition.
25655         (is_number): Use ISDIGIT, not isdigit.
25656         <libintl.h>: Include.
25657         (_ and N_): Define.
25658         (parse_user_spec): Mark translatable strings.
25659
25660 2000-02-10  Jim Meyering  <meyering@lucent.com>
25661
25662         With these changes, nanosleep.[ch] are finally enough like the other
25663         lib/* replacement files to compile on a few more losing systems.
25664
25665         * lib/nanosleep.h: Don't include config.h.
25666         Remove prototype from declaration of nanosleep.
25667         (PARAMS): Remove now-unneeded definition.
25668         * lib/nanosleep.c: #undef nanosleep.
25669         (rpl_nanosleep): Rename from nanosleep.
25670
25671 2000-02-10  Jim Meyering  <meyering@lucent.com>
25672
25673         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
25674         gnu_nanosleep to rpl_nanosleep.
25675
25676 2000-02-09  Jim Meyering  <meyering@lucent.com>
25677
25678         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
25679         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
25680
25681 2000-02-08  Akim Demaille  <akim@epita.fr>
25682
25683         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
25684         `[' and `]' and remove uses of `changequote'.
25685         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
25686         (AC_SYS_LARGEFILE): Likewise.
25687         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
25688         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
25689         of changequote.
25690         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
25691         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
25692         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
25693         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
25694
25695 2000-02-05  Jim Meyering  <meyering@lucent.com>
25696
25697         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
25698         Remove explicit use of AC_HEADER_TIME.  It is required by
25699         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
25700         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
25701         in autoconf whereby the expansion of the latter ended up preceding
25702         the expansion of its prerequisite, AC_HEADER_TIME.
25703         Reported by Volker Borchert.
25704
25705 2000-02-03  Jim Meyering  <meyering@lucent.com>
25706
25707         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
25708
25709 2000-02-03  Jim Meyering  <meyering@lucent.com>
25710
25711         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
25712         rather than with `#if HAVE_UTMPNAME'.
25713
25714 2000-02-02  Jim Meyering  <meyering@lucent.com>
25715
25716         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
25717         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
25718         Reported by Eli Zaretskii.
25719
25720 2000-02-01  Jim Meyering  <meyering@lucent.com>
25721
25722         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
25723
25724 2000-01-31  Jim Meyering  <meyering@lucent.com>
25725
25726         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
25727         functions.  Add the time.h and sys/time.h headers along with the
25728         AC_REQUIRE'ment of AC_HEADER_TIME.
25729
25730 2000-01-31  Jim Meyering  <meyering@lucent.com>
25731
25732         * lib/nanosleep.h (nanosleep): Guard declaration with
25733         `#if ! HAVE_DECL_NANOSLEEP'.
25734         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
25735         the declaration in that vendor's sys/timers.h.
25736         Reported by Christian Krackowizer.
25737
25738         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
25739         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
25740         (ISPRINT): Likewise.
25741         Reported by Tom Tromey.
25742
25743 2000-01-30  Jim Meyering  <meyering@lucent.com>
25744
25745         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
25746
25747         * m4/prereq.m4 (utmp_includes): Define.
25748         Check for ut_user and ut_name members in both struct utmpx
25749         and struct utmp.
25750
25751 2000-01-30  Jim Meyering  <meyering@lucent.com>
25752
25753         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
25754         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
25755         header files where only utmpx.ut_user is declared.
25756
25757         * lib/readutmp.h (UT_USER): Define.
25758
25759 2000-01-29  Jim Meyering  <meyering@lucent.com>
25760
25761         * m4/lib-check.m4: New file containing library-related checks from
25762         fileutils and sh-utils (textutils had none).
25763
25764 2000-01-28  Jim Meyering  <meyering@lucent.com>
25765
25766         * m4/perl.m4: Change format of warning message to look more like that
25767         from the missing script.  Suggestion from François Pinard.
25768
25769 2000-01-25  Jim Meyering  <meyering@lucent.com>
25770
25771         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
25772         well as time.h in the compile check.
25773         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
25774         Fix typo in cross-compiling case: s/yes/no/.
25775
25776 2000-01-23  Jim Meyering  <meyering@lucent.com>
25777
25778         * m4/jm-macros.m4: Move df-related tests here from
25779         fileutils/configure.in
25780
25781         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
25782         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
25783
25784         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
25785         s/space/ac_fsusage_space/.
25786         (jm_FILE_SYSTEM_USAGE): Take two parameters.
25787
25788         * m4/ftruncate.m4: New file (derived from part of
25789         fileutils/configure.in).
25790         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
25791         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
25792
25793         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
25794         AC_SUBST these here, rather than just in sh-util/configure.in, so
25795         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
25796         all the same.
25797         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
25798         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
25799         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
25800         (AC_SUBST(POW_LIBM)): Likewise.
25801         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
25802
25803 2000-01-23  Jim Meyering  <meyering@lucent.com>
25804
25805         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
25806         obstack.c.
25807
25808 2000-01-22  Jim Meyering  <meyering@lucent.com>
25809
25810         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
25811
25812         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
25813
25814         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
25815         configure.in
25816         (AC_CHECK_HEADERS): Likewise for sh-utils.
25817         (AC_CHECK_HEADERS): Likewise for textutils.
25818         Merge the three lists of headers.
25819
25820         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
25821         from fileutils' configure.in.
25822
25823         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
25824         code. Moved tests into their own function (_jm_DECL_HEADERS) in
25825         check-decl.m4.
25826
25827         * m4/check-decl.m4: Use #if rather than #ifdef.
25828         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
25829         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
25830         (_jm_DECL_HEADERS): Define new function.
25831         (jm_CHECK_DECLARATIONS): Require it.
25832
25833 2000-01-22  Jim Meyering  <meyering@lucent.com>
25834
25835         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
25836         [! HAVE_DECL_STRTOULL]: Declare strtoull.
25837         Required for some AIX systems.  Reported by Christian Krackowizer.
25838         [TESTING] (main): New function.
25839
25840         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
25841         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
25842         letters.
25843
25844         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
25845         iswprint.
25846
25847         * lib/strverscmp.c (ISDIGIT): Define.
25848         (strverscmp): Use ISDIGIT, not isdigit.
25849
25850 2000-01-19  Jim Meyering  <meyering@lucent.com>
25851
25852         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
25853         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
25854         defines `struct timespec' in <sys/time.h>
25855
25856         * m4/c-bs-a.m4: Remove uses of changequote altogether.
25857         Thanks to Akim for explaining.
25858
25859 2000-01-17  Paul Eggert  <eggert@twinsun.com>
25860
25861         * lib/nanosleep.c (nanosleep):
25862         Don't use SA_INTERRUPT to decide whether to call sigaction, as
25863         POSIX.1 doesn't require SA_INTERRUPT and some systems
25864         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
25865         it's been part of POSIX.1 since day 1 (in 1988).
25866
25867 2000-01-17  Jim Meyering  <meyering@lucent.com>
25868
25869         * lib/interlock: Remove unused file.  Reported by François Pinard.
25870
25871 2000-01-16  Paul Eggert  <eggert@twinsun.com>
25872
25873         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
25874         alert, backslash, formfeed, and vertical tab unnecessarily in
25875         shell quoting style.
25876
25877 2000-01-16  Jim Meyering  <meyering@lucent.com>
25878
25879         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
25880         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
25881         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
25882         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
25883
25884 2000-01-16  Jim Meyering  <meyering@lucent.com>
25885
25886         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
25887         because the latter didn't work.
25888
25889 2000-01-15  Jim Meyering  <meyering@lucent.com>
25890
25891         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
25892         (AC_REPLACE_FUNCS): Add memcpy and memset.
25893         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
25894         Add strpbrk.
25895         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
25896
25897 2000-01-12  Jim Meyering  <meyering@lucent.com>
25898
25899         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
25900         (jm_PREREQ): Use it.
25901         (jm_PREREQ_READUTMP): New macro.
25902         (jm_PREREQ): Use it.
25903
25904 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25905
25906         Quote multibyte characters correctly.
25907         * m4/c-bs-a.m4: New file.
25908         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
25909         (jm_PREREQ): Use it.
25910
25911 2000-01-11  Paul Eggert  <eggert@twinsun.com>
25912
25913         * m4/uintmax_t.m4: Port to autoconf 2.13.
25914
25915 2000-01-08  Jim Meyering  <meyering@ascend.com>
25916
25917         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
25918         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
25919
25920 2000-01-04  Jim Meyering  <meyering@ascend.com>
25921
25922         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
25923         jm_STRUCT_DIRENT_D_TYPE.
25924         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
25925         jm_STRUCT_DIRENT_D_INO.
25926         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
25927         jm_STRUCT_UTIMBUF.
25928         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
25929         renamings.
25930         * m4/utime.m4: Likewise.
25931
25932         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
25933         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
25934
25935 2000-01-03  Paul Eggert  <eggert@twinsun.com>
25936
25937         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
25938         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
25939
25940 2000-01-02  Jim Meyering  <meyering@ascend.com>
25941
25942         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
25943         remember if this is necessary.
25944
25945 1999-12-26  Jim Meyering  <meyering@ascend.com>
25946
25947         * m4/jm-macros.m4: Use it here.
25948         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
25949
25950 1999-12-23  Jim Meyering  <meyering@ascend.com>
25951
25952         * m4/jm-macros.m4: Check for clock_gettime (moved from
25953         fileutils/configure.in)
25954         Check for gettimeofday.
25955
25956 1999-12-20  Jim Meyering  <meyering@ascend.com>
25957
25958         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
25959         autoconf-2.14a-1999-12-20.
25960
25961 1999-12-19  Jim Meyering  <meyering@ascend.com>
25962
25963         * m4/lstat-slash.m4: New file.
25964         * m4/jm-macros.m4: Use the new macro:
25965         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
25966
25967 1999-12-07  Jim Meyering  <meyering@ascend.com>
25968
25969         * m4/perl.m4: Require that File::Compare be available, too.
25970         Too many systems seem to lack it.
25971
25972         * m4/strftime.m4: Add checks for most of the cpp macros tested in
25973         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
25974
25975 1999-11-18  Paul Eggert  <eggert@twinsun.com>
25976
25977         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
25978         problem with the QNX 4.25 shell, which doesn't propagate exit
25979         status of failed commands inside shell assignments.
25980
25981 1999-11-17  Jim Meyering  <meyering@ascend.com>
25982
25983         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
25984
25985 1999-11-07  Jim Meyering  <meyering@ascend.com>
25986
25987         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
25988
25989 1999-11-06  Jim Meyering  <meyering@ascend.com>
25990
25991         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
25992         * m4/jm-macros.m4 (jm_MACROS): Use it here.
25993
25994 1999-11-05  Jim Meyering  <meyering@ascend.com>
25995
25996         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
25997         configure.in of textutils, fileutils, and sh-utils into this one
25998         (shared between those packages) file.
25999         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
26000         AC_STRUCT_ST_BLKSIZE.
26001
26002 1999-11-03  Jim Meyering  <meyering@ascend.com>
26003
26004         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
26005         of AC_CHECK_TYPE checks includes unistd.h.
26006         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
26007         Suggestion from Akim Demaille.
26008
26009 1999-10-30  Jim Meyering  <meyering@ascend.com>
26010
26011         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
26012         m4-quoted string.
26013         * m4/ls-mntd-fs.m4: Likewise.
26014         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
26015         * m4/jm-winsz1.m4: Likewise.
26016
26017         * m4/const.m4: Remove file, since the fix made it into the experimental
26018         version of autoconf.
26019         * m4/mktime.m4: Likewise.
26020
26021         * m4/check-type.m4: Remove file, now that the latest version of
26022         AC_CHECK_TYPE takes a third arg to specify additional #includes.
26023
26024         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
26025         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
26026         AC_CHECK_TYPE.
26027
26028 1999-10-04  Jim Meyering  <meyering@ascend.com>
26029
26030         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
26031
26032 1999-09-22  Paul Eggert  <eggert@twinsun.com>
26033
26034         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
26035         2.95.1 bug with HP-UX 10.20.
26036
26037 1999-09-17  Jim Meyering  <meyering@ascend.com>
26038
26039         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
26040         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
26041         due to missing strdup (against sh-utils-2.0).
26042
26043 1999-08-29  Jim Meyering  <meyering@ascend.com>
26044
26045         * m4/jm-macros.m4: Require jm_BISON.
26046         * m4/bison.m4: New file.
26047
26048 1999-08-17  Paul Eggert  <eggert@twinsun.com>
26049
26050         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
26051         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
26052
26053 1999-08-05  Jim Meyering  <meyering@ascend.com>
26054
26055         * m4/getline.m4: Rename test file from conftestdata to conftest.data
26056         to avoid conflicts with `conftest' on 8+3 filesystems.
26057         Suggestion from Eli Zaretskii.
26058
26059 1999-08-04  Jim Meyering  <meyering@ascend.com>
26060
26061         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
26062         fileutils and sh-utils (textutils's getline test was inadequate).
26063         (AM_FUNC_GETLINE): Run this test.
26064         (AC_CHECK_FUNCS): Check for getdelim.
26065         Reported by Bob Proulx.
26066
26067 1999-08-02  Jim Meyering  <meyering@ascend.com>
26068
26069         * m4/jm-macros.m4: Add a comment.
26070
26071 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26072
26073         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
26074         <inttypes.h> defines strtoumax as a macro (and not as a
26075         function).
26076
26077 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26078
26079         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
26080         that we can shift, multiply and divide unsigned long long
26081         values; Ultrix cc can't do it.
26082
26083 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26084
26085         * m4/mktime.m4: New file, which is a preview of what should appear
26086         in the next public autoconf release.
26087
26088 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26089
26090         * m4/lfs.m4: Remove this file.
26091         * m4/largefile.m4: New file.  It contains the old contents of
26092         lfs.m4, except that all names with prefix AC_LFS have been
26093         changed to use the prefix AC_SYS_LARGEFILE instead, to be
26094         compatible with future autoconf versions.  Also, some minor m4
26095         quoting problems have been fixed.
26096
26097 1999-08-01  Paul Eggert  <eggert@twinsun.com>
26098
26099         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
26100         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
26101         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
26102         and simplify the shell code.
26103
26104 1999-08-01  Jim Meyering  <meyering@ascend.com>
26105
26106         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
26107         m4.
26108
26109 1999-07-20  Jim Meyering  <meyering@ascend.com>
26110
26111         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
26112
26113 1999-07-15  Jim Meyering  <meyering@ascend.com>
26114
26115         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
26116
26117 1999-05-22  Jim Meyering  <meyering@ascend.com>
26118
26119         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
26120
26121 1999-05-20  Jim Meyering  <meyering@ascend.com>
26122
26123         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
26124         Add a colon after each `then' in case $4 is empty.
26125
26126 1999-05-16  Jim Meyering  <meyering@ascend.com>
26127
26128         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
26129
26130 1999-05-10  Jim Meyering  <meyering@ascend.com>
26131
26132         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
26133
26134         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
26135         AC_FUNC_MKTIME.
26136
26137 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
26138
26139         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
26140
26141 1999-05-04  Paul Eggert  <eggert@twinsun.com>
26142
26143         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
26144         not CPPFLAGS, so that linking works correctly in IRIX.
26145
26146 1999-04-30  Paul Eggert  <eggert@twinsun.com>
26147
26148         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
26149
26150 1999-04-20  Paul Eggert  <eggert@twinsun.com>
26151
26152         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
26153         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
26154         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
26155         jm_AC_TYPE_UNSIGNED_LONG_LONG.
26156         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
26157
26158         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
26159
26160 1999-04-20  Jim Meyering  <meyering@ascend.com>
26161
26162         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
26163         AC_REPLACE xstroull if necessary.  From Paul Eggert.
26164         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
26165
26166 1999-04-18  Jim Meyering  <meyering@ascend.com>
26167
26168         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
26169         * m4/jm-macros.m4: Use it.
26170
26171 1999-04-06  Jim Meyering  <meyering@ascend.com>
26172
26173         * m4/strftime.m4: Remove test for %f.
26174
26175 1999-03-29  Jim Meyering  <meyering@ascend.com>
26176
26177         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
26178         superset of the AC_TYPE_* checks in the textutils, fileutils,
26179         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
26180         AC_TYPE_PID_T.
26181
26182 1999-03-28  Jim Meyering  <meyering@ascend.com>
26183
26184         * m4/jm-macros.m4: Define GNU_PACKAGE here.
26185         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
26186         replaced e.g., in the *.sh files of the sh-utils.
26187
26188 1999-03-20  Jim Meyering  <meyering@ascend.com>
26189
26190         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
26191         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
26192         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
26193
26194 1999-03-19  Jim Meyering  <meyering@ascend.com>
26195
26196         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
26197
26198 1999-03-12  Jim Meyering  <meyering@ascend.com>
26199
26200         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
26201
26202 1999-03-07  Jim Meyering  <meyering@ascend.com>
26203
26204         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
26205         declared.
26206
26207 1999-02-17  Jim Meyering  <meyering@ascend.com>
26208
26209         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
26210         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
26211
26212 1999-02-07  Jim Meyering  <meyering@ascend.com>
26213
26214         * m4/group-member.m4: New file -- extracted from sh-utils'
26215         configure.in.
26216
26217         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
26218         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
26219
26220 1999-02-06  Jim Meyering  <meyering@ascend.com>
26221
26222         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
26223         * m4/fnmatch.m4: Likewise.
26224         * m4/getgroups.m4: Likewise.
26225         * m4/lstat.m4: Likewise.
26226         * m4/malloc.m4: Likewise.
26227         * m4/putenv.m4: Likewise.
26228         * m4/realloc.m4: Likewise.
26229         * m4/regex.m4: Likewise.
26230         * m4/stat.m4: Likewise.
26231         * m4/strftime.m4: Likewise.
26232         Suggestion from Alain Magloire.
26233
26234         * m4/chown.m4: Use `.$ac_objext', not `.o'.
26235         * m4/fnmatch.m4: Likewise.
26236         * m4/getgroups.m4: Likewise.
26237         * m4/getline.m4: Likewise.
26238         * m4/lstat.m4: Likewise.
26239         * m4/malloc.m4: Likewise.
26240         * m4/memcmp.m4: Likewise.
26241         * m4/putenv.m4: Likewise.
26242         * m4/realloc.m4: Likewise.
26243         * m4/regex.m4: Likewise.
26244         * m4/stat.m4: Likewise.
26245         * m4/strftime.m4: Likewise.
26246         Suggestion from Alain Magloire.
26247
26248         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
26249         an argument.
26250
26251         * m4/regex.m4: Add a run-time Test for proper operation of
26252         re_compile_pattern.
26253
26254 1999-01-31  Jim Meyering  <meyering@ascend.com>
26255
26256         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
26257
26258 1999-01-30  Jim Meyering  <meyering@ascend.com>
26259
26260         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
26261
26262         * m4/jm-mktime.m4: Make this a wrapper around the official
26263         AM_FUNC_MKTIME rather than my private copy, now that the official one
26264         is up to date.
26265         * m4/mktime.m4: Remove file.
26266
26267         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
26268         * m4/uptime.m4: Likewise.
26269         * m4/uintmax_t.m4: Likewise.
26270
26271 1999-01-28  Jim Meyering  <meyering@ascend.com>
26272
26273         * m4/jm-macros.m4: Use jm_AFS.
26274         * m4/afs.m4: New file (from fileutils' configure.in).
26275
26276         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
26277         * m4/chown.m4: Likewise.
26278         * m4/d-ino.m4: Likewise.
26279         * m4/d-type.m4: Likewise.
26280         * m4/fnmatch.m4: Likewise.
26281         * m4/getgroups.m4: Likewise.
26282         * m4/gettext.m4: Likewise.
26283         * m4/jm-mktime.m4: Likewise.
26284         * m4/jm-winsz2.m4: Likewise.
26285         * m4/lcmessage.m4: Likewise.
26286         * m4/ls-mntd-fs.m4: Likewise.
26287         * m4/malloc.m4: Likewise.
26288         * m4/memcmp.m4: Likewise.
26289         * m4/putenv.m4: Likewise.
26290         * m4/realloc.m4: Likewise.
26291         * m4/st_mtim.m4: Likewise.
26292         * m4/strftime.m4: Likewise.
26293
26294 1999-01-16  Jim Meyering  <meyering@ascend.com>
26295
26296         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
26297         (ARGMATCH_DIE_DECL): Define.
26298
26299 1999-01-12  Jim Meyering  <meyering@ascend.com>
26300
26301         * m4/Makefile.am.in: Rewrite to avoid using fmt.
26302         Reported by Lars Hecking.
26303
26304 1999-01-10  Jim Meyering  <meyering@ascend.com>
26305
26306         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
26307         gross kludge.
26308         * m4/inttypes_h.m4: Likewise.
26309         * m4/lstat.m4: Likewise.
26310         * m4/malloc.m4: Likewise.
26311         * m4/readdir.m4: Likewise.
26312         * m4/realloc.m4: Likewise.
26313         * m4/st_dm_mode.m4: Likewise.
26314         * m4/stat.m4: Likewise.
26315         * m4/utimbuf.m4: Likewise.
26316         * m4/utimes.m4: Likewise.
26317
26318         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
26319         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
26320         comments in config.h.in are meaningful.
26321
26322         * m4/jm-macros.m4: Require autoconf-2.13 here.
26323
26324         * m4/regex.m4: By default, don't use the included regex.c on systems
26325         with glibc 2.  Suggestion from Uli Drepper.
26326
26327 1999-01-02  Jim Meyering  <meyering@ascend.com>
26328
26329         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
26330
26331 1998-12-18  Jim Meyering  <meyering@ascend.com>
26332
26333         * m4/Makefile.am.in (Makefile.am): Simplify rule.
26334         Based on a suggestion from Lars Hecking.
26335
26336 1998-11-16  Paul Eggert  <eggert@twinsun.com>
26337
26338         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
26339
26340 1998-11-16  Jim Meyering  <meyering@ascend.com>
26341
26342         * m4/lfs.m4: Double-quote the `uname...` expression.
26343
26344 1998-11-14  Jim Meyering  <meyering@ascend.com>
26345
26346         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
26347         * m4/stat.m4: Likewise.
26348
26349 1998-11-03  Jim Meyering  <meyering@ascend.com>
26350
26351         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
26352         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
26353
26354 1998-10-18  Jim Meyering  <meyering@ascend.com>
26355
26356         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
26357
26358 1998-10-17  Jim Meyering  <meyering@ascend.com>
26359
26360         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
26361         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
26362         calls for those previously hard-coded headers.  Instead, take a new
26363         parameter.
26364         (jm_CHECK_DECLARATIONS): Reflect interface change.
26365         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
26366         (jm_CHECK_DECL_LOCALTIME_R): New macro.
26367
26368         * m4/mktime.m4: Test for spring-forward gap before long-running test.
26369
26370 1998-10-14  Jim Meyering  <meyering@ascend.com>
26371
26372         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
26373         instead of "TZ=America/Vancouver".  From Paul Eggert.
26374
26375 1998-10-11  Jim Meyering  <meyering@ascend.com>
26376
26377         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
26378         This adds a test for a recently added compatibility fix for mktime.c.
26379         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
26380
26381 1998-09-27  Jim Meyering  <meyering@ascend.com>
26382
26383         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
26384
26385         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
26386         ../configure.in, including a change from Gordon Matzigkeit to allow
26387         cross-compiling for the Hurd.
26388
26389         * m4/glibc.m4: New file/macro to test for the GNU C Library
26390         versions 1 and 2.  From Gordon Matzigkeit.
26391         Indent.
26392
26393 1998-09-21  Jim Meyering  <meyering@ascend.com>
26394
26395         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
26396
26397 1998-08-18  Paul Eggert  <eggert@twinsun.com>
26398
26399         Port nanosecond-resolution times to UnixWare 2.1.2 and
26400         pedantic Solaris 2.6.
26401
26402         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
26403         AC_STRUCT_ST_MTIM.
26404         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
26405         Generate name of ns member, instead of just 1 or undef.
26406         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
26407
26408 1998-08-15  Jim Meyering  <meyering@ascend.com>
26409
26410         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
26411         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
26412         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
26413         instead of jm_TYPE_SSIZE_T.
26414
26415 1998-08-12  Jim Meyering  <meyering@ascend.com>
26416
26417         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
26418
26419 1998-08-02  Jim Meyering  <meyering@ascend.com>
26420
26421         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
26422         in acconfig.h manually.
26423
26424 1998-07-31  Paul Eggert  <eggert@twinsun.com>
26425
26426         * m4/st_mtim.m4: New file.
26427
26428 1998-07-28  Jim Meyering  <meyering@ascend.com>
26429
26430         * m4/utimes.m4: Undef stat.
26431
26432 1998-07-25  Jim Meyering  <meyering@ascend.com>
26433
26434         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
26435         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
26436
26437 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
26438
26439         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
26440         uid and gid actually remain unchanged.
26441
26442 1998-07-07  Jim Meyering  <meyering@ascend.com>
26443
26444         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
26445
26446 1998-07-04  Jim Meyering  <meyering@ascend.com>
26447
26448         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
26449         to prove that this macro can be used in packages without regex.c.
26450
26451 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
26452
26453         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
26454         is to be used.
26455
26456 1998-07-03  Jim Meyering  <meyering@ascend.com>
26457
26458         * m4/gettext.m4: Add -lintl if it's found to be necessary.
26459
26460         * m4/gettext.m4: New file -- from gettext-0.10.35.
26461         * m4/lcmessage.m4: Likewise.
26462         * m4/progtest.m4: Likewise.
26463
26464         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
26465         * m4/jm-macros.m4: Require the new macro.
26466
26467 1998-06-29  Jim Meyering  <meyering@ascend.com>
26468
26469         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
26470         for the definition of NGROUPS (used in a system header included
26471         by sys/mount.h).
26472
26473 1998-06-28  Jim Meyering  <meyering@ascend.com>
26474
26475         * m4/ls-mntd-fs.m4: New file.
26476         * m4/fstypename.m4: New file.
26477
26478         * m4/jm-macros.m4: Require the new macro.
26479         * m4/jm-glibc-io.m4: New file.
26480
26481 1998-05-19  Jim Meyering  <meyering@ascend.com>
26482
26483         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
26484         * m4/lchown.m4: New file.
26485
26486         * m4/Makefile.am.in: New file.
26487         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
26488
26489 1998-05-14  Jim Meyering  <meyering@ascend.com>
26490
26491         * m4/Makefile.am (EXTRA_DIST): Add them.
26492         * m4/jm-macros.m4: New file.
26493         * m4/utimbuf.m4: New file.
26494
26495 1998-05-12  Jim Meyering  <meyering@ascend.com>
26496
26497         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
26498
26499 1998-05-11  Jim Meyering  <meyering@ascend.com>
26500
26501         * m4/isc-posix.m4: New file.
26502
26503 1998-05-10  Jim Meyering  <meyering@ascend.com>
26504
26505         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
26506
26507 1998-05-09  Jim Meyering  <meyering@ascend.com>
26508
26509         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
26510         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
26511         with automake.
26512
26513         * m4/ssize_t.m4: New file.
26514         * m4/mktime.m4: Remove file -- the new automake has this now.
26515
26516 1998-04-26  Jim Meyering  <meyering@ascend.com>
26517
26518         * m4/assert.m4: New file.
26519         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
26520
26521 1998-04-05  Jim Meyering  <meyering@ascend.com>
26522
26523         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
26524         (jm_PREREQ): Use it here.
26525
26526 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
26527
26528         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
26529         in acconfig.h.
26530
26531 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
26532
26533         * m4/prereq.m4: New file.
26534         * m4/error.m4: New file.
26535         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
26536
26537 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
26538
26539         * m4/getline.m4: Don't set am_cv_func_working_getline before the
26540         cache-check for the same variable -- that defeated the purpose of
26541         the test; the test program was never run.  This was a problem only
26542         on systems with losing getline functions -- HP-UX 10.20 is one.
26543         Reported by Bjorn Helgaas.
26544
26545 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
26546
26547         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
26548
26549 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
26550
26551         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
26552
26553         * m4/const.m4: New file.  Use an initializer in this declaration
26554         typedef int charset[2]; const charset x;
26555         Reported by Bob Glickstein.
26556
26557 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
26558
26559         * m4/chown.m4: Fix reversed types on -1 args to chown.
26560         From Kaveh Ghazi.
26561
26562 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
26563
26564         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
26565         Add lseek and memchr.
26566
26567         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
26568         T.E.Dickey <dickey@clark.net> said that some older preprocessors
26569         have a 20-character limit on names.
26570
26571 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
26572
26573         * m4/inttypes_h.m4: New file.
26574         * m4/uintmax_t.m4: New file.
26575         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
26576
26577 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007
26578   Free Software Foundation, Inc.
26579 Copying and distribution of this file, with or without modification,
26580 are permitted provided the copyright notice and this notice are preserved.