update from texinfo
[pspp] / ChangeLog
1 2006-12-29  Paul Eggert  <eggert@cs.ucla.edu>
2
3         * lib/acl.h: Include sys/types.h and sys/stat.h, for mode_t and
4         struct stat.  Problem reported by Henning Nielsen Lund.
5         * lib/acl.c: Include acl.h first, to check interface.  Don't
6         bother to include sys/types.h and sys/stat.h again.
7
8 2006-12-28  Paul Eggert  <eggert@cs.ucla.edu>
9
10         Import the following change from libc; problem reported by
11         Sven Verdoolaege.
12
13         2005-10-13  Ulrich Drepper  <drepper@redhat.com>
14
15         [BZ #1373]
16         * lib/argp.h: Remove __NTH for __argp_usage inline function.
17
18 2006-12-28  Jim Meyering  <jim@meyering.net>
19
20         * build-aux/announce-gen: Do not assume that the package
21         builds any of tar.gz, tar.bz2, and .xdelta files.
22         Suggestion from Simon Josefsson.
23
24 2006-12-28  Simon Josefsson  <simon@josefsson.org>
25
26         * modules/announce-gen: New file.
27
28 2006-12-27  Paul Eggert  <eggert@cs.ucla.edu>
29
30         * lib/mbchar.h: Just include <wctype.h>; the wctype module
31         handles its gotchas now.
32         * lib/mbswidth.c: Likewise.
33         * lib/wcwidth.h: Likewise.
34         * m4/mbchar.m4 (gl_MBCHAR): Don't bother checking for wctype.h
35         and iswcntrl; the wctype module does this stuff now.
36         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
37         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Likewise.
38         * modules/mbchar (Depends-on): Add wctype.
39         * modules/mbswidth (Depends-on): Likewise.
40         * modules/wcwidth (Depends-on): Likewise.
41
42 2006-12-27  Eric Blake  <ebb9@byu.net>
43
44         * lib/fnmatch.c: Reinstate inclusion of <wchar.h>, since this
45         module uses more than what <wctype.h> is required to provide.
46
47 2006-12-26  Eric Blake  <ebb9@byu.net>
48
49         * gnulib-tool (sed_extract_prog): Avoid space-tab.
50
51 2006-12-26  Eric Blake  <ebb9@byu.net>
52
53         * modules/absolute-header: New module.
54         * modules/fcntl (Depends-on): Depend on it.
55         * modules/inttypes (Depends-on): Likewise.
56         * modules/stdint (Depends-on): Likewise.
57         * modules/sys_stat (Depends-on): Likewise.
58         * modules/wctype (Depends-on): Likewise.
59         * MODULES.html.sh (Support for building libraries and
60         executables): Document it.
61
62 2006-12-25  Paul Eggert  <eggert@cs.ucla.edu>
63
64         * gnulib-tool (SED): Remove, undoing previous change.
65         The problem was that it broke coreutils on Solaris, because
66         "sed --posix" leaked into a makefile.
67         (sed): New alias, if 'alias' and GNU sed.
68
69 2006-12-24  Jim Meyering  <jim@meyering.net>
70
71         Work around an fchownat bug in glibc-2.4:
72         http://lists.ubuntu.com/archives/ubuntu-users/2006-September/093218.html
73         This bug would cause "chown -RP ... DIR" to follow symlinks in DIR,
74         in spite of the -P option.
75         * m4/openat.m4 (gl_FUNC_FCHOWNAT, gl_FUNC_FCHOWNAT_DEREF_BUG):
76         New macros.
77         (gl_PREREQ_OPENAT): Require gl_FUNC_FCHOWNAT.
78         * modules/openat (Files): Add lib/fchownat.c.
79         * lib/openat.c (fchownat): Don't define here.  Move to...
80         * lib/fchownat.c: ...this new file.
81
82 2006-12-23  Paul Eggert  <eggert@cs.ucla.edu>
83
84         Fix bug reported by Bruno Haible in
85         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00228.html>
86         where quotearg.c didn't compile on Mac OS X 10.2 because it
87         lacks <wchar.h> and wint_t.
88         * lib/wctype_.h (__wctype_wint_t): New type.
89         Include <stdio.h>, <time.h>, <wchar.h> only if HAVE_WINT_T.
90         (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit, iswgraph):
91         (iswlower, iswprint, iswpunct, iswspace, iswupper, ixwxdigit):
92         Arg is now of type __wctype_wint_t, not wint_t.
93         * m4/wctype.m4 (gl_WCTYPE_H): Require gt_TYPE_WINT_T, and
94         substitute HAVE_WINT_T.
95         * modules/wctype (Files): Add m4/wint_t.m4.
96         (wctype.h): Substitute HAVE_WINT_T.
97
98 2006-12-23  Bruno Haible  <bruno@clisp.org>
99
100         * lib/safe-read.h [C++]: Wrap declarations in extern "C".
101
102 2006-12-23  Bruno Haible  <bruno@clisp.org>
103
104         * lib/canonicalize-lgpl.c (__realpath): Test HAVE_READLINK instead of
105         S_ISLNK.
106         Needed because gnulib's sys/stat.h replacement defines S_ISLNK on
107         mingw.
108
109 2006-12-22  Bruno Haible  <bruno@clisp.org>
110
111         * lib/copy-file.c: Include acl.h.
112         (copy_file_preserving) [USE_ACL]: Use copy_acl instead of chmod.
113         Close the file descriptors only after being done with copy_acl.
114         * modules/copy-file (Depends-on): Add acl.
115
116 2006-12-22  Bruno Haible  <bruno@clisp.org>
117
118         * gnulib-tool (SED): New variable.
119         Use $SED instead of sed everywhere.
120
121 2006-12-22  Bruno Haible  <bruno@clisp.org>
122
123         * modules/no-c++: New file.
124         * m4/no-c++.m4: New file.
125         * MODULES.html.sh (Support for building libraries and executables):
126         Add no-c++.
127
128 2006-12-22  Paul Eggert  <eggert@cs.ucla.edu>
129
130         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
131         Include <limits.h>, and use its INT_MAX to rewrite the
132         j loop so that it does not overflow 'int'.  Problem reported by
133         Ralf Wildenhues in
134         <http://lists.gnu.org/archive/html/bug-gnulib/2006-12/msg00084.html>.
135         Play it safe by shifting left by 1 rather than multiplying by 2,
136         as GCC is less likely to optimize this away when the value
137         is signed (when it assumes overflow leads to undefined behavior).
138         Also, don't assume time_t uses two's complement.
139
140 2006-12-21  Paul Eggert  <eggert@cs.ucla.edu>
141
142         * MODULES.html.sh: New module wctype.
143         * lib/wctype_.h, m4/wctype.m4, modules/wctype: New files.
144         * lib/fnmatch.c: Don't bother to include <wchar.h> before
145         <wctype.h>, since the new wctype module should fix this.
146         * lib/quotearg.c: Include <wctype.h> unconditionally, since
147         the wctype module should arrange for it.
148         * lib/regex_internal.h: Likewise.
149         * m4/quotearg.m4 (gl_QUOTEARG): Don't check for wctype.h or iswprint,
150         since the wctype module should handle this now.
151         * m4/regex.m4 (gl_PREREQ_REGEX): Don't check for wctype.h.
152         * modules/fnmatch (Depends-on): Add wctype.
153         * modules/quotearg (Depends-on): Likewise.
154         * modules/regex (Depends-on): Likewise.
155
156 2006-12-19  Bruno Haible  <bruno@clisp.org>
157
158         * lib/strdup.h [C++]: Wrap definitions in extern "C".
159         Suggested by Lorenzo Bettini <bettini@dsi.unifi.it>.
160
161 2006-12-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
162
163         * modules/savewd (Depends-on): Fix dependency on fcntl.
164
165 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
166
167         * m4/stdint.m4 (gl_STDINT_H): Set STDINT_H to empty if stdint.h
168         conforms to C99, rather than relying on the user's environment
169         setting of STDINT_H.
170
171 2006-12-18  Paul Eggert  <eggert@cs.ucla.edu>
172         and Eric Blake  <ebb9@byu.net>
173
174         * lib/dirname.h (DOUBLE_SLASH_IS_DISTINCT_ROOT): Default to 0, not 1.
175         This is more consistent with the other defines here.
176         * m4/double-slash-root.m4 (gl_DOUBLE_SLASH_ROOT):
177         Port to z/OS.  Problem reported by Paul Gilmartin.
178         Change local vars to use gl_ prefix rather than ac_.
179         Don't define DOUBLE_SLASH_IS_DISTINCT_ROOT to 0, for consistency
180         with other defines.
181         * modules/double-slash-root: New module.
182         * modules/dirname (Files): Remove m4/double-slash-root.m4.
183         (Depends-on): Add double-slash-root.
184         * MODULES.html.sh (File system functions): Mention new module.
185
186 2006-12-14  Paul Eggert  <eggert@cs.ucla.edu>
187
188         * lib/yesno.c [!ENABLE_NLS]: Don't include getline.h.
189         (yesno) [!ENABLE_NLS]: Don't invoke getline or rpmatch.
190         This is for the benefit of gzip, which doesn't do i18n.
191
192 2006-12-12  Jim Meyering  <jim@meyering.net>
193
194         * m4/acl.m4 (gl_ACL_GET_FILE): Fix logic error.
195         Reported by Andreas Schwab <schwab@suse.de>.
196
197 2006-12-12  Bruno Haible  <bruno@clisp.org>
198
199         Merge these changes.
200         2006-09-05  Bruno Haible  <bruno@clisp.org>
201         * lib/iconvme.c (iconv_string): No need to save and restore errno when
202         iconv_alloc succeeded.
203         (iconv_alloc): Don't assume that malloc() or realloc(), when failing,
204         sets errno to ENOMEM. (malloc on GNU/kFreeBSD doesn't.) No need to
205         test for " && dest " at the end - dest is always != NULL there. Call
206         iconv with 4xNULL arguments initially, to reset the state. Call iconv
207         with 2xNULL arguments, also to flush the state storage. Handle the
208         IRIX iconv behaviour. Realloc the final result, to throw away unused
209         memory.
210
211 2006-12-11  Paul Eggert  <eggert@cs.ucla.edu>
212
213         * m4/openat.m4 (gl_FUNC_OPENAT): Don't compile mkdirat
214         and fchmodat unconditionally, since glibc 2.4 has them.
215         Problem reported by Arkadiusz Miskiewicz.
216
217 2006-12-10  Bruno Haible  <bruno@clisp.org>
218
219         * gnulib-tool (func_import): Show the include files only for those
220         modules that are copied and specified.
221         Reported by Karl Berry.
222
223 2006-12-08  Jim Meyering  <jim@meyering.net>
224
225         * build-aux/announce-gen ($VERSION): Don't use of $Revision...$.
226         Instead, use Emacs' time-stamp write hook.  Note that the time is UTC.
227
228         * build-aux/announce-gen: Add two new options, both optional:
229         --bootstrap-tools=TOOL_LIST
230               a comma-separated list of tools, e.g.,
231               autoconf,automake,bison,gnulib
232         --gnulib-snapshot-date=DATE
233               if gnulib is in the bootstrap tool list,
234               then report this as the snapshot date.
235               If not specified, use the current date/time.
236               If you specify a date here, be sure it's UTC.
237
238 2006-12-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
239
240         * tests/test-argp-2.sh: Fix test to match actual output.
241         (func_compare): Fix sed script to be portable.
242
243 2006-12-05  Paul Eggert  <eggert@cs.ucla.edu>
244
245         * lib/utimens.c (futimens) [HAVE_BUGGY_NFS_TIME_STAMPS]: Add a
246         workaround for this case.  It is not autoconfigured now; offhand
247         it's hard to see how to autoconfigure it.
248
249 2006-12-03  Paul Eggert  <eggert@cs.ucla.edu>
250
251         * lib/mkdir-p.c (make_dir_parents): Fix race condition when making
252         a directory that is about to be chowned.  Such a directory's
253         initial file permissions should permit the owner only and this
254         should not be changed until after the chown, since the group and
255         other bits would be incorrect if they granted permission before
256         the chown.
257
258         Fix porting problem for iswctype reported by Georg Schwarz in:
259         http://lists.gnu.org/archive/html/bug-coreutils/2006-12/msg00017.html
260         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Require HAVE_ISWCTYPE, too.
261         * lib/regex_internal.h (RE_ENABLE_I18N): Likewise.
262         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for iswctype, too.
263         * m4/regex.m4 (gl_PREREQ_REGEX): Likewise.
264
265 2006-12-03  Jim Meyering  <jim@meyering.net>
266
267         * lib/fts.c (fts_load): Don't set sp->fts_dev here, since
268         p->fts_statp may not yet be defined.
269         (fts_read): Instead, set it in the caller, once p->fts_statp is
270         sure to be defined, and corresponds to a top-level directory.
271         This bug made du -x fail.  Here's the coreutils test case:
272         http://git.sv.gnu.org/gitweb/?p=coreutils.git;a=commit;h=ba45154d8e9f
273         Reported by Mike Frysinger.
274
275 2006-12-01  Jim Meyering  <jim@meyering.net>
276
277         * modules/savewd (Depends-on): Add fcntl_h to avoid self-test
278         build failure due to missing definition of HAVE_WORKING_O_NOFOLLOW.
279         Reported by Simon Josefsson.
280
281 2006-11-30  Jim Meyering  <jim@meyering.net>
282
283         * m4/warning.m4: Use the all-permissive copyright notice
284         recommended by RMS (rather than LGPL).
285         * m4/vararrays.m4: Likewise.
286         * m4/flexmember.m4: Likewise.
287
288 2006-11-29  Bruno Haible  <bruno@clisp.org>
289
290         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
291         noinst_LIBRARIES. Augment noinst_LIBRARIES and noinst_LTLIBRARIES
292         using +=.
293         Reported by Simon Josefsson <simon@josefsson.org>.
294
295 2006-11-28  James Youngman <jay@gnu.org>
296
297         * README: Advise users that they might find the bug-gnulib@gnu.org
298         and autotools-announce@gnu.org mailing lists useful.
299
300 2006-11-28  Bruno Haible  <bruno@clisp.org>
301
302         * m4/ptrdiff_max.m4: Remove file.
303
304 2006-11-21  Bruno Haible  <bruno@clisp.org>
305
306         * m4/eoverflow.m4 (gl_EOVERFLOW): Use AC_COMPUTE_INT instead of
307         _AC_COMPUTE_INT.
308         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
309         * m4/ptrdiff_max.m4 (gl_PTRDIFF_MAX): Use AC_COMPUTE_INT instead of
310         _AC_COMPUTE_INT.
311         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
312         * m4/size_max.m4 (gl_SIZE_MAX): Use AC_COMPUTE_INT instead of
313         _AC_COMPUTE_INT.
314         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
315
316 2006-11-28  Jim Meyering  <jim@meyering.net>
317
318         * lib/regcomp.c (parse_branch): Rename local, exp->expr, to avoid
319         warning from "gcc -Wshadow" about shadowing the builtin.
320
321 2006-11-27  Bruno Haible  <bruno@clisp.org>
322
323         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): Use AC_COMPUTE_INT instead of
324         _AC_COMPUTE_INT.
325         (AC_COMPUTE_INT): Add fallback definition for autoconf < 2.61.
326
327 2006-11-27  Bruno Haible  <bruno@clisp.org>
328             Paul Eggert  <eggert@cs.ucla.edu>
329
330         * lib/regex.h (__restrict_arr): Redo logic of #if, for clarity.
331
332 2006-11-26  Bruno Haible  <bruno@clisp.org>
333
334         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
335         noinst_LTLIBRARIES.
336
337 2006-11-27  Paul Eggert  <eggert@cs.ucla.edu>
338             Bruno Haible  <bruno@clisp.org>
339
340         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to 0
341         if compiling with "gcc -ansi".
342
343 2006-11-26  Paul Eggert  <eggert@cs.ucla.edu>
344
345         Fix some incompatibilities with gcc -ansi -pedantic.
346         * lib/regex.h (__restrict_arr): Don't use the [restrict] syntax
347         if compiling pedantically with GCC, unless it's C99 or later.
348         Don't trust sys/cdefs.h's definition of __restrict_arr, either, as
349         it mishandles gcc -ansi -pedantic as well.
350         * lib/regex_internal.h (re_token_t): Don't use enum bitfields
351         if gcc -pedantic.
352         * lib/regexec.c (check_node_accept_bytes): Don't use auto
353         initializers for struct if -pedantic, unless it's C99 or later.
354
355 2006-11-25  Nix  <nix@esperi.org.uk>  (tiny change)
356
357         * m4/fcntl_h.m4 (gl_FCNTL_H): Test the atime, not the mtime.
358         Don't close an fd more than once. Identical atimes indicate
359         success, not failure.
360
361 2006-11-22  Robinson Mittmann <bob@hoplon.com>  (tiny change)
362
363         * lib/sincosl.c (kernel_sinl): Fix typo in threshold.
364
365 2006-11-23  Jim Meyering  <jim@meyering.net>
366
367         * build-aux/announce-gen: New file.  From coreutils.
368
369 2006-11-22  Jim Meyering  <jim@meyering.net>
370
371         Work around a compile-time error from the HP-UX 11.00 /bin/cc.
372         * lib/fts.c (enum Fts_stat): Give this previously-anon enum a name.
373         (fts_read): Use a temporary to narrow the overused st_size member
374         before using it in a switch statement.  Reported by Matthew Woehlke.
375
376         * m4/clock_time.m4 (gl_CLOCK_TIME): Quote AC_SUBST argument.
377         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Likewise.
378
379 2006-11-20  Bruno Haible  <bruno@clisp.org>
380
381         * gettext.m4 (AM_GNU_GETTEXT): Revert 2005-07-28 patch: Use
382         changequote instead of pairs of brackets.
383         Reported by Andreas Schwab <schwab@suse.de>.
384
385 2006-11-21  Jim Meyering  <jim@meyering.net>
386
387         * lib/fts.c (fts_safe_changedir): Move a declaration "up",
388         so as to remain compatible with older compilers.
389         Patch from Michael Deutschmann.
390
391 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
392
393         * MODULES.html.sh (File system functions): Add openat.
394
395         * lib/openat.h (rpl_fstatat): New macro, if
396         [HAVE_OPENAT && ! LSTAT_FOLLOWS_SLASHED_SYMLINK.
397         (fstatat): Define to rpl_fstatat under the same conditions,
398         unless COMPILING_FSTATAT.
399         * m4/openat.m4 (gl_FUNC_OPENAT): Compile fstatat.c too, if fstatat
400         seems to have the bug.
401         * lib/fstatat.c: New file.
402         * modules/openat (Files): Add it.
403
404 2006-11-20  Bruno Haible  <bruno@clisp.org>
405
406         * Makefile: New file.
407
408 2006-11-20  Jim Meyering  <jim@meyering.net>
409
410         The beginnings of syntax-related checks for gnulib.
411         * lib/Makefile: New file.
412         * lib/t-idcache: New script.  Ensure that the two halves of
413         idcache.c stay in sync.
414
415         * lib/idcache.c: Adjust comments in user- and group- portions to
416         be more accurate, and to be consistent with one another.
417
418 2006-11-20  Jim Meyering  <jim@meyering.net>
419
420         * lib/idcache.c: Restore most of the 2006-11-06 patch, so as to
421         continue using the flexible array member (thus, this module performs
422         half as many malloc calls), with the addition that...
423         (getgroup, getuser): Consistently record a non-match via an empty
424         "name" string, and map an empty string match to a NULL return value.
425         * modules/idcache (Depends-on): Re-add flexmember.
426
427         * lib/idcache.c (getuser): Remove all uses of the register keyword.
428         (getuidbyname, getgroup, getgidbyname): Likewise.
429
430         Use cleaner syntax: NULL rather than 0.
431         * lib/idcache.c (getuidbyname, getgidbyname): Return NULL, not 0.
432
433 2006-11-20  Paul Eggert  <eggert@cs.ucla.edu>
434
435         * lib/idcache.c: Undo most recent patch, dated 2006-11-06.
436         It mishandled the case where the group was missing.
437         Problem reported by Greg Schafer.
438         * modules/idcache: Likewise.
439
440 2006-11-18  Jim Meyering  <jim@meyering.net>
441
442         * check-module (%exempt_header): Add exception for some
443         conditionally-included headers.
444
445         * modules/i-ring (Depends-on): Add verify.
446         (License): Change to LGPL.
447
448 2006-11-16  Paul Eggert  <eggert@cs.ucla.edu>
449
450         * modules/getaddinfo (Depends-on): Remove inttostr; add snprintf.
451         * lib/getaddrinfo.c: Include snprintf.h rather than intprops.h
452         and inttostr.h.  Use snprintf rather than uinttostr, so that
453         LGPLed code doesn't depend on GPLed.
454
455 2006-11-17  Paul Eggert  <eggert@cs.ucla.edu>
456
457         * modules/inline (License): Change from GPL to LGPL.
458
459 2006-11-17  Jim Meyering  <jim@meyering.net>
460
461         * modules/d-type (License): Switch to LGPL.
462
463 2006-11-15  Bruno Haible  <bruno@clisp.org>
464
465         * m4/alloca.m4 (gl_FUNC_ALLOCA): Fix the AC_CACHE_CHECK message.
466
467 2006-11-15  Eric Blake  <ebb9@byu.net>
468
469         * m4/allocsa.m4 (gl_ALLOCSA): Don't invoke macro already picked up by
470         the module dependency.
471
472 2006-11-15  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
473             Bruno Haible  <bruno@clisp.org>
474
475         * gnulib-tool (func_create_testdir): Add license consistency check.
476
477 2006-11-15  Eric Blake  <ebb9@byu.net>
478
479         * m4/alloca.m4 (gl_FUNC_ALLOCA): Use AC_CACHE_CHECK to avoid a
480         random "(cached)" in configure output.
481
482 2006-11-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
483
484         * m4/inttypes.m4 (gl_INTTYPES_H): Use AC_CACHE_CHECK so that the
485         test for conforming inttypes.h is both announced and cached.
486
487         * MODULES.html.sh (seen_modules, seen_files): New variables.
488         (func_module): Rewrite to use a few less gnulib-tool and sed
489         invocations.  Avoid a couple of quadratic algorithms for ...
490         (missed_modules, missed_files): ... these, with ...
491         (func_append, func_tmpdir): ... these new functions, from
492         gnulib-tool.  Analogously, install traps for cleanup.
493
494         * tests/test-gc.c (main): Remove unused variables.
495         * tests/test-read-file.c: Include stdlib.h, for 'free'.
496
497 2006-11-14  Paul Eggert  <eggert@cs.ucla.edu>
498
499         * modules/inttostr (License): Change to LGPL.
500
501 2006-11-14  Eric Blake  <ebb9@byu.net>
502
503         * modules/tempname (License): Change to LGPL.
504
505 2006-11-14  Eric Blake  <ebb9@byu.net>
506
507         * doc/functions.texi (Function Portability): *printf functions on
508         Cygwin now understand all POSIX size specifiers.
509
510 2006-11-14  Bruno Haible  <bruno@clisp.org>
511
512         * modules/c-ctype (License): Change to LGPL.
513
514 2006-11-12  Bruno Haible  <bruno@clisp.org>
515
516         * m4/lib-link.m4 (AC_LIB_LINKFLAGS, AC_LIB_HAVE_LINKFLAGS,
517         AC_LIB_LINKFLAGS_BODY): Also set a LIB${NAME}_PREFIX variable. Needed
518         for GNOME libraries, for which the include files are installed in
519         subdirectories of $prefix/include.
520
521 2006-11-12  Bruno Haible  <bruno@clisp.org>
522
523         * m4/lib-link.m4: Require at least autoconf-2.54.
524         (AC_LIB_LINKFLAGS_BODY) [autoconf < 2.61]: Turn dots into the library
525         name to underscores for the --with option.
526
527 2006-11-13  Bruno Haible  <bruno@clisp.org>
528
529         * gnulib-tool (func_create_testdir): Set gl_source_base correctly in
530         the tests directory.
531         Reported by Ralf Wildenhues.
532
533 2006-11-13  Bruno Haible  <bruno@clisp.org>
534
535         * gnulib-tool (func_emit_initmacro_start): Also override AC_LIBSOURCES.
536         (func_emit_initmacro_end): Undo the override here.
537         (func_emit_initmacro_done): Emit a definition for gl_LIBSOURCES.
538         Works around the famous automake error in coreutils.
539
540 2006-11-13  Eric Blake  <ebb9@byu.net>
541
542         * lib/gl_anytree_oset.h (gl_tree_search_atleast): Return the
543         element, not its node.
544
545 2006-11-12  Bruno Haible  <bruno@clisp.org>
546
547         * gnulib-tool (func_emit_lib_Makefile_am): Replace occurrences of
548         '$(top_srcdir)/build-aux/', taking into account the real auxdir.
549
550 2006-11-12  Bruno Haible  <bruno@clisp.org>
551
552         * gnulib-tool: New option --local-symlink.
553         (func_usage): Document it.
554         (lsymbolic): New variable.
555         (func_import, func_create_testdir): If --symlink was not specified,
556         test whether --local-symlink was specified and the file comes from
557         the local_gnulib_dir.
558
559 2006-11-12  Bruno Haible  <bruno@clisp.org>
560
561         * gnulib-tool (func_ln): New function.
562         (func_ln_if_changed, func_create_testdir): Use it instead of "ln -s".
563
564 2006-11-12  Bruno Haible  <bruno@clisp.org>
565
566         Finish support for source files in subdirectories.
567         * gnulib-tool (func_emit_lib_Makefile_am): If some of the source files
568         are in subdirectories, set uses_subdirs and add 'subdir-objects' to
569         AUTOMAKE_OPTIONS.
570         (func_import, func_create_testdir): Invoke AM_PROG_CC_C_O in this case.
571
572 2006-11-12  Bruno Haible  <bruno@clisp.org>
573
574         * gnulib-tool (func_get_automake_snippet): Synthesize also an
575         EXTRA_lib_SOURCES augmentation.
576         (func_emit_lib_Makefile_am): Initialize EXTRA_lib..._SOURCES to empty.
577
578 2006-11-12  Jim Meyering  <jim@meyering.net>
579
580         Make fts (in FTS_CWDFD mode) more efficient by caching a few open
581         file descriptors.  This also averts a failure on systems with
582         native openat support when a traversed directory lacks "x" access.
583         * lib/fts_.h: Include "i-ring.h"
584         (struct FTS) [fts_fd_ring]: New member.
585         * lib/fts.c (RESTORE_INITIAL_CWD): Also call fd_ring_clear.
586         (FCHDIR): Add parentheses.
587         (fd_ring_check, fd_ring_print) [!FTS_DEBUG]: Define away.
588         (cwd_advance_fd): Add a 3rd parameter.  Adjust all callers.
589         When descending, rather than simply closing the previous
590         fts_cwd_fd value, push that file descriptor onto the ring.
591         (same_fd, fd_ring_print, fd_ring_check) [FTS_DEBUG]: New functions.
592         (fts_open): Initialize the new fd_ring member.
593         (fts_close): Clear the ring.
594         (fts_safe_changedir): When possible, use our new fd_ring to skip
595         the diropen and fstat and dev/ino comparison that would normally
596         accompany a virtual `chdir ("..")'.
597
598         * modules/fts (Depends-on): Add i-ring.
599         * modules/i-ring: New module.
600         * lib/i-ring.c, lib/i-ring.h, lib/i-ring-test.c: New files.
601         * m4/i-ring.m4: New file.
602
603 2006-11-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
604
605         * gnulib-tool (func_create_testdir): Fix replacement of
606         `build-aux' in configure.ac.  Run autotools in gltests
607         subdirectory.
608         (func_create_testdir, func_create_megatestdir, test): There is
609         no need for '--force' in most autotool invocations in a new
610         tree.  Actually fail the whole test if any of the tools, or the
611         configure or make stages fail.
612
613         Sync from Automake.
614         * build-aux/gnupload: Revert last change.  Add pointer to upload
615         instructions of the GNU Maintenance Instructions.
616         Suggestion by Karl Berry.
617
618 2006-11-10  Jim Meyering  <jim@meyering.net>
619
620         * lib/fts.c [FTS_DEBUG]: Don't try to print a pointer via %s.
621
622 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
623
624         * lib/gettext.h (dgettext, dcgettext, ngettext) [! ENABLE_NLS]:
625         (dngettext, dcngettext, bindtextdomain) [! ENABLE_NLS]:
626         (bind_textdomain_codeset) [! ENABLE_NLS]:
627         Evaluate all the arguments.  That way, callers get compatible behavior
628         if the arguments have side effects.  Also, it avoids some GCC
629         diagnostics in some cases; Joel E. Denny reported problems when Bison
630         was configured with --enable-gcc-warnigs.
631
632 2006-11-10  Jim Meyering  <jim@meyering.net>
633
634         * m4/inline.m4 (gl_INLINE): Check with the compiler, not cpp, so that
635         relevant options in CFLAGS (like -O, -fno-inline) are taken into
636         account.
637
638 2006-11-10  Jim Meyering  <jim@meyering.net>
639
640         * modules/inline: New file/module.
641         * modules/xalloc (Files): Remove m4/inline.m4.
642         (Depends-on): Add inline, instead.
643         * modules/oset: Likewise.
644         * modules/list: Likewise.
645
646 2006-11-09  Paul Eggert  <eggert@cs.ucla.edu>
647
648         * lib/stdint_.h (uintmax_t): Fix typo: int64_t -> uint64_t.
649         Problem reported by Matthew Woehlke.
650
651 2006-11-09  Bruno Haible  <bruno@clisp.org>
652
653         * lib/tempname.c (gen_tempname): Remove variant that invokes
654         __gen_tempname.
655         * m4/tempname.m4 (gl_FUNC_GEN_TEMPNAME): Don't test for
656         __gen_tempname.
657
658 2006-11-08  Bruno Haible  <bruno@clisp.org>
659
660         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Set ac_cv_type_long_long_int
661         to 'yes' instead of 'cross-compiling'.
662
663 2006-11-08  Paul Eggert  <eggert@cs.ucla.edu>
664
665         * lib/quotearg.h (quotearg_free): New decl.
666         * lib/quotearg.c (quotearg_free): New function.
667         (slot0, nslots, slotvec0, slotvec):
668         Now file-scope so that quotearg_free can get at them.
669
670 2006-11-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
671
672         Sync from Automake.
673         * build-aux/gnupload: Add missing 'gnu' to example URL.
674         Report by Karl Berry.
675
676 2006-11-08  Bruno Haible  <bruno@clisp.org>
677
678         * m4/inline.m4 (gl_INLINE): Also test __NO_INLINE__.
679         Suggested by Paul Eggert.
680
681 2006-11-08  Jim Meyering  <jim@meyering.net>
682
683         * lib/fts.c [!_LGPL_PACKAGE]: Don't include fcntl--.h twice.
684         It's already included if !_LIBC.
685         (fts_safe_changedir): Add a comment.
686
687 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
688
689         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Detect bug in
690         Tandem NonStop Kernel (OSS) cc -O circa 2004, reported by
691         Matthew Woehlke.
692
693         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Move
694         definitions up, to avoid colliding with change below.
695         (static_inline) [HAVE_INLINE]: New macro.
696         (xnmalloc, xnrealloc, x2nrealloc, xcharalloc):
697         Provide extern decls when !HAVE_INLINE.  Do not define unless
698         static_inline is defined, either by us or by xmalloc.c.  Use
699         static_inline rather than static inline.
700         (XCALLOC): Optimize sizeof(T) = 1 case.
701         * lib/xmalloc.c (static_inline) [!HAVE_INLINE]: New macro.
702
703 2006-11-07  Bruno Haible  <bruno@clisp.org>
704
705         * lib/xalloc.h (XNMALLOC): Restore optimization of sizeof(T) = 1 case.
706         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require gl_INLINE instead of
707         AC_C_INLINE.
708         * modules/xalloc (Files): Add m4/inline.m4.
709
710 2006-11-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
711
712         * README: Fix typo.
713         * doc/gnulib.texi (Miscellaneous Notes): Likewise, rename...
714         (Miscellanous Notes): ...from this.
715
716 2006-11-07  Paul Eggert  <eggert@cs.ucla.edu>
717
718         * m4/flexmember.m4 (AC_C_FLEXIBLE_ARRAY_MEMBER):
719         Mention that offsetof should be used instead of sizeof.
720         From Bruno Haible.
721
722 2006-11-07  Bruno Haible  <bruno@clisp.org>
723
724         * lib/w32spawn.h (prepare_spawn): Use XNMALLOC instead of xmalloc.
725
726 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
727
728         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
729         * lib/gl_anyavltree_list2.h (create_subtree_with_contents):
730         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
731         (gl_tree_add_before, gl_tree_add_after):
732         Use XMALLOC instead of xmalloc, and XCALLOC instead of xzalloc.
733         * lib/gl_anyhash_list2.h (hash_resize): Likewise.
734         * lib/gl_anylinked_list2.h (gl_linked_create_empty, gl_linked_create):
735         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before):
736         (gl_linked_add_after, gl_linked_add_at): Likewise.
737         * lib/gl_anyrbtree_list2.h (create_subtree_with_contents):
738         (gl_tree_create, gl_tree_add_first, gl_tree_add_last):
739         (gl_tree_add_before, gl_tree_add_after): Likewise.
740         * lib/gl_anytree_list2.h (gl_tree_create_empty): Likewise.
741         * lib/gl_anytree_oset.h (gl_tree_create_empty): Likewise.
742         * lib/gl_anytreehash_list1.h (add_to_bucket): Likewise.
743
744 2006-11-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
745
746         * lib/gl_oset.h: Use C comment style, not C++ comment style.
747
748 2006-11-06  Bruno Haible  <bruno@clisp.org>
749
750         * m4/inline.m4: New file.
751         * m4/gl_list.m4 (gl_LIST): Require gl_INLINE.
752         * modules/list (Files): Add m4/inline.m4.
753         * modules/oset (Files): Likewise.
754
755 2006-11-06  Paul Eggert  <eggert@cs.ucla.edu>
756
757         * lib/idcache.c: Include <stddef.h>, for offsetof.
758         (struct userid.name): Change from char * to a flexible array member.
759         All uses changed.
760         * modules/idcache (Depends-on): Add flexmember.
761
762         * MODULES.html.sh (Core language properties): New module flexmember.
763         * modules/flexmember, m4/flexmember.m4: New files.
764
765         * lib/xalloc.h (xnmalloc, xnrealloc, x2nrealloc): Now static
766         inline functions that are identical with the old xnmalloc_inline,
767         xnrealloc_inline, x2nrealloc_inline of lib/xmalloc.c.  This is so
768         that we can avoid some unnecessary integer multiplications and
769         divisions in the common case where the element size is known at
770         compile time.
771         (XNMALLOC) [HAVE_INLINE]: Remove special case, which is no longer
772         needed.
773         (xnboundedmalloc): Remove.
774         (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): Use lower-case letters for
775         arguments, for consistency with rest of this header.
776         (xcharalloc): Rewrite using XNMALLOC.
777         * lib/xmalloc.c (xnmalloc_inline, xnmalloc, xnrealloc_inline):
778         (xnrealloc, x2nrealloc_inline, x2nrealloc): Remove.  The *_inline
779         versions have been moved to lib/xalloc.h and renamed to be the
780         non-*_inline versions.
781         (xmalloc, xrealloc): Implement without reference to the xnmalloc
782         and xnrealloc functions, since those functions are now inline and
783         now call us.
784         (x2realloc): Invoke x2realloc, not x2realloc_inline, to accommodate
785         renaming described above.
786         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Remove AC_C_INLINE since
787         xmalloc.c no longer uses inline directly.  gl_PREREQ_XALLOC now
788         captures the dependency in AC_C_INLINE.
789
790         New module canonicalize-lgpl, proposed by Charles Wilson in
791         <http://lists.gnu.org/archive/html/bug-gnulib/2006-11/msg00020.html>
792         with a few small changes afterwards.
793         * MODULES.html.sh (File system functions): New module
794         canonicalize-lgpl.
795         * lib/canonicalize.h: Add comments for canonicalize_filename_mode
796         and canonicalize_file_name.
797         * lib/canonicalize-lgpl.c, m4/canonicalize-lgpl.m4:
798         * modules/canonicalize-lgpl: New files.
799
800 2006-11-05  Bruno Haible  <bruno@clisp.org>
801
802         * gnulib-tool (func_import, func_create_testdir): Create directories
803         also for files in subdirectories of lib/.
804
805 2006-11-05  Bruno Haible  <bruno@clisp.org>
806
807         * lib/gl_array_list.c (gl_array_iterator_next): Make pointer decrement
808         ANSI C compliant.
809
810 2006-11-03  Bruno Haible  <bruno@clisp.org>
811
812         Simplify xmalloc expressions. Add overflow check in xmalloc arguments.
813         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Require AC_C_INLINE.
814         * lib/xalloc.h (XMALLOC, XNMALLOC, XZALLOC, XCALLOC): New macros.
815         (xnboundedmalloc): New inline function.
816         * lib/classpath.c (new_classpath): Use XNMALLOC instead of xmalloc.
817         * lib/clean-temp.c (create_temp_dir): Use XNMALLOC, XMALLOC instead of
818         xmalloc.
819         * lib/concatpath.c (concatenated_pathname): Use XNMALLOC instead of
820         xmalloc.
821         * lib/fatal-signal.c (at_fatal_signal): Use XNMALLOC instead of xmalloc.
822         * lib/findprog.c (find_in_path): Use XNMALLOC instead of xmalloc.
823         * lib/gl_array_list.c (gl_array_create_empty): Use XMALLOC instead of
824         xmalloc.
825         (gl_array_create): Use XNMALLOC, XMALLOC instead of xmalloc.
826         * lib/gl_array_oset.c (gl_array_create_empty): Use XNMALLOC instead of
827         xmalloc.
828         * lib/gl_avltree_oset.c (gl_tree_add_first, gl_tree_add_before,
829         gl_tree_add_after): Use XMALLOC instead of xmalloc.
830         * lib/gl_carray_list.c (gl_carray_create_empty): Use XMALLOC instead of
831         xmalloc.
832         (gl_carray_create): Use XNMALLOC, XMALLOC instead of xmalloc.
833         * lib/gl_rbtree_oset.c (gl_tree_add_first, gl_tree_add_before,
834         gl_tree_add_after): Use XMALLOC instead of xmalloc.
835         * lib/gl_sublist.c (gl_sublist_create): Use XMALLOC instead of xmalloc.
836         * lib/pagealign_alloc.c (new_memnode): Use XMALLOC instead of xmalloc.
837         * lib/sh-quote.c (shell_quote_argv): Use XNMALLOC instead of xmalloc.
838         * lib/xvasprintf.c (xstrcat): Use XNMALLOC instead of xmalloc.
839
840 2006-11-03  Bruno Haible  <bruno@clisp.org>
841
842         * lib/c-ctype.h [C++]: Define functions without name mangling.
843         * lib/fwriteerror.h [C++]: Likewise.
844         * lib/gcd.h [C++]: Likewise.
845         * lib/linebreak.h [C++]: Likewise.
846
847 2006-11-03  Paul Eggert  <eggert@cs.ucla.edu>
848
849         * lib/canonicalize.h: (canonicalize_mode_t, CAN_EXISTING):
850         (CAN_ALL_BUT_LAST, CAN_MISSING, canonicalize_filename_mode):
851         Define only if PROVIDE_CANONICALIZE_FILENAME_MODE is defined.
852         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
853         Check for functions and headers just once.
854         Check for declaration of canonicalize_file_name.
855         Define PROVIDE_CANONICALIZE_FILENAME_MODE.
856
857 2006-11-02  Charles Wilson  <cygwin@cwilson.fastmail.fm>
858
859         * gnulib-tool (func_import): Fix typo in actioncmd.
860
861 2006-11-02  Bruno Haible  <bruno@clisp.org>
862
863         * gnulib-tool (func_get_automake_snippet): Interpret a backslash-
864         newline sequence in the Makefile.am snippet as a space, like "make"
865         does.
866         Reported by Roger Persson <perrog@gmail.com>.
867
868 2006-11-01  Bruno Haible  <bruno@clisp.org>
869
870         * m4/strcase.m4 (gl_FUNC_STRNCASECMP): Check whether strncasecmp is
871         already declared in <string.h>.
872         * lib/strcase.h (strncasecmp): Don't declare it if yes.
873
874 2006-11-01  Bruno Haible  <bruno@clisp.org>
875
876         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Don't define strcasecmp here.
877         * lib/strcase.h: Include <string.h>.
878         (strcasecmp): Define to rpl_strcasecmp here.
879
880 2006-11-01  Bruno Haible  <bruno@clisp.org>
881
882         * lib/printf-parse.c (PRINTF_PARSE): Cast malloc/realloc results.
883
884 2006-11-01  Eric Blake  <ebb9@byu.net>
885
886         * lib/mkstemp-safer.c (mkstemp_safer): Allow C++ compilation.
887
888         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Allow C++ configuration.
889
890 2006-10-29  Bruno Haible  <bruno@clisp.org>
891
892         Make it compile in C++ mode.
893         * lib/full-write.c (full_rw): Add a cast.
894
895 2006-11-01  Bruno Haible  <bruno@clisp.org>
896
897         * gnulib-tool (func_get_automake_snippet): Change sed_combine_lines to
898         be POSIX compliant.
899         Reported by Roger Persson <perrog@gmail.com>.
900
901 2006-11-01  Eric Blake  <ebb9@byu.net>
902
903         * lib/getopt_.h: Fix comments.
904
905 2006-10-31  Eric Blake  <ebb9@byu.net>
906
907         * modules/tmpdir (Depends-on): Add sys_stat.
908         * modules/mkdtemp (Depends-on): Add tempname, drop unistd.
909         * lib/mkdtemp.c (gen_tempname): Remove; tempname covers this.
910         * lib/tmpdir.c (S_ISDIR): Simplify, thanks to sys_stat.
911         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Simplify, thanks to
912         tempname.
913
914 2006-10-31  Paul Eggert  <eggert@cs.ucla.edu>
915
916         Avoid some C++ diagnostics reported by Bruno Haible.
917         * lib/quotearg.c (clone_quoting_options): Use xmemdup rather than
918         xmalloc.
919         (quotearg_alloc): Use xcharalloc rather than xmalloc.
920         (struct slotvec): Move to top level.
921         (quotearg_n_options): Rewrite to avoid xmalloc.
922         * lib/xalloc.h (xcharalloc): New function.
923         * (xrealloc, xnrealloc, x2realloc, x2nrealloc, xmemdup):
924         [defined __cplusplus]: Add function template that provides result
925         type propagation.  This part of the change is from Bruno Haible.
926
927 2006-10-29  Bruno Haible  <bruno@clisp.org>
928
929         Make it compile in C++ mode.
930         * lib/striconv.c (mem_cd_iconv): Cast malloc/realloc result.
931         * lib/strnlen1.c (strnlen1): Cast memchr result.
932         * lib/mbchar.h (mb_copy): Rename arguments to 'new_mbc', 'old_mbc'.
933         * lib/clean-temp.c (string_equals, string_hash): Add casts.
934         (create_temp_dir): Rename local variable 'template'.
935         (compile_csharp_using_sscli): Add cast.
936         * lib/fatal-signal.c (at_fatal_signal): Cast xmalloc result.
937         * lib/findprog.c (find_in_path): Likewise.
938         * lib/linebreak.c (mbs_width_linebreaks): Cast malloc result.
939         * lib/wait-process.c (register_slave_subprocess): Likewise.
940
941 2006-10-22  Bruno Haible  <bruno@clisp.org>
942
943         * modules/tsearch: New file.
944         * lib/tsearch.h: New file.
945         * lib/tsearch.c: New file, from glibc-2.5 with small modifications.
946         * m4/tsearch.m4: New file.
947         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add tsearch.
948
949 2006-10-29  Eric Blake  <ebb9@byu.net>
950
951         * lib/arcfour.c: Assume config.h.
952         * lib/arctwo.c: Likewise.
953         * lib/base64.c: Likewise.
954         * lib/check-version.c: Likewise.
955         * lib/crc.c: Likewise.
956         * lib/des.c: Likewise.
957         * lib/gc-gnulib.c: Likewise.
958         * lib/gc-libgcrypt.c: Likewise.
959         * lib/gc-pbkdf2-sha1.c: Likewise.
960         * lib/getaddrinfo.c: Likewise.
961         * lib/getdelim.c: Likewise.
962         * lib/getline.c: Likewise.
963         * lib/hmac-md5.c: Likewise.
964         * lib/hmac-sha1.c: Likewise.
965         * lib/iconvme.c: Likewise.
966         * lib/md2.c: Likewise.
967         * lib/md4.c: Likewise.
968         * lib/memxor.c: Likewise.
969         * lib/read-file.c: Likewise.
970         * lib/readline.c: Likewise.
971         * lib/rijndael-alg-fst.c: Likewise.
972         * lib/rijndael-api-fst.c: Likewise.
973         * lib/xgetdomainname.c: Likewise.
974
975 2006-10-28  Eric Blake  <ebb9@byu.net>
976
977         * lib/xstrndup.c: Assume config.h.
978
979 2006-10-27  Paul Eggert  <eggert@cs.ucla.edu>
980
981         Move stat.h-substitute stuff from lib/stat-macros.h to lib/stat_.h.
982         stat-macros.h is now for our own macros, whereas stat_h is for
983         macros in the <sys/stat.h> name space.
984         * lib/stat-macros.h: Remove copyright notice, as this file is now tiny.
985         (STAT_MACROS_H): Remove.
986         (S_IFMT, S_ISBLK, S_ISCHR, S_ISDIR, S_ISFIFO, S_ISLNK, S_ISNAM):
987         (S_ISMPB, S_ISMPC, S_ISNWK, S_ISREG, S_ISSOCK, S_ISDOOR, S_ISPORT):
988         (S_TYPEISMQ, S_TYPEISTMO, S_TYPEISSEM, S_TYPEISSHM, S_ISCTG, S_ISOFD):
989         (S_ISOFL, S_ISWHT, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IRGRP):
990         (S_IROTH, S_IWUSR, S_IWGRP, S_IWOTH, S_IXUSR, S_IXGRP, S_IXOTH):
991         (S_IRWXU, S_IRWXG, S_IRWXO, S_IXUGO, S_IRWXUGO):
992         Move these macros to ...
993         * lib/stat_.h: here.  Don't include stat-macros.h.
994         * lib/canonicalize.c: Don't include stat-macros.h.
995         * lib/chown.c: Likewise.
996         * lib/euidaccess.c: Likewise.
997         * lib/file-type.c: Likewise.
998         * lib/filemode.c: Likewise.
999         * lib/glob.c: Likewise.
1000         * lib/isapipe.c: Likewise.
1001         * lib/lchown.c: Likewise.
1002         * lib/lstat.c: Likewise.
1003         * lib/mkdir-p.c: Likewise.
1004         * lib/rmdir.c: Likewise.
1005         * m4/lchown.m4 (gl_FUNC_LCHOWN): Don't require gl_STAT_MACROS.
1006         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Don't check for io.h
1007         unless mkdir isn't declared, to speed up 'configure'.
1008         Always create sys/stat.h, since it's unlikely any real sys/stat.h
1009         would define all the S_* symbols.
1010         * modules/canonicalize (Depends-on):
1011         Depend on sys_stat, not stat-macros.
1012         * modules/chown: Likewise.
1013         * modules/euidaccess: Likewise.
1014         * modules/filemode: Likewise.
1015         * modules/file-type: Likewise.
1016         * modules/glob: Likewise.
1017         * modules/isapipe: Likewise.
1018         * modules/lchown: Likewise.
1019         * modules/lstat: Likewise.
1020         * modules/mkancesdirs: Likewise.
1021         * modules/rmdir: Likewise.
1022         * modules/mkdir-p (Depends-on): Also depend on sys_stat.
1023         * modules/modechange: Likewise.
1024         * modules/stat-macros (Files): Remove m4/stat-macros.m4.
1025         (configure.ac): Remove gl_STAT_MACROS.
1026         * modules/sys_stat (Depends-on): Remove stat-macros.
1027
1028 2006-10-27  Bruno Haible  <bruno@clisp.org>
1029
1030         * m4/signed.m4: Remove file.
1031         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS_: Remove bh_C_SIGNED
1032         invocation.
1033         * modules/vasnprintf (Files): Remove m4/signed.m4.
1034
1035 2006-10-27  Bruno Haible  <bruno@clisp.org>
1036
1037         Update to GNU gettext 0.16.
1038         * modules/gettext (Files): Add m4/intl.m4, m4/intldir.m4. Remove
1039         m4/inttypes-h.m4, m4/signed.m4.
1040         * m4/gettext.m4: Update to GNU gettext 0.16.
1041         * m4/intl.m4: New file, from GNU gettext.
1042         * m4/intldir.m4: New file, from GNU gettext.
1043         * config/srclist.txt: Update
1044
1045 2006-10-27  Eric Blake  <ebb9@byu.net>
1046
1047         * MODULES.html.sh: Document tempname.
1048         * modules/mkstemp (Depends-on): Add tempname, and drop transitive
1049         dependencies.
1050         (Files): Move lib/tempname.c...
1051         * modules/tempname: ...to this new module.
1052         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Remove tempname checks.
1053         (gl_PREREQ_TEMPNAME): Move...
1054         * m4/tempname.m4: ...to this new file.
1055         * lib/mkstemp.c (includes) [!_LIBC]: Use tempname.h.
1056         * modules/sys_stat (Depends-on): Add stat-macros.
1057         * lib/stat_.h (includes): Pick up stat macros.
1058         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Replace <sys/stat.h>
1059         if stat macros are broken.
1060         * lib/tempname.c (includes): No need to include "stat-macros.h".
1061         (__gen_tempname) [!_LIBC]: Expose as gen_tempname.
1062         (direxists, __path_search) [!_LIBC]: Don't compile these in
1063         gnulib; the tmpdir module covers that.
1064         * lib/tempname.h: New file.
1065
1066 2006-10-26  Paul Eggert  <eggert@cs.ucla.edu>
1067
1068         * COPYING: Explain how gnulib-tool converts licence headers.
1069         Almost all wording by Eric Blake.
1070
1071 2006-10-25  Paul Eggert  <eggert@cs.ucla.edu>
1072
1073         * lib/mbchar.h (is_basic_table): Make read-only.
1074         * lib/mbchar.c (is_basic_table): Likewise.
1075         Reported by John Darrington.
1076
1077 2006-10-25  Bruno Haible  <bruno@clisp.org>
1078
1079         * lib/progname.h (set_program_name): Undefine before defining.
1080
1081 2006-10-25  Bruno Haible  <bruno@clisp.org>
1082
1083         * lib/gettext.h (_LIBGETTEXT_HAVE_VARIABLE_SIZE_ARRAYS): Define to
1084         false for non-gcc C++ compilers.
1085         Reported by Nelson H. F. Beebe <beebe@math.utah.edu>.
1086
1087 2006-10-24  Bruno Haible  <bruno@clisp.org>
1088
1089         * lib/striconv.c (mem_cd_iconv, str_cd_iconv): Treat all non-GNU
1090         iconv implementations like Irix iconv.
1091
1092 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1093
1094         * modules/vararrays: New file.
1095         * m4/vararrays.m4: New file, taken from diffutils.
1096         * MODULES.html.sh: New module vararrays.
1097
1098 2006-10-24  Karl Berry  <karl@gnu.org>
1099
1100         * doc/gnulib-intro.texi: --- instead of --; non-naive naive.
1101         Don't call GNU Unix.
1102
1103 2006-10-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1104
1105         * users.txt: Add Libtool.
1106
1107         Sync from Libtool:
1108
1109         2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1110
1111         * lib/argz.c: Remove check for HAVE_CONFIG_H, to conform
1112         to gnulib's policy of including config.h unconditionally.
1113
1114 2006-10-24  Bruno Haible  <bruno@clisp.org>
1115
1116         * modules/wcwidth (Files): Add m4/wint_t.m4.
1117         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Require gt_TYPE_WINT_T.
1118         * lib/wcwidth.h (iswprint): Use 'int' if 'wint_t' is not defined.
1119
1120 2006-10-24  Paul Eggert  <eggert@cs.ucla.edu>
1121
1122         * lib/getdate.y (yyerror): Make the arguments pointer-to-const,
1123         to pacify GCC with some -W flags enabled.  Problem reported by
1124         Bruno Haible.
1125
1126 2006-10-24  Jim Meyering  <jim@meyering.net>
1127
1128         * MODULES.html.sh: Remove uinttostr.  It's not a module.
1129         Reported by Karl Berry.
1130
1131 2006-10-23  Bruno Haible  <bruno@clisp.org>
1132
1133         * lib/fts.c (fts_build): Move variable declaration, for C89 compliance.
1134
1135 2006-10-24  Bruno Haible  <bruno@clisp.org>
1136
1137         * lib/gl_list.h: Use C comment style, not C++ comment style.
1138
1139 2006-10-23  Eric Blake  <ebb9@byu.net>
1140
1141         * lib/getaddrinfo.c (includes): Add missing include.
1142
1143 2006-10-23  Bruno Haible  <bruno@clisp.org>
1144             Paul Eggert  <eggert@cs.ucla.edu>
1145
1146         Ability to rename obstack_free.
1147         * lib/obstack.h (__obstack_free): New macro. Declare instead of
1148         obstack_free.
1149         (obstack_free): Invoke the __obstack_free macro.
1150         * lib/obstack.c (obstack_free): Use __obstack_free macro.
1151
1152 2006-10-23  Bruno Haible  <bruno@clisp.org>
1153             Paul Eggert  <eggert@cs.ucla.edu>
1154
1155         * lib/argp.h (argp_parse, __argp_parse): Comment out the identifiers
1156         __argc, __argv from the declaration. (They are defined as macros on
1157         mingw.)
1158
1159 2006-10-22  Bruno Haible  <bruno@clisp.org>
1160
1161         * doc/gnulib-intro.texi: New file.
1162         * doc/gnulib.texi: Include it.
1163
1164 2006-10-21  Bruno Haible  <bruno@clisp.org>
1165
1166         * doc/gnulib.texi: Split the chapter "Gnulib" into 3 chapters
1167         "Introduction", "Miscellanous Notes", "Particular Modules".
1168
1169 2006-10-21  Bruno Haible  <bruno@clisp.org>
1170
1171         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
1172         Change mostlyclean-local rule to avoid sh syntax error from bash
1173         versions 2.00..2.05 when $(MOSTLYCLEANDIRS) is empty.
1174
1175 2006-10-23  Jim Meyering  <jim@meyering.net>
1176
1177         * lib/getaddrinfo.c (getnameinfo): Use new lightweight uinttostr,
1178         in place of snprintf.
1179
1180         * modules/inttostr (Files): Add lib/uinttostr.c.
1181         * lib/uinttostr.c (inttostr): New file/function.
1182         * lib/inttostr.h (uinttostr): Declare.
1183         * m4/inttostr.m4: Add AC_LIBOBJ([uinttostr]).
1184         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
1185         Add uinttostr.
1186         * modules/getaddrinfo (Depends-on): Remove snprintf.  Add inttostr.
1187
1188 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1189
1190         * lib/canonicalize.c (ELOOP): Define if not already defined.
1191         Problem reported by Bruno Haible in
1192         <http://lists.gnu.org/archive/html/bug-gnulib/2006-10/msg00282.html>.
1193
1194 2006-10-21  Paul Eggert  <eggert@cs.ucla.edu>
1195
1196         * lib/stdint_.h [defined _AIX]: Don't include <sys/types.h>.
1197         Problem reported by Perry Smith and Ville Laurikari.
1198
1199         * lib/getndelim2.c (SSIZE_MAX): Use same defn that getdelim.c
1200         uses.
1201
1202 2006-10-19  Bruno Haible  <bruno@clisp.org>
1203
1204         * lib/getndelim2.c (SSIZE_MAX): Provide fallback definition. Needed
1205         for mingw.
1206
1207 2006-10-19  Bruno Haible  <bruno@clisp.org>
1208
1209         * lib/openat-priv.h (EOPNOTSUPP): Provide fallback definition.
1210         Needed for mingw.
1211
1212 2006-10-19  Bruno Haible  <bruno@clisp.org>
1213
1214         * m4/size_max.m4 (gl_SIZE_MAX): Cache the result.
1215
1216 2006-10-19  Bruno Haible  <bruno@clisp.org>
1217
1218         * m4/allocsa.m4 (gl_ALLOCSA): Invoke gl_FUNC_ALLOCA, don't AC_REQUIRE
1219         it.
1220
1221 2006-10-19  Bruno Haible  <bruno@clisp.org>
1222
1223         * m4/alloca.m4 (gl_FUNC_ALLOCA): Cache the result of the AC_EGREP_CPP
1224         invocation.
1225
1226 2006-10-19  Bruno Haible  <bruno@clisp.org>
1227
1228         * gnulib-tool (func_create_testdir): Don't include ftruncate and
1229         mountlist by default.
1230
1231 2006-10-16  Bruno Haible  <bruno@clisp.org>
1232
1233         * lib/c-strstr.c: Include c-strstr.h.
1234
1235 2006-10-18  Charles Wilson  <cygwin@cwilson.fastmail.fm>
1236
1237         * gnulib-tool: Don't clobber $sourcebase when $local_gnulib_dir ends
1238         in a slash.
1239
1240 2006-10-18  Bruno Haible  <bruno@clisp.org>
1241
1242         * lib/lock.h [C++]: Wrap definitions in extern "C".
1243
1244 2006-10-18  Bruno Haible  <bruno@clisp.org>
1245
1246         * gnulib-tool (func_emit_initmacro_end): Remove duplicates from the
1247         gl_LIBOBJS list.
1248
1249 2006-10-18  Bruno Haible  <bruno@clisp.org>
1250
1251         * lib/findprog.c (find_in_path): Avoid "gcc -Wwrite-strings" warning.
1252
1253 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>
1254
1255         * lib/xstrtol.h: Include gettext.h.
1256         (_STRTOL_ERROR): Wrap English-language formats inside gettext.
1257         Problem reported by Eric Blake.
1258         * modules/xstrtol (Depends-on): Add gettext-h.
1259
1260 2006-10-19  Paul Eggert  <eggert@cs.ucla.edu>  (tiny change)
1261
1262         * lib/strftime.c (advance): New macro.
1263         (add): Use it to avoid adding 0 to a FILE *.  FILE can be an
1264         incomplete type, so you can't add 0 to it.  Problem and patch
1265         reported by Eelco Dolstra for dietlibc.
1266
1267 2006-10-18  Jim Meyering  <jim@meyering.net>
1268
1269         * lib/readutmp.c (desirable_utmp_entry): Use "bool" as the
1270         type for a local, and rename it: s/up/user_proc/.
1271
1272 2006-10-18  Sergey Poznyakoff  <gray@gnu.org.ua>
1273
1274         * lib/readutmp.c (desirable_utmp_entry): Implement new flag:
1275         READ_UTMP_USER_PROCESS.
1276         * lib/readutmp.h (READ_UTMP_USER_PROCESS): New flag
1277
1278 2006-10-17  Paul Eggert  <eggert@cs.ucla.edu>
1279
1280         * lib/localcharset.c: Do not check HAVE_SETLOCALE.
1281         * m4/localcharset.m4 (gl_LOCALCHARSET): Don't check for setlocale.
1282
1283 2006-10-17  Eric Blake  <ebb9@byu.net>
1284
1285         * lib/sigprocmask.c (sigprocmask): Fix typo.
1286
1287         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Fix typo.
1288
1289         * modules/clean-temp (Makefile.am): Don't add to make output...
1290         (configure.ac): ...instead define SIGNAL_SAFE_LIST inside
1291         config.h.
1292
1293 2006-10-17  Bruno Haible  <bruno@clisp.org>
1294
1295         * lib/gettext.h (gettext, ngettext, pgettext, npgettext): Define
1296         differently if DEFAULT_TEXT_DOMAIN is set.
1297
1298 2006-10-16  Bruno Haible  <bruno@clisp.org>
1299
1300         * lib/clean-temp.c: Include fwriteerror.h.
1301
1302 2006-10-16  Bruno Haible  <bruno@clisp.org>
1303
1304         * getndelim2.m4 (gl_GETNDELIM2): Remove 2003-10-23 hack.
1305
1306 2006-10-16  Bruno Haible  <bruno@clisp.org>
1307
1308         * m4/signalblocking.m4 (gl_PREREQ_SIGPROCMASK): Also test for sigset_t.
1309         * lib/sigprocmask.h: Include <sys/types.h>.
1310         (sigset_t): Use the system's definition if present.
1311
1312 2006-10-17  Eric Blake  <ebb9@byu.net>
1313
1314         * lib/xvasprintf.c (includes): Assume config.h.
1315         * lib/xasprintf.c (includes): Likewise.
1316
1317 2006-10-16  Paul Eggert  <eggert@cs.ucla.edu>
1318
1319         * lib/fsusage.c (PROPAGATE_ALL_ONES): Don't assume uintmax_t is
1320         at least as wide as intmax_t.
1321
1322 2006-10-16  Alexandre Duret-Lutz  <adl@gnu.org>
1323
1324         (Imported from Automake.)
1325         * build-aux/gnupload: Update to version 1.1 of directive file.
1326
1327 2006-10-16  Eric Blake  <ebb9@byu.net>
1328
1329         * modules/configmake (Makefile.am): Add pkglibexecdir support, to
1330         match Automake 1.10a.
1331
1332 2006-10-14  Bruno Haible  <bruno@clisp.org>
1333
1334         * modules/sigprocmask: New file.
1335         * lib/sigprocmask.h: New file.
1336         * lib/sigprocmask.c: New file.
1337         * m4/signalblocking.m4 (gl_SIGNALBLOCKING): Renamed from
1338         gt_SIGNALBLOCKING. When not defining HAVE_POSIX_SIGNALBLOCKING,
1339         request sigprocmask.o.
1340         (gl_PREREQ_SIGPROCMASK): New macro.
1341         * modules/fatal-signal (Files): Remove m4/signalblocking.m4.
1342         (Depends-on): Add sigprocmask.
1343         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Don't require
1344         gt_SIGNALBLOCKING. Test for 'raise' only once.
1345         * lib/fatal-signal.c: Include sigprocmask.h.
1346         (fatal_signal_set, init_fatal_signal_set, block_fatal_signals,
1347         unblock_fatal_signals): Define always.
1348         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
1349         sigprocmask.
1350
1351 2006-10-14  Paul Eggert  <eggert@cs.ucla.edu>
1352
1353         Sync from Automake.
1354         * build-aux/install-sh (posix_mkdir): Reject FreeBSD 6.1 mkdir -p -m,
1355         which incorrectly sets the mode of an existing destination
1356         directory.  In some cases the unpatched install-sh could do the
1357         equivalent of "chmod 777 /" or "chmod 0 /" on a buggy FreeBSD
1358         system.  We hope this is rare in practice, but it's clearly worth
1359         fixing.  Problem reported by Alex Unleashed in
1360         <http://lists.gnu.org/archive/html/bug-autoconf/2006-10/msg00012.html>.
1361         Also, don't bother to check for -m bugs unless we're using -m;
1362         suggested by Stepan Kasal.
1363
1364 2006-10-14  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
1365
1366         Sync from Automake.
1367         * build-aux/depcomp (gcc3): Put dependency extraction flags before the
1368         `-c' flag, so they appear at the same position as in %FASTDEP%
1369         mode in depend2.am.  Fixes build failure for FreeBSD's c89,
1370         which ignores unknown options only after the first non-option.
1371         Bug report against M4 by Nelson H. F. Beebe.
1372
1373 2006-10-13  Jim Meyering  <jim@meyering.net>
1374
1375         Fix a bug in yesterday's change.
1376         * lib/fts.c (fts_open): When using FTS_XDEV|FTS_NOSTAT,
1377         p->fts_statp->st_dev would be used uninitialized.
1378         Ensures that we always call fts_stat on the very first entry.
1379         Miklos Szeredi reported that find -xdev stopped working.
1380
1381 2006-10-12  Bruno Haible  <bruno@clisp.org>
1382
1383         * gnulib-tool (func_get_automake_snippet): Append an automatically
1384         computed EXTRA_DIST augmentation.
1385         * modules/acl (Makefile.am): Remove EXTRA_DIST augmentation.
1386         * modules/alloca-opt (Makefile.am): Likewise.
1387         * modules/allocsa (Makefile.am): Likewise.
1388         * modules/arcfour (Makefile.am): Likewise.
1389         * modules/arctwo (Makefile.am): Likewise.
1390         * modules/argmatch (Makefile.am): Likewise.
1391         * modules/argz (Makefile.am): Likewise.
1392         * modules/atexit (Makefile.am): Likewise.
1393         * modules/backupfile (Makefile.am): Likewise.
1394         * modules/byteswap (Makefile.am): Likewise.
1395         * modules/c-strtod (Makefile.am): Likewise.
1396         * modules/c-strtold (Makefile.am): Likewise.
1397         * modules/calloc (Makefile.am): Likewise.
1398         * modules/canon-host (Makefile.am): Likewise.
1399         * modules/canonicalize (Makefile.am): Likewise.
1400         * modules/chdir-long (Makefile.am): Likewise.
1401         * modules/chdir-safer (Makefile.am): Likewise.
1402         * modules/check-version (Makefile.am): Likewise.
1403         * modules/chown (Makefile.am): Likewise.
1404         * modules/cloexec (Makefile.am): Likewise.
1405         * modules/close-stream (Makefile.am): Likewise.
1406         * modules/closeout (Makefile.am): Likewise.
1407         * modules/crc (Makefile.am): Likewise.
1408         * modules/csharpexec (Makefile.am): Likewise.
1409         * modules/cycle-check (Makefile.am): Likewise.
1410         * modules/des (Makefile.am): Likewise.
1411         * modules/dev-ino (Makefile.am): Likewise.
1412         * modules/dirfd (Makefile.am): Likewise.
1413         * modules/dirname (Makefile.am): Likewise.
1414         * modules/dup2 (Makefile.am): Likewise.
1415         * modules/eealloc (Makefile.am): Likewise.
1416         * modules/error (Makefile.am): Likewise.
1417         * modules/euidaccess (Makefile.am): Likewise.
1418         * modules/exclude (Makefile.am): Likewise.
1419         * modules/exitfail (Makefile.am): Likewise.
1420         * modules/fcntl-safer (Makefile.am): Likewise.
1421         * modules/fcntl (Makefile.am): Likewise.
1422         * modules/file-type (Makefile.am): Likewise.
1423         * modules/fileblocks (Makefile.am): Likewise.
1424         * modules/filemode (Makefile.am): Likewise.
1425         * modules/filenamecat (Makefile.am): Likewise.
1426         * modules/fnmatch (Makefile.am): Likewise.
1427         * modules/fopen-safer (Makefile.am): Likewise.
1428         * modules/fpending (Makefile.am): Likewise.
1429         * modules/fprintftime (Makefile.am): Likewise.
1430         * modules/free (Makefile.am): Likewise.
1431         * modules/fsusage (Makefile.am): Likewise.
1432         * modules/ftruncate (Makefile.am): Likewise.
1433         * modules/fts (Makefile.am): Likewise.
1434         * modules/gc-arcfour (Makefile.am): Likewise.
1435         * modules/gc-des (Makefile.am): Likewise.
1436         * modules/gc-hmac-md5 (Makefile.am): Likewise.
1437         * modules/gc-hmac-sha1 (Makefile.am): Likewise.
1438         * modules/gc-md4 (Makefile.am): Likewise.
1439         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1440         * modules/gc-sha1 (Makefile.am): Likewise.
1441         * modules/gc (Makefile.am): Likewise.
1442         * modules/getaddrinfo (Makefile.am): Likewise.
1443         * modules/getcwd (Makefile.am): Likewise.
1444         * modules/getdelim (Makefile.am): Likewise.
1445         * modules/getdomainname (Makefile.am): Likewise.
1446         * modules/getgroups (Makefile.am): Likewise.
1447         * modules/gethostname (Makefile.am): Likewise.
1448         * modules/gethrxtime (Makefile.am): Likewise.
1449         * modules/getline (Makefile.am): Likewise.
1450         * modules/getloadavg (Makefile.am): Likewise.
1451         * modules/getlogin_r (Makefile.am): Likewise.
1452         * modules/getndelim2 (Makefile.am): Likewise.
1453         * modules/getopt (Makefile.am): Likewise.
1454         * modules/getpagesize (Makefile.am): Likewise.
1455         * modules/getpass-gnu (Makefile.am): Likewise.
1456         * modules/getpass (Makefile.am): Likewise.
1457         * modules/getsubopt (Makefile.am): Likewise.
1458         * modules/gettime (Makefile.am): Likewise.
1459         * modules/gettimeofday (Makefile.am): Likewise.
1460         * modules/getugroups (Makefile.am): Likewise.
1461         * modules/getusershell (Makefile.am): Likewise.
1462         * modules/glob (Makefile.am): Likewise.
1463         * modules/group-member (Makefile.am): Likewise.
1464         * modules/hard-locale (Makefile.am): Likewise.
1465         * modules/hash (Makefile.am): Likewise.
1466         * modules/hmac-md5 (Makefile.am): Likewise.
1467         * modules/hmac-sha1 (Makefile.am): Likewise.
1468         * modules/human (Makefile.am): Likewise.
1469         * modules/idcache (Makefile.am): Likewise.
1470         * modules/imaxabs (Makefile.am): Likewise.
1471         * modules/imaxdiv (Makefile.am): Likewise.
1472         * modules/inet_ntop (Makefile.am): Likewise.
1473         * modules/inet_pton (Makefile.am): Likewise.
1474         * modules/intprops (Makefile.am): Likewise.
1475         * modules/inttostr (Makefile.am): Likewise.
1476         * modules/inttypes (Makefile.am): Likewise.
1477         * modules/isapipe (Makefile.am): Likewise.
1478         * modules/javaversion (Makefile.am): Likewise.
1479         * modules/lchmod (Makefile.am): Likewise.
1480         * modules/lchown (Makefile.am): Likewise.
1481         * modules/localcharset (Makefile.am): Likewise.
1482         * modules/long-options (Makefile.am): Likewise.
1483         * modules/lstat (Makefile.am): Likewise.
1484         * modules/malloc (Makefile.am): Likewise.
1485         * modules/mathl (Makefile.am): Likewise.
1486         * modules/mbchar (Makefile.am): Likewise.
1487         * modules/md2 (Makefile.am): Likewise.
1488         * modules/md4 (Makefile.am): Likewise.
1489         * modules/md5 (Makefile.am): Likewise.
1490         * modules/memcasecmp (Makefile.am): Likewise.
1491         * modules/memchr (Makefile.am): Likewise.
1492         * modules/memcmp (Makefile.am): Likewise.
1493         * modules/memcoll (Makefile.am): Likewise.
1494         * modules/memcpy (Makefile.am): Likewise.
1495         * modules/memmem (Makefile.am): Likewise.
1496         * modules/memmove (Makefile.am): Likewise.
1497         * modules/mempcpy (Makefile.am): Likewise.
1498         * modules/memrchr (Makefile.am): Likewise.
1499         * modules/memset (Makefile.am): Likewise.
1500         * modules/memxor (Makefile.am): Likewise.
1501         * modules/mkancesdirs (Makefile.am): Likewise.
1502         * modules/mkdir-p (Makefile.am): Likewise.
1503         * modules/mkdir (Makefile.am): Likewise.
1504         * modules/mkdtemp (Makefile.am): Likewise.
1505         * modules/mkstemp (Makefile.am): Likewise.
1506         * modules/mktime (Makefile.am): Likewise.
1507         * modules/modechange (Makefile.am): Likewise.
1508         * modules/mountlist (Makefile.am): Likewise.
1509         * modules/nanosleep (Makefile.am): Likewise.
1510         * modules/obstack (Makefile.am): Likewise.
1511         * modules/openat (Makefile.am): Likewise.
1512         * modules/pagealign_alloc (Makefile.am): Likewise.
1513         * modules/pathmax (Makefile.am): Likewise.
1514         * modules/physmem (Makefile.am): Likewise.
1515         * modules/poll (Makefile.am): Likewise.
1516         * modules/posixtm (Makefile.am): Likewise.
1517         * modules/posixver (Makefile.am): Likewise.
1518         * modules/putenv (Makefile.am): Likewise.
1519         * modules/quote (Makefile.am): Likewise.
1520         * modules/quotearg (Makefile.am): Likewise.
1521         * modules/raise (Makefile.am): Likewise.
1522         * modules/read-file (Makefile.am): Likewise.
1523         * modules/readline (Makefile.am): Likewise.
1524         * modules/readlink (Makefile.am): Likewise.
1525         * modules/readtokens (Makefile.am): Likewise.
1526         * modules/readutmp (Makefile.am): Likewise.
1527         * modules/realloc (Makefile.am): Likewise.
1528         * modules/regex (Makefile.am): Likewise.
1529         * modules/rename-dest-slash (Makefile.am): Likewise.
1530         * modules/rename (Makefile.am): Likewise.
1531         * modules/rijndael (Makefile.am): Likewise.
1532         * modules/rmdir (Makefile.am): Likewise.
1533         * modules/rpmatch (Makefile.am): Likewise.
1534         * modules/safe-read (Makefile.am): Likewise.
1535         * modules/safe-write (Makefile.am): Likewise.
1536         * modules/same-inode (Makefile.am): Likewise.
1537         * modules/same (Makefile.am): Likewise.
1538         * modules/save-cwd (Makefile.am): Likewise.
1539         * modules/savedir (Makefile.am): Likewise.
1540         * modules/setenv (Makefile.am): Likewise.
1541         * modules/settime (Makefile.am): Likewise.
1542         * modules/sha1 (Makefile.am): Likewise.
1543         * modules/sig2str (Makefile.am): Likewise.
1544         * modules/snprintf (Makefile.am): Likewise.
1545         * modules/stat-macros (Makefile.am): Likewise.
1546         * modules/stat-time (Makefile.am): Likewise.
1547         * modules/stdbool (Makefile.am): Likewise.
1548         * modules/stdint (Makefile.am): Likewise.
1549         * modules/stdlib-safer (Makefile.am): Likewise.
1550         * modules/stpcpy (Makefile.am): Likewise.
1551         * modules/stpncpy (Makefile.am): Likewise.
1552         * modules/strcase (Makefile.am): Likewise.
1553         * modules/strcasestr (Makefile.am): Likewise.
1554         * modules/strchrnul (Makefile.am): Likewise.
1555         * modules/strcspn (Makefile.am): Likewise.
1556         * modules/strdup (Makefile.am): Likewise.
1557         * modules/strerror (Makefile.am): Likewise.
1558         * modules/strftime (Makefile.am): Likewise.
1559         * modules/strndup (Makefile.am): Likewise.
1560         * modules/strnlen (Makefile.am): Likewise.
1561         * modules/strpbrk (Makefile.am): Likewise.
1562         * modules/strsep (Makefile.am): Likewise.
1563         * modules/strstr (Makefile.am): Likewise.
1564         * modules/strtod (Makefile.am): Likewise.
1565         * modules/strtoimax (Makefile.am): Likewise.
1566         * modules/strtok_r (Makefile.am): Likewise.
1567         * modules/strtol (Makefile.am): Likewise.
1568         * modules/strtoll (Makefile.am): Likewise.
1569         * modules/strtoul (Makefile.am): Likewise.
1570         * modules/strtoull (Makefile.am): Likewise.
1571         * modules/strtoumax (Makefile.am): Likewise.
1572         * modules/strverscmp (Makefile.am): Likewise.
1573         * modules/sys_socket (Makefile.am): Likewise.
1574         * modules/sys_stat (Makefile.am): Likewise.
1575         * modules/sysexits (Makefile.am): Likewise.
1576         * modules/time_r (Makefile.am): Likewise.
1577         * modules/timegm (Makefile.am): Likewise.
1578         * modules/timespec (Makefile.am): Likewise.
1579         * modules/tmpfile-safer (Makefile.am): Likewise.
1580         * modules/trim (Makefile.am): Likewise.
1581         * modules/unistd-safer (Makefile.am): Likewise.
1582         * modules/unlinkdir (Makefile.am): Likewise.
1583         * modules/unlocked-io (Makefile.am): Likewise.
1584         * modules/userspec (Makefile.am): Likewise.
1585         * modules/utime (Makefile.am): Likewise.
1586         * modules/utimecmp (Makefile.am): Likewise.
1587         * modules/utimens (Makefile.am): Likewise.
1588         * modules/vasnprintf (Makefile.am): Likewise.
1589         * modules/vasprintf (Makefile.am): Likewise.
1590         * modules/vsnprintf (Makefile.am): Likewise.
1591         * modules/xalloc (Makefile.am): Likewise.
1592         * modules/xgetcwd (Makefile.am): Likewise.
1593         * modules/xnanosleep (Makefile.am): Likewise.
1594         * modules/xreadlink (Makefile.am): Likewise.
1595         * modules/xstrtod (Makefile.am): Likewise.
1596         * modules/xstrtol (Makefile.am): Likewise.
1597         * modules/xstrtold (Makefile.am): Likewise.
1598         * modules/yesno (Makefile.am): Likewise.
1599         * modules/getdate (Makefile.am): Don't add getdate.h to EXTRA_DIST.
1600
1601 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1602
1603         * modules/error (Makefile.am): Distribute files through
1604         EXTRA_DIST, not lib_SOURCES.
1605
1606 2006-10-12  Eric Blake  <ebb9@byu.net>
1607
1608         * modules/error (Makefile.am): Distribute files in /lib.
1609         * modules/obstack (Makefile.am): Likewise.
1610
1611 2006-10-12  Bruno Haible  <bruno@clisp.org>
1612
1613         * modules/acl (Makefile.am): Distribute all files in lib/ through
1614         EXTRA_DIST.
1615         * modules/arcfour (Makefile.am): Likewise.
1616         * modules/arctwo (Makefile.am): Likewise.
1617         * modules/argmatch (Makefile.am): Likewise.
1618         * modules/argz (Makefile.am): Likewise.
1619         * modules/atexit (Makefile.am): Likewise.
1620         * modules/backupfile (Makefile.am): Likewise.
1621         * modules/c-strtod (Makefile.am): Likewise.
1622         * modules/c-strtold (Makefile.am): Likewise.
1623         * modules/calloc (Makefile.am): Likewise.
1624         * modules/canon-host (Makefile.am): Likewise.
1625         * modules/canonicalize (Makefile.am): Likewise.
1626         * modules/chdir-long (Makefile.am): Likewise.
1627         * modules/chdir-safer (Makefile.am): Likewise.
1628         * modules/check-version (Makefile.am): Likewise.
1629         * modules/chown (Makefile.am): Likewise.
1630         * modules/cloexec (Makefile.am): Likewise.
1631         * modules/close-stream (Makefile.am): Likewise.
1632         * modules/closeout (Makefile.am): Likewise.
1633         * modules/crc (Makefile.am): Likewise.
1634         * modules/cycle-check (Makefile.am): Likewise.
1635         * modules/des (Makefile.am): Likewise.
1636         * modules/dirfd (Makefile.am): Likewise.
1637         * modules/dirname (Makefile.am): Likewise.
1638         * modules/dup2 (Makefile.am): Likewise.
1639         * modules/euidaccess (Makefile.am): Likewise.
1640         * modules/exclude (Makefile.am): Likewise.
1641         * modules/exitfail (Makefile.am): Likewise.
1642         * modules/fcntl-safer (Makefile.am): Likewise.
1643         * modules/file-type (Makefile.am): Likewise.
1644         * modules/fileblocks (Makefile.am): Likewise.
1645         * modules/filemode (Makefile.am): Likewise.
1646         * modules/filenamecat (Makefile.am): Likewise.
1647         * modules/fnmatch (Makefile.am): Likewise.
1648         * modules/fopen-safer (Makefile.am): Likewise.
1649         * modules/fpending (Makefile.am): Likewise.
1650         * modules/fprintftime (Makefile.am): Likewise.
1651         * modules/free (Makefile.am): Likewise.
1652         * modules/fsusage (Makefile.am): Likewise.
1653         * modules/ftruncate (Makefile.am): Likewise.
1654         * modules/fts (Makefile.am): Likewise.
1655         * modules/gc (Makefile.am): Likewise.
1656         * modules/gc-pbkdf2-sha1 (Makefile.am): Likewise.
1657         * modules/getaddrinfo (Makefile.am): Likewise.
1658         * modules/getcwd (Makefile.am): Likewise.
1659         * modules/getdelim (Makefile.am): Likewise.
1660         * modules/getdomainname (Makefile.am): Likewise.
1661         * modules/getgroups (Makefile.am): Likewise.
1662         * modules/gethostname (Makefile.am): Likewise.
1663         * modules/gethrxtime (Makefile.am): Likewise.
1664         * modules/getline (Makefile.am): Likewise.
1665         * modules/getloadavg (Makefile.am): Likewise.
1666         * modules/getlogin_r (Makefile.am): Likewise.
1667         * modules/getopt (Makefile.am): Likewise.
1668         * modules/getpass (Makefile.am): Likewise.
1669         * modules/getpass-gnu (Makefile.am): Likewise.
1670         * modules/getsubopt (Makefile.am): Likewise.
1671         * modules/gettime (Makefile.am): Likewise.
1672         * modules/gettimeofday (Makefile.am): Likewise.
1673         * modules/getugroups (Makefile.am): Likewise.
1674         * modules/getusershell (Makefile.am): Likewise.
1675         * modules/glob (Makefile.am): Likewise.
1676         * modules/group-member (Makefile.am): Likewise.
1677         * modules/hard-locale (Makefile.am): Likewise.
1678         * modules/hash (Makefile.am): Likewise.
1679         * modules/hmac-md5 (Makefile.am): Likewise.
1680         * modules/hmac-sha1 (Makefile.am): Likewise.
1681         * modules/human (Makefile.am): Likewise.
1682         * modules/idcache (Makefile.am): Likewise.
1683         * modules/imaxabs (Makefile.am): Likewise.
1684         * modules/imaxdiv (Makefile.am): Likewise.
1685         * modules/inet_ntop (Makefile.am): Likewise.
1686         * modules/inet_pton (Makefile.am): Likewise.
1687         * modules/inttostr (Makefile.am): Likewise.
1688         * modules/isapipe (Makefile.am): Likewise.
1689         * modules/lchown (Makefile.am): Likewise.
1690         * modules/long-options (Makefile.am): Likewise.
1691         * modules/lstat (Makefile.am): Likewise.
1692         * modules/malloc (Makefile.am): Likewise.
1693         * modules/mathl (Makefile.am): Likewise.
1694         * modules/mbchar (Makefile.am): Likewise.
1695         * modules/md2 (Makefile.am): Likewise.
1696         * modules/md4 (Makefile.am): Likewise.
1697         * modules/md5 (Makefile.am): Likewise.
1698         * modules/memcasecmp (Makefile.am): Likewise.
1699         * modules/memchr (Makefile.am): Likewise.
1700         * modules/memcmp (Makefile.am): Likewise.
1701         * modules/memcoll (Makefile.am): Likewise.
1702         * modules/memcpy (Makefile.am): Likewise.
1703         * modules/memmem (Makefile.am): Likewise.
1704         * modules/memmove (Makefile.am): Likewise.
1705         * modules/mempcpy (Makefile.am): Likewise.
1706         * modules/memrchr (Makefile.am): Likewise.
1707         * modules/memset (Makefile.am): Likewise.
1708         * modules/memxor (Makefile.am): Likewise.
1709         * modules/mkancesdirs (Makefile.am): Likewise.
1710         * modules/mkdir (Makefile.am): Likewise.
1711         * modules/mkdir-p (Makefile.am): Likewise.
1712         * modules/mkdtemp (Makefile.am): Likewise.
1713         * modules/mkstemp (Makefile.am): Likewise.
1714         * modules/mktime (Makefile.am): Likewise.
1715         * modules/modechange (Makefile.am): Likewise.
1716         * modules/mountlist (Makefile.am): Likewise.
1717         * modules/nanosleep (Makefile.am): Likewise.
1718         * modules/openat (Makefile.am): Likewise.
1719         * modules/pagealign_alloc (Makefile.am): Likewise.
1720         * modules/physmem (Makefile.am): Likewise.
1721         * modules/poll (Makefile.am): Likewise.
1722         * modules/posixtm (Makefile.am): Likewise.
1723         * modules/posixver (Makefile.am): Likewise.
1724         * modules/putenv (Makefile.am): Likewise.
1725         * modules/quote (Makefile.am): Likewise.
1726         * modules/quotearg (Makefile.am): Likewise.
1727         * modules/raise (Makefile.am): Likewise.
1728         * modules/read-file (Makefile.am): Likewise.
1729         * modules/readline (Makefile.am): Likewise.
1730         * modules/readlink (Makefile.am): Likewise.
1731         * modules/readtokens (Makefile.am): Likewise.
1732         * modules/readutmp (Makefile.am): Likewise.
1733         * modules/realloc (Makefile.am): Likewise.
1734         * modules/regex (Makefile.am): Likewise.
1735         * modules/rename (Makefile.am): Likewise.
1736         * modules/rename-dest-slash (Makefile.am): Likewise.
1737         * modules/rijndael (Makefile.am): Likewise.
1738         * modules/rmdir (Makefile.am): Likewise.
1739         * modules/rpmatch (Makefile.am): Likewise.
1740         * modules/safe-read (Makefile.am): Likewise.
1741         * modules/safe-write (Makefile.am): Likewise.
1742         * modules/same (Makefile.am): Likewise.
1743         * modules/save-cwd (Makefile.am): Likewise.
1744         * modules/savedir (Makefile.am): Likewise.
1745         * modules/setenv (Makefile.am): Likewise.
1746         * modules/settime (Makefile.am): Likewise.
1747         * modules/sha1 (Makefile.am): Likewise.
1748         * modules/sig2str (Makefile.am): Likewise.
1749         * modules/snprintf (Makefile.am): Likewise.
1750         * modules/stdlib-safer (Makefile.am): Likewise.
1751         * modules/stpcpy (Makefile.am): Likewise.
1752         * modules/stpncpy (Makefile.am): Likewise.
1753         * modules/strcase (Makefile.am): Likewise.
1754         * modules/strcasestr (Makefile.am): Likewise.
1755         * modules/strchrnul (Makefile.am): Likewise.
1756         * modules/strcspn (Makefile.am): Likewise.
1757         * modules/strdup (Makefile.am): Likewise.
1758         * modules/strerror (Makefile.am): Likewise.
1759         * modules/strftime (Makefile.am): Likewise.
1760         * modules/strndup (Makefile.am): Likewise.
1761         * modules/strnlen (Makefile.am): Likewise.
1762         * modules/strpbrk (Makefile.am): Likewise.
1763         * modules/strsep (Makefile.am): Likewise.
1764         * modules/strstr (Makefile.am): Likewise.
1765         * modules/strtod (Makefile.am): Likewise.
1766         * modules/strtoimax (Makefile.am): Likewise.
1767         * modules/strtok_r (Makefile.am): Likewise.
1768         * modules/strtol (Makefile.am): Likewise.
1769         * modules/strtoll (Makefile.am): Likewise.
1770         * modules/strtoul (Makefile.am): Likewise.
1771         * modules/strtoull (Makefile.am): Likewise.
1772         * modules/strtoumax (Makefile.am): Likewise.
1773         * modules/strverscmp (Makefile.am): Likewise.
1774         * modules/time_r (Makefile.am): Likewise.
1775         * modules/timegm (Makefile.am): Likewise.
1776         * modules/tmpfile-safer (Makefile.am): Likewise.
1777         * modules/unistd-safer (Makefile.am): Likewise.
1778         * modules/unlinkdir (Makefile.am): Likewise.
1779         * modules/userspec (Makefile.am): Likewise.
1780         * modules/utime (Makefile.am): Likewise.
1781         * modules/utimecmp (Makefile.am): Likewise.
1782         * modules/utimens (Makefile.am): Likewise.
1783         * modules/vasnprintf (Makefile.am): Likewise.
1784         * modules/vasprintf (Makefile.am): Likewise.
1785         * modules/vsnprintf (Makefile.am): Likewise.
1786         * modules/xalloc (Makefile.am): Likewise.
1787         * modules/xgetcwd (Makefile.am): Likewise.
1788         * modules/xnanosleep (Makefile.am): Likewise.
1789         * modules/xreadlink (Makefile.am): Likewise.
1790         * modules/xstrtod (Makefile.am): Likewise.
1791         * modules/xstrtol (Makefile.am): Likewise.
1792         * modules/xstrtold (Makefile.am): Likewise.
1793         * modules/yesno (Makefile.am): Likewise.
1794
1795 2006-10-12  Jim Meyering  <jim@meyering.net>
1796
1797         * m4/getloadavg.m4: Revert the change below.
1798
1799         * m4/getloadavg.m4 (gl_GETLOADAVG): Test for the existence of
1800         lib/getloadavg.c using "ls -L", not "test -f".  The latter would
1801         fail with a symlink, which is what coreutils' ./bootstrap now
1802         creates by default.
1803
1804 2006-10-12  Bruno Haible  <bruno@clisp.org>
1805
1806         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): Don't define for MSVC or
1807         mingw.
1808         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Handle
1809         MSVC and mingw explicitly.
1810
1811 2006-10-11  Simon Josefsson  <jas@extundo.com>
1812             Bruno Haible  <bruno@clisp.org>
1813
1814         Add support for multiple gnulib-tool invocations in the scope of a
1815         single configure.ac file.
1816         * gnulib-tool (func_emit_lib_Makefile_am): In the _LIBADD variable,
1817         use a private [LT]LIBOBJS variant. Define a _DEPENDENCIES variable
1818         with the same contents as the _LIBADD variable.
1819         (func_emit_initmacro_start, func_emit_initmacro_end,
1820         func_emit_initmacro_done): New functions.
1821         (func_import, func_create_testdir): Invoke them. Allow the identifiers
1822         gl_LIBOBJS and gl_LTLIBOBJS.
1823
1824 2006-10-11  Bruno Haible  <bruno@clisp.org>
1825
1826         * gnulib-tool (GETTEXTPATH, AUTOHEADER, AUTOPOINT): New variables.
1827         (func_create_testdir): Don't create po/Makefile.am, don't invoke
1828         autoreconf. Instead, invoke autopoint explicitly but move back the
1829         *.m4 files from gnulib.
1830
1831 2006-10-11  Bruno Haible  <bruno@clisp.org>
1832
1833         * gnulib-tool (func_usage): Make module names after --create-testdir
1834         optional.
1835         (func_create_testdir): If no module was specified, use nearly all
1836         modules.
1837
1838 2006-10-12  Jim Meyering  <jim@meyering.net>
1839
1840         Big performance improvement for fts-based tools that use FTS_NOSTAT.
1841         Avoid spurious inode-mismatch problems on non-POSIX file systems.
1842         Details: http://article.gmane.org/gmane.comp.lib.gnulib.bugs/7416
1843         * lib/fts_.h (FTS_DEFER_STAT): Define new flag.
1844         (FTS_OPTIONMASK): Extend the mask to reflect this addition.
1845         * lib/fts.c (DT_IS_KNOWN, DT_MUST_BE): Define.
1846         (FTS_NO_STAT_REQUIRED, FTS_STAT_REQUIRED): Define.
1847         (fts_set_stat_required): New function.
1848         (fts_open): Defer the calls to fts_stat, if possible or requested.
1849         Move the code that maps a command-line fts_info value FTS_DOT to FTS_D
1850         into fts_stat itself.
1851         (fts_read): Perform any required (deferred) fts_stat call.
1852         (fts_build): Likewise, for the directory we're about to open and read.
1853         In the readdir loop, carefully decide whether each entry will require
1854         an eventual call to fts_stat, using dirent.d_type info if available.
1855         (fts_stat): Move the test for whether to honor FTS_COMFOLLOW on
1856         a command line argument into this function.  Update all callers.
1857         Map a return value of FTS_DOT to FTS_D for a command line argument.
1858         * modules/fts (Depends-on): Add d-type.  Alphabetize.
1859         Thanks to Miklos Szeredi for his tenacity and for the initial
1860         bug report about "find" failing on a FUSE-based file system.
1861
1862         * lib/fts.c (fts_open): Use consistent indentation.
1863
1864 2006-10-12  Paul Eggert  <eggert@cs.ucla.edu>
1865
1866         * m4/extensions.m4 (AC_USE_SYSTEM_EXTENSIONS): Renamed from
1867         gl_USE_SYSTEM_EXTENSIONS, to fix a coreutils bootstrap failure
1868         reported by Jim Meyering.  All uses of cache variables renamed
1869         to match Autoconf's.
1870         (gl_USE_SYSTEM_EXTENSIONS): New macro, which simply requires
1871         the other one.
1872
1873         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH):
1874         Fix misspelling in diagnostic.
1875
1876 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1877
1878         * lib/mkdir-p.c (HAVE_FCHMOD): Define to false if not already
1879         defined.  Problem reported by Matthew Woehlke.
1880
1881         * lib/inttypes_.h (_LONG_LONG_FORMAT_PREFIX): New macro.
1882         Add support for Tandem NonStop R series.
1883         (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX):
1884         Use new macro.
1885
1886         * lib/rename-dest-slash.c: Include stdbool.h but not string.h.
1887         (has_trailing_slash): Omit size arg; all callers changed.
1888         Omit 'inline', since it doesn't help performance and we'd
1889         need to configure it.
1890         Don't count //, ///, etc. as having a trailing slash.
1891         As a side effect, this removes a C99ism reported by Matthew Woehlke.
1892         (rpl_rename_dest_slash): On failure, use rename's errno rather
1893         than (in some cases) an incorrect or junk errno.
1894         Simplify code by removing need to compute length; this does
1895         cause it to make two passes instead of one over the file name,
1896         but it's worth it.
1897
1898         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Undo previous
1899         change, since Autoconf's version may no longer be appropriate now
1900         that we are using CVS Autoconf's version.  Add support for Tandem.
1901
1902 2006-10-11  Paul Eggert  <eggert@cs.ucla.edu>
1903             Bruno Haible  <bruno@clisp.org>
1904
1905         * lib/allocsa.h (sa_alignment_longlong, sa_alignment_max): Test
1906         HAVE_LONG_LONG_INT instead of HAVE_LONG_LONG.
1907         * m4/allocsa.m4 (gl_ALLOCSA): Invoke AC_TYPE_LONG_LONG_INT instead of
1908         gl_AC_TYPE_LONG_LONG.
1909
1910         * lib/printf-args.h (arg_type, argument): Test HAVE_LONG_LONG_INT
1911         instead of HAVE_LONG_LONG.
1912         * lib/printf-args.c (printf_fetchargs): Likewise.
1913         * lib/printf-parse.c (PRINTF_PARSE): Likewise.
1914         * lib/vasnprintf.c (VASNPRINTF): Likewise.
1915         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_ARGS, gl_PREREQ_PRINTF_PARSE,
1916         gl_PREREQ_VASNPRINTF): Invoke AC_TYPE_LONG_LONG_INT instead of
1917         gl_AC_TYPE_LONG_LONG.
1918
1919 2006-10-11  Bruno Haible  <bruno@clisp.org>
1920
1921         * m4/longlong.m4: Add comments.
1922         * m4/ulonglong.m4: Likewise.
1923
1924 2006-10-10  Bruno Haible  <bruno@clisp.org>
1925
1926         Make it possible to #define stpcpy, strdup to aliases.
1927         * lib/stpcpy.c (stpcpy) [!_LIBC]: Don't undefine.
1928         * lib/strdup.c (strdup) [!_LIBC]: Don't undefine.
1929
1930 2006-10-10  Bruno Haible  <bruno@clisp.org>
1931
1932         Make it possible to #define gcd to an alias.
1933         * lib/gcd.c: Include config.h.
1934
1935 2006-10-10  Bruno Haible  <bruno@clisp.org>
1936
1937         Make it possible to #define c_isascii to an alias.
1938         * lib/c-ctype.h: Don't define the macros if NO_C_CTYPE_MACROS is
1939         defined. Undefine the macros before defining them, to avoid gcc
1940         warnings.
1941         * lib/c-ctype.c: Include config.h. Don't undefine the macros; instead,
1942         define NO_C_CTYPE_MACROS early.
1943
1944 2006-10-10  Bruno Haible  <bruno@clisp.org>
1945
1946         Make it possible to #define set_program_name to an alias.
1947         * lib/progname.c: Don't undefine set_program_name; instead, undefine
1948         ENABLE_RELOCATABLE early.
1949
1950 2006-10-10  Paul Eggert  <eggert@cs.ucla.edu>
1951
1952         Port to Tandem NSK OSS, which has 64-bit signed int but at most
1953         32-bit unsigned int.  Problem reported by Matthew Woehlke in:
1954         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
1955         More generally, don't assume that 64-bit signed int is available
1956         if unsigned int is, and vice versa.
1957         * lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
1958         unsigned symbols, not on their signed counterparts.
1959         * lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
1960         (UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
1961         (UINT64_C, UINTMAX_C):
1962         Likewise.
1963         * lib/strtoimax.c (strtoll): Depend on signed symbols, not their
1964         unsigned counterparts.
1965         (Have_long_long, Unsigned): New macros.
1966         (Int): Renamed from INT.
1967         (strtoimax): Use the new macros.
1968         * m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
1969         and substitute HAVE_UNSIGNED_LONG_LONG_INT.
1970         * modules/inttypes (inttypes.h): Substitute
1971         HAVE_UNSIGNED_LONG_LONG_INT.
1972         * modules/stdint (stdint.h): Likewise.
1973         (Files): Add m4/ulonglong.m4.
1974
1975 2006-10-10  Bruno Haible  <bruno@clisp.org>
1976
1977         Fix a gcc -Wshadow warning.
1978         * lib/gl_anyhash_list2.h (hash_resize): Rename local variable 'index'
1979         to 'bucket'.
1980         * lib/gl_anylinked_list2.h (gl_linked_search_from_to,
1981         gl_linked_indexof_from_to): Likewise.
1982         * lib/gl_linkedhash_list.c (add_to_bucket, remove_from_bucket):
1983         Likewise.
1984         * lib/gl_anytreehash_list1.h (add_to_bucket, remove_from_bucket):
1985         Likewise.
1986         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Likewise.
1987         Reported by Eric Blake.
1988
1989 2006-10-09  Paul Eggert  <eggert@cs.ucla.edu>
1990
1991         * lib/filemode.h [HAVE_DECL_STRMODE]: Include unistd.h too,
1992         for NetBSD.  Problem reported by Bruno Haible.
1993
1994 2006-10-09  Jim Meyering  <jim@meyering.net>
1995
1996         * lib/lchown.c: Include <sys/stat.h> before "stat-macros.h".
1997         Patch from Bruno Haible.
1998
1999 2006-10-09  Jim Meyering  <jim@meyering.net>
2000
2001         * lib/fts-cycle.c (leave_dir): When "leaving" a top level directory due
2002         to FTS_SKIP, don't copy the parent's uninitialized dev/ino values.
2003         Trigger with e.g., mkdir d && valgrind ./chmod u+rwx d d
2004
2005 2006-10-08  Paul Eggert  <eggert@cs.ucla.edu>
2006
2007         Don't include <config.h> twice; this doesn't work in some cases,
2008         e.g., when config.h has "#define intmax_t long long int" and
2009         we include <config.h>, <inttypes.h>, <config.h> in that order.
2010         Problem reported by Matthew Woehlke in:
2011         http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00073.html
2012         * lib/fprintftime.c: Don't include config.h or fprintftime.h.
2013         * lib/fts-cycle.c: Don't include config.h.
2014         * lib/strftime.c: Include fprintftime.h if FPRINTFTIME is defined.
2015         * lib/xstrtoimax.c: Remove copyright notice since it's short tnow.
2016         Don't include config.h or xstrtol.h.  Define STRTOL_T_MINIMUM
2017         and STRTOL_T_MAXIMUM unconditionally, since we now assume gnulib
2018         inttypes.h.
2019         * lib/xstrtoumax.c: Likewise.
2020         * lib/xstrtol.c: Include config.h and xstrtol.h after defining
2021         __strtol and the like, so that this module is more like its siblings.
2022         (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [! defined STRTOL_T_MINIMUM]:
2023         Remove; no longer needed now that we assume gnulib inttypes.h.
2024
2025 2006-10-08  Bruno Haible  <bruno@clisp.org>
2026
2027         * doc/gnulib-tool.texi: Emphasize the drawbacks of the --symlink
2028         option.
2029
2030 2006-10-07  Jim Meyering  <jim@meyering.net>
2031
2032         * modules/inttypes (inttypes.h): Revert what seems to have been
2033         an inadvertent part of today's change: use "|", not "/" in the
2034         substitution for the "/"-containing string, $(ABSOLUTE_INTTYPES_H).
2035
2036 2006-10-07  Bruno Haible  <bruno@clisp.org>
2037
2038         * modules/sublist: New file.
2039
2040 2006-10-07  Bruno Haible  <bruno@clisp.org>
2041
2042         * modules/alloca-opt (alloca.h): Add a "DO NOT EDIT" comment.
2043         * modules/argz (argz.h): Likewise.
2044         * modules/arpa_inet (arpa/inet.h): Likewise.
2045         * modules/byteswap (byteswap.h): Likewise.
2046         * modules/configmake (configmake.h): Likewise.
2047         * modules/fcntl (fcntl.h): Likewise.
2048         * modules/fnmatch (fnmatch.h): Likewise.
2049         * modules/getopt (getopt.h): Likewise.
2050         * modules/glob (glob.h): Likewise.
2051         * modules/inttypes (inttypes.h): Likewise.
2052         * modules/netinet_in (netinet/in.h): Likewise.
2053         * modules/poll (poll.h): Likewise.
2054         * modules/stdbool (stdbool.h): Likewise.
2055         * modules/stdint (stdint.h): Likewise.
2056         * modules/sys_select (sys/select.h): Likewise.
2057         * modules/sys_socket (sys/socket.h): Likewise.
2058         * modules/sys_stat (sys/stat.h): Likewise.
2059         * modules/sysexits (sysexits.h): Likewise.
2060         * modules/unistd (unistd.h): Likewise.
2061         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
2062         Add a "DO NOT EDIT" comment to the generated file.
2063         (func_import): Likewise for gnulib-comp.m4.
2064
2065 2006-10-07  Bruno Haible  <bruno@clisp.org>
2066
2067         * lib/gl_sublist.h: New file.
2068         * lib/gl_sublist.c: New file.
2069
2070 2006-10-06  Paul Eggert  <eggert@cs.ucla.edu>
2071
2072         * lib/mkancesdirs.c (mkancesdirs): Pass to MAKE_DIR both the full file
2073         name (relative to the original working directory) and the file
2074         name component (relative to the temporary working directory).  All
2075         callers changed.
2076         * lib/mkancesdirs.h (mkancesdirs): Adjust prototype to match.
2077         * lib/mkdir-p.c (make_dir_parents): Likewise.
2078         * lib/mkdir-p.h (make_dir_parents): Likewise.
2079
2080 2006-10-06  Eric Blake  <ebb9@byu.net>
2081
2082         Define several macros for use by the clean-temp module.
2083         * m4/close-stream.m4 (gl_CLOSE_STREAM): Define GNULIB_CLOSE_STREAM.
2084         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Define GNULIB_FCNTL_SAFER.
2085         * m4/stdio-safer.m4 (gl_FOPEN_SAFER): Define GNULIB_FOPEN_SAFER.
2086
2087         * lib/clean-temp.h (close_stream_temp): New declaration.
2088         * lib/clean-temp.c (includes): Pull in headers according to what
2089         other modules are in use.
2090         (close_stream_temp) [GNULIB_CLOSE_STREAM]: New function.
2091
2092 2006-10-06  Bruno Haible  <bruno@clisp.org>
2093
2094         * lib/javacomp.c (write_temp_file): Use fopen_temp, fwriteerror_temp
2095         instead of fopen, fwriteerror.
2096
2097 2006-10-06  Bruno Haible  <bruno@clisp.org>
2098
2099         * lib/clean-temp.h (cleanup_temp_file, cleanup_temp_subdir,
2100         cleanup_temp_dir_contents, cleanup_temp_dir): Change return type to
2101         int.
2102         * lib/clean-temp.c (do_unlink, do_rmdir, cleanup_temp_file,
2103         cleanup_temp_subdir, cleanup_temp_dir_contents, cleanup_temp_dir):
2104         Return an error indicator.
2105         Suggested by Eric Blake.
2106
2107 2006-10-06  Bruno Haible  <bruno@clisp.org>
2108
2109         * lib/clean-temp.c (PATH_MAX): Provide a fallback for GNU Hurd.
2110         Reported by Eric Blake.
2111
2112 2006-10-06  Bruno Haible  <bruno@clisp.org>
2113
2114         * modules/closeout (Description): Mention stderr too.
2115
2116 2006-10-06  Bruno Haible  <bruno@clisp.org>
2117         and Paul Eggert  <eggert@cs.ucla.edu>
2118
2119         * lib/closeout.c (close_stdout): Also close stderr.
2120         * lib/closeout.h: Update comment.
2121
2122 2006-10-05  Paul Eggert  <eggert@cs.ucla.edu>
2123
2124         Fix some Darwin-7.9.0 porting problems reported by Bruno Haible in
2125         <http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00063.html>.
2126         * lib/dirchownmod.c: Include lchown.h.
2127         * lib/lchown.c: Don't include files that lchown.h now includes.
2128         Don't declare chown, since lchown.h now does that.
2129         * lib/lchown.h: Include errno.h, sys/types.h, unistd.h.
2130         (lchown): Define to rpl_chown if lchown is declared but
2131         does not exist.  Declare using a prototype if lchown is not
2132         declared.  Add a copyright notice.
2133         * lib/mkstemp.h: Include <unistd.h>.
2134         * lib/openat.c: Include lchown.h.
2135
2136         * lib/fcntl_.h (O_NOFOLLOW): Don't depend on O_NOFOLLOW_IS_INEFFECTIVE;
2137         we now test for that separately.
2138         * lib/fts.c (fts_safe_changedir): Inspect HAVE_WORKING_O_NOFOLLOW
2139         rather than O_NOFOLLOW, when testing whether it's possible to
2140         avoid a race condition reliably.
2141         * lib/savewd.c (savewd_chdir): Likewise.
2142
2143         Remove macros that are no longer needed now that stdint.h is
2144         reliable.
2145         * lib/fsusage.c (UINTMAX_MAX): Remove.
2146         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Remove.
2147         * lib/utimecmp.c (SIZE_MAX): Remove.
2148
2149         * m4/lchown.m4 (gl_FUNC_LCHOWN): Check whether lchown is declared.
2150
2151         * m4/fcntl_h.m4 (gl_FCNTL_H): Define HAVE_WORKING_O_NOFOLLOW instead
2152         of O_NOFOLLOW_IS_INEFFECTIVE.  Define HAVE_WORKING_O_NOATIME if
2153         O_NOATIME works.
2154
2155 2006-10-05  Bruno Haible  <bruno@clisp.org>
2156
2157         * lib/gl_list.h (gl_sortedlist_search_from_to,
2158         gl_sortedlist_indexof_from_to): New declarations.
2159         (gl_list_implementation): New fields sortedlist_search_from_to,
2160         sortedlist_indexof_from_to.
2161         (gl_sortedlist_search_from_to, gl_sortedlist_indexof_from_to): New
2162         inline functions.
2163         * lib/gl_list.c (gl_sortedlist_search_from_to,
2164         gl_sortedlist_indexof_from_to): New functions.
2165         * lib/gl_array_list.c (gl_array_sortedlist_indexof_from_to): New
2166         function.
2167         (gl_array_sortedlist_indexof, gl_array_sortedlist_search): Use it.
2168         (gl_array_sortedlist_search_from_to): New function.
2169         (gl_array_list_implementation): Update.
2170         * lib/gl_carray_list.c (gl_carray_sortedlist_indexof_from_to): New
2171         function.
2172         (gl_carray_sortedlist_indexof, gl_carray_sortedlist_search): Use it.
2173         (gl_carray_sortedlist_search_from_to): New function.
2174         (gl_carray_list_implementation): Update.
2175         * lib/gl_anylinked_list2.h (gl_linked_sortedlist_search_from_to,
2176         gl_linked_sortedlist_indexof_from_to): New functions.
2177         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2178         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2179         * lib/gl_anytree_list2.h (gl_tree_sortedlist_search_from_to,
2180         gl_tree_sortedlist_indexof_from_to): New functions.
2181         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2182         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2183         Update.
2184         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2185         * lib/gl_rbtreehash_list.c (gl_avltreehash_list_implementation):
2186         Update.
2187
2188 2006-10-05  Bruno Haible  <bruno@clisp.org>
2189
2190         * lib/gl_list.h (gl_list_search_from, gl_list_search_from_to,
2191         gl_list_indexof_from, gl_list_indexof_from_to): New declarations.
2192         (struct gl_list_implementation): Add fields search_from_to,
2193         indexof_from_to. Remove fields search, indexof.
2194         (gl_list_search): Use the search_from_to method.
2195         (gl_list_search_from, gl_list_search_from_to): New functions.
2196         (gl_list_indexof): Use the indexof_from_to method.
2197         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2198         * lib/gl_list.c (gl_list_search): Use the search_from_to method.
2199         (gl_list_search_from, gl_list_search_from_to): New functions.
2200         (gl_list_indexof): Use the indexof_from_to method.
2201         (gl_list_indexof_from, gl_list_indexof_from_to): New functions.
2202         * lib/gl_array_list.c (gl_array_indexof_from_to): Renamed from
2203         gl_array_indexof. Add start_index, end_index arguments.
2204         (gl_array_search_from_to): Renamed from gl_array_search. Add
2205         start_index, end_index arguments.
2206         (gl_array_remove, gl_array_list_implementation): Update.
2207         * lib/gl_carray_list.c (gl_carray_indexof_from_to): Renamed from
2208         gl_carray_indexof. Add start_index, end_index arguments.
2209         (gl_carray_search_from_to): Renamed from gl_carray_search. Add
2210         start_index, end_index arguments.
2211         (gl_carray_remove, gl_carray_list_implementation): Update.
2212         * lib/gl_anylinked_list2.h (gl_linked_search_from_to): Renamed from
2213         gl_linked_search. Add start_index, end_index arguments.
2214         (gl_linked_indexof_from_to): Renamed from gl_linked_indexof. Add
2215         start_index, end_index arguments.
2216         (gl_linked_remove): Update.
2217         * lib/gl_linked_list.c (gl_linked_list_implementation): Update.
2218         * lib/gl_linkedhash_list.c (gl_linkedhash_list_implementation): Update.
2219         * lib/gl_anytree_list1.h (iterstack_item_t): Change type of 'rightp'
2220         field to 'size_t'.
2221         * lib/gl_anytree_list2.h (gl_tree_search_from_to): Renamed from
2222         gl_tree_search. Add start_index, end_index arguments.
2223         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2224         start_index, end_index arguments.
2225         (gl_tree_remove): Update.
2226         * lib/gl_avltree_list.c (gl_avltree_list_implementation): Update.
2227         * lib/gl_rbtree_list.c (gl_rbtree_list_implementation): Update.
2228         * lib/gl_anytreehash_list1.h (compare_position_threshold): New
2229         function.
2230         * lib/gl_anytreehash_list2.h (gl_tree_search_from_to): Renamed from
2231         gl_tree_search. Add start_index, end_index arguments.
2232         (gl_tree_indexof_from_to): Renamed from gl_tree_indexof. Add
2233         start_index, end_index arguments.
2234         * lib/gl_avltreehash_list.c (gl_avltreehash_list_implementation):
2235         Update.
2236         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Update.
2237
2238 2006-10-05  Bruno Haible  <bruno@clisp.org>
2239
2240         * modules/fwriteerror (configure.ac): Define GNULIB_FWRITEERROR.
2241
2242         * lib/clean-temp.h (open_temp, fopen_temp, close_temp, fclose_temp,
2243         fwriteerror_temp): New declarations.
2244         * lib/clean-temp.c (uintptr_t): Provide fallback definition.
2245         (descriptors): New variable.
2246         (cleanup): First, close the descriptors.
2247         (register_fd, unregister_fd, open_temp, fopen_temp, close_temp,
2248         fclose_temp, fwriteerror_temp): New functions.
2249
2250 2006-10-04  Jim Meyering  <jim@meyering.net>
2251
2252         * lib/fts.c (fts_open): Tiny comment change.
2253
2254 2006-10-04  Bruno Haible  <bruno@clisp.org>
2255
2256         Make it possible to invoke AC_GNU_SOURCE after gl_LOCK_EARLY.
2257         * m4/lock.m4 (gl_LOCK_EARLY_BODY): New macro, extracted code from
2258         gl_LOCK_BODY.
2259         (gl_LOCK_EARLY): Require gl_LOCK_EARLY_BODY, not gl_LOCK_BODY.
2260         (gl_LOCK_BODY): Remove settings of CPPFLAGS, now done in
2261         gl_LOCK_EARLY_BODY.
2262         (gl_LOCK): Require gl_LOCK_BODY.
2263
2264 2006-10-04  Bruno Haible  <bruno@clisp.org>
2265
2266         * lib/gl_oset.h (gl_setelement_threshold_fn): New type.
2267         (gl_oset_search_atleast): New declaration.
2268         (struct gl_oset_implementation): Add field 'search_atleast'.
2269         (gl_oset_search_atleast): New inline function.
2270         * lib/gl_oset.c (gl_oset_search_atleast): New function.
2271         * lib/gl_array_oset.c (gl_array_search_atleast): New function.
2272         (gl_array_oset_implementation): Update.
2273         * lib/gl_anytree_oset.h (gl_tree_search_atleast): New function.
2274         * lib/gl_avltree_oset.c (gl_avltree_oset_implementation): Update.
2275         * lib/gl_rbtree_oset.c (gl_rbtree_oset_implementation): Update.
2276
2277 2006-10-04  Bruno Haible  <bruno@clisp.org>
2278
2279         * lib/fatal-signal.c (fatal_signals) [WOE32]: Add the SIGBREAK signal.
2280
2281 2006-10-03  Bruno Haible  <bruno@clisp.org>
2282
2283         * lib/gl_rbtreehash_list.c (gl_rbtreehash_list_implementation): Renamed
2284         from gl_avltreehash_list_implementation.
2285
2286 2006-10-03  Bruno Haible  <bruno@clisp.org>
2287
2288         * lib/gl_oset.c (gl_oset_add): Fix return type.
2289
2290 2006-10-02  Paolo Bonzini  <bonzini@gnu.org>  (tiny change)
2291
2292         * lib/quotearg.c (mbstate_t) [!HAVE_MBRTOWC]: #define to int.
2293
2294 2006-10-02  Eric Blake  <ebb9@byu.net>
2295
2296         * modules/strnlen (Depends-on): Add extensions.
2297
2298 2006-10-02  Eric Blake  <ebb9@byu.net>
2299
2300         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use autoconf's
2301         definition in 2.60+.
2302
2303 2006-10-02  Dmitry V. Levin  <ldv@altlinux.org>
2304
2305         * lib/fts.c (fts_close, fts_build, fts_palloc): Remove redundant
2306         checks.
2307
2308 2006-10-02  Bruno Haible  <bruno@clisp.org>
2309
2310         * gnulib-tool (func_emit_lib_Makefile_am): Don't add no-dependencies
2311         to the AUTOMAKE_OPTIONS.
2312         Reported by Jim Meyering.
2313
2314 2006-09-29  Paul Eggert  <eggert@cs.ucla.edu>
2315
2316         Work around bug in Solaris 10 /proc file system:
2317         /proc/self/fd/NNN/.. isn't the parent directory of
2318         the directory whose file descriptor is NNN.  This needs to
2319         be worked around at run time, not compile time, since a
2320         program might be built on Solaris 8, where things work, and
2321         run on Solaris 10.
2322         * lib/openat-priv.h (BUILD_PROC_NAME): Remove.  All callers changed
2323         to use the following interface instead:
2324         (OPENAT_BUFFER_SIZE): New macro.
2325         (openat_proc_name): New function.
2326         * lib/at-func.c (AT_FUNC_NAME): Adjust to above changes.
2327         * lib/openat.c (openat_permissive, openat_needs_fchdir, fdopendir):
2328         Likewise.
2329         * lib/openat-proc.c: New file.
2330         * modules/openat (Files): Add lib/openat-proc.c.
2331         (Depends-on): Add same-inode, stdbool.
2332         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBOBJ(openat-proc).
2333
2334 2006-09-29  Bruno Haible  <bruno@clisp.org>
2335
2336         * lib/fwriteerror.h (fwriteerror_no_ebadf): New declaration.
2337         * lib/(do_fwriteerror): Renamed from fwriteerror. Add ignore_ebadf
2338         argument. Set stdout_closed before testing for ferror, not after.
2339         (fwriteerror, fwriteerror_no_ebadf): New functions.
2340
2341 2006-09-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2342
2343         * m4/intmax.m4 (gt_TYPE_INTMAX_T): Avoid unused variables warning.
2344
2345 2006-09-28  Paolo Bonzini  <bonzini@gnu.org>
2346
2347         * lib/poll.c (rpl_poll) [__APPLE__]: Use FIONREAD instead of MSG_PEEK.
2348         * m4/poll.m4: Look for sys/ioctl.h and sys/filio.h.
2349
2350 2006-09-28  Jim Meyering  <jim@meyering.net>
2351
2352         * lib/mkdir-p.c: Include "dirchownmod.h", not "dirchownmod.c".
2353         Include <unistd.h>.
2354
2355 2006-09-28  Bruno Haible  <bruno@clisp.org>
2356
2357         * modules/avltreehash-list (Depends-on): Add stdint, remove size_max.
2358         * modules/linkedhash-list (Depends-on): Likewise.
2359         * modules/rbtreehash-list (Depends-on): Likewise.
2360
2361 2006-09-28  Bruno Haible  <bruno@clisp.org>
2362
2363         * lib/strndup.h: Simplify the redefinition of strndup.
2364         (_GL_CONCAT, _GL_XCONCAT, __STRNDUP_ID): Remove macros.
2365         * m4/strndup.m4 (gl_FUNC_STRNDUP): Don't define __STRNDUP_PREFIX.
2366
2367 2006-09-28  Bruno Haible  <bruno@clisp.org>
2368
2369         * lib/gl_avltreehash_list.c: Include <stdint.h> instead of size_max.h.
2370         * lib/gl_linkedhash_list.c: Likewise.
2371         * lib/gl_rbtreehash_list.c: Likewise.
2372
2373 2006-09-27  Paul Eggert  <eggert@cs.ucla.edu>
2374
2375         * lib/canon-host.c (canon_host_r): Work around bug in Darwin 7.9.0
2376         getaddrinfo.
2377
2378         * lib/__fpending.h: Don't include <stdio_ext.h> unless
2379         HAVE_DECL___FPENDING.  This avoids a bug with lsbcc, where
2380         it causes <stdio_ext.h> to cause a compile-time error.
2381         Problem reported by Nelson H. F. Beebe.
2382         * lib/getpass.c: Likewise, except for HAVE_DECL___FSETLOCKING instead
2383         of HAVE_DECL___PENDING.
2384
2385         * m4/fpending.m4 (gl_FUNC_FPENDING): Check for stdio_ext at most once.
2386         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for __fsetlocking's
2387         declaration.
2388
2389 2006-09-27  Jim Meyering  <jim@meyering.net>
2390
2391         This file could end up with a definition for a function
2392         named __strndup, rather than rpl_strndup on a system with
2393         incomplete weak_alias support.
2394         * lib/strndup.c (strndup): Rename from __strndup.
2395         Remove #defines that used to map __strndup to strndup.
2396         Don't use K&R prototypes.
2397         Remove LIBC-related code, since this file is not sync'd with glibc.
2398         * lib/strndup.h: Revamp, accordingly.
2399         * m4/strndup.m4: Modernize.
2400
2401 2006-09-26  Paul Eggert  <eggert@cs.ucla.edu>
2402
2403         * modules/savewd (Depends-on): Add 'raise'.
2404         * lib/savewd.c: Include <signal.h>, for 'raise'.
2405
2406 2006-09-26  Jim Meyering  <jim@meyering.net>
2407
2408         * m4/acl.m4 (AC_FUNC_ACL): Disable ACL support altogether
2409         when we detect Darwin 8.7.0's acl_get_file bug.
2410         Rearrange to perform the new (below) run-test while $LIBS
2411         contains any acl-related library.  Set USE_ACL at the end.
2412         (gl_ACL_GET_FILE): New function.
2413
2414 2006-09-26  Eric Blake  <ebb9@byu.net>
2415
2416         * lib/verror.c: Include <config.h> unconditionally.
2417
2418 2006-09-25  Paul Eggert  <eggert@cs.ucla.edu>
2419
2420         * modules/clock-time (Maintainer): Add self.
2421         * modules/getlogin_r (Depends-on): Add extensions.
2422
2423 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2424
2425         * modules/clock-time: New module.
2426         * modules/nanosleep (Depends-on): Add clock-time.
2427         * modules/gethrxtime (Depends-on): Likewise.
2428         * modules/gettime (Depends-on): Likewise.
2429         * modules/settime (Depends-on): Likewise.
2430
2431         * modules/fts-lgpl: Depend on openat.
2432         * modules/mkancesdirs: Depend on savewd.
2433         * modules/mkdir-p: Likewise.
2434
2435 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2436
2437         * m4/host-os.m4 (gl_HOST_OS): Require AC_CANONICAL_HOST.
2438
2439         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Rename cache variable from
2440         `gl_have_arbitrary_file_name_length_limit' to
2441         `gl_cv_have_arbitrary_file_name_length_limit', so that caching
2442         actually works between configure runs.
2443
2444 2006-09-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2445             Bruno Haible  <bruno@clisp.org>
2446
2447         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Include <string.h>.
2448
2449 2006-09-25  Jim Meyering  <jim@meyering.net>
2450
2451         * m4/fcntl_h.m4 (gl_FCNTL_H): Fix typo in test for failed open.
2452         This typo caused coreutils/tests/dd/misc to fail on Darwin 8.7.0.
2453
2454 2006-09-25  Eric Blake  <ebb9@byu.net>
2455
2456         * gnulib-tool (func_import, func_create_testdir): Fix typos in
2457         exec's in 2006-09-18 patch when shuffling fds.
2458
2459 2006-09-25  Bruno Haible  <bruno@clisp.org>
2460
2461         * m4/getloadavg.m4 (gl_GETLOADAVG): Fix directory in error message.
2462         Reported by Jim Meyering.
2463
2464 2006-09-24  Jim Meyering  <jim@meyering.net>
2465
2466         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Don't use '>' to
2467         compare a pointer against a literal "0".  That caused failures with
2468         at least HP-UX's hpcc.
2469
2470 2006-09-22  Simon Josefsson  <jas@extundo.com>
2471
2472         * modules/gc-sha1:
2473         * modules/gc-md4:
2474         * modules/gc-hmac-sha1:
2475         * modules/gc-hmac-md5:
2476         * modules/gc-des:
2477         * modules/gc-arcfour: Distribute more files.
2478
2479 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2480
2481         * lib/gl_anylinked_list2.h [lint] (gl_linked_iterator)
2482         (gl_linked_iterator_from_to): Initialize struct completely.
2483         * lib/gl_anytree_list2.h [lint] (gl_tree_iterator): Likewise.
2484         (gl_tree_iterator_from_to): Likewise
2485         * lib/gl_anytree_oset.h [lint] (gl_tree_iterator): Likewise.
2486         * lib/gl_array_list.c [lint] (gl_array_iterator)
2487         (gl_array_iterator_from_to): Likewise.
2488         * lib/gl_array_oset.c [lint] (gl_array_iterator): Likewise.
2489         * lib/gl_carray_list.c [lint] (gl_carray_iterator)
2490         (gl_carray_iterator_from_to): Likewise.
2491
2492         * lib/gc-gnulib.c [GC_USE_HMAC_SHA1]: include hmac.h for hmac_sha1.
2493         * lib/md4.c (md4_process_block): Remove unused variable.
2494         * lib/rijndael-api-fst.c (rijndaelBlockDecrypt): GCC suggests
2495         parentheses for clarity.
2496
2497 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2498
2499         * modules/bison-i18n (Depends-on): Add gettext.
2500
2501 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2502
2503         * m4/fsusage.m4 (gl_STATFS_TRUNCATES): Avoid unused variable.
2504         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): Likewise.
2505         * m4/jm-winsz1.m4 (gl_HEADER_TIOCGWINSZ_IN_TERMIOS_H): Likewise;
2506         also add missing comma that caused broken test.
2507         * m4/link-follow.m4 (gl_AC_FUNC_LINK_FOLLOWS_SYMLINK): Include
2508         stdlib.h, for `abort'.
2509         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Avoid unused
2510         variables.
2511         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Check for and
2512         include unistd.h if present, for `rmdir'.
2513         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): Avoid unused
2514         variables.
2515         * m4/putenv.m4 (gl_FUNC_PUTENV): Rewrite using AC_RUN_IFELSE, and
2516         in the process include standard headers for prototypes.
2517         * m4/readutmp.m4 (gl_READUTMP): Require AC_GNU_SOURCE, so utmpxname
2518         gets declared on GNU/Linux.
2519         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Check for and include
2520         unistd.h, for `rmdir'.
2521         * m4/time_r.m4 (gl_TIME_R): Avoid unused variables.
2522
2523         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Avoid expression that is
2524         always true.
2525         * m4/strndup.m4 (gl_FUNC_STRNDUP): include stdlib.h, for `free'.
2526
2527         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Avoid gcc -Wall warnings.
2528
2529 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2530
2531         * gnulib-tool (func_version): Create output all at once.  This
2532         may help avoid triggering unnecessary SIGPIPEs, and at any
2533         rate it doesn't hurt.
2534
2535 2006-09-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2536             Bruno Haible  <bruno@clisp.org>
2537
2538         * m4/lock.m4 (gl_LOCK_BODY): Avoid unused variables warning.
2539         * m4/mbswidth.m4 (gl_MBSWIDTH): Likewise.
2540         * m4/signed.m4 (bh_C_SIGNED): Likewise.
2541
2542         * m4/vasprintf.m4 (gl_PREREQ_VASPRINTF_H): New macro.
2543         (gl_FUNC_VASPRINTF): Invoke it.
2544
2545 2006-09-22  Bruno Haible  <bruno@clisp.org>
2546
2547         * m4/getloadavg.m4 (gl_GETLOADAVG): Expect the directory of
2548         getloadavg.c as first argument.
2549
2550 2006-09-22  Bruno Haible  <bruno@clisp.org>
2551
2552         * gnulib-tool (func_import, func_create_testdir): Set gl_source_base
2553         at the beginning of the gl_INIT macro.
2554         * modules/getloadavg (configure.ac): Pass $gl_source_base to
2555         gl_GETLOADAVG.
2556
2557 2006-09-22  Bruno Haible  <bruno@clisp.org>
2558
2559         * gnulib-tool (func_create_megatestdir): Don't include the config-h
2560         module.
2561         Suggested by Ralf Wildenhues.
2562
2563 2006-09-20  Paul Eggert  <eggert@cs.ucla.edu>
2564
2565         Import this patch from libc:
2566
2567         2006-09-06  Jakub Jelinek  <jakub@redhat.com>
2568
2569         * lib/regex_internal.c (re_string_reconstruct): Handle
2570         offset < pstr->valid_raw_len && pstr->offsets_needed case.
2571         Ensure no bytes read before raw_mbs array.  Pass a saved copy of
2572         pstr->valid_len - 1 rather than pstr->valid_raw_len - 1 to
2573         re_string_context_at.
2574
2575         * m4/regex.m4 (gl_REGEX): Check for locale.h, since the test
2576         now requires it.
2577         (gl_PREREQ_REGEX): Don't check for locale.h any more, since
2578         gl_REGEX now does it for us.
2579         (gl_REGEX): Add test taken from
2580         http://sourceware.org/ml/libc-hacker/2006-09/msg00008.html.
2581
2582         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Require AC_SYS_LARGEFILE.
2583         Check that large offsets work.  Modernize Autoconf usages.
2584         Prefer "yes" to mean a good thing rather than a bad.
2585         Don't put "#define mkstemp" in config.h, as this might interfere
2586         with standard system headers that "#define mkstemp mkstemp64".
2587
2588         * modules/mkstemp (Depends-on): Add extensions, so that
2589         mkstemp is visible on some platforms.
2590         (Makefile.am): Add mkstemp.h to EXTRA_DIST.
2591         (Include): Change to "mkstemp.h" from <stdlib.h>.
2592         (Files): Add mkstemp.h.
2593
2594         * lib/mkstemp.h: New file, since some standard headers
2595         #define mkstemp.
2596         * lib/mkstemp.c: Revamp to put the !_LIBC code together.
2597         Include "mkstemp.h".
2598         Make the _LIBC code resemble glibc original more,
2599         e.g., use K&R style.
2600         * lib/mkstemp-safer.c: Include "mkstemp.h" instead of <stdlib.h>.
2601         (mkstemp): Remove, since mkstemp.h does this for us.
2602         * lib/stdlib--.h: Include mkstemp.h.
2603
2604         Import this patch from libc:
2605
2606         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2607
2608         * lib/tempname.c (__gen_tempname): Change attempts_min
2609         into a macro.  Use preprocessor to decide how to initialize
2610         attempts [Coverity CID 67].
2611
2612 2006-09-20  Bruno Haible  <bruno@clisp.org>
2613
2614         * lib/mkdtemp.c: Import from libc.
2615         2006-04-07  Ulrich Drepper  <drepper@redhat.com>
2616                 * sysdeps/posix/tempname.c (__gen_tempname): Change
2617                 attempts_min into a macro.  Use preprocessor to decide how to
2618                 initialize attempts [Coverity CID 67].
2619         2001-11-27  Paul Eggert  <eggert@twinsun.com>
2620                 * sysdeps/posix/tempname.c (__gen_tempname): Try at least
2621                 ATTEMPTS_MIN or TMP_MAX times, whichever is greater.
2622
2623 2006-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2624
2625         * gnulib-tool (func_exit): New function, to allow to pass the
2626         exit status portably through the trap.  Use everywhere.
2627         (--help, --version): Signal a write error.
2628         (trap): catch SIGPIPE, for write errors.
2629         Exit at the end of the trap, with the correct exit status.
2630
2631 2006-09-19  Karl Berry  <karl@gnu.org>
2632
2633         * doc/gnulib.texi: note about the license texinfo files.
2634
2635 2006-09-19  Eric Blake  <ebb9@byu.net>
2636
2637         * gnulib-tool: Avoid space-tab.
2638
2639 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2640
2641         * lib/getaddrinfo.c (getaddrinfo) [defined HAVE_IPV6]: Fix typo
2642         that prevented coreutils 6.1 from building.  Problem reported
2643         by Petter Reinholdtsen.
2644
2645 2006-09-18  Paul Eggert  <eggert@cs.ucla.edu>
2646
2647         * gnulib-tool (avoidlist): Fix typo that broke options like
2648         --avoid=lock that are used by coreutils bootstrap.
2649
2650 2006-09-18  Mark D. Baushke  <mdb@gnu.org>
2651
2652         * m4/inttypes.m4 (gl_INTTYPES_H): Quote "test" args
2653         more systematically.
2654
2655 2006-09-18  Jim Meyering  <jim@meyering.net>
2656
2657         * lib/savewd.c (savewd_restore): Don't shadow: s/status/child_status/.
2658
2659 2006-09-18  Bruno Haible  <bruno@clisp.org>
2660
2661         * modules/inttypes (Files): Remove m4/inttypes-h.m4.
2662
2663 2006-09-18  Bruno Haible  <bruno@clisp.org>
2664
2665         * m4/inttypes-h.m4 (gl_HEADER_INTTYPES_H): Remove macro.
2666         * m4/inttypes-pri.m4: Require autoconf >= 2.52.
2667         (gt_INTTYPES_PRI): Invoke AC_CHECK_HEADERS on inttypes.h. Test
2668         ac_cv_header_inttypes_h instead of gl_cv_header_inttypes_h.
2669         * m4/gettext.m4: Require autoconf >= 2.52.
2670         (gt_INTL_SUBDIR_CORE): Invoke AC_CHECK_HEADERS on inttypes.h.
2671         * m4/inttypes.m4 (gl_INTTYPES_H): Test ac_cv_header_inttypes_h instead
2672         of gl_cv_header_inttypes_h.
2673
2674 2006-09-18  Bruno Haible  <bruno@clisp.org>
2675
2676         * lib/javaversion.c: Include configmake.h.
2677
2678 2006-09-18  Bruno Haible  <bruno@clisp.org>
2679
2680         * gnulib-tool (func_import, func_create_testdir): Use exec tricks to
2681         avoid that the while loops be executed in a subshell.
2682
2683 2006-09-18  Bruno Haible  <bruno@clisp.org>
2684
2685         * MODULES.html.sh (func_module): Break long lines.
2686         Suggested by Bruce Korb <bkorb@gnu.org>.
2687
2688 2006-09-17  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2689
2690         Speed up by a factor of 1.12.
2691         * gnulib-tool (nl): New variable.
2692         (func_import): Rewrite include directive extraction to only read each
2693         directive once.
2694
2695 2006-09-17  Bruno Haible  <bruno@clisp.org>
2696
2697         * modules/javaversion (Makefile.am): Remove DEFS setting.
2698         (Depends-on): Add configmake, for PKGDATADIR definition.
2699
2700 2006-09-17  Bruno Haible  <bruno@clisp.org>
2701
2702         * gnulib-tool (func_create_testdir): Rewrite all files at once.
2703
2704 2006-09-17  Bruno Haible  <bruno@clisp.org>
2705
2706         * gnulib-tool (func_append): New function, stolen from libtool.m4.
2707         (func_modules_transitive_closure, func_modules_add_dummy,
2708         func_modules_to_filelist, func_import, func_create_testdir,
2709         func_create_megatestdir, ...): Use it wherever possible.
2710         Suggested by Ralf Wildenhues.
2711
2712 2006-09-16  Karl Berry  <karl@gnu.org>
2713
2714         * doc/fdl.texi (ADDENDUM): switch to @heading from @appendixsubsec,
2715         to avoid sectioning errors.
2716         * doc/lgpl.texi, gpl.texi (Copying): downcase @unnumbered title.
2717         [ifinfo]: blank line after @center-ed titles.
2718         * doc/lgpl.texi (Library Copying): Rename main node to GNU LGPL.
2719         Spell FSF address consistently with others.
2720         (These changes approved by rms.)
2721
2722 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2723
2724         Speed up by a factor of 1.61.
2725         * gnulib-tool (func_modules_transitive_closure): Rewrite to not check
2726         already checked module names again.
2727
2728 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2729
2730         Speed up by a factor of 1.13.
2731         * gnulib-tool (func_import): Rewrite all old_files at once; likewise
2732         for new_files, and the input to func_add_or_update.
2733
2734 2006-09-15  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
2735
2736         * gnulib-tool (func_all_modules, func_modules_to_filelist, func_import,
2737         func_create_testdir, ...): Change 'sort | uniq' to 'sort -u'.
2738
2739 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2740
2741         * modules/mkancesdirs (Depends-on): Add fcntl.
2742         * modules/savewd: New file.
2743         * MODULES.html.sh (File system functions): Add savewd.
2744
2745         * modules/configmake (Makefile.am): Add support for the
2746         Automake-supplied PKGLIBDIR, PKGINCLUDEDIR, PKGDATADIR.
2747
2748 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2749
2750         * m4/savewd.m4: New file.
2751
2752 2006-09-15  Paul Eggert  <eggert@cs.ucla.edu>
2753
2754         * lib/dirchownmod.c: Don't include fcntl.h; no longer needed.
2755         (dirchownmod): New arg FD.  All callers changed.
2756         Use FD rather than opening the directory ourself, as opening is
2757         now the caller's responsibility.
2758         * lib/dirchownmod.h: Likewise.
2759         * lib/mkancesdirs.c: Include <sys/types.h>, for portability to older
2760         hosts that require <sys/types.h> before <sys/stat.h>.  Include
2761         fcntl.h, savewd.h, and unistd.h, not dirname.h and stat-macros.h.
2762         (test_dir): Remove.
2763         (mkancesdirs): Return length of prefix of FILE that has already
2764         been made, or -2 if there is a child doing the work.  Redo
2765         algorithm so that it is O(N) rather than O(N**2).  Optimize away
2766         ".", and treat ".." specially since it might stray back into
2767         already-created areas.  Use a subprocess if necessary.  New arg
2768         WD; all users changed.  MAKE_DIR function should now return 1
2769         if it creates a directory that is not readable.  Return -2 if
2770         a child process is spun off.
2771         * lib/mkancesdirs.h: Include <stddef.h>, for ptrdiff_t.
2772         Adjust signature to match code.
2773         * lib/mkdir-p.c: Include dirname.h, for IS_ABSOLUTE_FILE_NAME.
2774         (make_dir_parents): Use a subprocess if necessary.  New arg WD;
2775         all users changed.
2776         * lib/savewd.c, lib/savewd.h: New files.
2777
2778 2006-09-15  Jim Meyering  <jim@meyering.net>
2779
2780         * modules/rename-dest-slash: New module.
2781         * MODULES.html.sh (posix_compat): Add it here.
2782
2783         * modules/rename: Reflect vb_FUNC_RENAME -> gl_FUNC_RENAME change.
2784
2785 2006-09-15  Jim Meyering  <jim@meyering.net>
2786
2787         * m4/rename-dest-slash.m4 (gl_FUNC_RENAME_TRAILING_DEST_SLASH): New
2788         file.
2789
2790         * m4/rename.m4 (gl_FUNC_RENAME): Rename from vb_FUNC_RENAME.
2791
2792 2006-09-15  Jim Meyering  <jim@meyering.net>
2793
2794         * lib/rename-dest-slash.c (has_trailing_slash): Use
2795         FILE_SYSTEM_PREFIX_LEN, for non-POSIX systems.
2796         (rpl_rename_dest_slash): Perform the cheaper trailing slash
2797         test before testing whether SRC is a directory.
2798         Suggestions from Bruno Haible.
2799
2800         Avoid a warning about an unused variable.
2801         * lib/regex_internal.c (re_dfa_add_node): Move declaration of "type"
2802         into the #ifdef block where it's used.
2803
2804         * lib/rename-dest-slash.c: New file.
2805
2806 2006-09-14  Bruno Haible  <bruno@clisp.org>
2807
2808         * lib/allocsa.c: Include <config.h> unconditionally.
2809         * lib/asnprintf.c: Likewise.
2810         * lib/asprintf.c: Likewise.
2811         * lib/c-strcasecmp.c: Likewise.
2812         * lib/c-strcasestr.c: Likewise.
2813         * lib/c-strncasecmp.c: Likewise.
2814         * lib/c-strstr.c: Likewise.
2815         * lib/classpath.c: Likewise.
2816         * lib/clean-temp.c: Likewise.
2817         * lib/concatpath.c: Likewise.
2818         * lib/copy-file.c: Likewise.
2819         * lib/csharpcomp.c: Likewise.
2820         * lib/csharpexec.c: Likewise.
2821         * lib/execute.c: Likewise.
2822         * lib/fatal-signal.c: Likewise.
2823         * lib/findprog.c: Likewise.
2824         * lib/fwriteerror.c: Likewise.
2825         * lib/gl_array_list.c: Likewise.
2826         * lib/gl_array_oset.c: Likewise.
2827         * lib/gl_avltree_list.c: Likewise.
2828         * lib/gl_avltree_oset.c: Likewise.
2829         * lib/gl_avltreehash_list.c: Likewise.
2830         * lib/gl_carray_list.c: Likewise.
2831         * lib/gl_linked_list.c: Likewise.
2832         * lib/gl_linkedhash_list.c: Likewise.
2833         * lib/gl_list.c: Likewise.
2834         * lib/gl_oset.c: Likewise.
2835         * lib/gl_rbtree_list.c: Likewise.
2836         * lib/gl_rbtree_oset.c: Likewise.
2837         * lib/gl_rbtreehash_list.c: Likewise.
2838         * lib/imaxabs.c: Likewise.
2839         * lib/imaxdiv.c: Likewise.
2840         * lib/javacomp.c: Likewise.
2841         * lib/javaexec.c: Likewise.
2842         * lib/javaversion.c: Likewise.
2843         * lib/linebreak.c: Likewise.
2844         * lib/localcharset.c: Likewise.
2845         * lib/lock.c: Likewise.
2846         * lib/mbchar.c: Likewise.
2847         * lib/mbswidth.c: Likewise.
2848         * lib/mkdtemp.c: Likewise.
2849         * lib/pipe.c: Likewise.
2850         * lib/printf-args.c: Likewise.
2851         * lib/printf-parse.c: Likewise.
2852         * lib/progname.c: Likewise.
2853         * lib/progreloc.c: Likewise.
2854         * lib/readlink.c: Likewise.
2855         * lib/sh-quote.c: Likewise.
2856         * lib/stpcpy.c: Likewise.
2857         * lib/stpncpy.c: Likewise.
2858         * lib/strcasecmp.c: Likewise.
2859         * lib/strcasestr.c: Likewise.
2860         * lib/strcspn.c: Likewise.
2861         * lib/striconv.c: Likewise.
2862         * lib/strncasecmp.c: Likewise.
2863         * lib/strnlen1.c: Likewise.
2864         * lib/strstr.c: Likewise.
2865         * lib/strtok_r.c: Likewise.
2866         * lib/tls.c: Likewise.
2867         * lib/tmpdir.c: Likewise.
2868         * lib/unicodeio.c: Likewise.
2869         * lib/unsetenv.c: Likewise.
2870         * lib/vasnprintf.c: Likewise.
2871         * lib/vasprintf.c: Likewise.
2872         * lib/wait-process.c: Likewise.
2873         * lib/xallocsa.c: Likewise.
2874         * lib/xsetenv.c: Likewise.
2875         * lib/xstriconv.c: Likewise.
2876
2877 2006-09-13  Simon Josefsson  <jas@extundo.com>
2878
2879         * m4/getdate.m4: Don't AC_LIBOBJ([getdate]), automake takes care of
2880         that internally, suggested by Ralf Wildenhues
2881         <Ralf.Wildenhues@gmx.de>.
2882
2883 2006-09-13  Simon Josefsson  <jas@extundo.com>
2884
2885         * gnulib-tool (func_emit_lib_Makefile_am): Use $(LIBOBJS), not
2886         @LIBOBJS@.
2887         Suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
2888
2889 2006-09-13  Paul Eggert  <eggert@cs.ucla.edu>
2890
2891         * lib/_fpending.c: Include <config.h> unconditionally, since we no
2892         longer worry about uses that don't define HAVE_CONFIG_H.
2893         * lib/acl.c, lib/alloca.c, lib/argmatch.c, lib/atexit.c:
2894         * lib/backupfile.c, lib/basename.c, lib/c-stack.c, lib/c-strtod.c:
2895         * lib/calloc.c,lib/ canon-host.c, lib/canonicalize.c, lib/chdir-long.c:
2896         * lib/chdir-safer.c, lib/chown.c, lib/cloexec.c, lib/close-stream.c:
2897         * lib/closeout.c, lib/creat-safer.c, lib/cycle-check.c, lib/diacrit.c:
2898         * lib/dirchownmod.c, lib/dirfd.c, lib/dirname.c, lib/dup-safer.c:
2899         * lib/dup2.c, lib/error.c, lib/euidaccess.c, lib/exclude.c:
2900         * lib/exitfail.c, lib/fchmodat.c, lib/fchown-stub.c, lib/fd-safer.c:
2901         * lib/file-type.c, lib/fileblocks.c, lib/filemode.c, lib/filenamecat.c:
2902         * lib/fnmatch.c, lib/fopen-safer.c, lib/fprintftime.c, lib/free.c:
2903         * lib/fsusage.c, lib/ftruncate.c, lib/fts-cycle.c, lib/fts.c:
2904         * lib/full-write.c, lib/gai_strerror.c, lib/getcwd.c, lib/getdate.y:
2905         * lib/getdomainname.c, lib/getgroups.c, lib/gethostname.c:
2906         * lib/gethrxtime.c, lib/getloadavg.c, lib/getlogin_r.c:
2907         * lib/getndelim2.c, lib/getnline.c, lib/getopt.c, lib/getopt1.c:
2908         * lib/getpass.c, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c:
2909         * lib/getusershell.c, lib/glob.c, lib/group-member.c:
2910         * lib/hard-locale.c, lib/hash-pjw.c, lib/hash.c, lib/human.c:
2911         * lib/idcache.c, lib/inet_ntop.c, lib/inet_pton.c, lib/inttostr.c:
2912         * lib/isdir.c, lib/lchown.c, lib/linebuffer.c, lib/long-options.c:
2913         * lib/lstat.c, lib/malloc.c, lib/md5.c, lib/memcasecmp.c, lib/memchr.c:
2914         * lib/memcmp.c, lib/memcoll.c, lib/memcpy.c, lib/memmove.c:
2915         * lib/memrchr.c, lib/mkancesdirs.c, lib/mkdir-p.c, lib/mkdir.c:
2916         * lib/mkdirat.c, lib/mkstemp-safer.c, lib/mkstemp.c, lib/modechange.c:
2917         * lib/mountlist.c, lib/nanosleep.c, lib/obstack.c, lib/open-safer.c:
2918         * lib/openat-die.c, lib/openat.c, lib/pagealign_alloc.c, lib/physmem.c:
2919         * lib/pipe-safer.c, lib/posixtm.c, lib/posixver.c, lib/putenv.c:
2920         * lib/quote.c, lib/quotearg.c, lib/raise.c, lib/readtokens.c:
2921         * lib/readtokens0.c, lib/readutmp.c, lib/realloc.c, lib/regex.c:
2922         * lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c:
2923         * lib/same.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c:
2924         * lib/settime.c, lib/sha1.c, lib/sig2str.c, lib/snprintf.c:
2925         * lib/strdup.c, lib/strerror.c, lib/strftime.c, lib/stripslash.c:
2926         * lib/strndup.c, lib/strnlen.c, lib/strpbrk.c, lib/strtod.c:
2927         * lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c:
2928         * lib/time_r.c, lib/timegm.c, lib/tmpfile-safer.c, lib/unlinkdir.c:
2929         * lib/userspec.c, lib/utime.c, lib/utimecmp.c, lib/utimens.c:
2930         * lib/version-etc-fsf.c, lib/version-etc.c, lib/xalloc-die.c:
2931         * lib/xgetcwd.c, lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c:
2932         * lib/xnanosleep.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtoimax.c:
2933         * lib/xstrtol.c, lib/xstrtoumax.c, lib/yesno.c:
2934         Likewise.
2935
2936 2006-09-13  Eric Blake  <ebb9@byu.net>
2937
2938         * lib/getopt.c: Fix typo in last commit.
2939
2940 2006-09-12  Sergey Poznyakoff  <gray@gnu.org.ua>
2941
2942         * lib/argp-help.c (argp_doc): Make sure NULL is not passed to
2943         dgettext.
2944
2945 2006-09-12  Jim Meyering  <jim@meyering.net>
2946
2947         * lib/nanosleep.c: Include <sys/types.h> before sys/select.h, to avoid
2948         compilation failure (due to use of pid_t in latter) on NetBSD 1.6.
2949         Reported by Nelson H. F. Beebe.
2950
2951 2006-09-10  Sergey Poznyakoff  <gray@gnu.org.ua>
2952
2953         * lib/argp-parse.c (__argp_parse) [!_LIBC]: Make sure
2954         program_invocation_name and program_invocation_short_name are
2955         initialized.
2956         * lib/argp-namefrob.h: Move declarations of program_invocation_name
2957         and program_invocation_short_name to argp.h, so they are visible
2958         to user programs.
2959         * lib/argp.h: Likewise
2960
2961 2006-09-10  Bruno Haible  <bruno@clisp.org>
2962
2963         * modules/mkdtemp (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
2964         m4/inttypes_h.m4, m4/uintmax_t.m4.
2965
2966 2006-09-10  Bruno Haible  <bruno@clisp.org>
2967
2968         * m4/mkdtemp.m4 (gl_PREREQ_MKDTEMP): Don't require
2969         gl_AC_TYPE_UINTMAX_T.
2970
2971 2006-09-10  Bruno Haible  <bruno@clisp.org>
2972
2973         * lib/mkdtemp.c: Include <stdint.h> always. Don't include <inttypes.h>.
2974
2975 2006-09-09  Sergey Poznyakoff  <gray@gnu.org.ua>
2976
2977         * lib/argp.h (struct argp): Document the N_("..") "\v" N_("..")
2978         convention.  Text proposed by Bruno Haible.
2979         (struct argp_option): Document the use of N_() wrappers.
2980
2981         * lib/argp-help.c (argp_doc): Split the untranslated doc string on
2982         '\v', and translate the two parts separately, instead of feeding
2983         the whole string to gettext.  This allows to exclude
2984         '\v' from the strings visible to the translator by writing doc
2985         strings as N_("..") "\v" N_("..").
2986
2987 2006-09-09  Paul Eggert  <eggert@cs.ucla.edu>
2988
2989         * config/srclist.txt: Undo latest change; the bug was fixed.
2990
2991 2006-09-09  Bruno Haible  <bruno@clisp.org>
2992
2993         * gnulib-tool (func_emit_lib_Makefile_am): Eliminate lib_LDFLAGS
2994         assignments if building a library without libtool.
2995         (func_emit_tests_Makefile_am): Likewise. Handle lib_* variables as
2996         in func_emit_lib_Makefile_am.
2997         (func_import): When building a static library libfoo.a, arrange to
2998         define variables LIBFOO_LIBDEPS and LIBFOO_LTLIBDEPS.
2999         (func_create_testdir): Likewise.
3000         * modules/gc (configure.ac, Makefile.am): If building statically,
3001         augment gl_libdeps and gl_ltlibdeps instead of lib_LDFLAGS.
3002         * modules/iconvme (configure.ac, Makefile.am): Likewise.
3003         * modules/striconv (configure.ac, Makefile.am): Likewise.
3004         Based on a suggestion by Ralf Wildenhues.
3005
3006 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3007
3008         * m4/mktime.m4 (AC_FUNC_MKTIME): Sync from Autoconf.
3009         Check for unistd.h too, since Autoconf doesn't assume POSIX.
3010         Also:
3011
3012         2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3013         Add year_2050_test to catch glibc bug 2821
3014         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3015
3016         2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
3017         Prefer #ifdef to #if.
3018
3019         2006-04-02  Paul Eggert  <eggert@cs.ucla.edu>
3020         Return from 'main' instead of calling 'exit'.
3021
3022 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3023
3024         * lib/mktime.c (guess_time_tm): Fix bug where mktime
3025         returned the maximum time_t value rather than (time_t) -1.
3026         Problem originally reported by William Bardwell
3027         <http://sourceware.org/bugzilla/show_bug.cgi?id=2821>.
3028
3029         * lib/isapipe.h (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3030         Moved to here ...
3031         * lib/isapipe.c (HAVE_FIFO_PIPES) [!defined HAVE_FIFO_PIPES]:
3032         ... from here.
3033
3034 2006-09-08  Paul Eggert  <eggert@cs.ucla.edu>
3035
3036         * config/srclist.txt: Temporarily comment out mktime.c until glibc bug
3037         2821 is fixed.
3038
3039 2006-09-08  Jim Meyering  <jim@meyering.net>
3040
3041         Don't make generated files read-only.  That would bother too many
3042         people.  However, do retain the ability to work when targets are
3043         read-only: remove the destination and temporary files before writing
3044         them (when generated via sed or echo), or by using the -f option for
3045         both cp and mv commands.  Suggestion to use -f from Paul Eggert.
3046         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3047         * modules/byteswap, modules/configmake, modules/fcntl:
3048         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3049         * modules/localcharset, modules/netinet_in, modules/poll:
3050         * modules/stdbool, modules/stdint, modules/sys_select:
3051         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3052
3053 2006-09-08  Jim Meyering  <jim@meyering.net>
3054
3055         Avoid new build failure on FreeBSD 6.0.
3056         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Include
3057         <sys/param.h> when testing whether getmntinfo uses statvfs.  Patch by
3058         Pavel Tsekov, in <http://savannah.gnu.org/bugs/?17643>.
3059
3060 2006-09-07  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3061
3062         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't use plain echo.
3063
3064 2006-09-07  Jim Meyering  <jim@meyering.net>
3065
3066         Fix global typo in last change: use chmod u-w, not chmod u-x.
3067         Spotted by Paul Eggert and Bruce Korb.
3068         * modules/alloca-opt, modules/argz, modules/arpa_inet:
3069         * modules/byteswap, modules/configmake, modules/fcntl:
3070         * modules/fnmatch, modules/getopt, modules/glob, modules/inttypes:
3071         * modules/localcharset, modules/netinet_in, modules/poll:
3072         * modules/stdbool, modules/stdint, modules/sys_select:
3073         * modules/sys_socket, modules/sys_stat, modules/sysexits:
3074
3075 2006-09-06  Jim Meyering  <jim@meyering.net>
3076
3077         Make generated files be read-only.
3078         * modules/alloca-opt (Makefile.am): Work also when $@ is read-only.
3079         Ensure that each generated file is now read-only.
3080         * modules/argz: Likewise.
3081         * modules/arpa_inet: Likewise.
3082         * modules/byteswap: Likewise.
3083         * modules/configmake: Likewise.
3084         * modules/fcntl: Likewise.
3085         * modules/fnmatch: Likewise.
3086         * modules/getopt: Likewise.
3087         * modules/glob: Likewise.
3088         * modules/inttypes: Likewise.
3089         * modules/netinet_in: Likewise.
3090         * modules/poll: Likewise.
3091         * modules/stdbool: Likewise.
3092         * modules/stdint: Likewise.
3093         * modules/sys_select: Likewise.
3094         * modules/sys_socket: Likewise.
3095         * modules/sys_stat: Likewise.
3096         * modules/sysexits: Likewise.
3097         * modules/localcharset: Same as above, but continue using temporary
3098         file named "t-$@" (why different?) rather than the "$@-t" used
3099         everywhere else.
3100
3101         * modules/sysexits (Makefile.am): Replace literal occurrences
3102         of "sysexit.h" more readable, and more consistent, "$@".
3103
3104 2006-09-06  Bruno Haible  <bruno@clisp.org>
3105
3106         * modules/striconv: New file.
3107         * modules/xstriconv: New file.
3108         * MODULES.html.sh (Internationalization functions): Add striconv,
3109         xstriconv.
3110
3111 2006-09-06  Bruno Haible  <bruno@clisp.org>
3112
3113         * modules/gc (Makefile.am): Augment lib_LDFLAGS, not lib_LIBADD.
3114         * modules/iconvme (Makefile.am): Likewise. Also handle the case of
3115         not using libtool correctly.
3116
3117 2006-09-06  Bruno Haible  <bruno@clisp.org>
3118
3119         * lib/striconv.h: New file.
3120         * lib/striconv.c: New file, merging iconvme.c with GNU gettext's
3121         iconvstring.c.
3122         * lib/xstriconv.h: New file.
3123         * lib/xstriconv.c: New file.
3124
3125 2006-09-06  Bruno Haible  <bruno@clisp.org>
3126
3127         * gnulib-tool (func_emit_lib_Makefile_am): Initialize also
3128         lib_..._LDFLAGS.
3129
3130 2006-09-05  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3131
3132         * lib/argz_.h: Sync from Libtool.
3133
3134         2006-09-04  George Bosilca <bosilca@cs.utk.edu>
3135                 and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
3136
3137         * lib/libltdl/argz_.h: It's __cplusplus, not _cplusplus.
3138
3139 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3140
3141         * modules/trim: New file.
3142
3143 2006-09-05  Davide Angelocola  <davide.angelocola@tiscali.it>
3144
3145         * lib/trim.h: New file.
3146         * lib/trim.c: New file.
3147
3148 2006-09-05  Bruno Haible  <bruno@clisp.org>
3149
3150         * MODULES.html.sh (String handling): Add trim.
3151
3152 2006-09-04  Karl Berry  <karl@gnu.org>
3153
3154         * config/srclist.txt (signed.m4, gettext.m4): changes not propagated
3155         until next release.
3156
3157 2006-09-03  Bruno Haible  <bruno@clisp.org>
3158
3159         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Locate mingw shared libraries
3160         correctly.
3161
3162 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3163
3164         * m4/getloadavg.m4 (gl_GETLOADAVG): Use CONFIGURING_GETLOADAVG,
3165         not gl_GETLOADAVG.  Omit unneeded semicolons.
3166         Problems reported by Ralf Wildenhues in
3167         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3168         (gl_PREREQ_GETLOADAVG): Use AC_DEFUN, not m4_define.  Put
3169         at the end, which is the usual gnulib style.
3170
3171         * m4/fstypename.m4 (gl_FSTYPENAME): Use AC_CHECK_MEMBERS instead
3172         of doing all the work ourselves.
3173         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Don't check for
3174         sys/statvfs.h since the code doesn't use HAVE_SYS_STATVFS_H.
3175
3176 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3177
3178         * lib/getloadavg.c: Use CONFIGURING_GETLOADAVG, not gl_GETLOADAVG.
3179         Problem reported by Ralf Wildenhues in
3180         <http://lists.gnu.org/archive/html/bug-gnulib/2006-09/msg00000.html>.
3181
3182         * lib/mountlist.c: All uses of HAVE_F_FSTYPENAME_IN_STATFS replaced by
3183         HAVE_STRUCT_STATFS_F_FSTYPENAME.
3184
3185 2006-09-01  Paul Eggert  <eggert@cs.ucla.edu>
3186
3187         * gnulib-tool (func_emit_lib_Makefile_am): Fix typos in
3188         yesterday's patch by changing test -n to test -z.
3189
3190 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3191
3192         * modules/getloadavg (Files): Add m4/getloadavg.m4.
3193         (configure.ac): AC_FUNC_GETLOADAVG -> gl_GETLOADAVG, as
3194         the former is now obsolescent.
3195
3196         * modules/chdir-long (Depends-on): Add fcntl.
3197
3198 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3199
3200         * m4/fnmatch.m4: Add comment that Autoconf AC_FUNC_FNMATCH is
3201         obsolescent, and programs should use gnulib instead.
3202         * m4/getloadavg.m4: New file, with contents taken from Autoconf
3203         but with prefixes changed.
3204
3205 2006-08-31  Paul Eggert  <eggert@cs.ucla.edu>
3206
3207         * lib/getloadavg.c [defined gl_GETLOADAVG]: Don't include config.h
3208         or stdbool.h, because they might not exist while configuring.
3209
3210         * lib/chdir-long.c: Include <fcntl.h>, for O_DIRECTORY.
3211         Don't include unistd.h or limits.h; not needed, since chdir-long.h
3212         does that for us.
3213         (O_DIRECTORY): Remove.
3214
3215 2006-08-31  Eric Blake  <ebb9@byu.net>
3216
3217         * gnulib-tool: Don't let emacs change spaces to TAB.
3218
3219 2006-08-31  Bruno Haible  <bruno@clisp.org>
3220
3221         * gnulib-tool: When calling func_import more than once, do it in a
3222         subshell.
3223         Reported by Eric Blake <ebb9@byu.net>.
3224
3225 2006-08-31  Bruno Haible  <bruno@clisp.org>
3226
3227         * gnulib-tool (nl): Remove variable.
3228         (sed_transform_lib_file): Use more robust test for config-h module.
3229         (func_import): Fix typo in 2006-08-25 patch.
3230
3231 2006-08-31  Bruno Haible  <bruno@clisp.org>
3232
3233         * gnulib-tool (func_emit_lib_Makefile_am): When --makefile-name was
3234         specified, augment Makefile.am variables instead of assigning them.
3235
3236 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3237
3238         Work around a bug in both the Linux and SunOS 64-bit kernels:
3239         nanosleep mishandles sleeps for longer than 2**31 seconds.
3240         Problem reported by Frank v Waveren in
3241         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3242         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Require gl_CLOCK_TIME.
3243         Check for nanosleep bug.
3244         (LIB_NANOSLEEP): Append clock_gettime library if needed.
3245
3246 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3247
3248         Work around a bug in both the Linux and SunOS 64-bit kernels:
3249         nanosleep mishandles sleeps for longer than 2**31 seconds.
3250         Problem reported by Frank v Waveren in
3251         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00298.html>.
3252         * lib/nanosleep.c (BILLION): New constant.
3253         (getnow) [HAVE_BUG_BIG_NANOSLEEP]: New functions.
3254         (rpl_nanosleep) [HAVE_BUG_BIG_NANOSLEEP]: Completely new
3255         implementation.
3256
3257 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3258
3259         * modules/nanosleep (Depends-on): Add gettime.
3260
3261 2006-08-30  Paul Eggert  <eggert@cs.ucla.edu>
3262         and Simon Josefsson  <jas@extundo.com>
3263         and Oskar Liljeblad  <oskar@osk.mine.nu>
3264
3265         * MODULES.html.sh (Support for building documentation): Add gpl, lgpl.
3266         * gnulib-tool (func_import): New license type 'unmodifiable license
3267         text'.
3268         * modules/fdl: Use it.  Longer description.
3269         * module/gpl, module/lgpl: New files.
3270
3271 2006-08-30  Jim Meyering  <jim@meyering.net>
3272
3273         * lib/isapipe.c (isapipe): Rename local s/fd/fd_pair/ to avoid
3274         shadowing the parameter.
3275
3276 2006-08-29  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3277
3278         Sync from Libtool:
3279
3280         2006-08-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
3281
3282         * lib/libltdl/argz.c: Use `#ifdef HAVE_CONFIG_H', to facilitate code
3283         sharing with gnulib.  Report by Eric Blake.
3284
3285 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3286
3287         * modules/isapipe: New file.
3288         * MODULES.html.sh (File descriptor based Input/Output): Add isapipe.
3289
3290 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3291
3292         * modules/configmake (Makefile.am): Add a comment, and omit
3293         the CONFIGMAKE_ prefix from generated macro names.  Suggested
3294         by Bruno Haible.
3295
3296 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3297
3298         * m4/isapipe.m4: New file.
3299
3300 2006-08-29  Paul Eggert  <eggert@cs.ucla.edu>
3301
3302         * lib/isapipe.c, lib/isapipe.h: New files.
3303
3304 2006-08-29  Jim Meyering  <jim@meyering.net>
3305
3306         * modules/configmake (Makefile.am): Make configmake.h depend on
3307         Makefile.  Otherwise, a stale configmake.h could hang around.
3308
3309 2006-08-29  Eric Blake  <ebb9@byu.net>
3310
3311         * lib/error.c (error_at_line, print_errno_message): Match libc, after
3312         resolution of upstream bug 3044.
3313
3314 2006-08-29  Bruno Haible  <bruno@clisp.org>
3315
3316         * modules/localcharset (Depends-on): Add configmake.
3317         (Makefile.am): Remove setting of LIBDIR through DEFS.
3318
3319 2006-08-29  Bruno Haible  <bruno@clisp.org>
3320
3321         * lib/localcharset.c: Include configmake.h in order to get LIBDIR
3322         defined.
3323
3324 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3325
3326         * modules/fcntl: New file.
3327         * modules/chdir-safer (Depends-on): Add fcntl.
3328         * modules/fts: Likewise.
3329         * modules/mkdir-p: Likewise.
3330
3331         * modules/stdint (Makefile.am): Do not substitute ABSOLUTE_INTTYPES_H.
3332         This undoes the most recent change, since we're now addressing the
3333         problem in a different way.
3334
3335         * gnulib-tool (emit_lib_Makefile_am): Don't put $makefile_name
3336         into output, since the output might be called Makefile.am even
3337         if $makefile_name is something different.
3338         (func_import): Use $makefile_am rather than
3339         ${makefile_name-Makefile.am}, to fix a bug where makefile_name was
3340         empty.
3341
3342         * modules/inttypes (Files): Add m4/inttypes-h.m4.
3343
3344 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3345
3346         * m4/inttypes.m4 (gl_INTTYPES_H): Move ABSOLUTE_INTTYPES_H code here...
3347         * m4/stdint.m4 (gl_STDINT_H): ... from here.  This undoes the most
3348         recent change to stdint.m4, since we're now addressing the problem in a
3349         different way.
3350
3351 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3352
3353         * m4/fcntl_h.m4: New file.
3354
3355 2006-08-28  Paul Eggert  <eggert@cs.ucla.edu>
3356
3357         * lib/fcntl_.h: New file.
3358         * lib/chdir-safer.c (O_DIRECTORY, O_NOFOLLOW): Remove, now that we have
3359         the fcntl module.
3360         * lib/dirchownmod.c: Likewise.
3361         * lib/fts.c: Likewise.
3362
3363         * lib/inttypes_.h [defined _GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H]:
3364         Include @ABSOLUTE_INTTYPES_H@ if available, but do nothing else.
3365         * lib/stdint_.h (_GL_JUST_INCLUDE_ABSOLUTE_INTTYPES_H): Define
3366         just before including <inttypes.h>, to avoid circular inclusion.
3367
3368 2006-08-28  Jim Meyering  <jim@meyering.net>
3369
3370         * doc/visibility.texi: Actually read and correct the grammar of the
3371         sentence affected by yesterday's change.
3372
3373 2006-08-28  Eric Blake  <ebb9@byu.net>
3374
3375         * modules/inttypes (Makefile.am): Fix sed error when inttypes.h
3376         needs wrapper.
3377
3378 2006-08-28  Eric Blake  <ebb9@byu.net>
3379
3380         * m4/inttypes.m4 (gl_INTTYPES_H): Fix missing #endif.
3381
3382 2006-08-28  Eric Blake  <ebb9@byu.net>
3383
3384         * m4/codeset.m4 (AM_LANGINFO_CODESET): Avoid compiler warning.
3385
3386 2006-08-28  Bruno Haible  <bruno@clisp.org>
3387
3388         * modules/c-strstr: New file, from GNU gettext.
3389         * MODULES.html.sh (String handling): Add c-strstr.
3390
3391 2006-08-28  Bruno Haible  <bruno@clisp.org>
3392
3393         * m4/inttypes.m4 (gl_INTTYPES_H): Don't test for the existence of SCNX*
3394         macros.
3395         Reported by Eric Blake.
3396
3397 2006-08-28  Bruno Haible  <bruno@clisp.org>
3398
3399         * lib/vasnprintf.c (EOVERFLOW): Remove definition.
3400         (VASNPRINTF): Return a string of length > INT_MAX without failing.
3401         * lib/vasprintf.c: Include errno.h, limits.h.
3402         (EOVERFLOW): New fallback definition.
3403         (vasprintf): Test here whether the string length is > INT_MAX.
3404         * lib/vsnprintf.c: Include errno.h, limits.h.
3405         (EOVERFLOW): New fallback definition.
3406         (vsnprintf): Fix bug when generated string was too long for the buffer.
3407         Test here whether the string length is > INT_MAX.
3408
3409 2006-08-28  Bruno Haible  <bruno@clisp.org>
3410
3411         * lib/inttypes_.h (SCNX*): Remove definitions.
3412         Reported by Eric Blake.
3413
3414 2006-08-28  Bruno Haible  <bruno@clisp.org>
3415
3416         * lib/c-strstr.h: New file, from GNU gettext.
3417         * lib/c-strstr.c: New file, from GNU gettext.
3418
3419 2006-08-28  Bruno Haible  <bruno@clisp.org>
3420
3421         * gnulib-tool: Reorder some statements.
3422
3423 2006-08-28  Bruno Haible  <bruno@clisp.org>
3424
3425         * gnulib-tool: New option --makefile-name.
3426         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Use
3427         $makefile_name.
3428         (func_import): Write $makefile_name to the cache file, and read it from
3429         there unless explicitly specified. Use $makefile_name as file name
3430         instead of Makefile.am. Adjust the recommendations accordingly.
3431
3432 2006-08-28  Bruno Haible  <bruno@clisp.org>
3433
3434         * gnulib-tool (func_verify_module): Check against misapplying patch.
3435
3436 2006-08-28  Bruno Haible  <bruno@clisp.org>
3437
3438         * gnulib-tool (func_relativize, func_relconcat): New functions.
3439         Give an error if --local-dir is given with --update.
3440         Remove trailing slashes from $local_gnulib_dir.
3441         (func_import): Store the relativized $local_gnulib_dir in
3442         gnulib-cache.m4, and read it from there if not specified explicitly.
3443
3444 2006-08-28  Bruno Haible  <bruno@clisp.org>
3445
3446         * gnulib-tool (func_get_tests_module): Don't assume that $gnulib_dir
3447         is the current directory. Respect also $local_gnulib_dir.
3448
3449 2006-08-28  Bruno Haible  <bruno@clisp.org>
3450             Simon Josefsson  <jas@extundo.com>
3451
3452         BeOS portability.
3453         * lib/getaddrinfo.c (PF_INET, PF_UNSPEC): New macros.
3454
3455 2006-08-27  Jim Meyering  <jim@meyering.net>
3456
3457         * doc/visibility.texi: Remove duplicate word: "pointer".
3458
3459 2006-08-26  Bruno Haible  <bruno@clisp.org>
3460
3461         * modules/inttypes (Files): Add lib/inttypes_.h, remove lib/inttypes.h.
3462         Add m4/inttypes.m4, remove m4/_inttypes_h.m4 and m4/include_next.m4.
3463         (Makefile.am): Create inttypes.h from inttypes_.h.
3464         * modules/stdint (Makefile.am): Substitute also ABSOLUTE_INTTYPES_H.
3465
3466         * modules/imaxabs: New file.
3467
3468         * modules/imaxdiv: New file.
3469
3470 2006-08-26  Bruno Haible  <bruno@clisp.org>
3471
3472         * m4/inttypes.m4: New file.
3473         * m4/_inttypes_h.m4: Remove file.
3474         * m4/inttypes-pri.m4 (gt_INTTYPES_PRI): Also AC_SUBST
3475         PRI_MACROS_BROKEN.
3476         * m4/stdint.m4 (gl_STDINT_H): Define also ABSOLUTE_INTTYPES_H.
3477
3478         * m4/imaxabs.m4: New file.
3479
3480         * m4/imaxdiv.m4: New file.
3481
3482 2006-08-26  Bruno Haible  <bruno@clisp.org>
3483
3484         * lib/inttypes_.h: New file.
3485         * lib/inttypes.h: Remove file.
3486         * lib/stdint_.h: Include <inttypes.h> through its absolute filename.
3487
3488         * lib/imaxabs.c: New file.
3489
3490         * lib/imaxdiv.c: New file.
3491
3492 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3493
3494         New config-h module, so that "make" output needn't be cluttered
3495         by -DHAVE_CONFIG_H.
3496         * MODULES.html.sh (Support for building libraries and executables):
3497         Add config-h.
3498         * modules/config-h: New file.
3499         * gnulib-tool (nl, sed_transform_lib_file): New vars.
3500         (func_import): Turn "#ifdef HAVE_CONFIG_H" to "#if 1" if
3501         the config-h module is used.
3502
3503         New configmake module, so that "make" output needn't be cluttered
3504         by fluff like '-DLIBDIR=\"/usr/local/lib\"'.
3505         * MODULES.html.sh (Support for building libraries and executables):
3506         Add configmake.
3507         * modules/configmake: New file.
3508
3509 2006-08-25  Paul Eggert  <eggert@cs.ucla.edu>
3510
3511         * m4/config-h.m4: New file.
3512
3513 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3514
3515         * config/srclist.txt: Add elisp-comp.
3516
3517 2006-08-24  Paul Eggert  <eggert@cs.ucla.edu>
3518
3519         * MODULES.html.sh (Support for building libraries and executables):
3520         Add elisp-comp.
3521         * build-aux/elisp-comp: New file.
3522         * modules/elisp-comp: New file.
3523
3524 2006-08-24  Bruno Haible  <bruno@clisp.org>
3525
3526         * gnulib-tool (func_create_testdir): Use non-default values of
3527         sourcebase and m4base.
3528
3529 2006-08-24  Bruno Haible  <bruno@clisp.org>
3530
3531         * MODULES.html.sh (Compatibility checks for POSIX:2001 functions: Fix
3532         HTML structure.
3533
3534 2006-08-23  Paul Eggert  <eggert@cs.ucla.edu>
3535
3536         * modules/openat (Depends-on): Add lchown.
3537
3538 2006-08-23  Bruno Haible  <bruno@clisp.org>
3539
3540         * gnulib-tool (func_import, func_create_testdir): Emit an invocation
3541         of gl_LOCK_EARLY instead of gl_LOCK.
3542
3543 2006-08-23  Bruno Haible  <bruno@clisp.org>
3544
3545         * m4/lock.m4 (gl_LOCK_BODY): Change the default value of gl_use_threads
3546         on OSF/1 to no.
3547         Reported by Stephen Cartwright <sgcartwr@ucalgary.ca>.
3548
3549 2006-08-23  Bruno Haible  <bruno@clisp.org>
3550
3551         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Don't consider BeOS statvfs
3552         as unusable.
3553
3554         * m4/lock.m4 (gl_LOCK_EARLY): Renamed from gl_LOCK.
3555         (gl_LOCK_BODY): Remove gl_PREREQ_LOCK invocation.
3556         (gl_LOCK): New macro.
3557
3558 2006-08-22  Simon Josefsson  <jas@extundo.com>
3559
3560         * modules/gc-md5 (Makefile.am): Need to add md5.h, after changes
3561         to md5 module.
3562
3563 2006-08-22  Simon Josefsson  <jas@extundo.com>
3564
3565         * MODULES.html.sh: Add "Support for maintaining and release
3566         projects".
3567
3568         * build-aux/gnupload: New file, from coreutils.
3569
3570 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3571
3572         Avoid the need for AC_LIBSOURCES in m4 macros.
3573         * modules/arcfour (EXTRA_DIST): Add arcfour.h.
3574         * modules/arctwo (EXTRA_DIST): Add arctwo.h.
3575         * modules/check-version (EXTRA_DIST): Add check-version.h.
3576         * modules/crc (EXTRA_DIST): Add crc.h.
3577         * modules/des (EXTRA_DIST): Add des.h.
3578         * modules/gc (EXTRA_DIST): Add gc.h.
3579         * modules/getdelim (EXTRA_DIST): Add getdelim.h.
3580         * modules/getline (EXTRA_DIST): Add getline.h.
3581         * modules/getlogin_r (EXTRA_DIST): Add getlogin_r.h.
3582         * modules/hmac-md5 (EXTRA_DIST): Add hmac.h.
3583         * modules/hmac-sha1 (EXTRA_DIST): Add hmac.h.
3584         * modules/md2 (EXTRA_DIST): Add md2.h.
3585         * modules/md4 (EXTRA_DIST): Add md4.h.
3586         * modules/pagealign_alloc (EXTRA_DIST): Add pagealign_alloc.h.
3587         * modules/read-file (EXTRA_DIST): Add read-file.h.
3588         * modules/readline (EXTRA_DIST): Add readline.h.
3589         * modules/rijndael (EXTRA_DIST): Add rijndael-alg-fst.h,
3590         rijndael-api-fst.h.
3591
3592 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3593
3594         * m4/rijndael.m4 (gl_ARCFOUR):
3595         * m4/arctwo.m4 (gl_ARCTWO):
3596         * m4/check-version.m4 (gl_CHECK_VERSION):
3597         * m4/crc.m4 (gl_CRC):
3598         * m4/des.m4 (gl_DES):
3599         * m4/gc-pbkdf2-sha1.m4 (gl_GC_PBKDF2_SHA1):
3600         * m4/gc.m4 (gl_GC):
3601         * m4/getdelim.m4 (gl_FUNC_GETDELIM):
3602         * m4/getline.m4 (gl_FUNC_GETLINE):
3603         * m4/getlogin_r.m4 (gl_GETLOGIN_R_SUBSTITUTE):
3604         * m4/hmac-md5.m4 (gl_HMAC_MD5):
3605         * m4/hmac-sha1.m4 (gl_HMAC_SHA1):
3606         * m4/md2.m4 (gl_MD2):
3607         * m4/md4.m4 (gl_MD4):
3608         * m4/pagealign_alloc.m4 (gl_PAGEALIGN_ALLOC):
3609         * m4/read-file.m4 (gl_FUNC_READ_FILE):
3610         * m4/readline.m4 (gl_FUNC_READLINE):
3611         * m4/rijndael.m4 (gl_RIJNDAEL):
3612         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3613         to get the necessary .h files and whatnot.
3614
3615 2006-08-22  Paul Eggert  <eggert@cs.ucla.edu>
3616
3617         * config/srclist.txt: Remove gnupload, since coreutils now syncs from
3618         gnulib rather than the other way around.
3619         * config/srclistvars.sh (COREUTILS): Remove.
3620
3621 2006-08-22  Jim Meyering  <jim@meyering.net>
3622
3623         * modules/mkdir-p (Makefile.am): Fix typo: s/lib+SOURCES/lib_SOURCES/.
3624
3625         * modules/getpass-gnu (Makefile.am): Add getpass.h to EXTRA_DIST.
3626
3627 2006-08-22  Eric Blake  <ebb9@byu.net>
3628
3629         * modules/regexprops-generic: New file.
3630         * MODULES.html.sh (Support for building documentation): List it.
3631
3632 2006-08-22  Eric Blake  <ebb9@byu.net>
3633
3634         * m4/stdint_h.m4 (gl_AC_HEADER_STDINT_H): Avoid compiler warning.
3635         * m4/inttypes_h.m4 (gl_AC_HEADER_INTTYPES_H): Likewise.
3636         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Likewise.
3637         * m4/intmax_t.m4 (gt_AC_TYPE_INTMAX_T): Likewise.
3638
3639 2006-08-22  Bruno Haible  <bruno@clisp.org>
3640
3641         * gnulib-tool (func_emit_lib_Makefile_am): Don't treat lib_LIBRARIES
3642         and lib_LTLIBRARIES like the other lib_* variables.
3643
3644 2006-08-22  Bruno Haible  <bruno@clisp.org>
3645
3646         * build-aux/x-to-1.in: New file, from GNU gettext.
3647
3648 2006-08-22  Bruno Haible  <bruno@clisp.org>
3649
3650         * m4/readutmp.m4 (gl_READUTMP): Compile readutmp.c only if <utmp.h> or
3651         <utmpx.h> exists.
3652
3653 2006-08-22  Bruno Haible  <bruno@clisp.org>
3654
3655         * lib/readutmp.h: Skip most definitions if neither <utmp.h> nor
3656         <utmpx.h> exists.
3657
3658 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3659
3660         BeOS portability.
3661         * lib/dirchownmod.c (dirchownmod): Don't use fchmod if it doesn't
3662         exist.
3663         Problem reported by Bruno Haible.
3664
3665 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3666
3667         Avoid the need for AC_LIBSOURCES in m4 macros.
3668         * modules/acl (EXTRA_DIST): Add acl.h.
3669         * modules/argmatch (Files): Add m4/argmatch.m4.
3670         (configure.ac): Add gl_ARGMATCH.
3671         (EXTRA_DIST): Renamed from lib_SOURCES, for
3672         consistency with the other modules.  Remove argmatch.c.
3673         * modules/backupfile (EXTRA_DIST): Add backupfile.h.
3674         * modules/c-strtod (EXTRA_DIST): Add c-strtod.h.
3675         * modules/c-strtold (EXTRA_DIST): Add c-strtod.c, c-strtod.h.
3676         * modules/canonhost (EXTRA_DIST): Add c-canonhost.h.
3677         * modules/canonicalize (EXTRA_DIST): Add canonicalize.h.
3678         * modules/chdir-long (EXTRA_DIST): Add chdir-long.h.
3679         * modules/chdir-safer (EXTRA_DIST): Add chdir-safer.h.
3680         * modules/cloexec (EXTRA_DIST): Add cloexec.h.
3681         * modules/close-stream (EXTRA_DIST): Add close-stream.h.
3682         * modules/closeout (EXTRA_DIST): Add closeout.h.
3683         * modules/cycle-check (EXTRA_DIST): Add cycle-check.h.
3684         * modules/dev-ino (EXTRA_DIST): Add dev-ino.h.
3685         * modules/dirfd (EXTRA_DIST): Add dirfd.h.
3686         * modules/dirname (EXTRA_DIST): Renamed from lib_SOURCES.  Add
3687         dirname.h; remove basename.c and stripslash.c.
3688         * modules/exclude (EXTRA_DIST): Add exclude.h.
3689         * modules/exitfail (EXTRA_DIST): Add exitfail.h.
3690         * modules/fcntl-safer (EXTRA_DIST): Add fcntl-safer.h fcntl--.h.
3691         * modules/file-type (EXTRA_DIST): Add file-type.h.
3692         * modules/filemode (EXTRA_DIST): Add filemode.h.
3693         * modules/filenamecat (EXTRA_DIST): Add filenamecat.h.
3694         * modules/fopen-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3695         * modules/fpending (EXTRA_DIST): Add __fpending.h.
3696         * modules/fprintftime (EXTRA_DIST): Add fprintftime.h.
3697         * modules/fsusage (EXTRA_DIST): Add fsusage.h.
3698         * modules/fts (EXTRA_DIST): Add fts_.h fts-cycle.c.
3699         * modules/getcwd (EXTRA_DIST): Add getcwd.h.
3700         * modules/getdate (EXTRA_DIST): Add getdate.c.
3701         * modules/gethrxtime (EXTRA_DIST): Add gethrxtime.h xtime.h.
3702         * modules/getpagesize (EXTRA_DIST): Add getpagesize.h.
3703         * modules/getpass (EXTRA_DIST): Add getpass.h.
3704         * modules/glob (EXTRA_DIST): Add glob_.h glob-libc.h.
3705         * modules/group-member (EXTRA_DIST): Add group-member.h.
3706         * modules/hard-locale (EXTRA_DIST): Add hard-locale.h.
3707         * modules/hash (EXTRA_DIST): Add hash.h.
3708         * modules/human (EXTRA_DIST): Add human.h.
3709         * modules/inttypes (EXTRA_DIST): Add inttypes.h.
3710         * modules/lchmod (EXTRA_DIST): Add lchmod.h.
3711         * modules/lchown (EXTRA_DIST): Add lchown.h.
3712         * modules/long-options (EXTRA_DIST): Add long-options.h.
3713         * modules/lstat (EXTRA_DIST): Add lstat.h.
3714         * modules/md5 (EXTRA_DIST): Add memcasecmp.h.
3715         * modules/memcoll (EXTRA_DIST): Add memcoll.h.
3716         * modules/mempcpy (EXTRA_DIST): Add mempcpy.h.
3717         * modules/memrchr (EXTRA_DIST): Add memrchr.h.
3718         * modules/memxor (EXTRA_DIST): Add memxor.h.
3719         * modules/mkancesdirs (EXTRA_DIST): Add mkancesdirs.h.
3720         * modules/mkdir-p (EXTRA_DIST): Add modechange.h.
3721         * modules/mountlist (EXTRA_DIST): Add mountlist.h.
3722         * modules/openat (EXTRA_DIST): Add at-func.c openat.h openat-priv.h.
3723         * modules/pathmax (EXTRA_DIST): Add pathmax.h.
3724         * modules/physmem (EXTRA_DIST): Add physmem.h.
3725         * modules/posixtm (EXTRA_DIST): Add posixtm.h.
3726         * modules/posixver (EXTRA_DIST): Add posixver.h.
3727         * modules/quote (EXTRA_DIST): Add quote.h.
3728         * modules/quotearg (EXTRA_DIST): Add quotearg.h.
3729         * modules/readtokens (EXTRA_DIST): Add readtokens.h.
3730         * modules/readutmp (EXTRA_DIST): Add readutmp.h.
3731         * modules/regex (EXTRA_DIST): Add regcomp.c regex.h regex_internal.c
3732         regex_internal.h regexec.c.
3733         * modules/safe-read (EXTRA_DIST): Add safe-read.h.
3734         * modules/safe-write (EXTRA_DIST): Add safe-write.h.
3735         * modules/same (EXTRA_DIST): Add same.h.
3736         * modules/same-inode (EXTRA_DIST): Add same-inode.h.
3737         * modules/save-cwd (EXTRA_DIST): Add save-cwd.h.
3738         * modules/savedir (EXTRA_DIST): Add savedir.h.
3739         * modules/sha1 (EXTRA_DIST): Add sha1.h.
3740         * modules/sig2str (EXTRA_DIST): Add sig2str.h.
3741         * modules/stat-macros (EXTRA_DIST): Add stat-macros.h.
3742         * modules/stat-time (EXTRA_DIST): Add stat-time.h.
3743         * modules/stdlib-safer (EXTRA_DIST): Add stdlib-safer.h stdlib--.h.
3744         * modules/strdup (EXTRA_DIST): Add strdup.h.
3745         * modules/strftime (EXTRA_DIST): Add strftime.h.
3746         * modules/strndup (EXTRA_DIST): Add strndup.h.
3747         * modules/strnlen (EXTRA_DIST): Add strnlen.h.
3748         * modules/strverscmp (EXTRA_DIST): Add strverscmp.h.
3749         * modules/time_r (EXTRA_DIST): Add time_r.h.
3750         * modules/timespec (EXTRA_DIST): Add timespec.h.
3751         * modules/tmpfile-safer (EXTRA_DIST): Add stdio-safer.h stdio--.h.
3752         * modules/unistd-safer (EXTRA_DIST): Add unistd-safer.h unistd--.h.
3753         * modules/unlinkdir (EXTRA_DIST): Add unlinkdir.h.
3754         * modules/unlocked-io (EXTRA_DIST): Add unlocked-io.h.
3755         * modules/userspec (EXTRA_DIST): Add userspec.h.
3756         * modules/utimecmp (EXTRA_DIST): Add utimecmp.h.
3757         * modules/utimens (EXTRA_DIST): Add utimens.h.
3758         * modules/xalloc (EXTRA_DIST): Add xalloc.h.
3759         * modules/xgetcwd (EXTRA_DIST): Add xgetcwd.h.
3760         * modules/xnanosleep (EXTRA_DIST): Add xnanosleep.h.
3761         * modules/xreadlink (EXTRA_DIST): Add xreadlink.h.
3762         * modules/xstrtod (EXTRA_DIST): Add xstrtod.h.
3763         * modules/xstrtol (EXTRA_DIST): Add xstrtol.h.
3764         * modules/xstrtold (EXTRA_DIST): Add xstrtod.c xstrtod.h.
3765         * modules/yesno (EXTRA_DIST): Add yesno.h.
3766
3767 2006-08-21  Paul Eggert  <eggert@cs.ucla.edu>
3768
3769         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Check for fchmod.
3770
3771         * m4/argmatch.m4: New file, from coreutils with AC_LIBSOURCES removed.
3772         * m4/dev-ino.m4, same-inode.m4: Remove.
3773
3774         * m4/_inttypes_h.m4 (gl_INTTYPES_H):
3775         * m4/acl.m4 (AC_FUNC_ACL):
3776         * m4/backupfile.m4 (gl_BACKUPFILE):
3777         * m4/c-strtod.m4 (gl_C99_STRTOLD):
3778         * m4/canon-host.m4 (gl_CANON_HOST):
3779         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME):
3780         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG):
3781         * m4/chdir-safer.m4 (gl_CHDIR_SAFER):
3782         * m4/cloexec.m4 (gl_CLOEXEC):
3783         * m4/close-stream.m4 (gl_CLOSE_STREAM):
3784         * m4/closeout.m4 (gl_CLOSEOUT):
3785         * m4/dirfd.m4 (gl_FUNC_DIRFD):
3786         * m4/dirname.m4 (gl_DIRNAME):
3787         * m4/exclude.m4 (gl_EXCLUDE):
3788         * m4/exitfail.m4 (gl_EXITFAIL):
3789         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER):
3790         * m4/file-type.m4 (gl_FILE_TYPE):
3791         * m4/filemode.m4 (gl_FILEMODE):
3792         * m4/filenamecat.m4 (gl_FILE_NAME_CONCAT):
3793         * m4/fpending.m4 (gl_FUNC_FPENDING):
3794         * m4/fprintftime.m4 (gl_FPRINTFTIME):
3795         * m4/fts.m4 (gl_FUNC_FTS):
3796         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL):
3797         * m4/getdate.m4 (gl_GETDATE):
3798         * m4/gethrxtime.m4 (gl_GETHRXTIME):
3799         * m4/getpagesize.m4 (gl_GETPAGESIZE):
3800         * m4/getpass.m4 (gl_FUNC_GETPASS):
3801         * m4/gettime.m4 (gl_GETTIME):
3802         * m4/getugroups.m4 (gl_GETUGROUPS):
3803         * m4/glob.m4 (gl_GLOB_SUBSTITUTE):
3804         * m4/group-member.m4 (gl_FUNC_GROUP_MEMBER):
3805         * m4/hard-locale.m4 (gl_HARD_LOCALE):
3806         * m4/hash.m4 (gl_HASH):
3807         * m4/idcache.m4 (gl_IDCACHE):
3808         * m4/lchmod.m4 (gl_FUNC_LCHMOD):
3809         * m4/lchown.m4 (gl_FUNC_LCHOWN):
3810         * m4/long-options.m4 (gl_LONG_OPTIONS):
3811         * m4/lstat.m4 (gl_FUNC_LSTAT):
3812         * m4/md5.m4 (gl_MD5):
3813         * m4/memcasecmp.m4 (gl_MEMCASECMP):
3814         * m4/memcoll.m4 (gl_MEMCOLL):
3815         * m4/mempcpy.m4 (gl_FUNC_MEMPCPY):
3816         * m4/memrchr.m4 (gl_FUNC_MEMRCHR):
3817         * m4/memxor.m4 (gl_MEMXOR):
3818         * m4/mkancesdirs.m4 (gl_MKANCESDIRS):
3819         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS):
3820         * m4/modechange.m4 (gl_MODECHANGE):
3821         * m4/mountlist.m4 (gl_MOUNTLIST):
3822         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP):
3823         * m4/openat.m4 (gl_FUNC_OPENAT):
3824         * m4/pathmax.m4 (gl_PATHMAX):
3825         * m4/physmem.m4 (gl_PHYSMEM):
3826         * m4/posixtm.m4 (gl_POSIXTM):
3827         * m4/posixver.m4 (gl_POSIXVER):
3828         * m4/quote.m4 (gl_QUOTE):
3829         * m4/quotearg.m4 (gl_QUOTEARG):
3830         * m4/readtokens.m4 (gl_READTOKENS):
3831         * m4/readutmp.m4 (gl_READUTMP):
3832         * m4/regex.m4 (gl_REGEX):
3833         * m4/safe-read.m4 (gl_SAFE_READ):
3834         * m4/safe-write.m4 (gl_SAFE_WRITE):
3835         * m4/same.m4 (gl_SAME):
3836         * m4/save-cwd.m4 (gl_SAVE_CWD):
3837         * m4/savedir.m4 (gl_SAVEDIR):
3838         * m4/settime.m4 (gl_SETTIME):
3839         * m4/sha1.m4 (gl_SHA1):
3840         * m4/sig2str.m4 (gl_FUNC_SIG2STR):
3841         * m4/stat-macros.m4 (gl_STAT_MACROS):
3842         * m4/stat-time.m4 (gl_STAT_TIME):
3843         * m4/stdio-safer.m4 (gl_FOPEN_SAFER):
3844         * m4/stdlib-safer.m4 (gl_STDLIB_SAFER):
3845         * m4/strdup.m4 (gl_FUNC_STRDUP):
3846         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME):
3847         * m4/strndup.m4 (gl_FUNC_STRNDUP):
3848         * m4/strnlen.m4 (gl_FUNC_STRNLEN):
3849         * m4/strverscmp.m4 (gl_FUNC_STRVERSCMP):
3850         * m4/time_r.m4 (gl_TIME_R):
3851         * m4/timespec.m4 (gl_TIMESPEC):
3852         * m4/unistd-safer.m4 (gl_UNISTD_SAFER):
3853         * m4/unlinkdir.m4 (gl_UNLINKDIR):
3854         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO):
3855         * m4/userspec.m4 (gl_USERSPEC):
3856         * m4/utimecmp.m4 (gl_UTIMECMP):
3857         * m4/utimens.m4 (gl_UTIMENS):
3858         * m4/xalloc.m4 (gl_XALLOC):
3859         * m4/xgetcwd.m4 (gl_XGETCWD):
3860         * m4/xnanosleep.m4 (gl_XNANOSLEEP):
3861         * m4/xreadlink.m4 (gl_XREADLINK):
3862         * m4/xstrtod.m4 (gl_XSTRTOD):
3863         * m4/yesno.m4 (gl_YESNO):
3864         Don't use AC_LIBSOURCES; instead, rely on the files in ../modules/
3865         to get the necessary .h files and whatnot.
3866
3867 2006-08-21  Mark D. Baushke  <mdb@gnu.org>
3868             Bruno Haible  <bruno@clisp.org>
3869
3870         * gnulib-tool (func_verify_module): Work around Sun's non-POSIX 1003.2
3871         /bin/sh understanding of '!' conditional negation.
3872
3873 2006-08-21  Jim Meyering  <jim@meyering.net>
3874
3875         * modules/openat (Depends-on): Really alphabetize.
3876
3877         * modules/acl (Depends-on): Add error and quote.
3878
3879         * check-module (find_included_lib_files): Add at-func.c to the
3880         ok-to-include-more-than-once white list.
3881
3882         * modules/openat (Depends-on): Add lstat.  Alphabetize.
3883
3884 2006-08-21  Bruno Haible  <bruno@clisp.org>
3885
3886         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
3887         Emit a pkgdata_DATA variable only if some snippets add contents to it.
3888         Reported by Martin Lambers <marlam@marlam.de>.
3889
3890 2006-08-21  Bruno Haible  <bruno@clisp.org>
3891
3892         * gnulib-tool (func_emit_lib_Makefile_am): If the snippets already
3893         specify an installation location, don't emit a noinst_LIBRARIES or
3894         noinst_LTLIBRARIES assignment.
3895
3896 2006-08-21  Bruno Haible  <bruno@clisp.org>
3897
3898         BeOS portability.
3899         * modules/mbchar (Include): Don't test HAVE_WCTYPE_H any more, since
3900         BeOS has mbrtowc() but no <wctype.h>.
3901
3902 2006-08-21  Bruno Haible  <bruno@clisp.org>
3903
3904         BeOS portability.
3905         * m4/mbchar.m4 (gl_MBCHAR): Compile mbchar.c also if <wctype.h> doesn't
3906         exist.
3907
3908 2006-08-21  Bruno Haible  <bruno@clisp.org>
3909
3910         BeOS portability.
3911         * lib/mbchar.h: Include <wctype.h> only if it exists.
3912
3913 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3914
3915         Remove files that are no longer needed by their respective modules.
3916         * m4/obstack.m4: Remove.
3917         * m4/strerror_r.m4: Remove.
3918         * m4/uint32_t.m4: Remove.
3919         * m4/uintptr_t.m4: Remove.
3920         * m4/ullong_max.m4: Remove.
3921         * m4/xstrtoimax.m4: Remove.
3922         * m4/xstrtoumax.m4: Remove.
3923
3924         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Do not require
3925         gl_AC_TYPE_UINTMAX_T, gl_STRUCT_DEV_INO, or gl_SAME_INODE, since gnulib
3926         dependencies now capture this.
3927
3928         * m4/cycle-check.m4 (gl_CYCLE_CHECK):
3929         Do not use AC_LIBSOURCES, since gnulib modules now do this.
3930         * m4/fsusage.m4 (gl_FSUSAGE): Likewise.
3931         * m4/human.m4 (gl_HUMAN): Likewise.
3932         * m4/inttostr.m4 (gl_INTTOSTR): Likewise.
3933         * m4/xstrtol.m4 (gl_XSTRTOL): Likewise.
3934
3935         * m4/filemode.m4 (gl_FILEMODE): Require AC_STRUCT_ST_DM_MODE.
3936
3937         * m4/filemode.m4 (gl_PREREQ_FSUSAGE_EXTRA): Do not require
3938         gl_AC_TYPE_INTMAX_T or gl_AC_TYPE_UINTMAX_T, since we now require
3939         stdint.
3940         * m4/human.m4 (gl_HUMAN): Likewise.
3941         * m4/inttostr.m4 (gl_PREREQ_INTTOSTR): Likewise.
3942         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Likewise.
3943         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3944         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3945         * m4/xstrtol (gl_XSTRTOL): Likewise.
3946
3947         * m4/gethrxtime.m4 (gl_XTIME): gl_AC_TYPE_LONG_LONG ->
3948         AC_TYPE_LONG_LONG_INT.
3949         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Likewise.
3950         * m4/strtoll.m4 (gl_FUNC_STRTOLL): Likewise.
3951         * m4/strtoull.m4 (gl_FUNC_STRTOULL): Likewise, for unsigned long.
3952         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Likewise.
3953
3954         * m4/human.m4 (gl_HUMAN): Do not require AM_STDBOOL_H since we depend
3955         on stdbool.
3956
3957         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL_H, gl_PREREQ_XSTRTOL): Remove.
3958         (gl_PREREQ_XSTRTOUL): Remove.
3959
3960         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Check for hasmntopt.
3961
3962         * m4/posixver.m4: Fix comment since head -1 now works even in POSIX
3963         mode.
3964
3965 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
3966
3967         Add and change modules to make it easier for coreutils to use
3968         gnulib-tool.
3969         * modules/backupfile (Files): Remove m4/d-ino.m4.
3970         (Depends-on): Add d-ino.
3971         * modules/cycle-check (Depends-on): Add stdint.
3972         (lib_SOURCES): Add cycle-check.h.
3973         * modules/d-ino: New module.
3974         * modules/d-type: New module.
3975         * modules/error (Files): Remove m4/strerror_r.m4.
3976         * modules/filemode (Files): Add m4/st_dm_mode.m4.
3977         * modules/fsuage (Files): Remove m4/ulonglong.m4, m4/stdint_h.m4,
3978         m4/inttypes_h.m4, m4/uintmax_t.m4.
3979         (Depends-on): Add stdint.
3980         (lib_SOURCES): Add fsusage.h.
3981         * modules/getcwd (Files): Remove d-ino.m4.
3982         (Depends-on): Add d-ino.
3983         * modules/getndelim2 (Depends-on): Add stdint.
3984         * modules/glob (Files): Remove m4/d-type.m4.
3985         (Depends-on): Add d-type.
3986         * modules/host-os: New module.
3987         * modules/human (Files):  Remove m4/ulonglong.m4, m4/stdint_h.m4,
3988         m4/inttypes_h.m4, m4/uintmax_t.m4.
3989         * Depends-on: Add stdint.
3990         (lib_SOURCES): Add human.h.
3991         * modules/inttostr (Files): Remove m4/intmax_t.m4,
3992         m4/inttostr.m4, m4/inttypes_h.m4, m4/longlong.m4, m4/stdint_h.m4,
3993         m4/uintmax_t.m4, m4/ulonglong.m4.
3994         (Depends-on): Add stdint.
3995         (EXTRA_DIST): Add inttostr.h.
3996         * modules/lchmod: New module.
3997         * modules/link-follow: New module.
3998         * modules/mkdir-p (Files): Remove lib/lchmod.h, m4/lchmod.m4.
3999         (Depends-on): Add lchmod.
4000         * modules/mkstemp (Files): Remove m4/ulonglong.m4,
4001         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4.
4002         (Depends-on): Add stdint.
4003         * modules/obstack (Files): Remove m4/inttypes_h.m4, m4/obstack.m4,
4004         m4/stdint_h.m4, m4/uintmax_t.m4, m4/ulonglong.m4.
4005         (Depends-on): Add stdint.
4006         (configure.ac): Change gl_OBSTACK to AC_FUNC_OBSTACK.
4007         * modules/perl: New module.
4008         * modules/regex (Depends-on): Add stdint.
4009         * modules/rmdir-errno: New module.
4010         * modules/strtoimax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4011         m4/intmax_t.m4.
4012         (Depends-on): Add stdint.
4013         * modules/strtoumax (Files): Remove m4/stdint_h.m4, m4/inttypes_h.m4,
4014         m4/uintmax_t.m4.
4015         (Depends-on): Add stdint.
4016         * modules/unlink-busy: New module.
4017         * modules/utimecmp (Depends-on): Add stdint.
4018         * modules/uptime: New module.
4019         * modules/winsz-ioctl: New module.
4020         * modules/winsz-termios: New module.
4021         * modules/xnanosleep (Depends-on): Add nanosleep.
4022         * modules/ullong_max: Remove.
4023         * modules/xstrtoimax (Files): Remove m4/xstrtoimax.m4.
4024         (configure.ac): Remove gl_XSTRTOIMAX; no action needed now.
4025         * modules/xstrtol (Files): Remove m4/ulonglong.m4, m4/longlong.m4,
4026         m4/stdint_h.m4, m4/inttypes_h.m4, m4/uintmax_t.m4, m4/intmax_t.m4.
4027         (Depends-on): Add inttypes.
4028         (lib_SOURCES): Add xstrtol.h.
4029         * modules/xstrtoumax (Files): Remove m4/xstrtoumax.m4.
4030         (configure.ac): Remove gl_XSTRTOUMAX; no action needed now.
4031         * MODULES.html.sh: Move 'assert' into the assert section.
4032         Move 'dummy' into the linking section.
4033         Remove ullong_max.
4034         Add section for compatibility checks for POSIX:2001 functions,
4035         and put d-ino, d-type, link-follow, rmdir-errno, unlink-busy,
4036         winsz-ioctl, and winsz-termios into it.
4037         Add lchmod.
4038         Add top-level Misc section and put host-os, perl, and uptime
4039         into it.
4040
4041 2006-08-20  Paul Eggert  <eggert@cs.ucla.edu>
4042
4043         * lib/cycle-check.h: Include <stdint.h> unconditionally, since we
4044         now assume the stdint module.  Do not include inttypes.h.
4045         * lib/fsusage.h: Likewise.
4046         * lib/getndelim2.c: Likewise.
4047         * lib/human.h: Likewise.
4048         * lib/inttostr.h: Likewise.
4049         * lib/obstack.c: Likewise.
4050         * lib/regex_internal.h: Likewise.
4051         * lib/tempname.c: Likewise.
4052         * lib/utimecmp.c: Likewise.
4053         * lib/xstrtol.h: Likewise.
4054
4055         * lib/stat_.h: Fix typo: HAVE_FUNC_LSTAT -> HAVE_LSTAT.
4056
4057         * lib/strtoimax.c: Adjust to macro name changes in Autoconf,
4058         e.g., HAVE_LONG_LONG -> HAVE_LONG_LONG_INT.
4059         * lib/xtime.h: Likewise.
4060
4061 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4062
4063         * modules/openat (Files): Add lib/fchmodat.c.
4064         Fixes problem reported by Jay Youngman.
4065
4066 2006-08-19  Paul Eggert  <eggert@cs.ucla.edu>
4067
4068         * lib/fchmodat.c: New file, from coreutils.  This was inadvertently
4069         omitted in the 2006-08-17 update.  Problem reported by Jay Youngman.
4070
4071 2006-08-18  Paul Eggert  <eggert@cs.ucla.edu>
4072             Bruno Haible  <bruno@clisp.org>
4073
4074         * m4/bison-i18n.m4 (BISON_I18N): Also handle the case where yacc exists
4075         and is a script that invokes bison. Tighten the code. Add comments.
4076
4077 2006-08-18  Jim Meyering  <jim@meyering.net>
4078
4079         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Also check for
4080         CLOCK_REALTIME, since gethrxtime may revert to using clock_gettime via
4081         gettime.c.  Gabor Z. Papp reported that gethrxtime-using programs
4082         failed to link due to unresolved clock_gettime on a linux-2.4.x system.
4083
4084 2006-08-18  Bruno Haible  <bruno@clisp.org>
4085
4086         * modules/bison-i18n: New file.
4087         * MODULES.html.sh (Internationalization functions): Add it.
4088
4089 2006-08-18  Bruno Haible  <bruno@clisp.org>
4090
4091         * m4/ls-mntd-fs.m4 (gl_LIST_MOUNTED_FILE_SYSTEMS): Also check for
4092         sys/statvfs.h. When getmntinfo was found, check its declaration and
4093         set either MOUNTED_GETMNTINFO or MOUNTED_GETMNTINFO2 depending on it.
4094
4095 2006-08-18  Bruno Haible  <bruno@clisp.org>
4096
4097         * m4/bison-i18n.m4: New file, from bison.
4098
4099 2006-08-18  Bruno Haible  <bruno@clisp.org>
4100
4101         * lib/mountlist.c [MOUNTED_GETMNTINFO2]: Include sys/statvfs.h.
4102         (ME_DUMMY): Treat "kernfs" as a dummy.
4103         (read_file_system_list) [MOUNTED_GETMNTINFO2]: Implement.
4104
4105 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4106
4107         Update from coreutils.
4108
4109         2006-08-15  Jim Meyering  <jim@meyering.net>
4110
4111         * m4/openat.m4 (gl_FUNC_OPENAT): Add at-func.c via AC_LIBSOURCES.
4112
4113         2006-01-17  Jim Meyering  <jim@meyering.net>
4114
4115         * m4/fts.m4 (gl_FUNC_FTS_CORE): Depend on gl_FUNC_OPENAT.
4116
4117         2006-01-11  Jim Meyering  <jim@meyering.net>
4118
4119         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile fchmodat.c.
4120         Check for the lchmod function.
4121
4122 2006-08-17  Paul Eggert  <eggert@cs.ucla.edu>
4123
4124         Update from coreutils.
4125
4126         * lib/__fpending.h: Add copyright notice.
4127         * lib/fprintftime.h: Likewise.
4128         * lib/savedir.c: Use (C) in copyright notice.
4129         * lib/savedir.h: Likewise.
4130
4131         2006-08-15  Jim Meyering  <jim@meyering.net>
4132
4133         * lib/at-func.c: New file, with the logic of all emulated at-functions.
4134         * lib/openat-priv.h: Include <errno.h> and define ENOSYS,
4135         in support of the EXPECTED_ERRNO macro.
4136         * lib/openat.c (fstatat, unlinkat, fchownat): Remove function
4137         definitions.  Instead, define the appropriate symbols and include
4138         "at-func.c".
4139         * lib/mkdirat.c (mkdirat): Likewise.
4140         * lib/fchmodat.c (fchmodat): Likewise.
4141         (ENOSYS): Remove definition.
4142         * lib/openat.c: Don't include <errno.h>, now that "openat-priv.h" does
4143         it.  Don't include "unistd--.h" -- it wasn't ever used.
4144
4145         2006-01-17  Jim Meyering  <jim@meyering.net>
4146
4147         Rewrite fts.c not to change the current working directory,
4148         by using openat, fstatat, fdopendir, etc..
4149
4150         * lib/fts.c [! _LIBC]: Include "openat.h" and "unistd--.h".
4151         (HAVE_OPENAT_SUPPORT): Define.
4152         [_LIBC] (fchdir): Don't undef or define; no longer used.
4153         (FCHDIR): Define in terms of cwd_advance_fd rather than fchdir.
4154         Now, this `function' always succeeds, and consumes its file descriptor
4155         parameter -- so callers must not close such FDs.  Update callers.
4156         (diropen_fd, opendirat, cwd_advance_fd): New functions.
4157         (diropen): Add parameter, SP.  Adjust all callers.
4158         Implement using diropen_fd, rather than open.
4159         (fts_open): Initialize new member, fts_cwd_fd.
4160         Remove fts_rft-setting code.
4161         (fts_close): Close fts_cwd_fd, if necessary.
4162         (__opendir2): Define in terms of opendir or opendirat,
4163         depending on whether the FST_NOCHDIR flag is set.
4164         (fts_build): Since fts_safe_changedir consumes its FD, and since
4165         this code must do `closedir(dirp)', dup the dirfd(dirp) argument,
4166         and close the dup'd file descriptor upon failure.
4167         (fts_stat): Use fstatat(...AT_SYMLINK_NOFOLLOW) in place of lstat.
4168         (fts_safe_changedir): Tweak semantics to reflect that this function
4169         now calls cwd_advance_fd and hence consumes its FD argument.
4170         * lib/fts_.h [struct FTS] (fts_cwd_fd): New member.
4171         [struct FTS] (fts_rft): Remove now-unused member.
4172         [struct FTS] (fts_cycle.state): Improve comment.
4173
4174         * lib/openat.c (openat_needs_fchdir): New function.
4175         * lib/openat.h (openat_needs_fchdir): Declare it.
4176
4177 2006-08-16  Paul Eggert  <eggert@cs.ucla.edu>
4178
4179         * lib/memcoll.c (memcoll): Set errno = 0 in the shortcut case, too.
4180         Problem and fix reported by Pádraig Brady in
4181         <http://lists.gnu.org/archive/html/bug-coreutils/2006-08/msg00099.html>.
4182
4183 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4184
4185         * modules/cycle-check (configure.ac): Add gl_CYCLE_CHECK.
4186
4187 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4188
4189         * lib/memcoll.c (memcoll): Optimize for the common case where the
4190         arguments are bytewise equal.
4191
4192 2006-08-15  Paul Eggert  <eggert@cs.ucla.edu>
4193
4194         * doc/regexprops-generic.texi: Add a copyright notice.
4195
4196 2006-08-15  Bruno Haible  <bruno@clisp.org>
4197
4198         * modules/tmpdir (License): Change to LGPL.
4199
4200 2006-08-15  Bruno Haible  <bruno@clisp.org>
4201
4202         * gnulib-tool (func_all_modules, func_verify_module): COPYING is not a
4203         module.
4204
4205 2006-08-14  Simon Josefsson  <jas@extundo.com>
4206
4207         * config/srclist.txt: Add gnupload.
4208
4209 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4210
4211         Change copyright notice from LGPL 2 to GPL 2, since that's the
4212         standard form used in the gnulib repository.
4213         * tests/test-lock.c: Likewise.
4214         * tests/test-stdint.c: Likewise.
4215         * tests/test-tls.c: Likewise.
4216
4217         * users.txt: Add bison, diffutils, libprelude, prelude-lml,
4218         prelude-manager.  User shorter URLs for GNU projects, without '?'.
4219         Add copyright notice.
4220
4221         * check-module: Add copyright notice.  Output a copyright
4222         notice if "--version" is specified.
4223         * modules/COPYING: New file.
4224         * tests/test-getaddrinfo.c: Add copyright notice.
4225         * tests/test-verify.c: Likewise.
4226
4227 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4228
4229         Change copyright notice from LGPL 2 to GPL 2, since that's the
4230         standard form used in the gnulib repository.
4231         * lib/lock.c: LGPL -> GPL.
4232         * lib/lock.h: Likewise.
4233         * lib/strnlen1.c: Likewise.
4234         * lib/strnlen1.h: Likewise.
4235         * lib/tls.c: Likewise.
4236         * lib/tls.h: Likewise.
4237         * lib/tmpdir.c: Likewise.
4238
4239         * lib/TODO: Remove; this belongs only in coreutils.
4240
4241 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4242
4243         Add copyright notices to long-enough files that lack them, since
4244         otherwise the files aren't clearly free.  Use the same notice that
4245         getdate.texi already uses.
4246         * doc/alloca-opt.texi: Add copyright notice.
4247         * doc/alloca.texi: Likewise.
4248         * doc/ctime.texi: Likewise.
4249         * doc/functions.texi: Likewise.
4250         * doc/gcd.texi: Likewise.
4251         * doc/gnulib-tool.texi: Likewise.
4252         * doc/inet_ntoa.texi: Likewise.
4253         * doc/visibility.texi: Likewise.
4254
4255         * doc/getdate.texi: Update FDL version from 1.1 to 1.2.
4256         * doc/quote.texi: Add copyright notice.
4257
4258         * doc/solaris-versions: Add SunOS 5.10, SunOS 1.x, SunOS 4.0, SunOS
4259         4.0.x, SunOS 4.1.1.1, SunOS 4.1.1_U1, SunOS 4.1.3B.  SunOS 4.1.3
4260         was Solaris 1.1A.  Remove space before B in Solaris 1.1.1B.
4261         Mention SunOS 5.11.  Mention that everything before SunOS 5.7
4262         is now obsolete, and give a pointer to the Sun list.
4263         Add copyright notice.
4264
4265 2006-08-14  Paul Eggert  <eggert@cs.ucla.edu>
4266
4267         * config/srclistvars.sh: Add copyright notice.
4268
4269 2006-08-14  Eric Blake  <ebb9@byu.net>
4270
4271         Import the following change from libc:
4272
4273         2006-08-12  Ulrich Drepper  <drepper@redhat.com>
4274
4275         Upstream bug 2997.
4276         * lib/misc/error.c: Add space between program name and message if file
4277         name is missing.
4278
4279 2006-08-12  Karl Berry  <karl@gnu.org>
4280
4281         * config/srclist.txt (ssize_t.m4, sig_atomic_t.m4, signalblocking.m4):
4282         remove, these originate in gnulib now.
4283
4284 2006-08-11  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4285
4286         * doc/Makefile (standards.info standards.html standards.dvi):
4287         Also depend on make-stds.texi.
4288
4289 2006-08-11  Paul Eggert  <eggert@cs.ucla.edu>
4290
4291         * lib/pipe-safer.c (pipe_safer): Fix misspelling: HAVE_FUNC_PIPE ->
4292         HAVE_PIPE.  Fix a file descriptor leak when fd_safer fails.
4293
4294         * lib/regex_internal.c (re_string_skip_chars): Don't assume WEOF fits
4295         in wchar_t.  Problem reported by Eric Blake.
4296
4297         * lib/snprintf.c (snprintf): memcpy LEN bytes, not SIZE - 1, when
4298         LEN is smaller than SIZE.  Suggested by Bruno Haible.
4299         Also, help the compiler to keep LEN in a register.
4300
4301 2006-08-11  Eric Blake  <ebb9@byu.net>
4302
4303         * users.txt: Sort.  Add tar.
4304
4305 2006-08-11  Bruno Haible  <bruno@clisp.org>
4306
4307         * users.txt: New file.
4308
4309 2006-08-11  Bruno Haible  <bruno@clisp.org>
4310
4311         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Include <stdio.h> and <time.h>
4312         before <wchar.h>. Needed for OSF/1 and BSD/OS.
4313
4314 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4315
4316         * modules/snprintf (Depends-on): Remove minmax.
4317         (Maintainer): Add self and Bruno.
4318
4319 2006-08-10  Paul Eggert  <eggert@cs.ucla.edu>
4320
4321         * lib/.cppi-disable: Add snprintf.h, socket_.h.
4322         * lib/snprintf.c: Include <errno.h> and <limits.h>.
4323         (EOVERFLOW): Define if the system does not.
4324         Do not include "minmax.h"; it wasn't used.
4325         (snprintf): Don't assume size_t promotes to an unsigned type.
4326         Fix bug when generated string was too long for the buffer: the
4327         buffer's contents are supposed to be the initial prefix of the
4328         output.  Don't assume vasnprintf returns EOVERFLOW if the size
4329         exceeds INT_MAX; do the check ourselves.
4330
4331         Import the following changes from libc:
4332
4333         2006-06-02  Jakub Jelinek  <jakub@redhat.com>
4334
4335         * lib/posix/regex_internal.c (re_string_skip_chars): If no character
4336         has been converted at all, set *last_wc to WEOF.  If mbrtowc failed,
4337         set wc to the byte which couldn't be converted.
4338         (re_string_reconstruct): Don't clear valid_raw_len before calling
4339         re_string_skip_chars.  If wc is WEOF after re_string_skip_chars, set
4340         tip_context using re_string_context_at.
4341
4342         2006-05-02  Ulrich Drepper  <drepper@redhat.com>
4343
4344         * lib/posix/regex.h: g++ still cannot handled [restrict].
4345
4346         2006-04-21  Ulrich Drepper  <drepper@redhat.com>
4347
4348         * lib/posix/regex.h: Remove special handling for VMS.
4349
4350 2006-08-10  Jim Meyering  <jim@meyering.net>
4351
4352         * modules/same-inode: New module.
4353         * modules/dev-ino: New module.
4354         * modules/cycle-check: Depend on these modules, rather than simply
4355         including their .h files.
4356         (Makefile.am): Don't list cycle-check.[ch] here, now that they're
4357         required via m4/cycle-check.m4.
4358         * modules/same: Depend on new same-inode module, rather than
4359         including same-inode.h.
4360         * modules/chdir-safer: New file.
4361
4362         * modules/chown (Depends-on): Add stat-macros.
4363
4364 2006-08-10  Jim Meyering  <jim@meyering.net>
4365
4366         * m4/cycle-check.m4: New file.
4367         Require gl_STRUCT_DEV_INO and gl_SAME_INODE.
4368         * m4/dev-ino.m4, m4/same-inode.m4: New files.
4369
4370 2006-08-10  Eric Blake  <ebb9@byu.net>
4371
4372         * modules/verror (Depends-on): Remove bogus gl_VERROR that snuck
4373         in from original proposal.
4374
4375 2006-08-10  Eric Blake  <ebb9@byu.net>
4376         and Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
4377
4378         * gnulib-tool (func_import): Detect unexpanded macros in gnulib
4379         namespace.
4380
4381 2006-08-10  Bruno Haible  <bruno@clisp.org>
4382
4383         * gnulib-tool (func_create_testdir): Detect unexpanded macros here
4384         as well.
4385
4386 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4387
4388         Sync from coreutils.
4389
4390         2006-07-19  Mike Frysinger  <vapier@gentoo.org>
4391
4392         * lib/mountlist.c [ME_REMOTE]: Filter out cifs.
4393         Reported by Toralf Förster in <http://bugs.gentoo.org/141012>.
4394
4395 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4396
4397         * modules/restrict: Remove; no longer needed now that we assume
4398         Autoconf 2.59 or later.
4399         * MODULES.html.sh: Remove 'restrict'.
4400         * modules/argp (Depends-on): Remove 'restrict'.
4401         * modules/base64 (Depends-on): Likewise.
4402         * modules/gc (Depends-on): Likewise.
4403         * modules/getaddrinfo (Depends-on): Likewise.
4404         * modules/glob (Depends-on): Likewise.
4405         * modules/inet_ntop (Depends-on): Likewise.
4406         * modules/inet_pton (Depends-on): Likewise.
4407         * modules/memxor (Depends-on): Likewise.
4408         * modules/regex (Depends-on): Likewise.
4409         * modules/strtok_r (Depends-on): Likewise.
4410         * modules/time_r (Depends-on): Likewise.
4411
4412 2006-08-09  Paul Eggert  <eggert@cs.ucla.edu>
4413
4414         * m4/argp.m4 (gl_ARGP): Require AC_C_RESTRICT.
4415         * m4/gc.m4 (gl_PREREQ_GC): Likewise.
4416         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
4417         * m4/inet_ntop.m4 (gl_PREREQ_INET_NTOP): Likewise.
4418         * m4/inet_pton.m4 (gl_PREREQ_INET_PTON): Likewise.
4419         * m4/memxor.m4 (gl_MEMXOR): Likewise.
4420         * m4/restrict.m4: Remove; no longer needed.  All remaining uses of
4421         gl_C_RESTRICT replaced by AC_C_RESTRICT.
4422
4423         Merge from coreutils.
4424         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_C_RESTRICT, not
4425         gl_C_RESTRICT, now that we assume Autoconf 2.59 or later.
4426         * m4/strtok_r.m4 (gl_FUNC_STRTOK_R): Likewise.
4427         * m4/time_r.m4 (gl_TIME_R): Likewise.
4428
4429 2006-08-09  Karl Berry  <karl@gnu.org>
4430
4431         * config/srclist.txt: no more gettext-tools, per Bruno.
4432
4433 2006-08-08  Eric Blake  <ebb9@byu.net>
4434
4435         * modules/verror: New module.
4436         * MODULES.html.sh: Document it.
4437
4438 2006-08-08  Eric Blake  <ebb9@byu.net>
4439
4440         * lib/verror.h, lib/verror.c: New files.
4441
4442 2006-08-08  Eric Blake  <ebb9@byu.net>
4443
4444         * lib/verror.c (verror_at_line): Work around glibc bug 2997, so that
4445         verror_at_line output complies with GNU Coding Standards even when
4446         file is NULL.
4447
4448 2006-08-07  Bruno Haible  <bruno@clisp.org>
4449
4450         * lib/allocsa.h (sa_alignof) [_AIX]: Also consider 'long long' in newer
4451         versions of AIX.
4452         Reported by Ralf Wildenhues.
4453
4454 2006-08-07  Bruno Haible  <bruno@clisp.org>
4455
4456         * gnulib-tool (func_create_testdir): Wrap the set of autoconf snippets
4457         in an AC_DEFUN. Needed so that the autoconf snippets can use
4458         AC_REQUIRE.
4459
4460 2006-08-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
4461
4462         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4463         Initialize pkgdata_DATA.
4464         * modules/javaversion (Makefile.am): Add to pkgdata_DATA, rather than
4465         overriding it.
4466
4467 2006-08-06  Eric Blake  <ebb9@byu.net>
4468
4469         * lib/error.h: Fold in some upstream changes from glibc.
4470         * lib/error.c: Likewise.
4471
4472 2006-08-04  Bruno Haible  <bruno@clisp.org>
4473
4474         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4475         Make the mostlyclean-local rule depend on mostlyclean-generic.
4476         Reported by Jim Meyering. Solution suggested by Ralf Wildenhues.
4477
4478 2006-07-31  Bruno Haible  <bruno@clisp.org>
4479
4480         * m4/localcharset.m4 (gl_LOCALCHARSET): Remove tests for <stddef.h>,
4481         <stdlib.h>, <string.h>.
4482
4483 2006-07-30  Bruno Haible  <bruno@clisp.org>
4484
4485         * modules/readlink (License): Change to LGPL.
4486
4487 2006-07-30  Bruno Haible  <bruno@clisp.org>
4488
4489         * modules/javaversion (Makefile.am): Distribute javaversion.java and
4490         javaversion.class. Also install javaversion.class in $(pkgdatadir) and
4491         set PKGDATADIR to point to it.
4492
4493 2006-07-30  Bruno Haible  <bruno@clisp.org>
4494
4495         * modules/csharpexec (configure.ac): Comment out macro invocation.
4496         * modules/javaexec (configure.ac): Likewise.
4497         * modules/javacomp-script (configure.ac): Likewise.
4498
4499         * modules/csharpcomp-script (configure.ac): Use AC_REQUIRE.
4500
4501 2006-07-30  Bruno Haible  <bruno@clisp.org>
4502
4503         * modules/clean-temp (Depends-on): Add linkedhash-list, remove
4504         linked-list.
4505
4506 2006-07-30  Bruno Haible  <bruno@clisp.org>
4507
4508         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Assume <string.h> exists.
4509
4510 2006-07-30  Bruno Haible  <bruno@clisp.org>
4511
4512         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
4513         Initialize MOSTLYCLEANFILES to core and *.stackdump, so that core dumps
4514         get removed.
4515
4516 2006-07-29  Bruno Haible  <bruno@clisp.org>
4517
4518         Make it possible for gnulib-tool to work with locally modified or
4519         augmented gnulib repositories.
4520         * gnulib-tool (func_usage): Document --local-dir option.
4521         (local_gnulib_dir): New variable.
4522         Handle --local-dir option.
4523         (func_lookup_file): New function.
4524         (func_all_modules, func_verify_module): Look also in $local_gnulib_dir.
4525         (func_get_description, func_get_filelist, func_get_description,
4526         func_get_filelist, func_get_dependencies, func_get_autoconf_snippet,
4527         func_get_automake_snippet, func_get_include_directive,
4528         func_get_license, func_get_maintainer): Use func_lookup_file.
4529         (func_import, func_create_testdir): Use func_lookup_file.
4530
4531 2006-07-29  Bruno Haible  <bruno@clisp.org>
4532
4533         * modules/setenv (Depends-on): Add unistd.
4534
4535 2006-07-29  Bruno Haible  <bruno@clisp.org>
4536
4537         * lib/setenv.c: Undo unintended modification done on 2006-02-27.
4538
4539 2006-07-29  Bruno Haible  <bruno@clisp.org>
4540
4541         * lib/localcharset.c: Assume <stddef.h>, <stdlib.h>, <string.h> exist.
4542
4543 2006-07-29  Bruno Haible  <bruno@clisp.org>
4544
4545         * gnulib-tool (import, update): If there is no Makefile.am, look at
4546         aclocal.m4, instead of bailing out.
4547
4548 2006-07-29  Bruno Haible  <bruno@clisp.org>
4549
4550         * gnulib-tool (func_usage): Revert most of the 2006-07-15 change.
4551         Categorize the options by when they are useful.
4552
4553 2006-07-29  Bruno Haible  <bruno@clisp.org>
4554
4555         * gnulib-tool (func_usage): Document option --no-libtool.
4556         Handle option --no-libtool.
4557         (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am): Update
4558         for changed semantics of $libtool variable.
4559         (func_import): Likewise. If libtool is not used, show this through
4560         an option --no-libtool.
4561         (func_create_testdir): Update.
4562
4563 2006-07-29  Bruno Haible  <bruno@clisp.org>
4564
4565         * gnulib-tool (func_import): Extend error message about missing
4566         --doc-base.
4567
4568 2006-07-29  Bruno Haible  <bruno@clisp.org>
4569
4570         * gnulib-tool (func_import): Don't create the $docbase directory if
4571         there is no file to store there.
4572
4573 2006-07-29  Bruno Haible  <bruno@clisp.org>
4574
4575         * gnulib-tool (autoconf_minversion): If a --dir option is given and
4576         relevant, look for configure.ac there, not in the current directory.
4577         Also use a simple search for AC_PREREQ, not "autoconf --trace".
4578
4579 2006-07-29  Bruno Haible  <bruno@clisp.org>
4580
4581         * gnulib-tool (SORT): New variable.
4582         (func_usage): Undocument --assume-autoconf option.
4583         Remove --assume-autoconf option handling.
4584         (autoconf_minversion): Determine from the contents of configure.ac.
4585         (func_import): Remove autoconf_minversion handling.
4586         Suggested by Eric Blake.
4587
4588 2006-07-29  Bruno Haible  <bruno@clisp.org>
4589
4590         * doc/gnulib-tool.texi (gl_LIBTOOL): Mention --no-libtool option.
4591
4592 2006-07-29  Bruno Haible  <bruno@clisp.org>
4593
4594         * config/srclist.txt (*setenv.[ch]): Remove rules.
4595
4596 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4597
4598         * m4/inet_pton.m4, inet_ntop.m4: Check for netinet/in.h too.
4599
4600 2006-07-28  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4601
4602         * lib/inet_ntop.h, inet_pton.h: Need to include netinet/in.h before
4603         arpa/inet.h.
4604
4605 2006-07-28  Simon Josefsson  <jas@extundo.com>
4606
4607         * modules/inet_ntop (Depends-on): Depend on arpa_inet.
4608         * modules/inet_pton (Depends-on): Likewise.
4609
4610 2006-07-28  Simon Josefsson  <jas@extundo.com>
4611
4612         * m4/netinet_in_h.m4: New file.
4613
4614 2006-07-28  Simon Josefsson  <jas@extundo.com>
4615
4616         * lib/inet_ntop.h, inet_pton.h: No need to guard netinet/in.h
4617         #include's.
4618
4619 2006-07-28  Simon Josefsson  <jas@extundo.com>
4620
4621         * lib/inet_ntop.h, inet_pton.h: No need to guard arpa/inet.h
4622         #include's.
4623
4624 2006-07-28  Paul Eggert  <eggert@cs.ucla.edu>
4625
4626         * lib/modechange.c (mode_compile): Numeric modes now affect setuid and
4627         setgid on directories only if they set these bits.
4628         * lib/modechange.h: Remove obsolete comment about masks.
4629
4630 2006-07-28  Eric Blake  <ebb9@byu.net>
4631
4632         * lib/regex_internal.h (struct re_dfa_t) [!_LIBC]: Avoid invalid C89
4633         macro expansion.
4634
4635 2006-07-28  Bruno Haible  <bruno@clisp.org>
4636
4637         * lib/inet_ntop.h, inet_pton.h: Use #if HAVE* instead of #ifdef HAVE*.
4638
4639 2006-07-28  Bruno Haible  <bruno@clisp.org>
4640
4641         * m4/mbchar.m4 (gl_MBCHAR): Also test for iswcntrl.
4642
4643 2006-07-28  Bruno Haible  <bruno@clisp.org>
4644
4645         * lib/mbchar.h (iswalnum, iswalpha, iswblank, iswcntrl, iswdigit,
4646         iswgraph, iswlower, iswprint, iswpunct, iswspace, iswupper, iswxdigit):
4647         Define fallbacks.
4648         Avoids link error on FreeBSD 4.x.
4649         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
4650
4651         * lib/wcwidth.h (iswprint): Assume an ASCII compatible wide character
4652         encoding.
4653         * lib/mbswidth.c (iswcntrl): Likewise.
4654
4655 2006-07-27  Bruno Haible  <bruno@clisp.org>
4656
4657         * m4/stdint.m4 (gl_STDINT_H): Define __STDC_CONSTANT_MACROS during the
4658         test.
4659
4660 2006-07-27  Bruno Haible  <bruno@clisp.org>
4661
4662         * lib/stdint_.h (INT*_C, UINT*_C) [C++]: Define these if
4663         __STDC_CONSTANT_MACROS is defined, not if __STDC_LIMIT_MACROS is
4664         defined.
4665
4666 2006-07-26  Eric Blake  <ebb9@byu.net>
4667
4668         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Check for missing pipe.
4669
4670 2006-07-26  Eric Blake  <ebb9@byu.net>
4671
4672         * lib/mkstemp-safer.c [! HAVE_MKSTEMP]: Add prototype for platforms
4673         like mingw that lack mkstemp.
4674         * lib/pipe-safer.c (pipe_safer) [!HAVE_FUNC_PIPE]: Provide fallback to
4675         avoid compilation warning on mingw.
4676
4677 2006-07-26  Bruno Haible  <bruno@clisp.org>
4678
4679         * m4/stdint.m4 (gl_STDINT_H): Also verify the existence of the macros
4680         INT*_MIN, INT_LEAST*_MAX, INT_LEAST*_MIN, UINT_LEAST*_MAX,
4681         INT_FAST*_MIN, INTPTR_MIN.
4682
4683 2006-07-25  Bruno Haible  <bruno@clisp.org>
4684
4685         * modules/version-etc (Depends-on): Add stdarg.
4686
4687 2006-07-25  Bruno Haible  <bruno@clisp.org>
4688
4689         * m4/stdint.m4 (gl_INTEGER_TYPE_SUFFIX): Avoid 'eval' in front of
4690         complex commands.
4691
4692 2006-07-25  Bruno Haible  <bruno@clisp.org>
4693
4694         * lib/version-etc.c (version_etc_va): Use va_copy, assumed to be
4695         defined in <stdarg.h> or config.h.
4696
4697 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4698
4699         * m4/stdio-safer.m4 (gl_FOPEN_SAFER, gl_TMPFILE_SAFER): New macros.
4700         (gl_STDIO_SAFER): Remove.
4701
4702 2006-07-24  Paul Eggert  <eggert@cs.ucla.edu>
4703
4704         * MODULES.html.sh (File stream based Input/Output):
4705         Add fopen-safer, tmpfile-safer; remove stdio-safer.
4706         * modules/getusershell (Depends-on): Change stdio-safer to fopen-safer.
4707         * modules/fopen-safer, modules/tmpfile-safer: New files.
4708         * modules/stdio-safer: Remove.
4709
4710 2006-07-24  Bruno Haible  <bruno@clisp.org>
4711
4712         * modules/tmpdir: New file.
4713         * MODULES.html.sh (File system functions): Add it.
4714
4715 2006-07-24  Bruno Haible  <bruno@clisp.org>
4716
4717         * modules/javacomp (Depends-on): Add unistd, javaversion, binary-io,
4718         getline, pathname, fwriteerror, clean-temp, xvasprintf, strstr.
4719
4720 2006-07-24  Bruno Haible  <bruno@clisp.org>
4721
4722         * modules/clean-temp: New file.
4723
4724 2006-07-24  Bruno Haible  <bruno@clisp.org>
4725
4726         * m4/tmpdir.m4: New file, from GNU gettext.
4727
4728 2006-07-24  Bruno Haible  <bruno@clisp.org>
4729
4730         * lib/tmpdir.h: New file, from GNU gettext.
4731         * lib/tmpdir.c: New file, from GNU gettext.
4732
4733 2006-07-24  Bruno Haible  <bruno@clisp.org>
4734
4735         * lib/clean-temp.h: New file, from GNU gettext.
4736         * lib/clean-temp.c: New file, from GNU gettext.
4737
4738 2006-07-23  Eric Blake  <ebb9@byu.net>
4739
4740         * modules/stdio-safer (Files): Add tmpfile-safer.c.
4741         (Depends-on): Add binary-io.
4742
4743 2006-07-23  Eric Blake  <ebb9@byu.net>
4744
4745         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add tmpfile-safer.c.
4746
4747 2006-07-23  Eric Blake  <ebb9@byu.net>
4748
4749         * lib/tmpfile-safer.c: New file.
4750         * lib/stdio-safer.h (fopen_safer): Add prototype.
4751         * lib/stdio--.h (tmpfile): Make safer.
4752
4753 2006-07-23  Bruno Haible  <bruno@clisp.org>
4754
4755         * lib/gl_anylinked_list2.h (ASYNCSAFE): New macro.
4756         (gl_linked_add_first, gl_linked_add_last, gl_linked_add_before,
4757         gl_linked_add_after, gl_linked_add_at, gl_linked_remove_node,
4758         gl_linked_remove_at): Use it.
4759
4760 2006-07-22  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
4761         and Simon Josefsson <jas@extundo.com>
4762
4763         * lib/getaddrinfo.h (AI_PASSIVE): Make sure it is defined.
4764
4765         * lib/getaddrinfo.c (getaddrinfo): Support AI_PASSIVE.
4766
4767 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4768
4769         * modules/close-stream: New file.
4770         * modules/closeout (Description): Make it clear that it exits
4771         with a diagnostic on error.
4772         (Depends-on): Add close-stream.  Remove fpending, stdbool.
4773         * MODULES.html.sh (File stream based Input/Output): Add close-stream.
4774
4775 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4776
4777         * m4/close-stream.m4: New file.
4778
4779 2006-07-22  Paul Eggert  <eggert@cs.ucla.edu>
4780
4781         * lib/close-stream.c, lib/close-stream.h: New files.
4782
4783 2006-07-22  Bruno Haible  <bruno@clisp.org>
4784
4785         Merge from GNU gettext 0.15.
4786
4787         2006-05-01  Bruno Haible  <bruno@clisp.org>
4788
4789                 * build-aux/javacomp.sh.in: Update for changed javacomp.m4.
4790
4791         2006-07-22  Bruno Haible  <bruno@clisp.org>
4792
4793                 * modules/javaversion: New file.
4794                 * MODULES.html.sh (Java): Add javaversion.
4795
4796         2006-03-12  Bruno Haible  <bruno@clisp.org>
4797
4798                 * build-aux/javaexec.sh.in: Update for changed javaexec.m4.
4799
4800         2005-12-04  Bruno Haible  <bruno@clisp.org>
4801
4802                 * build-aux/csharpexec.sh.in: Add support for 'clix' launcher
4803                 (untested).
4804
4805         2006-06-21  Bruno Haible  <bruno@clisp.org>
4806
4807                 Avoid warnings from recent versions of mcs.
4808                 * build-aux/csharpcomp.sh.in (options_mcs): Don't use options
4809                 -o, -L, -r any more. Use options documented since mcs-1.0
4810                 instead. Similarly for -g.
4811
4812         2005-12-04  Bruno Haible  <bruno@clisp.org>
4813
4814                 * build-aux/csharpcomp.sh.in: Suffix for resources is
4815                 .resources, not .resource.
4816
4817         2005-07-09  Bruno Haible  <bruno@clisp.org>
4818
4819                 * build-aux/csharpcomp.sh.in (options_csc): For -l option,
4820                 add a .dll suffix.
4821                 Reported by Mark Junker <mjscod@gmx.de>.
4822
4823         2006-07-22  Bruno Haible  <bruno@clisp.org>
4824
4825                 * modules/gettext: Upgrade to gettext-0.15.
4826                 (Files): Remove m4/isc-posix.m4. Add m4/lock.m4,
4827                 m4/visibility.m4.
4828                 Replace m4/inttypes.m4 with m4/inttypes-h.m4.
4829
4830 2006-07-22  Bruno Haible  <bruno@clisp.org>
4831
4832         Merge from GNU gettext 0.15.
4833
4834         2006-03-25  Bruno Haible  <bruno@clisp.org>
4835
4836                 * lib-link.m4 (AC_LIB_LINKFLAGS_FROM_LIBS): New macro.
4837
4838         2006-07-21  Bruno Haible  <bruno@clisp.org>
4839
4840                 * javacomp.m4 (gt_JAVACOMP): Convert target_version "null" to
4841                 "1.1".
4842
4843         2006-05-09  Bruno Haible  <bruno@clisp.org>
4844
4845                 * javacomp.m4 (gt_JAVACOMP): On Cygwin, set
4846                 CLASSPATH_SEPARATOR to a semicolon. Use CLASSPATH_SEPARATOR
4847                 for the conftestver execution.
4848
4849         2006-05-01  Bruno Haible  <bruno@clisp.org>
4850
4851                 * javacomp.m4 (gt_JAVACOMP): Accept a source-version and an
4852                 optional target-version argument. Verify that the compiler
4853                 groks source of the specified source-version, or add -source
4854                 option as necessary. Verify that the compiler produces
4855                 bytecode in the specified target-version, or add -target and
4856                 -source options as necessary. Make the result of the test
4857                 available as variable CONF_JAVAC. Also log error output in
4858                 config.log.
4859
4860         2006-03-11  Bruno Haible  <bruno@clisp.org>
4861
4862                 * javacomp.m4 (gt_JAVACOMP): Treat gcj-4.x like gcj-3.x.
4863
4864         2006-05-09  Bruno Haible  <bruno@clisp.org>
4865
4866                 * javaexec.m4 (gt_JAVAEXEC): On Cygwin, set
4867                 CLASSPATH_SEPARATOR to a semicolon.
4868
4869         2006-03-12  Bruno Haible  <bruno@clisp.org>
4870
4871                 * javaexec.m4 (gt_JAVAEXEC): Make the result of the test
4872                 available as variable CONF_JAVA, for subsequent autoconf
4873                 tests. Also log error output in config.log.
4874
4875         2006-07-19  Bruno Haible  <bruno@clisp.org>
4876
4877                 * getline.m4 (AM_FUNC_GETLINE): When cross-compiling, assume
4878                 that getline works on glibc2 systems. Needed to avoid trouble
4879                 in relocatable.c.
4880                 Reported by Nils Magnus Larsgard <nmlarsgaard@atmel.no>.
4881
4882         2005-12-04  Bruno Haible  <bruno@clisp.org>
4883
4884                 * csharpexec.m4 (gt_CSHARPEXEC): Add support for 'clix'
4885                 launcher (untested).
4886
4887         2005-12-04  Bruno Haible  <bruno@clisp.org>
4888
4889                 * csharpcomp.m4 (gt_CSHARPCOMP): Also set CSHARPCOMPFLAGS.
4890
4891         2006-07-22  Bruno Haible  <bruno@clisp.org>
4892
4893                 * gettext.m4: Update from GNU gettext-0.15.
4894                 * nls.m4: Likewise.
4895                 * po.m4: Likewise.
4896                 * inttypes-pri.m4: Likewise.
4897                 * inttypes-h.m4: Renamed from inttypes.m4.
4898                 (gl_HEADER_INTTYPES_H): Renamed from gt_HEADER_INTTYPES_H.
4899
4900 2006-07-22  Bruno Haible  <bruno@clisp.org>
4901
4902         Merge from GNU gettext 0.15.
4903
4904         2005-07-05  Bruno Haible  <bruno@clisp.org>
4905
4906                 * printf-args.c (printf_fetchargs): Work around broken
4907                 definition of wint_t on mingw.
4908
4909         2005-02-12  Bruno Haible  <bruno@clisp.org>
4910
4911                 * xallocsa.h: Add extern "C" for C++.
4912
4913         2006-05-17  Bruno Haible  <bruno@clisp.org>
4914
4915                 Cygwin portability.
4916                 * progreloc.c (WIN32_NATIVE): Renamed from WIN32.
4917
4918         2006-04-30  Bruno Haible  <bruno@clisp.org>
4919
4920                 * progreloc.c: Include <mach-o/dyld.h> if available.
4921                 (find_executable): Use _NSGetExecutablePath when possible.
4922
4923         2006-05-06  Charles Wilson  <cygwin@cwilson.fastmail.fm>
4924
4925                 * progreloc.c (maybe_executable) [CYGWIN]: Use the access()
4926                 function.
4927
4928         2005-12-29  Bruno Haible  <bruno@clisp.org>
4929
4930                 * progreloc.c (set_program_name_and_installdir): Fix
4931                 compilation error.
4932
4933         2005-12-04  Bruno Haible  <bruno@clisp.org>
4934
4935                 Cygwin portability.
4936                 * progreloc.c: Include <windows.h> also on Cygwin.
4937                 (find_executable): Add support for Cygwin.
4938                 (set_program_name_and_installdir): Handle also platforms with
4939                 nonempty EXEEXT.
4940
4941         2006-07-11  Bruno Haible  <bruno@clisp.org>
4942
4943                 * javacomp.c: Fix a comment.
4944                 Reported by Jim Meyering.
4945
4946         2006-04-30  Bruno Haible  <bruno@clisp.org>
4947
4948                 * javacomp.h (compile_java_class): Add source_version,
4949                 target_version arguments.
4950                 * javacomp.c: Rewritten to choose only a compiler that
4951                 respects the specified source_version and target_version.
4952
4953         2006-06-27  Bruno Haible  <bruno@clisp.org>
4954
4955                 Assume correct S_ISDIR macro.
4956                 * mkdtemp.c: Remove test of STAT_MACROS_BROKEN.
4957
4958         2006-07-22  Bruno Haible  <bruno@clisp.org>
4959
4960                 * javaversion.h: New file, from GNU gettext.
4961                 * javaversion.c: New file, from GNU gettext.
4962                 * javaversion.java: New file, from GNU gettext.
4963                 * javaversion.class: New file, from GNU gettext.
4964
4965         2006-05-17  Bruno Haible  <bruno@clisp.org>
4966
4967                 Cygwin portability.
4968                 * javaexec.c (execute_java_class): Test for jview program
4969                 also on Cygwin.
4970
4971         2006-04-09  Bruno Haible  <bruno@clisp.org>
4972
4973                 * fatal-signal.c: Don't include string.h.
4974                 (at_fatal_signal): Use a copying loop instead of memcpy.
4975
4976         2005-12-04  Bruno Haible  <bruno@clisp.org>
4977
4978                 * csharpexec.c: Add support for 'clix' launcher (untested).
4979                 (execute_csharp_using_sscli): New function.
4980                 (execute_csharp_program): Call it.
4981
4982         2006-06-21  Bruno Haible  <bruno@clisp.org>
4983
4984                 Avoid warnings from recent versions of mcs.
4985                 * csharpcomp.c (compile_csharp_using_mono): Don't use options
4986                 -o, -L, -r any more. Use options documented since mcs-1.0
4987                 instead. Similarly for -g.
4988
4989         2005-07-09  Bruno Haible  <bruno@clisp.org>
4990
4991                 * csharpcomp.c (compile_csharp_using_sscli): For -l option,
4992                 add a .dll suffix.
4993                 Reported by Mark Junker <mjscod@gmx.de>.
4994
4995         2006-06-17  Bruno Haible  <bruno@clisp.org>
4996
4997                 * config.charset: Update for NetBSD 3.0.
4998
4999         2006-05-17  Bruno Haible  <bruno@clisp.org>
5000
5001                 Cygwin portability.
5002                 * localcharset.c (WIN32_NATIVE): Renamed from WIN32.
5003
5004         2006-05-16  Bruno Haible  <bruno@clisp.org>
5005
5006                 * localcharset.c [CYGWIN]: Include <windows.h>.
5007                 (get_charset_aliases): For Cygwin, return the same CPxxx
5008                 aliases list as under WIN32.
5009                 (locale_charset) [CYGWIN]: Try to retrieve the encoding from
5010                 the environment variables. Fall back to GetACP().
5011
5012         2006-04-05  Bruno Haible  <bruno@clisp.org>
5013
5014                 * config.charset: Update Juan Manuel Guerrero's address.
5015
5016         2005-02-12  Bruno Haible  <bruno@clisp.org>
5017
5018                 * allocsa.h: Add extern "C" for C++.
5019
5020         2005-02-10  Bruno Haible  <bruno@clisp.org>
5021
5022                 * allocsa.h (sa_alignof): Define differently with AIX xlc, to
5023                 avoid a bug of this compiler on AIX 3.2.5 dealing with enums.
5024
5025         2006-07-22  Bruno Haible  <bruno@clisp.org>
5026
5027                 * gettext.h: Update to GNU gettext-0.15.
5028
5029 2006-07-22  Bruno Haible  <bruno@clisp.org>
5030
5031         * config/srclist.txt: Resync printf-args.c, vasnprintf.c,
5032         localcharset.c, mkdtemp.c, config.rpath, lib-ld.m4, lib-link.m4,
5033         lib-prefix.m4, longdouble.m4, ssize_t.m4.
5034
5035 2006-07-21  Eric Blake  <ebb9@byu.net>
5036
5037         * modules/stdlib-safer: New file.
5038         * MODULES.html.sh (File stream based Input/Output): Add
5039         stdlib-safer.
5040
5041 2006-07-21  Eric Blake  <ebb9@byu.net>
5042
5043         * lib/stdlib-safer.h: New file from coreutils, required by
5044         stdlib--.h.
5045
5046 2006-07-20  Paul Eggert  <eggert@cs.ucla.edu>
5047
5048         * gnulib-tool (func_usage): Document --assume-autoconf='latest-stable'.
5049
5050 2006-07-20  Bruno Haible  <bruno@clisp.org>
5051
5052         * gnulib-tool: Recognize new option --assume-autoconf.
5053         (autoconf_minversion): New variable.
5054         (func_get_filelist): Use it to decide whether to add onceonly_2_57.m4.
5055
5056 2006-07-20  Bruno Haible  <bruno@clisp.org>
5057
5058         * MODULES.html.sh (func_all_modules): Add a missing func_begin_table.
5059
5060 2006-07-19  Derek R. Price  <derek@ximbiot.com>
5061
5062         * lib/getaddrinfo.h: Don't define unimplemented AI_* flags.
5063         Reindent and repaginate.
5064
5065 2006-07-19  Derek Price  <derek@ximbiot.com>
5066
5067         * doc/gnulib.texi (Libtool and Windows):  Eliminate passive voice.
5068         Correct grammar.
5069
5070 2006-07-17  Bruno Haible  <bruno@clisp.org>
5071
5072         * modules/list: New file.
5073         * modules/array-list: New file.
5074         * modules/carray-list, modules/carray-list-tests: New files.
5075         * modules/linked-list, modules/linked-list-tests: New files.
5076         * modules/avltree-list, modules/avltree-list-tests: New files.
5077         * modules/rbtree-list, modules/rbtree-list-tests: New files.
5078         * modules/linkedhash-list, modules/linkedhash-list-tests: New files.
5079         * modules/avltreehash-list, modules/avltreehash-list-tests: New files.
5080         * modules/rbtreehash-list, modules/rbtreehash-list-tests: New files.
5081         * modules/oset: New file.
5082         * modules/array-oset: New file.
5083         * modules/avltree-oset, modules/avltree-oset-tests: New files.
5084         * modules/rbtree-oset, modules/rbtree-oset-tests: New files.
5085         * tests/test-carray_list.c: New file.
5086         * tests/test-linked_list.c: New file.
5087         * tests/test-avltree_list.c: New file.
5088         * tests/test-rbtree_list.c: New file.
5089         * tests/test-linkedhash_list.c: New file.
5090         * tests/test-avltreehash_list.c: New file.
5091         * tests/test-rbtreehash_list.c: New file.
5092         * tests/test-avltree_oset.c: New file.
5093         * tests/test-rbtree_oset.c: New file.
5094         * MODULES.html.sh (Container data structures): New section.
5095
5096 2006-07-17  Bruno Haible  <bruno@clisp.org>
5097
5098         * m4/gl_list.m4: New file.
5099
5100 2006-07-17  Bruno Haible  <bruno@clisp.org>
5101
5102         * lib/gl_list.h: New file.
5103         * lib/gl_list.c: New file.
5104         * lib/gl_array_list.h: New file.
5105         * lib/gl_array_list.c: New file.
5106         * lib/gl_carray_list.h: New file.
5107         * lib/gl_carray_list.c: New file.
5108         * lib/gl_linked_list.h: New file.
5109         * lib/gl_linked_list.c: New file.
5110         * lib/gl_anylinked_list1.h: New file.
5111         * lib/gl_anylinked_list2.h: New file.
5112         * lib/gl_avltree_list.h: New file.
5113         * lib/gl_avltree_list.c: New file.
5114         * lib/gl_anyavltree_list1.h: New file.
5115         * lib/gl_anyavltree_list2.h: New file.
5116         * lib/gl_rbtree_list.h: New file.
5117         * lib/gl_rbtree_list.c: New file.
5118         * lib/gl_anyrbtree_list1.h: New file.
5119         * lib/gl_anyrbtree_list2.h: New file.
5120         * lib/gl_anytree_list1.h: New file.
5121         * lib/gl_anytree_list2.h: New file.
5122         * lib/gl_linkedhash_list.h: New file.
5123         * lib/gl_linkedhash_list.c: New file.
5124         * lib/gl_anyhash_list1.h: New file.
5125         * lib/gl_anyhash_list2.h: New file.
5126         * lib/gl_avltreehash_list.h: New file.
5127         * lib/gl_avltreehash_list.c: New file.
5128         * lib/gl_rbtreehash_list.h: New file.
5129         * lib/gl_rbtreehash_list.c: New file.
5130         * lib/gl_anytreehash_list1.h: New file.
5131         * lib/gl_anytreehash_list2.h: New file.
5132
5133         * lib/gl_oset.h: New file.
5134         * lib/gl_oset.c: New file.
5135         * lib/gl_array_oset.h: New file.
5136         * lib/gl_array_oset.c: New file.
5137         * lib/gl_avltree_oset.h: New file.
5138         * lib/gl_avltree_oset.c: New file.
5139         * lib/gl_rbtree_oset.h: New file.
5140         * lib/gl_rbtree_oset.c: New file.
5141         * lib/gl_anytree_oset.h: New file.
5142
5143 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5144
5145         * m4/mkancesdirs.m4: New file.
5146         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Mention dirchownmod.c,
5147         dirchownmod.h.  Don't require AC_FUNC_ALLOCA, gl_AFS, gl_CHDIR_SAFER;
5148         no longer needed.  Require gl_FUNC_LCHOWN, since dirchownmod.c needs
5149         it.
5150
5151 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5152
5153         * lib/dirchownmod.c, lib/dirchownmod.h, lib/mkancesdirs.c:
5154         * lib/mkancesdirs.h: New files.
5155         * lib/mkdir-p.c: Don't include alloca.h, stdio.h, sys/types.h,
5156         unistd.h, string.h, chdir-safer.h, dirname.h, lchmod.h, lchown.h,
5157         save-cwd.h.  Instead, include dirchownmod.h and mkancesdirs.h.
5158         (make_dir_parents): New args MAKE_ANCESTOR, OPTIONS, ANNOUNCE,
5159         MODE_BITS.  Remove options VERBOSE_FMT_STRING, CWD_ERRNO.  All
5160         callers changed.  Revamp internals significantly, by not
5161         attempting to create directories that are temporarily more
5162         permissive than the final results.  Do not attempt to use
5163         save_cwd/restore_cwd; it isn't worth it for mkdir and install.
5164         This removes some race conditions, fixes some bugs, and simplifies
5165         things.  Use new dirchownmod function to do owner and mode changes.
5166         * lib/mkdir-p.h: Likewise.
5167         * lib/modechange.c (octal_to_mode): New function.
5168         (struct mode_change): New member mentioned.
5169         (make_node_op_equals): New arg mentioned.  All callers changed.
5170         (mode_compile): Keep track of which mode bits the user has explicitly
5171         mentioned.
5172         (mode_adjust): New arg DIR, so that we implement the X op correctly.
5173         New arg PMODE_BITS, to keep track of which mode bits the user
5174         mentioned; it treats S_ISUID and S_ISGID speciall.
5175         All callers changed.
5176         * lib/modechange.h: Likewise.
5177
5178 2006-07-16  Paul Eggert  <eggert@cs.ucla.edu>
5179
5180         * MODULES.html.sh: Add mkancestors.
5181         * modules/mkancesdirs: New module.
5182         * modules/mkdir-p (Files): Remove lib/chdir-safer.c, lib/chdir-safer.h,
5183         lib/same-inode.h, m4/afs.m4, m4/chdir-safer.m4.
5184         The chdir-safer and afs files are now orphans; I'll remove them
5185         unless someone speaks up.
5186         Add lib/dirchownmod.c, lib/dirchownmod.h.
5187         (Depends-on): Remove alloca, chown, save-cwd, dirname.
5188         Add lchown, mkancesdirs.
5189         (Maintainer): Add self.
5190
5191 2006-07-15  Karl Berry  <karl@gnu.org>
5192
5193         * gnulib-tool: help message wording/arrangement.
5194
5195 2006-07-14  Simon Josefsson  <jas@extundo.com>
5196
5197         * doc/gnulib.texi (Libtool and Windows): New section.
5198
5199 2006-07-12  Simon Josefsson  <jas@extundo.com>
5200
5201         * modules/gendocs (License): Fix license, approved by Karl.
5202
5203 2006-07-12  Eric Blake  <ebb9@byu.net>
5204
5205         * MODULES.html.sh: Add gendocs.
5206
5207 2006-07-11  Eric Blake  <ebb9@byu.net>
5208
5209         * modules/fdl: New module, to install doc/fdl.texi.
5210         * MODULES.html.sh: Add new section for documentation modules.
5211         * gnulib-tool: Avoid space-tab.
5212         (--doc-base): New option, to manage files from doc.
5213
5214 2006-07-11  Eric Blake  <ebb9@byu.net>
5215
5216         * m4/absolute-header.m4: Fix comments to match recent change.
5217
5218 2006-07-11  Eric Blake  <ebb9@byu.net>
5219
5220         * gnulib-tool: List --doc-base before --tests-base.
5221
5222 2006-07-11  Derek R. Price  <derek@ximbiot.com>
5223
5224         * lib/glob.c: s/NAMLEN/_D_EXACT_NAMLEN/.
5225
5226 2006-07-11  Bruno Haible  <bruno@clisp.org>
5227
5228         * README: Mention where to put documentation.
5229
5230 2006-07-10  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5231
5232         * doc/functions.texi, gnulib-tool.texi, gnulib.texi: Fix some typos.
5233
5234 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5235
5236         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Like today's change
5237         to stdint.m4.
5238
5239 2006-07-10  Paul Eggert  <eggert@cs.ucla.edu>
5240
5241         * m4/stdint.m4 (gl_STDINT_H): Like yesterday's change to
5242         absolute-header.m4.  Also, set ABSOLUTE_STDINT_H to a string
5243         "no/such/file/stdint.h" when there is no such file, so that
5244         the resulting C code can be parsed by dodgy compilers.
5245         Problems reported by Bob Proulx.
5246
5247 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5248
5249         * lib/backupfile.c, dirfd.h, fts.c, getcwd.c, glob.c, glob_.h:
5250         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5251         macros into the GNU _D_EXACT_NAMLEN.
5252         * lib/savedir.c:  Likewise.
5253         (savedirstream): Use _D_EXACT_NAMLEN in preference to strlen.
5254
5255 2006-07-10  Derek R. Price  <derek@ximbiot.com>
5256         and Paul Eggert  <eggert@cs.ucla.edu>
5257
5258         * m4/backupfile.m4, d-ino.m4, d-type.m4, dirfd.m4, fts.m4, getcwd.m4:
5259         * m4/savedir.m4:
5260         Ignore the obsolescent !HAVE_DIRENT_H case.  Consolidate NAMLEN
5261         macros into the GNU _D_EXACT_NAMLEN.
5262
5263 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5264
5265         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Use "" rather than <>
5266         around the absolute name, to work around a problem with the HP-UX
5267         11.23 native C compiler, reported by Bob Proulx.
5268
5269 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5270
5271         * doc/maintain.texi, make-stds.texi: Sync from
5272         <http://savannah.gnu.org/projects/gnustandards>.
5273
5274 2006-07-09  Paul Eggert  <eggert@cs.ucla.edu>
5275
5276         * build-aux/depcomp, build-aux/install-sh: Sync from Automake.
5277
5278 2006-07-09  Jim Meyering  <jim@meyering.net>
5279
5280         * m4/glob.m4: Remove a doubled word in a comment.
5281
5282 2006-07-09  Jim Meyering  <jim@meyering.net>
5283
5284         * lib/argp-pv.c: Remove a doubled word in a comment.
5285         * lib/check-version.c (check_version): Likewise.
5286         * lib/javacomp.c (compile_java_class): Likewise.
5287
5288 2006-07-08  Paul Eggert  <eggert@cs.ucla.edu>
5289
5290         * gnulib-tool (func_get_filelist): Don't echo m4/onceonly_2_57.m4,
5291         for the benefit of people using Autoconf 2.60.  If you want to
5292         support older Autoconf versions you can copy m4/onceonly_2_57.m4
5293         (or m4/onceonly.m4, if pre-2.57) manually.
5294
5295 2006-07-08  Jim Meyering  <jim@meyering.net>
5296
5297         * m4/link-follow.m4: Remove one of two adjacent "whether"s in a
5298         comment.
5299         * m4/getopt.m4: Remove one of two adjacent "your"s in a comment.
5300         * m4/regex.m4 (gl_REGEX): Remove one of two adjacent "the"s in a
5301         comment.
5302
5303 2006-07-08  Jim Meyering  <jim@meyering.net>
5304
5305         * lib/getndelim2.h (getndelim2): Remove doubled "after" in comment.
5306
5307 2006-07-07  Simon Josefsson  <jas@extundo.com>
5308
5309         * tests/test-crc.c: Change expected crc value, the test vector
5310         were probably computed using the old broken crc.c?
5311
5312 2006-07-06  Simon Josefsson  <jas@extundo.com>
5313
5314         * modules/sys_socket (Files): Add m4/sockpfaf.m4 (this module is
5315         now the canonical place for the M4 file).
5316
5317         * modules/getaddrinfo (Files): Remove m4/sockpfaf.m4, we get it
5318         from the sys_socket dependency now.
5319
5320         * modules/inet_pton (Files): Ditto.
5321
5322         * modules/inet_ntop (Files): Ditto.
5323
5324 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
5325
5326         * modules/getusershell (configure.ac): Use gl_FUNC_GETUSERSHELL,
5327         not gl_PREREQ_GETUSERSHELL.
5328
5329 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5330
5331         * m4/_inttypes_h.m4 (gl_INTTYPES_H): Use AC_CHECK_DECLS_ONCE
5332         with only one argument, for Autoconf 2.60.
5333         * m4/fileblocks.m4 (gl_PREREQ_FILEBLOCKS): AC_CHECK_DECLS_ONCE may
5334         expand to nothing, so add a shell command to avoid syntax error.
5335         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
5336
5337 2006-07-06  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
5338
5339         * lib/strtod.c (strtod): cast the argument of tolower to unsigned char.
5340
5341 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5342
5343         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't check for getenv decl;
5344         no longer needed.  Check for isblank decl.
5345         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Don't check for getenv decl.
5346         * m4/regex.m4 (gl_PREREQ_REGEX): Dheck for isblank decl instead
5347         of existence.
5348
5349 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5350
5351         * lib/getloadavg.c: Use __VMS, not VMS.
5352         * lib/getopt.c: Likewise.
5353         * lib/getpagesize.h: Likewise.
5354         * lib/glob.c: Remove most VMS cruft; it hasn't been tested for a while
5355         and probably does not work.
5356
5357 2006-07-06  Paul Eggert  <eggert@cs.ucla.edu>
5358
5359         * lib/.cppi-disable: Add wcwidth.
5360         * lib/fnmatch.c (ISBLANK): Remove.  All uses changed to isblank.
5361         (isblank) [! (defined isblank || HAVE_DECL_ISBLANK)]: New macro.
5362         (ISGRAPH): Remove.  All uses changed to isgraph.
5363         (FOLD) [!defined _LIBC]: Remove special case.
5364         * lib/getdate.y (lookup_word): Remove no-longer-needed call to islower.
5365         * lib/regex_internal.h (isblank): Depend on HAVE_DECL_ISBLANK, not
5366         HAVE_ISBLANK.
5367         * lib/strftime.c (TOLOWER, TOUPPER) [!defined _LIBC]: Remove special
5368         case.
5369
5370 2006-07-06  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5371
5372         * lib/getaddrinfo.c: Changes to compile under MSVC6: changed
5373         '#if WIN32_NATIVE' to '#ifdef' & moved WSAAPI macro inside
5374         brackets.  Other minor changes to suppress some compiler
5375         warnings.
5376
5377 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5378         and Paul Eggert  <eggert@cs.ucla.edu>
5379
5380         * m4/backupfile.m4 (gl_BACKUPFILE): Check for dirent.h, instead
5381         of invoking obsolescent AC_HEADER_DIRENT macro.
5382         * m4/d-ino.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_INO): Likewise.
5383         * m4/d-type.m4 (gl_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Likewise.
5384         * m4/dirfd.m4 (gl_FUNC_DIRFD): Likewise.
5385         * m4/fts.m4 (gl_FUNC_FTS_CORE): Likewise.
5386         * m4/getcwd.m4 (gl_PREREQ_GETCWD): Likewise.
5387         * m4/glob.m4 (gl_PREREQ_GLOB): Likewise.
5388         * m4/savedir.m4 (gl_SAVEDIR): Likewise.
5389         * m4/readdir.m4: Remove; no longer needed.
5390
5391 2006-07-06  Derek R. Price  <derek@ximbiot.com>
5392         and Paul Eggert  <eggert@cs.ucla.edu>
5393
5394         * lib/backupfile.c [HAVE_DIRENT_H && ! HAVE_NDIR_H]:
5395         Don't worry about this obsolete case any more.
5396         (HAVE_DIR): Remove.  All uses removed; we now assume you can read
5397         directories.
5398         * lib/dirfd.h [HAVE_DIRENT_H && ! HAVE_NDIR_H]: Don't
5399         worry about this obsolete case any more.
5400         * lib/fts.c: Likewise.
5401         * lib/getcwd.c: Likewise.
5402         * lib/glob.h: Likewise.
5403         * lib/savedir.c: Likewise.
5404
5405 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5406
5407         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Use AC_CHECK_DECLS_ONCE
5408         rather than AC_CHECK_DECLS for strtoimax and strtoumax.
5409         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Remove; no longer
5410         needed.
5411         All uses removed.
5412         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5413         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5414         * m4/exclude.m4 (gl_EXCLUDE): Don't check for isascii; no longer
5415         needed.
5416         * m4/getdate.m4 (gl_GETDATE): Likewise.
5417         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5418         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5419         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5420         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5421         * m4/strtoul.m4 (gl_PREREQ_STRTOUL): Likewise.
5422         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5423         * m4/exclude.m4 (gl_EXCLUDE): Don't require AC_C_INLINE; no longer
5424         needed.
5425
5426 2006-07-05  Paul Eggert  <eggert@cs.ucla.edu>
5427
5428         * lib/memcasecmp.c: Include <limits.h>.
5429         (memcasecmp): Don't assume UCHAR_MAX <= INT_MAX.
5430         * lib/strtod.c (strtod): Don't assume isspace works on negative chars.
5431         Don't assume isdigit succeeds only on '0' through '9'.
5432
5433 2006-07-05  Eric Blake  <ebb9@byu.net>
5434
5435         * modules/getaddrinfo (Depends-on): Add snprintf.
5436
5437 2006-07-05  Eric Blake  <ebb9@byu.net>
5438
5439         * m4/sockpfaf.m4 (gl_SOCKET_FAMILIES): Use gl_HEADER_SYS_SOCKET
5440         to avoid 'header present but could not be compiled' on cygwin.
5441
5442 2006-07-05  Eric Blake  <ebb9@byu.net>
5443
5444         * lib/getaddrinfo.h (NI_NUMERICHOST, NI_NUMERICSERV): Define if
5445         missing from netdb.h.
5446         * lib/getaddrinfo.c (includes): Include inet_ntop and snprintf.
5447
5448 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5449
5450         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Don't require AC_HEADER_STDC;
5451         no longer needed.
5452         * m4/exclude.m4 (gl_EXCLUDE): Likewise.
5453         * m4/getdate.m4 (gl_GETDATE): Likewise.
5454         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Likewise.
5455         * m4/memcasecmp.m4 (gl_MEMCASECMP): Likewise.
5456         * m4/strtod.m4 (gl_FUNC_STRTOD): Likewise.
5457         * m4/strtol.m4 (gl_PREREQ_STRTOL): Likewise.
5458         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
5459
5460 2006-07-05  Derek R. Price  <derek@ximbiot.com>
5461
5462         * lib/exclude.c (IN_CTYPE_DOMAIN, is_space): Remove; no longer needed.
5463         All uses of is_space replaced by isspace.
5464         * lib/exit.h: Don't talk about STDC_HEADERS.
5465         * lib/fnmatch.c (ISASCII): Remove; no longer needed.  All uses removed.
5466         (ISPRINT, ISDIGIT, ISALNUM, ISALPHA, ISCNTRL, ISLOWER, ISPUNCT):
5467         (ISSPACE, ISUPPER, ISXDIGIT): Remove; no longer needed.  All uses
5468         replaced by isprint etc.
5469         * lib/getdate.y (IN_CTYPE_DOMAIN, ISSPACE, ISALPHA, ISLOWER): Likewise.
5470         * lib/getusershell.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5471         * lib/memcasecmp.c (IN_CTYPE_DOMAIN, ISLOWER, TOUPPER): Likewise.
5472         * lib/strtod.c (IN_CTYPE_DOMAIN, ISSPACE, ISDIGIT, TOLOWER): Likewise.
5473         * lib/strtol.c (IN_CTYPE_DOMAIN): Likewise.
5474         * lib/xstrtol.c (IN_CTYPE_DOMAIN, ISSPACE): Likewise.
5475
5476 2006-07-05  Bruno Haible  <bruno@clisp.org>
5477
5478         * m4/strndup.m4 (gl_FUNC_STRNDUP): When cross-compiling, check whether
5479         the function exists, before testing against AIX.
5480         Reported by Martin Lambers <marlam@marlam.de>.
5481
5482 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5483
5484         * modules/cycle-check (lib_SOURCES): Add same-inode.h.
5485         From Mark D. Baushke.
5486
5487 2006-07-04  Paul Eggert  <eggert@cs.ucla.edu>
5488
5489         * m4/absolute-header.m4 (gl_ABSOLUTE_HEADER): Prepend three slashes
5490         to the absolute name, not just one, to bypass Sun C 5.8's
5491         "warning: #include of /usr/include/... may be non-portable".
5492
5493 2006-07-04  Eric Blake  <ebb9@byu.net>
5494
5495         * modules/dirname-tests: New test module.
5496         * tests/test-dirname.c: New file, replacing dirname.c
5497         TEST_DIRNAME section that was recently deleted.
5498
5499 2006-07-04  Bruno Haible  <bruno@clisp.org>
5500
5501         Assume ANSI C header files and <ctype.h> functions.
5502         * lib/mbswidth.c (IN_CTYPE_DOMAIN, ISPRINT, ISCNTRL): Remove macros.
5503         (mbsnwidth): Use isprint, iscntrl instead.
5504
5505 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5506
5507         Merge from coreutils.
5508         * MODULES.html.sh: Add xstrtold.
5509         * modules/xstrtold: New file.
5510         * modules/cycle-check (Files): Add lib/same-inode.h.
5511         * modules/dirname (Files): Add m4/double-slash-root.m4.
5512         * modules/getcwd (Files): Add m4/getcwd-abort-bug.m4.
5513         * modules/mkdir-p (Files): Add lib/same-inode.h.
5514         * modules/same (Files): Add lib/same-inode.h.
5515
5516 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5517
5518         * m4/absolute-header.m4: Renamed from full-header-path.m4.
5519         This is to keep the terminology clean; POSIX talks about
5520         "absolute pathnames", not "full pathnames", but the GNU
5521         Coding Standards say to use "path" for something else;
5522         so use "absolute" to keep both sides happy.
5523         (gl_ABSOLUTE_HEADER): Renamed from gl_FULL_HEADER_PATH.
5524         Set gl_absolute_header, not gl_full_header_path.
5525         Set gl_cv_absolute_<header>, not gl_full_path_<header>.
5526         Define ABSOLUTE_<HEADER>, not FULL_PATH_<HEADER>.
5527         All uses changed.
5528
5529         Merge from coreutils.
5530
5531         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5532
5533         * m4/c-strtod.m4 (gl_C_STRTOLD): Add c-strtod.c to LIBSOURCES.
5534         Require gl_USE_SYSTEM_EXTENSIONS, not gl_C_STRTOD, since we don't
5535         want to require the building of c-strtod.o.
5536         * m4/lib-check.m4 (cu_LIB_CHECK): Remove SEQ_LIBM, since seq no longer
5537         needs -lm directly.
5538         * m4/xstrtod.m4 (gl_XSTRTOLD): New macro.
5539
5540         2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
5541
5542         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Prefer binutils's
5543         --as-needed option if available.  Problem reported by Albert Chin in
5544         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00114.html>.
5545         However, use -Wl,--as-needed, not bare --as-needed, since HP-UX 11.11
5546         cc merely issues a bunch of annoying warnings for --as-needed
5547         (this problem was reported by Bob Proulx).  Also, try linking with
5548         -lm to detect a bug in binutils 2.16 (this problem was reported
5549         by Ralf Wildenhues).
5550
5551         2006-06-18  Jim Meyering  <jim@meyering.net>
5552
5553         Test for a bug that causes glibc's getcwd to suffer a failed assertion.
5554         * m4/getcwd-abort-bug.m4 (gl_FUNC_GETCWD_ABORT_BUG): New file and
5555         macro.
5556         * m4/getcwd.m4 (gl_FUNC_GETCWD): If we detect support for getcwd_null,
5557         also check for glibc-2.4's abort-inducing bug.
5558
5559         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Fix typo.
5560         Low-probability clean-up should be to use rmdir to get rid of
5561         the just-created directory, not unlink.
5562
5563         * m4/ftruncate.m4 (gl_FUNC_FTRUNCATE): If ftruncate is missing, make
5564         configure fail, and request a bug report to inform us about it.
5565         Add a comment that, barring reports to the contrary, in 2007 we'll
5566         assume ftruncate is universally available.
5567
5568         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5569
5570         * m4/filemode.m4 (gl_FILEMODE): Check for strmode declaration.
5571
5572         2006-03-12  Jim Meyering  <jim@meyering.net>
5573
5574         * m4/chdir-safer.m4 (gl_CHDIR_SAFER): Add same-inode.h to the list.
5575         * m4/cycle-check.m4 (gl_CYCLE_CHECK): Likewise.
5576         * m4/same.m4 (gl_SAME): Likewise.
5577         * m4/root-dev-ino.m4 (gl_ROOT_DEV_INO): Likewise.
5578
5579         2006-03-11  Eric Blake  <ebb9@byu.net>
5580
5581         * m4/double-slash-root.m4: New file, provides gl_DOUBLE_SLASH_ROOT.
5582         * m4/dirname.m4 (gl_DIRNAME): Use gl_DOUBLE_SLASH_ROOT.
5583         * m4/dos.m4 (FILE_SYSTEM_PREFIX_LEN): Move from here to dirname.h.
5584         (FILE_SYSTEM_DRIVE_PREFIX_CAN_BE_RELATIVE): New define.
5585
5586 2006-07-03  Paul Eggert  <eggert@cs.ucla.edu>
5587
5588         * lib/stdint_.h: Include <sys/types.h> after @FULL_PATH_STDINT_H@, for
5589         MacOS X 10.4.6.  Don't mention <sys/int_types.h>.  Problems
5590         reported by Mark D. Baushke, one in
5591         <http://lists.gnu.org/archive/html/bug-gnulib/2006-07/msg00015.html>.
5592
5593         Merge from coreutils.
5594
5595         * lib/.cppi-disable: Add stdint_.h.
5596         * lib/.cvsignore: Add stdint.h.
5597
5598         2006-06-30  Paul Eggert  <eggert@cs.ucla.edu>
5599
5600         * lib/xstrtod.c (XSTRTOD, DOUBLE): New macros, so that we can support
5601         both double and long double versions.
5602         (XSTRTOD): Renamed from xstrtod.  Use DOUBLE internally.
5603         * lib/xstrtold.c: New file.
5604         * lib/xstrtod.h (xstrtold): New decl.
5605
5606         2006-05-22  Paul Eggert  <eggert@cs.ucla.edu>
5607
5608         * lib/filemode.c (setst): Remove.
5609         (strmode): Rewrite to avoid setst.  This makes the code shorter,
5610         (arguably) clearer, and the generated code is a bit smaller on my
5611         Debian GNU/Linux stable x86 host.
5612
5613         2006-04-17  Paul Eggert  <eggert@cs.ucla.edu>
5614
5615         * lib/filemode.c: Include "filemode.h" first, to test the interface.
5616         Assume that filemode.h includes sys/types.h and sys/stat.h.
5617         (HAVE_ST_DM_MODE): New macro, moved here from ls.c.
5618         (ftypelet): Reorder to put common cases first, for efficiency.
5619         Add 'P', 'w'.  Remove 'M', since it's now the caller's responsibility
5620         to do 'M'.
5621         (strmode): Renamed from mode_string, and now stores 12 bytes instead
5622         of 10, for compatibility with FreeBSD.  All callers changed.
5623         (filemodestring): Now stores 12 bytes instead of 10, and sets file
5624         types that can't be deduced solely from st_mode.  First arg is now a
5625         const pointer.
5626         * lib/filemode.h (HAVE_DECL_STRMODE): Include <string.h> for strmode.
5627         (strmode): Renamed from mode_string.
5628         (filemodestring): New decl.
5629         * lib/stat-macros.h: Don't undef S_ISDOOR, since it's never buggy.
5630         (S_ISDOOR): Don't bother with S_IFDOOR, since that code is never
5631         needed.
5632         (S_ISPORT, S_ISWHT): New macros, if not already defined.
5633
5634         2006-04-12  Paul Eggert  <eggert@cs.ucla.edu>
5635
5636         * lib/fsusage.c: Don't include <inttypes.h> or <stdint.h>, since
5637         fsusage.h now does that.  Include fsusage.h first, to test interface.
5638         Prefer statvfs if it works, since it's blessed by POSIX.  Attempt
5639         at most one method (the old code could have generated decls that
5640         didn't conform to C89, not that this was ever exercised).
5641         * lib/fsusage.h: Include <inttypes.h> and <stdint.h> if they exist.
5642
5643         2006-03-19  Jim Meyering  <jim@meyering.net>
5644
5645         Work even in a chroot where d_ino values for entries in "/"
5646         don't match the stat.st_ino values for the same names.
5647         * lib/getcwd.c (__getcwd): When no d_ino value matches the target inode
5648         number, iterate through all entries again, using lstat instead.
5649         Reported by Kenshi Muto in http://bugs.debian.org/355810, and by
5650         Zouhir Hafidi in https://bugzilla.redhat.com/bugzilla/190656.
5651
5652         * lib/getcwd.c (__getcwd): Clarify a comment.
5653         Use memcpy in place of a call to strcpy.
5654
5655         2006-03-12  Jim Meyering  <jim@meyering.net>
5656
5657         * lib/fts-cycle.c (leave_dir): If cycle-check's saved dev-ino pair
5658         matches that of the current directory (which we're about to chdir ".."
5659         out of), then save the dev-ino of the parent, instead.
5660
5661         * lib/same-inode.h (SAME_INODE): New file/macro.
5662         * lib/chdir-safer.c (SAME_INODE): Remove definition.
5663         Include "same-inode.h", instead.
5664         * lib/same.c: Likewise.
5665         * lib/cycle-check.h: Include "same-inode.h".
5666         (CYCLE_CHECK_REFLECT_CHDIR_UP): Define.
5667         * lib/cycle-check.c (SAME_INODE): Remove definition.
5668         * lib/root-dev-ino.h: Include "same-inode.h".
5669
5670         2006-03-11  Eric Blake  <ebb9@byu.net>
5671
5672         * lib/same.c (same_name): s/base_name/last_component/
5673         * lib/backupfile.c (check_extension, numbered_backup): Likewise.
5674         * lib/filenamecat.c (file_name_concat): Likewise.
5675
5676         2006-03-11  Eric Blake  <ebb9@byu.net>,
5677                     Paul Eggert  <eggert@cs.ucla.edu>
5678
5679         * lib/dirname.h (FILE_SYSTEM_PREFIX_LEN): Move here from dos.m4.
5680         [FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't treat 1: as a
5681         drive prefix.
5682         (IS_ABSOLUTE_FILE_NAME): Treat all drive letters as absolute on
5683         platforms like cygwin with FILE_SYSTEM_DRIVE_PREFIX_IS_ABSOLUTE.
5684         (last_component): New method.
5685         * lib/dirname.c (dir_len): Determine when drive letters need a
5686         subsequent slash.  Preserve // when it is special.
5687         (dir_name): Don't append dot when drive letter is absolute.
5688         [TEST_DIRNAME]: Move into a full-blown gnulib test.
5689         * lib/basename.c (base_name): New semantics - malloc the result.
5690         Preserve // when it is special.  Preserve relative files that look
5691         like drive letters.
5692         (base_len): Preserve // when it is special.
5693         (last_component): New method, similar to old base_name semantics.
5694         * lib/stripslash.c (strip_trailing_slashes): Use last_component, not
5695         base_name.  Strip redundant slashes from ///.
5696
5697 2006-07-03  Jim Meyering  <jim@meyering.net>
5698
5699         * lib/cycle-check.h (CYCLE_CHECK_REFLECT_CHDIR_UP): Abort if this
5700         macro is used before the first cycle_check call.
5701
5702 2006-07-03  Eric Blake  <ebb9@byu.net>
5703
5704         * modules/dirname (Depends-on): Add xstrndup.
5705
5706 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5707
5708         * m4/stdint.m4 (gl_STDINT_H): Use more-mnemonic identifiers for
5709         test cases, so that config.log is a bit easier to follow.
5710
5711 2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
5712
5713         * lib/stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
5714         both are 64 bits, since this seems to be the tradition, and this
5715         prevents gcc -Wformat from warning about usages with PRIuMAX.  If
5716         we ever run into a host that prefers long long to long in this
5717         case, we'll need another configure-time test.  Problem reported by
5718         Jim Meyering.
5719
5720 2006-07-02  Eric Blake  <ebb9@byu.net>
5721
5722         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Simplify by using AC_CHECK_DECLS.
5723
5724 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5725
5726         * modules/inttypes (Depends-on): No longer depends on stdint.
5727         * modules/stdint (Description): Say more about assumptions.
5728         Say that the fast types might differ.  Say macros are used.
5729         (Files): Remove m4/size_max.m4, m4/wchar_t.m4.  Add m4/longlong.m4.
5730         (Makefile.am): Revise list of substituted symbols to match
5731         new stdint.m4.
5732         * modules/stdint-tests (Files): Add m4/wchar_t.m4, m4/wint_t.m4.
5733         (configure.ac): Add gt_TYPE_WCHAR_T, gt_TYPE_WINT_T.
5734         * tests/test-stdint.c (verify_same_types)
5735         [! (__GNUC__ >= 2 && DO_PEDANTIC)]: Put in a decl, so that
5736         the code conforms to C99/C89.
5737         Test for WCHAR_MIN and WCHAR_MAX only if HAVE_WCHAR_T.
5738         Test for WINT_MIN and WINT_MAX only if HAVE_WINT_T.
5739
5740 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5741
5742         * m4/longlong.m4 (AC_TYPE_LONG_LONG_INT): Backport from Autoconf 2.60,
5743         but fix a bug, by requiring at least 64 bits.
5744         * m4/ulonglong.m4 (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
5745         * m4/longlong.m4 (gl_AC_TYPE_LONG_LONG): Now just call
5746         AC_TYPE_LONG_LONG_INT.  This macro is obsolete and will go soon.
5747         * m4/ulonglong.m4 (gl_AC_TYPE_UNSIGNED_LONG_LONG) Likewise.
5748
5749         * m4/stdint.m4 (gl_STDINT_H): Rewrite to accommodate stdint_.h
5750         changes.  Make 2.59 a prerequisite.  Check and substitute for
5751         HAVE_LONG_LONG_INT.  Rely on Autoconf to check for stdint.h and
5752         inttypes.h.  Do not use special include files; just use the
5753         defaults.  Check for sys/inttypes.h and sys/bitypes.h in the usual
5754         way now.  Remove no-longer-needed tests for HAVE_LONG_64BIT,
5755         HAVE_LONG_LONG_64BIT, int8_t, int16_t, int32_t, int64_t, uint8_t,
5756         uint16_t, uint32_t uint64_t, int_least8_t, int_least16_t,
5757         int_least32_t, int_least64_t, uint_least8_t, uint_least16_t,
5758         uint_least32_t, uint_least64_t, int_fast8_t, int_fast16_t,
5759         int_fast32_t, int_fast64_t, uint_fast8_t uint_fast16_t,
5760         uint_fast32_t, uint_fast64_t, intptr_t, uintptr_t, intmax_t,
5761         uintmax_t, INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX,
5762         UINT16_MAX, INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN,
5763         INT64_MAX, UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX,
5764         UINT_LEAST8_MAX, INT_LEAST16_MIN, INT_LEAST16_MAX,
5765         UINT_LEAST16_MAX, INT_LEAST32_MIN, INT_LEAST32_MAX,
5766         UINT_LEAST32_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX,
5767         UINT_LEAST64_MAX, INT_FAST8_MIN, INT_FAST8_MAX, UINT_FAST8_MAX,
5768         INT_FAST16_MIN, INT_FAST16_MAX, UINT_FAST16_MAX, INT_FAST32_MIN,
5769         INT_FAST32_MAX, UINT_FAST32_MAX, INT_FAST64_MIN, INT_FAST64_MAX,
5770         UINT_FAST64_MAX, INTPTR_MIN, INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN,
5771         INTMAX_MAX, UINTMAX_MAX, PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN,
5772         SIG_ATOMIC_MAX, SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN,
5773         WINT_MAX.  Check for C99 conformance more strictly, by detecting
5774         bugs in glibc 2.4, Solaris 10, and OpenBSD 3.9.  On the other hand do
5775         not check for things that C99 does not require, e.g., int8_t.  If
5776         a test isn't needed unless <stdint.h> isn't working, and is
5777         unlikely to be needed for any other reason, then don't do it
5778         unless <stdint.h> isn't working.  Do not check for ptrdiff_t or
5779         size_t, since we assume C89 freestanding at least.  Do not check
5780         for sig_atomic_t, wchar_t, or wint_t, since the code now does
5781         the right thing even if the types are not defined.  Instead use:
5782         (gl_STDINT_TYPE_PROPERTIES): New macro.
5783         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H): Remove.  Don't bother
5784         testing whether <sys/types.h> clashes, as Autoconf does this for
5785         us now.  All uses removed.
5786         (gl_STDINT_CHECK_TYPES, gl_STDINT_MISSING_BOUND):
5787         (gl_STDINT_MISSING_BOUNDS, gl_STDINT_MISSING_BOUNDS2):
5788         (gl_CHECK_TYPE_SAME):
5789         Remove; no longer needed.
5790         (gl_STDINT_BITSIZEOF): Don't bother to check whether the type
5791         exists, since we'll return 0 anyway in that case.
5792         (gl_INTEGER_TYPE_SUFFIX, gl_STDINT_INCLUDES): New macros.
5793
5794 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
5795
5796         * lib/stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
5797         possible collision with system files.
5798         (<stdio.h>, <time.h>, <wchar.h>) [defined __cplusplus && ! defined
5799         __STDC_CONSTANT_MACROS)]: Do not include, since we don't need
5800         WCHAR_MIN and WCHAR_MAX in this case.
5801         (<stddef.h>): Do not include; no longer needed.
5802         (<sys/types.h>): Include if @HAVE_SYS_TYPES_H@, not if
5803         (defined(__OpenBSD__) || defined(__bsdi__) || defined(__sgi)).
5804         (<sys/inttypes.h>): Include if @HAVE_SYS_INTTYPES_H@ &&
5805         !@HAVE_INTTYPES_H@, not if (defined(__FreeBSD__)
5806         && (__FreeBSD__ >= 3) && (__FreeBSD__ <= 4)).
5807         (__STDINT_H__) [@HAVE_STDINT_H@ && defined __sgi && ! defined
5808         __c99]: Define, to work around IRIX <stdint.h> incompatibility.
5809         (@FULL_PATH_STDINT_H@) [!(defined(__sgi) && @HAVE_INTTYPES_H@ &&
5810         !defined(__c99))]: Include in this case too, since it's harmless
5811         now.
5812         (<inttypes.h>) [@HAVE_INTTYPES_H@]: Include, since it's no longer
5813         dangerous to do so.
5814         (@FULL_PATH_INTTYPES_H@) [(defined(__hpux) || defined(_AIX)) &&
5815         @HAVE_INTTYPES_H@]: Do not include, since we now include <inttypes.h>.
5816         (_STDINT_MIN, _STDINT_MAX): New macros.
5817         (int8_t, uint8_t, int16_t, uint16_t, int32_t, uint32_t, int64_t):
5818         (uint64_t, int_least8_t, uint_least8_t, int_least16_t):
5819         (uint_least16_t, int_least32_t, uint_least32_t, int_least64_t):
5820         (uint_least64_t, int_fast8_t, uint_fast8_t, int_fast16_t):
5821         (uint_fast16_t, int_fast32_t, uint_fast32_t, int_fast64_t):
5822         (uint_fast64_t, intptr_t, uintptr_t, intmax_t, uintmax_t): Now
5823         macros, not typedefs; this simplifies things quite a bit.
5824         Use long int for all types narrower than int64_t.
5825         (intmax_t, uintmax_t, INTMAX_C, UINTMAX_C):
5826         Define in terms of long long int or int64_t or long int,
5827         not int64_t or int32_t.  This saves some compile-time testing.
5828         (INT8_MIN, INT8_MAX, UINT8_MAX, INT16_MIN, INT16_MAX, UINT16_MAX):
5829         (INT32_MIN, INT32_MAX, UINT32_MAX, INT64_MIN, INT64_MAX):
5830         (UINT64_MAX, INT_LEAST8_MIN, INT_LEAST8_MAX, UINT_LEAST8_MAX):
5831         (INT_LEAST16_MIN, INT_LEAST16_MAX, UINT_LEAST16_MAX):
5832         (INT_LEAST32_MIN, INT_LEAST32_MAX, UINT_LEAST32_MAX):
5833         (INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX, INT_FAST8_MIN):
5834         (INT_FAST8_MAX, UINT_FAST8_MAX, INT_FAST16_MIN, INT_FAST16_MAX):
5835         (UINT_FAST16_MAX, INT_FAST32_MIN, INT_FAST32_MAX, UINT_FAST32_MAX):
5836         (INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTPTR_MIN):
5837         (INTPTR_MAX, UINTPTR_MAX, INTMAX_MIN, INTMAX_MAX, UINTMAX_MAX):
5838         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5839         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5840         undef any previous version and define our own version, for
5841         simplicity and consistency with the new macros for types.
5842         (PTRDIFF_MIN, PTRDIFF_MAX, SIG_ATOMIC_MIN, SIG_ATOMIC_MAX):
5843         (SIZE_MAX, WCHAR_MIN, WCHAR_MAX, WINT_MIN, WINT_MAX):
5844         Simplify definitions by using _STDINT_MIN and _STDINT_MAX
5845         where appropriate.  Rely on new symbols @PTRDIFF_T_SUFFIX@,
5846         @SIG_ATOMIC_T_SUFFIX@, @SIZE_T_SUFFIX@, @WCHAR_T_SUFFIX@,
5847         @WINT_T_SUFFIX@ to keep things simple here.
5848         (UINT8_C, UINT16_C, UINT32_C, INT64_C, UINT64_C):
5849         Simplify by assuming typical 8/16/32/64 host, since we're
5850         already doing that elsewhere anyway.
5851         Use (LONG_MAX >> 31 >> 31 == 1) rather than @HAVE_LONG_64BIT@,
5852         and assume long long int is 64 bits if available.  This
5853         speeds up 'configure'.
5854
5855 2006-07-01  Eric Blake  <ebb9@byu.net>
5856
5857         * m4/stdarg.m4 (gl_STDARG_H): Use proper AH_VERBATIM.
5858         Reported by Andreas Buening.
5859
5860 2006-07-01  Eric Blake  <ebb9@byu.net>
5861
5862         * m4/stdarg.m4 (gl_STDARG_H): Properly parenthesize gl_va_copy.
5863
5864 2006-06-30  Jim Hyslop  <jhyslop@dreampossible.ca>  (tiny change)
5865
5866         * lib/getaddrinfo.c: fixed typo
5867
5868 2006-06-29  Jim Meyering  <jim@meyering.net>
5869
5870         * modules/strftime (Maintainer): Add my name, since with the
5871         FPRINTFTIME changes strftime.c has forked from glibc.
5872
5873 2006-06-29  Eric Blake  <ebb9@byu.net>
5874
5875         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): Use AC_C_INLINE.
5876
5877 2006-06-29  Eric Blake  <ebb9@byu.net>
5878
5879         * m4/sys_stat_h.m4 (gl_HEADER_SYS_STAT_H): New file.
5880
5881 2006-06-29  Eric Blake  <ebb9@byu.net>
5882
5883         * lib/stat_.h: New file.
5884
5885 2006-06-29  Eric Blake  <ebb9@byu.net>
5886
5887         * lib/stat_.h (rpl_mkdir): Declare inline, to avoid warnings about
5888         unused static function.
5889
5890 2006-06-29  Eric Blake  <ebb9@byu.net>
5891
5892         * doc/functions.texi (Function Portability): Document missing lstat
5893         on mingw.
5894
5895 2006-06-29  Eric Blake  <ebb9@byu.net>
5896
5897         * MODULES.html.sh: Add sys_stat.
5898         * modules/sys_stat: New module.
5899         * modules/mkstemp (Depends-on): Add sys_stat.
5900
5901 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5902
5903         * m4/strftime.m4: Don't call AC_FUNC_STRFTIME.
5904
5905 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5906
5907         * m4/c-bs-a.m4: Removed.
5908
5909 2006-06-29  Derek R. Price  <derek@ximbiot.com>
5910
5911         * lib/strftime.c: Assume strftime() exists.
5912
5913 2006-06-29  Derek Price  <derek@ximbiot.com>
5914
5915         * modules/c-bs-a: Removed - \a is C89.
5916         * MODULES.html.sh: Remove c-bs-a.
5917
5918 2006-06-29  Bruno Haible  <bruno@clisp.org>
5919
5920         * modules/wcwidth (License): Change to LGPL.
5921
5922 2006-06-28  Simon Josefsson  <jas@extundo.com>
5923
5924         * tests/test-getaddrinfo.c: Test getnameinfo too.  Call WSAStartup
5925         on _WIN32.
5926
5927         * modules/getaddrinfo (Depends-on): Add inet_ntop, needed by
5928         getnameinfo.
5929
5930 2006-06-28  Simon Josefsson  <jas@extundo.com>
5931
5932         * m4/getaddrinfo.m4: Look for getnameinfo prototypes too.
5933
5934 2006-06-28  Simon Josefsson  <jas@extundo.com>
5935
5936         * lib/getaddrinfo.c: Try to load ws2_32.dll on Windows, to find the
5937         functions there.  It will succeed on Windows XP, but on Windows
5938         2000 and (presumably) earlier, it will fail, and use the internal
5939         re-implementation.
5940         (use_win32_p): New function.
5941         (getaddrinfo): Use strtoul on servname, to support numeric ports.
5942         Support AI_NUMERICSERV to disable getservbyname.
5943         (getnameinfo): New function, only supports
5944         NI_NUMERICHOST|NI_NUMERICSERV for now.
5945
5946         * lib/getaddrinfo.h: Test and check for AI_* flags separately, MinGW
5947         only have some of them.  Add AI_NUMERICSERV.  Add prototype for
5948         getnameinfo.
5949
5950 2006-06-28  Eric Blake  <ebb9@byu.net>
5951
5952         * modules/wcwidth: New file.
5953         * modules/mbchar (Depends-on): Add wcwidth.
5954         * modules/mbswidth (Depends-on): Add wcwidth.
5955         * MODULES.html.sh: Add wcwidth.
5956
5957 2006-06-28  Eric Blake  <ebb9@byu.net>
5958
5959         * m4/mbswidth.m4 (gl_MBSDWIDTH): Move wcwidth from here...
5960         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): ...to this new file.
5961
5962 2006-06-28  Eric Blake  <ebb9@byu.net>
5963
5964         * lib/xvasprintf.h: Fix comments.
5965
5966 2006-06-28  Eric Blake  <ebb9@byu.net>
5967
5968         * lib/mbchar.h (wcwidth): Include wcwidth.h.
5969         * lib/mbswidth.c (wcwidth): Move from here...
5970         * lib/wcwidth.h: ...to this new file.
5971
5972 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5973
5974         * m4/savedir.m4: Remove AC_FUNC_CLOSEDIR_VOID requirement.
5975
5976         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Don't require AC_C_CONST, since
5977         it's obsolete.
5978         * m4/strftime.m4 (gl_FUNC_GNU_STRFTIME): Likewise.
5979
5980 2006-06-28  Derek R. Price  <derek@ximbiot.com>
5981
5982         * lib/savedir.c (CLOSEDIR): Remove.  All uses changed to closedir.
5983         Autoconf 2.60 says this stuff was obsolete.
5984
5985 2006-06-28  Bruno Haible  <bruno@clisp.org>
5986
5987         * modules/wcwidth (Files): Add m4/wchar_t.m4.
5988
5989 2006-06-28  Bruno Haible  <bruno@clisp.org>
5990
5991         * m4/wcwidth.m4 (gl_FUNC_WCWIDTH): Also require AC_C_INLINE and
5992         gt_TYPE_WCHAR_T.
5993
5994 2006-06-28  Bruno Haible  <bruno@clisp.org>
5995
5996         * lib/wcwidth.h: Declare nothing if !HAVE_WCHAR_T. Provide a fallback
5997         declaration for wcwidth.
5998         * lib/mbswidth.c: Restore the includes of <wchar.h> and <wctypes.h>.
5999
6000 2006-06-28  Bruno Haible  <bruno@clisp.org>
6001
6002         * lib/mkdtemp.c [MINGW]: Include <io.h>.
6003         (mkdir): Define using _mkdir.
6004
6005 2006-06-28  Bruno Haible  <bruno@clisp.org>
6006
6007         * lib/getaddrinfo.h: Fix POSIX URL.
6008         * lib/getaddrinfo.c (WIN32_NATIVE): New macro. Use it instead of
6009         _WIN32.
6010         (use_win32_p): Make static.
6011         (getaddrinfo): Reject service name if it is empty or does not consist
6012         solely of decimal digits, or if its value is > 65535.
6013         (getnameinfo): Remove useless casts.
6014
6015 2006-06-27  Simon Josefsson  <jas@extundo.com>
6016
6017         * modules/sys_select: New file, suggested by Bruno Haible, Paul
6018         Eggert and Martin Lambers.
6019
6020 2006-06-27  Simon Josefsson  <jas@extundo.com>
6021
6022         * m4/sys_select_h.m4: New file, suggested by Bruno Haible, Paul
6023         Eggert and Martin Lambers.
6024
6025 2006-06-27  Bruno Haible  <bruno@clisp.org>
6026
6027         * m4/stdint.m4 (gl_STDINT_BITSIZEOF): For nonexistent types, set the
6028         result to 0, not to empty.
6029         Reported by Martin Neitzel <neitzel@sco.gaertner.de>.
6030
6031 2006-06-27  Bruno Haible  <bruno@clisp.org>
6032
6033         * lib/stdint_.h (intmax_t, uintmax_t): Undefine before typedef.
6034
6035 2006-06-26  Simon Josefsson  <jas@extundo.com>
6036
6037         * m4/inet_ntop.m4: Don't check for sys/types.h, we assume it is
6038         present.
6039
6040 2006-06-26  Paul Eggert  <eggert@cs.ucla.edu>
6041
6042         * lib/base64.c (B64): Use _ as the formal parameter, not x, to avoid
6043         bug in IBM C V6 for AIX.  Problem reported by Larry Jones in
6044         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00181.html>.
6045
6046 2006-06-26  Mark D. Baushke  <mdb@gnu.org>
6047
6048         * m4/stdint.m4 (gl_STDINT_H): Treat BSD/OS like OpenBSD.
6049
6050 2006-06-26  Bruno Haible  <bruno@clisp.org>
6051
6052         * modules/stdint (Makefile.am): Also substitute HAVE_WCHAR_H.
6053
6054 2006-06-26  Bruno Haible  <bruno@clisp.org>
6055
6056         * m4/stdint.m4 (gl_STDINT_H): Test also for <wchar.h>.
6057
6058 2006-06-26  Bruno Haible  <bruno@clisp.org>
6059
6060         * m4/stdint.m4 (gl_STDINT_H): Don't include <stdint.h> when using the
6061         SGI C compiler in pre-C99 mode.
6062         Suggested by Mark D. Baushke and Larry Jones.
6063
6064 2006-06-26  Bruno Haible  <bruno@clisp.org>
6065
6066         * lib/stdint_.h: Include <wchar.h> if necessary for WCHAR_MIN or
6067         WCHAR_MAX.
6068         Reported by Mark D. Baushke and Larry Jones.
6069
6070 2006-06-26  Bruno Haible  <bruno@clisp.org>
6071
6072         * lib/stdint_.h: Don't include <stdint.h> when using the SGI C compiler
6073         in pre-C99 mode.
6074         Suggested by Mark D. Baushke and Larry Jones.
6075
6076 2006-06-23  Simon Josefsson  <jas@extundo.com>
6077             Bruno Haible  <bruno@clisp.org>
6078
6079         * gnulib-tool (func_emit_lib_Makefile_am): Define MOSTLYCLEANDIRS.
6080         Emit mostlyclean-local rule.
6081         (func_emit_tests_Makefile_am): Likewise.
6082         * modules/sys_socket (Makefile.am): Use MOSTLYCLEANDIRS.
6083
6084 2006-06-23  Mark D. Baushke  <mdb@gnu.org>
6085
6086         * lib/stdint_.h: Treat BSD/OS like OpenBSD.
6087
6088 2006-06-23  Bruno Haible  <bruno@clisp.org>
6089
6090         * tests/test-stdint.c: Update to match ISO C 99 Technical
6091         Corrigendum 1.
6092
6093 2006-06-23  Bruno Haible  <bruno@clisp.org>
6094
6095         * m4/stdint.m4 (gl_STDINT_H): Treat IRIX like OpenBSD.
6096
6097 2006-06-23  Bruno Haible  <bruno@clisp.org>
6098
6099         * lib/stdint_.h: Treat IRIX like OpenBSD.
6100
6101 2006-06-23  Bruno Haible  <bruno@clisp.org>
6102
6103         * lib/stdint_.h (UINT8_C, UINT16_C, UINT32_C): Define according to
6104         ISO C 99 Technical Corrigendum 1.
6105
6106 2006-06-22  Simon Josefsson  <jas@extundo.com>
6107
6108         * m4/sockpfaf.m4: Include winsock2.h too, to make it work under
6109         MinGW.
6110
6111 2006-06-22  Paul Eggert  <eggert@cs.ucla.edu>
6112
6113         * lib/glob.c (collated_compare): Remove 'const' uses that weren't
6114         needed.  Some compiler complained about some of them.  Problem reported
6115         by Larry Jones in
6116         <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00172.html>.
6117
6118 2006-06-21  Simon Josefsson  <jas@extundo.com>
6119
6120         * tests/test-getaddrinfo.c: New file.
6121
6122         * modules/getaddrinfo-tests: New file.
6123
6124         * MODULES.html.sh: Add inet_pton.
6125
6126         * modules/inet_pton: New file.
6127
6128 2006-06-21  Simon Josefsson  <jas@extundo.com>
6129
6130         * m4/getaddrinfo.m4: Don't define WINVER.  Look for gethostbyname in
6131         -lws2_32 too.  Fixes getaddrinfo on Windows 2000, with the price
6132         of using the (limited) gnulib implementation on Windows XP.
6133
6134         * m4/inet_pton.m4: New file.
6135
6136 2006-06-21  Simon Josefsson  <jas@extundo.com>
6137
6138         * lib/getaddrinfo.c (getaddrinfo): Set ai_family in the return
6139         variable.
6140
6141         * lib/socket_.h: Don't define WINVER.
6142
6143         * lib/inet_pton.h, inet_pton.c: New file, taken from glibc but
6144         slightly modified to work in gnulib.
6145
6146 2006-06-21  Simon Josefsson  <jas@extundo.com>
6147
6148         * doc/gnulib.texi (Windows sockets): Add.
6149
6150 2006-06-21  Paul Eggert  <eggert@cs.ucla.edu>
6151
6152         * lib/read-file.c (fread_file): Start with buffer allocation of
6153         0 bytes rather than 1 byte; this simplifies the code.
6154         Don't invoke feof; it's not needed.  Refactor to avoid duplicate
6155         code to free buffer and save/restore errno.
6156         (internal_read_file): Remove unused local.
6157
6158 2006-06-20  Paul Eggert  <eggert@cs.ucla.edu>
6159
6160         * lib/openat.c (openat): Use ?:, not if, to work around GCC bug 4210
6161         <http://gcc.gnu.org/bugzilla/show_bug.cgi?id=4210>.
6162         Problem reported by Denis Excoffier in
6163         <http://lists.gnu.org/archive/html/bug-tar/2006-06/msg00023.html>.
6164
6165 2006-06-19  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
6166
6167         * modules/sys_socket, modules/socklen: Include sys/types since
6168         FreeBSD 4.x's sys/socket.h needs it.
6169
6170 2006-06-19  Simon Josefsson  <jas@extundo.com>
6171
6172         * lib/inet_ntop.c: Always build inet_ntop4, since inet_ntop6 calls it.
6173
6174 2006-06-19  Paul Eggert  <eggert@cs.ucla.edu>
6175
6176         * lib/alloca_.h (alloca) [defined alloca]: Don't define or declare.
6177
6178 2006-06-19  Bruno Haible  <bruno@clisp.org>
6179
6180         * m4/stdint.m4 (gl_STDINT_H): Enclose the values of FULL_PATH_STDINT_H
6181         and FULL_PATH_INTTYPES_H in angle brackets.
6182         Reported by Mark D. Baushke <mdb@gnu.org>.
6183
6184 2006-06-17  Eric Blake  <ebb9@byu.net>
6185
6186         * m4/rmdir-errno.m4 (gl_FUNC_FMDIR_NOTEMPTY): Assume errno.h declares
6187         errno.
6188
6189 2006-06-17  Bruno Haible  <bruno@clisp.org>
6190
6191         * m4/stdint.m4 (gl_STDINT_H) [FreeBSD >= 5]: Don't include
6192         <sys/inttypes.h>.
6193
6194 2006-06-17  Bruno Haible  <bruno@clisp.org>
6195
6196         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove test
6197         whether errno is declared. Assume <errno.h> declares errno.
6198
6199 2006-06-17  Bruno Haible  <bruno@clisp.org>
6200
6201         * lib/stdint_.h [FreeBSD >= 5]: Don't include <sys/inttypes.h>.
6202
6203 2006-06-17  Bruno Haible  <bruno@clisp.org>
6204
6205         * lib/stdint_.h (_UINT8_T, _UINT32_T, _UINT64_T): New macros. Fixes a
6206         problem on Solaris 2.5.1.
6207
6208 2006-06-16  Eric Blake  <ebb9@byu.net>
6209
6210         * lib/unsetenv.c [!defined errno]: Assume errno.h declares errno.
6211         * lib/unicodeio.c [!defined errno]: Likewise.
6212         * lib/strtol.c [!defined errno]: Likewise.
6213         * lib/strtod.c [!defined errno]: Likewise.
6214
6215 2006-06-15  Eric Blake  <ebb9@byu.net>
6216
6217         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Work in spite of -Werror.
6218
6219 2006-06-15  Eric Blake  <ebb9@byu.net>
6220
6221         * config/srclist.txt (ssize_t.m4): Lose sync.
6222
6223 2006-06-15  Bruno Haible  <bruno@clisp.org>
6224
6225         * modules/stdint (Files): Include m4/full-header-path.m4,
6226         m4/size_max.m4, m4/wchar_t.m4.
6227         (Makefile.am): Many more substitutions.
6228         * modules/stdint-tests: New file.
6229         * tests/test-stdint.c: New file.
6230
6231 2006-06-15  Bruno Haible  <bruno@clisp.org>
6232
6233         * m4/stdint.m4 (gl_STDINT_H): Rewritten to produce a complete stdint.h.
6234         (gl_HEADER_STDINT_H, gl_HEADER_INTTYPES_H, gl_STDINT_CHECK_TYPES,
6235         gl_STDINT_MISSING_BOUND, gl_STDINT_MISSING_BOUNDS,
6236         gl_STDINT_MISSING_BOUNDS2, gl_STDINT_BITSIZEOF, gl_CHECK_TYPES_SIGNED,
6237         gl_CHECK_TYPE_SAME): New macros.
6238
6239 2006-06-15  Bruno Haible  <bruno@clisp.org>
6240
6241         * m4/size_max.m4 (gl_SIZE_MAX): Make it work also when cross-compiling.
6242
6243 2006-06-15  Bruno Haible  <bruno@clisp.org>
6244
6245         * lib/stdint_.h: Rewritten to be fully auto-configured.
6246         Fixes bug on HP-UX/IA64.
6247
6248 2006-06-11  Paul Eggert  <eggert@cs.ucla.edu>
6249
6250         * lib/getdate.y (__attribute__): Don't define if already defined.
6251         Problem reported by Larry Jones.
6252         * lib/utimens.c (__attribute__): Likewise.
6253
6254 2006-06-04  Paul Eggert  <eggert@cs.ucla.edu>
6255
6256         * lib/regexec.c (group_nodes_into_DFAstates): Fix a buffer overrun
6257         reported by Andreas Schwab.
6258
6259 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6260             Bruno Haible  <bruno@clisp.org>
6261
6262         * m4/strndup.m4 (gl_FUNC_STRNDUP): Replace the AC_REPLACE_FUNCS with a
6263         check for the declaration of strnlen and a run test that exposes the
6264         AIX 5.1 strnlen bug.  In the failure case, #define strndup to
6265         rpl_strndup.
6266
6267 2006-05-30  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6268             Bruno Haible  <bruno@clisp.org>
6269
6270         * lib/strndup.c (strndup) [!_LIBC]: Don't undefine macro definition.
6271
6272 2006-05-28  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6273
6274         * m4/c-strtod.m4 (gl_C99_STRTOLD): Use a link test rather than a
6275         compile test, for Tru64 4.0D.
6276
6277 2006-05-28  Karl Berry  <karl@gnu.org>
6278
6279         * config/srclist.txt (printf-args.c): lose sync.
6280
6281 2006-05-26  Martin Lambers  <marlam@marlam.de>
6282
6283         * lib/getpass.c: Updates the test for the native W32 API, and adds
6284         missing includes, thus fixing compilation warnings.
6285
6286 2006-05-25  Sergey Poznyakoff  <gray@gnu.org.ua>
6287
6288         * lib/exclude.c (exclude_fnmatch): New function.
6289         (excluded_file_name): Call exclude_fnmatch.
6290         * lib/exclude.h (excluded_file_name): New prototype
6291
6292 2006-05-25  Paul Eggert  <eggert@cs.ucla.edu>
6293
6294         * lib/tempname.c (small_open, large_open): New macros.
6295         (__open, __open64) [!_LIBC]: Remove.
6296         (__gen_tempname): Use small_open and large_open instead of __open
6297         and __open64.  This fixes a portability bug on HP-UX 11.11i
6298         reported by Simon Wing-Tang in
6299         <http://lists.gnu.org/archive/html/bug-coreutils/2006-05/msg00114.html>.
6300
6301 2006-05-24  Bruno Haible  <bruno@clisp.org>
6302
6303         * lib/printf-args.c (printf_fetchargs): Turn NULL pointers for
6304         TYPE_STRING and TYPE_WIDE_STRING into a non-NULL replacement.
6305         Reported by Thorsten Maerz <torte@netztorte.de> via
6306         Aaron Stone <aaron@serendipity.cx>.
6307
6308 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6309
6310         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Rename cache variables to use
6311         gl_ rather than jm_.  Link, don't run, so that cross-compiles are
6312         allowed.  Check that resulting type is arithmetic.  Move AC_REQUIRE
6313         and AC_CHECK_HEADERS_ONCE outside of AC_CACHE_CHECK, since they're
6314         not really conditional on the cache.
6315         (gl_PREREQ_NANOSLEEP): Check for sys/select.h.
6316
6317 2006-05-19  Paul Eggert  <eggert@cs.ucla.edu>
6318
6319         * lib/nanosleep.c [HAVE_SYS_SELECT_H]: Include <sys/select.h>.
6320         Use the usual Autoconf way to include <time.h> and/or sys/time.h.
6321         (my_usleep): Don't mishandle maximum value.
6322
6323 2006-05-19  Jim Meyering  <jim@meyering.net>
6324
6325         * lib/getugroups.c: Correct an outdated comment.  From Bruno Haible.
6326
6327 2006-05-17  Bruno Haible  <bruno@clisp.org>
6328
6329         Cygwin portability.
6330         * lib/classpath.c (PATH_SEPARATOR) [CYGWIN]: Define as ':'.
6331
6332 2006-05-17  Bruno Haible  <bruno@clisp.org>
6333
6334         * lib/stdint_.h: Fix recognition of Cygwin.
6335
6336 2006-05-15  Bruno Haible  <bruno@clisp.org>
6337
6338         * build-aux/config.rpath: Improve support for Sun C 5.9 on Linux, based
6339         on libtool patch by Ralf Wildenhues.
6340
6341 2006-05-14  Paul Eggert  <eggert@cs.ucla.edu>
6342
6343         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Fix overly-picky
6344         test for C99 conformance; (bool) 0.5 is an integer constant
6345         expression, but (bool) -0.5 is not.  Problem reported by Fedor
6346         Sergeev in <http://forum.sun.com/jive/thread.jspa?threadID=96202>.
6347
6348 2006-05-11  Simon Josefsson  <jas@extundo.com>
6349
6350         * m4/xvasprintf.m4: Fix obvious typo.
6351
6352 2006-05-11  Jim Meyering  <jim@meyering.net>
6353
6354         * lib/sha1.c (sha1_buffer): Correct comment: s/MD5/SHA1/.  From
6355         James Lemley.
6356
6357 2006-05-10  Simon Josefsson  <jas@extundo.com>
6358
6359         * lib/md4.c: Typo fix, update copyright years.
6360         (K1, K2): Don't use L because it turn computations into 64-bit on
6361         64-bit platforms.
6362
6363 2006-05-10  Paul Eggert  <eggert@cs.ucla.edu>
6364
6365         * lib/crc.c (crc32_update): Remove unnecessary L suffix.
6366         * lib/md4.c (rol): Cast right-shift arg to uint32_t to prevent
6367         unwanted sign propagation, e.g., on hosts with 64-bit int.
6368         There still are some problems with reeelly weird theoretical hosts
6369         (e.g., 33-bit int) but it's not worth worrying about now.
6370         * lib/sha1.c (rol): Likewise.
6371         (K1, K2, K3, K4): Remove unnecessary L suffix.
6372
6373 2006-05-10  Bruno Haible  <bruno@clisp.org>
6374
6375         * lib/des.c: Cast to avoid warnings.
6376
6377 2006-05-09  Bruno Haible  <bruno@clisp.org>
6378
6379         * modules/xvasprintf (Files): Add m4/xvasprintf.m4.
6380         (Depends-on): Depend also on xsize, stdarg.
6381         (configure.ac): Add gl_XVASPRINTF.
6382
6383 2006-05-09  Bruno Haible  <bruno@clisp.org>
6384
6385         * m4/xvasprintf.m4: New file.
6386
6387 2006-05-09  Bruno Haible  <bruno@clisp.org>
6388
6389         * lib/xvasprintf.c: Include limits.h, string.h, xsize.h.
6390         (EOVERFLOW): Define fallback value.
6391         (xstrcat): New function.
6392         (xvasprintf): Recognize the special case of a string concatenation.
6393
6394 2006-05-08  Eric Blake  <ebb9@byu.net>
6395
6396         * gnulib-tool (func_version): Base copyright year on CVS date.
6397         (func_emit_copyright_notice): New function.
6398         (func_emit_lib_Makefile_am): Use it.
6399         (func_emit_tests_Makefile_am): Likewise.
6400         (func_import): Likewise.
6401
6402 2006-05-08  Bruno Haible  <bruno@clisp.org>
6403
6404         * modules/stdarg: New file.
6405         * MODULES.html.sh (func_all_modules): Add section for <stdarg.h>.
6406
6407 2006-05-08  Bruno Haible  <bruno@clisp.org>
6408
6409         * m4/stdarg.m4: New file, from GNU gettext.
6410
6411 2006-05-08  Bruno Haible  <bruno@clisp.org>
6412
6413         * config/srclist.txt (build-aux/config.rpath): different from latest
6414         release.
6415
6416 2006-05-08  Bruno Haible  <bruno@clisp.org>
6417
6418         * build-aux/config.rpath: Add support for Sun C 5.9 on Linux.
6419
6420 2006-05-05  Jim Meyering  <jim@meyering.net>
6421
6422         * m4/warning.m4: New file, derived from bison's file by the same name.
6423
6424 2006-05-03  Bruno Haible  <bruno@clisp.org>
6425
6426         * lib/stdint_.h: Shorter URL.
6427         * lib/inttypes.h: Likewise.
6428
6429 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6430
6431         * modules/inttypes (Maintainer): Change from Derek Price to 'all'.
6432
6433 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6434
6435         * lib/verify.h: Document the internals better.  Most of this change
6436         was written by Bruno Haible.
6437
6438 2006-05-02  Paul Eggert  <eggert@cs.ucla.edu>
6439
6440         * doc/verify.texi: New file, partly based on a proposal by
6441         Bruno Haible.
6442
6443 2006-05-02  Bruno Haible  <bruno@clisp.org>
6444
6445         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Move the include_next
6446         test from here...
6447         * m4/_inttypes_h.m4 (gl_INTTYPES_H): ... to here.
6448
6449 2006-04-29  Bruno Haible  <bruno@clisp.org>
6450
6451         * lib/gcd.c: Use WORD_T and GCD instead of unsigned long and gcd.
6452         Suggested by Oskar Liljeblad <oskar@osk.mine.nu>.
6453
6454 2006-04-29  Bruno Haible  <bruno@clisp.org>
6455
6456         * gnulib-tool: Make --update option actually work.
6457
6458 2006-04-29  Bruno Haible  <bruno@clisp.org>
6459
6460         * doc/gcd.texi: New file.
6461         * doc/gnulib.texi: Include it.
6462
6463 2006-04-25  Paul Eggert  <eggert@cs.ucla.edu>
6464
6465         * lib/getdate.y (get_date): When adding relative date, start with the
6466         initial time, not with the result of the first mktime call.
6467
6468 2006-04-25  Bruno Haible  <bruno@clisp.org>
6469
6470         * gnulib-tool (func_import): Output the include directives in three
6471         blocks, sorted separately.
6472         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6473
6474 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6475
6476         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use prototype
6477         to define main with arguments, for C++.  Reported by Eric Blake.
6478         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC):
6479         Prefer 'int main ()' to 'int main (void)', for C++.
6480         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Likewise.
6481         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Specify a return type
6482         for 'main', for C99 and C++.
6483
6484 2006-04-24  Paul Eggert  <eggert@cs.ucla.edu>
6485
6486         * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Use return, not exit.
6487         Don't assume that exit status -1 is valid.
6488         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
6489         * m4/putenv.m4 (gl_FUNC_PUTENV): Likewise.
6490         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Likewise.
6491         * m4/readdir.m4 (GL_FUNC_READDIR): Include <stdlib.h>.
6492         * m4/rename.m4 (vb_FUNC_RENAME): Likewise.
6493         * m4/unlink-busy.m4 (gl_FUNC_UNLINK_BUSY_TEXT): Use AC_RUN_IFELSE,
6494         not AC_TRY_RUN.  Use return, not exit.  Don't assume that
6495         functions can be used without declaring them, or that you can
6496         exit with status -1.
6497         * m4/utimes-null.m4 (gl_FUNC_UTIMES_NULL): Likewise.
6498
6499 2006-04-24  Karl Berry  <karl@gnu.org>
6500
6501         * config/srclist.txt (longdouble.m4): sync lost.
6502
6503 2006-04-24  Eric Blake  <ebb9@byu.net>
6504
6505         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Avoid unused variable warning.
6506
6507 2006-04-24  Bruno Haible  <bruno@clisp.org>
6508
6509         * m4/poll.m4 (gl_FUNC_POLL): When cross-compiling, reject also the
6510         poll() implementation in AIX.
6511         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6512
6513 2006-04-24  Bruno Haible  <bruno@clisp.org>
6514
6515         * m4/poll.m4 (gl_FUNC_POLL): Rearrange code, so that POLL_H gets
6516         assigned exactly once.
6517
6518 2006-04-23  Claudio Fontana  <claudio@gnu.org>
6519             Bruno Haible  <bruno@clisp.org>
6520
6521         * modules/gettext (Makefile.am): Add a -I flag for <libintl.h>.
6522         * gnulib-tool (func_emit_lib_Makefile_am): Emit empty default value
6523         for AM_CPPFLAGS.
6524
6525 2006-04-23  Bruno Haible  <bruno@clisp.org>
6526
6527         * modules/copy-file: Depend on unistd.
6528         * modules/execute: Likewise.
6529         * modules/fatal-signal: Likewise.
6530         * modules/findprog: Likewise.
6531         * modules/mkdtemp : Likewise.
6532         * modules/pipe: Likewise.
6533         * modules/wait-process: Likewise.
6534
6535 2006-04-23  Bruno Haible  <bruno@clisp.org>
6536
6537         * lib/fwriteerror.c (fwriteerror): Call fclose also when an error
6538         condition was already detected.
6539         Reported by Ben Pfaff <blp@cs.stanford.edu>.
6540
6541 2006-04-23  Bruno Haible  <bruno@clisp.org>
6542
6543         * lib/copy-file.c: Include <unistd.h> unconditionally.
6544         * lib/execute.c: Likewise.
6545         * lib/fatal-signal.c: Likewise.
6546         * lib/findprog.c: Likewise.
6547         * lib/mkdtemp.c: Likewise.
6548         * lib/pipe.h: Likewise.
6549         * lib/pipe.c: Likewise.
6550         * lib/wait-process.h: Likewise.
6551
6552 2006-04-23  Bruno Haible  <bruno@clisp.org>
6553
6554         * gnulib-tool (func_usage): Fix --import description. Document
6555         --update.
6556         (func_import): Create temporary file in a temporary directory, if
6557         --dry-run is specified. Silence errors from 'grep' when there are no
6558         m4 files in $m4dir.
6559         (func_create_testdir): Silence errors from 'grep' when there are no
6560         m4 files in $m4dir.
6561         Reported by Karl Berry <karl@freefriends.org>.
6562
6563 2006-04-20  Bruno Haible  <bruno@clisp.org>
6564
6565         * m4/argp.m4 (gl_ARGP): Don't call AC_CHECK_DECLS_ONCE with more than
6566         one argument, so that the code will be portable to Autoconf 2.60.
6567         * m4/getlogin_r.m4 (gl_PREREQ_GETLOGIN_R): Likewise.
6568         * m4/getpass.m4 (gl_PREREQ_GETPASS): Likewise.
6569         * m4/unlocked-io.m4 (gl_FUNC_GLIBC_UNLOCKED_IO): Likewise.
6570
6571 2006-04-19  Derek Price  <derek@ximbiot.com>
6572             Eric Blake  <ebb9@byu.net>
6573
6574         * m4/full-header-path.m4 (gl_FULL_HEADER_PATH): Use </full/path.h>
6575         rather than "/full/path.h".  Update comment to match.  Shorten &
6576         generalize m4_translit call via AS_TR_CPP.
6577
6578 2006-04-19  Derek Price  <derek@ximbiot.com>
6579             Eric Blake  <ebb9@byu.net>
6580
6581         * lib/inttypes.h: Correct grammar in comment.
6582
6583 2006-04-18  Derek Price  <derek@ximbiot.com>
6584             Paul Eggert  <eggert@cs.ucla.edu>
6585
6586         * modules/inttypes: New file.
6587         * modules/strtoimax, modules/strtoumax: Depend on inttypes.
6588
6589 2006-04-18  Derek Price  <derek@ximbiot.com>
6590             Paul Eggert  <eggert@cs.ucla.edu>
6591
6592         * m4/_inttypes_h.m4, m4/full-header-path.m4, m4/include_next.m4:
6593         New files.
6594
6595 2006-04-18  Derek Price  <derek@ximbiot.com>
6596             Paul Eggert  <eggert@cs.ucla.edu>
6597
6598         * lib/inttypes.h: New file.
6599         * lib/strtoimax.c: Assume <inttypes.h>.
6600
6601 2006-04-15  Paul Eggert  <eggert@cs.ucla.edu>
6602
6603         * lib/utimens.c (futimens): glibc futimesat messes up if /proc
6604         isn't mounted.  Problem reported by Kir Kolyshkin.
6605
6606 2006-04-13  Paul Eggert  <eggert@cs.ucla.edu>
6607
6608         * lib/regcomp.c (init_dfa): Don't use wchar_t or wctype_t if
6609         RE_ENABLE_I18N is not defined.  Problem reported by Mark D. Baushke via
6610         Derek R. Price.
6611         * lib/regex.h (RE_DUP_MAX): Update comment to match current
6612         implementation.
6613
6614 2006-04-12  Eric Blake  <ebb9@byu.net>
6615
6616         * modules/time_r (Makefile.am): Remove lib_SOURCES line, as this
6617         is now done automatically by the corresponding Autoconf macro.
6618
6619 2006-04-11  Paul Eggert  <eggert@cs.ucla.edu>
6620
6621         * m4/time_r.m4 (gl_TIME_R): Add AC_LIBSOURCES for time_r.c and
6622         time_r.h.
6623
6624 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6625
6626         Merge regex changes from libc, removing some of our
6627         POSIX-conformance changes that were rejected and redoing them in a
6628         less-intrusive way.
6629
6630         * lib/regcomp.c (re_compile_internal, init_dfa):
6631         Length arg is now size_t, not Idx.  All uses changed.
6632         (peek_token): Forward decl now says internal_function.
6633         (__re_error_msgid, __re_error_msgid_idx):
6634         Now static rather than extern with attribute_hidden.
6635         (re_compile_pattern) [!defined _LIBC]: Use K&R-style defn.
6636         For some reason libc prefers K&R style defns for external functions.
6637         (regerror) [!defined _LIBC]: Likewise.
6638         (re_set_syntax, re_compile_fastmap, regcomp, regfree, re_comp):
6639         (seek_collating_symbol_entry, lookup_collation_sequence_value):
6640         (build_range_exp, build_collating_symbol):
6641         Use K&R-style defn.
6642         (re_compile_fastmap): Use '\0' to memset, not 0.
6643         (utf8_sb_map): Make the calculations more obvious.
6644         (init_dfa, parse_bracket_exp, build_charclass_op):
6645         Call calloc and cast result, as glibc does.
6646         (init_word_char, fetch_token, peek_token, peek_token_bracket):
6647         (build_range_exp, build_collating_symbol):
6648         Now internal functions.
6649
6650         * lib/regex.c [!defined _LIBC]: Allow compiling with C++ compilers.
6651
6652         * lib/regex.h (__USE_GNU_REGEX): New macro.  Don't depend on
6653         _REGEX_SOURCE any more; depend on _GNU_SOURCE instead.
6654         Don't depend on VMS; depend on __VMS instead, for POSIX
6655         namespace cleanness.
6656         (regoff_t): Define to ssize_t, not long int.
6657
6658         Remove the REG_ macros named below.  Instead, make the old names
6659         (e.g., RE_BACKSLASH_ESCAPE_IN_LISTS) visible only if
6660         __USE_GNU_REGEX.
6661         (REG_BACKSLASH_ESCAPE_IN_LISTS):
6662         (REG_BK_PLUS_QM, REG_CHAR_CLASSES, REG_CONTEXT_INDEP_ANCHORS):
6663         (REG_CONTEXT_INDEP_OPS, REG_CONTEXT_INVALID_OPS):
6664         (REG_DOT_NEWLINE, REG_DOT_NOT_NULL, REG_HAT_LISTS_NOT_NEWLINE):
6665         (REG_INTERVALS, REG_LIMITED_OPS, REG_NEWLINE_ALT):
6666         (REG_NO_BK_BRACES, REG_NO_BK_PARENS, REG_NO_BK_REFS):
6667         (REG_NO_BK_VBAR, REG_NO_EMPTY_RANGES):
6668         (REG_UNMATCHED_RIGHT_PAREN_ORD, REG_NO_POSIX_BACKTRACKING):
6669         (REG_NO_GNU_OPS, REG_DEBUG, REG_INVALID_INTERVAL_ORD):
6670         (REG_IGNORE_CASE, REG_CARET_ANCHORS_HERE):
6671         (REG_CONTEXT_INVALID_DUP, REG_NO_SUB, REG_SYNTAX_EMACS):
6672         (REG_SYNTAX_AWK, REG_SYNTAX_GNU_AWK, REG_SYNTAX_POSIX_AWK):
6673         (REG_SYNTAX_GREP, REG_SYNTAX_EGREP, REG_SYNTAX_POSIX_EGREP):
6674         (REG_SYNTAX_ED, REG_SYNTAX_SED, _REG_SYNTAX_POSIX_COMMON):
6675         (REG_SYNTAX_POSIX_BASIC, REG_SYNTAX_POSIX_MINIMAL_BASIC):
6676         (REG_SYNTAX_POSIX_EXTENDED, REG_SYNTAX_POSIX_MINIMAL_EXTENDED):
6677         (REG_DUP_MAX, REG_UNALLOCATED, REG_REALLOCATE, REG_FIXED):
6678         (REG_NREGS):
6679         Remove.  All uses replaced by the old RE_* names.
6680         (RE_BACKSLASH_ESCAPE_IN_LISTS):
6681         (RE_BK_PLUS_QM, RE_CHAR_CLASSES, RE_CONTEXT_INDEP_ANCHORS):
6682         (RE_CONTEXT_INDEP_OPS, RE_CONTEXT_INVALID_OPS):
6683         (RE_DOT_NEWLINE, RE_DOT_NOT_NULL, RE_HAT_LISTS_NOT_NEWLINE):
6684         (RE_INTERVALS, RE_LIMITED_OPS, RE_NEWLINE_ALT):
6685         (RE_NO_BK_BRACES, RE_NO_BK_PARENS, RE_NO_BK_REFS):
6686         (RE_NO_BK_VBAR, RE_NO_EMPTY_RANGES):
6687         (RE_UNMATCHED_RIGHT_PAREN_ORD, RE_NO_POSIX_BACKTRACKING):
6688         (RE_NO_GNU_OPS, RE_DEBUG, RE_INVALID_INTERVAL_ORD):
6689         (RE_IGNORE_CASE, RE_CARET_ANCHORS_HERE):
6690         (RE_CONTEXT_INVALID_DUP, RE_NO_SUB):
6691         Don't bother having these macros be independent of each others'
6692         values, since they no longer exist in the POSIX name space.
6693
6694         Rename the following member names back to their old names,
6695         unless !__USE_GNU_REGEX.  All uses changed back.
6696         (buffer): Renamed from re_buffer.
6697         (allocated): Renamed from re_allocated.
6698         (used): Renamed from re_used.
6699         (syntax): Renamed from re_syntax.
6700         (fastmap): Renamed from re_fastmap.
6701         (translate): Renamed from re_translate.
6702         (can_be_null): Renamed from re_can_be_null.
6703         (regs_allocated): Renamed from re_regs_allocated.
6704         (fastmap_accurate): Renamed from re_fastmap_accurate.
6705         (no_sub): Renamed from re_no_sub.
6706         (not_bol): Renamed from re_not_bol.
6707         (not_eol): Renamed from re_not_eol.
6708         (newline_anchor): Renamed from re_newline_anchor.
6709         (num_regs): Renamed from rm_num_regs.
6710         (start): Renamed from rm_start.
6711         (end): Renamed from rm_end.
6712
6713         (free_state): Move up a bit.
6714
6715         * lib/regex_internal.h (inline) [__GNUC__ < 3 && defined _LIBC]:
6716         #define to be empty.
6717         (ASCII_CHARS): New macro, replacing all uses of 0x80 and/or SBC_MAX / 2
6718         when that is what is intended.
6719         (SBC_MAX): Define to UCHAR_MAX + 1, not 256.
6720         (__re_error_msgid, __re_error_msgid_idx): Remove decls; not needed.
6721         (MAX): New macro.
6722         (re_xmalloc, re_calloc, re_xrealloc, re_x2realloc): Remove.
6723         All uses changed back to re_malloc, etc.  It's now the caller's
6724         responsibility to check for overflow; all callers changed.
6725         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc, re_xnrealloc):
6726         (re_x2nrealloc): Remove.
6727         (free_state): Remove decl.
6728
6729         * lib/regexc.c (regexec, re_match, re_search, re_match_2, re_search_2):
6730         (re_set_registers, re_exec):
6731         Use K&R-style defn.
6732
6733         2006-01-31  Roland McGrath  <roland@redhat.com>
6734
6735         * lib/regcomp.c (calc_eclosure_iter): Remove dead variables.
6736         Reported by Mike Frysinger <vapier@gentoo.org>.
6737
6738         2006-01-15  Andreas Jaeger  <aj@suse.de>
6739
6740         [BZ #1950]
6741         * lib/regex_internal.c (re_string_reconstruct): Adjust for
6742         build_wcs_upper_buffer change.
6743         (build_wcs_upper_buffer): Change return type.
6744
6745         2005-12-10  Ulrich Drepper  <drepper@redhat.com>
6746
6747         * lib/regex_internal.h: Include <stdint.h> if available.
6748
6749         2005-12-06  Paolo Bonzini  <bonzini@gnu.org>
6750
6751         * lib/regex_internal.h (SIZE_MAX): Provide a default definition.
6752
6753         2005-10-14  Ulrich Drepper  <drepper@redhat.com>
6754
6755         * lib/regcomp.c: Adjust for changed secondary hash function.
6756
6757         2005-09-30  Ulrich Drepper  <drepper@redhat.com>
6758
6759         * lib/regex.h: Pretty printing.
6760         Clean up namespace a bit.
6761
6762         2005-09-30  Jakub Jelinek  <jakub@redhat.com>
6763
6764         * lib/regexec.c (update_cur_sifted_state, check_arrival,
6765         check_arrival_add_next_nodes): Avoid using uninitialized variable.
6766
6767         2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
6768                     Ulrich Drepper  <drepper@redhat.com>
6769
6770         [BZ #1302]
6771         * lib/regex_internal.h (bitset_t): Renamed from bitset.  All uses
6772         changed.
6773         (bitset_word_t): Renamed from bitset_word.  All uses changed.
6774
6775         2005-09-22  Ulrich Drepper  <drepper@redhat.com>
6776
6777         [BZ #281]
6778         * lib/regex.h: Define RE_TRANSLATE_TYPE as unsigned char *.
6779         * lib/regcomp.c: Remove unnecessary uses of
6780         unsigned RE_TRANSLATE_TYPE.
6781         * lib/regex_internal.h: Likewise.
6782         * lib/regex_internal.c: Likewise.
6783         * lib/regexec.c: Likewise.
6784         Based on a patch by Stepan Kasal <kasal@ucw.cz>.
6785
6786         2005-09-07  Ulrich Drepper  <drepper@redhat.com>
6787
6788         * lib/regexec.c (find_recover_state): Remove unnecessary
6789         initialization.
6790         (transit_state_bkref): Make DFA a const pointer.
6791         (get_subexp): Likewise.
6792         (check_arrival): Likewise.
6793         (update_cur_sifted_state): Likewise.
6794         (re_search_internal): Likewise.
6795         (prune_impossible_nodes): Likewise.
6796         (acquire_init_state_context): Likewise.
6797         (proceed_next_node): Likewise.
6798         (set_regs): Likewise.
6799         (free_fail_stack_return): Likewise.
6800         (check_arrival_expand_ecl): Mark DFA parameter as const.
6801         (check_arrival_expand_ecl_sub): Likewise.
6802         (check_subexp_limits): Likewise.
6803         (sub_epsilon_src_nodes):  Likewise.
6804         (add_epsilon_src_nodes):  Likewise.
6805         (merge_state_array): Likewise.
6806         (update_regs): Likewise.
6807         (build_trtable): Likewise.
6808         (sift_states_backward): Mark MCTX parameter as const.
6809         (build_sifted_states): Likewise.
6810         (update_cur_sifted_state): Likewise.
6811         (sift_states_mkref): Likewise.
6812         (check_arrival_expand_ecl): Mark eclosure as const.
6813         (check_dst_limits_calc_pos_1): Likewise.
6814         * lib/regex_internal.h (re_match_context_t): Make dfa a const
6815         pointer.
6816
6817         2005-09-06  Ulrich Drepper  <drepper@redhat.com>
6818
6819         * lib/regexec.c (merge_state_with_log): Define dfa as const pointer.
6820         (transit_state_sb): Likewise.
6821         (transit_state_mb): Likewise.
6822         (sift_states_iter_mb): Likewise.
6823         (check_arrival_add_next_nodes): Likewise.
6824         (check_node_accept_bytes): Change first parameter to pointer-to-const.
6825         [_LIBC] (re_search_2_stub): Use mempcpy.
6826
6827         * lib/regex_internal.c (re_string_reconstruct): Avoid calling
6828         mbrtowc for very simple UTF-8 case.
6829
6830         * lib/regex_internal.c (re_acquire_state): Make DFA pointer arg
6831         a pointer-to-const.
6832         (re_acquire_state_context): Likewise.
6833         * lib/regex_internal.h: Adjust prototypes.
6834
6835         * lib/regex.c: Prevent using C++ compilers.
6836
6837         * lib/regex_internal.c (re_acquire_state): Minor code rearrangement.
6838         (re_acquire_state_context): Likewise.
6839
6840 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6841
6842         * modules/regex (Depends-on): Add ssize_t.
6843
6844 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6845
6846         * m4/regex.m4 (gl_REGEX): Check for new glibc interface to
6847         translation table.
6848
6849 2006-04-09  Paul Eggert  <eggert@cs.ucla.edu>
6850
6851         * doc/gnulib-tool.texi (Modified imports): pathname -> file name.
6852
6853 2006-03-29  Mark D. Baushke  <mdb@gnu.org>
6854             Bruno Haible  <bruno@clisp.org>
6855
6856         * lib/stdint_.h: On OpenBSD, don't redefine types already included in
6857         <sys/types.h> and <inttypes.h>.
6858
6859 2006-03-25  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6860
6861         * m4/argz.m4 (gl_FUNC_ARGZ): If we define `error_t', also define
6862         `__error_t_defined', so argp.h will not typedef the former.
6863
6864 2006-03-25  Paul Eggert  <eggert@cs.ucla.edu>
6865
6866         * m4/regex.m4 (gl_REGEX): Don't insist on REG_SYNTAX_POSIX_EGREP,
6867         REG_SYNTAX_EMACS, and REG_IGNORE_CASE.  Settle for the traditional
6868         glibc names.  Even if glibc is changed to conform to POSIX, the
6869         traditional names will be available anyway, since regex depends on
6870         the extensions module.  Also, fix a longstanding typo in the
6871         implementation of Spencer ERE test #75 from grep 2.3.  Problems
6872         reported by Emanuele Giaquinta.  Also, change sense of cached
6873         variable, so that the message makes sense.
6874
6875 2006-03-24  Simon Josefsson  <jas@extundo.com>
6876
6877         * lib/base64.c: Fix problems reported by Eric Blake <ebb9@byu.net>,
6878         including some doc fixes.
6879         (base64_encode_alloc): Fix +1 bug on allocation failures.
6880
6881 2006-03-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
6882
6883         * lib/base64.c (base64_encode): Do not read past end of array with
6884         unsanitized input on systems with CHAR_BIT > 8.
6885
6886 2006-03-24  Eric Blake  <ebb9@byu.net>
6887
6888         * lib/time_r.c (copy_string_result): Remove, as it is no longer used.
6889
6890 2006-03-22  Karl Berry  <karl@gnu.org>
6891
6892         * config/srclist.txt (*setenv.[ch]): get from coreutils.
6893         * config/srclistvars.sh (COREUTILS): new var.
6894
6895 2006-03-17  Jim Meyering  <jim@meyering.net>
6896
6897         * m4/regex.m4 (gl_REGEX): Fix typo in last change:
6898         s/_REGEX_WIDE_OFFSETS/_REGEX_LARGE_OFFSETS/.
6899
6900 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6901
6902         * m4/regex.m4 (gl_REGEX): Don't check for off_t, since the code
6903         no longer needs it.  Instead, check that regoff_t is as least
6904         as wide as ptrdiff_t.
6905
6906         Don't define _REGEX_WIDE_OFFSETS unless using the included regex,
6907         so that our regex.h stays compatible with the installed regex.
6908         This is helpful for installers who configure --without-included-regex.
6909         Problem reported by Emanuele Giaquinta.
6910
6911 2006-03-16  Paul Eggert  <eggert@cs.ucla.edu>
6912
6913         * lib/regex.h (regoff_t) [defined _REGEX_LARGE_OFFSETS]:
6914         Typedef to long int, not to off_, as POSIX will likely change
6915         in that direction.
6916
6917 2006-03-15  Eric Blake  <ebb9@byu.net>
6918
6919         * m4/dirfd.m4 (gl_FUNC_DIRFD): Use AC_REQUIRE for AC_HEADER_DIRENT.
6920
6921 2006-03-13  Sergey Poznyakoff  <gray@gnu.org.ua>
6922
6923         * lib/argp-help.c (validate_uparams): Fix typo
6924         * lib/argp-parse.c (argp_default_options): Consistently begin help
6925         messages with a lowercase letter.
6926
6927 2006-03-11  Paul Eggert  <eggert@cs.ucla.edu>
6928
6929         * lib/time_r.h (asctime_r, ctime_r): Remove.  These functions can
6930         overrun buffers and shouldn't be used (much as gets shouldn't be
6931         used).
6932         * lib/time_r.c (asctime_r, ctime_r): Likewise.
6933
6934 2006-03-08  Simon Josefsson  <jas@extundo.com>
6935
6936         * m4/gc-random.m4: Permit 'no' as variable values and fix warnings,
6937         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6938
6939 2006-03-08  Simon Josefsson  <jas@extundo.com>
6940
6941         * m4/gc-random.m4: Call AC_CANONICAL_HOST and use $host_os instead of
6942         $target, suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6943
6944 2006-03-08  Simon Josefsson  <jas@extundo.com>
6945
6946         * lib/gc-gnulib.c (randomize): Don't open files called 'no', they
6947         signal that configure disabled the device.
6948
6949 2006-03-08  Simon Josefsson  <jas@extundo.com>
6950
6951         * build-aux/maint.mk: Fix refresh-po, to handle no translated
6952         languages.
6953
6954 2006-03-07  Simon Josefsson  <jas@extundo.com>
6955
6956         * modules/getopt (Depends-on): Add unistd.
6957
6958         * modules/unistd: New file.
6959
6960 2006-03-07  Simon Josefsson  <jas@extundo.com>
6961
6962         * modules/gc-random: New file.
6963
6964 2006-03-07  Simon Josefsson  <jas@extundo.com>
6965
6966         * m4/unistd_h.m4: New file.
6967
6968 2006-03-07  Simon Josefsson  <jas@extundo.com>
6969
6970         * m4/readline.m4 (gl_FUNC_READLINE): Rewrite the cached part of the
6971         test to be side-effect free by storing the result in the cache
6972         variable gl_cv_lib_readline, and moving the assignment of
6973         LIBREADLINE and LTLIBREADLINE outside the COMMANDS-TO-SET-IT.
6974         From Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
6975
6976 2006-03-07  Simon Josefsson  <jas@extundo.com>
6977
6978         * m4/gc-random.m4: New file, mostly from gc.m4.  Warn instead of
6979         error on missing devices (the functions will return an error).
6980
6981         * m4/gc.m4: Move random stuff to gc-random.m4
6982
6983 2006-03-07  Simon Josefsson  <jas@extundo.com>
6984
6985         * lib/unistd_.h: New file.
6986
6987 2006-03-07  Simon Josefsson  <jas@extundo.com>
6988
6989         * lib/gc-libgcrypt.c, gc-gnulib.c: Use GC_USE_RANDOM.
6990
6991 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6992
6993         * m4/unistd_h.m4 (gl_HEADER_UNISTD): Rename, to match modules file.
6994         Problem reported by Juan Manuel Guerrero.
6995
6996 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
6997
6998         * lib/c-stack.c: Include unistd.h unconditionally, since we now assume
6999         the unistd module.
7000         * lib/getlogin_r.c: Likewise.
7001         * lib/getlogin_r.h: Likewise.
7002         * lib/glob.c: Likewise.
7003         * lib/pagealign_alloc.c: Likewise.
7004         * lib/unistd_.h: Remove; no longer needed.
7005
7006 2006-03-07  Paul Eggert  <eggert@cs.ucla.edu>
7007
7008         * MODULES.html.sh (Support for systems lacking POSIX:2001):
7009         Add unistd.
7010         * modules/c-stack (Depends-on): Add unistd.
7011         * modules/getlogin_r: Likewise.
7012         * modules/glob: Likewise.
7013         * modules/pagealign_alloc: Likewise.
7014         * modules/unistd (Files): Remove lib/unistd_.h.
7015         (EXTRA_DIST): Remove.
7016         (unistd.h): Create using 'echo' rather than 'cp', so that we don't
7017         need unistd_.h.
7018         (MOSTLYCLEANFILES): Remove unistd.h-t.
7019
7020 2006-03-03  Simon Josefsson  <jas@extundo.com>
7021
7022         * build-aux/maint.mk: Add several syntax checks from CoreUtils.
7023
7024 2006-03-03  Simon Josefsson  <jas@extundo.com>
7025
7026         * build-aux/maint.mk: Add refresh-po rule, based on ideas from
7027         libidn and bison.
7028
7029 2006-03-03  Simon Josefsson  <jas@extundo.com>
7030
7031         * build-aux/maint.mk: Add indent target.
7032
7033 2006-03-03  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de> (tiny change)
7034
7035         * m4/poll.m4 (gl_FUNC_POLL): If we deem poll(2) unacceptable, use
7036         our replacement poll.h in any case, to avoid a differing
7037         declaration from a system header.  Seen on AIX.
7038
7039 2006-03-01  Simon Josefsson  <jas@extundo.com>
7040
7041         * lib/readline.c: Fix typo, tiny patch from Stepan Kasal
7042         <kasal@ucw.cz>.
7043
7044 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7045
7046         * modules/gettime (Depends-on): Add extensions module.
7047         * modules/nanosleep (Depends-on): Likewise.
7048         * modules/settime (Depends-on): Likewise.
7049
7050 2006-03-01  Paul Eggert  <eggert@cs.ucla.edu>
7051
7052         * m4/clock_time.m4 (gl_CLOCK_TIME): Require gl_USE_SYSTEM_EXTENSIONS,
7053         not merely AC_GNU_SOURCE, for the benefit of Solaris 10 when compiled
7054         pedantically.
7055         * m4/nanosleep.m4 (gl_FUNC_NANOSLEEP): Likewise.
7056         * m4/timespec.m4 (gl_TIMESPEC): Likewise.
7057
7058         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Use "=" with "test",
7059         not "==".  Reported by Ralf Wildenhues.
7060
7061 2006-03-01  Karl Berry  <karl@gnu.org>
7062
7063         * doc/Copyright/request-*: new files, synced from gnuorg.
7064
7065 2006-03-01  Karl Berry  <karl@gnu.org>
7066
7067         * config/srclist.txt (Copyright/*): new entries.
7068
7069 2006-02-28  Simon Josefsson  <jas@extundo.com>
7070
7071         * lib/getopt.c: Protect #include of unistd.h, for MSVS.
7072
7073 2006-02-27  Simon Josefsson  <jas@extundo.com>
7074
7075         * lib/base64.h: Indent #define's.  From Jim Meyering
7076         <jim@meyering.net>.
7077
7078 2006-02-27  Jim Meyering  <jim@meyering.net>
7079
7080         Revert the change of 2006-02-24, so these files can continue
7081         to be sync'd from gettext.
7082         * lib/mkdtemp.c, setenv.c, unsetenv.c: *Un*-normalize inclusion
7083         of `config.h'.
7084
7085 2006-02-26  Paul Eggert  <eggert@cs.ucla.edu>
7086
7087         * modules/intprops: New file.
7088         * MODULES.html.sh (Numeric conversion functions <stdlib.h>):
7089         Add intprops.
7090         * modules/getloadavg (Files): Remove lib/intprops.h.
7091         (Depends-on): Add intprops.
7092         * modules/human: Likewise.
7093         * modules/inttostr: Likewise.
7094         * modules/openat: Likewise.
7095         * modules/sig2str: Likewise.
7096         * modules/userspec: Likewise.
7097         * modules/utimecmp: Likewise.
7098         * modules/xnanosleep: Likewise.
7099         * modules/xstrtol: Likewise.
7100
7101 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny changes)
7102
7103         * modules/xstrtod: Omit xstrtod.h, xstrtod.c; they're in LIB_SOURCES.
7104         * modules/lock-tests (TESTS): Use $(EXEEXT).
7105         * modules/tls-tests: Likewise.
7106         * modules/argp-tests: Likewise.
7107         (check_PROGRAMS): New var, replacing...
7108         (noinst_PROGRAMS, test_argp_SOURCES): Remove.
7109
7110 2006-02-24  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7111
7112         * lib/mkdtemp.c, lib/setenv.c, lib/unsetenv.c: Normalize inclusion of
7113         `config.h'.
7114
7115 2006-02-24  Paul Eggert  <eggert@cs.ucla.edu>
7116
7117         * lib/glob.c: Say "invalid" rather than "illegal" in comments.
7118
7119 2006-02-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
7120
7121         Sync from coreutils.
7122         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Require gl_FUNC_LCHMOD and
7123         gl_CHDIR_SAFER.
7124
7125 2006-02-22  Jim Meyering  <jim@meyering.net>
7126
7127         Sync from coreutils.
7128         * m4/chdir-safer.m4: New file.
7129
7130 2006-02-20  Paul Eggert  <eggert@cs.ucla.edu>
7131
7132         * lib/getcwd.c (AT_FDCWD): Work around a bug in Solaris 9 and 10, where
7133         AT_FDCWD exceeds INT_MAX.
7134         * lib/openat.h (AT_FDCWD): Likewise.
7135
7136 2006-02-17  Eric Blake  <address@hidden>
7137
7138         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Fix caching error.
7139
7140 2006-02-16  Simon Josefsson  <jas@extundo.com>
7141
7142         * modules/getaddrinfo (Depends-on): Add sys_socket.
7143
7144 2006-02-15  Simon Josefsson  <jas@extundo.com>
7145
7146         * build-aux/maint.mk: Add dsyntax-check rule.
7147
7148 2006-02-15  Eric Blake  <ebb9@byu.net>
7149
7150         * m4/sys_socket_h.m4 (gl_HEADER_SYS_SOCKET): Don't attempt using
7151         winsock2.h or ws2tcpip.h when sys/socket.h is present. Fixes
7152         'present but cannot compile' warnings on cygwin.
7153         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Use gl_HEADER_SYS_SOCKET.  Don't
7154         use ws2tcpip.h if sys/socket.h works.
7155         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Use gl_HEADER_SYS_SOCKET.
7156         (gl_GETADDRINFO): Don't use ws2tcpip.h when sys/socket.h is present.
7157
7158 2006-02-14  Simon Josefsson  <jas@extundo.com>
7159
7160         * modules/maintainer-makefile (Files): Rename.
7161
7162         * build-aux/GNUmakefile: Rename Makefile.maint to maint.mk
7163         and (the local) Makefile.cfg to maint-cfg.mk.
7164
7165         * build-aux/Makefile.maint, build-aux/maint.mk: Renamed the former
7166         to the latter.
7167
7168         * modules/maintainer-makefile: New module.
7169
7170         * build-aux/Makefile.maint: New file, from GNU CoreUtils, although
7171         severaly stripped to make it possible to build it up from scratch
7172         with reliable tests.
7173
7174         * build-aux/GNUmakefile: New file, from GNU CoreUtils with some
7175         fixes to permit overriding the default actions when configure and
7176         makefile are not available.
7177
7178 2006-02-14  Paul Eggert  <eggert@cs.ucla.edu>
7179
7180         Sync from coreutils.
7181         * modules/lstat (Depends-on): Don't depend on xalloc.
7182         (License): Change from GPL to LGPL, since this is now simply a
7183         replacement for a libc function.
7184
7185 2006-02-14  Jim Meyering  <jim@meyering.net>
7186
7187         Sync from coreutils.
7188
7189         Eliminate the unwelcome (albeit unlikely) possibility of xmalloc
7190         failure on deficient systems, and simplify gnulib lgpl dependencies.
7191         * lib/lstat.c (rpl_lstat): Rewrite to use stat() in place of the
7192         xmalloc/lstat combination.  Based on a patch from Bruno Haible.
7193
7194         * lib/xalloc-die.c: Remove unused definition of N_.
7195
7196 2006-02-14  Jim Meyering  <jim@meyering.net>
7197
7198         Sync from coreutils.
7199         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Invoke
7200         AC_CHECK_FUNCS(getmntent) unconditionally so that tests of
7201         $ac_cv_func_getmntent (e.g., in gl_LIST_MOUNTED_FILE_SYSTEMS) need not
7202         double-quote uses of that variable, to accommodate the rare case in
7203         which getmntent is available in none of the libraries checked.  This
7204         happens at least on FreeBSD 5.0.
7205
7206 2006-02-13  Simon Josefsson  <jas@extundo.com>
7207
7208         * gnulib-tool (Usage): Fix --import, from
7209         karl@freefriends.org (Karl Berry).
7210
7211 2006-02-13  Sergey Poznyakoff  <gray@gnu.org.ua>
7212
7213         * lib/argp-fmtstream.c: Restore another bugfix lost on 2005-12-12
7214
7215 2006-02-07  Sergey Poznyakoff  <gray@gnu.org.ua>
7216
7217         * lib/argp-namefrob.h: Restore changes accidentally lost during the
7218         "autoupdate" on 2005-12-12.
7219
7220 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7221
7222         * modules/closeout (Depends-on): Remove atexit.
7223
7224 2006-02-07  Paul Eggert  <eggert@cs.ucla.edu>
7225
7226         * lib/closeout.c (close_stdout): Don't assume 'bool' converts nonzero
7227         ints to 0 or 1, as this isn't true for the stdbool.h substitute.
7228
7229 2006-02-05  Paul Eggert  <eggert@cs.ucla.edu>
7230
7231         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Don't #define
7232         __EXTENSIONS__ if this causes compilation to fail.  Problem
7233         reported by Nelson H. F. Beebe with Solaris 10 and Sun C 5.7
7234         c89 -D_XOPEN_SOURCE -D_XOPEN_SOURCE_EXTENDED.
7235
7236 2006-01-27  Paul Eggert  <eggert@cs.ucla.edu>
7237
7238         * lib/fnmatch.c (L_): Renamed from L, to work around a bug in
7239         Mac OS X 10.3.9 with GCC 3 reported by Claudio Fontana in
7240         <http://lists.gnu.org/archive/html/bug-gnulib/2006-01/msg00074.html>.
7241         All uses changed.
7242
7243 2006-01-26  Simon Josefsson  <jas@extundo.com>
7244
7245         * lib/socket_.h: Set WINVER to 0x0501, to make sure getaddrinfo
7246         prototype is visible on mingw32.
7247
7248         * lib/getaddrinfo.h: Define EAI_ADDRFAMILY and EAI_SYSTEM if not set,
7249         for mingw32.
7250
7251         * lib/gai_strerror.c, getaddrinfo.h: Protect netdb.h #include (for
7252         mingw32).
7253
7254 2006-01-26  Paul Eggert  <eggert@cs.ucla.edu>
7255
7256         * lib/fts.c (diropen): Open with O_NOCTTY | O_NONBLOCK too.  Don't
7257         attempt to open for write; this always fails, at least on POSIX
7258         hosts.  This reinstates the 2006-01-09 change, which was
7259         inadvertently removed.
7260
7261 2006-01-26  Bruno Haible  <bruno@clisp.org>
7262
7263         * gnulib-tool (func_import): Use "trap 'exit $?' instead of "trap :".
7264         Reported by Paul Eggert.
7265
7266 2006-01-26  Bruno Haible  <bruno@clisp.org>
7267             Paul Eggert  <eggert@cs.ucla.edu>
7268
7269         * lib/stdbool_.h (_Bool)
7270         [(! (defined __cplusplus || defined __BEOS__)
7271           && !defined __GNUC__
7272           && !(defined __HP_cc || defined __xlc__
7273                || (defined __SUNPRO_C && (__SUNPRO_C < 0x550 || __STDC__ == 1))
7274                || defined __sgi))]:
7275         #define to signed char in these cases too; this simplifies
7276         the code (so that we don't have to worry about HP-UX, AIX, SunPRO,
7277         etc., separately) and makes it more conservative.
7278
7279 2006-01-25  Simon Josefsson  <jas@extundo.com>
7280
7281         * m4/getaddrinfo.m4: Look for getaddrinfo inside ws2tcip.h and
7282         -lws2_32.  Protect sys/socket.h and netdb.h #include's.  Include
7283         ws2tcpip.h with WINVER=0x0501.  All for mingw32.
7284
7285 2006-01-25  Sergey Poznyakoff  <gray@gnu.org.ua>
7286
7287         * lib/argp-namefrob.h: Bugfix. Remove stray #
7288
7289 2006-01-25  Paul Eggert  <eggert@cs.ucla.edu>
7290
7291         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for xlc bug if __GCC__ too,
7292         so that we test the test.
7293         Check for yet another HP-UX cc bug involving *bool |= bool.
7294
7295 2006-01-25  Karl Berry  <karl@gnu.org>
7296
7297         * config/srclist.txt (vasnprintf.c): sync lost.
7298
7299 2006-01-25  Jim Meyering  <jim@meyering.net>
7300
7301         Sync from the stable (b5) branch of coreutils:
7302
7303         * lib/fts.c (fts_children): Don't let close() clobber errno from
7304         failed fchdir().
7305
7306         * lib/fts.c (fts_stat): When following a symlink-to-directory,
7307         don't necessarily interpret stat-fails+lstat-succeeds as indicating
7308         a dangling symlink.  That can also happen at least for ELOOP.
7309         The fix: return FTS_SLNONE only when the stat errno is ENOENT.
7310         FYI, this bug predates the inclusion of fts.c in coreutils.
7311
7312         * lib/fts.c (fts_open): Put new maxarglen declaration and uses
7313         in their own block, so pre-c99 compilers don't object.
7314
7315         Avoid the double-free (first in fts_read, second in fts_close) that
7316         would occur when an `active' directory is made inaccessible (e.g.,
7317         via chmod a-x) during a traversal.
7318         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7319         before returning.  Reproduce this failure by
7320         mkdir -p a/b; cd a; chmod a-x . b
7321         Reported by Stavros Passas.
7322
7323 2006-01-25  Jim Meyering  <jim@meyering.net>
7324
7325         * lib/fileblocks.c: Remove more useless parentheses.
7326         * lib/readutmp.h: Likewise.
7327
7328 2006-01-25  Bruno Haible  <bruno@clisp.org>
7329
7330         * lib/stdbool_.h (_Bool) [IRIX cc]: Define as 'signed char', to avoid
7331         warnings.
7332         Reported by Paul Eggert.
7333
7334 2006-01-25  Bruno Haible  <bruno@clisp.org>
7335
7336         * gnulib-tool (func_import): Use "trap :" instead of "trap -" to get
7337         rid of a trap command. For Solaris sh.
7338         Reported by Mark D. Baushke <mdb@gnu.org>.
7339
7340 2006-01-24  Simon Josefsson  <jas@extundo.com>
7341
7342         * lib/socket_.h (SHUT_WR, SHUT_RDWR): Don't hardcode, suggested by
7343         Bruno.
7344
7345 2006-01-24  Karl Berry  <karl@gnu.org>
7346
7347         * config/srclist.txt (argp-namefrob.h): sync lost.
7348
7349 2006-01-24  Jim Meyering  <jim@meyering.net>
7350
7351         * modules/openat (Files): Add lib/intprops.h.
7352         From Mark D. Baushke.
7353
7354 2006-01-24  Jim Meyering  <jim@meyering.net>
7355
7356         * m4/openat.m4 (gl_FUNC_OPENAT): Add AC_LIBSOURCES([intprops.h]).
7357         Reported by Mark D. Baushke.
7358
7359 2006-01-24  Jim Meyering  <jim@meyering.net>
7360
7361         * lib/socket_.h: Remove useless parentheses in uses of cpp `defined'.
7362
7363 2006-01-24  Bruno Haible  <bruno@clisp.org>
7364
7365         * modules/strnlen (Maintainer): Change from glibc to all.
7366
7367 2006-01-24  Bruno Haible  <bruno@clisp.org>
7368
7369         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check for IBM and HP-UX bugs.
7370         Patch by Paul Eggert.
7371
7372 2006-01-24  Bruno Haible  <bruno@clisp.org>
7373
7374         * lib/stdbool_.h (_Bool) [__cplusplus]: Don't define if the compiler
7375         already has it.
7376         Report and patch by Albert Chin-A-Young  <china@thewrittenword.com> on
7377         2005-11-26.
7378
7379         * lib/stdbool_.h (_Bool) [HP-UX cc, AIX cc,xlc]: Define as
7380         'signed char' to avoid problems with the built-in _Bool type.
7381         Reported by Paul Eggert on 2005-11-26.
7382
7383 2006-01-24  Bruno Haible  <bruno@clisp.org>
7384
7385         * gnulib-tool (func_import): Avoid constructing complicated sed
7386         expressions inside backquote.
7387         Report and solution by Mark D. Baushke <mdb@gnu.org>.
7388
7389 2006-01-23  Ulrich Drepper  <drepper@redhat.com>
7390
7391         These changes imported from libc.
7392         * lib/getopt.c: Use __fxprintf instead of inline stream orientation
7393         test and two separate function calls.
7394         * lib/strndup.c (__strndup): Add libc_hidden_def.
7395
7396 2006-01-23  Simon Josefsson  <jas@extundo.com>
7397
7398         * modules/lock-tests: Use check_PROGRAMS instead of noinst_PROGRAMS.
7399         Remove the test_*_SOURCES variable: automake infers it by default.
7400         * modules/tls-tests: Likewise.
7401
7402 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7403
7404         Work around porting bugs reported by Dieter in
7405         <http://lists.gnu.org/archive/html/bug-bison/2006-01/msg00049.html>.
7406         * lib/getopt.c (_NOPROTO): Remove; no longer needed.
7407         Include <stdlib.h> and <unistd.h> in all environments; it's safe now.
7408         Include "getopt.h" first, to check interface.
7409         (getenv): Declare only if defined HAVE_DECL_GETENV &&
7410         !HAVE_DECL_GETENV.
7411         * lib/strndup.c [!_LIBC]: Include "strndup.h" to get prototype.
7412         (__strndup): Revert to K&R-style function dfns, the glibc style.
7413         * lib/strnlen.c: Don't claim it's taken from glibc; it's not.
7414         (strnlen, __strnlen): Remove #defines and #undefs; not needed.
7415         Include strnlen.h first, to get prototype properly.
7416         (strnlen): Renamed from __strnlen.
7417         Remove weak alias.
7418
7419 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7420
7421         * m4/getopt.m4 (gl_PREREQ_GETOPT): Check for getenv decl.
7422
7423 2006-01-23  Paul Eggert  <eggert@cs.ucla.edu>
7424
7425         * config/srclist.txt: Adjust to reflect glibc reorganization.
7426         This affects only comments.
7427
7428 2006-01-22  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
7429
7430          * gnulib-tool, build-aux/csharpcomp.sh.in: Do not pass `-q' to mktemp.
7431          Reported by Bruce Korb <bkorb@gnu.org>.
7432
7433 2006-01-22  Paul Eggert  <eggert@cs.ucla.edu>
7434
7435         * lib/quotearg.c (quotearg_buffer_restyled): Add "default: break;"
7436         to pacify gcc -Wswitch-default.
7437
7438 2006-01-22  Bruno Haible  <bruno@clisp.org>
7439
7440         * lib/vasnprintf.c (VASNPRINTF): In the computation of the size of the
7441         temporary buffer for sprintf, take into account the precision also
7442         for 'd', 'i', 'u', 'o', 'x', 'X'.
7443
7444 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7445
7446         * modules/argp-tests: New module
7447         * tests/test-argp.c: New file
7448         * tests/test-argp-2.sh: New file
7449
7450 2006-01-21  Sergey Poznyakoff  <gray@gnu.org.ua>
7451
7452         * lib/argp-help.c (usage_long_opt): Do not print DOC options.
7453         (__argp_base_name): Removed
7454         * lib/argp-namefrob.h (__argp_basename): Removed definition. Was a
7455         typo.
7456         (__argp_base_name): Provide macro definition or extern declaration
7457         depending on the configuration
7458
7459 2006-01-20  Simon Josefsson  <jas@extundo.com>
7460
7461         * modules/inet_ntop (Depends-on): Depend on sys_socket.
7462
7463 2006-01-20  Simon Josefsson  <jas@extundo.com>
7464
7465         * lib/inet_ntop.h: Unconditionally include sys/socket.h.
7466
7467 2006-01-20  Paul Eggert  <eggert@cs.ucla.edu>
7468
7469         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Use -Wl,-z,ignore
7470         rather than -Xlinker -z -Xlinker ignore, as it's more portable.
7471         Suggested by Bruno Haible.
7472
7473 2006-01-20  Karl Berry  <karl@gnu.org>
7474
7475         * config/srclist.txt (argp-fmtstream.h, localcharset.c): comment out
7476         until changes propagate, I guess.
7477
7478 2006-01-19  Simon Josefsson  <jas@extundo.com>
7479
7480         * m4/socklen.m4: Look in ws2tcpip.h too, for mingw32.
7481
7482 2006-01-19  Simon Josefsson  <jas@extundo.com>
7483
7484         * lib/socket_.h: Map SHUT_RD, SHUT_WR, SHUT_RDWR correctly.
7485
7486 2006-01-19  Simon Josefsson  <jas@extundo.com>
7487
7488         * gnulib-tool: Set check_PROGRAMS.
7489
7490         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7491         modules/des-tests, modules/gc-arcfour-tests,
7492         modules/gc-arctwo-tests, modules/gc-des-tests,
7493         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7494         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7495         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7496         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7497         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7498         modules/md5-tests, modules/readline, modules/rijndael-tests: Use
7499         check_PROGRAMS instead of noinst_PROGRAMS to be able to remove
7500         test_*_SOURCES.
7501
7502 2006-01-18  Simon Josefsson  <jas@extundo.com>
7503
7504         * modules/socklen (Depends-on): Depend on sys_socket.
7505
7506 2006-01-18  Simon Josefsson  <jas@extundo.com>
7507
7508         * modules/arcfour-tests, modules/arctwo-tests, modules/crc-tests,
7509         modules/des-tests, modules/gc-arcfour-tests,
7510         modules/gc-arctwo-tests, modules/gc-des-tests,
7511         modules/gc-hmac-md5-tests, modules/gc-hmac-sha1-tests,
7512         modules/gc-md2-tests, modules/gc-md4-tests, modules/gc-md5-tests,
7513         modules/gc-pbkdf2-sha1-tests, modules/gc-rijndael-tests,
7514         modules/gc-sha1-tests, modules/gc-tests, modules/hmac-md5-tests,
7515         modules/hmac-sha1-tests, modules/md2-tests, modules/md4-tests,
7516         modules/md5-tests, modules/readline, modules/rijndael-tests: Add
7517         $(EXEEXT) to automake TESTS variable, for mingw32.
7518
7519 2006-01-17  Simon Josefsson  <jas@extundo.com>
7520
7521         * modules/socklen (Include): Need sys/socket.h.
7522
7523 2006-01-17  Bruno Haible  <bruno@clisp.org>
7524
7525         * modules/ssize_t (Include): Add <sys/types.h>.
7526
7527 2006-01-16  Paul Eggert  <eggert@cs.ucla.edu>
7528
7529         * m4/lib-ignore.m4 (gl_IGNORE_UNUSED_LIBRARIES): Don't use ldd, as
7530         it's not portable and it doesn't work with cross-compiles.
7531         Problem reported by Bruno Haible.  Fix missing-$ typo in
7532         'test "gl_cv_ignore_unused_libraries" ...' that prevented
7533         -zignore from being used with Sun's C compiler.
7534
7535 2006-01-12  Simon Josefsson  <jas@extundo.com>
7536
7537         * lib/base64.c: Fix warning, reported by Bruno Haible
7538         <bruno@clisp.org> and patch by Paul Eggert <eggert@CS.UCLA.EDU>.
7539
7540 2006-01-12  Bruno Haible  <bruno@clisp.org>
7541
7542         * modules/ldd: New file.
7543         * build-aux/ldd.sh.in: New file.
7544         * MODULES.html.sh (Support for building libraries and executables): Add
7545         ldd.
7546
7547 2006-01-12  Bruno Haible  <bruno@clisp.org>
7548
7549         * m4/ldd.m4: New file.
7550
7551 2006-01-12  Bruno Haible  <bruno@clisp.org>
7552
7553         * gnulib-tool (func_import, func_create_testdir): Don't go into an
7554         endless loop while replacing $auxdir with build-aux.
7555
7556 2006-01-11  Simon Josefsson  <jas@extundo.com>
7557
7558         * lib/stdint_.h (SIZE_MAX): Add missing (.
7559
7560 2006-01-11  Paul Eggert  <eggert@cs.ucla.edu>
7561
7562         Sync from coreutils.
7563         * lib/md5.c: Fix commentary typos.
7564         (alignof, UNALIGNED_P): No need for a GCC-specific version.
7565         * lib/md5.h (__attribute__): Remove; unused.
7566         * lib/sha1.c: Fix commentary to match md5 better.
7567         * lib/sha1.h (struct sha1_ctx): Use a word buffer, not a byte buffer,
7568         so that we don't need to worry about alignment.  All uses changed.
7569         This merges the 2005-10-28 md5 change into sha1.
7570
7571 2006-01-11  Jim Meyering  <jim@meyering.net>
7572
7573         Sync from coreutils.
7574         * lib/md5.c (OP): Fix spacing.
7575
7576 2006-01-11  Bruno Haible  <bruno@clisp.org>
7577
7578         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7579         * m4/lock.m4 (gl_LOCK_BODY): Renamed from gl_LOCK.
7580         (gl_LOCK): New macro, requiring gl_LOCK_BODY.
7581
7582 2006-01-11  Bruno Haible  <bruno@clisp.org>
7583
7584         Ensure automatic ordering between gl_LOCK and gl_ARGP.
7585         * gnulib-tool (func_import, func_create_testdir): Put gl_LOCK into
7586         the "early" section as well.
7587
7588 2006-01-11  Bruno Haible  <bruno@clisp.org>
7589
7590         Avoid "ar: no archive members specified" error on MacOS X.
7591         * gnulib-tool (func_modules_add_dummy): New function.
7592         (func_import, func_create_testdir): Invoke it.
7593
7594 2006-01-11  Bruno Haible  <bruno@clisp.org>
7595
7596         * gnulib-tool (func_import, func_create_testdir): Replace build-aux
7597         with $auxdir in AC_CONFIG_FILES statements.
7598
7599 2006-01-11  Bruno Haible  <bruno@clisp.org>
7600
7601         * gnulib-tool (func_emit_lib_Makefile_am, func_emit_tests_Makefile_am):
7602         Initialize also noinst_HEADERS to empty.
7603
7604 2006-01-11  Bruno Haible  <bruno@clisp.org>
7605
7606         * gnulib-tool (AUTOMAKEPATH, AUTOCONF, ACLOCAL, AUTOMAKE): New
7607         variables.
7608         (func_create_megatestdir): Call aclocal, autoconf, automake here, not
7609         autoreconf.
7610
7611 2006-01-11  Bruno Haible  <bruno@clisp.org>
7612
7613         * gnulib-tool (AUTOCONF, ACLOCAL, AUTOMAKE, AUTORECONF): Make
7614         overridable by the user.
7615         Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
7616
7617 2006-01-10  Simon Josefsson  <jas@extundo.com>
7618
7619         * modules/sys_socket: New file.
7620
7621 2006-01-10  Simon Josefsson  <jas@extundo.com>
7622
7623         * m4/sys_socket_h.m4: New file.
7624
7625 2006-01-10  Simon Josefsson  <jas@extundo.com>
7626
7627         * lib/socket_.h: New file.
7628
7629 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7630
7631         * modules/readutmp (Maintainer): Add myself.
7632
7633 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7634
7635         * m4/memcoll.m4 (gl_MEMCOLL): Don't require AC_FUNC_MEMCMP, undoing
7636         the 2002-12-31 change.  Problem and fix reported by Bruno Haible.
7637         People who are still concerned with buggy memcmp implementations
7638         can invoke gl_FUNC_MEMCMP themselves.
7639
7640 2006-01-10  Paul Eggert  <eggert@cs.ucla.edu>
7641
7642         * lib/regex_internal.h (BITSET_WORD_BITS):
7643         Work around a bug in 64-bit PGC (before version 6.1-2), where the
7644         preprocessor mishandles large unsigned values as if they were signed.
7645         Problem reported by Claudio Fontana in
7646         <http://lists.gnu.org/archive/html/bug-gnulib/2005-12/msg00061.html>.
7647
7648 2006-01-10  Jim Meyering  <jim@meyering.net>
7649
7650         Avoid the double-free (first in fts_read, second in fts_close) that
7651         would occur when an `active' directory is made inaccessible (e.g.,
7652         via chmod a-x) during a traversal.
7653         * lib/fts.c (fts_read): After a failed fchdir, update sp->fts_cur
7654         before returning.  Reproduce this failure by
7655         mkdir -p a/b; cd a; chmod a-x . b
7656         Reported by Stavros Passas.
7657
7658         Sync from coreutils.
7659         * lib/sha1.c: Tweak grammar in a comment.
7660
7661 2006-01-10  Jim Meyering  <jim@meyering.net>
7662
7663         * m4/fpending.m4: Also include <stdio.h>, for Dragonfly.
7664         Patch by Joerg Sonnenberger.
7665
7666 2006-01-10  Bruno Haible  <bruno@clisp.org>
7667
7668         * modules/readutmp: Depend on module free.
7669         * modules/strtok_r: Depend on module restrict.
7670
7671 2006-01-10  Bruno Haible  <bruno@clisp.org>
7672
7673         * modules/gettext (configure.ac): Add an invocation of
7674         AM_GNU_GETTEXT_VERSION. Needed since autoreconf is used by gnulib-tool.
7675
7676 2006-01-10  Bruno Haible  <bruno@clisp.org>
7677
7678         * m4/localcharset.m4 (gl_LOCALCHARSET): Also test for getc_unlocked.
7679         Reported by Werner Lemberg <wl@gnu.org>.
7680
7681 2006-01-10  Bruno Haible  <bruno@clisp.org>
7682
7683         * lib/localcharset.c: Update from GNU gettext.
7684
7685 2006-01-10  Bruno Haible  <bruno@clisp.org>
7686
7687         * lib/argp.h (__const): Remove macro. Use const instead.
7688         * lib/argp-fmtstream.h (__const): Likewise.
7689         * lib/glob_.h (__const): Remove macro.
7690         * lib/glob-libc.h: Use const instead of __const.
7691
7692 2006-01-10  Bruno Haible  <bruno@clisp.org>
7693
7694         * gnulib-tool (func_emit_tests_Makefile_am): Emit an empty SUBDIR
7695         variable.
7696         Needed to avoid an automake error regarding the 'gettext' module.
7697
7698 2006-01-09  Simon Josefsson  <jas@extundo.com>
7699
7700         * modules/inet_ntop (Depends-on): Add restrict.
7701
7702 2006-01-09  Simon Josefsson  <jas@extundo.com>
7703
7704         * modules/gc-rijndael-tests (License): Put under LGPL.
7705
7706         * modules/gc-des-tests (License): Likewise.
7707
7708         * modules/gc-arcfour-tests (License): Likewise.
7709
7710         * modules/gc-arctwo-tests (License): Likewise.
7711
7712         * modules/gc-pbkdf2-sha1-tests (License): Likewise.
7713
7714         * modules/gc-hmac-sha1-tests (Files): Likewise.
7715
7716         * modules/gc-hmac-md5-tests (License): Likewise.
7717
7718         * modules/gc-sha1-tests (License): Likewise.
7719
7720         * modules/gc-md5-tests (License): Likewise.
7721
7722         * modules/gc-md4-tests (License): Likewise.
7723
7724         * modules/gc-md2-tests (License): Likewise.
7725
7726         * modules/gc-tests (License): Likewise.
7727
7728         * modules/des-tests (License): Likewise.
7729
7730         * modules/md4-tests (License): Likewise.
7731
7732         * modules/md2-tests (License): Likewise.
7733
7734 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7735
7736         Sync from coreutils:
7737
7738         * MODULES.html.sh (build_lib): New section, with new lib-ignore module.
7739         * modules/lib-ignore: New file.
7740         * modules/mkdir-p (Files): Add chdir-safer.c, chdir-safer.h, lchmod.h,
7741         chdir-safer.m4, lchmod.m4.
7742         * modules/openat: Add mkdirat.c, openat-priv.h.
7743
7744 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7745
7746         Sync from coreutils.
7747         * m4/lib-ignore.m4: New file.
7748         * m4/lchmod.m4: New file.
7749
7750 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7751
7752         Sync from coreutils.
7753         * lib/chdir-long.c (cdb_free): Don't bother trying to open directory
7754         for write access: POSIX says that must fail.
7755         * lib/fts.c (diropen): Likewise.
7756         * lib/save-cwd.c (save_cwd): Likewise.
7757         * lib/chdir-long.c (cdb_free): Open with O_NOCTTY | O_NONBLOCK as
7758         well, for minor improvements on hosts that lack O_DIRECTORY.
7759         * lib/chown.c (rpl_chown) [CHOWN_MODIFIES_SYMLINK]:
7760         Don't try O_WRONLY unless O_RDONLY failed wth EACCES.
7761         Fall back on chown if open failed with EACCES.
7762
7763         * lib/gettime.c (gettime) [!defined OK_TO_USE_1S_CLOCK]:
7764         Report an error at compile-time if only a 1-second nominal clock
7765         resolution is found.
7766
7767         * lib/lchmod.h: New file.
7768         * lib/mkdir-p.c: Include lchmod.h, lchown.h.
7769         (make_dir_parents): Use lchown rather than chown, and
7770         lchmod rather than chmod.
7771
7772         * lib/mountlist.c (ME_DUMMY): "none" and "proc" file systems are
7773         dummies too.  Problem with "none" reported by Bob Proulx.  Problem with
7774         "proc" reported by n0dalus.
7775
7776         * lib/mountlist.c: Include <limits.h>.
7777         (dev_from_mount_options)
7778         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]:
7779         New function.  It no longer assumes "dev=" has the System V meaning
7780         on Linux (since it doesn't).  It also parses "dev=" more carefully.
7781         (read_file_system_list)
7782         [defined MOUNTED_GETMNTENT1 || defined MOUNTED_GETMNTENT2]: Use it.
7783         MOUNTED_GETMNTENT2 is new here; the code didn't used to look for
7784         dev= in that case.
7785
7786         * lib/posixtm.h (PDS_PRE_2000): New macro.
7787         * lib/posixtm.c (year): Arg is now syntax_bits rather than
7788         allow_century.  All usages changed.  Reject dates outside the range
7789         1969-1999 if PDS_PRE_2000 is used.
7790
7791 2006-01-09  Paul Eggert  <eggert@cs.ucla.edu>
7792
7793         Sync from coreutils.
7794         * doc/getdate.texi (General date syntax): Invalid dates are rejected.
7795         (Time of day items): Mention the possibility of leap seconds.
7796         Problem reported by Dr. David Alan Gilbert.
7797
7798 2006-01-09  Jim Meyering  <jim@meyering.net>
7799
7800         Sync from coreutils.
7801
7802         * lib/version-etc.c (COPYRIGHT_YEAR): Update to 2006.
7803
7804         * lib/chdir-safer.h, lib/chdir-safer.c: New files.
7805
7806         * lib/modechange.c (mode_compile): Reject an invalid mode string
7807         that starts with an octal digit.  From Andreas Gruenbacher.
7808
7809         * lib/openat.c: Include "fcntl--.h" and "unistd--.h", to map open
7810         and dup to open_safer and dup_safer, respectively.
7811         (openat_permissive): Fix typo in comment.
7812
7813         * lib/openat.c: Don't include <stdlib.h>, <unistd.h>, <fcntl.h>,
7814         "gettext.h"; either no longer needed or are guaranteed by openat.h.
7815         (_): Remove; no longer needed.
7816         (openat): Renamed from rpl_openat; no need for rpl_openat
7817         since openat.h renames openat for us.
7818         Replace most of the body with a call to openat_permissive,
7819         to avoid duplicate code.
7820         Port to (probably hypothetical) environments were mode_t is
7821         wider than int.
7822         (openat_permissive): Require mode arg, so that we can check
7823         types better.  Put it just after flags.  Change cwd failure
7824         indicator from pointer-to-bool to pointer-to-errno-value.
7825         All callers changed.
7826         Invoke openat_save_fail and/or openat_restore_fail if
7827         cwd_errno is null, so that openat can call us.
7828         (openat_permissive, fdopendir, fstatat, unlinkat):
7829         Simplify errno handling to avoid some duplicate code,
7830         as it's OK to set errno on success.
7831         * lib/openat.h: Revamp code so that function macros depend on
7832         __OPENAT_PREFIX only, not also on AT_FDCWD.
7833         (openat_ro): Remove.  Caller changed to use openat_permissive.
7834         (openat_permissive): Now a macro, if not a function.
7835         (openat_restore_fail, openat_save_fail): Now always functions,
7836         since mkdirat needs them even if __OPENAT_PREFIX is defined.
7837
7838         * lib/openat-priv.h: New file, defining macros used by mkdirat.c
7839         and openat.c.
7840         * lib/mkdirat.c: Include openat-priv.h.
7841         Remove definitions of macros defined therein.
7842         * lib/openat.c: Likewise.
7843
7844         * lib/mkdirat.c (mkdirat): New file and function.
7845         * lib/openat.h (mkdirat): Declare.
7846
7847         * lib/openat.c (fdopendir): Don't change errno when returning non-NULL.
7848
7849         * lib/openat.h (openat_permissive): Declare.
7850         (openat_ro): Define.
7851
7852         * lib/openat.c (EXPECTED_ERRNO): New macro.
7853         (openat_permissive): New function -- used in remove.c rewrite.
7854         (all functions): Set errno just before returning, only if there
7855         was an actual failure.
7856         Use EXPECTED_ERRNO rather than comparing against only ENOTDIR.
7857
7858         Emulate openat-family functions using Linux's procfs, if possible.
7859         Idea and some code based on Ulrich Drepper's glibc changes.
7860
7861         * lib/openat.c: (BUILD_PROC_NAME): New macro.
7862         Include <stdio.h>, <string.h>, "alloca.h" and "intprops.h".
7863         (rpl_openat): Emulate by trying to open /proc/self/fd/%d/%s,
7864         before falling back on save_cwd and restore_cwd.
7865         (fdopendir, fstatat, unlinkat): Likewise.
7866
7867         * lib/openat.c (fstatat, unlinkat): Perform the syscall directly,
7868         skipping the save_cwd...restore_cwd overhead, if FILE is absolute.
7869
7870         * lib/openat.c (rpl_openat): Use the promoted type (int), not mode_t,
7871         as second argument to va_arg.  Otherwise, some versions of gcc
7872         warn that `if this code is reached, the program will abort'.
7873
7874 2006-01-09  Jim Meyering  <jim@meyering.net>
7875
7876         Sync from coreutils.
7877         * m4/openat.m4 (gl_FUNC_OPENAT): Require and compile mkdirat.c.
7878         Require openat-priv.h.
7879
7880 2006-01-09  Bruno Haible  <bruno@clisp.org>
7881
7882         * modules/strnlen (Include): Use strnlen.h.
7883
7884 2006-01-09  Bruno Haible  <bruno@clisp.org>
7885
7886         * m4/stdint.m4 (gl_STDINT_H): Also test for <sys/bitypes.h>.
7887
7888 2006-01-09  Bruno Haible  <bruno@clisp.org>
7889
7890         * lib/sysexit_.h (EX_OK): New macro.
7891         Suggested by Martin Lambers <marlam@marlam.de>.
7892
7893 2006-01-09  Bruno Haible  <bruno@clisp.org>
7894
7895         * lib/stdint_.h: On Linux libc4 and libc5, include <sys/bitypes.h> and
7896         don't define _STDINT_H_NEED_SIGNED_INT_TYPES.
7897
7898 2006-01-09  Bruno Haible  <bruno@clisp.org>
7899
7900         * lib/stdint_.h (SIZE_MAX): Write the value without involving negative
7901         numbers.
7902
7903 2006-01-09  Bruno Haible  <bruno@clisp.org>
7904
7905         * lib/javacomp.sh.in: Move to ../build-aux/javacomp.sh.in.
7906         * lib/javaexec.sh.in: Move to ../build-aux/javaexec.sh.in.
7907         * lib/csharpcomp.sh.in: Move to ../build-aux/csharpcomp.sh.in.
7908         * lib/csharpexec.sh.in: Move to ../build-aux/csharpexec.sh.in.
7909
7910 2006-01-09  Bruno Haible  <bruno@clisp.org>
7911
7912         * build-aux/javacomp.sh.in: New file, moved from lib/.
7913         * modules/javacomp-script (Files): Update.
7914         (configure.ac): Add AC_CONFIG_FILES invocation.
7915         (EXTRA_DIST): Remove variable.
7916
7917         * build-aux/javaexec.sh.in: New file, moved from lib/.
7918         * modules/javaexec (Files): Update.
7919         (configure.ac): Add AC_CONFIG_FILES invocation.
7920         (EXTRA_DIST): Remove javaexec.sh.in.
7921
7922         * build-aux/csharpcomp.sh.in: New file, moved from lib/.
7923         * modules/csharpcomp-script (Files): Update.
7924         (configure.ac): Add AC_CONFIG_FILES invocation.
7925         (EXTRA_DIST): Remove variable.
7926
7927         * build-aux/csharpexec.sh.in: New file, moved from lib/.
7928         * modules/csharpexec (Files): Update.
7929         (configure.ac): Add AC_CONFIG_FILES invocation.
7930         (EXTRA_DIST): Remove csharpexec.sh.in.
7931
7932 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7933
7934         Sync from coreutils.
7935
7936         Add POSIX ACL support
7937         * lib/acl.h (copy_acl, set_acl): Add declarations.
7938         * lib/acl.c (acl_entries): Add fallback implementation for POSIX ACL
7939         systems other than Linux.
7940         (chmod_or_fchmod): New function: use fchmod when possible,
7941         and chmod otherwise.
7942         (file_has_acl): Add a POSIX ACL implementation, with a
7943         Linux-specific subcase.
7944         (copy_acl): Add: copy an acl and S_ISUID, S_ISGID, and
7945         S_ISVTX from one file to another.  Fall back to fchmod/chmod when
7946         acls are unsupported.
7947         (set_acl): Add: set a file's acl and S_ISUID, S_ISGID, and
7948         S_ISVTX to a defined value.  Fall back to fchmod/chmod when acls
7949         are unsupported.
7950
7951 2006-01-09  Andreas Gruenbacher  <agruen@suse.de>
7952
7953         Sync from coreutils.
7954         * m4/acl.m4 (AC_FUNC_ACL): Add POSIX ACL and Linux-specific acl tests.
7955
7956 2006-01-07  Bruno Haible  <bruno@clisp.org>
7957
7958         * gnulib-tool (func_import): Add an AC_PROG_RANLIB dependency to
7959         gl_EARLY.
7960
7961 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7962
7963         * lib/strftime.c (tzname): Don't declare if it is already #defined.
7964         Problem reported for Mingw by Mark Junker.
7965
7966 2006-01-04  Paul Eggert  <eggert@cs.ucla.edu>
7967
7968         * README: Gnulib normally doesn't generate a tarball.
7969
7970 2006-01-03  Paul Eggert  <eggert@cs.ucla.edu>
7971
7972         * lib/xtime.h (xtime_make, xtime_nonnegative_nsec, xtime_nsec): Use
7973         long int, not int, for nanosecond counts, so that people who are
7974         used to POSIX struct timespec won't be surprised.  Reported by Jim
7975         Meyering.
7976
7977 2005-12-28  Bruno Haible  <bruno@clisp.org>
7978
7979         * build-aux/config.rpath: Update from GNU gettext.
7980
7981 2005-12-16  Jim Meyering  <jim@meyering.net>
7982
7983         * modules/fprintftime: New module.
7984         * MODULES.html.sh (Date and time <time.h>): Add fprintftime.
7985
7986 2005-12-16  Jim Meyering  <jim@meyering.net>
7987
7988         * m4/fprintftime.m4: New file.
7989
7990 2005-12-16  Jim Meyering  <jim@meyering.net>
7991
7992         * lib/fprintftime.c, lib/fprintftime.h: New files.
7993
7994 2005-12-15  Simon Josefsson  <jas@extundo.com>
7995
7996         * modules/socklen (configure.ac): Fix M4 macro name, to align with
7997         new m4/socklen.m4.
7998
7999 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8000
8001         * m4/argp.m4: Define HAVE_DECL_PROGRAM_INVOCATION_NAME and
8002         HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME
8003
8004 2005-12-10  Sergey Poznyakoff  <gray@gnu.org.ua>
8005
8006         * lib/argp-fmtstream.c (__argp_fmtstream_update): Fix coredump
8007         * lib/argp-help.c (fill_in_uparams): Check if the constructed
8008         struct uparams is valid. Fall back to the default values if it is
8009         not.
8010
8011 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8012
8013         * modules/argp (Files): Add argp-pin.c
8014         (Depends-on): dirname
8015         (lib_SOURCES): Add argp-pin.c
8016
8017 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8018
8019         * m4/argp.m4:  Check if program_invocation_name and
8020         program_invocation_short_name are declared and define appropriate
8021         macros if they are not.
8022
8023 2005-12-09  Sergey Poznyakoff  <gray@gnu.org.ua>
8024
8025         * lib/argp-help.c (__argp_base_name): New function
8026         (__argp_short_program_name): Rewrite using __argp_base_name
8027         * lib/argp-namefrob.h: Define program_invocation_name and
8028         program_invocation_short_name if requested
8029         (__argp_base_name): Add prototype
8030         * lib/argp-parse.c (argp_def): Use gettext wrappers
8031         (argp_default_parser): Use __argp_base_name
8032         * lib/argp-pin.c: New file. Defines program_invocation_name and
8033         program_invocation_short_name on systems that lack them.
8034
8035 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8036
8037         * m4/stat-time.m4 (gl_STAT_TIME): Add check for
8038         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8039         porting problem reported by Georg Schwarz in
8040         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8041
8042 2005-12-07  Paul Eggert  <eggert@cs.ucla.edu>
8043
8044         * lib/stat-time.h (STATE_TIMESPEC, STAT_TIMESPEC_NS): Add check for
8045         TYPEOF_STRUCT_STAT_ST_ATIM_IS_STRUCT_TIMESPEC, to fix IRIX 5.3
8046         porting problem reported by Georg Schwarz in
8047         <http://lists.gnu.org/archive/html/bug-coreutils/2005-12/msg00083.html>.
8048
8049 2005-12-05  Bruno Haible  <bruno@clisp.org>
8050
8051         * lib/csharpcomp.sh.in (options_csc): For -l option, add a .dll suffix.
8052         * lib/csharpcomp.c (compile_csharp_using_sscli): Likewise.
8053         Reported by Mark Junker <mjscod@gmx.de>.
8054
8055 2005-12-02  Paul Eggert  <eggert@cs.ucla.edu>
8056
8057         * m4/socklen.m4 (gl_TYPE_SOCKLEN_T): Renamed from gl_SOCKLEN_T.
8058         Use implementation from Albert Chin, with some
8059         comments/corrections by Stepan Kasal and myself.
8060
8061 2005-12-02  Bruno Haible  <bruno@clisp.org>
8062
8063         * gnulib-tool (func_import): Accept GPLed build tool modules when
8064         --lgpl is given.
8065         * modules/csharpcomp-script: New file.
8066         * modules/csharpcomp: Depend on it.
8067         * modules/javacomp-script: New file.
8068         * modules/javacomp: Depend on it.
8069         Suggested by Simon Josefsson.
8070
8071 2005-12-01  Paul Eggert  <eggert@cs.ucla.edu>
8072
8073         * m4/regex.m4 (gl_REGEX): Check whether off_t can be used in a switch
8074         statement, to work around an HP-UX 10.20 compiler bug reported by
8075         Peter O'Gorman.
8076
8077 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8078
8079         * modules/savedir (Depends-on): Add openat.
8080
8081 2005-11-29  Paul Eggert  <eggert@cs.ucla.edu>
8082
8083         * lib/stdint_.h (intmax_t) [defined intmax_t]: Do not declare.
8084         (uintmax_t) [defined uintmax_t]: Do not declare.
8085         (SIZE_MAX) [defined SIZE_MAX]: Do not define.
8086         This works around a problem if intmax_t.m4 and/or uintmax_t.m4
8087         and/or size_max.m4 are also used.  Problem reported by Mark D. Baushke.
8088         (SIZE_MAX): Define to ((size_t) -1), not (~(size_t)0), for the
8089         sake of portability to weird hosts that C allows (though we don't
8090         know of any practical examples).
8091
8092         * lib/savedir.h (fdsavedir): New decl.
8093         * lib/savedir.c (fdsavedir, savedirstream): New functions; the latter
8094         contains most of the former guts of savedir.
8095         (savedir): Use savedirstream.
8096         Include "openat.h".
8097
8098 2005-11-25  Paul Eggert  <eggert@cs.ucla.edu>
8099
8100         * modules/obstack (Files): Add m4/ulonglong.m4.
8101         Problem reported by Davide Angelocola.
8102
8103 2005-11-15  Paul Eggert  <eggert@cs.ucla.edu>
8104
8105         * lib/xstrtod.c: Don't bother with #pragma STDC FENV_ACCESS ON, as
8106         coreutils no longer futzes with rounding modes.
8107
8108 2005-11-14  Jim Meyering  <jim@meyering.net>
8109
8110         * lib/mkstemp-safer.c: Include <config.h>, required for possible
8111         replacement of mkstemp.
8112
8113 2005-11-10  Simon Josefsson  <jas@extundo.com>
8114
8115         * lib/readline.c: Remove EOL.
8116
8117 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8118
8119         * modules/gethrxtime (Depends-on): Add gettime.
8120
8121 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8122
8123         * m4/gethrxtime.m4 (gl_PREREQ_GETHRXTIME): Don't require AC_HEADER_TIME
8124         or gettimeofday; no longer needed.
8125
8126 2005-11-10  Paul Eggert  <eggert@cs.ucla.edu>
8127
8128         * lib/gethrxtime.c: Include "timespec.h" rather than the sys/time /
8129         time business.
8130         (gethrxtime) [! (HAVE_NANOUPTIME
8131         || (defined CLOCK_MONOTONIC && HAVE_CLOCK_GETTIME)
8132         || HAVE_MICROUPTIME)]: Fall back on gettime rather than rolling
8133         our own approximation.
8134
8135 2005-11-08  Eric Blake  <ebb9@byu.net>
8136
8137         * lib/inet_ntop.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8138
8139 2005-11-08  Eric Blake  <ebb9@byu.net>
8140
8141         * lib/getaddrinfo.h: Use #if !, not #ifndef, for AC_CHECK_DECLS.
8142
8143 2005-11-04  Bruno Haible  <bruno@clisp.org>
8144
8145         * gnulib-tool: Implement --update mode.
8146
8147 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8148
8149         Fix porting problem reported by Theodoros V. Kalamatianos.
8150         * lib/utimens.c (futimens) [HAVE_WORKING_UTIMES && HAVE_FUTIMES]:
8151         Don't assume that futimes failing means we must fail.
8152
8153 2005-10-30  Paul Eggert  <eggert@cs.ucla.edu>
8154
8155         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Revamp wording and local
8156         variables to suggest the intended function of the PATH_MAX check.
8157
8158 2005-10-30  Kean Johnston  <jkj@sco.com>
8159
8160         Trivial changes to support SCO systems.
8161         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Check for MAXPATHLEN as well
8162         as PATH_MAX.
8163         * m4/fpending.m4 (gl_FUNC_FPENDING): Correct check for SCO systems,
8164         where __ptr is null when no I/O is pending.
8165
8166 2005-10-29  Paul Eggert  <eggert@cs.ucla.edu>
8167
8168         * lib/getcwd.c (__getcwd): Don't assume that system calls after readdir
8169         leave errno alone.  Problem reported by Dmitry V. Levin.
8170
8171 2005-10-28  Simon Josefsson  <jas@extundo.com>
8172
8173         * tests/test-gc-md4.c, tests/test-gc-md5.c, tests/test-gc-sha1.c:
8174         Test more.
8175
8176         * tests/test-gc-md2.c, tests/test-md2.c: New files.
8177
8178         * modules/md2, modules/md2-tests: New files.
8179
8180 2005-10-28  Simon Josefsson  <jas@extundo.com>
8181
8182         * m4/inet_ntop.m4: More tests.
8183
8184         * m4/gc-md2.m4, md2.m4: New file.
8185
8186 2005-10-28  Simon Josefsson  <jas@extundo.com>
8187
8188         * lib/inet_ntop.h, inet_ntop.c: Make it work under mingw32: Add
8189         "restrict" keywords, as per POSIX.  Protect the function
8190         declaration around HAVE_DECL_INET_NTOP rather than HAVE_INET_NTOP.
8191         Don't use K&R prototypes.  Check the sprintf return values.
8192         Re-define EAFNOSUPPORT if not present.  Indent.
8193
8194         * lib/md5.h, md5.c: Simplify buffer handling visavi alignment,
8195         suggested by Bruno Haible <bruno@clisp.org>.
8196
8197         * lib/gc-gnulib.c, gc-libgcrypt.c: Check calloc return value.
8198
8199         * lib/gc.h: Add MD2 and RMD160 length defines.  Add prototypes.
8200
8201         * lib/gc-libgcrypt.c: Add MD2 (which is not available through
8202         libgcrypt).
8203
8204         * lib/gc-gnulib.c: Add MD2.  Implement gc_hash_* API.
8205
8206         * lib/md2.h, lib/md2.c: New files.
8207
8208 2005-10-28  Paul Eggert  <eggert@cs.ucla.edu>
8209
8210         * lib/savedir.c (savedir): Don't assume that xrealloc etc. leave
8211         errno alone.  Problem reported by Frederic Jolliton.
8212
8213 2005-10-27  Paul Eggert  <eggert@cs.ucla.edu>
8214
8215         * modules/verify (License): Change from GPL to LGPL.  This is a
8216         tiny module and there are apparently near-equivalents that are
8217         under the BSD license.
8218
8219 2005-10-24  Simon Josefsson  <jas@extundo.com>
8220
8221         * modules/sha1: Relicense to LGPL.
8222
8223 2005-10-24  Simon Josefsson  <jas@extundo.com>
8224
8225         * lib/md4.h: Shrink buffer size, now that we changed the type.
8226
8227 2005-10-23  Simon Josefsson  <jas@extundo.com>
8228
8229         * gnulib-tool (func_import): Fix --tests-base.
8230
8231 2005-10-22  Simon Josefsson  <jas@extundo.com>
8232
8233         * modules/arcfour (Depends-on): Need stdint.
8234
8235 2005-10-22  Simon Josefsson  <jas@extundo.com>
8236
8237         * m4/gc.m4: Don't be fooled by --disable-*random-device parameters,
8238         suggested by Bruno Haible <bruno@clisp.org>.  Fix error messages.
8239
8240 2005-10-22  Simon Josefsson  <jas@extundo.com>
8241
8242         * lib/md4.h, md4.c: Simplify buffer handling visavi alignment,
8243         suggested by Bruno Haible <bruno@clisp.org>.
8244
8245 2005-10-22  Simon Josefsson  <jas@extundo.com>
8246
8247         * lib/crc.h: Include stddef.h, for size_t.
8248
8249 2005-10-22  Simon Josefsson  <jas@extundo.com>
8250
8251         * lib/arcfour.h, arcfour.c: Use fixed size indices in the
8252         arcfour_context struct (simplify test vector testing in GNU
8253         Shishi).
8254
8255 2005-10-21  Simon Josefsson  <jas@extundo.com>
8256
8257         * modules/des, modules/des-tests: New files.
8258
8259         * modules/gc-des, modules/gc-des-tests: New files.
8260
8261         * tests/test-des.c, tests/test-gc-des.c: New file.
8262
8263 2005-10-21  Simon Josefsson  <jas@extundo.com>
8264
8265         * modules/arctwo, modules/arctwo-tests: New files.
8266
8267         * tests/test-arctwo.c: New file.
8268
8269         * modules/gc-arctwo, modules/gc-arctwo-tests: New files.
8270
8271         * tests/test-gc-arctwo.c: New file.
8272
8273 2005-10-21  Simon Josefsson  <jas@extundo.com>
8274
8275         * m4/gc.m4: Don't use libgcrypt if gcrypt.h isn't found, suggested by
8276         Bruno Haible <bruno@clisp.org>.
8277
8278         * m4/gc-des.m4: New file.
8279
8280 2005-10-21  Simon Josefsson  <jas@extundo.com>
8281
8282         * m4/arctwo.m4: New file.
8283
8284         * m4/gc-arctwo.m4: New file.
8285
8286 2005-10-21  Simon Josefsson  <jas@extundo.com>
8287
8288         * lib/rijndael-api-fst.c: Fix bugs in CBC mode for more than one
8289         block.
8290
8291 2005-10-21  Simon Josefsson  <jas@extundo.com>
8292
8293         * lib/hmac-md5.c (hmac_md5): Add comments, suggested by Bruno Haible
8294         <bruno@clisp.org>.
8295
8296         * lib/hmac-sha1.c (hmac_sha1): Likewise.
8297
8298         * lib/crc.c (crc32_update): Actually use crc parameter, suggested by
8299         Bruno Haible <bruno@clisp.org>.
8300
8301         * lib/crc.h: Include stdint.h directly, suggested by Bruno Haible
8302         <bruno@clisp.org>.
8303
8304 2005-10-21  Simon Josefsson  <jas@extundo.com>
8305
8306         * lib/gc-libgcrypt.c (gc_cipher_open): Handle ECB.
8307
8308 2005-10-21  Simon Josefsson  <jas@extundo.com>
8309
8310         * lib/gc-gnulib.c: Support ARCTWO in CBC mode.
8311
8312 2005-10-21  Simon Josefsson  <jas@extundo.com>
8313
8314         * lib/des.h, lib/des.c: New files.
8315
8316         * lib/gc-gnulib.c: Support DES.c
8317
8318 2005-10-21  Simon Josefsson  <jas@extundo.com>
8319
8320         * lib/arctwo.h, lib/arctwo.c: New files.
8321
8322         * lib/gc-gnulib.c: Support ARCTWO.
8323
8324 2005-10-21  Simon Josefsson  <jas@extundo.com>
8325
8326         * lib/arctwo.h (arctwo_setkey): Protect variable in CPP macro,
8327         suggested by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>.
8328
8329 2005-10-21  Simon Josefsson  <jas@extundo.com>
8330
8331         * gnulib-tool (func_import, func_create_testdir): Define automake
8332         conditional GL_COND_LIBTOOL if libtool is used (to be used by modules
8333         Makefile.am snippet),
8334         suggested by Bruno Haible <bruno@clisp.org>.
8335
8336         * modules/gc (Makefile.am): Use it.
8337
8338 2005-10-21  Bruno Haible  <bruno@clisp.org>
8339
8340         * gnulib-tool (func_import, func_create_testdir): Add quoting to last
8341         patch.
8342
8343 2005-10-19  Simon Josefsson  <jas@extundo.com>
8344
8345         * tests/test-gc-rijndael.c: New file.
8346
8347         * modules/gc-rijndael, modules/gc-rijndael-test: New files.
8348
8349 2005-10-19  Simon Josefsson  <jas@extundo.com>
8350
8351         * tests/test-gc-md4.c, tests/test-gc-md5.c: Test gc_hash_buffer
8352         interface too.
8353
8354 2005-10-19  Simon Josefsson  <jas@extundo.com>
8355
8356         * tests/test-gc-arcfour.c: New file.
8357
8358         * modules/gc-arcfour, modules/gc-arcfour-tests: New files.
8359
8360 2005-10-19  Simon Josefsson  <jas@extundo.com>
8361
8362         * modules/gc-md4, modules/gc-md4-tests: New file.
8363
8364         * tests/test-gc-md4.c: New file.
8365
8366 2005-10-19  Simon Josefsson  <jas@extundo.com>
8367
8368         * m4/gc-md4.m4: New file.
8369
8370 2005-10-19  Simon Josefsson  <jas@extundo.com>
8371
8372         * m4/gc-hmac-md5.m4, gc-hmac-sha1.m4, gc-md4.m4,
8373         gc-md5.m4, gc-sha1.m4: Fix typo, suggested by Stepan Kasal
8374         <kasal@ucw.cz>.
8375
8376 2005-10-19  Simon Josefsson  <jas@extundo.com>
8377
8378         * m4/gc-arcfour.m4: New file.
8379
8380         * m4/gc-rijndael.m4: New file.
8381
8382 2005-10-19  Simon Josefsson  <jas@extundo.com>
8383
8384         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support MD4.
8385
8386 2005-10-19  Simon Josefsson  <jas@extundo.com>
8387
8388         * lib/gc-gnulib.c: Support ARCFOUR.
8389
8390 2005-10-19  Simon Josefsson  <jas@extundo.com>
8391
8392         * lib/gc-gnulib.c: Implement gc_cipher_* API, currently only with AES
8393         support.
8394
8395         * lib/gc.h: Add ECB enum type.
8396
8397         * lib/hmac-md5.c, hmac-sha1.c: Include memxor.h.
8398
8399 2005-10-18  Simon Josefsson  <jas@extundo.com>
8400
8401         * tests/test-md5.c: New file.
8402
8403         * modules/md5-tests: New file.
8404
8405 2005-10-18  Simon Josefsson  <jas@extundo.com>
8406
8407         * tests/test-md4.c: New file.
8408
8409         * modules/md4, modules/md4-tests: New files.
8410
8411 2005-10-18  Simon Josefsson  <jas@extundo.com>
8412
8413         * m4/md4.m4: New file.
8414
8415 2005-10-18  Simon Josefsson  <jas@extundo.com>
8416
8417         * lib/md4.h, lib/md4.c: New files, based on md5.?.
8418
8419 2005-10-17  Stepan Kasal  <kasal@ucw.cz>
8420
8421         * gnulib-tool (func_create_testdir): Omit the second check whether
8422         BUILT_SOURCES in nonempty.
8423
8424 2005-10-17  Simon Josefsson  <jas@extundo.com>
8425
8426         * tests/test-rijndael.c: New file.
8427
8428 2005-10-17  Simon Josefsson  <jas@extundo.com>
8429
8430         * modules/sha1: Depend on stdint instead of md5.
8431
8432         * modules/md5: Depend on stdint, remove uint32_t.
8433
8434 2005-10-17  Simon Josefsson  <jas@extundo.com>
8435
8436         * modules/gc-sha1-tests: New file.
8437
8438         * tests/test-gc-sha1.c: New file.
8439
8440 2005-10-17  Simon Josefsson  <jas@extundo.com>
8441
8442         * m4/md5.m4: Remove call to uint32_t.m4.
8443
8444 2005-10-17  Simon Josefsson  <jas@extundo.com>
8445
8446         * lib/sha1.c: Use uint32_t instead of md5_uint32.t
8447
8448         * lib/sha1.h: Use stdint.h and uint32_t instead of md5_uint32 from
8449         md5.h.
8450
8451         * lib/md5.c: Use uin32_t.  Fix non-gcc UNALIGNED_P macro.
8452
8453         * lib/md5.h: Use stdint.h and uint32_t.  Doc fix.
8454
8455 2005-10-17  Simon Josefsson  <jas@extundo.com>
8456
8457         * lib/gc.h, gc-libgcrypt.c: Add more hash types/functions.
8458
8459 2005-10-17  Simon Josefsson  <jas@extundo.com>
8460
8461         * lib/gc.h, gc-libgcrypt.c: Add ciphers.
8462
8463 2005-10-17  Simon Josefsson  <jas@extundo.com>
8464
8465         * lib/gc-libgcrypt.c (gc_hmac_sha1): Fix assert.
8466
8467         * lib/gc.h (gc_nonce, gc_pseudo_random, gc_random): Add prototypes.
8468
8469 2005-10-17  Bruno Haible  <bruno@clisp.org>
8470
8471         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Change the return statement so
8472         that it can also be used in a test.
8473
8474 2005-10-16  Bruno Haible  <bruno@clisp.org>
8475
8476         * gnulib-tool (func_emit_tests_Makefile_am): Also define
8477         TESTS_ENVIRONMENT, so that individual tests can augment it.
8478
8479         * gnulib-tool (func_create_testdir): Use an intermediate target for
8480         building $(BUILT_SOURCES). Needed because BUILT_SOURCES can contain
8481         macros, like $(ALLOCA_H), which cannot be passed through the command
8482         line.
8483
8484 2005-10-15  Simon Josefsson  <jas@extundo.com>
8485
8486         * modules/rijndael-tests: New file.
8487
8488         * modules/rijndael: New file.
8489
8490 2005-10-15  Simon Josefsson  <jas@extundo.com>
8491
8492         * m4/rijndael.m4: New file.
8493
8494 2005-10-15  Simon Josefsson  <jas@extundo.com>
8495
8496         * lib/rijndael-api-fst.h, lib/rijndael-api-fst.c: New files.
8497
8498         * lib/rijndael-alg-fst.h, lib/rijndael-alg-fst.c: New files.
8499
8500 2005-10-14  Simon Josefsson  <jas@extundo.com>
8501
8502         * tests/test-arcfour.c: New file.
8503
8504         * modules/arcfour, modules/arcfour-tests: New files.
8505
8506 2005-10-14  Simon Josefsson  <jas@extundo.com>
8507
8508         * m4/arcfour.m4: New file.
8509
8510 2005-10-14  Simon Josefsson  <jas@extundo.com>
8511
8512         * lib/arcfour.h, lib/arcfour.c: New files.
8513
8514 2005-10-14  Roland McGrath  <roland@redhat.com>
8515
8516         Import from libc.  [BZ #1331]
8517         * lib/obstack.h [!__STDC__] (obstack_int_grow_fast): Fix misnamed
8518         macro argument.
8519         Reported by Matej Vela <vela@debian.org>.
8520
8521 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8522
8523         * lib/obstack.c [defined _LIBC && defined USE_IN_LIBIO]: Don't
8524         include <wchar.h>; no longer needed.
8525
8526 2005-10-14  Paul Eggert  <eggert@cs.ucla.edu>
8527
8528         * config/srclist.txt: Add glibc bug 321 for obstack.c, obstack.h.
8529
8530 2005-10-14  Jakub Jelinek  <jakub@redhat.com>
8531         and  Ulrich Drepper  <drepper@redhat.com>
8532
8533         Import from libc.
8534         * lib/obstack.c (print_and_abort) [defined _LIBC]: Use __fxprintf
8535         instead of inline stream orientation test and two separate
8536         function calls.  Pay no attention to USE_IN_LIBIO.
8537
8538 2005-10-13  Simon Josefsson  <jas@extundo.com>
8539
8540         * modules/gc-hmac-md5-tests: New file.
8541
8542         * tests/test-gc-hmac-sha1.c: New file.
8543
8544         * tests/test-gc.c (main): Remove MD5 and HMAC-MD5 tests.
8545
8546         * modules/gc-hmac-md5-tests: New file.
8547
8548         * tests/test-gc-md5.c: New file.
8549
8550         * modules/gc-md5-tests: New file.
8551
8552 2005-10-13  Simon Josefsson  <jas@extundo.com>
8553
8554         * lib/gc-pbkdf2-sha1.c (gc_pbkdf2_sha1): Optimize CEIL computation.
8555         Move memory allocation outside of loop.
8556
8557 2005-10-13  Paul Eggert  <eggert@cs.ucla.edu>
8558
8559         * lib/mkdir-p.c (make_dir_parents): Don't report an error if an
8560         intermediate directory is in a read-only file system.  Problem
8561         reported by Eric Blake.
8562
8563 2005-10-13  Oskar Liljeblad  <oskar@osk.mine.nu>
8564
8565         * modules/human (Depends-on): Depend on xstrtoumax, not xstrtol.
8566
8567 2005-10-12  Simon Josefsson  <jas@extundo.com>
8568
8569         * tests/test-hmac-sha1.c: New file.
8570
8571         * modules/hmac-sha1-tests: New file.
8572
8573         * modules/hmac-sha1: New file.
8574
8575 2005-10-12  Simon Josefsson  <jas@extundo.com>
8576
8577         * modules/gc-sha1: New file.
8578
8579 2005-10-12  Simon Josefsson  <jas@extundo.com>
8580
8581         * modules/gc-pbkdf2-sha1, modules/gc-pbkdf2-sha1-tests: New files.
8582
8583         * tests/test-gc-pbkdf2-sha1.c: New file.
8584
8585 2005-10-12  Simon Josefsson  <jas@extundo.com>
8586
8587         * modules/gc-md5, modules/gc-hmac-md5: New files.
8588
8589         * modules/gc (Files): Remove md5, memxor and hmac files.
8590
8591 2005-10-12  Simon Josefsson  <jas@extundo.com>
8592
8593         * m4/gc-pbkdf2-sha1.m4: New file.
8594
8595         * m4/gc-hmac-sha1.m4: New file.
8596
8597         * m4/gc-sha1: New file.
8598
8599         * m4/hmac-sha1.m4: New file.
8600
8601 2005-10-12  Simon Josefsson  <jas@extundo.com>
8602
8603         * m4/gc-md5.m4, m4/gc-hmac-md5.m4: New files.
8604
8605         * m4/gc.m4: Don't call gl_MD5, gl_MEMXOR or gl_HMAC_MD5.
8606
8607 2005-10-12  Simon Josefsson  <jas@extundo.com>
8608
8609         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Use Gc_rc for return types,
8610         suggested by Bruno Haible <bruno@clisp.org>.
8611
8612 2005-10-12  Simon Josefsson  <jas@extundo.com>
8613
8614         * lib/gc.h, gc-gnulib.c, gc-libgcrypt.c: Support SHA-1.
8615
8616 2005-10-12  Simon Josefsson  <jas@extundo.com>
8617
8618         * lib/gc-pbkdf2-sha1.c: New file.
8619
8620         * lib/gc.h: Add gc_pbkdf2_sha1 prototype.
8621
8622 2005-10-12  Simon Josefsson  <jas@extundo.com>
8623
8624         * lib/gc-libgcrypt.c (gc_hmac_sha1): New function.
8625
8626         * lib/gc-gnulib.c (gc_hmac_sha1): New function.
8627
8628 2005-10-12  Simon Josefsson  <jas@extundo.com>
8629
8630         * lib/gc-gnulib.c: Condition MD5 and HMAC-MD5 use on GC_USE_MD5 and
8631         GC_USE_HMAC_MD5, respectively.
8632
8633         * lib/gc-libgcrypt.c (gc_md5): Fix assert call.
8634         (gc_md5): Fix typo.
8635
8636         * lib/gc.h (gc_hash_buffer): Use gc_hash in prototype.
8637
8638         * lib/gc-libgcrypt.c (gc_hash_buffer): Ditto.
8639
8640         * lib/gc-gnulib.c (gc_hash_buffer): Ditto.
8641
8642 2005-10-12  Bruno Haible  <bruno@clisp.org>
8643
8644         * m4/stdbool.m4 (gl_STDBOOL_H): Define as an alias of AM_STDBOOL_H.
8645         Reported by Stepan Kasal <kasal@ucw.cz>.
8646
8647 2005-10-11  Simon Josefsson  <jas@extundo.com>
8648
8649         * tests/test-crc.c: New file.
8650
8651         * modules/crc, modules/crc-tests: New files.
8652
8653 2005-10-11  Simon Josefsson  <jas@extundo.com>
8654
8655         * m4/crc.m4: New file.
8656
8657 2005-10-11  Simon Josefsson  <jas@extundo.com>
8658
8659         * lib/gc.h: Add gc_hash and gc_hash_buffer.
8660
8661         * lib/gc-gnulib.c (gc_hash_buffer): Add.  Reorder #include's.
8662
8663         * lib/gc-libgcrypt.c (gc_hash_buffer): Add.
8664
8665 2005-10-11  Simon Josefsson  <jas@extundo.com>
8666
8667         * lib/crc.h, lib/crc.c: New files.
8668
8669         * lib/gc.h (gc_hash_buffer): Add doc.
8670
8671 2005-10-11  Bruno Haible  <bruno@clisp.org>
8672
8673         * modules/c-strcasestr: New file.
8674         * MODULES.html.sh (String handling <string.h>): Add c-strcasestr.
8675
8676 2005-10-11  Bruno Haible  <bruno@clisp.org>
8677
8678         * modules/c-strcase: New file.
8679         * MODULES.html.sh (String handling <string.h>): Add c-strcase.
8680
8681 2005-10-11  Bruno Haible  <bruno@clisp.org>
8682
8683         * lib/strcasecmp.c: Include limits.h.
8684         (strcasecmp): Avoid integer overflow on exotic platforms.
8685         * lib/strncasecmp.c: Include limits.h.
8686         (strncasecmp): Avoid integer overflow on exotic platforms.
8687         Reported by Paul Eggert.
8688
8689 2005-10-11  Bruno Haible  <bruno@clisp.org>
8690
8691         * lib/c-strcasestr.h: New file, from GNU gettext.
8692         * lib/c-strcasestr.c: New file, from GNU gettext.
8693
8694 2005-10-11  Bruno Haible  <bruno@clisp.org>
8695
8696         * lib/c-strcase.h: New file, from GNU gettext.
8697         * lib/c-strcasecmp.c: New file, from GNU gettext.
8698         * lib/c-strncasecmp.c: New file, from GNU gettext.
8699
8700 2005-10-10  Paul Eggert  <eggert@cs.ucla.edu>
8701
8702         * modules/mempcpy (License): GPL -> LGPL.
8703         * modules/strchrnul (License): Likewise.
8704         * modules/sysexits (License): Likewise.
8705
8706 2005-10-08  Simon Josefsson  <jas@extundo.com>
8707
8708         * config/srclist.txt: Bug 1423 is closed, but 1439 remains.
8709
8710 2005-10-07  Simon Josefsson  <jas@extundo.com>
8711
8712         * m4/memxor.m4: Remove gl_C_RESTRICT call.
8713
8714 2005-10-06  Simon Josefsson  <jas@extundo.com>
8715
8716         * tests/test-hmac-md5.c: New file.
8717
8718         * modules/hmac-md5-tests: New file.
8719
8720         * modules/hmac-md5: New file.
8721
8722 2005-10-06  Simon Josefsson  <jas@extundo.com>
8723
8724         * m4/hmac-md5.m4: New file.
8725
8726         * m4/memxor.m4: Require gl_C_RESTRICT.
8727
8728 2005-10-06  Simon Josefsson  <jas@extundo.com>
8729
8730         * lib/memxor.c (memxor): Avoid casts and warnings.
8731
8732 2005-10-06  Simon Josefsson  <jas@extundo.com>
8733
8734         * lib/hmac-md5.c: New file.
8735
8736         * lib/hmac.h: New file.
8737
8738 2005-10-06  Paul Eggert  <eggert@cs.ucla.edu>
8739
8740         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Check that bool
8741         promotes to int, not unsigned int, to catch the AIX 5.3
8742         compiler bug.
8743
8744 2005-10-05  Simon Josefsson  <jas@extundo.com>
8745
8746         * modules/memxor: New file.
8747
8748         * modules/iconv (Files): Move config.rpath to havelib, it is used
8749         there.
8750
8751         * modules/havelib (Files): Add config.rpath.
8752
8753 2005-10-05  Simon Josefsson  <jas@extundo.com>
8754
8755         * m4/memxor.m4: New file.
8756
8757 2005-10-05  Simon Josefsson  <jas@extundo.com>
8758
8759         * lib/memxor.c (memxor): Fix compiler error.
8760
8761         * lib/md5.h (MD5_DIGEST_SIZE, MD5_BLOCK_SIZE): Add, see also
8762         <http://sourceware.org/bugzilla/show_bug.cgi?id=1423>.
8763
8764         * lib/memxor.h, lib/memxor.c: New files.
8765
8766         * lib/getaddrinfo.h: Don't protect sys/types.h with HAVE_SYS_TYPES_H,
8767         we assume all systems have it, suggested by Jim Meyering
8768         <jim@meyering.net>.  Remove HAVE_SYS_SOCKET_H test too, to see if
8769         any systems lack sys/socket.h; mingw32 is known to lack it, but we
8770         don't support it yet anyway.  Also remove HAVE_NETDB_H test, for
8771         same reasons.
8772
8773 2005-10-05  Simon Josefsson  <jas@extundo.com>
8774
8775         * config/srclist.txt: Add glibc bug 1423 for md5.h.
8776
8777 2005-10-05  Paul Eggert  <eggert@cs.ucla.edu>
8778
8779         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Don't check for
8780         sys/socket.h, netdb.h, sys/types.h; the checks areno longer
8781         needed, since the source code now assumes these .h files.
8782
8783 2005-10-05  Derek Price  <derek@ximbiot.com>
8784
8785         * lib/getdelim.c (SIZE_MAX): New macro, if not already defined.
8786
8787 2005-10-05  Bruno Haible  <bruno@clisp.org>
8788
8789         * modules/stdint (License): Change to LGPL.
8790
8791 2005-10-04  Simon Josefsson  <jas@extundo.com>
8792
8793         * lib/getaddrinfo.h: Move sys/types.h include first, reported by "Mark
8794         D. Baushke" <mdb@gnu.org>.
8795
8796 2005-10-04  Bruno Haible  <bruno@clisp.org>
8797
8798         * lib/verify.h (verify_true): Provide alternative definition for C++.
8799
8800 2005-10-03  Paul Eggert  <eggert@cs.ucla.edu>
8801
8802         * lib/getdelim.c: Include getdelim.h first.  Include <limits.h>.
8803         (SSIZE_MAX): New macro, if not already defined.
8804         (getdelim): Fix buffer overrun on 64-bit hosts with lines longer
8805         than 2 GiB.
8806
8807 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8808
8809         Sync from coreutils.
8810         * m4/openat.m4 (gl_FUNC_OPENAT): Check for fdopendir.
8811         * m4/ullong_max.m4 (gl_ULLONG_MAX): Simplify so that it merely
8812         defines ULONG_MAX_LT_ULLONG_MAX.  Thomas M.Ott reports that
8813         ULLONG_MAX doesn't work with 2.7.2.1.
8814
8815 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8816
8817         * modules/xreadlink (Makefile.am): Remove lib_SOURCES.
8818         From Ben Pfaff.
8819
8820         * modules/exclude (Depends-on): Depend on verify.
8821         * modules/strtoimax (Depends-on): Likewise.
8822         * modules/utimecmp (Depends-on): Likewise.
8823
8824 2005-10-02  Paul Eggert  <eggert@cs.ucla.edu>
8825
8826         * lib/exclude.c: Include verify.h.
8827         (verify): Remove.  All callers changed to use verify.h's version.
8828         * lib/strtoimax.c: Likewise.
8829         * lib/utimecmp.c: Likewis.e
8830
8831         Sync from coreutils.
8832         * lib/.cppi-disable: Add getaddrinfo.h, getdelim.h, getline.h,
8833         getpass.c, mbchar.h, mbuiter.h, strcase.h, strnlen.h, strnlen1.h.
8834         * lib/.cvsignore: Add fts.h, search.h, t-fpending.
8835         * lib/settime.c (settime): Fix { typo in previous patch.  Also, don't
8836         bother returning ENOSYS if settimeofday or stime fails; just let
8837         them return whatever errno they want to return.
8838         * lib/utimens.c: Include unistd.h, for dup2.
8839         (futimens): Fix typo: HAVE_FUTIMESAT was misspelled in an #if.
8840         (futimens) [! HAVE_FUTIMESAT]: If !file, set errno before returning -1.
8841
8842 2005-10-02  Jim Meyering  <jim@meyering.net>
8843
8844         Sync from coreutils.
8845         * m4/utimes.m4 (gl_FUNC_UTIMES): Detect the version of utimes
8846         from glibc-2.2.5 that fails for read-only files.
8847
8848 2005-10-02  Jim Meyering  <jim@meyering.net>
8849
8850         Sync from coreutils.
8851         * lib/fts-cycle.c [HAVE_CONFIG_H]: Include <config.h>.
8852         * lib/openat-die.c: Use `#ifdef HAVE_CONFIG_H', not
8853         `#if HAVE_CONFIG_H'.
8854         * lib/openat.c (fdopendir): Do not define if HAVE_FDOPENDIR.
8855         Remove AT_FDCWD test.
8856         Do not consume the fd unless successful.
8857         * lib/openat.h (fdopendir): Do not define if HAVE_FDOPENDIR.
8858         * lib/settime.c (settime): Move the HAVE_STIME block `up' into an #elif
8859         block, so that we don't even try to compile it if settimeofday is
8860         available.  This works around a compilation failure on OSF1 V5.1,
8861         due to stime requiring a `long int*' while tv_sec is `int'.
8862
8863 2005-10-02  Alfred M. Szmidt  <ams@gnu.org>
8864
8865         Sync from coreutils.
8866         * m4/chdir-long.m4 (gl_FUNC_CHDIR_LONG): Compare $gl_have_path...
8867         against `yes', rather than just testing for nonempty.
8868
8869 2005-10-01  Simon Josefsson  <jas@extundo.com>
8870
8871         * m4/getaddrinfo.m4: Include sys/types.h for sys/socket.h, on FreeBSD
8872         and Darwin.
8873
8874         * m4/getaddrinfo.m4: Use AC_GNU_SOURCE, GNU only declare getaddrinfo
8875         as an (POSIX) extension.  Check for sys/types.h, sys/socket.h, and
8876         netdb.h too, needed by getaddrinfo.h.  Check if getaddrinfo,
8877         freeaddrinfo and gai_strerror are declared by the POSIX headers.
8878         Check if struct addrinfo is declared.
8879
8880 2005-10-01  Simon Josefsson  <jas@extundo.com>
8881
8882         * lib/getaddrinfo.h: Protect #include's of sys/socket.h and netdb.h.
8883         Only define struct addrinfo if !HAVE_STRUCT_ADDRINFO.  Protect
8884         AI_* and EAI_* definitions.  Protect function declarations.
8885
8886 2005-10-01  Jim Meyering  <jim@meyering.net>
8887
8888         Sync from coreutils.
8889
8890         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Look for getservbyname in these
8891         libraries [inet nsl socket xnet].  Nelson Beebe reported that with
8892         native cc on Solaris 7, getaddrinfo.c requires -lsocket.
8893         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8894         in the inet and nsl libraries.  Required on Solaris 5.7.
8895
8896 2005-10-01  Jim Meyering  <jim@meyering.net>
8897
8898         Sync from coreutils.
8899         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Check for gethostbyname
8900         in the inet and nsl libraries.  Required on Solaris 5.7.
8901
8902 2005-10-01  Eric Blake  <ebb9@byu.net>  (tiny change)
8903
8904         * lib/getdelim.c (getdelim): Remove unused variables.
8905
8906 2005-09-29  Paul Eggert  <eggert@cs.ucla.edu>
8907
8908         * lib/xtime.h (XTIME_PRECISION): Now of type int, not long long int,
8909         so that the code works even with ancient cpp.  Portability problem
8910         with GCC 2.7.2.1 reported by Thomas M.Ott.
8911
8912 2005-09-27  Paul Eggert  <eggert@cs.ucla.edu>
8913
8914         * modules/regex (Depends-on): Add strcase.
8915
8916         * modules/gethostname (Licence): Change from GPL to LGPL, since
8917         gethostname.c is a trivial implementation of a standard library
8918         function.
8919         * modules/poll (License): Change from GPL to LGPL, since it's
8920         derived from LGPL code.
8921
8922 2005-09-27  Jim Meyering  <jim@meyering.net>
8923
8924         * lib/getcwd.c: Change #ifdef<TAB>HAVE_CONFIG_H to #ifdef
8925         HAVE_CONFIG_H.
8926
8927         * lib/intprops.h (signed_type_or_expr__): Define.
8928         (INT_STRLEN_BOUND) [__GNUC__]: Use a slightly tighter bound
8929         for unsigned types.
8930
8931 2005-09-26  Paul Eggert  <eggert@cs.ucla.edu>
8932
8933         * lib/verify.h (verify_expr): Remove, replacing with:
8934         (verify_true): New macro that returns true instead of void.
8935         (verify_type__): Remove.
8936         (verify): Use verify_true rather than verify_type__.
8937
8938 2005-09-26  Bruno Haible  <bruno@clisp.org>
8939
8940         * modules/mbchar (Include): Mention that HAVE_WCHAR_H && HAVE_WCTYPE_H
8941         is necessary.
8942         (lib_SOURCES): Remove mbchar.c.
8943         * modules/mbfile (Include): Mention that HAVE_MBRTOWC is necessary.
8944         (Files): Add m4/mbrtowc.m4.
8945         * modules/mbiter: Likewise.
8946         * modules/mbuiter: Likewise.
8947
8948 2005-09-26  Bruno Haible  <bruno@clisp.org>
8949
8950         * m4/mbchar.m4 (gl_MBCHAR): Check for wchar.h and wctype.h. Don't
8951         compile mbchar.c if they are not both present.
8952         * m4/mbfile.m4 (gl_MBFILE): Require gl_FUNC_MBRTOWC.
8953         * m4/mbiter.m4 (gl_MBITER): Likewise.
8954         * m4/strstr.m4 (gl_PREREQ_STRSTR): Use AC_REQUIRE.
8955         * m4/strcasestr.m4 (gl_PREREQ_STRCASESTR): Likewise.
8956         * m4/strcase.m4 (gl_PREREQ_STRCASECMP): Likewise.
8957
8958 2005-09-25  Jim Meyering  <jim@meyering.net>
8959
8960         * modules/inet_ntop (Depends-on): Add socklen, since inet_ntop.c
8961         also uses socklen_t.
8962
8963 2005-09-24  Paul Eggert  <eggert@cs.ucla.edu>
8964
8965         * lib/utimens.c (ENOSYS): Define if not already defined.
8966         (futimens): Support having a null PATH if the file descriptor
8967         is nonnegative.
8968
8969         * lib/regex_internal.h (__GNUC_PREREQ, always_inline, inline, pure):
8970         Remove.
8971         (__attribute): Define to empty unless GCC 3.1 or later.
8972         This works around a core dump on OpenBSD 3.4, which has GCC
8973         2.95.3, which dumps core when given __attribute__(()).  It also
8974         simplifies other tests, since we really don't want to bother with
8975         worrying about which ancient version of GCC supported what.
8976         Original problem reported by Yoann Vandoorselaere, with part of
8977         the fix suggested by Derek Price.
8978
8979 2005-09-24  Jim Meyering  <jim@meyering.net>
8980
8981         * lib/verify.h (verify_type__): Use `unsigned int' as the bitfield type
8982         so we can once again use a positive bitfield width of 1 -- now we
8983         don't have to explain why we were using a bitfield width of 2.
8984
8985 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8986
8987         * m4/regex.m4 (gl_REGEX): If replacing, define regcomp to rpl_regcomp,
8988         and similarly for the other external symbols.  Problem reported
8989         by James Gallager.
8990
8991         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Catch Sun Studio 10u1 on Linux
8992         bug reported by Jim Meyering.
8993
8994         * m4/utimens.m4 (gl_UTIMENS): Check for futimesat.
8995         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Undo previous change;
8996         not needed, since socklen is a prerequisite module.
8997
8998 2005-09-23  Paul Eggert  <eggert@cs.ucla.edu>
8999
9000         * lib/getaddrinfo.c [HAVE_NETINET_IN_H]: Include <netinet/in.h>.
9001         Problem reported by Eric Blake.
9002         (getaddrinfo): Initialize se so that it's not garbage.
9003         Redo internal storage allocation so that it doesn't make unportable
9004         assumptions about alignment.
9005         Fix a memory leak.
9006
9007         * lib/utimens.c (futimens): Use futimesat if available.
9008         Prefer it to futimes since it doesn't have the futimes bug.
9009
9010         * lib/verify.h (GL_CONCAT0, GL_CONCAT): Remove.
9011         (verify): Don't use the __LINE__ trick, as it doesn't work in general.
9012         Instead, declare a function that returns a pointer to an array,
9013         and use verify_type__ to declare the size of the array.
9014         Problem and germ of a solution reported by Bruno Haible.
9015         (verify_type__): Use 2, not 1, for bitfield size, to avoid
9016         a warning with Irix 6.5 cc.  Problem reported by Bruno Haible.
9017
9018 2005-09-23  Jim Meyering  <jim@meyering.net>
9019
9020         Sync from coreutils.
9021         Correct build failure (socklen_t not defined) on at least
9022         mips-sgi-irix6.5 and alphaev67-dec-osf5.1.
9023         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Require gl_SOCKLEN_T.
9024
9025 2005-09-23  Jim Meyering  <jim@meyering.net>
9026
9027         * modules/getaddrinfo (Depends-on): Add socklen.
9028
9029 2005-09-23  Bruno Haible  <bruno@clisp.org>
9030
9031         * tests/test-verify.c: New file.
9032
9033 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9034
9035         Sync from coreutils.
9036
9037         * modules/argmatch (Depends-on): Add verify.
9038         * modules/getloadavg (Depends-on): Depend on fcntl-safer, not
9039         unistd-safer.
9040         * modules/save-cwd (Depends-on): Likewise.
9041
9042         * modules/openat (Files): Add lib/openat-die.c.
9043         (Depends-on): Remove error, exitfail.
9044         Add dirname.
9045
9046         * modules/verify: New file.
9047         * MODULES.html.sh (Diagnostics <assert.h>): New section,
9048         with "verify" module.
9049
9050 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9051
9052         Sync from coreutils.
9053
9054         * m4/backupfile.m4, calloc.m4, chown.m4, cloexec.m4, dup2.m4:
9055         * m4/fileblocks.m4, free.m4, ftruncate.m4, getcwd.m4, getpagesize.m4:
9056         * m4/getugroups.m4, group-member.m4, idcache.m4, link-follow.m4:
9057         * m4/mkstemp.m4, mktime.m4, mountlist.m4, nanosleep.m4, pathmax.m4:
9058         * m4/physmem.m4, posixver.m4, putenv.m4, safe-read.m4, same.m4:
9059         * m4/save-cwd.m4, stdio-safer.m4, unistd-safer.m4, unlinkdir.m4:
9060         * m4/userspec.m4, xgetcwd.m4, xreadlink.m4:
9061         Don't bother checking for string.h, stdlib.h, unistd.h.
9062         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't require
9063         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK; that's now the lstat
9064         module's job.
9065         * m4/jm-macros.m4 (gl_MACROS): Likewise.
9066         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_LSTAT.
9067
9068         * m4/getdate.m4 (gl_C_COMPOUND_LITERALS): New macro.
9069         (gl_GETDATE): Use it.
9070
9071         * m4/mkdir-p.m4 (gl_MKDIR_PARENTS): Don't bother checking for unistd.h.
9072
9073 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9074
9075         Sync from coreutils.
9076
9077         * lib/.cppi-disable: Add regcomp.c, regex_internal.c, regex_internal.h,
9078         stat-time.h.
9079         * lib/argmatch.h: Include verify.h
9080         (ARGMATCH_VERIFY): Use verify rather than rolling our own.
9081         (ARGMATCH_ASSERT): Remove; unused.
9082         * lib/canonicalize.c: Assume STDC_HEADERS.
9083         * lib/exclude.c: Include "strcase.h".
9084         * lib/regex_internal.h [!defined _LIBC]: Likewise.
9085         * lib/getusershell.c: Include stdio--.h rather than stdio.h
9086         and stdio-safer.h.
9087         (getusershell): Call fopen, not fopen_safer.
9088         * lib/save-cwd.c: Include fcntl--.h rather than fcntl.h.
9089         Do not include unistd-safer.h.
9090         (save_cwd): Don't call fd_safer; no longer needed
9091         now that we include fcntl--.h.
9092
9093         * lib/getdate.y (relative_time): New type.
9094         (RELATIVE_TIME_0): New constant.
9095         (parser_control): Use relative_time instead of doing it ourselves.
9096         (%union): Add new relative_time rel member.
9097         (tYEAR_UNIT, tMONTH_UNIT, tHOUR_UNIT, tMINUTE_UNIT, tSEC_UNIT):
9098         Now typeless.
9099         (relunit, relunit_snumber): Now of type rel.
9100         (zone, rel, relunit, get_date): Adjust to above changes.
9101
9102         * lib/getloadavg.c: Include fcntl--.h rather than fcntl.h.
9103         Do not include unistd-safer.h.
9104         (getloadavg): Don't call fd_safer; no longer needed
9105         now that we include fcntl--.h.
9106
9107         * lib/mkdir-p.c (ENOSYS): Define to EEXIST if not defined.
9108         (make_dir_parents): Treat ENOSYS like EEXIST.
9109
9110         Improve quality of diagnostics on restore_cwd failure.
9111         * lib/mkdir-p.h (make_dir): Remove.  All uses replaced by mkdir.
9112         (make_dir_parents): Last arg is now int * (for errno), not bool *.
9113         * lib/mkdir-p.c (make_dir, make_dir_parents): Likewise.
9114         Rewrite "mkdir -p" algorithm to avoid the need for "stat"
9115         each time through the loop.  Do not diagnose restore_cwd failure;
9116         that is the caller's job (and perhaps the caller does not care).
9117
9118         * lib/mkdir-p.c (CLEANUP_CWD, CLEANUP): Remove.
9119         (make_dir_parents): Revamp to avoid need for CLEANUP_CWD, CLEANUP.
9120         If the file already exists but is not a directory, don't bother
9121         to try to make its parents.
9122         Close potential file descriptor leak if we can't chdir("/") (!).
9123         Don't always return true if chdir($PWD) fails; return true only
9124         if the requested action was done successfully (except for the
9125         chdir($PWD)).
9126         Don't log final directory unless we actually made it.
9127         Refactor to avoid duplicate code to fix up permissions.
9128         Don't attempt to fix up parent permissions if chdir($PWD) fails.
9129
9130         * lib/strftime.c (my_strftime): Rewrite the previous change slightly,
9131         to make it a bit faster and (I hope) clearer.
9132         * lib/strftime.c (my_strftime): Add support for %:z, %::z, %:::z.
9133         Fix bug in formats like %2N.
9134
9135         * lib/verify.h: New file.
9136
9137 2005-09-22  Paul Eggert  <eggert@cs.ucla.edu>
9138
9139         Sync from coreutils.
9140         * m4/getaddrinfo.m4 (gl_PREREQ_GETADDRINFO): Check for netinet/in.h.
9141
9142 2005-09-22  Jim Meyering  <jim@meyering.net>
9143
9144         Sync from coreutils.
9145
9146         * m4/lstat.m4 (gl_FUNC_LSTAT):
9147         Use AC_LIBSOURCES to require lstat.c and lstat.h.
9148         Remove obsolete comment.
9149         * m4/xreadlink.m4: Use AC_LIBSOURCES and AC_LIBOBJ.
9150         * m4/xstrtod.m4: Likewise.
9151
9152         * m4/openat.m4 (gl_FUNC_OPENAT): Add openat-die.c.
9153
9154 2005-09-22  Jim Meyering  <jim@meyering.net>
9155
9156         Sync from coreutils.
9157
9158         * lib/backupfile.c: Use ARGMATCH_VERIFY, just in case.
9159
9160         * lib/posixtm.c (posixtime) [lint]: Initialize *all* of tm0, not just
9161         the .tm_year member, since otherwise gcc-4.0 would now warn about
9162         tm_zone, tm_gmtoff, tm_isdst, tm_yday, tm_wday.
9163
9164         * lib/quotearg.c (quotearg_n_options): Change code to be suboptimal, in
9165         order to avoid an unsuppressible warning from gcc on 64-bit systems.
9166
9167         * lib/getdate.y (get_date): Undo part of the 2005-04-04 change, so that
9168         the command "date -d'2005-03-27 +1 day'" succeeds once again, even
9169         when run in a time zone for which daylight savings time is in effect
9170         for the starting date.
9171
9172         * lib/mkdir-p.c (make_dir_parents): Don't let a failed chdir($PWD)
9173         stop us from restricting permissions of just-created absolute-named
9174         directories.
9175         * lib/mkdir-p.c (CLEANUP_CWD): Return *true*, not false when failing
9176         to restore initial working directory.
9177         * lib/mkdir-p.c (make_dir_parents): New parameter:
9178         different_working_dir, to tell caller if/when we change the working
9179         directory and are unable to return to the initial one.
9180         * lib/mkdir-p.h (make_dir_parents): Update prototype.
9181         * lib/mkdir-p.c (CLEANUP_CWD): Change one more `return 1' to
9182         `return false'.  This fixes a bug introduced on 2004-07-30.
9183
9184         * lib/openat.c (fdopendir): Be sure to close the supplied
9185         file descriptor before returning.  This makes our replacement
9186         implementation a little closer to Solaris's, where fdopendir
9187         ties the file descriptor to the returned DIR* pointer.
9188         * lib/openat.c (unlinkat): New function.
9189         * lib/openat.h (unlinkat): Add prototype.
9190         * lib/openat-die.c (openat_save_fail): Rename from openat_save_die.
9191         (openat_restore_fail): Rename from openat_restore_die.
9192         * lib/openat.c, openat.h: Reflect s/_die/_fail/ renaming.
9193
9194         Provide an alternative to exiting immediately upon save_cwd or
9195         restore_cwd failure.  Now, an application can arrange e.g.,
9196         to perform a longjump in that case.
9197         * lib/openat.c: Include dirname.h.
9198         Use IS_ABSOLUTE_FILE_NAME rather than testing for leading slash.
9199         (rpl_openat, fdopendir, fstatat): Call openat_save_die
9200         and openat_restore_die rather than calling error directly.
9201         Don't include "error.h" or "exitfail.h"; they're no longer needed.
9202
9203         * lib/openat-die.c (openat_save_die, openat_restore_die): New file.
9204         * lib/openat.h (openat_save_die, openat_restore_die): Declare and
9205         define.
9206
9207         * lib/strftime.c [FPRINTFTIME] (fprintftime): Provide a new interface:
9208         size_t fprintftime (FILE *fp, char const *fmt, struct tm const *tm,
9209                             int utc, int nanoseconds);
9210         Background:
9211         date should not have to allocate a megabyte of virtual memory to
9212         handle a format argument like +%1048575T.  When implemented with
9213         strftime, it must allocate such a buffer, use strftime to fill it
9214         in, print it, then free it.
9215         With fprintftime, it simply prints everything and exits.
9216         With no need for memory allocation, that's one fewer way to fail.
9217         * lib/strftime.c (my_strftime): Parse the colons of %:::z *after* the
9218         optional field width, not before, so we accept %9:z, not %:9z.
9219         (my_strftime): Be sure to use L_('x') for literals.
9220
9221         * lib/backupfile.c, lib/canon-host.c, lib/canonicalize.c, lib/chown.c:
9222         * lib/cloexec.c, lib/dup-safer.c, lib/dup2.c, lib/euidaccess.c:
9223         * lib/fd-safer.c, lib/fileblocks.c, lib/fopen-safer.c, lib/fsusage.c:
9224         * lib/ftruncate.c, lib/getcwd.c, lib/getcwd.h, lib/getloadavg.c:
9225         * lib/getopt_.h, lib/getpagesize.h, lib/getugroups.c:
9226         * lib/group-member.c, lib/human.h, lib/idcache.c, lib/mkdir-p.c:
9227         * lib/mountlist.c, lib/nanosleep.c, lib/pathmax.h, lib/physmem.c:
9228         * lib/posixver.c, lib/putenv.c, lib/raise.c, lib/safe-read.c:
9229         * lib/same.c, lib/save-cwd.c, lib/setenv.c, lib/settime.c:
9230         * lib/tempname.c, lib/unlinkdir.c, lib/unsetenv.c, lib/userspec.c:
9231         * lib/xgethostname.c, lib/xreadlink.c:
9232         Assume HAVE_UNISTD_H, i.e., include <unistd.h> unconditionally.
9233
9234         * lib/chown.c, lib/cloexec.c, lib/dup-safer.c, lib/dup2.c:
9235         * lib/fsusage.c, lib/getcwd.c, lib/getloadavg.c, lib/mountlist.c:
9236         * lib/openat.h, lib/save-cwd.c, lib/tempname.c:
9237         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
9238         and don't include <sys/file.h>).
9239
9240 2005-09-22  Eric Blake  <ebb9@byu.net>  (tiny change)
9241
9242         Sync from coreutils.
9243
9244         * lib/getloadavg.c (getloadavg) [__CYGWIN__]: Port to cygwin.
9245         [__linux__]: Allocate a big enough buffer for /proc/loadavg.
9246         [!LDAV_DONE]: Avoid unused variable warning.
9247
9248 2005-09-21  Bruno Haible  <bruno@clisp.org>
9249
9250         * lib/unicodeio.h (unicode_to_mb): New declaration.
9251
9252 2005-09-20  Derek Price  <derek@ximbiot.com>
9253
9254         * lib/getaddrinfo.c: Don't include <netdb.h> included from
9255         getaddrinfo.h.
9256
9257 2005-09-20  Bruno Haible  <bruno@clisp.org>
9258
9259         * gnulib-tool: Remove trailing slashes from the values specified for
9260         --source-base, --m4-base, --tests-base, --aux-dir.
9261         Suggested by Simon Josefsson <jas@extundo.com>.
9262
9263 2005-09-20  Bruno Haible  <bruno@clisp.org>
9264
9265         * gnulib-tool (func_all_modules, func_modules_transitive_closure,
9266         func_modules_to_filelist, func_import, func_create_testdir): Make all
9267         sorting results locale-independent, so that gnulib-cache.m4 doesn't
9268         change when gnulib-tool is invoked in a different locale.
9269
9270 2005-09-19  Simon Josefsson  <jas@extundo.com>
9271
9272         * m4/socklen.m4: Fix typo.
9273
9274 2005-09-19  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>
9275
9276         Use a consistent style for including <config.h>.
9277         * lib/__fpending.c, lib/acl.c, lib/argmatch.c, lib/argp-help.c,
9278         lib/argp-parse.c, lib/argp-pvh.c, lib/backupfile.c, lib/basename.c,
9279         lib/c-stack.c, lib/calloc.c, lib/check-version.c, lib/cloexec.c,
9280         lib/closeout.c, lib/copy-file.c, lib/creat-safer.c, lib/cycle-check.c,
9281         lib/dirfd.c, lib/dirname.c, lib/dup-safer.c, lib/dup2.c,
9282         lib/euidaccess.c, lib/exclude.c, lib/exitfail.c, lib/fatal-signal.c,
9283         lib/fd-safer.c, lib/file-type.c, lib/fileblocks.c, lib/filemode.c,
9284         lib/filenamecat.c, lib/findprog.c, lib/fnmatch.c, lib/fopen-safer.c,
9285         lib/free.c, lib/fsusage.c, lib/ftruncate.c, lib/full-write.c,
9286         lib/fwriteerror.c, lib/getaddrinfo.c, lib/getcwd.c, lib/getdelim.c,
9287         lib/getline.c, lib/getlogin_r.c, lib/getndelim2.c, lib/getnline.c,
9288         lib/getopt1.c, lib/getpass.c, lib/group-member.c, lib/hard-locale.c,
9289         lib/hash-pjw.c, lib/hash.c, lib/human.c, lib/idcache.c,
9290         lib/inet_ntop.c, lib/isdir.c, lib/long-options.c, lib/malloc.c,
9291         lib/memcasecmp.c, lib/memcmp.c, lib/memcoll.c, lib/memcpy.c,
9292         lib/memmove.c, lib/mkdir-p.c, lib/modechange.c, lib/mountlist.c,
9293         lib/open-safer.c, lib/physmem.c, lib/pipe-safer.c, lib/pipe.c,
9294         lib/poll.c, lib/posixver.c, lib/progname.c, lib/progreloc.c,
9295         lib/putenv.c, lib/quote.c, lib/quotearg.c, lib/readline.c,
9296         lib/readlink.c, lib/realloc.c, lib/regex.c, lib/rename.c, lib/rmdir.c,
9297         lib/rpmatch.c, lib/safe-read.c, lib/same.c, lib/save-cwd.c,
9298         lib/savedir.c, lib/sig2str.c, lib/strcspn.c, lib/strerror.c,
9299         lib/stripslash.c, lib/strncasecmp.c, lib/strndup.c, lib/strnlen.c,
9300         lib/strnlen1.c, lib/strsep.c, lib/strstr.c, lib/strtod.c,
9301         lib/strtoimax.c, lib/strtol.c, lib/strverscmp.c, lib/tempname.c,
9302         lib/time_r.c, lib/userspec.c, lib/utimecmp.c, lib/version-etc-fsf.c,
9303         lib/version-etc.c, lib/wait-process.c, lib/xalloc-die.c, lib/xgetcwd.c,
9304         lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c, lib/xreadlink.c,
9305         lib/xsetenv.c, lib/xstrndup.c, lib/xstrtoimax.c, lib/xstrtol.c,
9306         lib/xstrtoumax.c, lib/yesno.c:
9307         Standardize inclusion of config.h.
9308         * lib/__fpending.h, lib/dirfd.h, lib/getdate.h, lib/human.h,
9309         lib/inttostr.h:  Removed inclusion of config.h from header files.
9310         * lib/inttostr.c:  Adjusted in-tree users.
9311         * lib/timespec.h: Remove superfluous warning to include config.h.
9312         * lib/atexit.c, lib/chdir-long.c, lib/chown.c, lib/fchown-stub.c,
9313         lib/getgroups.c, lib/gettimeofday.c, lib/lchown.c, lib/lstat.c,
9314         lib/mkdir.c, lib/mkstemp.c, lib/nanosleep.c, lib/openat.c, lib/raise.c,
9315         lib/readtokens0.c, lib/readutmp.c, lib/unlinkdir.c: Guard inclusion of
9316         config.h with HAVE_CONFIG_H.
9317
9318 2005-09-19  Jim Meyering  <jim@meyering.net>
9319
9320         * modules/pathmax (License): Change to LGPL.
9321
9322 2005-09-19  Derek Price  <derek@ximbiot.com>
9323
9324         * config/srclist.txt: glibc's glob.h is now in lib/glob-libc.h.
9325
9326 2005-09-19  Bruno Haible  <bruno@clisp.org>
9327
9328         * gnulib-tool (import): Provide default for --tests-base.
9329
9330 2005-09-19  Bruno Haible  <bruno@clisp.org>
9331
9332         * doc/quote.texi: New file, extracted from gnulib.texi.
9333         * doc/ctime.texi: New file, extracted from gnulib.texi.
9334         * doc/inet_ntoa.texi: New file, extracted from gnulib.texi.
9335         * doc/gnulib-tool.texi: New file, extracted from gnulib.texi.
9336         * doc/gnulib.texi: Include them.
9337
9338 2005-09-18  Bruno Haible  <bruno@clisp.org>
9339
9340         Portability fix.
9341         * gnulib-tool (func_readlink): New function.
9342         (func_ln_if_changed): Use it.
9343
9344 2005-09-18  Bruno Haible  <bruno@clisp.org>
9345
9346         * gnulib-tool: Support --with-tests also with --import.
9347         (func_emit_tests_Makefile_am): Use variables $m4base and $testsbase.
9348         (func_import): Use variables $testsbase and $inctests. Emit a
9349         gl_TESTS_BASE form into gnulib-cache.m4. Create $testsbase/Makefile.am.
9350         Remind the user to add AC_CONFIG_FILES($testsdir/Makefile) and
9351         SUBDIRS += $testsdir.
9352         (func_create_testdir): Update.
9353
9354 2005-09-18  Bruno Haible  <bruno@clisp.org>
9355
9356         * gnulib-tool: Revise --dry-run implementation. Use variable $doit
9357         instead of $dry_run.
9358         (func_cp_if_changed, func_mv_if_changed): Remove functions.
9359         (func_ln_if_changed): Don't handle dry-run here.
9360         (func_import): In dry-run mode, detect more precisely which actions
9361         would be performed, and don't use "...ing" verbs.
9362
9363 2005-09-18  Bruno Haible  <bruno@clisp.org>
9364
9365         * gnulib-tool (func_tmpdir): New function, taken from GNU gettextize.
9366         (func_import): Use join on two temporary files instead of three nested
9367         loops, in order to determine which files are new or old.
9368
9369 2005-09-18  Bruno Haible  <bruno@clisp.org>
9370
9371         * gnulib-tool (func_import): Comment out code that spits out the
9372         new files with --dry-run.
9373
9374 2005-09-18  Bruno Haible  <bruno@clisp.org>
9375
9376         * doc/gnulib.texi (Invoking gnulib-tool): 50% rewritten.
9377
9378 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9379
9380         * lib/stat-time.h: New file.
9381         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP, ATIME_CMP, CTIME_CMP):
9382         (MTIME_CMP, TIMESPEC_NS): Remove.  Now done by stat-time.h,
9383         in a different way.
9384         (timespec_cmp): New function.
9385         * lib/utimecmp.c: Include stat-time.h.
9386         (SYSCALL_RESOLUTION): Depend on whether various struct stat
9387         members exist, not on the obsolescent ST_MTIM_NSEC.
9388         (utimecmp): Use the new stat-time functions rater than TIMESPEC_NS.
9389
9390 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9391
9392         * config/srclist.txt: Remove glibc bug 1033 and uncomment mktime.c.
9393
9394 2005-09-16  Paul Eggert  <eggert@cs.ucla.edu>
9395
9396         * MODULES.html.sh (File system functions): Add stat-time.
9397         * modules/stat-time: New file.
9398         * modules/timespec (Files): Remove m4/st_mtim.m4; this
9399         is now done in a different way, by the stat-time module.
9400         * modules/utimecmp (Depends-on): Add stat-time.
9401
9402 2005-09-15  Paul Eggert  <eggert@cs.ucla.edu>
9403
9404         * m4/st_mtim.m4: Remove.  Superseded by...
9405         * m4/stat-time.m4: New file.
9406         * m4/timespec.m4 (gl_TIMESPEC): Require AC_C_INLINE.
9407         Do not invoke AC_STRUCT_ST_MTIM_NSEC; no longer needed.
9408
9409 2005-09-15  Derek Price  <derek@ximbiot.com>
9410
9411         * m4/strstr.m4 (gl_FUNC_STRSTR): Don't define strstr here.
9412
9413 2005-09-15  Derek Price  <derek@ximbiot.com>
9414
9415         * lib/regex_internal.h: Blank `pure' for GNUC < 3.
9416         * lib/regex_internal.c: Ditto, using this...
9417         (__GNUC_PREREQ): ...new macro.
9418         * lib/regcomp.c, regexec.c: Blank `always_inline' for GNUC < 3.1
9419         using...
9420         (__GNUC_PREREQ): ...this new macro.
9421
9422         * lib/strstr.h: Include string.h. Define strstr as a macro here.
9423
9424 2005-09-15  Derek Price  <derek@ximbiot.com>
9425             Paul Eggert  <eggert@cs.ucla.edu>
9426
9427         * lib/regcomp.c, regexec.c, regex_internal.c: Back out previous
9428         changes, consolidating in...
9429         * lib/regex_internal.h: ...this file.
9430
9431 2005-09-13  Jim Meyering  <jim@meyering.net>
9432
9433         * lib/canon-host.c: Filter through gnu indent and reword comments
9434         slightly.
9435         * lib/canon-host.h (ch_strerror_r): Tweak cpp indentation and spacing.
9436
9437 2005-09-13  Derek Price  <derek@ximbiot.com>
9438
9439         * lib/canon-host.c (canon_host_r): Set *cherror on memory allocation
9440         failure.
9441         Reported by Jim Meyering  <jim@meyering.net>.
9442
9443 2005-09-12  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
9444
9445         * lib/base64.c: Typo.
9446         (base64_encode): Put b64str in initialized data section.
9447
9448 2005-09-12  Paul Eggert  <eggert@cs.ucla.edu>
9449
9450         Merge glibc and coreutils changes into gnulib, plus a few
9451         extra fixes.
9452         * lib/md5.c: Use #error rather than a string.
9453         (CYCLIC): New macro, from glibc source.  Use it instead of rol.
9454         * lib/md5.h (__GNUC_PREREQ, __THROW): Define if not defined already.
9455         (__attribute__): Define to empty for non recent-GCC.
9456         (__md5_buffer, __md5_finish_ctx, __md5_init_ctx, __md5_process_block):
9457         (__md5_process_bytes, __md5_read_ctx, __md5_stream):
9458         Renamed from their non-__ counterparts, with new macros replacing
9459         them if not _LIBC.  Add __THROW attribute.
9460         (rol): Remove.
9461         (struct md5_ctx): Align buffer if using GCC.
9462         * lib/sha1.h (struct sha1_ctx): Likewise.
9463         * lib/sha1.c (SWAP): Renamed from the NOTSWAP.  All uses changed.
9464         The old name was backwards.
9465         (NOTSWAP): Remove; not used.
9466         (rol): New macro, moved here from md5.h.
9467         (sha1_process_block): Remove a FIXME that doesn't make sense.
9468
9469 2005-09-12  Derek Price  <derek@ximbiot.com>
9470
9471         Return usable errors from canon-host.
9472         * lib/canon-host.h: New file.
9473         * lib/canon-host.c (canon_host): Wrap...
9474         (canon_host_r): ...this new function, which now relies exclusively on
9475         getaddrinfo.
9476         (ch_strerror): New function.
9477         (last_cherror): New global.
9478         * lib/getaddrinfo.c: Move include of getaddrinfo.h first to test
9479         interface.
9480         (getaddrinfo): Add AI_CANONNAME functionality.  Don't do arithmetic on
9481         void *.
9482         (freeaddrinfo): Free ai->ai_canonname when set.
9483
9484 2005-09-12  Derek Price  <derek@ximbiot.com>
9485
9486         Make canon-host require getaddrinfo.
9487         * m4/canon-host.m4 (gl_CANON_HOST): Remove most dependencies.
9488         AC_LIBSOURCE canon-host.h.  Call...
9489         (gl_PREREQ_CANON_HOST): ...this new function, which requires
9490         gl_GETADDRINFO.
9491         * m4/getaddrinfo.m4 (gl_GETADDRINFO): Compile gai_strerror when needed.
9492
9493 2005-09-12  Derek Price  <derek@ximbiot.com>
9494
9495         * modules/canon-host: Add canon-host.h.  Depend on getaddrinfo.  Make
9496         LGPL.
9497         * modules/getaddrinfo: Add link to opengroup spec.  Depend on strdup.
9498
9499 2005-09-12  Derek Price  <derek@ximbiot.com>
9500
9501         * lib/gai_strerror.c: Include config.h when available.  Include
9502         getaddrinfo.h before other headers to test interface.
9503         Reported by Larry Jones <lawrence.jones@ugs.com>.
9504
9505 2005-09-12  Derek Price  <derek@ximbiot.com>
9506             Paul Eggert  <eggert@cs.ucla.edu>
9507
9508         * modules/glob (Files): Add glob-libc.h.
9509
9510 2005-09-12  Derek Price  <derek@ximbiot.com>
9511             Paul Eggert  <eggert@cs.ucla.edu>
9512
9513         * m4/glob.m4 (gl_GLOB_SUBSTITUTE): AC_LIBSOURCES for glob.c,
9514         glob_.h, glob-libc.h.
9515         (gl_PREREQ_GLOB): Remove _SYS_CDEFS_H hack; no longer needed.
9516
9517 2005-09-12  Derek Price  <derek@ximbiot.com>
9518             Paul Eggert  <eggert@cs.ucla.edu>
9519
9520         * lib/glob-libc.h: Renamed from glob_.h.  The new version is
9521         taken from libc's glob.h, except with '#ifdef __GLOB_GNULIB'
9522         protecting things that should be done only in gnulib contexts.
9523         * lib/glob_.h: New file, containing only the glob things needed for
9524         gnulib.
9525         (GLOB_PREFIX): Remove.  All uses changed to look for __GLOB_GNULIB.
9526         (__GLOB_CONCAT, __GLOB_XCONCAT, __GLOB_ID): Remove; no longer needed.
9527         (glob, globfree, glob_pattern_p): Now defined simply in terms of
9528         rpl_glob, rpl_globfree, rpl_glob_pattern_p.
9529         (__GLOB_GNULIB): New macro, to keep the glob.h changes clearer
9530         and to respect the namespace rules better.
9531
9532 2005-09-08  Simon Josefsson  <jas@extundo.com>
9533
9534         * modules/socklen: New file.
9535
9536 2005-09-08  Simon Josefsson  <jas@extundo.com>
9537
9538         * m4/socklen.m4: New file.
9539
9540 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9541
9542         * modules/utimens (Files): Add m4/utimbuf.m4, since
9543         m4/utimens.m4 requires gl_CHECK_TYPE_STRUCT_UTIMBUF.
9544         Reported by Sergey Poznyakoff.
9545
9546 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9547
9548         * lib/glob.c (glob, globfree, __glob_pattern_p): Use old-style function
9549         definitions, since that's the preferred style in glibc.
9550         Fix a minor spacing issue, and update copyright notice to match
9551         glibc's.
9552
9553 2005-09-08  Paul Eggert  <eggert@cs.ucla.edu>
9554
9555         * config/srclist.txt: Remove glibc bug 1061; it's been fixed.
9556
9557 2005-09-06  Simon Josefsson  <jas@extundo.com>
9558
9559         * lib/getpass.c (getpass): Fix typo, test for HAVE_TCSETATTR and not
9560         TCSETATTR.  Reported by Derek Price <derek@ximbiot.com>.
9561
9562 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9563
9564         * lib/regex_internal.h (bitset_not): Add parens to avoid gcc -Wall
9565         warning.
9566
9567 2005-09-06  Paul Eggert  <eggert@cs.ucla.edu>
9568
9569         * config/srclist.txt: Add glibc bug 1302.
9570
9571 2005-09-05  Paul Eggert  <eggert@cs.ucla.edu>
9572
9573         Change bitset word type from unsigned int to unsigned long int,
9574         as this has better performance on typical 64-bit hosts.
9575         Port bitset code to hosts with unusual word sizes.
9576         * lib/regcomp.c (build_equiv_class, build_charclass, build_range_exp):
9577         (build_collating_symbol):
9578         Prefer bitset to re_bitset_ptr_t in prototypes, when the actual
9579         argument is a bitset.  This is merely a style issue, but it makes
9580         it clearer that an entire array is expected.
9581         (re_compile_fastmap_iter, init_dfa, init_word_char, optimize_subexps):
9582         * lib/regcomp.c (lower_subexp, parse_bracket_exp, built_charclass_op):
9583         Port to the case where bitset_word is not the same as unsigned int.
9584         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9585         (bitset_not, bitset_merge, bitset_set_all, bitset_mask):
9586         Likewise.
9587         * lib/regexec.c (check_dst_limits_calc_pos_1,
9588         check_subexp_matching_top):
9589         (build_trtable, group_nodes_into_DFAstates):
9590         Likewise.
9591         * lib/regcomp.c (re_compile_fastmap_iter, utf8_sb_map, optimize_utf8):
9592         Don't assume that SBC_MAX is a multiple of BITSET_WORD_BITS.
9593         * lib/regex_internal.h (bitset_set_all, bitset_not): Likewise.
9594         * lib/regexec.c (group_nodes_into_DFAstates): Likewise.
9595         * lib/regcomp.c (utf8_sb_map): Don't assume UINT_MAX == 0xffffffff.
9596         * lib/regcomp.c (optimize_subexps, lower_subexp):
9597         Work even if bitset_word has holes in its bitwise representation.
9598         * lib/regex_internal.h (BITSET_WORD_BITS): Likewise.
9599         * lib/regexec.c (check_dst_limits_calc_pos_1,
9600         check_subexp_matching_top):
9601         Likewise.
9602         * lib/regex_internal.c (re_string_reconstruct):
9603         Don't assume UCHAR_MAX == 255.
9604         * lib/regex_internal.h (bitset_set_all): Likewise.
9605         * lib/regex_internal.h (BITSET_WORD_BITS): Renamed from UINT_BITS.
9606         All uses changed.
9607         (BITSET_WORDS): Renamed from BITSET_UINTS.  All uses changed.
9608         (bitset_word): New type, replacing 'unsigned int' for bitset uses.
9609         All uses changed.
9610         (BITSET_WORD_MAX): New macro.
9611         (bitset_set, bitset_clear, bitset_contain, bitset_empty):
9612         (bitset_set_all, bitset_copy):  Now inline functions, not macros.
9613         (bitset_empty, bitset_copy):
9614         Prefer sizeof (bitset) to multiplying it out ourselves.
9615         (bitset_not_merge): Remove; unused.
9616         (bitset_contain): Return bool, not unsigned int with one bit on.
9617         All callers changed.
9618         * lib/regexec.c (build_trtable): Don't assume bitset has no stricter
9619         alignment than re_node_set; do this by defining a new internal
9620         type struct dests_alloc and using it to allocate memory.
9621
9622 2005-09-05  Bruno Haible  <bruno@clisp.org>
9623
9624         * gnulib-tool (func_import): Fix comparison in handling of symbolic
9625         links.
9626
9627 2005-09-04  Martin Lambers  <marlam@marlam.de>  (tiny change)
9628
9629         * modules/size_max (Makefile.am): Add size_max.h
9630
9631 2005-09-04  Derek Price  <derek@ximbiot.com>
9632
9633         * gnulib-tool (func_import): Fix reversed $symbolic logic.
9634
9635 2005-09-03  Simon Josefsson  <jas@extundo.com>
9636
9637         * gnulib-tool: Fix typo.
9638
9639 2005-09-03  Simon Josefsson  <jas@extundo.com>
9640
9641         * config/srclist.txt: Add glibc bug 1293.
9642
9643 2005-09-03  Derek Price  <derek@ximbiot.com>
9644
9645         * m4/getlogin_r (gl_GETLOGIN_R): Fix cut & paste error.
9646         From Larry Jones <lawrence.jones@ugs.com>.
9647
9648 2005-09-02  Simon Josefsson  <jas@extundo.com>
9649
9650         * modules/socklen: New file.
9651
9652 2005-09-02  Simon Josefsson  <jas@extundo.com>
9653
9654         * modules/havelib: New module.
9655
9656         * modules/gettext, modules/iconv, modules/lock, modules/readline:
9657         Use havelib.
9658
9659 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9660
9661         Check for arithmetic overflow when calculating sizes, to prevent
9662         some buffer-overflow issues.  These patches are conservative, in the
9663         sense that when I couldn't determine whether an overflow was possible,
9664         I inserted a run-time check.
9665         * lib/regex_internal.h (re_xmalloc, re_xrealloc, re_x2realloc): New
9666         macros.
9667         (SIZE_MAX) [!defined SIZE_MAX]: New macro.
9668         (re_alloc_oversized, re_x2alloc_oversized, re_xnmalloc):
9669         (re_xnrealloc, re_x2nrealloc): New inline functions.
9670         * lib/regcomp.c (init_dfa, analyze, build_range_exp,
9671         parse_bracket_exp):
9672         (build_equiv_class, build_charclass): Check for arithmetic overflow
9673         in size expression calculations.
9674         * lib/regex_internal.c (re_string_realloc_buffers):
9675         (build_wcs_upper_buffer, re_node_set_add_intersect):
9676         (re_node_set_init_union, re_node_set_insert, re_node_set_insert_last):
9677         (re_dfa_add_node, register_state): Likewise.
9678         * lib/regexec.c (re_search_stub, re_copy_regs, re_search_internal):
9679         (prune_impossible_nodes, push_fail_stack, set_regs, check_arrival):
9680         (build_trtable, extend_buffers, match_ctx_init, match_ctx_add_entry):
9681         (match_ctx_add_subtop, match_ctx_add_sublast): Likewise.
9682
9683 2005-09-02  Paul Eggert  <eggert@cs.ucla.edu>
9684
9685         * modules/inttostr (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
9686         m4/ulonglong.m4.  Problem reported by Martin Lambers.
9687
9688 2005-09-02  Bruno Haible  <bruno@clisp.org>
9689
9690         Support for lib vs. lib64 distinction on biarch platforms.
9691         * m4/lib-prefix.m4 (AC_LIB_PREPARE_MULTILIB): New macro.
9692         (AC_LIB_PREFIX): Require it. Use $acl_libdirstem instead of 'lib'.
9693         * m4/lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Likewise.
9694
9695 2005-09-02  Bruno Haible  <bruno@clisp.org>
9696
9697         * gnulib-tool (import): In the other first-use case, provide defaults
9698         as well.
9699
9700 2005-09-02  Bruno Haible  <bruno@clisp.org>
9701
9702         * config/srclist.txt: lib-link.m4 and lib-prefix.m4 currently have
9703         patches not yet found in the latest gettext release.
9704
9705 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9706
9707         * lib/glob.c (GET_LOGIN_NAME_MAX): Renamed from LOGIN_NAME_MAX,
9708         to avoid a collision with bits/local_lim.h in glibc.
9709         All uses changed.  Problem reported by Dmitry V. Levin in
9710         <http://sources.redhat.com/bugzilla/show_bug.cgi?id=1060>.
9711
9712         * lib/regex_internal.c (build_wcs_upper_buffer): Fix portability
9713         bugs in int versus size_t comparisons.
9714         (re_string_context_at): Fix bug where the code assumed that
9715         Idx is signed.
9716
9717         Use bool where appropriate.
9718         * lib/regcomp.c (re_set_fastmap): ICASE arg is bool, not int.
9719         All callers changed.
9720         (calc_eclosure_iter): Likewise, for ROOT arg.
9721         (parse_bracket_element): Likewise, for ACCEPT_HYPHEN arg.
9722         (build_charclass_op): Likewise, for NON_MATCH arg.
9723         * lib/regex_internal.c (re_string_allocate, re_string_construct):
9724         (re_string_construct_common): Likewise, for ICASE arg.
9725         * lib/regexec.c (re_search_2_stub, re_search_stub):
9726         Likewise, for RET_LEN arg.
9727         (check_matching): Likewise, for FL_LONGEST_MATCH arg.
9728         (set_regs): Likewise, for FL_BACKTRACK arg.
9729         * lib/regcomp.c (re_compile_fastmap_iter, optimize_utf8):
9730         (duplicate_node_closure, calc_inveclosure, calc_eclosure):
9731         (calc_eclosure_iter, parse_bracket_exp):
9732         Use bool for internal variables that are booleans.
9733         * lib/regexec.c (re_search_internal, check_matching,
9734         proceed_next_node):
9735         (set_regs, build_sifted_states, sift_states_bkref):
9736         (check_arrival_add_next_nodes, check_arrival_expand_ecl_sub):
9737         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
9738         (find_collation_sequence_value):
9739         Likewise.
9740         * lib/regex_internal.c (re_node_set_insert, re_node_set_insert_last):
9741         (re_node_set_compare):
9742         Return bool, not int. All callers changed.
9743         * lib/regexec.c (check_halt_node_context, check_dst_limits):
9744         (build_trtable, check_node_accept): Likewise.
9745         * lib/regex_internal.h: Include stdbool.h.
9746
9747         Fix bugs uncovered when converting to bool.
9748         * lib/regcomp.c (calc_eclosure_iter): Check for storage allocation
9749         failure instead of charging ahead blindly.
9750         * lib/regex_internal.c (register_state): Likewise.
9751         * lib/regexec.c (re_search_2_stub): Use simpler method than boolean
9752         for freeing internal storage.
9753         (group_nodes_into_DFA_states): Use unsigned int, not int, for
9754         bitset pieces used as boolean, to avoid undefined behavior
9755         on hosts that do int overflow checking.
9756
9757 2005-09-01  Paul Eggert  <eggert@cs.ucla.edu>
9758
9759         * config/srclist.txt: Add glibc bugs 1285-1287.
9760
9761 2005-09-01  Jim Meyering  <jim@meyering.net>
9762
9763         * m4/lchown.m4: Require gl_FUNC_CHOWN, for the definition of
9764         CHOWN_MODIFIES_SYMLINK, which is used by lchown.c.
9765         Require gl_STAT_MACROS, too.
9766
9767 2005-09-01  Bruno Haible  <bruno@clisp.org>
9768
9769         * gnulib-tool (import): In the first-use case, provide defaults.
9770
9771 2005-09-01  Bruno Haible  <bruno@clisp.org>
9772
9773         * gnulib-tool (func_import): Remove the .tmp files.
9774
9775 2005-09-01  Bruno Haible  <bruno@clisp.org>
9776
9777         * gnulib-tool (func_import): Fix handling of symbolic links.
9778
9779 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9780
9781         On 64-bit hosts (where size_t is 64 bits and int is 32 bits), the
9782         old glibc regex code mishandles strings longer than 2**31 bytes.
9783         This patch fixes this when the regex code is used in gnulib
9784         (i.e., outside glibc).
9785
9786         This patch should not affect the use of the regex code inside
9787         glibc.  No doubt this problem also needs to be handled for glibc
9788         as well, but the result will be an incompatible change to the
9789         glibc ABI, and the old ABI will have to be supported too.  That
9790         can be the the subject for another patch.
9791
9792         * lib/regex.h (_REGEX_LARGE_OFFSETS): New feature-test macro,
9793         governing whether the rest of this patch is active.  By default,
9794         the macro is disabled and the patch has no effect.
9795         (regoff_t) [defined _REGEX_LARGE_OFFSETS]: Define to off_t, not int.
9796         (__re_idx_t, __re_size_t, __re_long_size_t): New types.
9797         (struct re_pattern_buffer, re_search, re_search_2, re_match):
9798         (re_match_2, re_set_registers): Use the new types.
9799         * lib/regex_internal.h (Idx, re_hashval_t): New types.
9800         (REG_MISSING, REG_ERROR, REG_VALID_INDEX, REG_VALID_NONZERO_INDEX):
9801         New macros.
9802         (re_node_set, re_charset_t, re_token_t, re_string_realloc_buffers):
9803         (re_string_context_at, bin_tree_t, re_dfastate_t):
9804         (struct re_state_table_entry, state_array_t, re_sub_match_last_t):
9805         (re_sub_match_top_t, re_match_context_t, re_sift_context_t):
9806         (struct re_fail_stack_ent_t, struct re_fail_stack_t, struct re_dfa_t):
9807         (re_string_char_size_at, re_string_wchar_at):
9808         (re_string_elem_size_at):
9809         Use the new types and macros to port to 64-bit hosts.
9810         Use unsigned types for internal values, so that the code
9811         mostly works even for arrays larger than SSIZE_MAX.
9812         * lib/regcomp.c (re_compile_internal, init_dfa, duplicate_node):
9813         (search_duplicated_node, calc_eclosure_iter, fetch_number):
9814         (parse_reg_exp, parse_branch, parse_expression, parse_sub_exp):
9815         (build_equiv_class, build_charclass, re_compile_fastmap_iter):
9816         (free_dfa_content, create_initial_state, optimize_utf8, analyze):
9817         (optimize_subexps, calc_first, link_nfa_nodes, duplicate_node_closure):
9818         (calc_inveclosure, parse_dup_op, build_range_exp):
9819         (build_collating_symbol, parse_bracket_exp, build_charclass_op):
9820         (fetch_number, create_token_tree, mark_opt_subexp):
9821         Likewise.
9822         * lib/regex_internal.c (re_string_construct_common,
9823         create_ci_newstate):
9824         (create_cd_newstate, re_string_allocate, re_string_construct):
9825         (re_string_realloc_buffers, build_wcs_upper_buffer):
9826         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
9827         (re_string_reconstruct, re_string_peek_byte_case):
9828         (re_string_fetch_byte_case, re_string_context_at):
9829         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
9830         (re_node_set_init_copy, re_node_set_add_intersect):
9831         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
9832         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
9833         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
9834         (re_acquire_state, re_acquire_state_context, register_state):
9835         Likewise.
9836         * lib/regex.c (match_ctx_init, match_ctx_add_entry,
9837         search_cur_bkref_entry):
9838         (match_ctx_add_subtop, match_ctx_add_sublast, sift_ctx_init):
9839         (re_search_internal, re_search_2_stub, re_search_stub)
9840         (re_copy_regs, check_matching, check_halt_state_context, update_regs):
9841         (push_fail_stack, sift_states_iter_mb, build_sifted_states):
9842         (update_cur_sifted_state, check_dst_limits):
9843         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9844         (check_subexp_limits, sift_states_bkref, merge_state_array):
9845         (check_subexp_matching_top, get_subexp, get_subexp_sub):
9846         (find_subexp_node, check_arrival, check_arrival_add_next_nodes):
9847         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
9848         (expand_bkref_cache, check_node_accept_bytes):
9849         (group_nodes_into_DFAstates, check_node_accept, regexec, re_match):
9850         (re_search, re_match_2, re_search_2, prune_impossible_nodes):
9851         (acquire_init_state_context, check_halt_node_context):
9852         (proceed_next_node, pop_fail_stack, set_regs, free_fail_stack_return):
9853         (sift_states_backward, clean_state_log_if_needed):
9854         (sub_epsilon_src_nodes, add_epsilone_src_nodes, merge_state_with_log):
9855         (find_recover_state, transit_state_sb, transit_state_mb):
9856         (transit_state_bkref, build_trtable, match_ctx_clean):
9857         Likewise.
9858         * lib/regcomp.c (parse_dup_op): Add an extra test if Idx is unsigned,
9859         to work around an assumption that REG_MISSING is negative.
9860
9861         * lib/regcomp.c (re_comp) [defined _REGEX_RE_COMP || defined _LIBC]:
9862         (seek_collating_symbol_entry) [defined _LIBC]:
9863         (lookup_collation_sequence_value) [defined _LIBC]:
9864         (build_range_exp, build_collating_symbol) [defined _LIBC]:
9865         Use prototypes rather than old-style function definitions.
9866         * lib/regexec.c (re_exec) [defined _REGEX_RE_COMP || defined _LIBC]:
9867         (transit_state_sb) [0]:
9868         (find_collation_sequence_value) [defined _LIBC]: Likewise.
9869
9870         * lib/regexec.c (re_search_internal): Simplify update of rm_so and
9871         rm_eo.
9872
9873         * lib/regcomp.c (re_compile_fastmap_iter, init_dfa, init_word_char):
9874         (optimize_subexps, lower_subexp):
9875         Don't assume 1<<31 has defined behavior on hosts with 32-bit int,
9876         since the signed shift might overflow.  Use 1u<<31 instead.
9877         * lib/regex_internal.h (bitset_set, bitset_clear, bitset_contain):
9878         Likewise.
9879         * lib/regexec.c (check_dst_limits_calc_pos_1,
9880         check_subexp_matching_top): Likewise.
9881
9882         * lib/regcomp.c (optimize_subexps, lower_subexp):
9883         Use CHAR_BIT rather than 8, for clarity.
9884         * lib/regexec.c (check_dst_limits_calc_pos_1):
9885         (check_subexp_matching_top): Likewise.
9886         * lib/regcomp.c (init_dfa): Make table_size unsigned, so that we don't
9887         have to worry about portability issues when shifting it left.
9888         Remove no-longer-needed test for table_size > 0.
9889         * lib/regcomp.c (parse_sub_exp): Do not shift more bits than there are
9890         in a word, as the resulting behavior is undefined.
9891         * lib/regexec.c (check_dst_limits_calc_pos_1): Likewise;
9892         in one case, a <= should have been an <, and in another case the
9893         whole test was missing.
9894         * lib/regex_internal.h (BYTE_BITS): Remove.  All uses changed to
9895         the standard name CHAR_BIT.
9896         * lib/regexec.c (match_ctx_add_entry): Don't assume that ~0 == -1;
9897         this is not true on one's complement and signed-magnitude hosts.
9898
9899         * lib/regex_internal.h (re_sub_match_top_t): Remove unused member
9900         next_last_offset.
9901         (struct re_dfa_t): Remove unused member states_alloc.
9902         * lib/regcomp.c (init_dfa): Don't initialize unused members.
9903
9904 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9905
9906         * m4/regex.m4 (gl_REGEX): Require AC_SYS_LARGEFILE, Define
9907         _REGEX_LARGE_OFFSETS).  Test for regoff_t/off_t bug in 64-bit
9908         and large-file glibc and in 32-bit large-file Solaris.
9909
9910 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9911
9912         * lib/regex_internal.c (re_string_reconstruct): Don't assume buffer
9913         lengths fit in regoff_t; this isn't true if regoff_t is the same
9914         width as size_t.
9915         * lib/regex.c (re_search_internal): 5th arg is LAST_START
9916         (= START + RANGE) instead of RANGE.  This avoids overflow
9917         problems when regoff_t is the same width as size_t.
9918         All callers changed.
9919         (re_search_2_stub): Check for overflow when adding the
9920         sizes of the two strings.
9921         (re_search_stub): Check for overflow when adding START
9922         to RANGE; if it occurs, substitute the extreme value.
9923
9924 2005-08-31  Paul Eggert  <eggert@cs.ucla.edu>
9925
9926         * config/srclist.txt: Add glibc bugs 1273, 1278-1282, 1284.
9927
9928 2005-08-31  Jim Meyering  <jim@meyering.net>
9929
9930         * lib/regcomp.c (search_duplicated_node): Make first pointer arg
9931         a pointer-to-const.
9932         * lib/regex_internal.c (create_ci_newstate, create_cd_newstate):
9933         (register_state): Likewise.
9934         * lib/regexec.c (search_cur_bkref_entry, check_dst_limits):
9935         (check_dst_limits_calc_pos_1, check_dst_limits_calc_pos):
9936         (group_nodes_into_DFAstates): Likewise.
9937
9938 2005-08-31  Jim Meyering  <jim@meyering.net>
9939
9940         * check-module: Add a FIXME comment.
9941
9942 2005-08-31  Eric Blake  <ebb9@byu.net>
9943
9944         * modules/unistd-safer (Files): Add unistd--.h.
9945         * modules/stdio-safer (Files): Add stdio--.h.
9946
9947 2005-08-31  Derek Price  <derek@ximbiot.com>
9948
9949         * lib/getdelim.c (getdelim): Return EOF on EOF.
9950         Reported by Larry Jones <lawrence.jones@ugs.com>.
9951
9952 2005-08-31  Bruno Haible  <bruno@clisp.org>
9953
9954         Avoid unnecessary diffs in the generated lib/Makefile.am.
9955         * gnulib-tool (func_emit_lib_Makefile_am): Don't write the cmd into
9956         the generated files.
9957         (func_import): Don't set cmd.
9958
9959 2005-08-31  Bruno Haible  <bruno@clisp.org>
9960
9961         * lib/strstr.c: Include <stddef.h>, for NULL.
9962         * lib/strcasestr.c: Likewise.
9963         Reported by Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
9964
9965 2005-08-31  Bruno Haible  <bruno@clisp.org>
9966
9967         * gnulib-tool: New option --macro-prefix.
9968         (func_import): Use macro_prefix.
9969         (import): Handle option --macro-prefix.
9970
9971 2005-08-31  Bruno Haible  <bruno@clisp.org>
9972
9973         * gnulib-tool (import): Rename most ac_* variables to cached_*.
9974         Also use new variables cached_lgpl, cached_libtool.
9975
9976 2005-08-31  Bruno Haible  <bruno@clisp.org>
9977
9978         * gnulib-tool (func_import): Require AC_GNU_SOURCE etc. instead of
9979         always instantiating them.
9980
9981 2005-08-31  Bruno Haible  <bruno@clisp.org>
9982
9983         * gnulib-tool (func_import): Read the previous cached settings
9984         from gnulib-cache.m4 and gnulib-comp.m4. Remove files that were
9985         earlier added by gnulib but are now dropped. Warn when a gnulib file
9986         overwrites a non-gnulib file.
9987
9988 2005-08-31  Bruno Haible  <bruno@clisp.org>
9989
9990         * gnulib-tool (func_import): Generate two files gnulib-cache.m4 and
9991         gnulib-comp.m4 instead of a single gnulib.m4, to make it easy for
9992         projects that don't keep autogenerated files in CVS. Put into
9993         actioncmd only the specified modules, not the transitive closure.
9994
9995 2005-08-31  Bruno Haible  <bruno@clisp.org>
9996
9997         * gnulib-tool (func_import): Fix defaulting of $libname and $libtool.
9998         Create directories that shall be filled.
9999         (import): Don't look for gl_* macros in configure.ac. Recurse across
10000         all directories containing a gnulib-cache.m4 files, if meaningful.
10001
10002 2005-08-31  Bruno Haible  <bruno@clisp.org>
10003
10004         * gnulib-tool (func_import): Emit also a stub for gl_LIBTOOL.
10005         (import): Set seen_libtool when we see gl_LIBTOOL.
10006
10007 2005-08-31  Bruno Haible  <bruno@clisp.org>
10008
10009         * gnulib-tool (func_import): Also copy m4/gnulib-tool.m4. Omit
10010         declaration macro definitions from generated gnulib.m4.
10011
10012 2005-08-30  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10013
10014         * lib/iconvme.h: Add prototype for iconv_alloc.
10015
10016 2005-08-29  Simon Josefsson  <jas@extundo.com>
10017
10018         * lib/iconvme.c: Fix errno.
10019
10020 2005-08-29  Bruno Haible  <bruno@clisp.org>
10021
10022         * gnulib-tool: Enclose all occurrences of $destdir in "...", so
10023         that it works when the directory contains spaces.
10024
10025 2005-08-29  Bruno Haible  <bruno@clisp.org>
10026
10027         * gnulib-tool (import): Avoid unnecessary spaces in $avoidlist.
10028
10029 2005-08-29  Bruno Haible  <bruno@clisp.org>
10030
10031         * gnulib-tool (func_import): Emit more comments into gnulib.m4.
10032         Emit more advice.
10033
10034 2005-08-29  Bruno Haible  <bruno@clisp.org>
10035         and Stepan Kasal  <kasal@ucw.cz>
10036
10037         * check-module: If more parameters are given, check each of them
10038         separately; add more exceptions, as noted by Jim Meyering.
10039         (check_module): New procedure.
10040         (%exempt_header): Now contains all exceptions.
10041
10042 2005-08-29  Ben Pfaff  <blp@cs.stanford.edu>
10043
10044         * modules/byteswap (Makefile.am): Fix rule to not assume GNU make.
10045
10046 2005-08-29  "Oskar Liljeblad"  <oskar@osk.mine.nu>
10047
10048         * lib/iconvme.c: Split iconv_string into iconv_alloc.
10049
10050 2005-08-28  Bruno Haible  <bruno@clisp.org>
10051
10052         * m4/gnulib-tool.m4: New file.
10053
10054 2005-08-27  Jim Meyering  <jim@meyering.net>
10055
10056         * modules/unistd-safer (Files): Add pipe-safer.c.
10057         * modules/fcntl-safer (Files): Add creat-safer.c.
10058
10059 2005-08-27  Jim Meyering  <jim@meyering.net>
10060
10061         * m4/stdlib-safer.m4: New file.  From coreutils.
10062         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Add stdio--.h.
10063         * m4/fcntl-safer.m4 (gl_FCNTL_SAFER): Add creat-safer.c to the
10064         AC_LIBSOURCES list and arrange to compile it via AC_LIBOBJ.
10065         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise, add pipe-safer.c.
10066         Add pipe-safer.c and unistd--.h to the AC_LIBSOURCES list.
10067
10068 2005-08-27  Jim Meyering  <jim@meyering.net>
10069
10070         * lib/fopen-safer.c: Merge minor changes from coreutils.
10071         * lib/dup-safer.c: Likewise.
10072         * lib/fd-safer.c: Likewise.
10073
10074         Merge from coreutils.
10075         * lib/stdio--.h: New file.
10076         * lib/stdlib--.h: New file.
10077         * lib/mkstemp-safer.c: New file.
10078
10079         GNU tar needs these.
10080         * lib/pipe-safer.c: New file.
10081         * lib/creat-safer.c: New file.
10082         * lib/fcntl--.h (creat): Define to creat_safer.
10083         * lib/fcntl-safer.h: Include <sys/types.h> and declare creat_safer.
10084         * lib/unistd--.h (pipe): Define to pipe_safer.
10085         * lib/unistd-safer.h: Declare pipe_safer.
10086
10087 2005-08-26  Simon Josefsson  <jas@extundo.com>
10088
10089         * lib/getpass.c: Use _WIN32 instead of WIN32, suggested by Bruno
10090         Haible <bruno@clisp.org>.
10091
10092 2005-08-26  Paul Eggert  <eggert@cs.ucla.edu>
10093
10094         * lib/regex_internal.h: Remove all references to
10095         RE_NO_INTERNAL_PROTOTYPES; no longer neeeded now that we assume C89
10096         or better.
10097         (bitset_not, bitset_merge, bitset_not_merge):
10098         (bitset_mask, re_string_allocate, re_string_construct):
10099         (re_string_reconstruct, re_string_destruct, re_string_elem_size_at):
10100         (re_string_char_size_at, re_string_wchar_at, re_string_peek_byte_case):
10101         (re_string_fetch_byte_case, re_node_set_alloc, re_node_set_init_1):
10102         (re_node_set_init_2, re_node_set_init_copy, re_node_set_add_intersect):
10103         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10104         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10105         (re_node_set_remove_at, re_dfa_add_node, re_acquire_state):
10106         (re_acquire_state_context):
10107         Remove unnecessary forward decls.
10108         (re_string_char_size_at, re_string_wchar_at, re_string_elem_size_at):
10109         Put __attribute at function definition,
10110         now that the function decl has been removed.
10111         * lib/regex_internal.c (re_string_peek_byte_case):
10112         (re_string_fetch_byte_case, re_node_set_compare, re_node_set_contains):
10113         Likewise.
10114
10115 2005-08-25  Stepan Kasal  <kasal@ucw.cz>
10116
10117         * m4/regex.m4: Add AC_PREREQ(2.50).
10118         (gl_REGEX): If --with-included-regex was given, skip the autodetection.
10119
10120 2005-08-25  Simon Josefsson  <jas@extundo.com>
10121
10122         * m4/getpass.m4: Check for termios.h, tcgetattr, tcsetattr, and
10123         __fsetlocking.
10124
10125 2005-08-25  Simon Josefsson  <jas@extundo.com>
10126
10127         * lib/getpass.c: Add WIN32 implementation.  Conditionalize use of
10128         termios.h, tcgetattr, tcsetattr and __fsetlocking.  Remove some
10129         GLIBC specific code.
10130
10131 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10132
10133         Make regex safe for g++.  This fixes one real bug (an "err"
10134         that should have been "*err").  g++ problem reported by
10135         Sam Steingold.
10136         * lib/regex_internal.h (re_calloc): New macro, consistent with
10137         re_malloc etc.  All callers of calloc changed to use re_calloc.
10138         * lib/regex_internal.c (build_wcs_upper_buffer): Return reg_errcode_t,
10139         not int.  All callers changed.
10140         * lib/regcomp.c (re_compile_fastmap_iter): Don't use
10141         alloca (mb_cur_max); just use an array of size MB_LEN_MAX.
10142         * lib/regexec.c (push_fail_stack): Use re_realloc, not realloc.
10143         (find_recover_state): Change "err" to "*err"; this fixes what
10144         appears to be a real bug.
10145         (check_arrival_expand_ecl_sub): Be consistent about reg_errcode_t
10146         versus int.
10147
10148 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10149
10150         * modules/regex (Depends-on): Add malloc, since the code
10151         assumes that !malloc(0) means failure.
10152
10153 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10154
10155         * lib/regexec.c (set_regs): Don't alloca with an unbounded size.
10156
10157         alloca modernization/simplification for regex.
10158         * lib/regex.c: Remove portability cruft for alloca.  This no longer
10159         needs to be at the start of the file, and can be moved into
10160         regex_internal.h and simplified.
10161         * lib/regex_internal.h: Include <alloca.h>.
10162         (__libc_use_alloca) [!defined _LIBC]: New macro.
10163         * lib/regexec.c (build_trtable): Remove "#ifdef _LIBC", since the code
10164         now works outside glibc.
10165
10166 2005-08-25  Paul Eggert  <eggert@cs.ucla.edu>
10167
10168         * config/srclist.txt: Add glibc bugs 1241, 1245.
10169
10170 2005-08-25  Jim Meyering  <jim@meyering.net>
10171
10172         * lib/open-safer.c: Include <config.h>.
10173         Otherwise, we'd lose LARGEFILE support in any file using
10174         e.g. "fcntl--.h"
10175
10176 2005-08-25  Bruno Haible  <bruno@clisp.org>
10177
10178         * m4/minmax.m4: Require autoconf 2.52.
10179         (gl_MINMAX_IN_HEADER): Add comments. Use m4_pushdef/m4_popdef instead
10180         of define/undefine. Use AS_TR_SH and AS_TR_CPP as more robust
10181         alternatives of translit over the alphabet.
10182         Based on a patch from Stepan Kasal <kasal@ucw.cz>.
10183
10184 2005-08-24  Simon Josefsson  <jas@extundo.com>
10185
10186         * tests/test-getpass.c: New file.
10187
10188 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10189
10190         * m4/regex.m4 (gl_REGEX): Use POSIX-compliant spellings when testing
10191         for GNU regex features.
10192
10193 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10194
10195         * lib/regcomp.c (regerror): 2nd arg is 'restrict', as per POSIX.
10196         * lib/regex.h (regerror): Likewise.
10197
10198         * lib/regex.c: Do not include <sys/types.h>, as POSIX no longer
10199         requires this.  (The code never needed it.)
10200
10201         * lib/regcomp.c, regex_internal.c, regex_internal.h, regexec.c:
10202         All uses of recently-renamed identifiers changed to use the new,
10203         POSIX-compliant names.  The code will build and run just fine
10204         without these changes, but it's better to eat our own dog food
10205         and use the standard-conforming names.
10206
10207         * lib/regex.h: Fix a multitude of POSIX name space violations.
10208         These changes have an effect only for programs that define
10209         _POSIX_C_SOURCE, _POSIX_SOURCE, or _XOPEN_SOURCE; they
10210         do not change anything for programs compiled in the normal way.
10211         Also, there is no effect on the ABI.
10212
10213         (_REGEX_SOURCE): New macro.
10214         Do not include <stddef.h> if _XOPEN_SOURCE and VMS are both
10215         defined and _GNU_SOURCE is not; this fixes a name space violation.
10216
10217         Rename the following macros to obey POSIX requirements.
10218         The old names are still visible as macros if _REGEX_SOURCE is defined.
10219         (REG_BACKSLASH_ESCAPE_IN_LISTS): renamed from
10220         RE_BACKSLASH_ESCAPE_IN_LISTS.
10221         (REG_BK_PLUS_QM): renamed from RE_BK_PLUS_QM.
10222         (REG_CHAR_CLASSES): renamed from RE_CHAR_CLASSES.
10223         (REG_CONTEXT_INDEP_ANCHORS): renamed from RE_CONTEXT_INDEP_ANCHORS.
10224         (REG_CONTEXT_INDEP_OPS): renamed from RE_CONTEXT_INDEP_OPS.
10225         (REG_CONTEXT_INVALID_OPS): renamed from RE_CONTEXT_INVALID_OPS.
10226         (REG_DOT_NEWLINE): renamed from RE_DOT_NEWLINE.
10227         (REG_DOT_NOT_NULL): renamed from RE_DOT_NOT_NULL.
10228         (REG_HAT_LISTS_NOT_NEWLINE): renamed from RE_HAT_LISTS_NOT_NEWLINE.
10229         (REG_INTERVALS): renamed from RE_INTERVALS.
10230         (REG_LIMITED_OPS): renamed from RE_LIMITED_OPS.
10231         (REG_NEWLINE_ALT): renamed from RE_NEWLINE_ALT.
10232         (REG_NO_BK_BRACES): renamed from RE_NO_BK_BRACES.
10233         (REG_NO_BK_PARENS): renamed from RE_NO_BK_PARENS.
10234         (REG_NO_BK_REFS): renamed from RE_NO_BK_REFS.
10235         (REG_NO_BK_VBAR): renamed from RE_NO_BK_VBAR.
10236         (REG_NO_EMPTY_RANGES): renamed from RE_NO_EMPTY_RANGES.
10237         (REG_UNMATCHED_RIGHT_PAREN_ORD): renamed from
10238         RE_UNMATCHED_RIGHT_PAREN_ORD.
10239         (REG_NO_POSIX_BACKTRACKING): renamed from RE_NO_POSIX_BACKTRACKING.
10240         (REG_NO_GNU_OPS): renamed from RE_NO_GNU_OPS.
10241         (REG_DEBUG): renamed from RE_DEBUG.
10242         (REG_INVALID_INTERVAL_ORD): renamed from RE_INVALID_INTERVAL_ORD.
10243         (REG_IGNORE_CASE): renamed from RE_ICASE.  This renaming is a bit
10244         unusual, since we can't clash with the POSIX REG_ICASE.
10245         (REG_CARET_ANCHORS_HERE): renamed from RE_CARET_ANCHORS_HERE.
10246         (REG_CONTEXT_INVALID_DUP): renamed from RE_CONTEXT_INVALID_DUP.
10247         (REG_NO_SUB): renamed from RE_NO_SUB.
10248         (REG_SYNTAX_EMACS): renamed from RE_SYNTAX_EMACS.
10249         (REG_SYNTAX_AWK): renamed from RE_SYNTAX_AWK.
10250         (REG_SYNTAX_GNU_AWK): renamed from RE_SYNTAX_GNU_AWK.
10251         (REG_SYNTAX_POSIX_AWK): renamed from RE_SYNTAX_POSIX_AWK.
10252         (REG_SYNTAX_GREP): renamed from RE_SYNTAX_GREP.
10253         (REG_SYNTAX_EGREP): renamed from RE_SYNTAX_EGREP.
10254         (REG_SYNTAX_POSIX_EGREP): renamed from RE_SYNTAX_POSIX_EGREP.
10255         (REG_SYNTAX_ED): renamed from RE_SYNTAX_ED.
10256         (REG_SYNTAX_SED): renamed from RE_SYNTAX_SED.
10257         (_REG_SYNTAX_POSIX_COMMON): renamed from _RE_SYNTAX_POSIX_COMMON.
10258         (REG_SYNTAX_POSIX_BASIC): renamed from RE_SYNTAX_POSIX_BASIC.
10259         (REG_SYNTAX_POSIX_MINIMAL_BASIC): renamed from
10260         RE_SYNTAX_POSIX_MINIMAL_BASIC.
10261         (REG_SYNTAX_POSIX_EXTENDED): renamed from RE_SYNTAX_POSIX_EXTENDED.
10262         (REG_SYNTAX_POSIX_MINIMAL_EXTENDED): renamed from
10263         RE_SYNTAX_POSIX_MINIMAL_EXTENDED.
10264         (REG_DUP_MAX): renamed from RE_DUP_MAX.  No need to undef it.
10265         (REG_UNALLOCATED): Renamed from REGS_UNALLOCATED.
10266         (REG_REALLOCATE): Renamed from REGS_REALLOCATE.
10267         (REG_FIXED): Renamed from REGS_FIXED.
10268         (REG_NREGS): Renamed from RE_NREGS.
10269
10270         (REG_ICASE, REG_NEWLINE, REG_NOSUB): Do not depend on the values
10271         of other REG_* macros, since POSIX says the user is allowed to
10272         #undef these macros selectively.
10273
10274         (reg_errcode_t): Update comment stating what other tables need
10275         to be consistent.
10276
10277         Rename the following enum values to obey POSIX requirements.
10278         The old names are still visible as macros.
10279         (_REG_ENOSYS): Renamed from REG_ENOSYS.  Define even if _XOPEN_SOURCE
10280         is not defined, since GNU is supposed to be a superset of POSIX as
10281         much as possible, and since we want reg_errcode_t to be a signed
10282         type for implementation consistency.
10283         (_REG_NOERROR): Renamed from REG_NOERROR.
10284         (_REG_NOMATCH): Renamed from REG_NOMATCH.
10285         (_REG_BADPAT): Renamed from REG_BADPAT.
10286         (_REG_ECOLLATE): Renamed from REG_ECOLLATE.
10287         (_REG_ECTYPE): Renamed from REG_ECTYPE.
10288         (_REG_EESCAPE): Renamed from REG_EESCAPE.
10289         (_REG_ESUBREG): Renamed from REG_ESUBREG.
10290         (_REG_EBRACK): Renamed from REG_EBRACK.
10291         (_REG_EPAREN): Renamed from REG_EPAREN.
10292         (_REG_EBRACE): Renamed from REG_EBRACE.
10293         (_REG_BADBR): Renamed from REG_BADBR.
10294         (_REG_ERANGE): Renamed from REG_ERANGE.
10295         (_REG_ESPACE): Renamed from REG_ESPACE.
10296         (_REG_BADRPT): Renamed from REG_BADRPT.
10297         (_REG_EEND): Renamed from REG_EEND.
10298         (_REG_ESIZE): Renamed from REG_ESIZE.
10299         (_REG_ERPAREN): Renamed from REG_ERPAREN.
10300         (REG_ENOSYS, REG_NOERROR, REG_NOMATCH, REG_BADPAT, REG_ECOLLATE):
10301         (REG_ECTYPE, REG_EESCAPE, REG_ESUBREG, REG_EBRACK, REG_EPAREN):
10302         (REG_EBRACE, REG_BADBR, REG_ERANGE, REG_ESPACE, REG_BADRPT, REG_EEND):
10303         (REG_ESIZE, REG_ERPAREN): Now macros, not enum constants.
10304
10305         (_REG_RE_NAME, _REG_RM_NAME): New macros.
10306         (REG_TRANSLATE_TYPE): Renamed from RE_TRANSLATE_TYPE.  All uses
10307         changed.  But support the old name if the new one is not defined
10308         and if _REGEX_SOURCE.
10309
10310         Change the following member names in struct re_pattern_buffer.
10311         The old names are still supported if !_REGEX_SOURCE.
10312         The new names are always supported, regardless of _REGEX_SOURCE.
10313         (re_buffer): Renamed from buffer.
10314         (re_allocated): Renamed from allocated.
10315         (re_used): Renamed from used.
10316         (re_syntax): Renamed from syntax.
10317         (re_fastmap): Renamed from fastmap.
10318         (re_translate): Renamed from translate.
10319         (re_can_be_null): Renamed from can_be_null.
10320         (re_regs_allocated): Renamed from regs_allocated.
10321         (re_fastmap_accurate): Renamed from fastmap_accurate.
10322         (re_no_sub): Renamed from no_sub.
10323         (re_not_bol): Renamed from not_bol.
10324         (re_not_eol): Renamed from not_eol.
10325         (re_newline_anchor): Renamed from newline_anchor.
10326
10327         Change the following member names in struct re_registers.
10328         The old names are still supported if !_REGEX_SOURCE.
10329         The new names are always supported, regardless of _REGEX_SOURCE.
10330         (rm_num_regs): Renamed from num_regs.
10331         (rm_start): Renamed from start.
10332         (rm_end): Renamed from end.
10333
10334         (re_set_syntax, re_compile_pattern, re_compile_fastmap):
10335         (re_search, re_search_2, re_match, re_match_2, re_set_registers):
10336         Prepend __ to parameter names.
10337
10338         Undo yesterday's changes.
10339
10340 2005-08-24  Paul Eggert  <eggert@cs.ucla.edu>
10341
10342         * config/srclist.txt: Remove glibc bug 1233 and add 1236, which
10343         supersedes it. Add glibc bugs 1237, 1238, 1240.  Comment out
10344         lib/regex.c.
10345
10346 2005-08-24  Jim Meyering  <jim@meyering.net>
10347
10348         Sync from coreutils.
10349         * m4/fcntl-safer.m4: New file.
10350
10351         * m4/xgetcwd.m4: Use AC_LIBSOURCES and AC_LIBOBJ to indicate source
10352         and object files for this module.
10353
10354 2005-08-24  Jim Meyering  <jim@meyering.net>
10355
10356         Sync from coreutils.
10357         * lib/fcntl--.h, lib/fcntl-safer.h, lib/open-safer.c: New files.
10358
10359 2005-08-24  Jim Meyering  <jim@meyering.net>
10360
10361         * modules/xgetcwd (Makefile.am): Remove `lib_SOURCES += ...' line,
10362         now that xgetcwd.m4 requires xgetcwd.c and xgetcwd.h.
10363
10364 2005-08-24  Jim Meyering  <jim@meyering.net>
10365
10366         * modules/fcntl-safer: New module.
10367         * modules/fts (Depends-on): Add fcntl-safer.
10368         * MODULES.html.sh (File descriptor based Input/Output):
10369         Add fcntl-safer.
10370
10371 2005-08-24  Bruno Haible  <bruno@clisp.org>
10372
10373         Support for unit test modules.
10374         * modules/README: Mention tests modules.
10375         * modules/TEMPLATE-TESTS: New file.
10376         * gnulib-tool: New options --extract-tests-module, --with-tests and
10377         --tests-base (unused for the moment).
10378         (testsbase, inctests): New variables.
10379         (func_all_modules): Exclude TEMPLATE-TESTS and *-tests.
10380         (func_verify_module): Exclude TEMPLATE-TESTS.
10381         (func_verify_nontests_module, func_verify_tests_module): New functions.
10382         (func_get_dependencies): Add implicit dependency for tests modules.
10383         (func_get_tests_module): New function.
10384         (func_modules_transitive_closure): When --with-tests was specified,
10385         include the unit tests as well, unless explicitly avoided.
10386         (func_emit_lib_Makefile_am): Ignore the tests modules here.
10387         (func_emit_tests_Makefile_am): New function.
10388         (func_create_testdir): When --with-tests was specified, emit a
10389         tests/ directory.
10390         * MODULES.html.sh (Future developments): Update.
10391
10392 2005-08-24  Bruno Haible  <bruno@clisp.org>
10393
10394         * modules/tls-tests: New file.
10395         * tests/test-tls.c: New file, from GNU gettext.
10396
10397 2005-08-24  Bruno Haible  <bruno@clisp.org>
10398
10399         * modules/lock-tests: New file.
10400         * tests/test-lock.c: New file, from GNU gettext.
10401
10402 2005-08-24  Bruno Haible  <bruno@clisp.org>
10403
10404         * lib/lock.h: Add multiple inclusion guard.
10405         * lib/tls.h: Add multiple inclusion guard.
10406
10407 2005-08-24  Bruno Haible  <bruno@clisp.org>
10408
10409         * gnulib-tool: Add support for the --aux-dir option to
10410         --create-testdir, --create-megatestdir, --test, --megatest.
10411         (func_create_testdir, func_create_megatestdir): Optionally emit a
10412         AC_CONFIG_AUX_DIR directive.
10413         (create-testdir, create-megatestdir, test, megatest): Provide a
10414         default value for $auxdir.
10415
10416 2005-08-24  Bruno Haible  <bruno@clisp.org>
10417
10418         * gnulib-tool (import): Use compound statement instead of subshell
10419         where possible.
10420
10421 2005-08-24  Bruno Haible  <bruno@clisp.org>
10422
10423         * gnulib-tool (import): Change --aux-dir default to "build-aux".
10424
10425 2005-08-24  Bruno Haible  <bruno@clisp.org>
10426
10427         * gnulib-tool (func_version): Update.
10428
10429 2005-08-24  Bruno Haible  <bruno@clisp.org>
10430
10431         * gnulib-tool (func_import, func_create_testdir,
10432         func_create_megatestdir): Quote all autoconf macro arguments.
10433
10434 2005-08-24  Bruno Haible  <bruno@clisp.org>
10435
10436         * gnulib-tool (func_create_megatestdir): Call autoreconf without the
10437         option --force, because --force causes the aclocal.m4 of each
10438         subdirectory to be newer than the corresponding config.h.in.
10439
10440 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10441
10442         * m4/regex.m4 (gl_INCLUDED_REGEX): Remove; no longer used.
10443         All contents moved to gl_REGEX.
10444         (gl_REGEX): Don't bother checking whether lib/regex.c exists;
10445         assume that it does.
10446
10447 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10448
10449         * lib/regex.h (REG_NOSYS)
10450         [!defined _XOPEN_SOURCE && 200112L <= _POSIX_C_SOURCE]:
10451         Define, since POSIX requires it as of 2001.
10452         (_REG_ENOSYS)
10453         [! (defined _XOPEN_SOURCE || 200112L <= _POSIX_C_SOURCE)]:
10454         New private symbol, used to keep the enum signed in all cases.
10455         * lib/regex.h (RE_NO_EMPTY_RANGES): Fix doc bug reported by James
10456         Youngman in
10457         <http://lists.gnu.org/archive/html/bug-gnulib/2005-07/msg00132.html>.
10458
10459         * lib/regex_internal.c (re_string_skip_chars, register_state):
10460         (calc_state_hash):
10461         Remove forward decls; no longer needed now that we use prototypes.
10462         * lib/regexec.c (acquire_init_state_context, check_halt_node_context):
10463         (proceed_next_node, pop_fail_stack, sub_epsilon_src_nodes):
10464         (clean_state_log_if_needed): Likewise.
10465
10466 2005-08-23  Paul Eggert  <eggert@cs.ucla.edu>
10467
10468         * config/srclist.txt: Add glibc bugs 1231-1233.
10469
10470 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10471
10472         Fix problems reported by Sam Steingold in
10473         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00007.html>.
10474         * lib/regexec.c (sift_states_bkref): Fix portability bug: the code
10475         assumed that reg_errcode_t is a signed type, which is not
10476         necessarily true if _XOPEN_SOURCE is not defined.
10477         * lib/regex_internal.c (calc_state_hash): Put 'inline' before type,
10478         since some compilers warn about it otherwise.
10479
10480 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10481
10482         * lib/regcomp.c (create_initial_state): Remove duplicate decl.
10483         (init_word_char, create_initial_state, duplicate_node_closure):
10484         (fetch_token, peek_token_bracket, build_range_exp):
10485         (build_collating_symbol): Remove forward decls; no longer needed
10486         now that we use prototypes.
10487
10488         * lib/regcomp.c:
10489         (re_compile_pattern, re_set_syntax, re_compile_fastmap):
10490         (re_compile_fastmap_iter, regcomp, regerror, regfree):
10491         (re_compile_internal, init_dfa, init_word_char, free_workarea_compile):
10492         (create_initial_state, optimize_utf8, analyze, postorder, preorder):
10493         (optimize_subexps, lower_subexps, lower_subexp, calc_first, calc_next):
10494         (link_nfa_nodes, duplicate_node_closure, search_duplicated_node):
10495         (duplicate_node, calc_inveclosure, calc_eclosure, calc_eclosure_iter):
10496         (fetch_token, peek_token, peek_token_bracket, parse, parse_reg_exp):
10497         (parse_branch, parse_expression, parse_sub_exp, parse_dup_op):
10498         (build_range_exp, build_collating_symbol, parse_bracket_exp):
10499         (parse_bracket_element, parse_bracket_symbol, build_equiv_class):
10500         (build_charclass, build_charclass_op, fetch_number, create_tree):
10501         (create_token_tree, mark_opt_subexp, duplicate_tree):
10502         Use prototypes rather than old-style definitions.
10503
10504         * lib/regex_internal.c:
10505         (re_string_allocate, re_string_construct, re_string_realloc_buffers):
10506         (re_string_construct_common, build_wcs_buffer, build_wcs_upper_buffer):
10507         (re_string_skip_chars, build_upper_buffer, re_string_translate_buffer):
10508         (re_string_reconstruct, re_string_peek_byte_case):
10509         (re_string_fetch_byte_case, re_string_destruct, re_string_context_at):
10510         (re_node_set_alloc, re_node_set_init_1, re_node_set_init_2):
10511         (re_node_set_init_copy, re_node_set_add_intersect):
10512         (re_node_set_init_union, re_node_set_merge, re_node_set_insert):
10513         (re_node_set_insert_last, re_node_set_compare, re_node_set_contains):
10514         (re_node_set_remove_at, re_dfa_add_node, calc_state_hash):
10515         (re_acquire_state, re_acquire_state_context, register_state):
10516         (create_ci_newstate, create_cd_newstate, free_state):
10517         Likewise.
10518         * lib/regexec.c (regexec, re_match, re_search, re_match_2,
10519         re_search_2):
10520         (re_search_2_stub, re_search_stub, re_copy_regs, re_set_registers):
10521         (re_search_internal, prune_impossible_nodes):
10522         (acquire_init_state_context, check_matching, static):
10523         (check_halt_node_context, check_halt_state_context, proceed_next_node):
10524         (push_fail_stack, pop_fail_stack, set_regs, free_fail_stack_return):
10525         (update_regs, sift_states_backward, build_sifted_states):
10526         (clean_state_log_if_needed, merge_state_array):
10527         (update_cur_sifted_state, add_epsilon_src_nodes):
10528         (sub_epsilon_src_nodes, check_dst_limits, check_dst_limits_calc_pos_1):
10529         (check_dst_limits_calc_pos, check_subexp_limits, sift_states_bkref):
10530         (sift_states_iter_mb, transit_state, merge_state_with_log, static):
10531         (find_recover_state, check_subexp_matching_top, transit_state_mb):
10532         (transit_state_bkref, get_subexp, get_subexp_sub, find_subexp_node):
10533         (check_arrival, check_arrival_add_next_nodes):
10534         (check_arrival_expand_ecl, check_arrival_expand_ecl_sub):
10535         (expand_bkref_cache, build_trtable, group_nodes_into_DFAstates):
10536         (check_node_accept_bytes, check_node_accept, extend_buffers):
10537         (match_ctx_init, match_ctx_clean, match_ctx_free, match_ctx_add_entry):
10538         (search_cur_bkref_entry, match_ctx_add_subtop, match_ctx_add_sublast):
10539         (sift_ctx_init):
10540         Likewise.
10541
10542         * lib/regex_internal.h:
10543         (re_string_allocate, re_string_construct, re_string_reconstruct):
10544         (re_string_realloc_buffers, build_wcs_buffer, build_wcs_upper_buffer):
10545         (build_upper_buffer, re_string_translate_buffer, re_string_destruct):
10546         (re_string_elem_size_at, re_string_char_size_at, re_string_wchar_at):
10547         (re_string_context_at, re_string_peek_byte_case):
10548         (re_string_fetch_byte_case): Declare even if RE_NO_INTERNAL_PROTOTYPES
10549         is defined, since we now use prototypes always.
10550
10551         * lib/regex.h (_RE_ARGS): Remove.  No longer needed, since we assume
10552         C89 or better.  All uses removed.
10553
10554 2005-08-20  Paul Eggert  <eggert@cs.ucla.edu>
10555
10556         * config/srclist.txt: Add glibc bugs 1220-1227.
10557
10558 2005-08-20  Jim Meyering  <jim@meyering.net>
10559
10560         * lib/regexec.c (regexec, re_search_stub) [!_LIBC]: Omit declaration
10561         of unused local, dfa.
10562
10563 2005-08-20  Bruno Haible  <bruno@clisp.org>
10564
10565         * m4/regex.m4 (gl_PREREQ_REGEX): Require AC_GNU_SOURCE.
10566
10567 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10568
10569         * lib/regex_internal.c (re_string_realloc_buffers, re_node_set_insert):
10570         (re_node_set_insert_last, re_dfa_add_node):
10571         Rename local variables to avoid GCC shadowing warnings.
10572
10573 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10574
10575         * lib/regex_internal.c (re_acquire_state, re_acquire_state_context)
10576         [defined lint]: Suppress bogus uninitialized-variable warnings.
10577
10578         * lib/regcomp.c (duplicate_node): Return new index, not an error code,
10579         and let the caller return REG_ESPACE if out of space.  This
10580         removes an uninitialied-variable warning with GCC 4.0.1, and also
10581         avoids taking the address of a local variable.  All callers
10582         changed.
10583
10584 2005-08-19  Paul Eggert  <eggert@cs.ucla.edu>
10585
10586         * config/srclist.txt: Comment out $LIBCSRC/posix/regex_internal.c,
10587         $LIBCSRC/posix/regexec.c.
10588         Add glibc bug 1217 for regcomp.c.
10589
10590 2005-08-19  Jim Meyering  <jim@meyering.net>
10591
10592         * lib/regexec.c (proceed_next_node): Redo local variables to
10593         avoid GCC shadowing warnings.
10594
10595 2005-08-18  Bruno Haible  <bruno@clisp.org>
10596
10597         * lib/strstr.c (strstr): Fix return value in multibyte case.
10598         * lib/strcasestr.c (strcasestr): Likewise.
10599
10600 2005-08-17  Paul Eggert  <eggert@cs.ucla.edu>
10601
10602         * lib/regex.h: Remove useless space-before-tab.  From coreutils.
10603
10604 2005-08-17  Jim Meyering  <jim@meyering.net>
10605
10606         Make the %s format (seconds since the epoch) work for a negative
10607         number and when used with a zero-padded field width, e.g. %015s.
10608
10609         * lib/strftime.c (my_strftime): Move the `do_number_sign_and_padding'
10610         label so that it precedes the code to set `digits'.  Otherwise,
10611         %0Ns wouldn't work.  Before this change, `date -d @-22 +%05s' would
10612         print `00-22'.  Now, it prints `-0022', as it should.
10613
10614 2005-08-17  Bruno Haible  <bruno@clisp.org>
10615
10616         * modules/strstr (Files): Add m4/mbrtowc.m4.
10617         (Depends-on): Add mbuiter.
10618
10619 2005-08-17  Bruno Haible  <bruno@clisp.org>
10620
10621         * modules/strcasestr: New file.
10622         * MODULES.html.sh (String handling, based on ANSI C 89): Add
10623         strcasestr.
10624
10625 2005-08-17  Bruno Haible  <bruno@clisp.org>
10626
10627         * modules/strcase (Depends-on): Add mbuiter. Remove strnlen1, mbchar.
10628
10629 2005-08-17  Bruno Haible  <bruno@clisp.org>
10630
10631         * modules/mbuiter: New file.
10632         * MODULES.html.sh (Extended multibyte and wide character utilities):
10633         Add mbuiter.
10634
10635 2005-08-17  Bruno Haible  <bruno@clisp.org>
10636
10637         * m4/strstr.m4 (gl_FUNC_STRSTR): Use the replacement function always.
10638         (gl_PREREQ_STRSTR): Use gl_FUNC_MBRTOWC.
10639
10640 2005-08-17  Bruno Haible  <bruno@clisp.org>
10641
10642         * m4/strcasestr.m4: New file.
10643
10644 2005-08-17  Bruno Haible  <bruno@clisp.org>
10645
10646         * lib/strstr.h: Ignore HAVE_STRSTR, always declare the gnulib function.
10647         * lib/strstr.c: Completely rewritten, with multibyte locale support.
10648
10649 2005-08-17  Bruno Haible  <bruno@clisp.org>
10650
10651         * lib/strcasestr.h: New file.
10652         * lib/strcasestr.c: New file.
10653
10654 2005-08-17  Bruno Haible  <bruno@clisp.org>
10655
10656         * lib/strcasecmp.c: Use mbuiter.h.
10657
10658 2005-08-17  Bruno Haible  <bruno@clisp.org>
10659
10660         * lib/mbuiter.h: New file.
10661
10662 2005-08-16  Paul Eggert  <eggert@cs.ucla.edu>
10663
10664         * m4/getopt.m4 (gl_GETOPT_CHECK_HEADERS): Do not override the results
10665         of gl_GETOPT_SUBSTITUTE.  That way, if both gl_GETOPT_SUBSTITUTE
10666         and gl_GETOPT are both invoked via different paths (as happens
10667         with GNU tar CVS because it uses both argp and getopt), the former
10668         wins.
10669
10670 2005-08-16  Bruno Haible  <bruno@clisp.org>
10671
10672         * modules/tls: New file.
10673         * MODULES.html.sh (Multithreading): Add tls.
10674
10675 2005-08-16  Bruno Haible  <bruno@clisp.org>
10676
10677         * modules/strnlen1: New file.
10678         * MODULES.html.sh (String handling): Add strnlen1.
10679
10680 2005-08-16  Bruno Haible  <bruno@clisp.org>
10681
10682         * modules/strcase (Files): Add m4/mbrtowc.m4.
10683         (Depends-on): Add strnlen1, mbchar.
10684
10685 2005-08-16  Bruno Haible  <bruno@clisp.org>
10686
10687         * modules/mbiter: New file.
10688         * MODULES.html.sh (Extended multibyte and wide character utilities):
10689         Add mbiter.
10690
10691 2005-08-16  Bruno Haible  <bruno@clisp.org>
10692
10693         * modules/mbfile: New file.
10694         * MODULES.html.sh (Extended multibyte and wide character utilities):
10695         Add mbfile.
10696
10697 2005-08-16  Bruno Haible  <bruno@clisp.org>
10698
10699         * modules/mbchar: New file.
10700         * MODULES.html.sh (Extended multibyte and wide character utilities):
10701         New section.
10702
10703 2005-08-16  Bruno Haible  <bruno@clisp.org>
10704
10705         * m4/tls.m4: New file, from GNU gettext.
10706
10707 2005-08-16  Bruno Haible  <bruno@clisp.org>
10708
10709         * m4/strcase.m4 (gl_FUNC_STRCASECMP): Use the replacement function
10710         always.
10711         (gl_PREREQ_STRCASECMP): Use gl_FUNC_MBRTOWC.
10712
10713 2005-08-16  Bruno Haible  <bruno@clisp.org>
10714
10715         * m4/mbiter.m4: New file.
10716
10717 2005-08-16  Bruno Haible  <bruno@clisp.org>
10718
10719         * m4/mbfile.m4: New file.
10720
10721 2005-08-16  Bruno Haible  <bruno@clisp.org>
10722
10723         * m4/mbchar.m4: New file.
10724
10725 2005-08-16  Bruno Haible  <bruno@clisp.org>
10726
10727         * lib/tls.h: New file, from GNU gettext.
10728         * lib/tls.c: New file, from GNU gettext.
10729
10730 2005-08-16  Bruno Haible  <bruno@clisp.org>
10731
10732         * lib/strnlen1.h: New file.
10733         * lib/strnlen1.c: New file.
10734
10735 2005-08-16  Bruno Haible  <bruno@clisp.org>
10736
10737         * lib/strcasecmp.c (struct mbiter_multi): Remove at_end field.
10738         (mbi_init): Update.
10739         (mbi_avail, mbi_advance): Let the iteration end before the terminating
10740         NUL byte, not after it.
10741
10742 2005-08-16  Bruno Haible  <bruno@clisp.org>
10743
10744         * lib/strcase.h (strcasecmp): Add note in comments.
10745         * lib/strncasecmp.c: Use code from strcasecmp.c.
10746         * lib/strcasecmp.c: Use mbchar module. Define private mbiter variant.
10747         (strcasecmp): Work correctly in multibyte locales.
10748
10749 2005-08-16  Bruno Haible  <bruno@clisp.org>
10750
10751         * lib/mbiter.h: New file.
10752
10753 2005-08-16  Bruno Haible  <bruno@clisp.org>
10754
10755         * lib/mbfile.h: New file.
10756
10757 2005-08-16  Bruno Haible  <bruno@clisp.org>
10758
10759         * lib/mbchar.h: New file.
10760         * lib/mbchar.c: New file.
10761
10762 2005-08-16  Bruno Haible  <bruno@clisp.org>
10763
10764         * lib/mbchar.h (mb_cmp, mb_casecmp): Order the invalid characters after
10765         the valid ones. Makes the comparison operations transitive:
10766         cmp (a, b) < 0 && cmp (b, c) < 0 ==> cmp (a, c) < 0.
10767         * lib/strcasecmp.c (strcasecmp): Use mb_casecmp.
10768
10769 2005-08-15  Simon Josefsson  <jas@extundo.com>
10770
10771         * modules/ssize_t (License): Change to 'unlimited'.
10772
10773         * gnulib-tool (sed_extract_prog): Recognize 'unlimited' license.
10774
10775 2005-08-15  Paul Eggert  <eggert@cs.ucla.edu>
10776
10777         * config/srclist.txt: Comment out $LIBCSRC/posix/regex.h.
10778         Add comments for each pending glibc patch.
10779
10780 2005-08-15  Bruno Haible  <bruno@clisp.org>
10781
10782         * lib/regex.h (__restrict_arr): Don't define to __restrict if
10783         __cplusplus is defined.
10784
10785 2005-08-14  Jim Meyering  <jim@meyering.net>
10786
10787         Sync from coreutils.
10788
10789         * lib/fts-cycle.c (setup_dir, enter_dir, leave_dir, free_dir):
10790         Use the hash-table-based cycle-detection code not just when
10791         FTS_TIGHT_CYCLE_CHECK if specified, but also with FTS_LOGICAL.
10792         Reported by James Youngman in
10793         <http://lists.gnu.org/archive/html/bug-gnulib/2005-08/msg00011.html>.
10794         * lib/fts_.h: Mention that with FTS_LOGICAL, we use
10795         FTS_TIGHT_CYCLE_CHECK.
10796         * lib/fts.c (fts_cross_check) [FTS_DEBUG]:
10797         s/active_dir_ht/fts_cycle.ht/. This lets us compile with -DFTS_DEBUG,
10798         once again.
10799         * lib/fts.c [! _LIBC]: Include "lstat.h" rather than rolling our own.
10800         * lib/fts.c (fd_safer): Remove decl.
10801         Include fcntl--.h rather than unistd-safer.h
10802         (fts_safe_changedir): Don't call fd_safer; no longer needed
10803         now that we include fcntl--.h.
10804
10805 2005-08-12  Simon Josefsson  <jas@extundo.com>
10806
10807         * modules/getndelim2: Use ssize_t module.
10808         * modules/getnline: Likewise.
10809         * modules/safe-read: Likewise.
10810         * modules/xreadlink: Likewise.
10811
10812         * modules/ssize_t: New file.
10813
10814 2005-08-12  Simon Josefsson  <jas@extundo.com>
10815
10816         * m4/readline.m4: Look for termcap, curses or ncurses if required.
10817
10818 2005-08-12  Simon Josefsson  <jas@extundo.com>
10819
10820         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
10821         ssize_t.
10822
10823 2005-08-12  Simon Josefsson  <jas@extundo.com>
10824
10825         * MODULES.html.sh (Extra functions based on ANSI C 89: Misc): Add
10826         readline, getdelim and check_version.
10827         (Support for systems lacking ISO C 99: Sizes of integer types):
10828         Add size_max.
10829
10830 2005-08-12  Bruno Haible  <bruno@clisp.org>
10831
10832         * m4/readline.m4 (gl_FUNC_READLINE): Look for ncurses first.
10833
10834 2005-08-11  Simon Josefsson  <jas@extundo.com>
10835
10836         * modules/readline: New file.
10837
10838         * modules/strnlen (Files): Add strnlen.h.
10839
10840 2005-08-11  Simon Josefsson  <jas@extundo.com>
10841
10842         * m4/readline.m4: New file.
10843
10844 2005-08-11  Simon Josefsson  <jas@extundo.com>
10845
10846         * lib/readline.h, readline.c: New file.
10847
10848 2005-08-11  Simon Josefsson  <jas@extundo.com>
10849
10850         * doc/gnulib.texi (Initial import, Finishing touches): Mention
10851         gl_AVOID.
10852
10853 2005-08-11  Bruno Haible  <bruno@clisp.org>
10854
10855         * lib/strnlen.h (strnlen): Change parameter name to match comment.
10856
10857 2005-08-10  Stepan Kasal  <kasal@ucw.cz>
10858
10859         * m4/onceonly_2_57.m4: Really require Autoconf 2.57.
10860
10861 2005-08-10  Simon Josefsson  <jas@extundo.com>
10862
10863         * tests/test-iconvme.c: New file.
10864
10865 2005-08-10  Simon Josefsson  <jas@extundo.com>
10866
10867         * m4/strnlen.m4: New file.
10868
10869         * m4/strndup.m4: Don't check for strnlen declaration, done in
10870         strnlen.m4.
10871
10872 2005-08-10  Simon Josefsson  <jas@extundo.com>
10873
10874         * lib/strndup.c: Use strnlen.h.
10875
10876         * lib/strnlen.h: New file.
10877
10878 2005-08-08  Ralf Wildenhues  <Ralf.Wildenhues@gmx.de>  (tiny change)
10879
10880         * README: Typos.
10881
10882 2005-08-02  Simon Josefsson  <jas@extundo.com>
10883
10884         * modules/readline: New file.
10885
10886 2005-08-02  Simon Josefsson  <jas@extundo.com>
10887
10888         * modules/getdelim: New file.
10889
10890         * modules/getline: Rewrite, don't use getndelim2.
10891
10892 2005-08-02  Simon Josefsson  <jas@extundo.com>
10893
10894         * m4/getline.m4: Separate out getdelim stuff into separate module.
10895
10896         * m4/getdelim.m4: New file.
10897
10898 2005-08-02  Simon Josefsson  <jas@extundo.com>
10899
10900         * lib/getline.h, getline.c: Rewrite.
10901
10902         * lib/getdelim.h, lib/getdelim.c: New files, ported from glibc.
10903
10904 2005-07-31  Bruno Haible  <bruno@clisp.org>
10905
10906         * lib/lock.h (gl_lock_initializer): New macro.
10907         (gl_lock_define_initialized): Use it.
10908         (gl_rwlock_initializer): New macro.
10909         (gl_rwlock_define_initialized): Use it.
10910         (gl_recursive_lock_initializer): New macro.
10911         (gl_recursive_lock_define_initialized): Use it.
10912
10913 2005-07-30  Karl Berry  <karl@gnu.org>
10914
10915         * doc/gnulib.texi (Initial import): mention -I$(top_builddir)/lib.
10916         Report from Ben Pfaff, regarding getopt.
10917
10918 2005-07-26  Paul Eggert  <eggert@cs.ucla.edu>
10919
10920         Add support to getopt for Emacs, which doesn't use LIBOBJS in the
10921         normal way.
10922         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE_HEADER): New macro.
10923         (gl_GETOPT_SUBSTITUTE): Use it.  Invoke gl_PREREQ_GETOPT.
10924         (gl_GETOPT_IFELSE, gl_GETOPT_CHECK_HEADERS): New macros.
10925         (gl_GETOPT): Use the new macros.  Most of the implementation
10926         is moved to the new macros.  This is for programs like Emacs
10927         that don't want all the functionality of gl_GETOPT.
10928
10929 2005-07-26  Bruno Haible  <bruno@clisp.org>
10930
10931         * m4/lock.m4: Update from GNU gettext.
10932
10933 2005-07-26  Bruno Haible  <bruno@clisp.org>
10934
10935         * lib/lock.h: Update from GNU gettext.
10936         * lib/lock.c: Update from GNU gettext.
10937
10938 2005-07-25  Paul Eggert  <eggert@cs.ucla.edu>
10939
10940         * m4/regex.m4 (gl_INCLUDED_REGEX): Use AC_RUN_IFELSE instead of the
10941         obsolescent AC_TRY_RUN.  Include the default includes files, for
10942         'exit'.
10943
10944 2005-07-24  Bruno Haible  <bruno@clisp.org>
10945
10946         * modules/visibility: New file.
10947         * MODULES.html.sh (Misc): Add visibility.
10948
10949 2005-07-24  Bruno Haible  <bruno@clisp.org>
10950
10951         * m4/visibility.m4: New file.
10952
10953 2005-07-24  Bruno Haible  <bruno@clisp.org>
10954
10955         * doc/visibility.texi: New file.
10956
10957 2005-07-22  Bruno Haible  <bruno@clisp.org>
10958
10959         * modules/alloca-opt (Makefile.am): Remove explicit dependency on
10960         $(ALLOCA_H), redundant through BUILT_SOURCES.
10961         * modules/argz (Makefile.am): Remove explicit dependency on $(ARGZ_H),
10962         redundant through BUILT_SOURCES.
10963         * modules/byteswap (Makefile.am): Remove explicit dependency on
10964         $(BYTESWAP_H), redundant through BUILT_SOURCES.
10965         * modules/fnmatch (Makefile.am): Remove explicit dependency on
10966         $(FNMATCH_H), redundant through BUILT_SOURCES.
10967         * modules/getopt (Makefile.am): Remove explicit dependency on
10968         $(GETOPT_H), redundant through BUILT_SOURCES.
10969         * modules/glob (Makefile.am): Remove explicit dependency on $(GLOB_H),
10970         redundant through BUILT_SOURCES.
10971         * modules/poll (Makefile.am): Remove explicit dependency on $(POLL_H),
10972         redundant through BUILT_SOURCES.
10973         * modules/stdbool (Makefile.am): Remove explicit dependency on
10974         $(STDBOOL_H), redundant through BUILT_SOURCES.
10975         * modules/stdint (Makefile.am): Remove explicit dependency on
10976         $(STDINT_H), redundant through BUILT_SOURCES.
10977         * modules/sysexits (Makefile.am): Add $(SYSEXITS_H) to BUILT_SOURCES.
10978         Remove explicit dependency on $(SYSEXITS_H).
10979         Reported by Alexandre Duret-Lutz <adl@src.lip6.fr>.
10980
10981 2005-07-18  Simon Josefsson  <jas@extundo.com>
10982
10983         * lib/check-version.c (check_version): Accept identical versions too.
10984
10985 2005-07-18  Bruno Haible  <bruno@clisp.org>
10986
10987         * modules/lock: New file.
10988         * MODULES.html.sh (Multithreading): New section.
10989
10990 2005-07-18  Bruno Haible  <bruno@clisp.org>
10991
10992         * m4/lock.m4: New file, from GNU gettext.
10993
10994 2005-07-18  Bruno Haible  <bruno@clisp.org>
10995
10996         * lib/lock.h: New file, from GNU gettext.
10997         * lib/lock.c: New file, from GNU gettext.
10998
10999 2005-07-18  Bruno Haible  <bruno@clisp.org>
11000
11001         * lib/lock.h (gl_once_t): New type.
11002         (gl_once_define, gl_once): New macros.
11003         * lib/lock.c (fresh_once): New variable.
11004         (glthread_once, glthread_once_call, glthread_once_singlethreaded): New
11005         functions.
11006
11007 2005-07-16  Simon Josefsson  <jas@extundo.com>
11008
11009         * doc/gnulib.texi (Library version handling): Add ELF symbol collision
11010         workaround, suggested by Bruno.
11011
11012 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11013
11014         * modules/xalloc (Depends-on): Add xalloc-die.
11015         * modules/xvasprintf (Depends-on): Add xalloc-die.
11016
11017 2005-07-15  Paul Eggert  <eggert@cs.ucla.edu>
11018
11019         * lib/quotearg.c: Add translator comment suggested by Bruno Haible,
11020         with a minor change.
11021
11022 2005-07-15  Bruno Haible  <bruno@clisp.org>
11023
11024         * m4/poll.m4 (gl_FUNC_POLL): Check against MacOS X 10.4 poll() bug.
11025         When using lib/poll.c, define poll as rpl_poll.
11026
11027 2005-07-14  Paul Eggert  <eggert@cs.ucla.edu>
11028
11029         * modules/argp (Depends-on): Remove unlocked-io.
11030
11031 2005-07-14  Derek Price  <derek@ximbiot.com>
11032
11033         * m4/glob.m4 (gl_GLOB): Cache glob interface check result.  Add check
11034         for glob symlink bug.
11035
11036 2005-07-14  Bruno Haible  <bruno@clisp.org>
11037
11038         * m4/argp.m4 (gl_ARGP): Remove invocation of gl_FUNC_GLIBC_UNLOCKED_IO.
11039         Instead, test for *_unlocked function declarations directly.
11040
11041 2005-07-11  Simon Josefsson  <jas@extundo.com>
11042
11043         * modules/size_max: New file.
11044
11045         * modules/xsize: Depend on size_max module for size_max.m4.
11046
11047 2005-07-11  Simon Josefsson  <jas@extundo.com>
11048
11049         * lib/size_max.h: New file.
11050
11051 2005-07-11  Paul Eggert  <eggert@cs.ucla.edu>
11052
11053         * lib/version-etc-fsf.c (version_etc_copyright): Parameterize the
11054         copyright symbol and the year.
11055         * lib/version-etc.c (COPYRIGHT_YEAR): New constant.
11056         (version_etc_va): Use parameterized copyright notice.
11057         Reword to conform to the current GNU coding standards.
11058
11059 2005-07-11  Karl Berry  <karl@gnu.org>
11060
11061         * doc/gnulib.texi (Quoting): new node.
11062         (Initial import): more info, from Patrice.
11063
11064 2005-07-11  Bruno Haible  <bruno@clisp.org>
11065
11066         * gnulib-tool (func_usage): Document option --avoid.
11067         (Command line options): Handle --avoid.
11068         (func_acceptable): New function.
11069         (func_modules_transitive_closure): Use it.
11070
11071 2005-07-11  Bruno Haible  <bruno@clisp.org>
11072
11073         * MODULES.html.sh: Use shortcut URLs to the www.opengroup.org site.
11074         Reported by Jim Meyering.
11075
11076 2005-07-10  Bruno Haible  <bruno@clisp.org>
11077
11078         * m4/size_max.m4 (gl_SIZE_MAX): Cast ~(size_t)0 back to size_t.
11079         Needed when size_t is smaller than 'unsigned int'.
11080         Reported by Paul Eggert.
11081
11082 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11083
11084         * modules/argp (Depends-on): Add unlocked-io
11085
11086 2005-07-09  Sergey Poznyakoff  <gray@gnu.org.ua>
11087
11088         * lib/argp-namefrob.h: Include unlocked-io.h. Removed unnecessary
11089         block of defines.
11090
11091 2005-07-08  Paul Eggert  <eggert@cs.ucla.edu>
11092
11093         * config/srclist.txt: Comment out regcomp.c, since we have a porting
11094         fix now.
11095
11096 2005-07-08  Eric Blake  <ebb9@byu.net>  (tiny change)
11097         and Paul Eggert  <eggert@cs.ucla.edu>
11098
11099         * lib/regcomp.c (init_dfa, build_range_exp): Store __btowc value
11100         in wint_t, not wchar_t.  Remove now-unnecessary cast.
11101
11102 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11103
11104         * modules/regex (Files): Add lib/regex_internal.c,
11105         lib/regex_internal.h, lib/regexec.c, lib/regcomp.c, m4/codeset.m4.
11106         (Depends-on): Add extensions.
11107         (Makefile.am): Remove lib_SOURCES; now done by m4 code.
11108
11109 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11110
11111         * m4/backupfile.m4 (gl_BACKUPFILE): Use AC_CHECK_FUNCS_ONCE on
11112         pathconf.
11113         * m4/same.m4 (gl_SAME): Likewise.
11114         Require AC_SYS_LONG_FILE_NAMES; bug reported by Gerrit P. Haase.
11115
11116         * m4/regex.m4: Adjust to new libc regex implementation.
11117         (gl_INCLUDED_REGEX): Add AC_LIBSOURCES for
11118         all the .c and .h parts of (the new) regex.
11119         Quote the m4 stuff better.
11120         Check for RE_ICASE bug of old gnulib.
11121         Check for REG_STARTEND of recent libc.
11122         Rename local variables from jm_* to gl_*.
11123         Quote operand of "test -f".
11124         Say "recent enough" version of libc, not "version 2".
11125         (gl_PREREQ_REGEX): Remove AC_FUNC_ALLOCA, since alloca is a
11126         prerequisite module.  Remove AC_HEADER_STDC; no longer needed.
11127         Check for locale.h, isblank, mbrtowc, wcrtomb, wcscoll.
11128         Remove check for btowc, isascii.
11129         Require AM_LANGINFO_CODESET.
11130
11131 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11132
11133         * lib/regex.c, regex.h: Sync from libc.
11134         * lib/regcomp.c, lib/regexec_internal.c, lib/regex_internal.h:
11135         * lib/regexec.c:
11136         New files, synced from libc, except that regex_internal.h
11137         currently has a small porting fix.
11138
11139 2005-07-07  Paul Eggert  <eggert@cs.ucla.edu>
11140
11141         * config/srclist.txt: Add regcomp.c, regex.c, regex.h,
11142         regex_internal.c, regexec.c.
11143         Add regex_internal.h too, but as a comment, since the libc version
11144         is currently broken in gnulib mode.
11145
11146 2005-07-06  Paul Eggert  <eggert@cs.ucla.edu>
11147
11148         Support programs like Emacs that use gnulib but not gettext.
11149         * MODULES.html.sh (Internationalization functions): Add gettext-h.
11150         * modules/gettext-h: New file.
11151         * modules/gettext (Files): Remove lib/gettext.h.
11152         (Depends-on): Add gettext-h.
11153         (Makefile.am): Remove lib_SOURCES.
11154         * modules/argmatch, modules/c-stack, modules/closeout:
11155         * modules/copy-file, modules/csharpcomp, modules/csharpexec:
11156         * modules/execute, modules/file-type, modules/getaddrinfo:
11157         * modules/getopt, modules/human, modules/javacomp:
11158         * modules/javaexec, modules/mkdir-p, modules/obstack:
11159         * modules/openat, modules/pagealign_alloc, modules/pipe:
11160         * modules/quotearg, modules/regex, modules/rpmatch:
11161         * modules/unicodeio, modules/userspec, modules/version-etc:
11162         * modules/wait-process, modules/xalloc-die, modules/xmemcoll:
11163         * modules/xsetenv:
11164         Depend on gettext-h, not gettext.
11165
11166 2005-07-05  Paul Eggert  <eggert@cs.ucla.edu>
11167
11168         * gnulib-tool (func_import): Add support for 'public domain' license.
11169         * modules/alloca, modules/atexit, modules/memmove:
11170         Now public domain, not GPL.
11171         * modules/dup2, modules/getpagesize, modules/malloc, modules/memset:
11172         * modules/realloc, modules/strerror, modules/strtod:
11173         Now LGPL, not GPL.
11174
11175 2005-07-05  Bruno Haible  <bruno@clisp.org>
11176
11177         * m4/mbrtowc.m4 (gl_FUNC_MBRTOWC): Upgrade to version from current
11178         autoconf CVS. Needed for mingw.
11179
11180 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11181
11182         Remove the dependency of the strftime module on the tzset module.
11183         * modules/strftime (Depends-on): Remove dependency on tzset.
11184
11185 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11186
11187         Remove the dependency of the strftime module on the tzset module.
11188         * m4/strftime.m4 (gl_FUNC_STRFTIME): Don't require
11189         gl_FUNC_TZSET_CLOBBER.
11190
11191 2005-07-03  Paul Eggert  <eggert@cs.ucla.edu>
11192
11193         Remove the dependency of the strftime module on the tzset module.
11194         * lib/strftime.c (my_strftime)
11195         [! defined _LIBC && ! HAVE_RUN_TZSET_TEST]:
11196         Copy the input structure, to work around some of the bug with
11197         Solaris 2.5.1 and Solaris 2.6.  If you still care about these old
11198         Solaris releases, you should also use the tzset module, but we won't
11199         require it as a dependency any more since we don't want LGPLed code
11200         to depend on GPLed code.
11201
11202 2005-07-02  Jim Meyering  <jim@meyering.net>
11203
11204         * m4/chown.m4, cloexec.m4, dup2.m4, fsusage.m4:
11205         * m4/getcwd-path-max.m4, getcwd.m4, mkstemp.m4, mountlist.m4:
11206         * m4/pagealign_alloc.m4, save-cwd.m4, unistd-safer.m4:
11207         Don't check for fcntl.h, and don't test for HAVE_FCNTL_H.
11208
11209 2005-07-02  Jim Meyering  <jim@meyering.net>
11210
11211         * lib/backupfile.c (backup_args): Change a `0' to NULL.
11212
11213 2005-07-01  Paul Eggert  <eggert@cs.ucla.edu>
11214
11215         * lib/xnanosleep.c: Include timespec.h, since OpenBSD 3.4 <time.h>
11216         declares only 'struct timespec;' (!).
11217
11218 2005-07-01  Jim Meyering  <jim@meyering.net>
11219
11220         * lib/chown.c, cloexec.c, dup-safer.c, dup2.c, fsusage.c, getcwd.c:
11221         * lib/getloadavg.c, mountlist.c, openat.h, pagealign_alloc.c:
11222         * lib/save-cwd.c, tempname.c:
11223         Assume HAVE_FCNTL_H (i.e., include <fcntl.h> unconditionally,
11224         and don't include <sys/file.h>).
11225
11226 2005-06-29  Jim Meyering  <jim@meyering.net>
11227
11228         * lib/mkdir-p.c (make_dir_parents): Don't apply sizeof to a hard-coded
11229         type name.  Use the variable name instead.
11230         * lib/idcache.c (getuser, getuidbyname, getgroup, getgidbyname):
11231         Likewise.
11232
11233 2005-06-28  Simon Josefsson  <jas@extundo.com>
11234
11235         * modules/check-version (Files): Add check-version.m4.
11236
11237 2005-06-28  Simon Josefsson  <jas@extundo.com>
11238
11239         * m4/check-version.m4: New file, suggested by Jim Meyering
11240         <jim@meyering.net>.
11241
11242 2005-06-28  Simon Josefsson  <jas@extundo.com>
11243
11244         * lib/check-version.h, lib/check-version.c: New files.
11245
11246 2005-06-28  Simon Josefsson  <jas@extundo.com>
11247
11248         * lib/base64.c (base64_encode): Indent.  Rename 'b64' to avoid
11249         collision with global variable.  Better indentation.  Don't
11250         increment buffer pointer beyond buffer end.  Based on comments
11251         from Paul Eggert <eggert@cs.ucla.edu>.
11252
11253         * lib/base64.h: Indent.
11254
11255 2005-06-28  Simon Josefsson  <jas@extundo.com>
11256
11257         * doc/gnulib.texi (Library version handling): New section.
11258
11259 2005-06-28  Jim Meyering  <jim@meyering.net>
11260
11261         * check-module (find_included_lib_files): Hard-code another
11262         pair of exceptions: fts.c includes fts-cycle.c and unistd-safer.h
11263         but modules/fts-lgpl (correctly) does not list those files.
11264
11265         * modules/canonicalize (Files): Add lib/pathmax.h.
11266
11267 2005-06-25  Simon Josefsson  <jas@extundo.com>
11268
11269         * modules/check-version: New file.
11270
11271 2005-06-24  Paul Eggert  <eggert@cs.ucla.edu>
11272
11273         * lib/canon-host.c (canon-host): Append trailing "," to 0 in
11274         initializer of struct addrinfo, as an indication that we don't
11275         care how many members the structure has.
11276
11277 2005-06-24  Derek Price  <derek@ximbiot.com>
11278         and Bruno Haible  <bruno@clisp.org>
11279
11280         Remove stat module & update lstat.
11281         * m4/lstat.m4 (gl_FUNC_LSTAT): Drop AC_FUNC_LSTAT in favor of
11282         AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
11283         * m4/stat.m4: Remove this file.
11284
11285 2005-06-24  Derek Price  <derek@ximbiot.com>
11286         and Bruno Haible  <bruno@clisp.org>
11287
11288         Remove stat module & update lstat.
11289         * lib/stat.c: Remove this file...
11290         (slash_aware_lstat): ...moving this content and its support...
11291         * lib/lstat.c (rpl_lstat): ...into here.
11292         * lib/lstat.h: New file.
11293
11294 2005-06-24  Derek Price  <derek@ximbiot.com>
11295         and Bruno Haible  <bruno@clisp.org>
11296
11297         Remove stat module & update lstat.
11298         * config/srclist.txt (libc sources): Remove stat.
11299
11300 2005-06-24  Derek Price  <derek@ximbiot.com>
11301         and Bruno Haible  <bruno@clisp.org>
11302
11303         Remove stat module & update lstat.
11304         * MODULES.html.sh (stat): Remove.
11305         * MODULES.html: Regenerated.
11306         * modules/lstat (Description): Correct function name.
11307         (Files): Add "lstat.h".
11308         (Depends-on): Remove stat, add xalloc, stat-macros.
11309         * modules/stat: Remove this file.
11310         (Include): Add "lstat.h", remove <sys/stat.h>.
11311
11312 2005-06-23  Paul Eggert  <eggert@cs.ucla.edu>
11313
11314         * lib/mktime.c: Include <string.h> even if !DEBUG.  (From glibc.)
11315         (ranged_convert): Don't save conversion in a temporary struct.
11316         This causes a warning with GCC 4.0.0, and anyway in the typical
11317         case it's not worth the extra 100 bytes or so of code.
11318         (ranged_convert, __mktime_internal): When calling a function via a
11319         pointer P, use P () rather than (*P) (), as we now assume C89 or
11320         better.
11321
11322 2005-06-22  Paul Eggert  <eggert@cs.ucla.edu>
11323
11324         * lib/readutmp.c (desirable_utmp_entry): Fix bug where "who -b" and
11325         "who -r" failed to give output.  Problem reported by Tim Waugh.
11326
11327         * lib/xmalloc.c (HAVE_GNU_CALLOC): New constant.
11328         (xcalloc): Use it to avoid needless tests.
11329         Problem reported by Jim Meyering.
11330
11331 2005-06-20  Derek Price  <derek@ximbiot.com>
11332
11333         * m4/bison.m4: Note that precious decls of YACC & YFLAGS will be
11334         unnecessary for Autoconfs > 2.59c.
11335
11336 2005-06-16  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11337
11338         * lib/argp.h (__option_is_short): Check upper limit of
11339         __key. Isprint() requires its argument to have the value
11340         of an unsigned char or EOF.
11341
11342 2005-06-16  Jim Meyering  <jim@meyering.net>
11343
11344         * lib/calloc.c (rpl_calloc): Allocate a 1-byte buffer (not 1xS or Nx1)
11345         when either N or S is zero.
11346
11347 2005-06-16  Derek Price  <derek@ximbiot.com>
11348
11349         * m4/bison.m4: Declare YACC & YFLAGS precious.
11350
11351 2005-06-10  Paul Eggert  <eggert@cs.ucla.edu>
11352
11353         * lib/fnmatch.c (fnmatch): If there is an encoding error in a
11354         multibyte string or pattern, fall back on unibyte matching.
11355         Problem reported by James Youngman.
11356
11357 2005-06-08  Bruno Haible  <bruno@clisp.org>
11358
11359         * modules/csharpcomp: New file.
11360         * MODULES.html.sh (C#): Add csharpcomp.
11361
11362 2005-06-08  Bruno Haible  <bruno@clisp.org>
11363
11364         * m4/csharpcomp.m4: New file, from GNU gettext.
11365
11366 2005-06-08  Bruno Haible  <bruno@clisp.org>
11367
11368         * lib/csharpcomp.h: New file, from GNU gettext.
11369         * lib/csharpcomp.c: New file, from GNU gettext.
11370         * lib/csharpcomp.sh.in: New file, from GNU gettext.
11371
11372 2005-06-08  Bruno Haible  <bruno@clisp.org>
11373
11374         * lib/binary-io.h (fileno): Undefine before defining it. Avoids a gcc
11375         warning on mingw.
11376
11377 2005-06-07  Derek Price  <derek@ximbiot.com>
11378
11379         Sync from CVS.
11380         * lib/glob_.h: Indent nested #ifdef.
11381
11382 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11383
11384         Sync from coreutils.
11385         Use "file name" when talking about file names, instead of "filename"
11386         or "path", as per the GNU coding standards.
11387         * lib/mkdir-p.c: Renamed from makepath.c.
11388         (make_dir_parents): Renamed from make_path.  All callers changed.
11389         * lib/mkdir-p.h: Likewise.  All includers changed.
11390         * lib/filenamecat.c: Renamed from path-concat.c.
11391         (file_name_concat): Renamed from path_concat.  All callers changed.
11392         [TEST_FILE_NAME_CONCAT]: Renamed from TEST_PATH_CONCAT.
11393         * lib/filenamecat.h: Likewise.  All includers changed.
11394         * lib/acl.c: Don't use "path" or "filename" to mean "file name"
11395         in comments or local variable names.
11396         * lib/basename.c: Likewise.
11397         * lib/canonicalize.c, canonicalize.h: Likewise.
11398         * lib/dirname.c, dirname.h: Likewise.
11399         * lib/euidaccess.c: Likewise.
11400         * lib/exclude.c: Likewise
11401         * lib/fnmatch_.h, fnmatch_loop.c: Likewise.
11402         * lib/fsusage.c, fsuage.h: Likewise.
11403         * lib/fts.c, fts_.h: Likewise.
11404         * lib/getcwd.c: Likewise.
11405         * lib/getloadavg.c: Likewise.
11406         * lib/mkstemp.c: Likewise.
11407         * lib/mountlist.c, mountlist.h: Likewise.
11408         * lib/openat.c, openat.h: Likewise.
11409         * lib/readlink-stub.c: Likewise.
11410         * lib/readutmp.c, readutmp.h: Likewise.
11411         * lib/rename.c: Likewise.
11412         * lib/rmdir.c: Likewise.
11413         * lib/same.c: Likewise.
11414         * lib/savedir.c: Likewise.
11415         * lib/stripslash.c: Likewise.
11416         * lib/tempname.c: Likewise.
11417         * lib/xreadlink.c: Likewise.
11418         * lib/exclude.c (excluded_file_name): Renamed from excluded_filename.
11419         All uses changed.
11420         * lib/exclude.h: Likewise.
11421
11422         * lib/euidaccess.c (getuid, getgid, getuid, getegid)
11423         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11424         * lib/idcache.c (getpwuid, getpwnam, getgrgid, getgrnam)
11425         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11426         * lib/pathmax.h: Include <limits.h> unconditionally, since other
11427         files have been getting away with it for years (MORE/BSD 4.3
11428         is extinct now).
11429         * lib/userspec.c (getpwnam, getgrnam, getgrgid)
11430         [!defined _POSIX_VERSION]: Remove decls; not needed these days.
11431
11432         * lib/pathmax.h (_POSIX_PATH_MAX) [!defined _POSIX_PATH_MAX]:
11433         Define to 256, not 255, as per modern POSIX.
11434
11435 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11436
11437         Sync from coreutils.
11438         Use "file name" when talking about file names, instead of "filename"
11439         or "path", as per the GNU coding standards.
11440         * MODULES.html.sh: mkdir-p renamed from makepath.
11441         filenamecat renamed from path-concat.
11442         * modules/filenamecat: Renamed from modules/path-concat.
11443         (Files): filenamecat.h and filenamecat.c renamed from
11444         path-concat.h and path-concat.c.
11445         (configure.ac): gl_FILE_NAME_CONCAT, not gl_PATH_CONCAT.
11446         (Include): filenamecat.h, not path-concat.h.
11447         * modules/mkdir-p: Renamed from modules/makepath.
11448         (Files): mkdir-p.h and mkdir-p.c renamed from makepath.h and
11449         makepath.c.
11450         (configure.ac): gl_MKDIR_PARENTS, not gl_MAKEPATH.
11451         (Include): mkdir-p.h, not makepath.h.
11452
11453 2005-06-02  Paul Eggert  <eggert@cs.ucla.edu>
11454
11455         Sync from coreutils.
11456         * m4/mkdir-p.m4: Renamed from makepath.m4.
11457         (gl_MKDIR_PARENTS): Renamed from gl_MAKEPATH.  All uses changed.
11458         Rename files from makepath.c to mkdir-p.c, and from
11459         makepath.h to mkdir-p.h.
11460         * m4/filenamecat.m4: Renamed from path-concat.m4.
11461         (gl_FILE_NAME_CONCAT): Renamed from gl_PATH_CONCAT.  All uses changed.
11462         Rename files from path-concat.c to filenamecat.c,
11463         and from path-concat.h to filenamecat.h.
11464         * m4/getcwd-path-max.m4: Don't use "path" or "filename" to mean
11465         "file name" in local variables or comments.
11466         * m4/rename.m4: Likewise.
11467
11468 2005-06-01  Bruno Haible  <bruno@clisp.org>
11469
11470         * modules/csharpexec: New file.
11471         * MODULES.html.sh (C#): New section.
11472
11473 2005-06-01  Bruno Haible  <bruno@clisp.org>
11474
11475         * m4/csharp.m4: New file, from GNU gettext.
11476         * m4/csharpexec.m4: New file, from GNU gettext.
11477
11478 2005-06-01  Bruno Haible  <bruno@clisp.org>
11479
11480         * lib/csharpexec.h: New file, from GNU gettext.
11481         * lib/csharpexec.c: New file, from GNU gettext.
11482         * lib/csharpexec.sh.in: New file, from GNU gettext.
11483
11484 2005-05-31  Derek Price  <derek@ximbiot.com>
11485             Paul Eggert  <eggert@cs.ucla.edu>
11486
11487         Sync from cvs.
11488         * m4/glob.m4: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11489
11490 2005-05-31  Derek Price  <derek@ximbiot.com>
11491             Paul Eggert  <eggert@cs.ucla.edu>
11492
11493         Sync from cvs.
11494         * lib/glob_.h: s/MISSING_SYS_CDEFS_H/_SYS_CDEFS_H/ and comment.
11495
11496 2005-05-29  Derek Price  <derek@ximbiot.com>
11497
11498         * config/srclist.txt (glob_.h, glob.c): Add these files.
11499
11500 2005-05-29  Derek Price  <derek@ximbiot.com>
11501
11502         * MODULES.html.sh: Add glob to Enhanced POSIX.2001 section.
11503         * modules/glob: New file.
11504         * modules/getlogin_r: Add link to POSIX spec in description.
11505
11506 2005-05-29  Derek Price  <derek@ximbiot.com>
11507             Paul Eggert  <eggert@cs.ucla.edu>
11508
11509         * m4/glob.m4: New file.
11510
11511 2005-05-29  Derek Price  <derek@ximbiot.com>
11512             Paul Eggert  <eggert@cs.ucla.edu>
11513
11514         * lib/glob_.h, lib/glob.c: New files.
11515
11516 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11517
11518         * modules/fts (Files): Remove m4/inttypes-pri.m4.
11519         * modules/fts-lgpl (Depends-on): Remove gettext.
11520
11521 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11522
11523         * m4/fts.m4 (gl_FUNC_FTS_CORE): Don't check for inttypes.h or stdint.h,
11524         and don't require gt_INTTYPES_PRI.
11525
11526 2005-05-27  Paul Eggert  <eggert@cs.ucla.edu>
11527
11528         * lib/getlogin_r.c (getlogin_r): Don't set errno to 0 on return.
11529
11530         * lib/fts.c: Don't worry about debugging on pre-C99-compatible hosts;
11531         the configuration hassle isn't worth it.
11532         Include inttypes.h and stdint.h unconditionally if FTS_DEBUG.
11533         (LONGEST_MODIFIER, PRIuMAX): Remove.
11534
11535 2005-05-27  Bruno Haible  <bruno@clisp.org>
11536
11537         * lib/getlogin_r.h: Remove second include of <stddef.h>.
11538
11539 2005-05-26  Paul Eggert  <eggert@cs.ucla.edu>
11540
11541         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Define
11542         _POSIX_PTHREAD_SEMANTICS for Solaris.
11543
11544 2005-05-25  Derek Price  <derek@ximbiot.com>
11545
11546         * MODULES.html.sh: Add getlogin_r to POSIX.2001 support section.
11547
11548 2005-05-25  Derek Price  <derek@ximbiot.com>
11549             Paul Eggert  <eggert@cs.ucla.edu>
11550
11551         * modules/getlogin_r, m4/getlogin_r.m4: New files.
11552         * lib/getlogin_r.c, getlogin_r.h: New files.
11553
11554 2005-05-25  Bruno Haible  <bruno@clisp.org>
11555             Derek Price  <derek@ximbiot.com>
11556
11557         * lib/getlogin_r.h: Simplify API documentation.
11558
11559 2005-05-23  Derek Price  <derek@ximbiot.com>
11560
11561         * modules/minmax (Files): Add m4/minmax.m4.
11562         (configure.ac): Add gl_MINMAX.
11563
11564 2005-05-22  Paul Eggert  <eggert@cs.ucla.edu>
11565
11566         * lib/fts.c (fd_safer) [_LGPL_PACKAGE]: New static function,
11567         so that unistd-safer.h (GPL'ed code) need not be included.
11568
11569 2005-05-22  Bruno Haible  <bruno@clisp.org>
11570
11571         * m4/minmax.m4: New file.
11572         Based on a patch by Derek Price <derek@ximbiot.com>.
11573
11574 2005-05-22  Bruno Haible  <bruno@clisp.org>
11575
11576         * lib/stdint_.h (_STDINT_H_HAVE_INT64): New macro. Use it in #ifdefs.
11577         (INT64_MIN): Fix definition.
11578         Suggested by Paul Eggert <eggert@cs.ucla.edu>.
11579
11580         * lib/stdint_.h (_STDINT_H_NEED_SIGNED_INT_TYPES): Renamed from
11581         NEED_SIGNED_INT_TYPES.
11582
11583         * lib/stdint_.h (_STDINT_H_HAVE_SYSTEM_INTTYPES): Renamed from
11584         HAVE_SYSTEM_INTTYPES.
11585
11586 2005-05-22  Bruno Haible  <bruno@clisp.org>
11587
11588         * lib/minmax.h: Include <limits.h> only when it defines MIN, MAX.
11589         Also include <sys/param.h> if it defines MIN, MAX.
11590         Based on a patch by Derek Price <derek@ximbiot.com>.
11591
11592 2005-05-21  Jim Meyering  <jim@meyering.net>
11593
11594         * modules/fts (Files): Add m4/inttypes-pri.m4.
11595         (Depends-on): Add lstat and remove gettext.  Alphabetize.
11596
11597 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11598
11599         New fts module.
11600         * lib/fts.c: Don't include "cycle-check.h" or "hash.h".
11601         (setup_dir, free_dir): New functions.
11602         (enter_dir, leave_dir): Define trivial
11603         alternatives of _LGPL_PACKAGE.  Move to fts-cycle.c if !_LGPL_PACKAGE.
11604         (HT_INITIAL_SIZE, ENTER_DIR): Remove.  All uses removed.
11605         (LEAVE_DIR): Fix typo: pass Fts and Ent to leave_dir.
11606         (struct Active_dir, AD_compare, AD_hash, enter_dir, leave_dir):
11607         Move to fts-cycle.c.
11608         (fts_open): Use setup_dir.
11609         (fts_close): Use free_dir.
11610         (fts_read): Have just one copy of the ENTER_DIR code rather than three.
11611         This adds a label and some gotos, but the alternatives were messier.
11612         Check for memory allocation failure when entering a dir.
11613         (fts_stat) [_LGPL_PACKAGE]: Bring back glibc cycle detection code.
11614         * lib/fts_.h (_LGPL_PACKAGE) [defined _LIBC]: New macro.
11615         (FTS): New member fts_cycle, that is a union that contains the
11616         old active_dir_ht and cycle_state.  All uses changed to mention
11617         fts_cycle.ht and fts_cycle.state.
11618         * lib/fts-cycle.c: New file, containing GPL'ed code migrated out of
11619         fts.c, with the following changes:
11620         (setup_dir, free_dir): New functions.
11621         (enter_dir): Now returns bool.  Return true if successful, false
11622         if memory exhausted.  All callers changed.
11623         Do not bother partly cleaning up on
11624         memory allocation failure; that is free_dir's job.
11625         However, free ad if hash_insert fails, to avoid memory leak.
11626         (enter_dir, leave_dir): Accommodate change to FTS by inspecting
11627         fts->fts_options to see which union member to use.
11628
11629 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11630
11631         * m4/fts.m4 (gl_FUNC_FTS_CORE): Renamed from gl_FUNC_FTS.
11632         (gl_FUNC_FTS, gl_FUNC_FTS_LGPL): New macros.
11633
11634 2005-05-20  Paul Eggert  <eggert@cs.ucla.edu>
11635
11636         * MODULES.html.sh (File system functions): Add fts, fts-lgpl.
11637
11638 2005-05-20  Jim Meyering  <jim@meyering.net>
11639
11640         * lib/unlinkdir.h (cannot_unlink_dir) [UNLINK_CANNOT_UNLINK_DIR]:
11641         Now a macro, to pacify GCC.
11642
11643 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11644
11645         * m4/chown.m4 (gl_FUNC_CHOWN): Correct sense of test for honoring IDs
11646         of -1.
11647
11648 2005-05-20  Eric Blake  <ebb9@byu.net>  (tiny change)
11649
11650         * lib/chown.c (rpl_chown): Return -1 on failure.
11651
11652 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11653
11654         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME]):
11655         Don't check for stddef.h.
11656         * m4/fts.m4 (gl_FUNC_FTS): Don't require AC_HEADER_STDC, as we
11657         don't use its results.
11658         Don't check for fcntl.h, stddef.h, stdlib.h, string.h, unistd.h,
11659         since we include them unconditionally.  Don't require
11660         AM_STDBOOL_H, since stdbool is a prerequisite.
11661         Don't require AC_C_CONST, AC_TYPE_SIZE_T or check for ptrdiff_t
11662         since we assume C89 or better.
11663         Don't require AC_FUNC_CLOSEDIR_VOID, AC_FUNC_LSTAT, or AC_FUNC_STAT,
11664         as we don't use their results.
11665         Don't check for fchdir, memmove, memset, strrchr, as we use
11666         them unconditionally.
11667         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Don't define
11668         GETTIMEOFDAY_CLOBBERS_LOCALTIME_BUFFER, since nobody uses it.
11669
11670 2005-05-18  Paul Eggert  <eggert@cs.ucla.edu>
11671
11672         * lib/canonicalize.c: Include canonicalize.h first, to test interface.
11673         Include <stddef.h> unconditionally, since we assume C89 now.
11674         All uses of PTR_INT_TYPE replaced by ptrdiff_t.
11675         * lib/fts.c: Include fts_.h first, to check interface.
11676         Do not include intprops.h; no longer needed.
11677         Include cycle-check.h and hash.h, since fts_.h no longer does.
11678         Remove unnecessary casts of closedir to void.
11679         (fts_build): Use a simpler method (not involving TYPE_SIGNED) to
11680         decide whether to decrement nlinks.
11681         * lib/fts_.h: Do not include hash.h or cycle-check.h; no longer needed.
11682         (FTS): Use struct hash_table * instead of Hash_table, so that
11683         we no longer need to include hash.h here.
11684
11685 2005-05-18  Jim Meyering  <jim@meyering.net>
11686
11687         * modules/dirfd (License): Change to LGPL.  Most of the code
11688         is already in the public domain.
11689
11690 2005-05-18  Jim Meyering  <jim@meyering.net>
11691
11692         * m4/fts.m4 (AC_LIBSOURCES): Add intprops.h to the list.
11693         Reported by Yoann Vandoorselaere.
11694
11695 2005-05-17  Jim Meyering  <jim@meyering.net>
11696
11697         * m4/fts.m4: New file, from coreutils.
11698
11699 2005-05-17  Jim Meyering  <jim@meyering.net>
11700
11701         * lib/fts.c, lib/fts_.h: New files, from coreutils.
11702
11703 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11704
11705         Sync from coreutils.
11706         * m4/unlinkdir.m4: New file.
11707
11708 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11709
11710         Sync from coreutils.
11711         * lib/unlinkdir.c, lib/unlinkdir.h: New files.
11712         * lib/gethrxtime.c, lib/gethrxtime.h, lib/getpass.h, lib/mountlist.h,
11713         lib/path-concat.c, lib/regex.h, lib/unlocked-io.h, lib/xtime.h:
11714         White space changes only.
11715         * lib/makepath.c (make_path): Port to hosts where leading "//" is
11716         special.
11717         * lib/yesno.c: Include getline.h, not ctype.h.
11718         (yesno): Don't remove leading white space; POSIX doesn't allow it.
11719         Use getline to remove arbitrary restriction on response length.
11720
11721 2005-05-14  Paul Eggert  <eggert@cs.ucla.edu>
11722
11723         * config/srclist-update: Spell out "Street" in FSF postal
11724         mail address; this is the style the FSF seems to prefer.
11725
11726         * build-aux/depcomp, build-aux/install-sh, build-aux/mdate-sh,
11727         build-aux/missing, build-aux/mkinstalldirs: Sync from Automake;
11728         this updates FSF postal mail address.
11729
11730         Sync from coreutils.
11731         * modules/unlinkdir: New file.
11732         * modules/yesno (Depends-on): Add getline.
11733         * MODULES.html.sh (File system functions): Add unlinkdir.
11734
11735 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11736
11737         * lib/byteswap_.h, lib/getsubopt.h, lib/iconvme.h, lib/strsep.c,
11738         lib/strsep.h:
11739         Change the initial comment to refer to GPL, not LGPL.
11740         gnulib-tool will change it to LGPL as needed.
11741
11742         * lib/__fpending.c, lib/acl.c, lib/acl.h, lib/alloca_.h, lib/allocsa.c,
11743         lib/allocsa.h, lib/argmatch.c, lib/argmatch.h, lib/argp-ba.c,
11744         lib/argp-eexst.c, lib/argp-fmtstream.c, lib/argp-fmtstream.h,
11745         lib/argp-fs-xinl.c, lib/argp-help.c, lib/argp-namefrob.h,
11746         lib/argp-parse.c, lib/argp-pv.c, lib/argp-pvh.c, lib/argp-xinl.c,
11747         lib/argp.h, lib/argz.c, lib/argz_.h, lib/asnprintf.c, lib/asprintf.c,
11748         lib/atanl.c, lib/backupfile.c, lib/backupfile.h, lib/base64.c,
11749         lib/base64.h, lib/basename.c, lib/binary-io.h, lib/byteswap_.h,
11750         lib/c-ctype.c, lib/c-ctype.h, lib/c-stack.c, lib/c-stack.h,
11751         lib/c-strtod.c, lib/calloc.c, lib/canon-host.c, lib/canonicalize.c,
11752         lib/canonicalize.h, lib/ceill.c, lib/chdir-long.c, lib/chdir-long.h,
11753         lib/chown.c, lib/classpath.c, lib/classpath.h, lib/cloexec.c,
11754         lib/closeout.c, lib/closeout.h, lib/concatpath.c, lib/config.charset,
11755         lib/copy-file.c, lib/copy-file.h, lib/cycle-check.c, lib/cycle-check.h,
11756         lib/diacrit.c, lib/diacrit.h, lib/dirfd.c, lib/dirfd.h, lib/dirname.c,
11757         lib/dirname.h, lib/dummy.c, lib/dup-safer.c, lib/dup2.c, lib/eealloc.h,
11758         lib/error.c, lib/error.h, lib/euidaccess.c, lib/exclude.c,
11759         lib/exclude.h, lib/execute.c, lib/execute.h, lib/exit.h,
11760         lib/exitfail.c, lib/exitfail.h, lib/expl.c, lib/fatal-signal.c,
11761         lib/fatal-signal.h, lib/fd-safer.c, lib/file-type.c, lib/file-type.h,
11762         lib/fileblocks.c, lib/filemode.c, lib/filemode.h, lib/findprog.c,
11763         lib/findprog.h, lib/floorl.c, lib/fnmatch.c, lib/fnmatch_.h,
11764         lib/fnmatch_loop.c, lib/fopen-safer.c, lib/free.c, lib/frexpl.c,
11765         lib/fsusage.c, lib/fsusage.h, lib/full-read.c, lib/full-read.h,
11766         lib/full-write.c, lib/full-write.h, lib/fwriteerror.c,
11767         lib/fwriteerror.h, lib/gai_strerror.c, lib/gcd.c, lib/gcd.h,
11768         lib/getaddrinfo.c, lib/getaddrinfo.h, lib/getcwd.c, lib/getcwd.h,
11769         lib/getdate.h, lib/getdate.y, lib/getdomainname.c, lib/getdomainname.h,
11770         lib/getgroups.c, lib/gethostname.c, lib/gethrxtime.c, lib/gethrxtime.h,
11771         lib/getline.c, lib/getline.h, lib/getloadavg.c, lib/getndelim2.c,
11772         lib/getndelim2.h, lib/getnline.c, lib/getnline.h, lib/getopt.c,
11773         lib/getopt1.c, lib/getopt_.h, lib/getopt_int.h, lib/getpagesize.h,
11774         lib/getpass.c, lib/getpass.h, lib/getsubopt.c, lib/getsubopt.h,
11775         lib/gettext.h, lib/gettime.c, lib/gettimeofday.c, lib/getugroups.c,
11776         lib/getusershell.c, lib/group-member.c, lib/group-member.h,
11777         lib/hard-locale.c, lib/hard-locale.h, lib/hash-pjw.c, lib/hash-pjw.h,
11778         lib/hash.c, lib/hash.h, lib/human.c, lib/human.h, lib/iconvme.c,
11779         lib/iconvme.h, lib/idcache.c, lib/inet_ntop.h, lib/intprops.h,
11780         lib/inttostr.c, lib/inttostr.h, lib/isdir.c, lib/javacomp.c,
11781         lib/javacomp.h, lib/javacomp.sh.in, lib/javaexec.c, lib/javaexec.h,
11782         lib/javaexec.sh.in, lib/lbrkprop.h, lib/lchown.c, lib/ldexpl.c,
11783         lib/linebreak.c, lib/linebreak.h, lib/linebuffer.c, lib/linebuffer.h,
11784         lib/localcharset.c, lib/localcharset.h, lib/logl.c, lib/long-options.c,
11785         lib/long-options.h, lib/lstat.c, lib/makepath.c, lib/makepath.h,
11786         lib/malloc.c, lib/mathl.h, lib/mbswidth.c, lib/mbswidth.h, lib/md5.c,
11787         lib/md5.h, lib/memcasecmp.c, lib/memcasecmp.h, lib/memchr.c,
11788         lib/memcmp.c, lib/memcoll.c, lib/memcoll.h, lib/memcpy.c, lib/memmem.c,
11789         lib/memmem.h, lib/mempcpy.c, lib/mempcpy.h, lib/memrchr.c,
11790         lib/memrchr.h, lib/memset.c, lib/minmax.h, lib/mkdir.c, lib/mkdtemp.c,
11791         lib/mkdtemp.h, lib/mkstemp.c, lib/mktime.c, lib/modechange.c,
11792         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
11793         lib/obstack.c, lib/obstack.h, lib/openat.c, lib/openat.h,
11794         lib/pagealign_alloc.c, lib/pagealign_alloc.h, lib/path-concat.c,
11795         lib/path-concat.h, lib/pathmax.h, lib/pathname.h, lib/physmem.c,
11796         lib/physmem.h, lib/pipe.c, lib/pipe.h, lib/poll.c, lib/poll_.h,
11797         lib/posixtm.c, lib/posixtm.h, lib/posixver.c, lib/printf-args.c,
11798         lib/printf-args.h, lib/printf-parse.c, lib/printf-parse.h,
11799         lib/progname.c, lib/progname.h, lib/progreloc.c, lib/putenv.c,
11800         lib/quote.c, lib/quote.h, lib/quotearg.c, lib/quotearg.h, lib/raise.c,
11801         lib/readlink.c, lib/readtokens.c, lib/readtokens.h, lib/readtokens0.c,
11802         lib/readtokens0.h, lib/readutmp.c, lib/readutmp.h, lib/realloc.c,
11803         lib/ref-add.sin, lib/ref-del.sin, lib/regex.c, lib/regex.h,
11804         lib/rename.c, lib/rmdir.c, lib/rpmatch.c, lib/safe-read.c,
11805         lib/safe-read.h, lib/safe-write.c, lib/safe-write.h, lib/same.c,
11806         lib/same.h, lib/save-cwd.c, lib/save-cwd.h, lib/savedir.c,
11807         lib/savedir.h, lib/setenv.c, lib/setenv.h, lib/settime.c,
11808         lib/sh-quote.c, lib/sh-quote.h, lib/sha1.c, lib/sha1.h, lib/sig2str.c,
11809         lib/sig2str.h, lib/sincosl.c, lib/snprintf.c, lib/snprintf.h,
11810         lib/sqrtl.c, lib/stat-macros.h, lib/stat.c, lib/stdbool_.h,
11811         lib/stdint_.h, lib/stdio-safer.h, lib/stpcpy.c, lib/stpcpy.h,
11812         lib/stpncpy.c, lib/stpncpy.h, lib/strcase.h, lib/strcasecmp.c,
11813         lib/strchrnul.c, lib/strchrnul.h, lib/strcspn.c, lib/strdup.c,
11814         lib/strdup.h, lib/strerror.c, lib/strftime.c, lib/strftime.h,
11815         lib/stripslash.c, lib/strndup.c, lib/strndup.h, lib/strnlen.c,
11816         lib/strpbrk.c, lib/strpbrk.h, lib/strsep.c, lib/strsep.h, lib/strstr.c,
11817         lib/strstr.h, lib/strtod.c, lib/strtoimax.c, lib/strtok_r.c,
11818         lib/strtok_r.h, lib/strtol.c, lib/strtoll.c, lib/strtoul.c,
11819         lib/strtoull.c, lib/strverscmp.c, lib/strverscmp.h, lib/sysexit_.h,
11820         lib/tempname.c, lib/time_r.c, lib/time_r.h, lib/timegm.c, lib/timegm.h,
11821         lib/timespec.h, lib/trigl.c, lib/trigl.h, lib/ucs4-utf16.h,
11822         lib/ucs4-utf8.h, lib/unicodeio.c, lib/unicodeio.h, lib/unistd-safer.h,
11823         lib/unlocked-io.h, lib/unsetenv.c, lib/userspec.c, lib/utf16-ucs4.h,
11824         lib/utf8-ucs4.h, lib/utime.c, lib/utimecmp.c, lib/utimecmp.h,
11825         lib/utimens.c, lib/vasnprintf.c, lib/vasnprintf.h, lib/vasprintf.c,
11826         lib/vasprintf.h, lib/version-etc-fsf.c, lib/version-etc.c,
11827         lib/version-etc.h, lib/vsnprintf.c, lib/vsnprintf.h, lib/w32spawn.h,
11828         lib/wait-process.c, lib/wait-process.h, lib/xalloc-die.c, lib/xalloc.h,
11829         lib/xallocsa.c, lib/xallocsa.h, lib/xasprintf.c, lib/xgetcwd.c,
11830         lib/xgetcwd.h, lib/xgetdomainname.c, lib/xgetdomainname.h,
11831         lib/xgethostname.c, lib/xmalloc.c, lib/xmemcoll.c, lib/xnanosleep.c,
11832         lib/xreadlink.c, lib/xreadlink.h, lib/xsetenv.c, lib/xsetenv.h,
11833         lib/xsize.h, lib/xstrndup.c, lib/xstrndup.h, lib/xstrtod.c,
11834         lib/xstrtod.h, lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h,
11835         lib/xstrtoumax.c, lib/xtime.h, lib/xvasprintf.c, lib/xvasprintf.h,
11836         lib/yesno.c, lib/yesno.h:
11837         Update FSF postal mail address.
11838
11839 2005-05-13  Paul Eggert  <eggert@cs.ucla.edu>
11840
11841         * MODULES.html.sh, README, gnulib-tool, tests/test-base64.c,
11842         tests/test-memmem.c, tests/test-stpncpy.c:
11843         Update FSF postal mail address.
11844
11845 2005-05-13  Bruno Haible  <bruno@clisp.org>
11846
11847         * lib/stdint_.h (int64_t, uint64_t, int_least64_t, uint_least64_t,
11848         int_fast64_t, uint_fast64_t, intmax_t, uintmax_t, INT64_MIN, INT64_MAX,
11849         UINT64_MAX, INT_LEAST64_MIN, INT_LEAST64_MAX, UINT_LEAST64_MAX,
11850         INT_FAST64_MIN, INT_FAST64_MAX, UINT_FAST64_MAX, INTMAX_MIN,
11851         INTMAX_MAX, UINTMAX_MAX, INT64_C, UINT64_C, INTMAX_C, UINTMAX_C):
11852         Add support for 64-bit integers in the MSVC compiler.
11853
11854 2005-05-12  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
11855
11856         * modules/getdate (Makefile.am): Add getdate.c to EXTRA_DIST
11857
11858 2005-05-12  Eric Blake  <ebb9@byu.net>  (tiny change)
11859
11860         * gnulib-tool (func_import): Sort and uniquify recommended includes.
11861
11862 2005-05-11  Paul Eggert  <eggert@cs.ucla.edu>
11863
11864         * doc/getdate.texi (General date syntax): Don't say that date
11865         date --iso-8601=ns generates acceptable dates; it doesn't yet.
11866         Problem reported by Nic Ferrier.
11867
11868 2005-05-10  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11869
11870         * lib/getaddrinfo.c: Don't fail when SOCK_STREAM or SOCK_DGRAM are
11871         specified in ai_socktype. Fix invalid ai_protocol
11872         check. ai_protocol is usually set to 0 or depending on
11873         ai_family/ai_socktype to IPPROTO_TCP / IPPROTO_UDP.  Checking for
11874         SOCK_STREAM / SOCK_DGRAM in ai_protocol was invalid.  Set
11875         ai_socktype / ai_protocol in the returned addrinfo structure.
11876
11877 2005-05-10  Simon Josefsson  <jas@extundo.com>
11878
11879         * m4/getaddrinfo.m4: Look in libnsl/libsocket for getaddrinfo, from
11880         Yoann Vandoorselaere <yoann.v@prelude-ids.com>.
11881
11882 2005-05-10  Karl Berry  <karl@gnu.org>
11883
11884         * doc/fdl.texi, gpl.texi, lgpl.texi, COPYING: update FSF address
11885         (from http://www.gnu.org/licenses).
11886         * doc/COPYING.LIB: also rename to COPYING.LESSER.
11887         * doc/COPYING.DOC: remove; per rms, only needed in doc files, so
11888         fdl.texi suffices.
11889
11890 2005-05-10  Karl Berry  <karl@gnu.org>
11891
11892         * config/srclist.txt (COPYING.LESSER): rename from COPYING.LIB.
11893         (COPYING.DOC): remove.
11894
11895         * config/srclist-update: new FSF address.
11896
11897 2005-05-10  Derek Price  <derek@ximbiot.com>
11898
11899         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 bug, not decl, when
11900         possible.
11901
11902 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11903             Bruno Haible  <bruno@clisp.org>
11904
11905         * modules/inet_ntop: New file.
11906         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
11907         inet_ntop.
11908
11909 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11910             Bruno Haible  <bruno@clisp.org>
11911
11912         * m4/inet_ntop.m4: New file.
11913
11914 2005-05-09  Yoann Vandoorselaere  <yoann.v@prelude-ids.com>
11915             Bruno Haible  <bruno@clisp.org>
11916
11917         * lib/inet_ntop.h: New file.
11918         * lib/inet_ntop.c: New file, from glibc with modifications.
11919
11920 2005-05-09  Paul Eggert  <eggert@cs.ucla.edu>
11921
11922         * modules/time_r (License): Change to LGPL.
11923         * modules/extensions (License): Change to LGPL.  Actually,
11924         the license is more permissive than that, but currently gnulib-tool
11925         doesn't know how to handle more-permissive licenses.
11926
11927         * modules/stat-macros (Depends-on): Don't depend on stat-macros (!).
11928         Problem reported by Dave Love.
11929
11930 2005-05-08  Jim Meyering  <jim@meyering.net>
11931
11932         * lib/classpath.c (PATH_SEPARATOR): Remove insignificant trailing
11933         blank.
11934
11935 2005-05-06  Paul Eggert  <eggert@cs.ucla.edu>
11936
11937         * modules/argmatch (Depends-on): Add stdbool.
11938         * modules/backupfile (Depends-on): Likewise.
11939         * modules/chdir-long (Depends-on): Likewise.
11940         * modules/closeout (Depends-on): Likewise.
11941         * modules/cycle-check (Depends-on): Likewise.
11942         * modules/dirname (Depends-on): Likewise.
11943         * modules/fnmatch (Depends-on): Likewise.
11944         * modules/fsusage (Depends-on): Likewise.
11945         * modules/fwriteerror (Depends-on): Likewise.
11946         * modules/getcwd (Depends-on): Likewise.
11947         * modules/getloadavg (Depends-on): Likewise.
11948         * modules/hard-locale (Depends-on): Likewise.
11949         * modules/makepath (Depends-on): Likewise.
11950         * modules/mountlist (Depends-on): Likewise.
11951         * modules/nanosleep (Depends-on): Likewise.
11952         * modules/posixtm (Depends-on): Likewise.
11953         * modules/quotearg (Depends-on): Likewise.
11954         * modules/readtokens (Depends-on): Likewise.
11955         * modules/readtokens0 (Depends-on): Likewise.
11956         * modules/readutmp (Depends-on): Likewise.
11957         * modules/save-cwd (Depends-on): Likewise.
11958         * modules/strftime (Depends-on): Likewise.
11959         * modules/userspec (Depends-on): Likewise.
11960         * modules/utimecmp (Depends-on): Likewise.
11961         * modules/xgetcwd (Depends-on): Likewise.
11962         * modules/xnanosleep (Depends-on): Likewise.
11963         * modules/xstrtod (Depends-on): Likewise.
11964         * modules/yesno (Depends-on): Likewise.
11965
11966 2005-05-05  Paul Eggert  <eggert@cs.ucla.edu>
11967
11968         * m4/getopt.m4 (gl_GETOPT): Check for Solaris 10 getopt, and avoid
11969         needless checks.
11970
11971 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
11972
11973         Merge from coreutils.  Among other things,
11974         add bulletproofing for cases where stdin, stdout, or stderr are closed.
11975         * lib/fd-safer.c: New file.
11976         * lib/fcntl-safer.h, open-safer.c: Remove.
11977         * lib/chdir-long.c: Fix comment "fetish" -> "coreutils".
11978         * lib/dup-safer.c: Include unistd-safer.h first.
11979         Don't include errno.h.
11980         (dup_safer) [!defined F_DUPFD]: Let fd_safer do the real work.
11981         * lib/file-type.h: Don't assume invoker included sys/stat.h first.
11982         * lib/file-type.c: Rely on file-type.h change.
11983         * lib/getloadavg.c: Include unistd-safer.h.
11984         (getloadavg): Use safer open.
11985         * lib/getusershell.c: Include "stdio-safer.h".
11986         (getusershell): Use safer fopen.
11987         * lib/long-options.c (long_options): Use NULL rather than 0.
11988         * lib/modechange.h (mode_free): Remove; all callers changed to invoke
11989         'free'.
11990         * lib/modechange.c: Likewise.
11991         xstrtol.h, stdbool.h, stddef.h: Don't include; no longer needed.
11992         (MODE_DONE): New constant.
11993         (struct mode_change): Remove 'next' member.
11994         (make_node_op_equals): New function; like the old one of the
11995         same name, except it allocates an array.
11996         (mode_compile, mode_create_from_ref): Use it.
11997         (mode_compile): Allocate result as an array, not a linked list.
11998         Parse octal string ourself, so that we catch mistakes like "+0".
11999         (mode_adjust): Arg is an array, not a linked list.
12000         * lib/modechange.c: Include stat-macros.h, xalloc.h.
12001         (S_ISDIR, S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR):
12002         (S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH, S_IRXWU):
12003         (S_IRWXG, S_IRWXO, CHMOD_MODE_BITS):
12004         Remove.  This is now stat-macros.h's job.
12005         (talloc): Remove.  All callers replaced by xalloc, so that
12006         our invokers don't have to worry about reporting memory failures.
12007         (make_node_op_equals): Remove.
12008         (MODE_ORDINARY_CHAGE, MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12009         New constants.
12010         (struct mode_change): Moved here from modechange.h.
12011         (mode_append_entry): Remove.
12012         (mode_compile): Remove MASKED_OPS arg, since it encouraged
12013         apps to have incorrect behavior.  Use simpler algorithm for head
12014         and tail.  Don't futz with umask; that's now the job of mode_adjust.
12015         Detect more invalid usages rather than having somewhat-random behavior.
12016         Don't insert an "a=" action, as that leads to incorrect behavior.
12017         (mode_compile, mode_create_from_ref): Return NULL on error instead
12018         of an enum, since now there's only one way to have an error.  All
12019         callers changed.
12020         (mode_adjust): Accept new arg UMASK_VALUE, and interpret it
12021         at the correct time.  Simplify calculation of "+u" and its ilk.
12022         Don't mishandle "+X".
12023         (mode_free): Remove "register" and localize decls.
12024         * lib/modechange.h (MODE_X_IF_ANY_X, MODE_COPY_EXISTING):
12025         (struct mode_change): Move to modechange.c; callers don't
12026         need to see this stuff.
12027         (MODE_MASK_EQUALS, MODE_MASK_PLUS, MODE_MASK_MINUS, MODE_MASK_ALL):
12028         (MODE_INVALID, MODE_MEMORY_EXHAUSTED, MODE_BAD_REFERENCE): Remove.
12029         (mode_change, mode_adjust): Reflect the new signatures noted above.
12030         * lib/nanosleep.c (rpl_nanosleep): Include "timespec.h" before macros
12031         that might redefine system include files.
12032         (siginterrupt) [!HAVE_SIGINTERRUPT]: New macro.
12033         (my_usleep): Use NULL rather than (void *) 0.
12034         (rpl_nanosleep) [!defined SA_NOCLDSTOP]:
12035         Use siginterrupt to specify that system calls should be interrupted.
12036         (rpl_nanosleep): Move initialization of suspended closer to call of
12037         my_usleep.
12038         * lib/readutmp.h (read_utmp): New arg OPTIONS.  All uses changed.
12039         * lib/readutmp.c: Likewise.  Include signal.h, stdbool.h.
12040         (desirable_utmp_entry): New function.
12041         (read_utmp) [defined UTMP_NAME_FUNCTION]: Redo memory allocation
12042         using x2nrealloc, to simplify logic.
12043         (read_utmp) [!defined UTMP_NAME_FUNCTION]: Check for overflow in
12044         size calculation.  Do not assume utmp file is a regular file.
12045         * lib/readutmp.h (UT_PID): Moved here from ../src/who.c.
12046         (READ_UTMP_CHECK_PIDS): New constant.
12047         * lib/save-cwd.c: Include unistd-safer.h.
12048         (save_cwd): Use fd_safer.
12049         * lib/tempname.c (S_ISDIR, S_IRUSR, S_IRUSR, S_IWUSR, S_IXUSR): Remove.
12050         [!_LIBC] Include "stat-macros.h" instead.
12051         * lib/unistd-safer.h (fd_safer): New decl.
12052
12053 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12054
12055         * modules/getloadavg (Depends-on): Add unistd-safer.
12056         * modules/getusershell (Depends-on): Add stdio-safer.
12057         * modules/lstat (Depends-on): Remove xalloc.
12058         * modules/mkstemp (Depends-on): Add stat-macros.
12059         * modules/modechange (Depends-on): Remove xstrtol.
12060         Add stat-macros, xalloc.
12061         * modules/save-cwd (Depends-on): Add unistd-safer.
12062         * modules/stdio-safer (Makefile.am): Remove lib_SOURCES.
12063         * modules/unistd-safer (Files): Add lib/fd-safer.c
12064         (Makefile.am): Remove lib_SOURCES.
12065
12066         * MODULES.html.sh (Enhancements for POSIX:2001 functions):
12067         Remove fcntl-safer; unistd-safer supersedes it.
12068
12069 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12070
12071         * m4/euidaccess.m4 (gl_PREREQ_EUIDACCESS): Don't require
12072         AC_HEADER_STAT.
12073         * m4/lchown.m4 (gl_FUNC_CHOWN): Likewise.
12074         (gl_PREREQ_CHOWN): Remove.
12075         * m4/lstat.m4 (gl_FUNC_LSTAT): Require AC_FUNC_LSTAT instead of calling
12076         it.  Don't require AC_HEADER_STAT.
12077         (gl_PREREQ_LSTAT): Remove.
12078         * m4/mkstemp.m4 (gl_PREREQ_TEMPNAME): Check stdint.h only once.
12079         Don't require AC_HEADER_STAT.
12080         * m4/rmdir.m4 (gl_FUNC_RMDIR): Don't require AC_HEADER_STAT.
12081         (gl_PREREQ_RMDIR): Remove.
12082         * m4/canonicalize.m4 (AC_FUNC_CANONICALIZE_FILE_NAME): Don't
12083         mention stat-macros.h or AC_HEADER_STAT, since we'll make
12084         the stat-macros module a prerequisite.
12085         * m4/file-type.m4 (gl_FILE_TYPE): Likewise.
12086         * m4/filemode.m4 (gl_FILEMODE): Likewise.
12087         * m4/makepath.m4 (gl_MAKEPATH): Likewise.
12088         * m4/modechange.m4 (gl_MODECHANGE): Likewise.
12089         * m4/clock_time.m4 (gl_CLOCK_TIME): Use gl_ rather than fetish_ for
12090         variable names.
12091         * m4/rmdir-errno.m4 (gl_FUNC_RMDIR_NOTEMPTY): Renamed from
12092         fetish_FUNC_RMDIR_NOTEMPTY.  All uses changed.  Use gl_ for
12093         variable prefixes.
12094         * m4/fcntl-safer.m4: Remove.
12095         * m4/stdio-safer.m4 (gl_STDIO_SAFER): Use AC_LIBSOURCES and AC_LIBOBJ.
12096         * m4/unistd-safer.m4 (gl_UNISTD_SAFER): Likewise.
12097         Invoke gl_PREREQ_FD_SAFER.
12098         (gl_PREREQ_FD_SAFER): New macro.
12099         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): Check for siginterrupt.
12100         * m4/readutmp.m4 (gl_READUTMP): Require AC_C_INLINE.
12101         Use AC_CHECK_HEADERS_ONCE and AC_CHECK_FUNCS_ONCE when possible.
12102         Remove duplicate call to AC_LIBOBJ(readutmp).
12103         (gl_PREREQ_READUTMP): Remove.  All uses inlined.
12104
12105         * m4/mmap-anon.m4 (gl_FUNC_MMAP_ANON): Check for message, not for
12106         MAP_ANON.  Problem reported by Moriyoshi Koizumi to bug-cvs.
12107
12108 2005-05-01  Paul Eggert  <eggert@cs.ucla.edu>
12109
12110         * MODULES.html.sh (Misc): Add byteswap.
12111
12112 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12113
12114         * modules/getcwd (Depends-on): Add extensions.
12115         * modules/openat (Depends-on): Likewise.
12116
12117 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12118
12119         * modules/byteswap: New file.
12120
12121 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12122
12123         * m4/byteswap.m4: New file.
12124
12125 2005-05-01  Oskar Liljeblad  <oskar@osk.mine.nu>
12126
12127         * lib/byteswap_.h: New file.
12128
12129 2005-04-25  Karl Berry  <karl@gnu.org>
12130
12131         * m4/gettext.m4: Update from GNU gettext 0.14.4.
12132
12133 2005-04-25  Albert Chin  <china@thewrittenword.com>
12134
12135         * lib/regex.c: Include <stdio.h>, as a workaround to a Compaq Desktop
12136         Toolkit C bug.
12137
12138 2005-04-21  Oskar Liljeblad  <oskar@osk.mine.nu>
12139
12140         * gnulib-tool (Options): Add -s for --symlink/--symbolic.
12141         (func_ln_if_changed) Remove forcibly for no error message
12142         in case file does not exist.
12143
12144 2005-04-19  Simon Josefsson  <jas@extundo.com>
12145
12146         * gnulib-tool (Options): Make --symlink mean --symbolic.
12147
12148 2005-04-18  Oskar Liljeblad  <oskar@osk.mine.nu>
12149
12150         * doc/gnulib.texi (Initial import): Fix.  Mention --aux-dir.
12151
12152 2005-04-16  Simon Josefsson  <jas@extundo.com>
12153
12154         * modules/getpass-gnu (Makefile.am): Don't mention getpass.h.
12155
12156 2005-04-15  Simon Josefsson  <jas@extundo.com>
12157
12158         * m4/getpass.m4 (gl_FUNC_GETPASS): Use AC_LIBSOURCES.
12159
12160 2005-04-15  Simon Josefsson  <jas@extundo.com>
12161
12162         * gnulib-tool: Rename --symlink to --symbolic.
12163
12164 2005-04-15  Oskar Liljeblad  <oskar@osk.mine.nu>
12165
12166         * gnulib-tool: Add -s, --symlink option to gnulib-tool to make
12167         symbolic links to files instead of copying/moving.  Add --aux-dir,
12168         specifying directory relative --dir where auxiliary build tools
12169         are placed.
12170
12171 2005-04-14  Bruno Haible  <bruno@clisp.org>
12172
12173         * modules/allocsa (License): Change to LGPL.
12174         Requested by Yoann Vandoorselaere <yoann@prelude-ids.org>.
12175
12176 2005-04-13  Paul Eggert  <eggert@cs.ucla.edu>
12177
12178         * lib/getdate.y (zone): Allow relunit_snumber after tZONE, so
12179         that "UTC +1 second" continues to work.  Problem reported
12180         by Dmitry V. Levin.
12181         (relunit_snumber): New rule.
12182         (relunit): Use it.
12183
12184 2005-04-12  Paul Eggert  <eggert@cs.ucla.edu>
12185
12186         * lib/getdate.y (universal_time_zone_table): New constant.
12187         (time_zone_table): Remove GMT, UT, UTC entries; they're now in
12188         universal_time_zone_table.
12189         (lookup_zone): Prefer universal_time_zone_table to
12190         local_time_zone_table, so that "GMT" time stamps are allowed in
12191         London during the summer.  Problem reported by Ian Abbott.
12192
12193 2005-04-12  Jim Meyering  <jim@meyering.net>
12194
12195         * lib/human.c (humblock): Set *options even when returning due to
12196         xstrtoumax conversion failure.  Thanks to a used-uninitialized
12197         warning from gcc-4.
12198
12199 2005-04-09  Jim Meyering  <jim@meyering.net>
12200
12201         * lib/posixtm.c (posixtime) [lint]: Avoid spurious warning from gcc-4's
12202         -Wuninitialized: initialize tm0.tm_year.
12203
12204 2005-04-04  Paul Eggert  <eggert@cs.ucla.edu>
12205
12206         * lib/getdate.y (parser_control): rels_seen is now a boolean, not a
12207         count, since there's no maximum.  All uses changed.
12208         Add member dsts_seen.
12209         (local_zone): Accumulate dsts_seen rather than relying on tm_isdst
12210         not being INT_MAX.
12211         (get_date): Initialize dsts_seen, and check that it doesn't go over 1.
12212         Use pc_rels_seen to decide whther a date is absolute.
12213
12214         * lib/getdate.y (number): Don't overwrite year.
12215         (get_date): Initialize pc.year.digits to 0, not 4, to enable above
12216         check.
12217
12218 2005-04-02  Simon Josefsson  <jas@extundo.com>
12219
12220         * lib/getaddrinfo.h: Fix OpenBSD compilation failure, inspired by tiny
12221         patch from Yoann Vandoorselaere <yoann@prelude-ids.org>.
12222
12223 2005-03-28  Eric Blake  <ebb9@byu.net>  (tiny change)
12224
12225         * m4/getcwd-path-max.m4: Return success on systems such as Cygwin
12226         where no absolute path name can be longer than PATH_MAX.
12227
12228 2005-03-27  Jim Meyering  <jim@meyering.net>
12229
12230         * lib/argmatch.c: Clarify comment: null-terminated -> NULL-terminated.
12231
12232 2005-03-26  Paul Eggert  <eggert@cs.ucla.edu>
12233
12234         * lib/intprops.h (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND):
12235         "one's complement" -> "ones' complement" in comment, as per Knuth.
12236         "value of type" -> "type or expression" in comment.
12237         * lib/mktime.c, strftime.c: Propagate intprops.h comment nits.
12238
12239 2005-03-26  Jim Meyering  <jim@meyering.net>
12240
12241         Comment nits.
12242         * lib/intprops.h: Add the apostrophe in `(one|two)'s complement'.
12243         Correct typos: s/or/of/.
12244
12245 2005-03-26  Jim Meyering  <jim@meyering.net>
12246
12247         * modules/check-include-files: Move to ../ and rename to...
12248         * check-module: ...this.
12249
12250 2005-03-25  Jim Meyering  <jim@meyering.net>
12251
12252         * modules/xvasprintf (Files): Add xalloc.h.
12253
12254 2005-03-23  Paul Eggert  <eggert@cs.ucla.edu>
12255
12256         * modules/gettext (Files): config/config.rpath ->
12257         build-aux/config.rpath
12258         * modules/iconv (Files): Likewise.
12259         Problem reported by Oskar Liljeblad.
12260
12261 2005-03-23  Jim Meyering  <jim@meyering.net>
12262
12263         * modules/check-include-files: New script to check for
12264         missing dependencies, multiple includes, etc.
12265
12266         * modules/c-strtold (Depends-on): Add xalloc.
12267         * modules/c-strtod (Depends-on): Add xalloc.
12268         * modules/hash (Depends-on): Add xalloc.
12269         (Files): Remove lib/xalloc.h.
12270
12271         * modules/gethrxtime (Files): Add lib/gethrxtime.h.
12272         * modules/userspec (Files): Add lib/inttostr.h.
12273
12274 2005-03-23  Jim Meyering  <jim@meyering.net>
12275
12276         * lib/canonicalize.c: Remove duplicate `#include "stat-macros.h"'.
12277
12278 2005-03-22  Jim Meyering  <jim@meyering.net>
12279
12280         * modules/stat-macros: New module.
12281         * modules/canonicalize, modules/euidaccess, modules/file-type,
12282         * modules/filemode, modules/lchown, modules/makepath,
12283         * modules/rmdir, modules/stat: Depend on new stat-macros module
12284         rather than listing lib/stat-macros.h manually.
12285         Don't add stat-macros.h to lib_SOURCES or list it in Files: section.
12286
12287 2005-03-22  Jim Meyering  <jim@meyering.net>
12288
12289         * m4/stat-macros.m4 (gl_STAT_MACROS): New file/macro.
12290
12291 2005-03-22  Bruno Haible  <bruno@clisp.org>
12292
12293         * config/srclist.txt: Replace target directory 'config' with
12294         'build-aux'.
12295         * config/config.guess, config.sub, config.rpath, depcomp, install-sh:
12296         * config/mdate-sh, missing, mkinstalldirs, texinfo.tex: Move to
12297         ../build-aux/.
12298
12299 2005-03-21  Paul Eggert  <eggert@cs.ucla.edu>
12300
12301         * modules/chdir-long (Depends-on): Add mempcpy.
12302
12303         * modules/acl, modules/backupfile, modules/c-strtod,
12304         modules/c-strtold, modules/canon-host, modules/canonicalize,
12305         modules/cloexec, modules/closeout, modules/dirfd, modules/dirname,
12306         modules/exclude, modules/exitfail, modules/file-type,
12307         modules/filemode, modules/fpending, modules/fsusage, modules/getcwd,
12308         modules/getdate, modules/getline, modules/getpagesize,
12309         modules/getpass, modules/getugroups, modules/group-member,
12310         modules/hard-locale, modules/hash, modules/human, modules/idcache,
12311         modules/inttostr, modules/long-options, modules/makepath,
12312         modules/md5, modules/memcasecmp, modules/memcoll,
12313         modules/modechange, modules/mountlist, modules/path-concat,
12314         modules/pathmax, modules/physmem, modules/posixtm, modules/posixver,
12315         modules/quote, modules/quotearg, modules/readtokens, modules/readutmp,
12316         modules/safe-read, modules/safe-write, modules/same, modules/savedir,
12317         modules/settime, modules/sha1, modules/sig2str, modules/strdup,
12318         modules/strftime, modules/strndup, modules/strverscmp,
12319         modules/timespec, modules/unlocked-io, modules/userspec,
12320         modules/utimecmp, modules/utimens, modules/xalloc, modules/xstrtol,
12321         modules/yesno:
12322         Remove lib_SOURCES line from Makefile.am section, as this is now
12323         done automatically by the corresponding Autoconf macro.
12324
12325 2005-03-21  Jim Meyering  <jim@meyering.net>
12326
12327         Changes imported from coreutils.
12328
12329         * lib/cycle-check.c: Don't include xalloc.h.
12330
12331         * lib/path-concat.c: Don't include assert.h.
12332         (path_concat): Remove assertion that would have triggered
12333         for ABASE starting with more than one slash.
12334         Reported by Andreas Schwab.
12335
12336         * lib/path-concat.c (path_concat): Set *BASE_IN_RESULT
12337         properly when ABASE is an absolute file name.
12338         Correct the description of this function.
12339         Include <assert.h>.
12340         Add an assertion and a test driver.
12341         This fixes a bug introduced on 2004-07-02.
12342         Andreas Schwab reported the resulting failure of cp --parents:
12343         http://lists.gnu.org/archive/html/bug-coreutils/2005-01/msg00130.html
12344
12345 2005-03-21  Jim Meyering  <jim@meyering.net>
12346
12347         * m4/chdir-long.m4 (gl_PREREQ_CHDIR_LONG): Invoke gl_FUNC_MEMRCHR.
12348         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Check for memrchr decl.
12349
12350 2005-03-21  Jim Meyering  <jim@meyering.net>
12351         and  Paul Eggert  <eggert@cs.ucla.edu>
12352
12353         * m4/acl.m4, m4/backupfile.m4, m4/c-strtod.m4, m4/canon-host.m4,
12354         m4/canonicalize.m4, m4/cloexec.m4, m4/closeout.m4, m4/dirfd.m4,
12355         m4/dirname.m4, m4/exclude.m4, m4/exitfail.m4, m4/file-type.m4,
12356         m4/filemode.m4, m4/fpending.m4, m4/fsusage.m4, m4/getcwd.m4,
12357         m4/getdate.m4, m4/getline.m4, m4/getpagesize.m4, m4/getpass.m4,
12358         m4/getugroups.m4, m4/group-member.m4, m4/hard-locale.m4, m4/hash.m4,
12359         m4/human.m4, m4/idcache.m4, m4/inttostr.m4, m4/long-options.m4,
12360         m4/makepath.m4, m4/md5.m4, m4/memcasecmp.m4, m4/memcoll.m4,
12361         m4/modechange.m4, m4/mountlist.m4, m4/nanosleep.m4, m4/path-concat.m4,
12362         m4/pathmax.m4, m4/physmem.m4, m4/posixtm.m4, m4/posixver.m4,
12363         m4/quote.m4, m4/quotearg.m4, m4/readtokens.m4, m4/readutmp.m4,
12364         m4/safe-read.m4, m4/safe-write.m4, m4/same.m4, m4/savedir.m4,
12365         m4/settime.m4, m4/sha1.m4, m4/sig2str.m4, m4/strdup.m4, m4/strftime.m4,
12366         m4/strndup.m4, m4/strverscmp.m4, m4/timespec.m4, m4/unlocked-io.m4,
12367         m4/userspec.m4, m4/utimecmp.m4, m4/utimens.m4, m4/xalloc.m4,
12368         m4/xnanosleep.m4, m4/xstrtol.m4, m4/yesno.m4:
12369         Use AC_LIBSOURCES and AC_LIBOBJ to indicate source and object files
12370         for these modules.
12371
12372 2005-03-18  Paul Eggert  <eggert@cs.ucla.edu>
12373
12374         * lib/strftime.c (my_strftime): If the underlying strftime returns 0
12375         (which shouldn't happen), generate nothing instead of returning 0
12376         immediately, so that nstrftime (NULL, ...) doesn't return 0.
12377
12378 2005-03-16  Bruno Haible  <bruno@clisp.org>
12379
12380         * modules/stdint (Makefile.am): Use HAVE_LONG_LONG_64BIT instead of
12381         HAVE_LONGLONG_64BIT.
12382
12383 2005-03-16  Bruno Haible  <bruno@clisp.org>
12384
12385         * m4/stdint.m4 (gl_STDINT_H): Define HAVE_LONG_LONG_64BIT instead of
12386         HAVE_LONGLONG_64BIT.
12387
12388 2005-03-16  Bruno Haible  <bruno@clisp.org>
12389
12390         * lib/stdint_.h: Use HAVE_LONG_LONG_64BIT instead of
12391         HAVE_LONGLONG_64BIT.
12392
12393 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12394
12395         * lib/strftime.c (my_strftime): Prepend space to format so that we can
12396         reliably distinguish strftime failure from empty output on POSIX
12397         hosts.
12398
12399 2005-03-15  Paul Eggert  <eggert@cs.ucla.edu>
12400
12401         * lib/iconvme.c (SIZE_MAX): New macro, if not already defined.
12402         (iconv_string): Don't guess a size-zero buffer, as that might cause
12403         buffer overrun.  Instead, avoid multiplying by MB_LEN_MAX if the
12404         result would be 'too large', where 'too large' is (heuristically)
12405         the square root of SIZE_MAX, divided by MB_LEN_MAX to allay
12406         overflow concerns.  This will prevent some unwanted malloc failures
12407         when the inputs are very large.
12408
12409 2005-03-15  Karl Berry  <karl@gnu.org>
12410
12411         * config/srclist.txt (config.rpath): from gettext.
12412         * config/config.rpath: update.
12413
12414 2005-03-15  Bruno Haible  <bruno@clisp.org>
12415
12416         * lib/regex.c (byte_re_match_2_internal): Rename local variable 'not'
12417         to 'negate'.
12418
12419         * lib/regex.c (byte_re_match_2_internal): Reduce scope of same_str_p
12420         variable.
12421
12422         * lib/regex.c (EXTEND_BUFFER, regcomp): Cast the realloc/malloc
12423         results.
12424
12425 2005-03-14  Simon Josefsson  <jas@extundo.com>
12426
12427         * lib/timegm.h: Use proper prototype CPP guards, reported by Dave Love
12428         <fx@gnu.org>.
12429
12430 2005-03-14  Paul Eggert  <eggert@cs.ucla.edu>
12431
12432         * lib/mktime.c (TYPE_TWOS_COMPLEMENT, TYPE_ONES_COMPLEMENT,
12433         TYPE_SIGNED_MAGNITUDE, TYPE_MINIMUM, TYPE_MAXIMUM): Sync from
12434         intprops.h.
12435         * lib/strtol.c: Likewise.
12436
12437 2005-03-14  Jim Meyering  <jim@meyering.net>
12438
12439         * lib/strftime.c (my_strftime) [HAVE_STRFTIME && ! (_NL_CURRENT
12440         && HAVE_STRUCT_ERA_ENTRY)]: Initialize the first byte of ubuf[]
12441         to be nonzero so that we (and caller) can detect the difference
12442         between a valid zero-length expansion and an error return, even
12443         when the underlying strftime fails before writing anything into
12444         that location.
12445
12446 2005-03-14  Bruno Haible  <bruno@clisp.org>
12447
12448         * m4/lib-link.m4, gettext.m4, nls.m4, po.m4:
12449         Update from GNU gettext 0.14.3.
12450
12451 2005-03-10  Jim Meyering  <jim@meyering.net>
12452
12453         * m4/save-cwd.m4 (gl_SAVE_CWD): Check for fchdir.
12454
12455 2005-03-10  Jim Meyering  <jim@meyering.net>
12456
12457         * lib/save-cwd.c [!HAVE_FCHDIR]: Define open, fchdir, and chdir_long
12458         so that this module works on systems without fchdir.
12459
12460 2005-03-09  Paul Eggert  <eggert@cs.ucla.edu>
12461
12462         Factor int-properties macros into a single file, except for
12463         glibc-related files.
12464         * lib/intprops.h: New file.
12465         * lib/getloadavg.c: Include it instead of limits.h.
12466         (INT_STRLEN_BOUND): Remove.
12467         * lib/human.c: Include intprops.h.
12468         (group_number): Use INT_STRLEN_BOUND instead of rolling it ourself.
12469         * lib/human.h (LONGEST_HUMAN_READABLE): Use 146/485 rather than
12470         302/1000.
12471         * lib/inttostr.h: Include intprops.h instead of limits.h.
12472         (INT_STRLEN_BOUND, INT_BUFSIZE_BOUND): Remove.
12473         * lib/mktime.c (TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT): New macros,
12474         for consistency with intprops.h.
12475         (time_t_is_integer, twos_complement_arithmetic): Use them.
12476         * lib/sig2str.h: Include <signal.h>, intprops.h.
12477         (INT_STRLEN_BOUND): Remove.
12478         * lib/strftime.c (TYPE_SIGNED): Remove.
12479         (INT_STRLEN_BOUND): Switch to same implementation as intprops.h.
12480         * lib/strtol.c: Adjust comments to match intprops.h.
12481         * lib/userspec.c: Include intprops.h.
12482         (TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Remove.
12483         * lib/utimecmp.c, xnanosleep.c, xstrtol.c: Likewise.
12484         * lib/utimecmp.c (utimecmp): Use TYPE_IS_INTEGER, TYPE_TWOS_COMPLEMENT
12485         instead of rolling our own expressions.
12486         * lib/xstrtol.c: Include xstrtol.h first, to test interface.
12487
12488         * lib/strftime.c: Include <stdbool.h>.  Use bool where appropriate,
12489         instead of int.
12490         (my_strftime): Do not mishandle years close to INT_MAX, by doing
12491         the right thing even if adding 1900 would overflow.  Similarly
12492         for tm_mon + 1 and tm_yday + 1.
12493         Make %Y always equivalent to %C%y, and similarly for %G and %g.
12494         (DO_NUMBER, DO_NUMBER_SPACEPAD): Set digits to d, not a conditional.
12495         (DO_SIGNED_NUMBER): New macro.
12496         (my_strftime) [HAVE_TZNAME]: Don't dump core if tp->tm_dst > 1.
12497
12498 2005-03-07  Bruno Haible  <bruno@clisp.org>
12499
12500         * m4/mmap-anon.m4 (MAP_FILE, MAP_FAILED): Remove definitions.
12501
12502 2005-03-07  Bruno Haible  <bruno@clisp.org>
12503
12504         * lib/pagealign_alloc.c (MAP_FILE, MAP_FAILED): Define fallbacks.
12505
12506 2005-03-04  Derek R. Price  <derek@ximbiot.com>
12507
12508         * gnulib-tool (func_cp_if_changed, func_mv_if_changed): New functions.
12509         (func_import): Only replace files via --import when they have actually
12510         changed.
12511
12512 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12513
12514         * m4/mmap-anon.m4: New file.
12515         * m4/pagealign_alloc.m4: New file.
12516
12517 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12518             Bruno Haible  <bruno@clisp.org>
12519
12520         * modules/pagealign_alloc: New file.
12521         * MODULES.html.sh (Memory management functions): Add pagealign_alloc.
12522
12523 2005-03-03  Derek R. Price  <derek@ximbiot.com>
12524             Bruno Haible  <bruno@clisp.org>
12525
12526         * lib/pagealign_alloc.h: New file.
12527         * lib/pagealign_alloc.c: New file.
12528
12529 2005-03-03  Bruno Haible  <bruno@clisp.org>
12530
12531         * m4/inttypes.m4, isc-posix.m4, once-only.m4:
12532         Use an all-permissive copyright notice, recommended by RMS.
12533
12534 2005-03-02  Bruno Haible  <bruno@clisp.org>
12535
12536         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Undo the replacement here. Because
12537         of AIX, the replacement has to be done only after <string.h> is
12538         included, therefore not in config.h. stpncpy.h does the replacement,
12539         and stpncpy.c uses it.
12540
12541 2005-03-02  Bruno Haible  <bruno@clisp.org>
12542
12543         * lib/stpncpy.h (stpncpy): Define as a macro without arguments, so that
12544         stpncpy.c uses it.
12545
12546 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12547
12548         Remove workaround for bug in Linux kernel 2.6.8 or thereabouts.
12549         The workaround isn't strictly needed for POSIX conformance, and
12550         it's too much of a pain to configure and maintain.  We'll ask
12551         people to fix their kernels instead.
12552         * lib/xnanosleep.c: Don't include gethrxtime.h or xtime.h.
12553         (NANOSLEEP_BUG_WORKAROUND): Remove.
12554         (xnanosleep): Remove the workaround.
12555
12556 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12557
12558         * modules/gettime (Makefile.am): Remove lib_SOURCES line.
12559         Reported by Derek Price.
12560         (Include): Add "timespec.h".
12561
12562         * modules/xnanosleep (Depends-on): Remove gethrxtime.
12563
12564 2005-03-01  Paul Eggert  <eggert@cs.ucla.edu>
12565
12566         * m4/xnanosleep.m4 (gl_XNANOSLEEP): Remove configuration attempting
12567         to detect nanosleep bug.
12568
12569 2005-03-01  Bruno Haible  <bruno@clisp.org>
12570
12571         * lib/vasnprintf.c (EOVERFLOW): Define to a fallback if needed.
12572
12573 2005-02-26  Paul Eggert  <eggert@cs.ucla.edu>
12574
12575         * modules/gethrxtime: New file.
12576         * modules/xnanosleep (Files): Add m4/xnanosleep.m4.
12577         (Depends-on): Add gethrxtime.
12578         (configure.ac): Add gl_XNANOSLEEP.
12579         (Makefile.am): Remove lib_SOURCES line.
12580
12581 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12582
12583         * m4/gethrxtime.m4, m4/xnanosleep.m4: New files.
12584         * m4/gettime.m4 (gl_GETTIME): Check for nanotime.
12585
12586 2005-02-25  Paul Eggert  <eggert@cs.ucla.edu>
12587
12588         * lib/gethrxtime.h, lib/gethrxtime.c, lib/xtime.h: New files.
12589         * lib/timespec.h (gettime): Return void, since it always
12590         succeeds now.  All uses changed.
12591         * lib/gettime.c (gettime) Likewise.
12592         [HAVE_NANOTIME]: Prefer nanotime.
12593         Assume gettimeofday succeeds, as POSIX requires.
12594         Assime time () succeeds, since other code already does.
12595         * lib/xnanosleep.c: Include xtime.h and gethrxtime.h, not xalloc.h.
12596         (timespec_subtract): Remove.
12597         (NANOSLEEP_BUG_WORKAROUND): New constant.
12598         (xnanosleep): Use gethrxtime rather than gettime; this simplifies
12599         things considerably.  Use it only on GNU/Linux hosts, since the
12600         workaround shouldn't be needed elsewhere.
12601
12602 2005-02-24  Bruno Haible  <bruno@clisp.org>
12603
12604         * modules/gettext (Files): Add m4/glibc2.m4.
12605
12606 2005-02-24  Bruno Haible  <bruno@clisp.org>
12607
12608         * m4/gettext.m4, intdiv0.m4, intmax.m4, inttypes-pri.m4, lcmessage.m4:
12609         * m4/lib-link.m4, lib-prefix.m4, nls.m4, po.m4, printf-posix.m4:
12610         * m4/progtest.m4:
12611         Update from GNU gettext 0.14.2.
12612         * m4/glibc2.m4: New file, from GNU gettext 0.14.2.
12613
12614 2005-02-24  Bruno Haible  <bruno@clisp.org>
12615
12616         * lib/localcharset.c: Update from GNU gettext 0.14.2.
12617         * lib/config.charset: Update from GNU gettext 0.14.2.
12618
12619 2005-02-24  Bruno Haible  <bruno@clisp.org>
12620
12621         * lib/gettext.h: Update from GNU gettext 0.14.2.
12622
12623 2005-02-23  Simon Josefsson  <jas@extundo.com>
12624
12625         * m4/iconvme.m4: New file.
12626
12627 2005-02-23  Jim Meyering  <jim@meyering.net>
12628
12629         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Revert yesteday's
12630         change.
12631         Thanks to Bruno Haible for catching it.
12632
12633 2005-02-22  Simon Josefsson  <jas@extundo.com>
12634
12635         * modules/iconvme: New file.
12636
12637         * MODULES.html.sh: Add iconvme.
12638
12639 2005-02-22  Simon Josefsson  <jas@extundo.com>
12640
12641         * lib/iconvme.h, lib/iconvme.c: New files, from libc.
12642
12643 2005-02-22  Simon Josefsson  <jas@extundo.com>
12644
12645         * config/srclist.txt: Sync iconvme.h, iconvme.c from libc.
12646
12647 2005-02-22  Jim Meyering  <jim@meyering.net>
12648
12649         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Fix typo:
12650         s/ifndef/ifdef/.
12651
12652 2005-02-20  Neil Conway  <neilc@samurai.com>
12653
12654         * lib/xgethostname.c (xgethostname): Check for ENOMEM, which is
12655         returned by OSX/Darwin if the specified buffer is not large
12656         enough for the hostname.
12657
12658 2005-02-03  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12659
12660         * lib/argp-help.c (__argp_help): Create a fake struct argp_state and
12661         pass it to _help, otherwise the latter coredumps trying to
12662         dereference state.root_argp.
12663
12664 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12665
12666         * modules/chdir-long (Depends-on): Add memrchr.
12667         * modules/memrchr (Files): Add lib/memrchr.h.
12668         (Include): "memrchr.h".
12669
12670 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12671
12672         * m4/memrchr.m4 (gl_FUNC_MEMRCHR): Add AC_LIBSOURCES, for memrchr.h.
12673
12674 2005-02-03  Paul Eggert  <eggert@cs.ucla.edu>
12675
12676         * lib/memrchr.h: New file.
12677         * lib/chdir-long.c: Include it.
12678         * lib/memrchr.c [!defined _LIBC]: Include it rather than <string.h>
12679         Don't bother including stddef.h.
12680
12681 2005-02-01  Paul Eggert  <eggert@cs.ucla.edu>
12682
12683         * lib/mountlist.h (MOUNTLIST_H_): New macro, to protect against double
12684         inclusion.
12685         Include <sys/types.h>, for dev_t.
12686         (ME_DUMMY, ME_REMOTE): Move from here....
12687         * lib/mountlist.c (ME_DUMMY, ME_REMOTE): To here.
12688         (ME_DUMMY): Count "subfs" as a dummy.  Problem reported by
12689         Dmitry V. Levin.
12690         Include mountlist.h first, to test the interface.
12691
12692 2005-01-29  Bruno Haible  <bruno@clisp.org>
12693
12694         * lib/progname.c (program_name): Initialize.
12695         Needed when linking statically on MacOS X.
12696
12697 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12698
12699         Sync from coreutils.
12700         * modules/getloadavg (Files): Remove m4/getloadavg.m4.
12701         (Depends-on): Add c-strtod.
12702         (configure.ac): Replace gl_FUNC_GETLOADAVG with AC_FUNC_GETLOADAVG.
12703
12704 2005-01-28  Paul Eggert  <eggert@cs.ucla.edu>
12705
12706         Sync from coreutils.
12707         * m4/getloadavg.m4, glibc.m4, search-libs.m4: Remove.
12708
12709         Remove files that are specific to coreutils.
12710         * m4/check-decl.m4, jm-macros.m4, lib-check.m4, prereq.m4: Remove.
12711
12712 2005-01-28  Bruno Haible  <bruno@clisp.org>
12713
12714         * modules/javacomp: New file.
12715         * MODULES.html.sh (Java): Add javacomp.
12716
12717 2005-01-28  Bruno Haible  <bruno@clisp.org>
12718
12719         * m4/javacomp.m4: New file, from GNU gettext.
12720
12721 2005-01-28  Bruno Haible  <bruno@clisp.org>
12722
12723         * lib/javacomp.sh.in: New file, from GNU gettext.
12724         * lib/javacomp.h: New file, from GNU gettext.
12725         * lib/javacomp.c: New file, from GNU gettext.
12726
12727 2005-01-26  Simon Josefsson  <jas@extundo.com>
12728
12729         * lib/gai_strerror.c: Use GPL in header.
12730
12731 2005-01-26  Bruno Haible  <bruno@clisp.org>
12732
12733         * modules/javaexec: New file.
12734         * MODULES.html.sh (Java): Add javaexec.
12735
12736 2005-01-26  Bruno Haible  <bruno@clisp.org>
12737
12738         * m4/javaexec.m4: New file, from GNU gettext.
12739
12740 2005-01-26  Bruno Haible  <bruno@clisp.org>
12741
12742         * lib/javaexec.sh.in: New file, from GNU gettext.
12743         * lib/javaexec.h: New file, from GNU gettext.
12744         * lib/javaexec.c: New file, from GNU gettext.
12745
12746 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12747
12748         * modules/lchown (Depends-on): Remove lchown.h
12749
12750 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12751
12752         * m4/sysexits.m4 (gl_SYSEXITS): Reverted logic. SYSEXITS_H
12753         must be defined if the header file was not found, in order
12754         to provide a replacement. Reported by Todd Vierling <tv@duh.org>
12755
12756 2005-01-24  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
12757
12758         * lib/argp-help.c (hol_entry_help): Avoid using non-constant
12759         initializers for struct pentry_state.
12760         (__argp_error): Check return value of __asprintf
12761         (__argp_failure): Translate error message
12762
12763         * lib/argp-parse.c: Removed braces around the expansion of N_()
12764
12765 2005-01-23  Paul Eggert  <eggert@cs.ucla.edu>
12766
12767         * m4/acl.m4, afs.m4, alloca.m4, argp.m4, assert.m4, atexit.m4,
12768         backupfile.m4, base64.m4, bison.m4, c-bs-a.m4, c-stack.m4,
12769         c-strtod.m4, calloc.m4, canon-host.m4, canonicalize.m4,
12770         clock_time.m4, cloexec.m4, closeout.m4, d-ino.m4, d-type.m4,
12771         dirfd.m4, dirname.m4, dos.m4, dup2.m4, error.m4, euidaccess.m4,
12772         exclude.m4, exitfail.m4, extensions.m4, fcntl-safer.m4,
12773         file-type.m4, fileblocks.m4, filemode.m4, fnmatch.m4, fpending.m4,
12774         free.m4, fstypename.m4, fsusage.m4, ftruncate.m4, getaddrinfo.m4,
12775         getcwd-path-max.m4, getcwd.m4, getdate.m4, getdomainname.m4,
12776         getgroups.m4, gethostname.m4, getline.m4, getndelim2.m4,
12777         getnline.m4, getopt.m4, getpagesize.m4, getpass.m4, getsubopt.m4,
12778         gettime.m4, gettimeofday.m4, getugroups.m4, getusershell.m4,
12779         group-member.m4, hard-locale.m4, hash.m4, host-os.m4, human.m4,
12780         idcache.m4, inttostr.m4, isdir.m4, jm-winsz1.m4, jm-winsz2.m4,
12781         link-follow.m4, long-options.m4, ls-mntd-fs.m4, lstat.m4,
12782         makepath.m4, mathl.m4, md5.m4, memcasecmp.m4, memchr.m4,
12783         memcmp.m4, memcoll.m4, memcpy.m4, memmem.m4, memmove.m4,
12784         memrchr.m4, memset.m4, mkdir-slash.m4, mkstemp.m4, mktime.m4,
12785         modechange.m4, mountlist.m4, nanosleep.m4, obstack.m4,
12786         path-concat.m4, pathmax.m4, perl.m4, physmem.m4, poll.m4,
12787         posixtm.m4, posixver.m4, putenv.m4, quote.m4, quotearg.m4,
12788         readdir.m4, readtokens.m4, readutmp.m4, regex.m4, rename.m4,
12789         restrict.m4, rmdir-errno.m4, rmdir.m4, rpmatch.m4, same.m4,
12790         savedir.m4, settime.m4, sha1.m4, sig2str.m4, snprintf.m4,
12791         sockpfaf.m4, st_dm_mode.m4, st_mtim.m4, stat.m4, stdint.m4,
12792         stdio-safer.m4, strchrnul.m4, strdup.m4, strerror.m4,
12793         strerror_r.m4, strftime.m4, strndup.m4, strnlen.m4, strsep.m4,
12794         strtod.m4, strtoimax.m4, strtok_r.m4, strtol.m4, strtoll.m4,
12795         strtoul.m4, strtoull.m4, strtoumax.m4, strverscmp.m4, sysexits.m4,
12796         time_r.m4, timegm.m4, timespec.m4, tm_gmtoff.m4, tzset.m4,
12797         uint32_t.m4, uintptr_t.m4, unistd-safer.m4, unlink-busy.m4,
12798         unlocked-io.m4, uptime.m4, userspec.m4, utimbuf.m4, utime.m4,
12799         utimecmp.m4, utimens.m4, utimes-null.m4, vsnprintf.m4, xalloc.m4,
12800         xgetcwd.m4, xreadlink.m4, xstrndup.m4, xstrtod.m4, xstrtoimax.m4,
12801         xstrtol.m4, xstrtoumax.m4, yesno.m4:
12802         Use an all-permissive copyright notice, recommended by RMS.
12803
12804 2005-01-21  Paul Eggert  <eggert@cs.ucla.edu>
12805
12806         * modules/chdir-long (Depends-on): Remove mempcpy.
12807
12808 2005-01-21  Jim Meyering  <jim@meyering.net>
12809
12810         * lib/openat.h (AT_SYMLINK_NOFOLLOW): Define to 4096, so it's the
12811         same value as for Solaris 9.
12812
12813         * lib/chdir-long.c (chdir_long): Rewrite to remove limitation on
12814         component length.  This included changing the parameter to be
12815         of type `char *' rather than `char const *'.
12816         * lib/chdir-long.h (chdir_long): Update prototype.
12817
12818         * lib/openat.c (fdopendir, fstatat): New functions.
12819         * lib/openat.h: Include headers required for use of DIR and struct
12820         stat.
12821         [AT_SYMLINK_NOFOLLOW]: Define.
12822         (fdopendir, fstatat): Add prototypes.
12823
12824 2005-01-21  Bruno Haible  <bruno@clisp.org>
12825
12826         * modules/classpath: New file.
12827         * MODULES.html.sh (Java): Add classpath.
12828
12829 2005-01-21  Bruno Haible  <bruno@clisp.org>
12830
12831         * lib/classpath.h: New file, from GNU gettext.
12832         * lib/classpath.c: New file, from GNU gettext.
12833
12834 2005-01-20  Simon Josefsson  <jas@extundo.com>
12835
12836         * modules/version-etc-fsf: New file.
12837
12838 2005-01-20  Simon Josefsson  <jas@extundo.com>
12839
12840         * lib/version-etc-fsf.c: New file, with version_etc_copyright.
12841         * lib/version-etc.c: Remove version_etc_copyright.
12842         * lib/version-etc.h (version_etc_copyright): Use [] instead of * in
12843         prototype, suggested by Paul Eggert <eggert@CS.UCLA.EDU>.
12844
12845 2005-01-20  Simon Josefsson  <jas@extundo.com>
12846
12847         * lib/base64.h (isbase64): Add.
12848
12849         * lib/base64.c (isb64): Rename to isbase64, use to_uchar instead of
12850         using a unsigned prototype, don't inline.
12851         (base64_decode): Use it.
12852
12853 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12854
12855         * m4/save-cwd.m4 (gl_SAVE_CWD): Remove check for fcntl; we now assume
12856         it.
12857
12858 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12859
12860         * lib/save-cwd.c (save_cwd): Remove code to support the case
12861         where fchdir is missing or flaky.
12862
12863 2005-01-20  Paul Eggert  <eggert@cs.ucla.edu>
12864
12865         * MODULES.html.sh (Command-line arguments): Add version-etc-fsf.
12866
12867 2005-01-19  Paul Eggert  <eggert@cs.ucla.edu>
12868
12869         * modules/mempcpy (Makefile.am): Remove mention of mempcpy.h;
12870         AC_LIBSOURCES now does this.
12871         * MODULES.html.sh (Sizes of integer types <limits.h>): New element,
12872         with new ullong_max module.
12873
12874 2005-01-19  Bruno Haible  <bruno@clisp.org>
12875
12876         * modules/sh-quote: New file.
12877         * MODULES.html.sh (Executing programs): Add sh-quote.
12878
12879 2005-01-19  Bruno Haible  <bruno@clisp.org>
12880
12881         * lib/sh-quote.h: New file, from GNU gettext.
12882         * lib/sh-quote.c: New file, from GNU gettext.
12883
12884 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12885
12886         Merge from coreutils.
12887         * m4/ullong_max.m4: New file.
12888         * m4/jm-macros.m4 (gl_MACROS): Require gl_ULLONG_MAX.
12889         (gl_MACROS): Assume localeconv exists.
12890
12891 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12892
12893         Merge changes from coreutils, as described below in several
12894         changelogs dated today.
12895
12896         * lib/save-cwd.c: Include "save-cwd.h" before other include files.
12897         (O_DIRECTORY): Remove; not needed here, since "." must be
12898         a directory.  All uses removed.
12899         (save_cwd): Use __sgi || __sun, not sun || __sun.  __sun is
12900         universal on Suns, and we also need to test for IRIX.
12901         Revamp code to use 'if' rather than '#if'.
12902         Avoid unnecessary comparison of cwd->desc to 0.
12903
12904         * lib/utimens.c (futimens): Robustify the previous patch, by checking
12905         for known valid error numbers rather than observed invalid ones.
12906
12907 2005-01-18  Paul Eggert  <eggert@cs.ucla.edu>
12908
12909         * modules/ullong_max: New file.
12910
12911         * modules/chdir-long, modules/openat: New files.
12912         * modules/save-cwd (Depends-on): Depend on chdir-long.
12913         (Makefile.am): Remove lib_SOURCES; now handled by AC_LIBSOURCES.
12914
12915 2005-01-18  Jim Meyering  <jim@meyering.net>
12916
12917         Merge from coreutils.
12918         * m4/chdir-long.m4, m4/openat.m4: New files.
12919         * m4/save-cwd.m4 (gl_SAVE_CWD): Add AC_LIBSOURCES for save-cwd.c,
12920         save-cwd.h.  Add AC_LIBOBJ for save-cwd.
12921         * m4/chown.m4 (gl_FUNC_CHOWN): When cross-compiling, assume that chown
12922         is sane and DOES follow symlinks.  Besides, testing 20 different
12923         systems found no broken chown implementations.
12924         Prompted by a change in rsync's copy of this macro.
12925         * m4/jm-macros.m4 (gl_MACROS): Require gl_FUNC_CHDIR_LONG.
12926
12927         * m4/lchown.m4 (gl_FUNC_LCHOWN): Use AC_LIBSOURCES.
12928
12929         * m4/utimes.m4: Work around tests/touch/empty-file failure on a system
12930         (sparc64, Linux-2.4.28, glibc-2.3.3) that didn't honor utimes'
12931         NULL-means-set-to-current-time semantics.
12932         Remove temporary file immediately, rather than waiting
12933         for configure's at-exit trap code to do it.
12934
12935 2005-01-18  Jim Meyering  <jim@meyering.net>
12936
12937         * lib/version-etc.c (version_etc_copyright): Update copyright date.
12938
12939         * lib/utimens.c (futimens): Account for the fact that futimes
12940         can also fail with errno == ENOSYS or errno == ENOENT.
12941         Patch from Dmitry V. Levin.
12942
12943         Change the name of the robust chdir function from chdir to chdir_long.
12944         * lib/save-cwd.c: Include chdir-long.h rather than chdir.h.
12945         (restore_cwd): Use chdir_long, not chdir.
12946         * lib/chdir-long.c: Renamed from chdir.c.
12947         * lib/chdir-long.h: Renamed from chdir.h.
12948         [!defined PATH_MAX]: Define chdir_long to chdir on systems like the
12949         Hurd.
12950
12951 2005-01-18  Bruno Haible  <bruno@clisp.org>
12952
12953         * m4/allocsa.m4, m4/codeset.m4, m4/copy-file.m4, m4/eaccess.m4:
12954         * m4/eealloc.m4, m4/eoverflow.m4, m4/execute.m4, m4/fatal-signal.m4:
12955         * m4/findprog.m4, m4/glibc21.m4, m4/iconv.m4, m4/intmax_t.m4:
12956         * m4/inttypes_h.m4, m4/lib-ld.m4, m4/lib-link.m4, m4/lib-prefix.m4:
12957         * m4/linebreak.m4, m4/localcharset.m4, m4/longdouble.m4:
12958         * m4/longlong.m4, m4/mbrtowc.m4, m4/mbstate_t.m4, m4/mbswidth.m4:
12959         * m4/mkdtemp.m4, m4/pipe.m4, m4/readlink.m4, m4/safe-read.m4:
12960         * m4/safe-write.m4, m4/setenv.m4, m4/sig_atomic_t.m4:
12961         * m4/signalblocking.m4, m4/signed.m4, m4/size_max.m4, m4/ssize_t.m4:
12962         * m4/stdbool.m4, m4/stdint_h.m4, m4/stpcpy.m4, m4/stpncpy.m4:
12963         * m4/strcase.m4, m4/strcspn.m4, m4/strpbrk.m4, m4/strstr.m4:
12964         * m4/ucs4-utf.m4, m4/uintmax_t.m4, m4/ulonglong.m4, m4/unicodeio.m4:
12965         * m4/utf-ucs4.m4, m4/vasnprintf.m4, m4/vasprintf.m4:
12966         * m4/wait-process.m4, m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4:
12967         Use an all-permissive copyright notice, recommended by RMS.
12968
12969 2005-01-18  Bob Proulx  <bob@proulx.com>
12970
12971         * lib/obstack.c [DEFAULT_ALIGNMENT]: Use an intermediate type to
12972         simplify offsetof() macro construct to avoid compile failure with
12973         native HP-UX 11.0 ANSI C compiler.
12974
12975 2005-01-17  Bruno Haible  <bruno@clisp.org>
12976
12977         * lib/stpncpy.c: Remove HAVE_STPNCPY and gnu_stpncpy renaming,
12978         redundant because stpncpy.m4 takes care of it.
12979
12980 2005-01-17  Bruno Haible  <bruno@clisp.org>
12981
12982         * lib/progreloc.c: Include xalloc.h instead of xmalloc.h.
12983
12984 2005-01-17  Bruno Haible  <bruno@clisp.org>
12985
12986         * lib/progreloc.c (xstrdup): Define as strdup if no xmalloc should be
12987         used.
12988
12989 2005-01-17  Bruno Haible  <bruno@clisp.org>
12990
12991         * lib/fwriteerror.h (fwriteerror): Change specification to include
12992         fclose.
12993         * lib/fwriteerror.c: Include <stdbool.h>.
12994         (fwriteerror): At the end, close the file stream. Record whether
12995         stdout was already closed.
12996
12997 2005-01-17  Bruno Haible  <bruno@clisp.org>
12998
12999         * lib/execute.c (environ): Declare if needed.
13000         * lib/pipe.c (environ): Likewise.
13001         Reported by Michael Schloh von Bennewitz <michael.schloh@cw.com>.
13002
13003 2005-01-11  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13004
13005         * modules/argp: Depend on vsnprintf
13006
13007 2005-01-10  Jim Meyering  <jim@meyering.net>
13008
13009         * modules/closeout (Depends-on): Add atexit.
13010
13011 2005-01-06  Bruno Haible  <bruno@clisp.org>
13012
13013         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Rename stpncpy to gnu_stpncpy here.
13014
13015 2005-01-04  Paul Eggert  <eggert@cs.ucla.edu>
13016
13017         * lib/human.c (SIZE_MAX, UINTMAX_MAX): Move these conditional
13018         definitions to be after all include files, to avoid collisions.
13019         Problem reported by Bob Proulx.
13020
13021 2005-01-04  Jim Meyering  <jim@meyering.net>
13022
13023         Changes imported from coreutils.
13024         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Rather than using "conftestXXXXXX"
13025         as the mkstemp template, use a temporary directory and an
13026         8.3-friendly template to avoid trouble on systems like DJGPP.
13027         Reported by Juan M. Guerrero via Stepan Kasal.
13028         * m4/(gl_FUNC_MKSTEMP): Include <unistd.h> for the declaration of
13029         close. Remove the temporary directory right away, rather than waiting
13030         for configure's at-exit trap code to do it.
13031         Suggestion from Stepan Kasal.
13032
13033 2005-01-01  Simon Josefsson  <jas@extundo.com>
13034
13035         * gnulib-tool: Print #include directives when --import'ing.
13036
13037 2004-12-28  Simon Josefsson  <jas@extundo.com>
13038
13039         * tests/test-base64.c: Include required header files.  Remove
13040         unused variables.
13041
13042 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13043
13044         * modules/error (Depends-on): Remove gettext.
13045
13046 2004-12-28  Paul Eggert  <eggert@cs.ucla.edu>
13047
13048         * lib/error.c [!_LIBC && !ENABLE_NLS]: Do not include "gettext.h";
13049         not needed.  This removes a dependency on the gettext module.
13050         [defined _LIBC]: Do not include <libintl.h>; not needed.
13051
13052 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13053
13054         * m4/c-strtod.m4 (gl_C99_STRTOLD): New macro.
13055         (gl_C_STRTOD): Use it instead of AC_CHECK_DECLS_ONCE(strtold).
13056
13057 2004-12-24  Paul Eggert  <eggert@cs.ucla.edu>
13058
13059         * lib/c-strtod.c (STRTOD): Depend on HAVE_C99_STRTOLD, not
13060         HAVE_DECL_STRTOLD.
13061
13062 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13063
13064         * modules/getdate (Depends-on): Remove alloca-opt.
13065
13066 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13067
13068         * m4/getdate.m4 (gl_GETDATE): Remove AC_FUNC_ALLOCA.
13069
13070 2004-12-23  Paul Eggert  <eggert@cs.ucla.edu>
13071
13072         * lib/argp-parse.c: Include <stddef.h>.
13073         (alignof, alignto): New macros.
13074         (parser_init): Don't assume that void * is aligned sufficiently
13075         for struct option.
13076
13077         * lib/getdate.y (YYSTACK_USE_ALLOCA): Define to 0, since there's no
13078         need to extend the stack.
13079         (YYINITDEPTH): New macro, so that the initial stack isn't overly
13080         large.
13081
13082 2004-12-22  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13083
13084         * lib/argp-parse.c (parser_init): Avoid arithmetics on void pointers.
13085
13086 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13087
13088         * modules/regex (lib_SOURCES): Remove regex.c, undoing previous
13089         (2004-10-24) change.  Apparently this was a false alarm.
13090
13091         * modules/getdate: Depend on alloca-opt, not alloca.
13092
13093 2004-12-19  Paul Eggert  <eggert@cs.ucla.edu>
13094
13095         * lib/alloca_.h: Conditionalize on _GNULIB_ALLOCA_H, not _ALLOCA_H.
13096         Remove now-obsolete comment about AIX.
13097         * lib/getdate.y: Include <alloca.h> only if HAVE_ALLOCA.
13098         (YYSTACK_USE_ALLOCA): Define to 0 if !HAVE_ALLOCA.
13099         (YYMAXDEPTH): New macro.
13100
13101 2004-12-18  Simon Josefsson  <jas@extundo.com>
13102
13103         * modules/alloca: Depend on alloca-opt, instead of duplicating it.
13104
13105 2004-12-18  Bruno Haible  <bruno@clisp.org>
13106
13107         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Also test for sigaction.
13108
13109 2004-12-18  Bruno Haible  <bruno@clisp.org>
13110
13111         * lib/fatal-signal.c (fatal_signals): Make non-const.
13112         (init_fatal_signals): New function.
13113         (uninstall_handlers, install_handlers): Ignore signals that were set to
13114         SIG_IGN.
13115         (at_fatal_signal): Call init_fatal_signals.
13116         (init_fatal_signal_set): Likewise. Ignore signals that were set to
13117         SIG_IGN.
13118         Reported by Paul Eggert.
13119
13120 2004-12-18  Bruno Haible  <bruno@clisp.org>
13121
13122         * doc/alloca.texi: New file.
13123         * doc/alloca-opt.texi: New file.
13124
13125 2004-12-17  Jim Meyering  <jim@meyering.net>
13126
13127         * config/install-sh: Use `(exit N); exit N', not `(exit N); exit'.
13128         Otherwise, install-sh could exit with improper exit status when
13129         exiting via a trapped interrupt.  Thanks to a report from Bob Proulx.
13130
13131 2004-12-16  Simon Josefsson  <jas@extundo.com>
13132
13133         * tests/test-base64.c: Add license.
13134
13135 2004-12-15  Stepan Kasal  <address@hidden>
13136
13137         * gnulib-tool (func_emit_lib_Makefile_am): Shorten a long sed command.
13138
13139 2004-12-12  Paul Eggert  <eggert@cs.ucla.edu>
13140
13141         * modules/getcwd (Files): Add m4/d-ino.m4.
13142         Suggested by Mark D. Baushke.
13143
13144 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13145
13146         * lib/getdate.y (textint): New member "negative".
13147         (time_zone_hhmm): New function.
13148         Expect 14 shift-reduce conflicts, not 13.
13149         (o_colon_minutes): New rule.
13150         (time, zone): Use it to add support for +HH:MM, UTC+HH:MM.
13151         (yylex): Set the "negative" member of signed numbers.
13152
13153 2004-12-08  Paul Eggert  <eggert@cs.ucla.edu>
13154
13155         * doc/getdate.texi (Time of day items, Time zone items):
13156         Describe new formats +00:00, UTC+00:00.
13157
13158 2004-12-07  Paul Eggert  <eggert@cs.ucla.edu>
13159
13160         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): Fix typo in previous change:
13161         spurious "-l"s.  Problem reported by Stepan Kasal.
13162
13163 2004-12-06  Paul Eggert  <eggert@cs.ucla.edu>
13164
13165         * m4/ls-mntd-fs.m4 (AC_FUNC_GETMNTENT): New macro, to work around bug
13166         in Autoconf 2.59.  Problem reported by Mark D. Baushke.
13167
13168 2004-12-04  Simon Josefsson  <jas@extundo.com>
13169
13170         * modules/getaddrinfo (License): Add LGPL, reported by Yoann
13171         Vandoorselaere <yoann@prelude-ids.org>.
13172
13173 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13174
13175         Changes imported from coreutils.
13176         * m4/hard-locale.m4 (gl_HARD_LOCALE): Assume locale.h and setlocale
13177         exist.
13178         * m4/human.m4 (gl_HUMAN): Assume locale.h and localeconv exist.
13179
13180 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13181
13182         Changes imported from coreutils.
13183         * lib/hard-locale.c: Assume <locale.h> exists.
13184         Include "strdup.h".
13185         (GLIBC_VERSION): New macro.
13186         (hard_locale): Assume setlocale exists.
13187         Rewrite to avoid #ifdef.
13188         Use strdup rather than malloc + strcpy.
13189         * lib/human.c: Assume <locale.h> exists.
13190         (human_readable): Assume localeconv exists.
13191
13192 2004-12-04  Paul Eggert  <eggert@cs.ucla.edu>
13193
13194         * modules/hard-locale (Depends-on): Add strdup.
13195
13196 2004-12-01  Jakub Jelinek  <jakub@redhat.com>
13197
13198         * lib/mktime.c (__mktime_internal): If SEC_REQUESTED != SEC,
13199         convert T2, not T.  (Imported from libc.)
13200
13201 2004-11-30  Simon Josefsson  <jas@extundo.com>
13202
13203         * modules/restrict (License): Change to LGPL.
13204
13205 2004-11-30  Simon Josefsson  <jas@extundo.com>
13206
13207         * m4/restrict.m4: Add copyright and copying conditions.
13208
13209 2004-11-30  Simon Josefsson  <jas@extundo.com>
13210
13211         * m4/base64.m4: New file.
13212
13213 2004-11-30  Simon Josefsson  <jas@extundo.com>
13214
13215         * MODULES.html.sh (Extra functions based on ANSI C 89): Add
13216         base64.
13217
13218         * tests/test-base64.c: New file.
13219
13220         * modules/base64: New file.
13221
13222 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13223
13224         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX):
13225         Define HAVE_PARTLY_WORKING_GETCWD if getcwd is partly working.
13226
13227         * m4/readutmp.m4 (gl_READUTMP): Don't check for sys/param.h.
13228
13229 2004-11-30  Paul Eggert  <eggert@cs.ucla.edu>
13230
13231         * lib/getcwd.c (is_ENAMETOOLONG): New macro.
13232         (__getcwd.c): Don't restore errno; glibc doesn't.
13233         [HAVE_PARTLY_WORKING_GETCWD && !defined AT_FDCWD]: Try system getcwd
13234         first, falling back to our code only if its results look suspicious.
13235         Ensure that the resulting buffer is only as large as necessary.
13236
13237         * lib/readutmp.c: Include readutmp.h first.
13238         Include <errno.h>, since readutmp.h no longer does that.
13239         * lib/readutmp.h: Don't include <errno.h>,
13240         <sys/param.h>, <time.h>; not needed to establish interface.
13241         (errno): Remove decl.
13242         (HAVE_STRUCT_XTMP_UT_TYPE): Remove; no longer needed.
13243         (UT_TYPE_EQ, UT_TYPE_NOT_DEFINED, UT_TYPE_BOOT_TIME,
13244         UT_TYPE_USER_PROCESS, IS_USER_PROCESS): New macros.
13245
13246 2004-11-28  Simon Josefsson  <jas@extundo.com>
13247
13248         * lib/base64.h, base64.c: New file.
13249
13250 2004-11-27  Paul Eggert  <eggert@cs.ucla.edu>
13251
13252         * lib/getcwd.h: New file, which I forgot to check in on 2004-11-25.
13253
13254 2004-11-26  Paul Eggert  <eggert@cs.ucla.edu>
13255
13256         * modules/getcwd (Files): Add lib/getcwd.h, m4/getcwd.m4.
13257         (Depends-on): Remove pathmax, same.  Add mempcpy.
13258         (configure.ac): GL_FUNC_GETCWD_PATH_MAX -> gl_FUNC_GETCWD.
13259         (Makefile.am): Append getcwd.h to lib_SOURCES.
13260         (Include): Add getcwd.h.
13261         (Maintainer): Change from Jim Meyering to "all, glibc",
13262         since getdate now uses intended-for-glibc code.
13263         * modules/xgetcwd (Files): Remove m4/getcwd.m4.
13264         (Depends-on): Depend on getcwd.  Do not depend on pathmax.
13265
13266 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13267
13268         Fix problems reported by Scott S. Tinsley for HP-UX 11.11 using
13269         HP's ANSI C compiler.
13270         * lib/fsusage.c (statvfs) [HAVE_SYS_STATVFS_H]: Remove decl.
13271         Declaring int functions causes warnings on some modern systems and
13272         shouldn't be needed to compile on ancient ones.
13273         * lib/same.c (MIN) [defined MIN]: Don't define, since it's already
13274         defined.
13275
13276         * lib/getcwd.c: Replace by a copy of glibc/sysdeps/posix/getcwd.c, but
13277         with the following changes.
13278         (__set_errno): Parenthesize properly.
13279         Include <stdbool.h>.
13280         (MIN, MAX, MATCHING_INO): New macros.
13281         (__getcwd): Define with prototype, not K&R form.
13282         Use heuristics to allocate default buffer on stack if possible.
13283         If AT_FDCWD is defined, use openat and fstatat to avoid O(N**2)
13284         behavior, and to avoid the PATH_MAX limit when computing
13285         ../../../../...
13286         Use MATCHING_INO to compare inode number to file.
13287         Check for arithmetic overflow in size calculations.
13288         Fix bug in reallocation of dot array that caused getcwd to fail
13289         on directories nested deeper than 75.
13290         Be more careful about saving errno on error.
13291         Do not use realloc; use only free+malloc, as this is a bit
13292         more flexible and avoids a needless copy operation.
13293         Do not inspect st_dev and st_ino for symbolic links; POSIX
13294         doesn't specify the latter.
13295         Check for closedir errors.
13296         Avoid needless casts.
13297         Use "#ifdef weak_alias" around weak_alias, to be like other
13298         glibc code.
13299         The following changes to getcwd.c have effect only when used in
13300         gnulib; they have no effect inside glibc proper.
13301         (#pragma alloca) [defined _AIX && !defined __GNUC__]: Remove,
13302         as alloca isn't used.
13303         (alloca, __alloca): Likewise.
13304         [!_LIBC]: Include "getcwd.h", "mempcpy.h".
13305         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
13306         unconditionally, as gnulib assumes C89 or better.
13307         Do not include <sys/param.h>.
13308         (errno) [!defined __GNU_LIBRARY__ && !defined STDC_HEADERS]: Remove
13309         no-longer-necessary 'extern int errno' decl; gnulib assumes C89 or
13310         better.
13311         (NULL) [!defined NULL]: Remove; we assume C89 or better.
13312         Include <dirent.h> in a way that is compatible with modern Autoconf.
13313         (_D_ALLOC_NAMELEN, _D_EXACT_NAMLEN):
13314         New macros, if not already defined.
13315         Include <unistd.h> if _LIBC, not if __GNU_LIBRARY__.
13316         Use "_LIBC", not "defined _LIBC", for consistency.
13317         (HAVE_MEMPCPY): Remove; no longer needed now that gnulib has
13318         a mempcpy module.
13319         (__lstat, __closedir, __opendir, __readdir) [!_LIBC]: New macros.
13320         (GETCWD_RETURN_TYPE): Remove.  All uses replaced by char *.
13321         * lib/xgetcwd.c: David MacKenzie's old code was removed, so give
13322         credit only to Jim Meyering and adjust the copyright dates.
13323         Do not include <limits.h>, <stdio.h>, <sys/types.h>,
13324         <stdlib.h>, <unistd.h>, "pathmax.h".
13325         Instead, include "xgetcwd.h" (first) and "getcwd.h".
13326         (INITIAL_BUFFER_SIZE): Remove.
13327         (xgetcwd): Rely on getcwd, since we now depend on a reliable one.
13328
13329 2004-11-25  Paul Eggert  <eggert@cs.ucla.edu>
13330
13331         * m4/getcwd-path-max.m4 (gl_FUNC_GETCWD_PATH_MAX): Renamed from
13332         GL_FUNC_GETCWD_PATH_MAX for consistency.  All uses changed.
13333         Use the _ONCE methods, for efficiency.
13334         Check for fcntl.h.  In test program, include <errno.h>
13335         and <fcntl.h> if available.  Remove old K&R cruft from
13336         test program.  Check for common errors in GNU/Linux,
13337         OpenBSD, and Solaris.  Just set gl_cv_func_getcwd_path_max;
13338         don't do AC_LIBOBJ, as that's getcwd.m4's job.
13339         * m4/getcwd.m4 (gl_FUNC_GETCWD_NULL): Renamed from
13340         AC_FUNC_GETCWD_NULL.  All used changed.  Change cache variable
13341         name accordingly.
13342         (gl_FUNC_GETCWD, gl_PREREQ_GETCWD): New macros.  Revamp to
13343         accommodate new getcwd.c.
13344         * m4/jm-macros.m4 (gl_MACROS): Don't require GL_FUNC_GETCWD_PATH_MAX.
13345         * m4/prereq.m4 (gl_PREREQ): Add gl_FUNC_MEMPCPY.
13346         * m4/xgetcwd.m4 (gl_XGETCWD): Replace with gl_FUNC_GETCWD, since
13347         that's all we need now.
13348
13349 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13350
13351         * m4/argp.m4 (gl_ARGP): Require gl_GETOPT_SUBSTITUTE unconditionally:
13352         argp-parse.c depends on getopt internals, that means we should
13353         always use our getopt, to be on the safe side.
13354         * m4/getopt.m4 (gl_GETOPT): Check if GETOPT_H is already set, in
13355         order not to spoil the result of an eventual previous invocation
13356         of gl_GETOPT_SUBSTITUTE.
13357
13358 2004-11-23  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
13359
13360         * lib/getopt_.h: Re-addition of __getopt_argv_const caused
13361         redefinition warnings. To avoid them, include the defines
13362         in `#if !defined __need_getopt ... #endif'. The only place
13363         where __getopt_argv_const is used is in definitions
13364         of getopt_long and getopt_long_only below, which are as well
13365         protected by `#ifndef __need_getopt'.
13366         [defined __GETOPT_PREFIX && !defined __need_getopt]: Undef
13367         __need_getopt after including <stdio.h> and <unistd.h> These
13368         headers might have defined it.
13369
13370 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13371
13372         * m4/utimens.m4 (gl_UTIMENS): Check for futimes function.
13373
13374 2004-11-23  Paul Eggert  <eggert@cs.ucla.edu>
13375
13376         * lib/utimens.c (__attribute__, ATTRIBUTE_UNUSED): New macros.
13377         (futimens): New function, which uses futimes if available.
13378         (futimens, utimens): Support timespec==NULL, with same semantics
13379         as utime and utimens.
13380         * lib/utimens.h (futimens): New decl.
13381
13382 2004-11-23  Jim Meyering  <jim@meyering.net>
13383
13384         * lib/getopt_.h: Remove trailing blanks.
13385
13386 2004-11-23  Jim Meyering  <jim@meyering.net>
13387
13388         * lib/__fpending.c: Add comment.
13389
13390 2004-11-22  Paul Eggert  <eggert@cs.ucla.edu>
13391
13392         * modules/canonicalize (Depends-on): Add xreadlink.
13393         Problem reported by James Youngman.
13394
13395 2004-11-20  Paul Eggert  <eggert@cs.ucla.edu>
13396
13397         * lib/getopt_.h (__GETOPT_CONCAT, __GETOPT_XCONCAT, __GETOPT_ID):
13398         New macros.
13399         (getopt, getopt_long, getopt_long_only, optarg, opterr, optind,
13400         optopt): Use them instead of invoking ## directly; otherwise, the
13401         symbols will be __GETOPT_PREFIXgetopt rather than rpl_getopt.
13402
13403 2004-11-19  Bruno Haible  <bruno@clisp.org>
13404
13405         * lib/strtok_r.c: Move comments from here...
13406         * lib/strtok_r.h: ... to here.
13407
13408 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13409
13410         * m4/calloc.m4 (_AC_FUNC_CALLOC_IF): Check for buggy calloc
13411         implementations that mishandle size_t overflow.
13412
13413 2004-11-17  Paul Eggert  <eggert@cs.ucla.edu>
13414
13415         * lib/realloc.c (rpl_realloc): Call 'free' if n==0, since realloc
13416         might fail.  Problem reported by Yoann Vandoorselaere.
13417         * lib/calloc.c (rpl_calloc): Defend against buggy calloc
13418         implementations that mishandle size_t overflow.
13419
13420 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13421
13422         * modules/canon-host (Depends-on): Add strdup.
13423
13424 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13425
13426         * m4/canon-host.m4 (gl_CANON_HOST): Check for getaddrinfo.
13427
13428 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13429
13430         * lib/canon-host.c: Include "strdup.h".
13431         (canon_host): Use getaddrinfo if available, so that IPv6 works.
13432         Use strdup instead of malloc/strcpy to duplicate strings.
13433
13434         * lib/human.h (LONGEST_HUMAN_READABLE): Add 1 for space before unit.
13435         (human_space_before_unit): New constant.
13436         * lib/human.c (human_readable): Support it.
13437
13438         * lib/xgetcwd.c: Include <limits.h>, for PATH_MAX.
13439         (xgetcwd): Set errno correctly when failing.
13440         Work around Solaris 9 bug: getcwd sets errno==ERANGE even though
13441         the failure is actually due to a PATH_MAX problem.
13442
13443         Further getopt changes to make it more likely that glibc will
13444         buy the changes back.
13445         * lib/getopt.c (POSIXLY_CORRECT): New constant.
13446         (getopt): Use it, so to preserve glibc semantic
13447         * lib/getopt1.c (getopt_long, getopt_long_only): Arg is char * const *
13448         when compiling for libc.
13449         * lib/getopt_.h (__getopt_argv_const): Bring it back.
13450         (getopt_long, getopt_long_only): Use it.
13451
13452         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13453         _getopt_internal): New arg POSIXLY_CORRECT.  All callers changed.
13454         (getopt): Argv is now char * const *, as per standard.
13455         (_getopt_internal_r, _getopt_internal): Argv is now char **,
13456         not char *__getopt_argv_const *.
13457         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13458         _getopt_long_only_r): Likewise.
13459         * lib/getopt_.h (getopt, getopt_long, geopt_long_only): Likewise.
13460         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13461         _getopt_long_r, _getopt_long_only_r): Likewise.
13462         * lib/getopt_.h (__getopt_argv_const): Remove.
13463         (getopt): Argv is now char * const *, as per standard.
13464
13465         * lib/getdate.y (tORDINAL): New token.
13466         (day, relunit): Allow it for relative times.
13467         (relative_time_table): Use tORDINAL for ordinals.
13468
13469 2004-11-16  Paul Eggert  <eggert@cs.ucla.edu>
13470
13471         * doc/getdate.texi (General date syntax): "next" is 1, not 2.
13472         Document that "second" isn't allowed as an ordinal number.
13473
13474 2004-11-16  Jim Meyering  <jim@meyering.net>
13475
13476         * modules/closeout (Depends-on): Add fpending.
13477
13478 2004-11-15  Jim Meyering  <jim@meyering.net>
13479
13480         * lib/closeout.c: Include "__fpending.h" once again.
13481         Include <stdbool.h>.
13482         (close_stdout): Don't fail just because stdout was closed initially,
13483         since some programs don't write to stdout in the normal course of
13484         operation (other than --version and --help), and we don't want this
13485         function to make e.g. `touch file >&-' fail.
13486         But do fail if it was closed and someone has tried to write to it.
13487         E.g., `printf foo >&-' must fail.
13488
13489 2004-11-13  Jim Meyering  <jim@meyering.net>
13490
13491         * m4/jm-macros.m4: Do require gl_FUNC_FPENDING.
13492
13493 2004-11-12  Simon Josefsson  <jas@extundo.com>
13494
13495         * config/srclist.txt: Add strtok_r.c, glibc bought our changes, but a
13496         small doc fix is still pending.
13497
13498 2004-11-11  Simon Josefsson  <jas@extundo.com>
13499
13500         * modules/strtok_r: New file.
13501
13502         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13503         strtok_r.
13504
13505 2004-11-11  Simon Josefsson  <jas@extundo.com>
13506
13507         * m4/strtok_r.m4: New file.
13508
13509         * m4/getopt.m4: Replace opterr.
13510
13511 2004-11-11  Simon Josefsson  <jas@extundo.com>
13512
13513         * lib/strtok_r.h, strtok_r.c: New file.
13514
13515 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13516
13517         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): Define __GETOPT_PREFIX instead
13518         of replacing opterr, getopt, etc.  This should handle the
13519         powerpc-apple-darwin5.5 problem recently noted by Simon Josefsson.
13520
13521 2004-11-11  Paul Eggert  <eggert@cs.ucla.edu>
13522
13523         * lib/getopt_.h (__getopt_argv_const): New macro, to be used so that
13524         we can stop lying to compilers about the constness of argv when we
13525         are compiled outside glibc.
13526         (getopt, getopt_long, getopt_long_only): Use it.
13527         * lib/getopt.c (_getopt_initialize, _getopt_internal_r,
13528         _getopt_internal, getopt): Likewise.
13529         * lib/getopt1.c (getopt_long, _getopt_long_r, getopt_long_only,
13530         _getopt_long_only_r): Likewise.
13531         * lib/getopt_int.h (_getopt_internal, _getopt_internal_r,
13532         _getopt_long_r, _getopt_long_only_r): Likewise.
13533
13534         * lib/getopt_.h [defined __GETOPT_PREFIX && !defined __need_getopt]:
13535         Include <stdlib.h> and <stdio.h>, and <unistd.h> if available.
13536         Then rename getopt to __GETOPT_PREFIX##getopt, and so forth for
13537         the other external symbols.
13538         (getopt) [!defined __GNU_LIBRARY]: Use prototype, not old-style
13539         declaration, since the above renaming now works around collisions.
13540
13541 2004-11-11  Jim Meyering  <jim@meyering.net>
13542
13543         * lib/linebreak.c: Remove trailing blanks.
13544         * lib/alloca_.h: Likewise.
13545         * lib/acosl.c: Likewise.
13546         * lib/euidaccess.c: Likewise.
13547         * lib/allocsa.h: Likewise.
13548
13549 2004-11-10  Simon Josefsson  <jas@extundo.com>
13550
13551         * m4/getaddrinfo.m4: New file.
13552
13553 2004-11-10  Simon Josefsson  <jas@extundo.com>
13554
13555         * lib/getaddrinfo.h, lib/getaddrinfo.c: New files.
13556
13557 2004-11-10  Simon Josefsson  <jas@extundo.com>
13558
13559         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
13560         getaddrinfo.
13561
13562         * modules/getaddrinfo: New file.
13563
13564 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13565
13566         * m4/prereq.m4 (gl_PREREQ): Require gt_FUNC_SETENV.
13567
13568 2004-11-10  Paul Eggert  <eggert@cs.ucla.edu>
13569
13570         * lib/mktime.c (SHR): New macro, which is a portable
13571         substitute for >> that should work even on Crays.
13572         (TIME_T_MIDPOINT, ydhms_diff, __mktime_internal): Use it.
13573         Problem reported by Mark D. Baushke in
13574         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00071.html>.
13575         * lib/getdate.y (SHR): Likewise.
13576         (tm_diff): Use it.
13577         * lib/strftime.c (SHR): Likewise.
13578         (tm_diff): Use it.
13579         * lib/quotearg.c (struct quoting_options): Use unsigned int for
13580         quote_these_too, so that right shifts are well defined.  All uses
13581         changed.
13582
13583 2004-11-10  Jim Meyering  <jim@meyering.net>
13584
13585         Ensure that no close failure goes unreported.
13586         * lib/closeout.c (close_stdout): Always close stdout.  I.e., don't
13587         return early when it seems there's nothing to flush.
13588         Don't include __fpending.h.
13589
13590 2004-11-10  Jim Meyering  <jim@meyering.net>
13591
13592         * modules/closeout (Depends-on): Remove fpending.
13593
13594 2004-11-10  Jim Meyering  <jim@meyering.net>
13595
13596         * m4/jm-macros.m4 (gl_MACROS): Don't require gl_FUNC_FPENDING.
13597
13598 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13599
13600         * m4/strftime.m4 (_gl_STRFTIME_PREREQS): Remove.  Move its body to
13601         gl_FUNC_STRFTIME.
13602         (gl_FUNC_STRFTIME): Use AC_CHECK_FUNCS_ONCE and AC_CHECK_HEADERS_ONCE
13603         and AC_REQUIRE when possible, to avoid duplicate checks.
13604         Check for <wchar.h>.
13605
13606 2004-11-09  Paul Eggert  <eggert@cs.ucla.edu>
13607
13608         * lib/strftime.c (DO_MULTIBYTE): Check for wchar.h, too.
13609
13610 2004-11-09  Bruno Haible  <bruno@clisp.org>
13611
13612         * m4/sockpfaf.m4: New file.
13613
13614 2004-11-05  Bruno Haible  <bruno@clisp.org>
13615
13616         * lib/readlink.c: Include stddef.h, needed for size_t on Woe32.
13617         Reported by Mark D. Baushke <mdb@cvshome.org>.
13618
13619 2004-11-04  Bruno Haible  <bruno@clisp.org>
13620
13621         2004-09-11  Bruno Haible  <bruno@clisp.org>
13622                 * allocsa.valgrind: New file.
13623         2004-02-06  Bruno Haible  <bruno@clisp.org>
13624                 * allocsa.h (sa_alignof): Define differently with HP-UX cc, to
13625                 avoid a bug of this cc on HP-UX 10.20 dealing with enums.
13626                 Reported by Christopher Seip <chris.seip@hp.com>.
13627
13628 2004-11-04  Bruno Haible  <bruno@clisp.org>
13629
13630         * modules/allocsa (Files): Add lib/allocsa.valgrind.
13631         (Makefile.am): Distribute it.
13632
13633 2004-11-03  Paul Eggert  <eggert@cs.ucla.edu>
13634
13635         * lib/xreadlink.c (xreadlink): AIX and HP-UX readlink return -1
13636         with errno == ERANGE if the buffer is too small.
13637         Problem reported by Mark D. Baushke.
13638
13639 2004-11-03  Albert Chin  <china@thewrittenword.com>
13640             Paul Eggert  <eggert@cs.ucla.edu>
13641
13642         * m4/uint32_t.m4 (gl_AC_TYPE_UINT32_T): When determining uint32_t
13643         equivalent, substitute $ac_type for equivalent type rather than
13644         blindly using uint32_t *always* which won't work if uint32_t is not
13645         available.  Define _UINT32_T to work around typedef of uint32_t if
13646         <sys/sched.h>, <pthread.h>, or <semaphore.h> used on Solaris
13647         2.5.1.
13648
13649 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13650
13651         * m4/jm-macros.m4: Sync from coreutils.
13652         (gl_MACROS): Check for mbrlen, for pathchk.
13653         (gl_CHECK_ALL_TYPES): Require AC_TYPE_MBSTATE_T, for pathchk.
13654
13655 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13656
13657         * lib/xreadlink.c (MAXSIZE): New macro.
13658         (xreadlink): Use it instead of SSIZE_MAX.  Ensure initial buffer
13659         size does not exceed MAXSIZE.  Avoid cast.
13660         As suggested by Mark D. Baushke in
13661         <http://lists.gnu.org/archive/html/bug-gnulib/2004-11/msg00009.html>,
13662         if readlink fails with buffer size just under MAXSIZE, try again
13663         with MAXSIZE.
13664
13665 2004-11-02  Paul Eggert  <eggert@cs.ucla.edu>
13666
13667         * config/srclist.txt: Add mktime.c; glibc bought all our changes.
13668
13669 2004-11-02  Derek R. Price  <derek@ximbiot.com>
13670         and  Paul Eggert  <eggert@cs.ucla.edu>
13671
13672         * lib/getdate.y [!TEST]: Include <stdio.h>, since we use sprintf now.
13673         (get_date): Overparenthesize to avoid GCC warning.
13674
13675 2004-11-02  Bruno Haible  <bruno@clisp.org>
13676
13677         * m4/setenv.m4 (gt_FUNC_SETENV): Define VOID_UNSETENV if unsetenv()
13678         returns void.
13679
13680 2004-11-02  Bruno Haible  <bruno@clisp.org>
13681
13682         * lib/setenv.h (unsetenv): Define as a macro if the system's unsetenv()
13683         function returns void.
13684
13685 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13686
13687         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for declarations of
13688         fflush_unlocked, flockfile, funlockfile, funlockfile,
13689         fputs_unlocked, putc_unlocked.
13690
13691 2004-11-01  Paul Eggert  <eggert@cs.ucla.edu>
13692
13693         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13694         (funlockfile, fputs_unlocked, putc_unlocked): Don't define if
13695         already declared.
13696
13697 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13698
13699         * modules/getdate (Files): Add doc/getdate.texi.
13700         (Depends-on): Add setenv, xalloc.
13701
13702 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13703
13704         * lib/getdate.y: Add support for TZ="foo" within a date string.
13705         Fix some bugs near time_t boundaries.  Reject dates with
13706         out-of-range components, e.g., "Sept 31".
13707         Include <stdlib.h>, "setenv.h", "xalloc.h".
13708         (ISDIGIT_LOCALE): Remove; unused.
13709         Note that the TZ and time functions used here are not reentrant.
13710         (mktime_ok, get_tz): New functions.
13711         (TZBUFSIZE): New constant.
13712         (get_date): Parse leading TZ="foo".  Reject out-of-range components;.
13713         This requires that we sometimes generate our own TZ="XXX..." setting.
13714
13715 2004-10-29  Paul Eggert  <eggert@cs.ucla.edu>
13716
13717         * doc/getdate.texi: New file, from coreutils with modifications for
13718         the new TZ parsing.
13719
13720 2004-10-27  Derek R. Price  <derek@ximbiot.com>
13721
13722         * lib/mktime.c (not_equal_tm): Remove redundant check.
13723
13724 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13725
13726         * modules/regex (lib_SOURCES): Add regex.c.
13727         Reported by James Youngman in
13728         <http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00199.html>.
13729
13730 2004-10-24  Paul Eggert  <eggert@cs.ucla.edu>
13731
13732         * lib/getdate.y: Use Bison 1.875 features, and some minor
13733         code cleanups.  This change does not affect semantics.
13734         Don't include <stdlib.h>; no longer needed.
13735         Don't include unlocked-io.h; only the "#if TEST" code uses
13736         stdio, and performance isn't crucial there.
13737         (PC, YYLEX_PARAM, YYPARSE_PARAM): Remove; replaced by
13738         Bison 1.875 features as described below.
13739         All uses of "PC." replaced by "pc->".
13740         (YYSTYPE): Add a forward declaration.
13741         (yylex, yyerror): Use full prototypes in forward decls.
13742         Use "%pure-parser" rather than obsolescent "%pure_parser".
13743         Use %parse-param and %lex-param instead of obsolescent
13744         YYPARSE_PARAM and YYLEX_PARAM.
13745         (meridian_table, month_and_day_table, time_units_table,
13746         relative_time_table, time_zone_table, military_table,
13747         lookup_zone, lookup_word, get_date):
13748         Use NULL instead of 0 where appropriate.
13749         (to_hour): Avoid abort (), to avoid a dependency on
13750         stdlib.h.
13751         (yyerror, yylex): Now accepts parser_control * arg.
13752         (main) [TEST]: Use '\0' rather than 0 for char.
13753
13754 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13755
13756         * m4/getpagesize.m4 (gl_GETPAGESIZE): Check for <sys/param.h>.
13757
13758 2004-10-22  Paul Eggert  <eggert@cs.ucla.edu>
13759
13760         * lib/getpagesize.c (getpagesize): Don't assume <sys/param.h> exists.
13761         It's now the caller's responsibility to handle the case where
13762         !HAVE_GETPAGESIZE && !defined getpagesize.
13763
13764         * lib/mktime.c (leapyear): Arg is long int, not int.
13765
13766 2004-10-18  Paul Eggert  <eggert@cs.ucla.edu>
13767
13768         * lib/argp-fs-xinl.c, argp-xinl.c: Update from glibc.
13769
13770 2004-10-17  Paul Eggert  <eggert@cs.ucla.edu>
13771
13772         * gnulib-tool (func_emit_lib_Makefile_am): Fix typo: a $ was
13773         missing.  Problem reported by James Youngman.
13774
13775 2004-10-16  Simon Josefsson  <jas@extundo.com>
13776
13777         * gnulib-tool: Fix comments.  Fix parse problem.
13778         (func_emit_lib_Makefile_am): Don't hard code a in libgl_a_SOURCES.
13779
13780 2004-10-15  Paul Eggert  <eggert@cs.ucla.edu>
13781
13782         * m4/getopt.m4 (gl_GETOPT): Detect and reject the incompatible BSD
13783         implementation of getopt_long.  Problem reported by Alexander Taler in:
13784         http://lists.gnu.org/archive/html/bug-gnulib/2004-10/msg00103.html
13785
13786 2004-10-15  Bruno Haible  <bruno@clisp.org>
13787
13788         * gnulib-tool: Untabify. Initialize supplied_libname.
13789         (func_usage): More homogenous output.
13790         (func_modules_transitive_closure, func_modules_to_filelist,
13791         func_emit_lib_Makefile_am): New functions.
13792         (func_import): New function, extracted from big case statement. Use
13793         func_get_license, func_modules_transitive_closure,
13794         func_modules_to_filelist, func_emit_lib_Makefile_am. Initialize
13795         opt_lgpl. Don't use test -a, as it's not portable.
13796         (func_create_testdir): Use func_modules_transitive_closure,
13797         func_modules_to_filelist, func_emit_lib_Makefile_am.
13798
13799 2004-10-15  Bruno Haible  <bruno@clisp.org>
13800
13801         * gnulib-tool (func_import): Let gl_INIT define LTALLOCA when needed.
13802
13803 2004-10-15  Bruno Haible  <bruno@clisp.org>
13804
13805         * gnulib-tool (func_emit_lib_Makefile_am): Add markers to separate
13806         the portions belonging to each module.
13807         Suggested by Derek Robert Price <derek@ximbiot.com>.
13808
13809 2004-10-12  Simon Josefsson  <jas@extundo.com>
13810
13811         * lib/getpass.c (fflush_unlocked, flockfile, funlockfile)
13812         (fputs_unlocked, putc_unlocked) [!_LIBCS && !USE_UNLOCKED_IO]: Map
13813         to real functions.
13814
13815 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13816
13817         * modules/vsnprintf: New file.
13818
13819 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13820
13821         * m4/vsnprintf.m4: New file.
13822
13823 2004-10-11  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13824
13825         * lib/vsnprintf.h: New file.
13826         * lib/vsnprintf.c: New file.
13827
13828 2004-10-11  Bruno Haible  <bruno@clisp.org>
13829
13830         * MODULES.html.sh (Support for systems lacking ISO C 99): Add
13831         vsnprintf.
13832
13833 2004-10-10  Paul Eggert  <eggert@cs.ucla.edu>
13834
13835         * config/srclistvars.sh: Add GNUSTANDARDS (for eggert only).
13836
13837 2004-10-07  Bruno Haible  <bruno@clisp.org>
13838
13839         * lib/snprintf.c (snprintf): Avoid a memory allocation if the result
13840         fits into the provided buffer.
13841
13842 2004-10-06  Paul Eggert  <eggert@cs.ucla.edu>
13843
13844         * lib/diacrit.c, diacrit.h: Add GPL notice.
13845
13846         * lib/atanl.c, logl.c: Add GPL notice, to match glibc's added LGPL
13847         notice.
13848         * lib/atanl.c (atanl): Keep the code as similar to glibc as possible.
13849         * lib/logl.c (logl): Keep the code as similar to glibc as possible.
13850         This avoids a potential constant-folding bug.
13851
13852 2004-10-05  Bruno Haible  <bruno@clisp.org>
13853
13854         * m4/strsep.m4 (gl_FUNC_STRSEP): Require AC_GNU_SOURCE. Don't check
13855         for the declaration of strsep.
13856
13857 2004-10-05  Bruno Haible  <bruno@clisp.org>
13858
13859         * lib/strsep.h: Don't declare strsep() if HAVE_STRSEP.
13860
13861 2004-10-04  Simon Josefsson  <jas@extundo.com>
13862
13863         * modules/memmem: New file.
13864         * tests/test-memmem.c: New file.
13865         * MODULES.html.sh (Extra functions based on ANSI C 89): Add memmem.
13866
13867 2004-10-04  Simon Josefsson  <jas@extundo.com>
13868
13869         * m4/memmem.m4: New file.
13870
13871 2004-10-04  Simon Josefsson  <jas@extundo.com>
13872
13873         * lib/memmem.h: New file.
13874         * lib/memmem.c: New file, taken from glibc.
13875
13876 2004-10-04  Simon Josefsson  <jas@extundo.com>
13877
13878         * lib/error.c, md5.c, regex.c: Use '#if USE_UNLOCKED_IO' instead of
13879         '#ifdef USE_UNLOCKED_IO'.
13880
13881 2004-10-04  Simon Josefsson  <jas@extundo.com>
13882
13883         * config/srclist.txt: Add memmem from glibc.
13884
13885 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13886
13887         * modules/xalloc (Files, Makefile.am): Remove xstrdup.c.
13888
13889         * modules/argmatch, modules/argp, modules/closeout, modules/error,
13890         modules/exclude, modules/getdate, modules/getline,
13891         modules/getndelim2, modules/getpass, modules/getpass-gnu,
13892         modules/getusershell, modules/linebuffer, modules/md5,
13893         modules/mountlist, modules/posixtm, modules/readtokens,
13894         modules/readutmp, modules/regex, modules/sha1,
13895         modules/version-etc, modules/yesno:
13896         Remove dependency on unlocked-io.
13897
13898 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13899
13900         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Remove.  All uses removed.
13901
13902         * m4/unlocked-io.m4: Add copyright notice.
13903         (gl_FUNC_GLIBC_UNLOCKED_IO): Define USE_UNLOCKED_IO.
13904
13905 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13906
13907         * lib/xalloc.h (xmemdup): Renamed from xclone.  All uses changed.
13908         * lib/xmalloc.c (xmemdup): Likewise.
13909         * lib/xalloc.h (CCLONE, CLONE, NEW, XCALLOC, XMALLOC, XREALLOC,
13910         XFREE): Remove these long-obsolescent macros.
13911         * lib/xmalloc.c (xstrdup): Implementation moved here from xstrdup.c
13912         * lib/xstrdup.c: Remove.
13913
13914         * lib/regex.c (re_comp): Cast gettext return value to char *,
13915         Problem reported by Martin Neitzel via Mark D. Baushke.
13916
13917 2004-10-04  Paul Eggert  <eggert@cs.ucla.edu>
13918
13919         * lib/argmatch.c, closeout.c, error.c, exclude.c, getdate.y,
13920         getndelim2.c, getpass.c, getusershell.c, linebuffer.c,
13921         md5.c, mountlist.c, posixtm.c, readtokens.c, readutmp.c,
13922         regex.c, sha1.c, version-etc.c, yesno.c:
13923         Include "unlocked-io.h" only if USE_UNLOCKED_IO.
13924         * lib/unlocked-io.h: Don't worry about USE_UNLOCKED_IO; that's now
13925         the includer's responsibility.
13926
13927         Sync from coreutils.
13928
13929         * lib/modechange.c (mode_compile): Don't decrement a pointer that
13930         points to the start of a string, as the C Standard says the
13931         resulting behavior is undefined.
13932
13933         * lib/backupfile.h (enum backuptype): Rename none -> no_backups,
13934         simple -> simple_backups, numbered_existing ->
13935         numbered_existing_backups, numbered -> numbered_backups
13936         to avoid shadowing problems.  All uses changed.
13937         * lib/argmatch.c (enum backuptype) [defined TEST]: Likewise.
13938         * lib/backupfile.c (check_extension, numbered_backup):
13939         Rename locals to avoid shadowing 'basename'.
13940         * lib/backupfile.h (VALID_BACKUP_TYPE): Don't evaluate arg more than
13941         once.
13942
13943         * lib/.cppi-disable: Add getopt_.h, getopt_int.h.
13944         * lib/.cvsignore: Add getopt.h.
13945
13946 2004-10-04  Bruno Haible  <bruno@clisp.org>
13947
13948         * modules/README: New file.
13949         * gnulib-tool (func_all_modules, func_verify_module): modules/README is
13950         not a module.
13951
13952 2004-10-02  Jim Meyering  <jim@meyering.net>
13953
13954         * lib/dirfd.h, getpagesize.h: Add copyright notice.
13955
13956 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13957
13958         * modules/strsep: New file.
13959
13960 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13961
13962         * m4/strsep.m4: New file.
13963
13964 2004-10-01  Yoann Vandoorselaere  <yoann@prelude-ids.org>
13965
13966         * lib/strsep.h: New file.
13967         * lib/strsep.c: New file.
13968
13969 2004-10-01  Simon Josefsson  <jas@extundo.com>
13970
13971         * lib/snprintf.c (snprintf): Handle size==0.
13972
13973 2004-10-01  Simon Josefsson  <jas@extundo.com>
13974             Bruno Haible  <bruno@clisp.org>
13975
13976         * lib/snprintf.c: Include <stdarg.h>, <stdlib.h>, <string.h>.
13977         (snprintf): Declare 'args'.
13978
13979 2004-10-01  Paul Eggert  <eggert@cs.ucla.edu>
13980
13981         * lib/snprintf.c: Remove comments as to why each header is needed.
13982
13983 2004-10-01  Bruno Haible  <bruno@clisp.org>
13984
13985         * MODULES.html.sh: Add strsep.
13986
13987 2004-09-30  Simon Josefsson  <jas@extundo.com>
13988
13989         * modules/snprintf: New file.
13990
13991 2004-09-30  Simon Josefsson  <jas@extundo.com>
13992
13993         * m4/snprintf.m4: New file.
13994
13995 2004-09-30  Simon Josefsson  <jas@extundo.com>
13996
13997         * lib/snprintf.h, lib/snprintf.c: New files.
13998
13999 2004-09-30  Sergey Poznyakoff  <gray@Mirddin.farlep.net>
14000
14001         * lib/argp-help.c (canon_doc_option): Fixed coredump if *name==NULL
14002         (hol_entry_help): Never translate an empty string.
14003         Do not translate option tag (opt->name) if OPTION_NO_TRANS is set
14004         * lib/argp.h (OPTION_NO_TRANS): New option.
14005
14006 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14007
14008         * modules/argp (Maintainer): Replace Simon Josefsson
14009         by Sergey Poznyakoff.
14010
14011 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14012
14013         * config/srclist.txt: Comment-out argp/argp.h, until we get the argp
14014         changes merged back into glibc.
14015
14016 2004-09-30  Paul Eggert  <eggert@cs.ucla.edu>
14017
14018         * MODULES.html.sh (Support for systems lacking ISO C 99): Add snprintf.
14019
14020 2004-09-29  Oskar Liljeblad  <oskar@osk.mine.nu>
14021
14022         * lib/xvasprintf.c: Include xalloc.h.
14023         (xvasprintf): Use xalloc_die, not xmalloc_die.
14024
14025 2004-09-29  Bruno Haible  <bruno@clisp.org>
14026
14027         * modules/alloca-opt: New file, derived from modules/alloca.
14028         * modules/allocsa: Depend on alloca-opt instead of alloca.
14029         * modules/setenv: Likewise.
14030         * modules/vasnprintf: Likewise.
14031         * MODULES.html.sh: Add alloca-opt.
14032
14033 2004-09-28  Simon Josefsson  <jas@extundo.com>
14034
14035         * gnulib-tool: New parameter --lgpl, to asseert that modules are
14036         LGPL, and to replace license template from GPL to LGPL.
14037
14038 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14039
14040         * modules/dummy: Change license to LGPL.
14041
14042 2004-09-28  Paul Eggert  <eggert@cs.ucla.edu>
14043
14044         * lib/dummy.c: Change copyright notice to FSF, and license to GPL.
14045
14046 2004-09-24  Simon Josefsson  <jas@extundo.com>
14047
14048         * modules/minmax (License): Change from GPL to LGPL.
14049
14050 2004-09-23  Simon Josefsson  <jas@extundo.com>
14051
14052         * gnulib-tool (--import): Typo.
14053
14054 2004-09-23  Simon Josefsson  <jas@extundo.com>
14055
14056         * gnulib-tool (--import): Make sure *.m4 end up in m4/ by default.
14057
14058 2004-09-22  Bruno Haible  <bruno@clisp.org>
14059
14060         * modules/*: Add 'License' field.
14061         * gnulib-tool: Accept --extract-license option.
14062         (func_get_license): New function.
14063
14064 2004-09-21  Bruno Haible  <bruno@clisp.org>
14065
14066         * modules/vasnprintf (Files): Add m4/stdint_h.m4, m4/inttypes_h.m4.
14067         Reported by Simon Josefsson.
14068
14069 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14070
14071         * modules/inttostr (Files): Add m4/longlong.m4, since it uses
14072         gl_AC_TYPE_LONG_LONG.
14073
14074 2004-09-20  Paul Eggert  <eggert@cs.ucla.edu>
14075
14076         * config/srclist.txt: Add getsubopt.c, since libc bought our changes.
14077
14078 2004-09-18  Simon Josefsson  <jas@extundo.com>
14079         and  Paul Eggert  <eggert@cs.ucla.edu>
14080
14081         * gnulib-tool: Replace various ad-hoc automake/autoconf/aclocal
14082         calls with autoreconf.  Define GL_LIB.
14083
14084 2004-09-14  Karl Berry  <karl@gnu.org>
14085
14086         * config/srclist.txt: unsync setenv.c, sigh.
14087
14088 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14089
14090         * lib/argp-pvh.c (argp_program_version_hook): Provide initial value.
14091         Problem reported by Bruno Haible in:
14092         http://lists.gnu.org/archive/html/bug-tar/2004-09/msg00023.html
14093
14094 2004-09-13  Paul Eggert  <eggert@cs.ucla.edu>
14095
14096         * config/srclist.txt: Comment out argp-pvh.c.
14097
14098 2004-09-11  Paul Eggert  <eggert@cs.ucla.edu>
14099
14100         * lib/mempcpy.h: Wrap the entire include file inside #ifndef mempcpy,
14101         in case some system header has #define'd it.  Problem reported by
14102         Soeren D. Schulze in
14103         <http://lists.gnu.org/archive/html/bug-gnulib/2004-09/msg00017.html>.
14104
14105 2004-09-09  Karl Berry  <karl@gnu.org>
14106
14107         * regex.[ch]: delete from the root.  These were supposed to be
14108                 synced with emacs cvs, but this has not happened for about
14109                 a year, and anyway nothing else uses emacs regex.[ch].
14110                 bug-gnulib mail from Jeff Bailey, 9 Sep 2004 15:49:24 -0700.
14111                 lib/regex[.ch] is untouched.
14112
14113 2004-09-09  Bruno Haible  <bruno@clisp.org>
14114
14115         * modules/vasnprintf (Files): Add m4/eoverflow.m4.
14116
14117 2004-09-09  Bruno Haible  <bruno@clisp.org>
14118
14119         * m4/eoverflow.m4: New file, taken from GNU libiconv eilseq.m4 with
14120         modifications.
14121         * m4/vasnprintf.m4 (gl_FUNC_VASNPRINTF): Require gl_EOVERFLOW.
14122
14123 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14124
14125         * modules/xvasprintf: New file.
14126         * MODULES.html.sh (Extra functions based on ANSI C 89): Add vasprintf.
14127
14128 2004-09-08  Oskar Liljeblad  <oskar@osk.mine.nu>
14129
14130         * lib/xvasprintf.h: New file.
14131         * lib/xvasprintf.c: New file.
14132         * lib/xasprintf.c: New file.
14133
14134 2004-09-08  Bruno Haible  <bruno@clisp.org>
14135
14136         * m4/stdint.m4: New file, taken from GNU clisp with modifications.
14137
14138 2004-09-08  Bruno Haible  <bruno@clisp.org>
14139
14140         * lib/vasnprintf.c (VASNPRINTF): Signal EOVERFLOW if the resulting
14141         length is > INT_MAX.
14142         * lib/vasprintf.c (vasprintf): Don't test for length > INT_MAX any
14143         more.
14144
14145 2004-09-08  Bruno Haible  <bruno@clisp.org>
14146
14147         * lib/stdint_.h: New file, taken from GNU clisp.
14148
14149 2004-09-08  Bruno Haible  <bruno@clisp.org>
14150             Oskar Liljeblad  <oskar@osk.mine.nu>
14151
14152         * modules/stdint: New file.
14153         * MODULES.html.sh (Support for systems lacking ISO C 99): Add stdint.
14154
14155 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14156
14157         Import from coreutils.
14158         * lib/userspec.c: Don't use <alloca.h>, so that we don't use alloca on
14159         strings on unbounded length.  alloca's performance benefits aren't
14160         that important here.
14161         (V_STRDUP): Remove.
14162         (parse_with_separator): New function, with most of the internals
14163         of the old parse_user_spec.  Allow user to omit both user and group,
14164         for compatibility with FreeBSD.
14165         Clone only the user name, not the entire spec.
14166         Do not set *uid, *gid unless entirely successful.
14167         Avoid memory leak in some failing cases.
14168         Fix regression for USER.GROUP reported by Dmitry V. Levin in
14169         <http://lists.gnu.org/archive/html/bug-coreutils/2004-08/msg00102.html>
14170         (parse_user_spec): Rewrite to use parse_with_separator.
14171
14172 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14173
14174         * modules/userspec: Don't depend on alloca.
14175
14176 2004-08-19  Paul Eggert  <eggert@cs.ucla.edu>
14177
14178         * m4/userspec.m4 (gl_USERSPEC): Don't require AC_FUNC_ALLOCA.
14179
14180 2004-08-17  Paul Eggert  <eggert@cs.ucla.edu>
14181
14182         * MODULES.html.sh: Add xalloc-die, c-strtod, c-strtold, raise,
14183         readtokens0, getcwd, fcntl-safer, canonicalize, cycle-check,
14184         utimecmp, utimens, xnanosleep.  Rename sha to sha1.
14185
14186 2004-08-16  Simon Josefsson  <jas@extundo.com>
14187
14188         * gnulib-tool: Use sed instead of autoconf --trace, inspired by
14189         libtoolize behaviour by "Gary V. Vaughan" <gary@gnu.org>.
14190         Add --dry-run for --import.
14191         Let user provided command line parameters override configure.ac
14192         settings.
14193
14194 2004-08-12  Simon Josefsson  <jas@extundo.com>
14195
14196         * m4/getopt.m4 (gl_GETOPT_SUBSTITUTE): New macro,
14197         as discussed with Paul Eggert in threads rooted at
14198         <http://lists.gnu.org/archive/html/bug-gnulib/2004-06/msg00039.html>
14199         and
14200         <http://lists.gnu.org/archive/html/bug-gnulib/2004-07/msg00001.html>.
14201         Before, the test was empty, and relied on ELIDE_CODE in source
14202         code.)
14203         (gl_PREREQ_GETOPT): New macro.
14204         (gl_GETOPT): Use them.
14205
14206 2004-08-12  Simon Josefsson  <jas@extundo.com>
14207
14208         * lib/getopt.c, getopt1.c: Remove ELIDE_CODE hack.
14209         * lib/getopt_.h: Renamed from getopt.h.
14210
14211 2004-08-12  Simon Josefsson  <jas@extundo.com>
14212
14213         * gnulib-tool: Add --source-base, --m4-base, --libtool options.
14214         Change default library name from libfoo to libgnu.
14215         Now, if you have a configure.ac that says:
14216                 gl_SOURCE_BASE(gl)
14217                 gl_M4_BASE(gl/m4)
14218                 gl_MODULES(error getopt etcetera)
14219                 gl_INIT
14220         you can import all you need by running:
14221                 ../gnulib/gnulib-tool --import
14222
14223         * modules/getopt (Files): Rename getopt.h to getopt_.h.
14224         (Makefile.am): Rewrite, use logic from argz.
14225         (Include): Use <getopt.h> instead of "getopt.h".
14226
14227 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14228
14229         * modules/argp (Files): Add m4/unlocked-io.m4.
14230         (Depends-on): Add extensions.
14231
14232 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14233
14234         * m4/argp.m4 (gl_ARGP): Do not check for argp.h or argp_parse; nobody
14235         uses HAVE_ARGP_H or HAVE_ARGP_PARSE.
14236         Require gl_FUNC_GLIBC_UNLOCKED_IO, gl_USE_SYSTEM_EXTENSIONS.
14237         Check for program_invocation_name, program_invocation_short_name,
14238         flockfile, funlockfile, features.h, _getopt_long_only_r.
14239
14240 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14241
14242         * lib/argp-help.c, argp-parse.c: Use "gettext.h" instead of
14243         its complicated substitute.
14244         * lib/argp-help.c: Include <errno.h>, for program_invocation_short_name
14245         and program_invocation_name.
14246         (__argp_basename) [!_LIBC]: Remove; the only use was
14247         replaced by its body.
14248         (__argp_short_program_name): Change condition from
14249         !defined __argp_short_program_name to
14250         ! (defined _LIBC || HAVE_DECL_PROGRAM_INVOCATION_SHORT_NAME),
14251         to match argp-namefrob.h.
14252         (__argp_failure): Don't assume strerror_r returns char *.
14253         * lib/argp-parse.c (N_): Define unconditionally.
14254         (argp_default_options): Fill out initializers with 0 to avoid
14255         gcc warnings.
14256
14257 2004-08-12  Paul Eggert  <eggert@cs.ucla.edu>
14258
14259         * config/srclist.txt: Remove getopt.c, getopt.h (renamed to getopt_.h),
14260         getopt1.c.
14261
14262 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14263
14264         Merge from coreutils.
14265
14266         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for wmemchr and wmemcpy.
14267
14268         * m4/obstack.m4 (gl_PREREQ_OBSTACK): Require
14269         gl_AC_HEADER_INTTYPES_H, gl_AC_HEADER_STDINT_H, gl_AC_TYPE_UINTMAX_T.
14270
14271 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14272
14273         Merge from coreutils.
14274
14275         * lib/fnmatch.c (WIDE_CHAR_SUPPORT): Don't set to 1 if missing
14276         wmemchr or wmemcpy.  Problem reported by Robert Dahlem
14277         for Reliant Unix 5.43.
14278
14279         * lib/obstack.c: Include <inttypes.h> and <stdint.h> if available.
14280         (union fooround): Use uintmax_t, not long int.
14281         The rest is a merge from libc:
14282         [defined _LIBC]: Include <shlib-compat.h>.
14283         (_obstack) [defined _LIBC]: Remove after 2.3.4.
14284
14285         * lib/settime.c (settime): Recode to avoid warning with
14286         Sun Forte C 6U2.
14287
14288         * lib/strverscmp.c: Convert to UTF-8.
14289
14290 2004-08-11  Paul Eggert  <eggert@cs.ucla.edu>
14291
14292         * modules/obstack (Files): Add m4/inttypes_h.m4, m4/stdint_h.m4,
14293         m4/uintmax_t.m4.
14294
14295 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14296
14297         * modules/xalloc-die: New file.
14298         * modules/xalloc: Remove dependencies on error, gettext, exitfail.
14299
14300         * modules/md5 (Files): Add m4/uint32_t.m4.
14301         * modules/sha1: Renamed from modules/sha.
14302         (Files):
14303         Rename lib/sha.h to lib/sha1.h.
14304         Rename lib/sha.c to lib/sha1.c.
14305         Rename m4/sha.m4 to m4/sha1.m4.
14306         (lib_SOURCES): Likewise.
14307         (configure.ac): Rename gl_SHA to gl_SHA1.
14308         (Include): sha.h -> sha1.h.
14309
14310 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14311
14312         * m4/uint32_t.m4, m4/uintptr_t.m4: New files.
14313         * m4/sha1.m4: Renamed from sha.m4.
14314         (gl_SHA1): Renamed from gl_SHA.  All uses changed.
14315
14316 2004-08-09  Paul Eggert  <eggert@cs.ucla.edu>
14317
14318         * lib/obstack.h (obstack_empty_p):
14319         Don't assume that chunk->contents is suitably aligned.
14320         * lib/obstack.c (_obstack_begin, _obstack_begin_1, _obstack_newchunk):
14321         Likewise. Problem reported by Benno in
14322         <http://sources.redhat.com/ml/libc-alpha/2004-08/msg00055.html>.
14323
14324         * lib/chown.c (rpl_chown): Work even if the file is writeable but not
14325         readable.  This could be improved further but it'd take some work.
14326
14327 2004-08-08  Simon Josefsson  <jas@extundo.com>
14328
14329         * modules/xgethostname (Depends-on): Remove exit and error (not
14330         used).
14331
14332         * modules/getpass-gnu: Add getpass.h.
14333         (Depends-on): Add stdbool.
14334         * modules/getpass: Add getpass.h.
14335
14336 2004-08-08  Simon Josefsson  <jas@extundo.com>
14337
14338         * m4/getpass.m4 (gl_FUNC_GETPASS, gl_FUNC_GETPASS_GNU):
14339         Check getpass declaration.
14340
14341 2004-08-08  Simon Josefsson  <jas@extundo.com>
14342
14343         * lib/xgethostname.c: Don't include error.h (not used).
14344
14345         * lib/getpass.h: Add.
14346         * lib/getpass.c: Include getpass.h first.
14347
14348 2004-08-08  Paul Eggert  <eggert@cs.ucla.edu>
14349
14350         * lib/xalloc-die.c: New file.
14351         * lib/xalloc.h (xalloc_fail_func, xalloc_msg_memory_exhausted): Remove.
14352         All uses removed.
14353         * lib/xmalloc.c (xalloc_fail_func, xalloc_msg_memory_exhausted):
14354         Likewise. Move inclusions of gettext.h, error.h, exitfail.h to
14355         xalloc-die.c.
14356         (_, N_, xalloc_die): Move to xalloc-die.c.
14357         * lib/userspec.c (parse_user_spaec): Use xstrdup rather than strdup,
14358         so that we needn't mess with xalloc_msg_memory_exhausted.
14359
14360         * lib/sha1.h: Renamed from sha.h.
14361         (SHA1_H): Renamed from _SHA_H.
14362         (sha1_ctx): Renamed from sha_ctx.
14363         (sha1_init_ctx): Renamed from sha_init_ctx.
14364         (sha1_process_block): Renamed from sha_process_block.
14365         (sha1_process_bytes): Renamed from sha_process_bytes.
14366         (sha1_finish_ctx): Renamed from sha_finish_ctx.
14367         (sha1_read_ctx): Renamed from sha_read_ctx.
14368         (sha1_stream): Renamed from sha_stream.
14369         (sha1_buffer): Renamed from sha_buffer.
14370         * lib/sha1.c: Likewise; renamed from sha.c.
14371         Do not include <sys/types.h>.
14372         Include <stddef.h> rather than <stdlib.h>.
14373
14374 2004-08-08  Bruno Haible  <bruno@clisp.org>
14375
14376         * lib/pathname.h (FILE_SYSTEM_PREFIX_LEN): Renamed from
14377         FILESYSTEM_PREFIX_LEN.
14378         * lib/progreloc.c: Likewise.
14379         * lib/concatpath.c (concatenated_pathname): Use FILE_SYSTEM_PREFIX_LEN.
14380
14381 2004-08-06  Simon Josefsson  <jas@extundo.com>
14382
14383         * modules/progname (Depends-on): Don't depend on stdbool.
14384
14385 2004-08-06  Simon Josefsson  <jas@extundo.com>
14386
14387         * modules/getsubopt: New file.
14388         * MODULES.html.sh (Support for systems lacking POSIX:2001): Add
14389         getsubopt.
14390
14391 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14392
14393         More merge from coreutils.
14394
14395         * m4/utimens.m4, m4/utimecmp.m4: New files.
14396         * m4/backupfile.m4, euidacces.m4, acl.m4, afs.m4, calloc.m4, dirfd.m4,
14397         fsusage.m4, jm-macros.m4, ls-mntd-fs.m4, md5.m4, mountlist.m4,
14398         prereq.m4, sha.m4: Import changes from coreutils.
14399
14400 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14401
14402         More merge from coreutils.
14403         * modules/raise, modules/readtokens0, modules/utimens:
14404         * modules/utimecmp, module/xnanosleep: New files.
14405         * modules/strftime: Add lib/strftime.h.
14406         Change include from <time.h> to "strftime.h".
14407         * modules/yesno: Add lib/yesno.h.
14408         * modules/backupfile: Remove lib/addext.c.
14409         * modules/euidaccess: Add stat-macros.h.
14410         * modules/canonicalize, modules/euidaccess,
14411         modules/filemode, modules/lchown, modules/makepath,
14412         modules/rmdir, modules/stat: Likewise.
14413
14414 2004-08-06  Paul Eggert  <eggert@cs.ucla.edu>
14415
14416         Merge from tar.
14417         * lib/argp-help.c (make_hol, hol_append): Don't assume that
14418         SIZE_MAX is a valid preprocessor constant.
14419         (__argp_basename): Change from "#ifndef _LIBC"
14420         to "#ifndef __argp_short_program_name", so that
14421         we don't compile these functions for tar.
14422
14423         More merges from coreutils.
14424         * lib/raise.c, lib/readtokens0.h, lib/readtokens0.c, lib/strftime.h:
14425         * lib/utimens.h, lib/utimens.c, lib/utimecmp.h, lib/utimecmp.c:
14426         * lib/xnanosleep.h, lib/xnanosleep.c, lib/yesno.h: New files.
14427         * lib/addext.c: Remove; no longer needed.
14428         * lib/yesno.c, lib/argmatch.h, lib/argmatch.c, lib/backupfile.h,
14429         lib/backupfile.c, lib/euidaccess.c, lib/filemode.c, lib/closeout.c,
14430         lib/dup2.c, lib/exclude.c, lib/fileblocks.c, lib/filemode.c,
14431         lib/fnmatch.c, lib/fnmtahc_loop.c, lib/fopen-safer.c, lib/fsusage.c,
14432         lib/fsusage.h, lib/ftruncate.c, lib/full-write.c, lib/getdate.y,
14433         lib/getloadavg.c, lib/getugroups.c, lib/hard-locale.c,
14434         lib/hard-locale.h, lib/hash.c, lib/human.c, lib/human.h, lib/lchown.c,
14435         lib/lchown.h, lib/makepath.c, lib/makepath.h, lib/md5.c, lib/md5.h,
14436         lib/memchr.c, lib/memcoll.c, lib/memrchr.c, lib/modechange.c,
14437         lib/modechange.h, lib/mountlist.c, lib/mountlist.h, lib/nanosleep.c,
14438         lib/posixtm.c, lib/putenv.c, quotearg.c, lib/quotearg.h,
14439         lib/readtokens.c, lib/readutmp.c, lib/readutmp.h, lib/rmdir.c,
14440         lib/safe-read.c, lib/save-cwd.c, lib/savedir.c, lib/setenv.c,
14441         lib/sig2str.c, lib/stat.c, lib/strtoimax.c, lib/strverscmp.c,
14442         lib/userspec.c, lib/utime.c, lib/version-etc.c., lib/xgethostname.c,
14443         lib/xmemcoll.c, lib/xreadlink.c, lib/xstrtod.c, lib/xstrtod.h,
14444         lib/xstrtoimax.c, lib/xstrtol.c, lib/xstrtol.h, lib/xstrtoumax.c:
14445         Import changes from coreutils.
14446
14447 2004-08-05  Simon Josefsson  <jas@extundo.com>
14448
14449         * m4/strdup.m4: Always run gl_PREREQ_STRDUP, since strdup.h need it.
14450
14451 2004-08-05  Simon Josefsson  <jas@extundo.com>
14452
14453         * m4/getsubopt.m4: New file.
14454
14455 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14456
14457         Merge from coreutils.
14458
14459         * m4/c-strtod.m4, m4/canonicalize.m4, m4/fcntl-safer.m4:
14460         * m4/getcwd-path-max.m4: New files.
14461
14462         * m4/dos.m4 (gl_AC_DOS): filesystem -> file system renaming.
14463         FILESYSTEM_PREFIX_LEN ->
14464         FILE_SYSTEM_PREFIX_LEN.
14465         FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX ->
14466         FILE_SYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX.
14467         FILESYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR ->
14468         FILE_SYSTEM_BACKSLASH_IS_FILE_NAME_SEPARATOR.
14469
14470         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't require gl_AC_DOS, the
14471         prerequisite modules now handle the DOS stuff.
14472         Don't check for unistd.h.
14473
14474 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14475
14476         Merge from coreutils.
14477
14478         * lib/.gdb-history: Remove; this doesn't belong here.
14479
14480         * lib/c-strtod.c, lib/c-strtod.h, lib/c-strtold.c, lib/cycle-check.c:
14481         * lib/cycle-check.h, lib/dev-ino.h, lib/canonicalize.h:
14482         * lib/canonicalize.c, lib/fcntl-safer.h, lib/fcntl-safer.c:
14483         * lib/getcwd.c: New files.
14484
14485         * lib/dirname.h: Include <stdbool.h>.
14486         (FILE_SYSTEM_PREFIX_LEN): Renamed from FILESYSTEM_PREFIX_LEN,
14487         for consistency with POSIX terminology.  All uses changed.
14488         (IS_ABSOLUTE_FILE_NAME, IS_RELATIVE_FILE_NAME): New macros.
14489         (strip_trailing_slashes): Use bool for booleans.
14490         * lib/stripslash.c (strip_trailing_slashes): Likewise.
14491
14492         * lib/error.c: Work around bug in OpenBSD 3.4 sterror_r: it
14493         sometimes returns a positive errno value even when it succeeds.
14494         (print_errno_message) [!LIBC]: Fall back on strerror if
14495         __strerror_r fails.
14496
14497         * lib/path-concat.c (mempcpy): Don't define if a system header defines
14498         it. Don't include stdio.h, stdlib.h, unistd.h, strdup.h.
14499         (longest_relative_suffix): New function.
14500         (path_concat): Use it.  Assume first argument is not NULL.
14501         Port to DOS.  Omit redundant separators.
14502         Report an error instead of returning NULL.
14503         Use mempcpy instead of memcpy.
14504         (xpath_concat): Remove: not declared or used.
14505
14506         * lib/same.h: Include <stdbool.h>
14507         (same_name): Return bool, not int.
14508         * lib/same.c (same_name): Likewise.
14509         (errno): Don't declare; we assume C89 or better now.
14510
14511         * lib/stat-macros (S_ISCTG, S_ISOFD, S_ISOFL): New macros,
14512         if not already defined.
14513
14514         * lib/xgetcwd.c (errno): Don't declare; we assume C89 or better now.
14515         * lib/dup-safer.c (errno): Likewise.
14516
14517 2004-08-05  Paul Eggert  <eggert@cs.ucla.edu>
14518
14519         Merge from coreutils.
14520         * modules/c-strtod, modules/c-strtold, modules/canonicalize:
14521         * modules/cycle-check, modules/fcntl-safer, modules/getcwd: New files.
14522         * modules/path-concat: Don't depend on strdup.
14523
14524 2004-08-03  Simon Josefsson  <jas@extundo.com>
14525
14526         * lib/strdup.h: Only use HAVE_DECL_STRDUP if defined.
14527         * lib/progname.h: Don't include stdbool.h.
14528
14529 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14530
14531         * modules/fatal: Remove, as the "fatal" module wasn't used or working.
14532         * MODULES.html.sh (func_all_modules): Remove fatal.
14533
14534 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14535
14536         * m4/fatal.m4: Remove, as the "fatal" module wasn't used or working.
14537
14538 2004-08-03  Paul Eggert  <eggert@cs.ucla.edu>
14539
14540         * lib/fatal.c, fatal.h: Remove as the "fatal" module wasn't used or
14541         working.
14542
14543 2004-08-02  Simon Josefsson  <jas@extundo.com>
14544
14545         * lib/getsubopt.h: New file, with comments from Bruno Haible.
14546         * lib/getsubopt.c: New file, from glibc, but slightly modified based on
14547         suggestions from Paul Eggert <eggert@cs.ucla.edu>.
14548
14549 2004-08-01  Simon Josefsson  <jas@extundo.com>
14550
14551         * lib/xgetdomainname.c: Include stdlib.h, for free().
14552
14553 2004-07-19  Bruno Haible  <bruno@clisp.org>
14554
14555         * MODULES.html.sh (func_all_modules): Add dummy.
14556
14557 2004-07-16  Simon Josefsson  <jas@extundo.com>
14558
14559         * modules/dummy: New file.
14560
14561 2004-07-16  Simon Josefsson  <jas@extundo.com>
14562
14563         * lib/dummy.c: New file.
14564
14565 2004-07-16  Bruno Haible  <bruno@clisp.org>
14566
14567         * lib/backupfile.h: Add extern "C" for C++.
14568         * lib/closeout.h: Likewise.
14569         * lib/copy-file.h: Likewise.
14570         * lib/findprog.h: Likewise.
14571         * lib/full-write.h: Likewise.
14572         * lib/pathname.h: Likewise.
14573         * lib/progname.h: Likewise.
14574         * lib/stpcpy.h: Likewise.
14575         * lib/stpncpy.h: Likewise.
14576         * lib/strcase.h: Likewise.
14577         * lib/strstr.h: Likewise.
14578         * lib/xalloc.h: Likewise.
14579
14580         * lib/mbswidth.h: Add extern "C" for C++.
14581         Reported by Albert Chin-A-Young <china@thewrittenword.com>.
14582
14583 2004-07-13  Robert Millan  <robertmh@gnu.org>
14584
14585         * m4/host-os.m4: s/KNetBSD/kNetBSD/g and s/KFreeBSD/kFreeBSD/g.
14586
14587 2004-07-09  Simon Josefsson  <jas@extundo.com>
14588
14589         * lib/getndelim2.c: Include stddef.h, for ptrdiff_t.  (FreeBSD 4.9
14590         failed without this.)
14591
14592 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14593
14594         * modules/chown (Files): Add lib/fchown-stub.c, since
14595         gl_PREREQ_CHOWN invokes AC_LIBOBJ(fchown-stub).
14596
14597 2004-07-09  Paul Eggert  <eggert@cs.ucla.edu>
14598
14599         * lib/fchown-stub.c: New file.
14600
14601 2004-06-24  Jim Meyering  <jim@meyering.net>
14602
14603         * lib/obstack.h (obstack_base): Cast to (void *), per documentation.
14604
14605 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14606
14607         * modules/argz: Omit "#include".
14608
14609         * MODULES.html.sh (func_all_modules): Add calloc, to match
14610         2004-06-01 addition of calloc module.
14611
14612 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14613
14614         * m4/argz.m4: New file, which is autoupdated from libtool.
14615
14616 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14617
14618         * lib/argz.c, lib/argz_.h: New files, which are autoupdated from
14619         libtool.
14620
14621 2004-06-22  Paul Eggert  <eggert@cs.ucla.edu>
14622
14623         * config/srclist-update: Don't insist on "USA." before the
14624         close-comment, as libtool omits the period and puts the */ on a
14625         separate line.
14626         * config/srclist.txt: Add argz.c, argz_.h, argz.m4.
14627         * config/srclistvars.sh: Add LIBTOOL (for eggert only).
14628
14629 2004-06-22  Gary V. Vaughan  <gary@gnu.org>
14630
14631         * modules/argz: New file.
14632         * MODULES.html.sh (func_all_modules): Add argz.
14633
14634 2004-06-12  Jim Meyering  <jim@meyering.net>
14635         and  Paul Eggert  <eggert@cs.ucla.edu>
14636
14637         * modules/hash (Files): Add lib/xalloc.h.
14638         * modules/pipe (Depends-on): Add wait-process.
14639         * modules/stat (Depends-on): Add xalloc.
14640         * modules/userspec (Files): Add lib/userspec.h.
14641         * modules/xstrto
14642
14643         Upgrade from gettext-0.13.
14644         * modules/gettext (Files): Add m4/intmax.m4, m4/longdouble.m4,
14645         m4/longlong.m4, m4/printf-posix.m4, m4/signed.m4, m4/size_max.m4,
14646         m4/wchar_t.m4, m4/wint_t.m4, m4/xsize.m4.
14647
14648 2004-06-10  Jim Meyering  <jim@meyering.net>
14649
14650         * lib/calloc.c: New file.
14651
14652 2004-06-06  Paul Eggert  <eggert@cs.ucla.edu>
14653
14654         * lib/getdate.y (yylex): Allow space between sign and number.
14655         Problem reported by Dan Jacobson.
14656
14657 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14658
14659         Merge from coreutils CVS.
14660
14661         * m4/backupfile.m4, dirname.m4, human.m4, inttypes.m4, longlong.m4,
14662         makepath.m4, memchr.m4, memcmp.m4, mountlist.m4, path-concat.m4,
14663         putenv.m4, quotearg.m4, readutmp.m4, strtoimax.m4, strtoll.m4,
14664         strtoull.m4, strtoumax.m4, ulonglong.m4, vasnprintf.m4,
14665         xstrtol.m4: Fix copyright date and/or serial number.
14666
14667         * m4/chown.m4 (gl_PREREQ_CHOWN): Check for fcntl.h.
14668         See if we need an fchown replacement.
14669         (gl_FUNC_CHOWN_FOLLOWS_SYMLINK): New macro.
14670         (gl_FUNC_CHOWN): Require gl_FUNC_CHOWN_FOLLOWS_SYMLINK,
14671         and use the replacement function if we detect either defect.
14672
14673         * m4/prereq.m4 (gl_PREREQ): Add gl_ALLOCSA, gl_CLOEXEC, gl_INTTOSTR,
14674         gl_UTIMECMP.
14675
14676 2004-06-01  Paul Eggert  <eggert@cs.ucla.edu>
14677         and  Jim Meyering  <jim@meyering.net>
14678
14679         Merge from coreutils CVS.
14680
14681         * lib/stat-macros.h: New file, with contents from file-type.h
14682         and coreutils' system.h.
14683         * lib/file-type.c: Include "stat-macros.h".
14684         * lib/file-type.h (file_type): Move all macro definitions to new file,
14685         stat-macros.h.
14686
14687         * lib/chown.c (rpl_chown) [CHOWN_FAILS_TO_HONOR_ID_OF_NEGATIVE_ONE]:
14688         Wrap old code with this conditional.
14689         [CHOWN_MODIFIES_SYMLINK]: Try to work around a chown
14690         function that does not dereference symlinks.
14691         * lib/lchown.c (lchown) [CHOWN_MODIFIES_SYMLINK]: Just call chown.
14692
14693         * lib/xreadlink.c: Include xreadlink.h first, to catch .h file
14694         dependency problems.
14695         (xreadlink): Accept new arg SIZE, for efficiency.
14696         All decls and uses changed.
14697         * lib/xreadlink.h: Include <stddef.h>, for size_t.
14698
14699         * lib/.cppi-disable: Add alloca_.h, allocsa.h, exit.h, getndelim2.h,
14700         gettext.h, localcharset.h, strdup.h, strndup.h, strtoul.c, time_r.h.
14701
14702         * lib/.cvsignore: Add alloca.h, fnmatch.h, poll.h, stdbool.h,
14703         sysexits.h.
14704
14705 2004-06-01  Jim Meyering  <jim@meyering.net>
14706
14707         * m4/calloc.m4: New file.
14708
14709 2004-05-31  Paul Eggert  <eggert@cs.ucla.edu>
14710
14711         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Detect _Bool bug in HP aC++/ANSI
14712         C B3910B A.05.55 [Dec 04 2003].  Problem reported by Jim Meyering.
14713         Also, fix a typo in a diagnostic.
14714
14715 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14716
14717         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Do not require AC_FUNC_MALLOC
14718         or AC_FUNC_REALLOC.
14719
14720 2004-05-30  Paul Eggert  <eggert@cs.ucla.edu>
14721
14722         * lib/xmalloc.c (HAVE_MALLOC, HAVE_REALLOC): Do not require these
14723         macros to be defined.
14724         (xnmalloc_inline, xnrealloc_inline, xcalloc): Do not die if
14725         the allocator returns NULL because the requested size is zero.
14726
14727 2004-05-20  Paul Eggert  <eggert@cs.ucla.edu>
14728
14729         * lib/malloc/obstack.c (_obstack) [defined _LIBC]: Bring back this
14730         var.  Add comment explaining why libc still defines it.  This
14731         merges the following patch from glibc:
14732         http://sources.redhat.com/ml/libc-alpha/2004-05/msg00157.html
14733
14734 2004-05-20  Andreas Schwab  <schwab@suse.de>
14735
14736         * m4/free.m4: Replace free if it not known to work, not the other
14737         way round.
14738
14739 2004-05-19  Paul Eggert  <eggert@cs.ucla.edu>
14740
14741         * lib/obstack.c (_obstack): Remove unused variable.  It hasn't been
14742         present in glibc since revision 1.1 of this file.
14743         * lib/obstack.h (_obstack_free, obstack_1grow, obstack_1grow_fast,
14744         obstack_alignment_mask, obstack_alloc, obstack_base,
14745         obstack_blank, obstack_blank_fast, obstack_chunk_size,
14746         obstack_copy, obstack_copy0, obstack_finish, obstack_grow,
14747         obstack_grow0, obstack_init, obstack_int_grow,
14748         obstack_int_grow_fast, obstack_make_room, obstack_memory_used,
14749         obstack_next_free, obstack_object_size, obstack_ptr_grow,
14750         obstack_ptr_grow_fast, obstack_room): Remove declarations of
14751         nonexistent functions.
14752
14753 2004-05-18  Karl Berry  <karl@gnu.org>
14754
14755         * config/srclist.txt: break link for vasnprintf.c.
14756
14757 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14758
14759         Port obstack to the AS/400, where pointers are 16 bytes wide and
14760         you cannot cast an integer to a valid pointer.  This patch is
14761         currently waiting to be integrated into glibc; see
14762         <http://sources.redhat.com/ml/libc-alpha/2004-05/msg00073.html>.
14763
14764         * lib/obstack.h (__PTR_TO_INT, __INT_TO_PTR): Remove.
14765         All uses of __INT_TO_PTR (PTR_TO_INT ...) replaced by __PTR_ALIGN.
14766         (__BPTR_ALIGN, __PTR_ALIGN): New macros.
14767         (struct obstack): temp member is now a union of a pointer and
14768         an integer, instead of an integer.  All integer uses changed.
14769         This does not affect the physical layout of struct obstack,
14770         except on hosts (like the AS/400) where the size or alignment of
14771         void * is greater than that of ptrdiff_t.
14772         (obstack_finish) [! (defined __GNUC__ && defined __STDC__ &&
14773         __STDC__)]: Store temporary in pointer member of union, not
14774         integer member.
14775         * lib/obstack.c: Include <stddef.h>, for offsetof.
14776         (struct fooalign): Remove; it doesn't need a name.
14777         (union fooround): Change double to long double, and add void *.
14778         (DEFAULT_ALIGNMENT): Use offsetof to compute.
14779         (DEFAULT_ALIGNMENT, DEFAULT_ROUNDING): Now an enum constant,
14780         not a macro.  Hence the values are always int; so remove all
14781         casts-to-int in uses.
14782
14783 2004-05-17  Paul Eggert  <eggert@cs.ucla.edu>
14784
14785         * config/srclist.txt: Break link for argp-help.c and argp-parse.c until
14786         we can get this patch merged into glibc.
14787
14788 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14789             Paul Eggert  <eggert@cs.ucla.edu>
14790
14791         * m4/argp: Depend on alloca.
14792
14793 2004-05-17  Derek R. Price  <derek@ximbiot.com>
14794             Paul Eggert  <eggert@cs.ucla.edu>
14795
14796         * lib/argp-help.c, argp-parse.c: Assume <alloca.h> rather than
14797         freecoding.
14798
14799 2004-05-17  Bruno Haible  <bruno@clisp.org>
14800
14801         * lib/vasnprintf.c (VASNPRINTF): Correctly handle the case of a
14802         precision that consists of a '.' followed by an empty digit string.
14803         Patch by Tor Lillqvist <tml@iki.fi>.
14804
14805 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14806
14807         * m4/alloca.m4 (gl_FUNC_ALLOCA): Define HAVE_ALLOCA_H always,
14808         for backward compatibility with older code.  We need our own
14809         alloca.h if _AIX is defined.  Define HAVE_ALLOCA if we discover
14810         it under some other name, and our alloca.h will define it.
14811
14812 2004-05-16  Paul Eggert  <eggert@cs.ucla.edu>
14813             Derek Price  <derek@ximbiot.com>
14814
14815         * lib/alloca.c: Include <alloca.h>, to get our interface.
14816         * lib/alloca_.h: Use __alloca on AIX, so that we don't have to
14817         include <alloca.h> first.  Use C89 prototype for alloca; this
14818         requires including <stddef.h> for size_t.  Use extern "C" if C++.
14819         Use #elif for simplicity, since we can assume C89 now.
14820         Don't try to source the system alloca.h since it will not be found
14821         and to prevent recursively including its replacement.
14822         * lib/fnmatch.c: Include <alloca.h> instead of opencoding.
14823         * lib/regex.c: Likewise.
14824
14825 2004-05-16  Derek Price  <derek@ximbiot.com>
14826             Paul Eggert  <eggert@cs.ucla.edu>
14827
14828         getline cleanup.  This changes the getndelim2 API: both order of
14829         arguments, and meaning of delim2 (now uses EOF, not 0, to indicate
14830         no delimiter).
14831
14832         * lib/getline.c: Don't include stddef.h or stdio.h, since our
14833         interface does that.
14834         (getline): Always use getdelim, so that we don't have two
14835         copies of this code.
14836         * lib/getndelim2.c: Include <limits.h>, <inttypes.h>, <stdint.h>
14837         if available.
14838         (PTRDIFF_MAX, SIZE_MAX, SSIZE_MAX): Define if not defined.
14839         (GETNDELIM2_MAXIMUM): New macro.
14840         (getndelim2): Reorder arguments.  delim==EOF now means no delimiter,
14841         instead of the old practice of delim2==0.  All callers changed.
14842         Return -1 on overflow, instead of returning junk.
14843         Do not set *linesize unless allocation succeeds.
14844         * lib/getndelim2.h: Do not include stddef.h; no longer needed, now
14845         that we include sys/types.h.
14846         * lib/getnline.h: Likewise.
14847         * lib/getndelim2.h (GETNLINE_NO_LIMIT): New macro.
14848         (getndelim2): Reorder arguments.
14849         * lib/getnline.c (getnline, getndelim):
14850         Don't discard the NMAX argument.
14851         (getnline): Invoke getndelim, to avoid code duplication.
14852         * lib/getnline.h (GETNLINE_NO_LIMIT): New macro, used instead
14853         of (size_t) -1 by callers of the getnline family.
14854
14855 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14856
14857         * m4/gettime.m4 (gl_GETTIME): Require gl_TIMESPEC.
14858         Check for gettimeofday.
14859         * m4/settime.m4 (gl_SETTIME): Require gl_TIMESPEC.
14860         Check for settimeofday, stime.
14861
14862 2004-05-13  Paul Eggert  <eggert@cs.ucla.edu>
14863
14864         * lib/nanosleep.c (suspended): Change its type from int to
14865         sig_atomic_t volatile.
14866         (first_call): Make it private to rpl_nanosleep, and have it
14867         be zero initially as that's a bit faster.
14868         (my_usleep): Round up fractional times instead of truncating them,
14869         as this is the usual meaning for 'sleep'.
14870
14871         * lib/gettime.c (gettime): Fall back on `time' if `gettimeofday'
14872         doesn't work.
14873         * lib/settime.c: Include <unistd.h>, for stime (on Solaris 8, anyway).
14874         (ENOSYS): Define if not defined.
14875         (settime): Fall back on stime if it exists and settimeofday fails.
14876         But don't bother with fallbacks if a method fails with errno == EPERM.
14877
14878 2004-05-11  Jim Meyering  <jim@meyering.net>
14879
14880         Prior to this change, the save_cwd caller required read access to the
14881         current directory on most systems (ones with the fchdir function).
14882
14883         * lib/save-cwd.c (save_cwd) [HAVE_FCHDIR]: If opening `.' read-only
14884         fails, try write-only, and finally, resort to using xgetcwd.
14885
14886 2004-05-06  Paul Eggert  <eggert@cs.ucla.edu>
14887
14888         * lib/obstack.c, obstack.h: Import changes from libc.
14889
14890 2004-04-28  Bruno Haible  <bruno@clisp.org>
14891
14892         * lib/findprog.c (find_in_path): Treat Cygwin like Windows, since it
14893         also implicitly appends .exe to executables.
14894         * lib/localcharset.c (ISSLASH): Treat Cygwin like Windows, since it now
14895         accepts Windows pathnames.
14896         * lib/pathname.h (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14897         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14898         * lib/progreloc.c (ISSLASH, IS_PATH_WITH_DIR, FILESYSTEM_PREFIX_LEN):
14899         Treat Cygwin like Windows, since it now accepts Windows pathnames.
14900         Reported by Derek Robert Price <derek@ximbiot.com>.
14901
14902 2004-04-21  Karl Berry  <karl@gnu.org>
14903
14904         * config/srclist.txt (localcharset.c): break sync.
14905
14906 2004-04-20  Paul Eggert  <eggert@twinsun.com>
14907
14908         * m4/host-os.m4: Add a copyright notice.
14909
14910 2004-04-20  Jim Meyering  <jim@meyering.net>
14911
14912         Change UTILS_ to gl_ in AC_DEFINE'd names.
14913         Change utils_- and jm_-prefixed variables, too.
14914         * m4/mkdir-slash.m4 (gl_FUNC_MKDIR_TRAILING_SLASH): Renamed from
14915         UTILS_FUNC_MKDIR_TRAILING_SLASH.
14916         * m4/mkstemp.m4 (gl_FUNC_MKSTEMP): Renamed from UTILS_FUNC_MKSTEP.
14917
14918         * m4/dirfd.m4 (gl_FUNC_DIRFD): Rename from UTILS_FUNC_DIRFD.
14919         Don't emit trailing blanks.
14920         Also rename jm_-prefixed variables to have gl_ prefix.
14921
14922         * m4/host-os.m4 (gl_HOST_OS): Rename from UTILS_HOST_OS.
14923         Also rename jm_-prefixed variables to have gl_ prefix.
14924
14925         * m4/jm-macros.m4: Reflect the renamings.
14926         * m4/prereq.m4: Likewise.
14927
14928 2004-04-20  Jim Meyering  <jim@meyering.net>
14929
14930         * lib/getndelim2.c (getndelim2): Upon realloc failure, don't leak
14931         memory.
14932
14933 2004-04-20  Jim Meyering  <jim@meyering.net>
14934             Bruno Haible  <bruno@clisp.org>
14935
14936         * lib/localcharset.c (get_charset_aliases) [!VMS && !WIN32]: Don't leak
14937         memory when realloc fails.
14938
14939 2004-04-19  Jim Meyering  <jim@meyering.net>
14940
14941         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Require gl_FUNC_FREE,
14942         now that readutmp.c may call `free (0)'.
14943
14944 2004-04-19  Bruno Haible  <bruno@clisp.org>
14945
14946         * m4/mbrtowc.m4: Change jm_ to gl_ in cache variables as well.
14947         * m4/inttypes_h.m4: Likewise.
14948         * m4/stdint_h.m4: Likewise.
14949         * m4/intmax_t.m4: Likewise.
14950         * m4/uintmax_t.m4: Likewise.
14951
14952 2004-04-18  Jim Meyering  <jim@meyering.net>
14953
14954         * m4/prereq.m4: Don't forbid jm_ prefix.
14955
14956         * m4/afs.m4, m4/allocsa.m4, m4/assert.m4, m4/backupfile.m4:
14957         * m4/bison.m4, m4/check-decl.m4, m4/chown.m4, m4/d-ino.m4:
14958         * m4/d-type.m4, m4/dirname.m4, m4/dos.m4, m4/error.m4, m4/fpending.m4:
14959         * m4/fstypename.m4, m4/fsusage.m4, m4/ftruncate.m4, m4/getdate.m4:
14960         * m4/getgroups.m4, m4/gettext.m4, m4/glibc21.m4, m4/group-member.m4:
14961         * m4/human.m4, m4/intmax.m4, m4/intmax_t.m4, m4/inttostr.m4:
14962         * m4/inttypes.m4, m4/inttypes_h.m4, m4/jm-macros.m4, m4/jm-winsz1.m4:
14963         * m4/jm-winsz2.m4, m4/lchown.m4, m4/lib-check.m4, m4/link-follow.m4:
14964         * m4/localcharset.m4, m4/longlong.m4, m4/ls-mntd-fs.m4, m4/lstat.m4:
14965         * m4/makepath.m4, m4/mbrtowc.m4, m4/mbswidth.m4, m4/memchr.m4:
14966         * m4/memcmp.m4, m4/mkdtemp.m4, m4/mkstemp.m4, m4/mountlist.m4:
14967         * m4/nanosleep.m4, m4/path-concat.m4, m4/perl.m4, m4/prereq.m4:
14968         * m4/putenv.m4, m4/quotearg.m4, m4/regex.m4, m4/stat.m4:
14969         * m4/stdint_h.m4, m4/strftime.m4, m4/strtoimax.m4, m4/strtoll.m4:
14970         * m4/strtoull.m4, m4/strtoumax.m4, m4/timespec.m4, m4/uintmax_t.m4:
14971         * m4/ulonglong.m4, m4/unlink-busy.m4, m4/unlocked-io.m4, m4/uptime.m4,
14972         * m4/utimbuf.m4, m4/utime.m4, m4/utimes-null.m4, m4/vasnprintf.m4:
14973         * m4/xstrtoimax.m4, m4/xstrtol.m4, m4/xstrtoumax.m4:
14974         Change jm_ to gl_ in AC_DEFINE'd names. Update all uses.
14975
14976 2004-04-18  Jim Meyering  <jim@meyering.net>
14977
14978         * lib/readutmp.c (read_utmp) [UTMP_NAME_FUNCTION]: Upon realloc
14979         failure, don't leak memory and do call END_UTMP_ENT.
14980
14981 2004-04-16  Jim Meyering  <jim@meyering.net>
14982
14983         * m4/prereq.m4 (jm_PREREQ_STAT): Remove macro.  It is specific to
14984         coreutils' stat program.
14985         (gl_PREREQ): Don't require jm_PREREQ_STAT.
14986
14987 2004-04-11  Paul Eggert  <eggert@twinsun.com>
14988
14989         * lib/inttostr.h: Include <limits.h> unconditionally, since we assume
14990         C89.
14991         (CHAR_BIT): Remove, since we assume C89.
14992         Include <stdint.h> if available, as per current Autoconf CVS advice.
14993
14994 2004-03-31  Jim Meyering  <jim@meyering.net>
14995
14996         * m4/prereq.m4: Require AC_FUNC_MALLOC, not jm_FUNC_MALLOC.
14997         Require AC_FUNC_REALLOC, not jm_FUNC_REALLOC.
14998         * m4/xalloc.m4: Likewise.
14999
15000 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15001
15002         Merge from coreutils.
15003
15004         * m4/inttostr.m4: New file.
15005         * m4/getdate.m4 (gl_GETDATE): Remove time-related stuff.
15006         Require AM_STDBOOL_H and gl_TIMESPEC instead.
15007         Require gl_CLOCK_TIME.
15008         * m4/clock_time.m4 (gl_CLOCK_TIME): Require AC_GNU_SOURCE.
15009
15010 2004-03-30  Paul Eggert  <eggert@twinsun.com>
15011
15012         * lib/cloexec.h, cloexec.c (set_cloexec_flag): Return int
15013         not bool, to be more consistent with Unix conventions.
15014         Suggested by Bruno Haible.
15015
15016         Merge from coreutils.
15017
15018         * lib/imaxtostr.c, lib/inttostr.c, lib/inttostr.h, lib/offtostr.c:
15019         * lib/umaxtostr.c: New files.
15020
15021         * lib/getdate.h: Include stdbool.h, and timespec.h instead of
15022         the usual <time.h> dance.
15023         (get_date): Change signature to support fractional time stamps.
15024         All callers changed.
15025         * lib/getdate.y: Include "getdate.h" first, as we can now
15026         assume C89 and don't need to worry about 'const'.
15027         Similarly, include "unlocked-io.h" near start, not in middle.
15028         Include <limits.h>.
15029         (textint.value): Use long int rather than int.
15030         (textint.digits): Use size_t rather than int.
15031         (BILLION, LOG10_BILLION): New constants.
15032         (parser_control): New member rel_ns.  Members day_ordinal,
15033         time_zone, month, day, hour, minutes, rel_year, rel_month,
15034         rel_day, rel_hour, rel_minutes, rel_seconds
15035         are now long int, not int.  Member seconds is now struct timespec,
15036         not int.  New member timespec_seen.  Members dates_seen, days_seen,
15037         local_zones_seen, rels_seen, times_seen, zones_seen are now size_t,
15038         not int.
15039         (%union.intval): Now long int, not int.
15040         New member timespec.
15041         (tSDECIMAL_NUMBER, tUDECIMAL_NUMBER): New tokens.
15042         (seconds, signed_seconds, unsigned_seconds): New nonterminals.
15043         (spec): Now is a timespec or an item list.
15044         (timespec, items): New nonterminals.
15045         (time, rel, relunit, number, get_date):
15046         Add support for fractional seconds.
15047         (time): Fix bug: seconds weren't cleared in "00:00 +0000" syntax.
15048         (gmtime, localtime, mktime): Remove decls; not needed with C89.
15049         (to_hour): First arg is now long int, not int.
15050         (to_year): Returns long int, not int.
15051         Don't treat year -70 like 70.
15052         (tm_diff): Returns long int, not int.
15053         (lookup_word): Use bool instead of int when appropriate.
15054         (yylex): Use size_t for count, not int.
15055         Detect overflow when parsing large integer constants.
15056         Add support for fractions.
15057         (get_date): Make pointers 'const' if possible.
15058         Use more-portable code to detect integer overflow.
15059         (main) [TEST]: Adjust to above changes.  Test for localtime failure.
15060         Don't use ctime; it's not reliable if the year has >4 digits.
15061
15062         * lib/human.c (humblock): Inspect BLOCKSIZE if BLOCK_SIZE isn't set.
15063         This is for compatibility with BSD.
15064
15065         * lib/timespec.h (ST_TIME_CMP_NS, ST_TIME_CMP): Define.
15066         (ATIME_CMP, CTIME_CMP, MTIME_CMP, TIMESPEC_NS): Likewise.
15067         From coreutils' system.h.
15068
15069         * lib/userspec.c: Don't include "posixver.h".
15070         (parse_user_spec): Fall back on USER.GROUP parsing, regardless
15071         of POSIX version, as POSIX 1003.1-2001 allows that behavior as a
15072         compatible extension.  Simplify code by removing a boolean int
15073         that was always nonzero if a string was nonnull.
15074
15075 2004-03-30  Jim Meyering  <jim@meyering.net>
15076
15077         Merge from coreutils.
15078
15079         Avoid a configure-time warning about sys/ucred.h on OSF V4.0.
15080         * m4/ls-mntd-fs.m4: Test for sys/ucred.h separately, since
15081         on some systems one must include <grp.h> before it.
15082         Reported by Christian Krackowizer.
15083
15084 2004-03-30  Jim Meyering  <jim@meyering.net>
15085
15086         Merge from coreutils.
15087
15088         * lib/mountlist.c [HAVE_SYS_UCRED_H]: Include grp.h before sys/ucred.h.
15089
15090         * lib/readtokens.c (readtoken): Don't leak 64 bytes when reading
15091         an empty input stream.
15092
15093         * lib/readtokens.c: Include <stdbool.h>.
15094         (readtoken): Use `size_t' rather than int/long.
15095         All callers adjusted.
15096         Use `bool' rather than `int' where appropriate.
15097         Use memset rather than an explicit loop.
15098         Use x2nrealloc rather than xrealloc.
15099         Allow the use of `\0' as a delimiter.
15100         (readtokens): Likewise.
15101         * lib/readtokens.h (readtoken, readtokens): Update prototypes.
15102
15103 2004-03-30  Jim Meyering  <jim@meyering.net>
15104
15105         * m4/realloc.m4: Remove file, since now it does no more than
15106         AC_REQUIRE([AC_FUNC_REALLOC]), and that can be done via
15107         the `configure.ac' section of module/realloc.
15108         * m4/malloc.m4: Likewise, but for AC_FUNC_MALLOC.
15109
15110 2004-03-30  Bruno Haible  <bruno@clisp.org>
15111
15112         * lib/getloadavg.c (getloadavg): Don't assume setlocale returns
15113         nonnull.
15114
15115 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15116
15117         Merge changes to getloadavg.c from coreutils and Emacs.
15118
15119         * lib/getloadavg.c [!defined HAVE_SETLOCALE] (setlocale):
15120         Define to an expression, not to the empty string.
15121         Include cloexec.h and xalloc.h.
15122         (getloadavg): Restore LC_NUMERIC locale after setting it temporarily.
15123         Use set_cloexec_flag rather than rolling our own.
15124         * lib/cloexec.c, lib/cloexec.h: New files.
15125
15126 2004-03-29  Paul Eggert  <eggert@twinsun.com>
15127
15128         * m4/cloexec.m4: New file.
15129
15130 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15131
15132         * lib/getopt.h: Sync with libc CVS.
15133
15134 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15135             Bruno Haible  <bruno@clisp.org>
15136
15137         * m4/mbswidth.m4 (gl_MBSWIDTH): Also test whether <wchar.h> declares
15138         mbswidth.
15139
15140 2004-03-18  Paul Eggert  <eggert@twinsun.com>
15141             Bruno Haible  <bruno@clisp.org>
15142
15143         * lib/mbswidth.h: Include <wchar.h> only if
15144         HAVE_DECL_MBSWIDTH_IN_WCHAR_H, not on all platforms that have
15145         <wchar.h>.
15146         * lib/mbswidth.c: Include <stdio.h> and <time.h> before <wchar.h>.
15147
15148 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15149
15150         * lib/argp-parse.c, getopt.c, getopt.h, getopt1.c:
15151         Sync with libc CVS.
15152         * lib/getopt_int.h: New file, also synced from libc.
15153
15154 2004-03-09  Paul Eggert  <eggert@twinsun.com>
15155
15156         * config/srclistvars.sh: Add GNUWWWLICENSES for eggert.
15157         * config/srclist.txt: Sync getopt with libc.  Add getopt_int.h.
15158         Bring back getopt.c, getopt.h, getopt1.c.
15159
15160 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15161
15162         * m4/c-stack.m4 (gl_PREREQ_C_STACK): Renamed from jm_PREREQ_C_STACK.
15163         All uses changed.  Check for sa_sigaction member; this fixes
15164         a bug first reported by Jason Andrade in
15165         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15166
15167 2004-03-07  Paul Eggert  <eggert@twinsun.com>
15168
15169         * lib/c-stack.c (SIGACTION_WORKS): New macro.  Use it instead of long
15170         '#if' expressions.  Unlike the code it replaces, it does not
15171         depend on (defined _SC_PAGESIZE).  However, it does depend on
15172         HAVE_STRUCT_SIGACTION_SA_SIGACTION; this last change fixes a bug
15173         first reported by Jason Andrade in
15174         <http://mail.gnu.org/archive/html/bug-textutils/2003-03/msg00027.html>.
15175
15176 2004-02-25  Simon Josefsson  <jas@extundo.com>
15177
15178         * m4/strdup.m4 (gl_PREREQ_STRDUP): Check whether strdup is declared.
15179
15180 2004-02-25  Simon Josefsson  <jas@extundo.com>
15181
15182         * lib/strdup.h: New file.
15183         * lib/strdup.c: Include it.
15184         * lib/path-concat.c: Include strdup.h. Drop strdup declaration.
15185         * lib/userspec.c: Include strdup.h. Drop strdup declaration.
15186
15187 2004-02-23  Karl Berry  <karl@gnu.org>
15188
15189         * doc/maintain.texi, doc/standards.texi, doc/make-stds.texi: new files
15190         (from fencepost.gnu.org:/gd/gnuorg).
15191
15192 2004-02-23  Karl Berry  <karl@gnu.org>
15193
15194         * config/srclistvars.sh (GNUORG) [karl]: redefine.
15195         * config/srclist.txt: add maintain/standards documents.
15196
15197 2004-02-18  Bruno Haible  <bruno@clisp.org>
15198
15199         * m4/xsize.m4 (gl_XSIZE): Require AC_C_INLINE.
15200         Reported by Derek Robert Price <derek@ximbiot.com>.
15201
15202 2004-02-16  Karl Berry  <karl@gnu.org>
15203
15204         * config/mkinstalldirs, install-sh: update from automake.
15205
15206 2004-02-06  Karl Berry  <karl@gnu.org>
15207
15208         * m4/po.m4: update from gettext 0.14.1.
15209
15210 2004-02-06  Karl Berry  <karl@gnu.org>
15211
15212         * lib/config.charset: update from gettext 0.14.1.
15213
15214 2004-02-05  Paul Eggert  <eggert@twinsun.com>
15215
15216         Add comments and code, prompted by suggestions from Bruno Haible
15217         for sh-quote.
15218         * lib/quotearg.h (quotearg_alloc): New decl.  Improve the comments
15219         describing the enum quoting_style values.
15220         * lib/quotearg.c (quotearg_alloc): New function.
15221         (quotearg_buffer_restyled): Treat lone { and } as special.
15222         Treat = as special.  Work around bug with older shells
15223         that "see" a '\' that is really the 2nd byte of a multibyte char.
15224         Quote empty string with shell_quoting_style.
15225
15226 2004-02-03  Bruno Haible  <bruno@clisp.org>
15227
15228         * m4/pipe.m4: New file, from GNU gettext.
15229
15230 2004-02-03  Bruno Haible  <bruno@clisp.org>
15231
15232         * lib/pipe.h: New file, from GNU gettext.
15233         * lib/pipe.c: New file, from GNU gettext.
15234
15235 2004-01-27  Bruno Haible  <bruno@clisp.org>
15236
15237         * m4/execute.m4: New file, from GNU gettext.
15238
15239 2004-01-27  Bruno Haible  <bruno@clisp.org>
15240
15241         * lib/execute.h: New file, from GNU gettext.
15242         * lib/execute.c: New file, from GNU gettext.
15243         * lib/w32spawn.h: New file, from GNU gettext.
15244
15245 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15246
15247         Merge from diffutils.
15248
15249         * lib/file-type.c (file_type): Add typed memory objects.
15250         * lib/file-type.h (S_TYPEISTMO): New macro.
15251
15252         * lib/c-stack.h (c_stack_action): Remove argv argument.
15253         * lib/c-stack.c (c_stack_action): Likewise.  All uses changed.
15254         (die): Don't calculate message unless segv_action returns.
15255         (get_stack_location, min_address_from_argv, max_address_from_argv,
15256         volatile stack_base, volatile_stack_size): Remove.
15257         (segv_handler): If ! HAVE_XSI_STACK_OVERFLOW_HEURISTIC, assume
15258         that every segmentation violation is a stack overflow.  (Ouch!)
15259         See Debian bug 136249 (still outstanding) for more info about why
15260         HAVE_XSI_STACK_OVERFLOW_HEURISTIC fails on Linux kernels.
15261
15262 2004-01-24  Paul Eggert  <eggert@twinsun.com>
15263
15264         Exit-status fix from coreutils.
15265
15266         Use exit_failure consistently in place of EXIT_FAILURE,
15267         so that program exit statuses are consistent on failure.
15268
15269         * lib/argmatch.c (ARGMATCH_DIE) [! defined ARGMATCH_DIE]:
15270         Include "exitfail.h", and use exit_failure rather than EXIT_FAILURE.
15271         * lib/argmatch.h: Comment fix to match the above.
15272         * lib/obstack.c (obstack_exit_failure) [!defined _LIBC]:
15273         Now a macro referring to exit_failure, instead of a separate
15274         variable.  Include "exitfail.h" to get it.
15275         * lib/xstrtol.h: Include "exitfail.h".
15276         (STRTOL_FATAL_ERROR): Exit with status exit_failure, not 2.
15277
15278         * lib/long-options.c (parse_long_options): Use prototype
15279         for usage function arg.  Pass it EXIT_SUCCESS rather than 0,
15280         for clarity.
15281
15282 2004-01-21  Jim Meyering  <jim@meyering.net>
15283
15284         * lib/mktime.c (__mktime_internal) [!_LIBC]: Define to mktime_internal
15285         so as not to conflict with a different-sized __mktime_internal
15286         function in GNU libc.
15287         * lib/timegm.c (__mktime_internal) [!_LIBC]: Likewise.
15288         Problem building statically-linked `ls' reported by Michael Brunnbauer.
15289
15290 2004-01-20  Karl Berry  <karl@gnu.org>
15291
15292         * config/config.guess: update from config.
15293
15294         * config/srclistvars.sh: GNUWWWLICENSES for karl.
15295
15296 2004-01-20  Bruno Haible  <bruno@clisp.org>
15297
15298         Safer stack allocation.
15299         * lib/setenv.c: Include allocsa.h.
15300         (alloca): Remove fallback definition.
15301         (freea): Remove macro.
15302         (__add_to_environ) [!_LIBC]: Use allocsa instead of alloca. Use freesa
15303         instead of freea.
15304
15305 2004-01-20  Bruno Haible  <bruno@clisp.org>
15306
15307         * m4/eealloc.m4: New file, from GNU gettext.
15308
15309 2004-01-20  Bruno Haible  <bruno@clisp.org>
15310
15311         * m4/allocsa.m4: New file, from GNU gettext.
15312
15313 2004-01-20  Bruno Haible  <bruno@clisp.org>
15314
15315         * lib/xallocsa.h: New file, from GNU gettext.
15316         * lib/xallocsa.c: New file, from GNU gettext.
15317
15318 2004-01-20  Bruno Haible  <bruno@clisp.org>
15319
15320         * lib/wait-process.c: On Windows, include windows.h. Needed on mingw.
15321
15322 2004-01-20  Bruno Haible  <bruno@clisp.org>
15323
15324         * lib/wait-process.c (wait_subprocess): Add ignore_sigpipe argument.
15325         * lib/wait-process.c (wait_subprocess): Likewise. Handle SIGPIPE
15326         specially.
15327
15328 2004-01-20  Bruno Haible  <bruno@clisp.org>
15329
15330         * lib/wait-process.c (wait_process): Disable the 2003-10-31 waitid()
15331         patch.
15332
15333 2004-01-20  Bruno Haible  <bruno@clisp.org>
15334
15335         * lib/wait-process.c (cleanup_slaves): Use ANSI C declaration.
15336
15337 2004-01-20  Bruno Haible  <bruno@clisp.org>
15338
15339         * lib/eealloc.h: New file.
15340
15341 2004-01-20  Bruno Haible  <bruno@clisp.org>
15342
15343         * lib/binary-io.h: Avoid warnings on Cygwin.
15344
15345 2004-01-20  Bruno Haible  <bruno@clisp.org>
15346
15347         * lib/allocsa.h: New file, from GNU gettext.
15348         * lib/allocsa.c: New file, from GNU gettext.
15349
15350 2004-01-18  Karl Berry  <karl@gnu.org>
15351
15352         * doc/gpl.texi, doc/lgpl.texi: new files.
15353
15354 2004-01-18  Karl Berry  <karl@gnu.org>
15355
15356         * config/srclistvars.sh (GNUWWWLICENSES): new variable.
15357         * config/srclist.txt ({fdl,gpl,lgpl}.text): get from there.
15358
15359 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15360
15361         Merge from coreutils.
15362
15363         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for uintptr_t.
15364         * m4/posixver.m4 (gl_POSIXVER): Require gl_DEFAULT_POSIX2_VERSION.
15365         (gl_DEFAULT_POSIX2_VERSION): Move
15366         the documentation from 'configure' into 'config.hin',
15367         so that 'configure --help' isn't burdened by it and
15368         we don't have to worry about its formatting there.
15369         Reword the documentation so that it's more succinct
15370         and can be run together into a single paragraph.
15371         * m4/same.m4 (gl_SAME): Check for pathconf.
15372
15373 2004-01-15  Paul Eggert  <eggert@twinsun.com>
15374
15375         Merge from coreutils.
15376
15377         * lib/posixver.c: Include posixver.h.
15378
15379         * lib/same.c: Include <stdbool.h>, <limits.h>.
15380         (_POSIX_NAME_MAX): Define if not defined.
15381         (MIN): New macro.
15382         (same_name): If file names are silently truncated, report
15383         that the file names are the same if they are the same after
15384         the silent truncation.
15385
15386         * lib/xstrtod.h (xstrtod): Accept an extra arg, specifying the
15387         conversion function.
15388         * lib/xstrtod.c (xstrtod): Likewise.  All callers changed to
15389         include c-strtod.h and use c_strtod.  Don't include stdlib.h; no
15390         longer needed.
15391
15392 2004-01-15  Jim Meyering  <jim@meyering.net>
15393
15394         Merge from coreutils.
15395
15396         * m4/clock_time.m4 (gl_CLOCK_TIME): Don't set LIB_CLOCK_GETTIME
15397         if no library is required.
15398         * m4/jm-macros.m4: Don't require UTILS_SYS_OPEN_MAX.
15399         * m4/jm-macros.m4 (jm_MACROS): Require gl_FUNC_FREE.
15400         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.58.
15401         (AC_LANG_SOURCE): Remove definition, now that we require autoconf-2.58.
15402         * m4/jm-macros.m4 (jm_MACROS): Don't require AC_FUNC_FTW.
15403         * m4/lib-check.m4 (jm_LIB_CHECK): Do not set LIB_CRYPT to the
15404         value, $ac_cv_search_crypt, if it's "none required".
15405         * m4/posixver.m4 (gl_DEFAULT_POSIX2_VERSION): New macro.
15406         * m4/prereq.m4 (jm_PREREQ): Require AC_FUNC_GETLOADAVG,
15407         not gl_FUNC_GETLOADAVG.
15408         * m4/prereq.m4 (jm_PREREQ): Require gl_READTOKENS, gl_MD5, gl_MAKEPATH,
15409         gl_LONG_OPTIONS, and gl_IDCACHE, gl_GETUGROUPS.
15410
15411 2004-01-15  Jim Meyering  <jim@meyering.net>
15412
15413         Merge from coreutils.
15414
15415         * lib/md5.h (rol) [__GNUC__ && __i386__]: Don't use `asm' code.  These
15416         days, gcc-3.x does better all by itself.  Patch from Dean Gaudet:
15417         http://mail.gnu.org/archive/html/bug-coreutils/2003-11/msg00144.html
15418
15419         * lib/posixver.c (DEFAULT_POSIX2_VERSION): Use definition of new,
15420         optional configure-time default.
15421
15422         * lib/version-etc.c (version_etc_copyright): Update copyright date.
15423
15424         * lib/xreadlink.c (xreadlink): Correct outdated comment.
15425
15426 2004-01-15  Alexandre Duret-Lutz  <adl@gnu.org>
15427
15428         Merge from coreutils.
15429
15430         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Do not set LIB_NANOSLEEP to the
15431         value, $ac_cv_search_nanosleep, if it's "none required".
15432
15433 2004-01-14  Paul Eggert  <eggert@twinsun.com>
15434
15435         * lib/fnmatch_loop.c (ALLOCA_LIMIT): Remove macro, which collided
15436         with like-named macro in fnmatch.c.
15437         (EXT): Use an internal constant instead.
15438
15439         Merge fnmatch patches from glibc.
15440         * lib/fnmatch.c (mbsinit): Remove define.
15441         Add libc_hidden_ver (__fnmatch, fnmatch).
15442         * lib/fnmatch_loop.c (FCT): Cast to int32_t and UCHAR when appropriate.
15443         Adjust to renaming of collseq_table_lookup to __collseq_table_lookup.
15444
15445 2004-01-14  Karl Berry  <karl@gnu.org>
15446
15447         * config/install-sh: update from automake.
15448
15449 2004-01-13  Karl Berry  <karl@gnu.org>
15450
15451         * config/install-sh: update from automake.
15452
15453 2004-01-09  Karl Berry  <karl@gnu.org>
15454
15455         * config/install-sh: update from automake.
15456
15457 2004-01-05  Karl Berry  <karl@gnu.org>
15458
15459         * config/config.{sub,guess}: update from config.
15460
15461 2003-12-31  Karl Berry  <karl@gnu.org>
15462
15463         * config/depcomp: update from automake.
15464
15465 2003-12-14  Karl Berry  <karl@gnu.org>
15466
15467         * lib/config.charset: update from gettext-runtime.
15468
15469 2003-12-03  Paul Eggert  <eggert@twinsun.com>
15470
15471         * lib/getgroups.c (getgroups): xmalloc takes one argument, not two.
15472         Bug reported by Alfred M. Szmidt.
15473
15474 2003-12-03  Bruno Haible  <bruno@clisp.org>
15475
15476         * m4/gettext.m4: Upgrade from gettext-0.13.
15477         * m4/po.m4: Upgrade from gettext-0.13.
15478         * m4/size_max.m4 (gl_SIZE_MAX): Don't use the _ONCE macros here.
15479         * m4/intmax.m4: New file, from gettext-0.13.
15480         * m4/printf-posix.m4: New file, from gettext-0.13.
15481
15482 2003-11-29  Karl Berry  <karl@gnu.org>
15483
15484         * lib/argp-{help.c,parse.c,namefrob.h}, argp.h: update from libc.
15485
15486 2003-11-25  Paul Eggert  <eggert@twinsun.com>
15487             Bruno Haible  <bruno@clisp.org>
15488
15489         * lib/printf-parse.h: Don't include sys/types.h.
15490         (ARG_NONE): New macro.
15491         (char_directive): Change type of *arg_index fields to size_t.
15492         * lib/printf-parse.c: Don't include sys/types.h.
15493         (SSIZE_MAX): Remove macro.
15494         (PRINTF_PARSE): Change the type of the arg_index variables to size_t.
15495         Remove unnecessary overflow check.
15496         * lib/vasnprintf.c (VASNPRINTF): Update for type change of *arg_index
15497         fields.
15498
15499 2003-11-25  Bruno Haible  <bruno@clisp.org>
15500
15501         * modules/vasnprintf (Files): Remove m4/ssize_t.m4.
15502
15503 2003-11-25  Bruno Haible  <bruno@clisp.org>
15504
15505         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Don't require
15506         gt_TYPE_SSIZE_T.
15507
15508 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15509
15510         * modules/alloca: Remove dependency on xalloc.
15511
15512 2003-11-24  Paul Eggert  <eggert@twinsun.com>
15513
15514         * lib/alloca.c: Remove dependency on xalloc module.
15515         (xalloc_die): Remove.
15516         (memory_full) [!defined emacs]: New macro.
15517         [!defined emacs]: Don't include xalloc.h.
15518         (alloca): Invoke memory_full, not xalloc_die, if malloc fails or
15519         address arithmetic overflows.  Change datatypes a bit to avoid
15520         unnecessary casts.
15521
15522 2003-11-22  Jim Meyering  <jim@meyering.net>
15523
15524         * lib/xmalloc.c (x2nrealloc_inline): Fix typos in comments:
15525         s/size/size_t/.
15526
15527 2003-11-21  Karl Berry  <karl@gnu.org>
15528
15529         * config/config.{sub,guess}: update from config.
15530
15531 2003-11-18  Karl Berry  <karl@gnu.org>
15532
15533         * config/config.{sub,guess}: update from config.
15534
15535         * config/(printf-{parse,args}.[ch]): sync broken, sigh.
15536
15537 2003-11-17  Paul Eggert  <eggert@twinsun.com>
15538
15539         * README: Mention that S+T cannot overflow if S is the size of
15540         an existing object and T is sufficiently small.
15541
15542 2003-11-17  Jim Meyering  <jim@meyering.net>
15543
15544         On systems without utime and without a utimes function capable of
15545         dealing with a NULL struct utimbuf* argument, this utime replacement
15546         could -- in unusual circumstances -- leak a file descriptor.
15547         * lib/utime.c: Include <unistd.h> and <errno.h>.
15548         (utime_null): Be sure to close `fd' and to preserve errno.
15549         Reported by Geoff Collyer via Arnold Robbins.
15550
15551 2003-11-17  Bruno Haible  <bruno@clisp.org>
15552
15553         * modules/vasnprintf (Files): Add m4/ssize_t.m4.
15554         (Depends-on): Add xsize.
15555
15556 2003-11-17  Bruno Haible  <bruno@clisp.org>
15557
15558         * m4/vasnprintf.m4 (gl_PREREQ_PRINTF_PARSE): Require gt_TYPE_SSIZE_T.
15559
15560 2003-11-17  Bruno Haible  <bruno@clisp.org>
15561
15562         * lib/vasnprintf.c (alloca): Remove fallback definition.
15563         (freea): Remove definition.
15564         (VASNPRINTF): Use alloca only for small sizes, say <= 4000 bytes.
15565         Reported by Paul Eggert.
15566
15567 2003-11-16  Paul Eggert  <eggert@twinsun.com>
15568             Bruno Haible  <bruno@clisp.org>
15569
15570         Protect against address arithmetic overflow.
15571         * lib/printf-args.h: Include stddef.h.
15572         (arguments): Change type of field 'count' to size_t.
15573         * lib/printf-args.c (printf_fetchargs): Use size_t instead of
15574         'unsigned int' where appropriate.
15575         * lib/printf-parse.h: Include sys/types.h.
15576         (char_directive): Change type of *arg_index fields to ssize_t.
15577         (char_directives): Change type of fields 'count', max_*_length to
15578         size_t.
15579         * lib/printf-parse.c: Include sys/types.h and xsize.h.
15580         (SSIZE_MAX): Define fallback value.
15581         (PRINTF_PARSE): Use size_t instead of 'unsigned int' and ssize_t
15582         instead of 'int' where appropriate. Check a_allocated, d_allocated
15583         against overflow. Reject %m$ argument numbers > SSIZE_MAX + 1.
15584         * lib/vasnprintf.c: Include xsize.h.
15585         (VASNPRINTF): Use size_t instead of 'unsigned int' where appropriate.
15586         Check alloca, malloc, realloc, ENSURE_ALLOCATION arguments against
15587         overflow. Avoid wraparound when converting a width or precision from
15588         decimal to binary.
15589
15590 2003-11-16  Bruno Haible  <bruno@clisp.org>
15591
15592         Update from GNU gettext.
15593         * lib/printf-parse.c: Generalize to it can be compiled for wide
15594         strings.
15595         (PRINTF_PARSE, CHAR_T, DIRECTIVE, DIRECTIVES): New macros.
15596         * lib/vasnprintf.c: Generalize to it can be compiled for wide strings.
15597         (VASNPRINTF, CHAR_T, DIRECTIVE, DIRECTIVES, PRINTF_PARSE, USE_SNPRINTF,
15598         SNPRINTF): New macros.
15599         Don't include <alloca.h> if the file is used inside libintl.
15600         (local_wcslen): New function, for Solaris 2.5.1.
15601         (VASNPRINTF): Use it instead of wcslen.
15602
15603 2003-11-16  Bruno Haible  <bruno@clisp.org>
15604
15605         * lib/xsize.h (xmax): New function.
15606         (xsum, xsum3, xsum4): Declare as "pure" functions.
15607
15608 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15609
15610         * modules/xalloc (Files): Undo latest change, since xalloc.h
15611         no longer needs SIZE_MAX or PTRDIFF_MAX.
15612
15613 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15614
15615         * m4/xalloc.m4 (gl_PREREQ_XALLOC): Do not require gl_SIZE_MAX or
15616         gl_PTRDIFF_MAX.
15617
15618 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15619
15620         * lib/xstrtol.c (__xstrtol): Remove "break" immediately after
15621         "return", to pacify some unknown compiler.  Problem reported
15622         by Joerg Schilling.
15623
15624 2003-11-12  Paul Eggert  <eggert@twinsun.com>
15625
15626         * lib/xalloc.h: Do not include <limits.h> or <stdint.h>.
15627         (xalloc_oversized): Use sizeof (ptrdiff_t) and sizeof (size_t) for
15628         the heuristic, rather than PTRDIFF_MAX and SIZE_MAX.  This
15629         heuristic is just as accurate as far as we know, and it removes a
15630         dependency on size_max.m4 and ptrdiff_max.m4.
15631
15632 2003-11-11  Bruno Haible  <bruno@clisp.org>
15633
15634         * modules/xsize (Files): Add m4/size_max.m4.
15635         * modules/xalloc (Files): Add m4/size_max.m4, m4/ptrdiff_max.m4.
15636
15637 2003-11-11  Bruno Haible  <bruno@clisp.org>
15638
15639         * m4/size_max.m4: New file.
15640         * m4/ptrdiff_max.m4: New file.
15641         * m4/xsize,m4 (gl_XSIZE): Require gl_SIZE_MAX.
15642         * m4/xalloc.m4 (gl_PREREQ_XALLOC): New macro.
15643         (gl_XALLOC): Invoke it.
15644
15645 2003-11-11  Bruno Haible  <bruno@clisp.org>
15646
15647         * lib/xsize.h (SIZE_MAX): Remove fallback definition.
15648         * lib/xalloc.h: Include limits.h. Assume SIZE_MAX and PTRDIFF_MAX are
15649         defined.
15650
15651 2003-11-10  Paul Eggert  <eggert@twinsun.com>
15652
15653         * lib/xalloc.h (xalloc_oversized): [! (defined PTRDIFF_MAX &&
15654         PTRDIFF_MAX < SIZE_MAX)]: Fix off-by-one error that would have
15655         rejected some allocations of exactly SIZE_MAX - 2 bytes.
15656         From Bruno Haible.
15657         [defined PTRDIFF_MAX && PTRDIFF_MAX < SIZE_MAX]: Use SIZE_MAX,
15658         not (size_t) -1, since it's defined here.
15659
15660 2003-11-09  Karl Berry  <karl@gnu.org>
15661
15662         * config/mkinstalldirs, depcomp, mdate-sh: update from automake.
15663
15664 2003-11-06  Paul Eggert  <eggert@twinsun.com>
15665
15666         * lib/xalloc.h [HAVE_STDINT_H]: Include <stdint.h>.
15667         (xalloc_oversized) [! (PTRDIFF_MAX < SIZE_MAX)]:
15668         Reject sizes of exactly SIZE_MAX bytes.
15669         * lib/xreadlink.c: Include "xalloc.h" before checking whether SIZE_MAX
15670         is defined, since "xalloc.h" now defines SIZE_MAX on modern hosts.
15671
15672 2003-11-05  Bruno Haible  <bruno@clisp.org>
15673
15674         * lib/xsize.h: Include limits.h, to avoid a possible collision with
15675         SIZE_MAX defined in <limits.h> on Solaris.
15676
15677 2003-11-04  Jim Meyering  <jim@meyering.net>
15678
15679         * modules/sysexits: Use the `$(VAR)' notation for AC_SUBST'd
15680         variable names, rather than @VAR@.
15681         * modules/poll: Likewise.
15682
15683 2003-11-04  Bruno Haible  <bruno@clisp.org>
15684
15685         * modules/xsize: New file.
15686         * modules/linebreak: Depend on xsize.
15687         * MODULES.html.sh (func_all_modules): Add xsize.
15688
15689 2003-11-04  Bruno Haible  <bruno@clisp.org>
15690
15691         * m4/xsize.m4: New file.
15692
15693 2003-11-04  Bruno Haible  <bruno@clisp.org>
15694
15695         * lib/xsize.h: New file.
15696         * lib/linebreak.c: Include xsize.h.
15697         (mbs_possible_linebreaks, mbs_width_linebreaks): Check malloc()
15698         argument for overflow.
15699         Suggested by Paul Eggert.
15700
15701 2003-11-03  Karl Berry  <karl@gnu.org>
15702
15703         * config/config.{guess,sub}: update from config.
15704
15705 2003-11-03  Jim Meyering  <jim@meyering.net>
15706
15707         * modules/userspec (lib_SOURCES): Add userspec.h.
15708         (Include): Add "userspec.h".
15709         Improve description.
15710
15711 2003-11-03  Jim Meyering  <jim@meyering.net>
15712
15713         * lib/userspec.c: Include "userspec.h".
15714         * lib/userspec.h: New file.
15715
15716 2003-11-03  Bruno Haible  <bruno@clisp.org>
15717
15718         * m4/wait-process.m4 (gl_WAIT_PROCESS): Also check for waitid.
15719
15720 2003-11-03  Bruno Haible  <bruno@clisp.org>
15721
15722         * lib/wait-process.c (wait_process): Use waitid with WNOWAIT if
15723         available, to avoid (extremely rare) race condition.
15724         Suggested by Paul Eggert.
15725
15726 2003-11-02  Karl Berry  <karl@gnu.org>
15727
15728         * config/srclist.txt (vasprintf.c): sync broken, sigh.
15729
15730 2003-10-31  Paul Eggert  <eggert@twinsun.com>
15731
15732         * lib/mountlist.h (struct mount_entry.me_type_malloced): New member.
15733         * lib/mountlist.c (SIZE_MAX): Define if not defined already.
15734         (read_filesystem_list): Set and use me_type_malloced.
15735         Use "sizeof *me" rather than "sizeof (struct mount_entry)" (or
15736         whatever the type happens to be), for brevity and consistency.
15737         Check for size calculation overflow on Alphas running OSF/1.
15738
15739 2003-10-31  Jim Meyering  <jim@meyering.net>
15740
15741         * lib/hash.c: Include "xalloc.h" for use of xalloc_oversized.
15742
15743         * lib/linebuffer.c: Include <string.h> for declaration of memset.
15744
15745 2003-10-30  Paul Eggert  <eggert@twinsun.com>
15746             Bruno Haible  <bruno@clisp.org>
15747
15748         * lib/vasprintf.c: Include <limits.h>, <stdlib.h>.
15749         (vasprintf): Fail if the resulting length doesn't fit in an 'int'.
15750
15751 2003-10-30  Paul Eggert  <eggert@cs.ucla.edu>
15752
15753         * m4/host-os.m4 (UTILS_HOST_OS): Change netbsd*-gnu pattern back to
15754         netbsd*-gnu*.  Suggested by Robert Millan.
15755
15756 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15757
15758         * modules/group-member: Depend on stdbool.
15759
15760 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15761
15762         * m4/xalloc.m4 (gl_XALLOC): Undo previous change.
15763
15764 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15765
15766         * m4/host-os.m4 (UTILS_HOST_OS): Resurrect netbsd*-gnu.  Add comments
15767         to it, and to knetbsd*-gnu and kfreebsd*-gnu.  Remove the '*' from
15768         after the 'gnu' in these cases.  This fixes some bugs in the
15769         previous change, and is based on suggestions by Robert Millan.
15770
15771 2003-10-29  Paul Eggert  <eggert@twinsun.com>
15772
15773         * lib/xalloc.h (xalloc_oversized): Now a macro, not a function,
15774         so that it works even if SIZE_MAX < N.  Do not include <stdbool.h>;
15775         no longer needed.
15776         * lib/quotearg.c (quotearg_n_options): Use it.
15777         * lib/group-member.c: Include <stdbool.h>.
15778         (free_group_info): Arg is now const *; don't free arg.
15779         (get_group_info): Now returns bool and accepts struct group_info *,
15780         rather than returning a malloc'ed struct group_info *.
15781         All uses changed.  Check for overflow in internal size calculation.
15782
15783         * lib/getusershell.c (readname): Simplify the code by using x2nrealloc
15784         rather than xmalloc/xrealloc.
15785         * lib/linebuffer.c (initbuffer, readlinebuffer): Simplify the code by
15786         using x2realloc rather than xmalloc/xrealloc.  Also, fix a C
15787         conformance bug: the old code used a pointer after freeing the
15788         storage that it addressed.
15789         * lib/hash.c (hash_initialize): Simplify the code by using
15790         xalloc_oversized rather than doing it by hand.
15791         * lib/getgroups.c (getgroups): Don't use xrealloc, since we don't need
15792         the buffer preserved.  Use free and xmalloc instead.
15793         * lib/quotearg.c (quotearg_n_options): Likewise.
15794         Use a simpler test for size overflow.  Don't use xalloc_oversized
15795         because unsigned int might be wider than size_t (!); this suggests
15796         that we should switch from unsigned int to size_t for slot numbers.
15797
15798 2003-10-28  Paul Eggert  <eggert@twinsun.com>
15799
15800         * m4/host-os.m4 (UTILS_HOST_OS): Identify GNU/KFreeBSD and
15801         GNU/KNetBSD.  These implementations use glibc atop the FreeBSD and
15802         NetBSD kernels.  Requested by Richard Stallman.
15803
15804 2003-10-27  Paul Eggert  <eggert@twinsun.com>
15805
15806         * lib/exclude.c (new_exclude): Use xzalloc rather than xmalloc
15807         to allocate the returned structure.  Do not allocate a subarray,
15808         as x2nrealloc will do that.
15809         (add_exclude): Use x2nrealloc to reallocate ex->exclude,
15810         instead of xnrealloc.
15811         (add_exclude_file): Use x2realloc instead of malloc + xnrealloc.
15812
15813 2003-10-27  Bruno Haible  <bruno@clisp.org>
15814
15815         * lib/stdbool_.h: Better support for BeOS.
15816
15817 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15818
15819         * m4/xalloc.m4 (gl_XALLOC): Requore AC_C_INLINE, since xalloc.h
15820         now uses inline.
15821
15822 2003-10-26  Paul Eggert  <eggert@twinsun.com>
15823
15824         * lib/xalloc.h (xalloc_oversized): New static inline function, for
15825         callers that want to do their own size-overflow checking.  Include
15826         <stdbool.h>, since xalloc_oversized returns bool.
15827         * lib/xalloc.c (array_size_overflow): Remove.  All callers changed
15828         to use xalloc_oversized.
15829
15830         Add two functions x2realloc, x2nrealloc, for programs that grow
15831         arrays dynamically by doubling their sizes.
15832         * lib/xalloc.h (x2realloc, x2nrealloc): New decls.
15833         * lib/xmalloc.c (x2nrealloc_inline, x2nrealloc, x2realloc):
15834         New functions.
15835
15836         Port to C99 semantics for 'inline' of external functions.
15837         Bug reported by Bruno Haible.
15838         * lib/xmalloc.c (xnmalloc_inline): New static inline function,
15839         with the old contents of xnmalloc.
15840         (xnmalloc, xmalloc): Use it.
15841         (xnrealloc_inline): New static inline function,
15842         with the old contents of xnrealloc.
15843         (xnrealloc, xrealloc): Use it.
15844
15845         * lib/alloc.c (alloca): xmalloc cannot return NULL, so don't test for
15846         that.
15847
15848 2003-10-26  Karl Berry  <karl@gnu.org>
15849
15850         * config/srclist.txt (COPYING.DOC): no longer available from
15851         /gd/gnuorg; don't know where the ultimate source is.
15852
15853 2003-10-25  Paul Eggert  <eggert@twinsun.com>
15854
15855         Fix several address-calculation bugs in the hash modules,
15856         plus some minor code cleanup.
15857
15858         * lib/hash.h: Include <stdbool.h>, for bool.
15859         * lib/hash.c: Don't include <stdbool.h>, since hash.h does it now.
15860         * lib/hash.h (Hash_hasher, hash_get_n_buckets, hash_get_n_buckets_used,
15861         hash_get_n_entries, hash_get_max_bucket_length,
15862         hash_get_entries, hash_do_for_each, hash_string, hash_initialize,
15863         hash_rehash): Use size_t rather than unsigned.
15864         * lib/hash.c (struct hash_table, hash_get_n_buckets,
15865         hash_get_n_buckets_used, hash_get_n_entries,
15866         hash_get_max_bucket_length, hash_table_ok, hash_print_statistics,
15867         hash_get_entries, hash_do_for_each, hash_string, is_prime,
15868         next_prime, hash_initialize, hash_rehash, hash_delete, hash_print):
15869         Likewise.
15870         (SIZE_MAX): Define if not defined.
15871         (hash_get_max_bucket_length, hash_table_ok, hash_lookup,
15872         hash_get_first, hash_get_next, hash_get_entries, hash_do_for_each,
15873         hash_print):
15874         Use const * when possible.
15875         (hash_string): Use (unsigned char) *P rather than *(unsigned char *) P.
15876         (check_tuning): Fix bug: if tuning parameters were very close to
15877         0 or 1, rounding errors could have caused subscript violations.
15878         (hash_initialize, allocate_entry, hash_print): Remove unnecessary cast.
15879         (hash_initialize): Add 'fail:' label
15880         to free table and return NULL, and use it to simplify code.
15881         Use calloc rather than clearing the storage ourself.
15882         (hash_initialize, hash_rehash): Check for arithmetic overflow in
15883         buffer size calculations.
15884         * lib/hash-pjw.h (hash_pjw): Use size_t, not unsigned.
15885         Include <stddef.h>, for size_t.
15886         * lib/hash-pjw.c (hash_pjw): Likewise.
15887         Switch to method described by Bruno Haible.
15888         Include <limits.h>, for CHAR_BIT.
15889         (SIZE_BITS): New macro.
15890
15891 2003-10-23  Paul Eggert  <eggert@twinsun.com>
15892
15893         * m4/getline.m4 (AM_FUNC_GETLINE):
15894         Don't include getndelim2.o twice into LIBOBJS; this breaks on some
15895         hosts.  Problem reported by Derek Robert Price in
15896         <http://mail.gnu.org/archive/html/bug-gnulib/2003-10/msg00092.html>.
15897         This patch can be withdrawn after Autoconf 2.58 is required for gnulib.
15898         * m4/getndelim2.m4 (gl_GETNDELIM2): Likewise.
15899
15900 2003-10-21  Paul Eggert  <eggert@twinsun.com>
15901
15902         * lib/getndelim2.c (getndelim2): When size calculation overflows,
15903         ceiling the allocation at NMAX bytes rather than silently
15904         discarding input bytes before NMAX is reached.  This makes
15905         a difference only if NMAX exceeds SIZE_MAX / 2.
15906
15907         * lib/obstack.c: Merge from glibc.
15908         [defined _LIBC]: Include <obstack.h>, not "obstack.h".
15909         Add libc_hidden_def (_obstack_newchunk).
15910         (_obstack_free) [! defined _LIBC]: Remove.
15911         [defined _LIBC]: Make a strong alias from obstack_free, rather than
15912         a clone of the function body.
15913         (fputs) [defined _LIBC && defined USE_IN_LIBIO]: Remove.
15914         [defined _LIBC && !defined USE_IN_LIBIO]: Include <libio/iolibio.h>.
15915
15916         * lib/obstack.h: Indenting cleanup, to make it easier to merge with
15917         glibc.
15918         (obstack_grow, obstack_grow0): Remove unnecessary parentheses around
15919         arg to memcpy.
15920
15921         * lib/obstack.h (obstack_1grow_fast): Properly parenthesize arg.
15922         (obstack_ptr_grow_fast, obstack_int_grow_fast):
15923         Don't use lvalue casts, as GCC plans to remove support for them
15924         in GCC 3.5.  Reported by Joseph S. Myers.  This bug
15925         was also present in the non-GCC version, indicating that this
15926         code had always been buggy and had never been widely used.
15927         (obstack_1grow, obstack_ptr_grow, obstack_int_grow, obstack_blank):
15928         Use the fast variant of each macro, rather than copying the
15929         definiens of the fast variant; that way, we'll be more likely to
15930         catch future bugs in the fast variants.
15931
15932 2003-10-20  Bruno Haible  <bruno@clisp.org>
15933
15934         * modules/wait-process: New file.
15935         * MODULES.html.sh (func_all_modules): Add wait-process.
15936
15937 2003-10-20  Bruno Haible  <bruno@clisp.org>
15938
15939         * m4/wait-process.m4: New file.
15940
15941 2003-10-20  Bruno Haible  <bruno@clisp.org>
15942
15943         * lib/wait-process.h: New file, from GNU gettext.
15944         * lib/wait-process.c: New file, from GNU gettext.
15945
15946 2003-10-19  Jim Meyering  <jim@meyering.net>
15947
15948         * lib/vasnprintf.c (vasnprintf): Work around losing snprintf on
15949         HPUX 10.20.
15950
15951 2003-10-18  Karl Berry  <karl@gnu.org>
15952
15953         * config/config.guess: update from config.
15954
15955 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15956
15957         * lib/getgroups.c: Include <errno.h>, <stdlib.h>.
15958         (getgroups): First arg is int, not size_t.
15959         Don't let 'free' mangle errno.
15960
15961 2003-10-16  Paul Eggert  <eggert@twinsun.com>
15962
15963         * README: Mention that gnulib assumes that (foo *) NULL + 0 == NULL.
15964
15965 2003-10-16  Karl Berry  <karl@gnu.org>
15966
15967         * config/config.{guess,sub}: update from config.
15968
15969 2003-10-16  Jim Meyering  <jim@meyering.net>
15970
15971         * lib/xmalloc.c: Include <string.h>, for declarations of memset and
15972         memcpy.
15973
15974 2003-10-15  Paul Eggert  <eggert@twinsun.com>
15975
15976         * lib/exclude.c: Do not include <inttypes.h> or <stdint.h>.
15977         (SIZE_MAX): Remove.
15978         (new_exclude, add_exclude_file): Initial size no longer needs to
15979         be a power of 2.
15980         (add_exclude, add_exclude_file): Use xnrealloc instead of rolling
15981         our own address arithmetic overflow checking.
15982
15983         * lib/fnmatch.c (SIZE_MAX): Define if standard headers don't.
15984         (fnmatch): Do not alloca more than 2000 wide characters;
15985         instead, use malloc for large buffers.
15986         Check for address arithmetic overflow, and return -1
15987         with errno set to ENOMEM in that case.
15988         * lib/fnmatch_loop.c (ALLOCA_LIMIT): New macro.
15989         (NEW_PATTERN): Do not alloca more than 8000 bytes;
15990         instead, return -1.  Check for address arithmetic overflow.
15991
15992 2003-10-14  Paul Eggert  <eggert@twinsun.com>
15993
15994         Handle invalid suffixes and overflow independently, so that
15995         callers can treat them independently as needed.  Fix some bugs in
15996         suffix handling, e.g., "100k@" was not diagnosed as an invalid
15997         suffix for a human-readable blocksize.  The major caller-visible
15998         change is the addition of a new
15999         LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW enum value, indicating
16000         that both overflow and suffix chars were found.
16001
16002         * lib/human.c (humblock): Don't check separately for invalid suffix
16003         char; that is xstrtoumax's job (now that its bug is fixed).
16004         * lib/xstrtoimax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM) [defined
16005         INTMAX_MAX]: New macros.
16006         * lib/xstrtol.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM, TYPE_MINIMUM,
16007         TYPE_MAXIMUM): New macros.
16008         (bkm_scale, bkm_scale_by_power): Return strtol_error, not int.
16009         (bkm_scale, bkm_scale_by_power, __xstrtol): Return maximal values
16010         if overflow occurs, as it's what __strtol does and it's more useful
16011         in practice.
16012         (__xstrtol): If __strtol reports some error other than ERANGE,
16013         reflect it to the caller as LONGINT_INVALID.  If it reports
16014         ERANGE, continue the rest of parsing, and report LONGINT_OVERFLOW
16015         | LONGINT_INVALID_SUFFIX_CHAR if both errors occur.
16016         * lib/xstrtol.h (LONGINT_INVALID_SUFFIX_CHAR_WITH_OVERFLOW): New enum
16017         value.
16018         (_STRTOL_ERROR): Handle it.  Abort when given unknown error codes.
16019         * lib/xstrtoul.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM): New macros.
16020         * lib/xstrtoumax.c (STRTOL_T_MINIMUM, STRTOL_T_MAXIMUM)
16021         [defined UINTMAX_MAX]: New macros.
16022
16023 2003-10-14  Bruno Haible  <bruno@clisp.org>
16024
16025         * modules/fatal-signal: Add m4/sig_atomic_t.m4 to file list.
16026
16027 2003-10-14  Bruno Haible  <bruno@clisp.org>
16028
16029         * m4/sig_atomic_t: New file, from GNU gettext.
16030         * m4/fatal-signal.m4 (gl_FATAL_SIGNAL): Require gt_TYPE_SIG_ATOMIC_T.
16031
16032 2003-10-14  Bruno Haible  <bruno@clisp.org>
16033
16034         * lib/fatal-signal.h: Improved comments. Suggested by Paul Eggert.
16035         * lib/fatal-signal.c: Use sig_atomic_t. Suggested by Paul Eggert.
16036         Also use volatile where needed.
16037
16038 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16039
16040         * modules/xalloc: Do not depend on 'exit'.  Depend on 'stdbool'.
16041         Change maintainer from Bruno Haible to 'all'.
16042
16043 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16044
16045         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Require AC_C_INLINE.
16046
16047 2003-10-12  Paul Eggert  <eggert@twinsun.com>
16048
16049         * lib/xalloc.h (xnmalloc, xzalloc, xnrealloc, xclone): New decls.
16050         (XMALLOC, XCALLOC, XREALLOC, XFREE, CCLONE, CLONE): Deprecate,
16051         and define in terms of the other primitives.
16052         * lib/xmalloc.c: Include stdbool.h; do not include exit.h.
16053         (SIZE_MAX): Define if not already defined.
16054         (array_size_overflow): New function.
16055         (xalloc_die): Abort instead of exiting if 'error' returns.
16056         (xnmalloc, xnrealloc, xzalloc, xclone): New functions.
16057         (xmalloc, xrealloc): Use them.
16058         (xcalloc): Check for address arithmetic overflow.
16059         * lib/xstrdup.c (xstrdup): Use xclone, since memcpy should be
16060         a bit faster than strcpy.
16061
16062 2003-10-10  Simon Josefsson  <jas@extundo.com>
16063
16064         * modules/argp (Depends-on): Add restrict and strcase.
16065
16066 2003-10-10  Simon Josefsson  <jas@extundo.com>
16067
16068         * m4/argp.m4: Add AC_C_INLINE.
16069
16070 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16071
16072         Merge getpass from libc, plus a few fixes.
16073
16074         * lib/getpass.c (HAVE_STDIO_EXT) [_LIBC]: Define to 1.
16075         Include <stdbool.h>.
16076         Include <stdio_ext.h> if HAVE_STDIO_H, otherwise define
16077         __fsetlocking to empty.
16078         [_LIBC]: Do not include "getline.h" or "unlocked-io.h", but
16079         do include <bits/libc-lock.h>.
16080         Do not include <fcntl.h>; not needed.
16081         [_LIBC]: Include <wchar.h>.
16082         (NOTCANCEL_MODE): New macro.
16083         (flockfile, funlockfile) [_LIBC]: New macros.
16084         (__libc_cleanup_push, __libc_cleanup_pop, __getline, __tcgetattr)
16085         [!_LIBC]: New macros.
16086         (call_fclose): New function.
16087         (getpass): Use it.  Save tty stream separately; this simplifies the
16088         code and makes it more reliable if stdin happens to equal stdout.
16089         Invoke __fsetlocking on tty.
16090         Handle thread cancellation if needed.
16091         Namespace cleanup (use __tcgetattr, __getline).
16092         Use bool for Booleans.
16093         [USE_IN_LIBIO]: Handle wide streams.
16094         [!_LIBC]: Unconditionally do the fseek, since we don't know what
16095         stream might go where.
16096
16097         * lib/unlocked-io.h: Include <stdio.h>, so that the caller
16098         doesn't have to include <stdio.h> before us.
16099         (clearerr_unlocked, feof_unlocked, ferror_unlocked,
16100         fflush_unlocked, fgets_unlocked, fputc_unlocked, fputs_unlocked,
16101         fread_unlocked, fwrite_unlocked, getc_unlocked, getchar_unlocked,
16102         putc_unlocked, putchar_unlocked): Define to the unlocked counterpart
16103         if not declared, so that we can use getpass.c code from libc without
16104         rewriting it.
16105         (flockfile, ftrylockfile, funlockfile): New macros.
16106
16107 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16108
16109         * modules/getpass: Depend on stdbool.
16110
16111 2003-10-08  Paul Eggert  <eggert@twinsun.com>
16112
16113         * m4/getpass.m4 (gl_PREREQ_GETPASS): Check for stdio_ext.h.
16114
16115 2003-10-07  Karl Berry  <karl@gnu.org>
16116
16117         * config/config.{guess,sub}: update from config.
16118
16119 2003-10-06  Jim Meyering  <jim@meyering.net>
16120             Bruno Haible  <bruno@clisp.org>
16121
16122         This lets translators provide better translations for the
16123         "Written by ..." part of --version output.
16124         * lib/version-etc.h: Include stdarg.h.
16125         (version_etc_copyright): Declare as readonly.
16126         (version_etc): Make this function variadic with a NULL-terminated list
16127         of author name strings.
16128         (version_etc_va): New declaration.
16129         * lib/version-etc.c: Include stdarg.h, stdlib.h.
16130         (version_etc_copyright): Declare as readonly.
16131         (version_etc_va): New function. Provide a different translatable string
16132         for each possible number of authors < 10. Abbreviate when there are 10
16133         authors or more.
16134         (version_etc): Make this function variadic. Call version_etc_va.
16135         Suggestion from Gary V. Vaughan.
16136
16137         * lib/long-options.h (parse_long_options): Change prototype: the
16138         authors string is moved to the end and becomes variadic.
16139         * lib/long-options.c: Include stdarg.h.
16140         (parse_long_options): Make this function variadic, too.
16141         Call version_etc_va, not version_etc.
16142
16143 2003-10-06  Bruno Haible  <bruno@clisp.org>
16144
16145         * modules/version-etc-2: Remove file.
16146         * MODULES.html.sh (func_all_modules): Remove version-etc-2.
16147
16148 2003-10-06  Bruno Haible  <bruno@clisp.org>
16149
16150         * modules/fatal-signal: New file.
16151         * MODULES.html.sh (func_all_modules): Add fatal-signal.
16152
16153 2003-10-06  Bruno Haible  <bruno@clisp.org>
16154
16155         * m4/fatal-signal.m4: New file.
16156         * m4/signalblocking.m4: New file, from GNU gettext.
16157
16158 2003-10-06  Bruno Haible  <bruno@clisp.org>
16159
16160         * lib/version-etc-2.h: Remove file.
16161         * lib/version-etc-2.c: Remove file.
16162
16163 2003-10-06  Bruno Haible  <bruno@clisp.org>
16164
16165         * lib/fatal-signal.h: New file, from GNU gettext.
16166         * lib/fatal-signal.c: New file, from GNU gettext.
16167
16168 2003-10-05  Paul Eggert  <eggert@twinsun.com>
16169
16170         * README: Rework advice for preventing empty .o files.
16171         Don't recommend ELIDE constructs.  Recommend <stddef.h>,
16172         not <sys/types.h>.
16173
16174 2003-10-04  Karl Berry  <karl@gnu.org>
16175
16176         * lib/argp*: update from libc.
16177
16178 2003-10-04  Karl Berry  <karl@gnu.org>
16179
16180         * config/config.{guess,sub}: update from config.
16181
16182 2003-10-02  Bruno Haible  <bruno@clisp.org>
16183
16184         * modules/lchown (Include): Add lchown.h.
16185         * modules/time_r (Include): Use "..." syntax.
16186         * modules/xgetdomainname (Include): Add xgetdomainname.h.
16187
16188 2003-10-01  Simon Josefsson  <jas@extundo.com>
16189
16190         * MODULES.html.sh (func_all_modules): Move gethostname from section
16191         'based on' to section 'lacking' POSIX:2001.
16192
16193 2003-10-01  Larry Jones  <lawrence.jones@eds.com>
16194
16195         * lib/getpass.c (getpass): Use a no-op fseek when switching from input
16196         to output mode on the same stream.
16197
16198 2003-09-29  Paul Eggert  <eggert@twinsun.com>
16199
16200         * lib/strftime.c (tm_diff) [! HAVE_TM_GMTOFF]:
16201         Fix arg typo in previous patch.
16202
16203 2003-09-28  Jim Meyering  <jim@meyering.net>
16204
16205         * lib/error.c: Correct cpp indentation.
16206
16207 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16208
16209         * modules/free: New file.
16210
16211 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16212
16213         * m4/free.m4: New file.
16214
16215 2003-09-27  Paul Eggert  <eggert@twinsun.com>
16216
16217         * lib/minmax.h (MIN, MAX)
16218         [__STDC__ && defined __GNUC__ && __GNUC__ >= 2]:
16219         Omit the special code that used __typeof__, since we worry that
16220         it could be more trouble than it's worth.  See:
16221         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00090.html
16222         http://mail.gnu.org/archive/html/bug-gnulib/2003-01/msg00095.html
16223
16224         * lib/free.c: New file.
16225
16226 2003-09-27  Oskar Liljeblad  <oskar@osk.mine.nu>
16227
16228         Trivial fixes to Makefile.am parts of module listings.
16229         * modules/strstr: Append strstr.h to lib_SOURCES.
16230         * modules/strcase: Likewise, for strcase.h.
16231
16232 2003-09-27  Karl Berry  <karl@gnu.org>
16233
16234         * config/mkinstalldirs: update from automake.
16235
16236 2003-09-26  Paul Eggert  <eggert@twinsun.com>
16237
16238         * lib/error.c (SIZE_MAX) [!defined SIZE_MAX]: Define.
16239         (error_tail): Do not loop, reallocating temporary buffer, since
16240         the output cannot contain more wide characters than the input
16241         contains bytes, the size must be big enough already.  This avoids
16242         one potential size overflow calculation.  Check for size overflow
16243         when calculating temporary buffer size.  Free temporary buffer
16244         when done, if it was allocated with malloc; this plugs a memory
16245         leak.  Remove casts from void * to pointers, that are no longer
16246         needed now that we're assuming C89 or better.
16247
16248         Merge error changes from glibc.
16249
16250         * lib/error.c, error.h: Update copyright notice header to match glibc.
16251         * lib/error.c [defined _LIBC]: Include <errno.h>, <bits/libc-lock.h>.
16252         (error, error_at_line) [defined _LIBC && defined __libc_ptf_call]:
16253         Disable cancellation while printing error.
16254         * lib/error.h: Prepend __ to parameter names.
16255
16256 2003-09-26  Jim Meyering  <jim@meyering.net>
16257
16258         * lib/error.c (error_tail): Move some declarations
16259         into inner scope where the local variables are used.
16260
16261 2003-09-26  Bruno Haible  <bruno@clisp.org>
16262
16263         * m4/stpncpy.m4 (gl_FUNC_STPNCPY): Add comments about the AIX
16264         stpncpy().
16265         Don't define stpncpy through config.h; it's now done through stpncpy.h.
16266
16267 2003-09-26  Bruno Haible  <bruno@clisp.org>
16268
16269         * lib/stpncpy.h (gnu_stpncpy): New declaration.
16270         (stpncpy): Define as alias for gnu_stpncpy.
16271         * lib/stpncpy.c [!_LIBC]: Define gnu_stpncpy, not stpncpy.
16272
16273 2003-09-25  Simon Josefsson  <jas@extundo.com>
16274
16275         * lib/xgetdomainname.h: New file.
16276         * lib/xgetdomainname.c: New file.
16277
16278 2003-09-25  Simon Josefsson  <jas@extundo.com>
16279             Bruno Haible  <bruno@clisp.org>
16280
16281         * modules/getdomainname: New file.
16282         * modules/xgetdomainname: New file.
16283         * MODULES.html.sh (func_all_modules): Add getdomainname,
16284         xgetdomainname.
16285
16286 2003-09-25  Simon Josefsson  <jas@extundo.com>
16287             Bruno Haible  <bruno@clisp.org>
16288
16289         * m4/getdomainname.m4: New file.
16290
16291 2003-09-25  Simon Josefsson  <jas@extundo.com>
16292             Bruno Haible  <bruno@clisp.org>
16293
16294         * lib/getdomainname.h: New file.
16295         * lib/getdomainname.c: New file.
16296
16297 2003-09-25  Karl Berry  <karl@gnu.org>
16298
16299         * lib/argp-fmtstream.c, argp-help.c: update from libc.
16300
16301 2003-09-25  Karl Berry  <karl@gnu.org>
16302
16303         * config/install-sh: update from automake.
16304
16305 2003-09-25  Bruno Haible  <bruno@clisp.org>
16306
16307         * modules/version-etc-2: New file, from modules/version-etc with
16308         modifications.
16309         * MODULES.html.sh (func_all_modules): Add version-etc-2.
16310
16311 2003-09-25  Bruno Haible  <bruno@clisp.org>
16312
16313         * lib/version-etc-2.h: New file, from version-etc.h with modifications.
16314         * lib/version-etc-2.c: New file, from version-etc.c with modifications.
16315
16316 2003-09-24  Simon Josefsson  <jas@extundo.com>
16317
16318         * modules/xgethostname: Add xgethostname.h.
16319
16320 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16321
16322         * lib/linebuffer.c (freebuffer): Don't free the argument, just
16323         the buffer associated with the argument.  Bug reported by
16324         Simon Josefsson.
16325
16326 2003-09-24  Paul Eggert  <eggert@twinsun.com>
16327
16328         * README: Document assumptions that 'int' is at least 32 bits
16329         wide, that integer arithmetic is 2's complement without overflow,
16330         that there are no holes in integer values, that adding sizes of
16331         two nonoverlapping objects can't overflow, and that all-bits-zero
16332         yields scalar zero.  Fix spelling and capitalization typos.
16333
16334 2003-09-19  Karl Berry  <karl@gnu.org>
16335
16336         * lib/argp.h: update from libc.
16337
16338 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16339
16340         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Call AC_BEFORE first,
16341         to avoid spurious warnings like "AC_RUN_IFELSE was called before
16342         gl_USE_SYSTEM_EXTENSIONS" from autoreconf.
16343
16344 2003-09-17  Paul Eggert  <eggert@twinsun.com>
16345
16346         * gnulib-tool: Use "test -h", not "test -L", for portability
16347         to Solaris 8 /bin/sh.  (This bug is fixed in Solaris 9.)
16348         (tags_regexp): Remove, since \| doesn't conform to POSIX.
16349         (sed_extract_prog): Issue s commands one-by-one, rather than
16350         using \| in one s command.
16351
16352 2003-09-16  Paul Eggert  <eggert@twinsun.com>
16353
16354         * lib/linebuffer.c (readlinebuffer): Return NULL immediately upon
16355         input error, instead of returning NULL the next time we are called
16356         (and therefore losing track of errno).
16357
16358 2003-09-16  Bruno Haible  <bruno@clisp.org>
16359
16360         * gnulib-tool (func_create_testdir): Warn about duplicated
16361         dependencies.
16362
16363 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16364
16365         * modules/argmatch, modules/fatal, modules/obstack,
16366         modules/xalloc, modules/xgethostname: Sort dependencies by
16367         importance, not alphabetically.
16368
16369 2003-09-15  Paul Eggert  <eggert@twinsun.com>
16370
16371         * lib/getndelim2.c (getndelim2): Don't trash errno when a read
16372         fails, so that the caller gets the proper errno.
16373
16374         * lib/readutmp.c (read_utmp): Likewise.
16375         Check for fstat error.  Close stream and free storage
16376         when failing.
16377
16378 2003-09-14  Karl Berry  <karl@gnu.org>
16379
16380         * config/srclist.txt (strdup.c): disable for c89 changes.
16381
16382 2003-09-14  Jim Meyering  <jim@meyering.net>
16383
16384         * lib/getloadavg.c: Correct cpp indentation.
16385         * lib/strdup.c: Likewise.
16386         * lib/vasnprintf.c: Likewise.
16387
16388 2003-09-14  Bruno Haible  <bruno@clisp.org>
16389
16390         * modules/fwriteerror: New file.
16391         * MODULES.html.sh (func_all_modules): Add fwriteerror.
16392
16393 2003-09-14  Bruno Haible  <bruno@clisp.org>
16394
16395         * lib/fwriteerror.h: New file.
16396         * lib/fwriteerror.c: New file.
16397
16398 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16399
16400         * modules/argmatch, modules/exitfail, modules/fatal, modules/obstack,
16401         modules/xgethostname, modules/xalloc: Depend on exit.
16402
16403 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16404
16405         * m4/error.m4: Require AC_FUNC_STRERROR_R rather than invoking it.
16406
16407         * m4/extensions.m4 (gl_USE_SYSTEM_EXTENSIONS): Require AC_AIX
16408         and AC_MINIX, too, so that their extensions are available.
16409
16410         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Remove.  All uses removed.
16411         This macro has been superseded by gl_BACKUPFILE.
16412
16413         More patches to assume C89 or better.
16414
16415         * m4/error.m4 (gl_ERROR): Don't check for vprintf.
16416
16417         * m4/check-decl.m4 (jm_CHECK_DECLS): Include <string.h>, <stdlib.h>
16418         unconditionally.
16419         * m4/closeout.m4 (gl_CLOSEOUT): Don't check for stdlib.h.
16420         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER):
16421         Include <string.h>, <stdlib.h> unconditionally.
16422         * m4/lstat.m4 (gl_PREREQ_LSTAT): Don't check for stdlib.h, free.
16423         * m4/readdir.m4 (GL_FUNC_READDIR): Don't check for string.h.
16424         * m4/readutmp.m4 (gl_PREREQ_READUTMP): Don't check for standard C
16425         headers or for string.h.
16426         * m4/strtoumax.m4 (gl_PREREQ_STRTOUMAX): Don't check for stdlib.h
16427         or strtoul.
16428
16429         * m4/mkstemp.m4 (jm_PREREQ_TEMPNAME): Do not require standard C
16430         headers.
16431         * m4/strdup.m4 (gl_PREREQ_STRDUP): Likewise.
16432         * m4/userspec.m4 (gl_USERSPEC): Likewise.
16433         * m4/xalloc.m4 (gl_PREREQ_XMALLOC): Likewise.
16434         * m4/xstrtod.m4 (gl_XSTRTOD): Likewise.
16435         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
16436         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't check for limits.h,
16437         memcpy, memset.
16438         (jm_FUNC_GNU_STRFTIME): Don't require standard C headers.
16439         * m4/strtod.m4 (gl_FUNC_STRTOD): Do not check for float.h.
16440         * m4/strtoimax.m4 (gl_PREREQ_STRTOIMAX): Do not check for stdlib.h,
16441         strtol.
16442         * m4/strtol.m4 (gl_FUNC_STRTOL): Do not check for limits.h.
16443         * m4/userspec.m4 (gl_USERSPEC): Do not check for string.h.
16444         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Do not check for string.h, strtol,
16445         strtoul.
16446
16447 2003-09-12  Paul Eggert  <eggert@twinsun.com>
16448
16449         * lib/argmatch.c, fatal.c, xgethostname.c, xmalloc.c: Include exit.h.
16450         * lib/obstack.c [!defined _LIBC]: Likewise.
16451         * lib/argmatch.c (EXIT_FAILURE): Remove; now done by exit.h
16452         * lib/exitfail.c, fatal.c, xgethostname.c, xmalloc.c: Likewise.
16453         * lib/exitfail.c: Don't include stdlib.h; no longer needed.
16454
16455         More changes to assume C89 or better.
16456
16457         * lib/error.c (error_tail): Assume vprintf.
16458
16459         * lib/argmatch.c (getenv): Remove decl.
16460         * lib/progreloc.c (get_full_program_name): Define via prototype.
16461         * lib/setenv.c (clearenv): Likewise.
16462         * lib/stpncpy.c: Do not include <string.h> or <sys/types.h>; not
16463         needed.
16464         * lib/strdup.c: Include <stdlib.h>, <string.h> unconditionally.
16465         (malloc, memcpy): Remove decls.
16466         * lib/strftime.c (HAVE_LIMITS_H, STDC_HEADERS) [defined _LIBC]: Remove.
16467         (HAVE_MEMCPY) [defined emacs && !defined HAVE_BCOPY]: Remove.
16468         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16469         (memcpy): Remove macro.
16470         (MEMCPY) [!defined COMPILE_WIDE]: Define to memcpy unconditionally.
16471         (__P): Remove.  All uses removed.
16472         (PTR): Remove.  All uses changed to void *.
16473         (CHAR_BIT, NULL): Remove.
16474         (spaces, zeros, memset_space, memset_zero)
16475         [!defined memset && !defined HAVE_MEMSET && !defined _LIBC]:
16476         Remove.
16477         (LOCALE_PARAM, LOCALE_PARAM_DECL): Remove.
16478         (memcpy_lowcase, memcpy_uppcase, tm_diff, iso_week_days):
16479         Define with prototype.
16480         Remove now-unnecessary prototype decl.
16481         (extra_args_spec): Assume ANSI C.  All uses changed.
16482         (extra_args_spec_iso): Remove.
16483         (my_strftime, emacs_strftimeu): Define via prototype.
16484         * lib/strtod.c: Include <float.h>, <stdlib.h>, <string.h>
16485         unconditionally.
16486         (DBL_MAX, DBL_MIN, HUGE_VAL, NULL): Remove decls.
16487         * lib/strtoimax.c: Include <stdlib.h> unconditionally.
16488         (strtoul, strtol): Remove decls.
16489         * lib/strtol.c (STDC_HEADERS, HAVE_LIMITS_H, NULL, ULONG_MAX,
16490         LONG_MAX): Remove.
16491         Include <limits.h>, <stddef.h>, <stdlib.h>, <string.h> unconditionally.
16492         (LOCALE_PARAM_DECL): Remove.  All uses changed to LOCALE_PARAM_PROTO.
16493         (LOCALE_PARAM_PROTO): New macro.
16494         (INTERNAL, INTERNAL1, WEAKNAME): Assume ANSI C, not K&R.
16495         (INTERNAL (strtol), strtol): Define with a prototype.
16496         (PARAMS): Remove.  All uses removed.
16497         * lib/tempname.c: Include <string.h> unconditionally.
16498         * lib/userspec.c: Include <stdlib.h>, <string.h> unconditionally.
16499         * lib/xgethostname.c (main): Define with a prototype.
16500         * lib/xmalloc.c: Include "xalloc.h" first, to check interface.
16501         Include <stdlib.h> unconditionally.
16502         (calloc, malloc, realloc, free): Remove decls.
16503         * lib/xstrtod.c: Include "xstrtod.h" first, to check interface.
16504         Include <stdlib.h> unconditionally.  Sort include file names.
16505         (strtod): Remove.
16506         (xstrtod): Define with a prototype.
16507         * lib/xstrtol.c: Include <stdlib.h>, <string.h> unconditionally.
16508         (strtol, strtoul): Remove decls.
16509
16510 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16511
16512         More patches to assume C89 or better.
16513         * m4/strndup.m4 (gl_PREREQ_STRNDUP): Remove STDC_HEADERS check.
16514         * m4/strnlen.m4 (gl_PREREQ_STRNLEN): Don't check for memory.h,
16515         string.h, memchr, STDC_HEADERS.
16516
16517 2003-09-11  Paul Eggert  <eggert@twinsun.com>
16518
16519         * lib/strndup.c: Don't include <stdio.h>, <sys/types.h>.
16520         Include <stdlib.h>, <string.h> unconditionally.
16521         Remove now-unnecessary cast to char *.
16522         * lib/strnlen.c: Include <string.h> unconditionally.
16523         * lib/yesno.c (yesno): Define with a prototype.
16524
16525 2003-09-11  Bruno Haible  <bruno@clisp.org>
16526
16527         * config/srclist.txt (setenv.c, unsetenv.c): Disable for the moment.
16528
16529 2003-09-10  Jim Meyering  <jim@meyering.net>
16530
16531         * lib/error.c: Correct indentation of cpp directives.
16532
16533 2003-09-10  Bruno Haible  <bruno@clisp.org>
16534
16535         * m4/strcspn.m4 (gl_PREREQ_STRCSPN): Remove <string.h> check.
16536         * m4/strpbrk.m4 (gl_PREREQ_STRPBRK): Remove <string.h> check.
16537         * m4/strstr.m4 (gl_PREREQ_STRSTR): Remove <string.h> check.
16538         * m4/unicodeio.m4 (gl_UNICODEIO): Remove <string.h> check.
16539         * m4/setenv.m4 (gl_PREREQ_SETENV, gl_PREREQ_UNSETENV): Remove
16540         <stdlib.h> and <string.h> checks.
16541         * m4/xreadlink.m4 (gl_XREADLINK): Remove <stdlib.h> check.
16542         * m4/yesno.m4 (gl_YESNO): Remove <stdlib.h> check.
16543
16544 2003-09-10  Bruno Haible  <bruno@clisp.org>
16545
16546         * lib/strcspn.c: Include <string.h> unconditionally.
16547         * lib/strpbrk.c: Include <string.h> unconditionally.
16548         * lib/strstr.c: Include <string.h> unconditionally.
16549         * lib/unicodeio.c: Include <string.h> unconditionally.
16550         * lib/setenv.c: Include <stdlib.h> and <string.h> unconditionally.
16551         * lib/unsetenv.c: Likewise.
16552         * lib/xreadlink.c: Include <stdlib.h> unconditionally.
16553         * lib/yesno.c: Include <stdlib.h> unconditionally.
16554         (rpmatch): Add prototype.
16555
16556 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16557
16558         More patches to assume C89 or better.
16559         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Don't check for stdlib.h.
16560         * m4/getopt.m4 (gl_GETOPT): Don't check for string.h.
16561         * m4/getugroups.m4 (gl_GETUGROUPS): Do not check for standard C headers
16562         or for string.h.
16563         * m4/getusershell.m4 (gl_PREREQ_GETUSERSHELL): Do not check for
16564         stdlib.h.
16565         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): Do not require standard
16566         C headers.
16567         * m4/hard-locale.m4 (gl_HARD_LOCALE): Do not check for stdlib.h,
16568         string.h.
16569         * m4/hash.m4 (gl_HASH): Do not check for stdlib.h, malloc, free.
16570         * m4/human.m4 (gl_HUMAN): Do not check for stdlib.h, string.h, getenv.
16571         * m4/idcache.m4 (gl_IDCACHE): Do not check for standard C headers,
16572         or for string.h.
16573         * m4/long-options.m4 (gl_LONG_OPTIONS): Do not check for stdlib.h.
16574         * m4/makepath.m4 (gl_MAKEPATH): Do not check for string.h or standard
16575         C headers.
16576         * m4/md5.m4 (gl_MD5): Don't check for limits.h, standard C headers,
16577         memcpy.
16578         * m4/sha.m4 (gl_SHA): Don't check for standard Cheaders, memcpy.
16579         * m4/memchr.m4 (jm_PREREQ_MEMCHR): Don't check for limits.h, stdlib.h.
16580         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): Don't check for string.h.
16581         * m4/memcoll.m4 (gl_MEMCOLL): Likewise.
16582         * m4/memrchr.c (gl_PREREQ_MEMRCHR): Don't check for limits.h.
16583         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): Don't check for stdlib.h,
16584         string.h, free.
16585         * m4/mktime.m4 (gl_PREREQ_MKTIME): Don't check for standard C headers.
16586         * m4/modechange.m4 (gl_MODECHANGE): Don't check for standard C headers.
16587         * m4/mountlist.m4 (gl_PREREQ_MOUNTLIST_EXTRA): Don't check for standard
16588         C headers, or for string.h.
16589         * m4/obstack.m4 (gl_OBSTACK): Don't check for stddefe.h, string.h.
16590         (gl_PREREQ_OBSTACK): Don't check for stdlib.h.
16591         * m4/path-concat.m4 (gl_PATH_CONCAT): Don't check for standard C
16592         headers, memory.h, stdlib.h, string.h, strings.h.
16593         * m4/posixtm.m4 (gl_POSIXTM): Don't check for stdlib.h, string.h.
16594         * m4/posixver.m4 (gl_POSIXVER): Don't check for getenv.
16595         * m4/putenv.m4 (gl_PREREQ_PUTENV): Don't check for string.h, memcpy,
16596         strchr.
16597         * m4/readtokens.m4 (gl_READTOKENS): Don't check for standard C
16598         headers, memory.h, string.h.
16599         * m4/regex.m4 (jm_PREREQ_REGEX): Do not check for limits.h, string.h.
16600         * m4/rename.m4 (gl_PREREQ_RENAME): Do not check for stdlib.h, string.h,
16601         free.
16602         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Don't check for standard C
16603         headers.
16604         * m4/same.m4 (gl_SAME): Don't check for stdlib.h, string.h, free.
16605         * m4/save-cwd.m4 (gl_SAVE_CWD): Don't check for standard C headers.
16606         * m4/savedir.m4 (gl_SAVEDIR): Don't check for standard C headers.
16607         * m4/strchrnul.m4 (gl_PREREQ_STRCHRNUL): Don't check for string.h.
16608         * m4/xgetcwd.m4 (gl_XGETCWD): Don't check for stdlib.h.
16609
16610 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16611
16612         More K&R removal.
16613
16614         * lib/acosl.c (main): Use a prototype.
16615         * lib/asinl.c, cosl.c, expl.c, frexpl.c, ldexpl.c, sinl.c,
16616         tanl.c: Likewise.
16617
16618         * lib/getloadavg.c (getloadavg, main): Define via prototypes.
16619
16620         * lib/getopt.h (struct option.name): Assume C89, and use 'const'.
16621         (getopt, etopt_long, getopt_long_only, _getopt_internal)
16622         [defined __GNU_LIBRARY__]: Assume C89, so we can always declare
16623         with a prototype.
16624         * lib/getopt.c (const): Remove macro.
16625         Include <string.h> unconditionally.
16626         (my_index): Remove; all uses changed to strchr.
16627         (strlen): Remove decl.
16628         (exchange): Remove forward decl; no longer needed.
16629         (exchange, _getopt_initialize, _getopt_internal, getopt, main):
16630         Define with prototype.
16631         * lib/getopt1.c (const): Remove macro.
16632         (getopt_long, getopt_long_only, main): Define with prototype.
16633
16634         * lib/getugroups.c: Include <string.h> unconditionally.
16635
16636         * lib/getusershell.c: Include <stdlib.h> unconditionally.
16637         (getusershell, setusershell, endusershell, readname, main):
16638         Define with prototypes.
16639
16640         * lib/group-member.c: Include group-member.h first.
16641         Include <stdlib.h> unconditionally.
16642
16643         * lib/hard-locale.c: Include hard-locale.h first.
16644         Include <stdlib.h>, <string.h> unconditionally.
16645
16646         * lib/hash.c (free, malloc): Remove decls.
16647         Include <stdlib.h> unconditionally.
16648
16649         * lib/human.c: Include <stdlib.h>, <string.h> unconditionally.
16650         (getenv): Do not declare.
16651
16652         * lib/idcache.c: Include <string.h> unconditionally.
16653
16654         * lib/long-options.c: Include long-options.h first, to test interface.
16655         Include <stdlib.h> unconditionally.
16656
16657         * lib/makepath.c: Include makepath.h first, to test interface.
16658         Include <stdlib.h> and <string.h> unconditionally.
16659
16660         * lib/linebuffer.c: Include <stdlib.h>.
16661         (free): Remove decl.
16662
16663         * lib/malloc.c: Include <stdlib.h>, for malloc; don't bother with
16664         stddef.h. rpl_malloc returns void *, not char *.
16665         * lib/realloc.c (rpl_realloc): Likewise.  Also, define with a
16666         prototype.
16667
16668         * lib/md5.h: Include <limits.h> unconditionally.
16669         (UINT_MAX_32_BITS): Don't worry about non-__STDC__ case.
16670         (__P): Remove; all uses removed.
16671         * lib/md5.c: Include "md5.h" first.
16672         (md5_init_ctx, md5_read_ctx, md5_finish_ctx, md5_stream,
16673         md5_buffer, md5_process_bytes, md5_process_block):
16674         Define with prototypes.
16675         * lib/sha.h (__P): Remove all uses.  (It wasn't defined??)
16676         * lib/sha.c: Include "sha.h" first.
16677         Include <stdlib.h>, <string.h> unconditionally.
16678
16679         * lib/memchr.c (__ptr_t): Remove; all uses changed to void *.
16680         * lib/memcmp.c (__ptr_t): Likewise.
16681         * lib/memrchr.c (__ptr_t): Likewise.
16682         * lib/memchr.c, memcmp.c, memcoll.c, memrchr.c:
16683         Include <string.h> unconditionally.
16684         * lib/memchr.c, memrchr.c: Include <limits.h> unconditionally.
16685         * lib/memchr.c: Include <stdlib.h> unconditionally.
16686         * lib/memchr.c (LONG_MAX): Remove.
16687         * lib/memrchr.c (LONG_MAX): Likewise.
16688         * lib/memchr.c (__memchr): Define via a prototype.
16689         * lib/memrchr.c (__memrchr): Likewise.
16690         * lib/memcmp.c (__P): Remove, and remove all uses.
16691         (memcmp_bytes, memcmp_common_alignment, memcmp_not_common_alignment):
16692         Remove forward decls; no longer needed.
16693         * lib/memcpy.c, memmove.c, memset.c: Include <stddef.h>.
16694         Use types required by C89 in prototype.
16695
16696         * lib/mkdir.c: Include <stdlib.h>, <string.h> unconditionally.
16697         * lib/savedir.c: Likewise.
16698         * lib/mkdir.c (free): Remove decl.
16699         * lib/rmdir.c (rmdir): Define with a prototype.
16700         * lib/savedir.c: Include savedir.h first, to test interface.
16701
16702         * lib/mktime.c (STDC_HEADERS): Remove.
16703         Include <stdlib.h>, <string.h> unconditionally.
16704
16705         * lib/modechange.c: Include <stdlib.h> unconditionally.
16706         (malloc): Remove decl.
16707
16708         * lib/mountlist.c: Include <stdlib.h>, <string.h> unconditionally.
16709         (free): Remove decl.
16710
16711         * lib/obstack.h (PTR_INT_TYPE) [!defined __PTRDIFF_TYPE__]:
16712         Define to ptrdiff_t, without bothering to check HAVE_STDDEF_H.
16713         (This type really should be intptr_t, but that's a C99ism.)
16714         (_obstack_memcpy): Remove: all uses changed to memcpy.
16715         Include <string.h> unconditionally.
16716         (struct obstack): Assume __STDC__ for types of members
16717         chunkfun, freefun, extra_arg.
16718         (_obstack_newchunk, _obstack_free, _obstack_begin, _obstack_begin_1,
16719         _obstack_memory_used, obstack_alloc_failed_handler, obstack_init,
16720         obstack_begin, obstack_specify_allocation,
16721         obstack_specify_allocation_with_arg, obstack_chunkfun,
16722         obstack_freefun, obstack_free) [! (defined __STDC__ && __STDC__)]:
16723         Remove unprototyped decls and the macros that use them.
16724         * lib/obstack.c (POINTER): Remove.  All uses changed to void *.
16725         (obstack_alloc_failed_handler, CALL_CHUNKFUN, CALL_FREEFUN,
16726         _obstack_begin, _obstack_begin_1, _obstack_allocated_p)
16727         (defined __STDC__ && __STDC__)]:
16728         Remove nonprototyped code.
16729         Include <stdlib.h> unconditionally.
16730         (_obstack_begin, _obstack_begin_1, _obstack_newchunk,
16731         _obstack_allocated_p, _obstack_free, obstack_free,
16732         _obstack_memory_used, print_and_abort):
16733         Define using prototypes.
16734         (obstack_1grow, obstack_1grow_fast, obstack_alloc, obstack_base,
16735         obstack_blank, obstack_blank_fast, obstack_copy, obstack_copy0,
16736         obstack_finish, obstack_grow, obstack_grow0, obstack_make_room,
16737         obstack_next_free, obstack_object_size, obstack_room) [0]:
16738         Remove unused, unprototyped code.
16739
16740         * lib/path-concat.c: Include <stdlib.h>, <string.h> unconditionally.
16741
16742         * lib/physmem.c (physmem_total, physmem_available, main): Define
16743         with prototypes.
16744
16745         * lib/posixtm.c: Include <stdlib.h>, <string.h> unconditionally.
16746         (main): Define with a prototype.
16747
16748         * lib/posixver.c (getenv): Remove decl.
16749
16750         * lib/putenv.c (malloc): Returns void *, not char *.
16751         Include <string.h> unconditionally.
16752         (strchr, memcpy, NULL): Do not define.
16753
16754         * lib/readtokens.c: Include readtokens.h first, to test interface.
16755         Include <stdlib.h>, <string.h> unconditionally.
16756         (init_tokenbuffer): Define with a prototype.
16757
16758         * lib/regex.c (PARAMS): Remove.  All uses removed.
16759         All uses of _RE_ARGS removed, too.
16760         Include <stddef.h>, <stdlib.h>, <string.h>, <limits.h>
16761         unconditionally.
16762         (bzero): Assume memset exists.
16763         (memcmp, memcpy, NULL): Remove.
16764         (SIGN_EXTEND_CHAR): Remove; all uses replaced by casts to signed
16765         char, or assignments to local vars of type signed char.
16766         (init_syntax_once, PREFIX(extract_number_and_incr),
16767         PREFIX(print_partial_compiled_pattern),
16768         PREFIX(print_compiled_pattern), PREFIX(print_double_string),
16769         convert_mbs_to_wcs, print_fastmap, re_set_syntax,
16770         PREFIX(regex_grow_registers), PREFIX(regex_compile),
16771         PREFIX(store_op1), PREFIX(store_op2), PREFIX(insert_op1),
16772         PREFIX(insert_op2), PREFIX(at_begline_loc_p),
16773         PREFIX(at_endline_loc_p), group_in_compile_stack, insert_space,
16774         wcs_compile_range, byte_compile_range, truncate_wchar,
16775         PREFIX(re_compile_fastmap), re_compile_fastmap, re_set_registers,
16776         re_search, re_search_2, PREFIX(re_search_2), re_match, re_match_2,
16777         count_mbs_length, wcs_re_match_2_internal,
16778         byte_re_match_2_internal, PREFIX(group_match_null_string_p),
16779         PREFIX(alt_match_null_string_p),
16780         PREFIX(common_op_match_null_string_p), PREFIX(bcmp_translate),
16781         re_compile_pattern, re_comp, re_exec, regcomp, regexec, regerror,
16782         regfree, PREFIX(extract_number)): Define with prototype.  Remove
16783         now-unnecessary declaration, if any.
16784         (byte_compile_range, PREFIX(regex_compile), re_comp, re_exec,
16785         regcomp, regexec):
16786         Remove now-unnecessary casts among pointer types.
16787         * lib/regex.h (_RE_ARGS): Remove.  All uses removed.
16788
16789         * lib/rename.c: Include <stdlib.h>, <string.h> unconditionally.
16790         (free): Remove decl.
16791
16792         * lib/rpmatch.c: Include <stdlib.h> unconditionally.
16793
16794         * lib/same.c: Include <stdlib.h>, <string.h> unconditionally.
16795         (free): Remove decl.
16796
16797         * lib/save-cwd.c: Include <stdlib.h> unconditionally.
16798         * lib/xgetcwd.c: Likewise.
16799
16800         * lib/stat.c: Include <stdlib.h>, <string.h> unconditionally.
16801         (free): Remove decl.
16802
16803         * lib/strchrnul.c (strchrnul): Define with a prototype.
16804         Fix bug: c_in was not converted to char before searching.
16805
16806         The following changes are not K&R related:
16807
16808         * lib/group-member.h: Include <sys/types.h>, so that this file is
16809         self-contained.
16810         * lib/makepath.h: Likewise.
16811
16812         * lib/getusershell.c (readname, default_index, line_size, readname):
16813         Use size_t, not int, for sizes.
16814         (readname): If the size overflows, report an error instead of
16815         looping forever.
16816
16817 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16818
16819         * config/srclist.txt: Do not get getopt.h, getopt1.c, or regex.h from
16820         libc.
16821
16822 2003-09-09  Paul Eggert  <eggert@twinsun.com>
16823
16824         * README: New section: portability guidelines.
16825
16826 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16827
16828         * m4/getndelim2.m4 (gl_PREREQ_GETNDELIM2): Assume stdlib.h per the
16829         C89 spec.
16830
16831 2003-09-09  Derek Robert Price  <derek@ximbiot.com>
16832
16833         * lib/getndelim2.c: Assume stdlib.h per the C89 spec.
16834
16835 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16836
16837         Assume C89 or better; remove K&R cruft.
16838         A few of these changes were first proposed by Derek Robert Price
16839         in <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00105.html>.
16840
16841         * lib/addext.c: Include <string.h> unconditionally.
16842         * lib/backupfile.c: Include <string.h>, <stdlib.h> unconditionally.
16843         Don't declare getenv or malloc.
16844
16845         * lib/alloca.c: Include <string.h>, <stdlib.h> unconditionally.
16846         (POINTER_TYPE, pointer): Remove; all uses changed to void *.
16847         (NULL): Remove.
16848         (find_stack_direction, alloca): Use prototypes.
16849
16850         * lib/atexit.c (atexit): Define using a prototype.
16851
16852         * lib/basename.c, dirname.c, stripslash.c:
16853         Include <string.h> unconditionally.
16854
16855         * lib/bcopy.c: Include <stddef.h>.
16856         (bcopy): Define with prototype, using 'const' and 'void' and 'size_t'.
16857
16858         * lib/canon-host.c: Include <stdlib.h>, <string.h> unconditionally.
16859
16860         * lib/error.h (error, error_at_line, error_print_progname)
16861         [! (defined (__STDC__) && __STDC__)]: Remove decls.
16862         * lib/error.c: Include error.h first, to check interface.
16863         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16864         (VA_START): Remove; all uses changeed to va_start.
16865         (exit, strerror): Remove decls.
16866         (error_print_progname): Prototype uncondionally.
16867         Don't include <errno.h>; no longer needed.
16868         (private_strerror): Remove.
16869         (error_tail): Always define.
16870         (error, error_at_line): Assume C89 or better; always use prototypes.
16871         * lib/fatal.c: Include "fatal.h" first, to test interface.
16872         Include <stdarg.h>, <stdlib.h>, <string.h> unconditionally.
16873         (VA_START): Remove; all uses changed to va_start.
16874         [! (HAVE_VPRINTF || HAVE_DOPRNT || _LIBC)]: Remove support for
16875         this case.
16876         (exit): Remove decl.
16877         (fatal): Prototype unconditionally.  Assume va_start works.
16878         Abort at end, to pacify gcc.
16879
16880         * lib/euidaccess.c (main): Define with a prototype.
16881
16882         * lib/exclude.c: Include <stdlib.h>, <string.h> unconditionally.
16883
16884         * lib/exitfail.c: Include <stdlib.h> unconditionally.
16885
16886         * lib/fnmatch_.h (__P): Remove.  All uses changed to assume
16887         prototypes.
16888         * lib/fnmatch.c: Include fnmatch.h first, to test interface.
16889         Include <string.h>, <stddef.h>, <stdlib.h> unconditionally.
16890         (getenv): Remove decl.
16891         (fnmatch): Define using a prototype.
16892         * lib/fnmatch_loop.c (FCT): Remove forward decl; no longer needed.
16893         (FCT): Define using a prototype.
16894
16895         * lib/getdate.y: Include <stdlib.h>, <string.h> unconditionally.
16896
16897         * lib/gethostname.c: Include <stddef.h>.
16898         (gethostname): Define with prototype.  Length is size_t, not int.
16899
16900 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16901
16902         Assume C89 or better; remove K&R cruft.
16903         * m4/alloca.m4 (gl_PREREQ_ALLOCA): Don't check for stdlib.h, string.h.
16904         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for stdlib.h,
16905         string.h, getenv, malloc.
16906         * m4/dirname.m4 (gl_DIRNAME): Don't check for string.h or C standard
16907         headers.
16908         * m4/canon-host.m4 (gl_CANON_HOST): Don't check for string.h, stdlib.h.
16909         * m4/error.m4 (jm_PREREQ_ERROR): Do not require STDC headers, and
16910         do not check for strerror.
16911         * m4/exclude.m4: Do not check for stdlib.h, string.h, strings.h.
16912         * m4/exitfail.m4 (gl_EXITFAIL): Do not check for stdlib.h.
16913         * m4/fatal.m4 (gl_FATAL): Do not require STDC headers, and
16914         do not check for doprnt or vprintf.
16915         * m4/fnmatch.m4 (gl_PREREQ_FNMATCH_EXTRA): Remove.  All uses removed.
16916         * m4/getdate.m4 (gl_GETDATE): Don't check for stdlib.h or string.h.
16917
16918 2003-09-08  Paul Eggert  <eggert@twinsun.com>
16919
16920         * lib/getversion.c: Remove; was migrated to backupfile.c in 1997.
16921         getversion.c should have been removed then, but was accidentally
16922         preserved.
16923
16924         * lib/utime.c [!HAVE_UTIMES_NULL]: Include <sys/stat.h>, <fcntl.h>.
16925         (utime_null): Fix typo: 'st' was sometimes called 'sb'.
16926
16927 2003-09-08  Karl Berry  <karl@gnu.org>
16928
16929         * config/config.sub, config.guess, srclistvars.sh: update from savannah
16930                 config, forget about prep.
16931
16932         * config/depcomp, missing: update from automake.
16933
16934 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16935
16936         * modules/time_r: Depend on 'restrict'.  Fix from Simon Josefsson in
16937         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16938
16939 2003-09-07  Paul Eggert  <eggert@twinsun.com>
16940
16941         * lib/time_r.c (gmtime_r, localtime_r): Fix silly typo: missing arg to
16942         copy_tm_result.  Bug reported by Simon Josefsson in
16943         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00028.html>.
16944
16945 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16946
16947         * m4/time_r.m4: New file.
16948         * m4/mktime.m4 (gl_PREREQ_MKTIME): Remove check for limits.h.
16949         * m4/timegm.m4 (gl_FUNC_TIMEGM): Assume that timegm is buggy if mktime
16950         is. Check for timegm declaration.
16951         (gl_PREREQ_TIMEGM): Require gl_FUNC_MKTIME.
16952         Do not check for gmtime_r.
16953         Replace mktime if __mktime_internal does not exist and if mktime
16954         hasn't been replaced already.
16955
16956 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16957
16958         * lib/time_r.c, lib/time_r.h: New files.
16959
16960         * lib/mktime.c (my_mktime_localtime_r): Remove; all uses changed to
16961         __localtime_r.
16962         (__localtime_r) [!defined _LIBC]: New macro.  Include <time_r.h>.
16963         (__mktime_internal) [!defined _LIBC]: Now extern, not static.
16964
16965         * lib/strftime.c (my_strftime_gmtime_r): Remove; all uses changed to
16966         __gmtime_r.
16967         (my_strftime_localtime_r): Remove; all uses changed to __localtime_r.
16968         (__gtime_r, __localtime_r) [!HAVE_TM_GMTOFF]: New macros.
16969         Include <time_r.h>.
16970
16971         * lib/timegm.c: Switch to glibc implementation, with the following
16972         changes:
16973         [defined HAVE_CONFIG_H]: Include <config.h>.
16974         [!defined _LIBC]: Include "timegm.h" rather than <time.h>.
16975         (__mktime_internal) [!defined _LIBC]: New decl.
16976         (__gmtime_r) [!defined _LIBC]: New macro and function.
16977         (timegm): Use a prototype, since gnulib assumes C89.
16978         Do not bother declaring tmp to be const, as it's not really usefu.
16979         * lib/timegm.h: Hoist "#include <time.h>" out of #ifdef.
16980         (timegm): Declare only if HAVE_DECL_TIMEGM.
16981
16982 2003-09-06  Paul Eggert  <eggert@twinsun.com>
16983
16984         * MODULES.html.sh (func_all_modules): Add time_r.
16985         * modules/time_r: New file.
16986         * modules/mktime, modules/strftime, modules/timegm: Depend on time_r.
16987         * modules/timegm: Depend on mktime.  Change maintainer to "all, glibc".
16988
16989 2003-09-03  Paul Eggert  <eggert@twinsun.com>
16990
16991         * lib/human.c (human_readable): Fix bug that rounded 10501 to 10k.
16992         Bug reported by Lute Kamstra in
16993         <http://mail.gnu.org/archive/html/bug-gnulib/2003-09/msg00003.html>.
16994
16995         * lib/getdate.y (relative_time_table): Use tDAY_UNIT for "tomorrow",
16996         "yesterday", "today", and "now" rather than tMINUTE_UNIT.  Of
16997         course with correspondingly smaller numbers for tomorrow and
16998         yesterday.  From Tadayoshi Funaba.  Originally installed into
16999         sh-utils on 1999-08-07, but the patch got lost (I guess during the
17000         coreutils merge?).
17001
17002 2003-08-31  Simon Josefsson  <jas@extundo.com>
17003
17004         * modules/timegm: New file.
17005         * MODULES.html.sh (func_all_modules): Add timegm.
17006
17007 2003-08-31  Simon Josefsson  <jas@extundo.com>
17008
17009         * m4/timegm.m4: New file.
17010
17011 2003-08-31  Simon Josefsson  <jas@extundo.com>
17012
17013         * lib/timegm.h: New file.
17014         * lib/timegm.c: New file.  Based on
17015         wget-1.8.2/src/http.c:mktime_from_utc.
17016
17017 2003-08-31  Karl Berry  <karl@gnu.org>
17018
17019         * lib/argp.h: update from libc.
17020
17021 2003-08-28  Bruno Haible  <bruno@clisp.org>
17022
17023         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Remove AC_DEFINE of fnmatch here.
17024         This avoids havoc on compilers for which '#define fnmatch rpl_fnmatch'
17025         followed by '#define fnmatch fnmatch_posix' gives an error.
17026
17027 2003-08-28  Bruno Haible  <bruno@clisp.org>
17028
17029         * lib/binary-io.h: Undefine O_BINARY before defining it. This avoids a
17030         warning on QNX, which defines O_BINARY to 000000.
17031
17032 2003-08-27  Jim Meyering  <jim@meyering.net>
17033
17034         * m4/mkstemp.m4: Require that the system mkstemp be able to create
17035         70 temporary files, not just 30.  Tru64 V4.0F's mkstemp function
17036         would fail after 32.  Reported by Danny Levinson.  Details here:
17037         http://mail.gnu.org/archive/html/bug-coreutils/2003-08/msg00124.html
17038
17039 2003-08-24  Bruno Haible  <bruno@clisp.org>
17040
17041         * lib/binary-io.h: Include <stdio.h>, to avoid a compilation error when
17042         MSVC7 <stdio.h> is included later.
17043
17044 2003-08-22  Simon Josefsson  <jas@extundo.com>
17045
17046         * modules/strndup (Makefile.am): Add strndup.h to lib_SOURCES.
17047
17048 2003-08-20  Karl Berry  <karl@gnu.org>
17049
17050         * m4/lib-ld.m4: serial 1003 from gettext, no changes besides serial.
17051
17052 2003-08-20  Bruno Haible  <bruno@clisp.org>
17053
17054         * modules/progname: New file.
17055         * MODULES.html.sh (func_all_modules): Add progname.
17056
17057 2003-08-20  Bruno Haible  <bruno@clisp.org>
17058
17059         * lib/progname.h: New file, from GNU gettext.
17060         * lib/progname.c: New file, from GNU gettext.
17061         * lib/progreloc.c: New file, from GNU gettext.
17062
17063 2003-08-19  Jim Meyering  <jim@meyering.net>
17064
17065         * m4/lib-ld.m4: Revert yesterday's change, per Bruno's request here:
17066         http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00155.html
17067
17068 2003-08-19  Bruno Haible  <bruno@clisp.org>
17069
17070         * m4/xalloc.m4 (gl_PREREQ_XSTRDUP): Don't check for <string.h> any
17071         more.
17072
17073 2003-08-19  Bruno Haible  <bruno@clisp.org>
17074
17075         * lib/xstrdup.c: Assume <string.h> exists.
17076
17077 2003-08-18  Paul Eggert  <eggert@twinsun.com>
17078
17079         * modules/stdbool: Add BUILT_SOURCES.  Prefer $@ to target name
17080         in makefile rules.
17081
17082 2003-08-18  Jim Meyering  <jim@meyering.net>
17083
17084         * m4/getloadavg.m4: Use [\t ], not [ \t] (where \t is a literal TAB).
17085         * m4/lib-ld.m4: Likewise.
17086
17087 2003-08-18  Jim Meyering  <jim@meyering.net>
17088
17089         * lib/setenv.h: Indent nested cpp directive.
17090         * lib/vasnprintf.c: Remove trailing blanks.
17091
17092 2003-08-17  Simon Josefsson  <jas@extundo.com>
17093
17094         * modules/xstrndup: New file.
17095         * MODULES.html.sh (func_all_modules): Add xstrndup.
17096
17097 2003-08-17  Simon Josefsson  <jas@extundo.com>
17098
17099         * modules/argp: Fix autoconf macro name. Add more dependencies.
17100
17101 2003-08-17  Simon Josefsson  <jas@extundo.com>
17102
17103         * m4/xstrndup.m4: New file.
17104
17105 2003-08-17  Simon Josefsson  <jas@extundo.com>
17106
17107         * m4/argp.m4: New file.
17108
17109 2003-08-17  Simon Josefsson  <jas@extundo.com>
17110             Bruno Haible  <bruno@clisp.org>
17111
17112         * lib/xstrndup.h: New file.
17113         * lib/xstrndup.c: New file.
17114
17115 2003-08-17  Bruno Haible  <bruno@clisp.org>
17116
17117         * modules/strndup (Files, Include): Add lib/strndup.h.
17118
17119 2003-08-17  Bruno Haible  <bruno@clisp.org>
17120
17121         * modules/euidaccess (Files): Add lib/euidaccess.h.
17122
17123 2003-08-17  Bruno Haible  <bruno@clisp.org>
17124
17125         * lib/strndup.h: New file.
17126
17127 2003-08-17  Bruno Haible  <bruno@clisp.org>
17128
17129         * gnulib-tool (func_create_testdir): Handle gl_USE_SYSTEM_EXTENSIONS
17130         like AC_GNU_SOURCE.
17131         * modules/extensions (configure.ac): Comment out the invocation of
17132         gl_USE_SYSTEM_EXTENSIONS.
17133
17134 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17135
17136         Merges from coreutils, etc.
17137         * m4/rpmatch.m4 (gl_PREREQ_RPMATCH): Insert ':' to prevent a syntax
17138         error in gl_FUNC_MATCH.  This fixes a bug I introduced on 2003-05-28.
17139         * m4/readlink.m4 (gl_PREREQ_READLINK): Renamed from gl_PREREQ_READLINE,
17140         fixing a typo.
17141         * m4/host-os.m4 (UTILS_HOST_OS): Add GNU/NetBSD, GNU/FreeBSD.
17142         * m4/hash.m4 (gl_HASH): Use AM_STDBOOL_H, not AC_HEADER_STDBOOL.
17143
17144 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17145
17146         Document merge from coreutils.
17147         * modules/alloca: Append $(ALLOCA_H) to BUILT_SOURCES.
17148         * modules/fnmatch: Append $(FNMATCH_H) to BUILT_SOURCES.
17149         * modules/utime: Add m4/utimes-null.m4.
17150
17151 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17152
17153         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Do not normalize white
17154         space, undoing this 2003-08-12 change:
17155         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17156
17157 2003-08-16  Paul Eggert  <eggert@twinsun.com>
17158
17159         * config/srclist.txt: Get regex.h, strdup.c, strtoll.c,
17160         strtoul.c from libc, undoing this 2003-08-12 change:
17161         <http://mail.gnu.org/archive/html/bug-gnulib/2003-08/msg00080.html>
17162
17163 2003-08-16  Jim Meyering  <jim@meyering.net>
17164
17165         Merges from coreutils.
17166         * m4/readdir.m4 (GL_FUNC_READDIR): Change name to have GL_ (not jm_)
17167         prefix.  Adjust cache variables similarly.  Create 500 rather than
17168         just 300 files, to exercise bug on Darwin6.5, too.
17169         * m4/perl.m4 (jm_PERL): Use $am_missing_run, not undefined
17170         $missing_dir.
17171         * m4/jm-winsz1.m4: Require AC_SYS_POSIX_TERMIOS, not
17172         AM_SYS_POSIX_TERMIOS.
17173         Reported by mkc@mathdogs.com.
17174         Also change use of $am_cv_sys_posix_termios
17175         to $ac_cv_sys_posix_termios.  Reported by Andreas Schwab.
17176         * m4/getgroups.m4 (jm_FUNC_GETGROUPS): Rewrite to use AC_FUNC_GETGROUPS
17177         and (if needed) to call AC_LIBOBJ and to set GETGROUPS_LIB.
17178         * m4/fsusage.m4 [__GLIBC__]: GNU libc's statvfs stats each mount point
17179         in /proc/mounts until it finds one with matching device number.  This
17180         is unnecessary when the FILE argument *is* a mount point.  No stat call
17181         is necessary in that case.  So, disable the statvfs-testing code on
17182         systems with GNU libc.  Reported by Andrei Gaponenko via Tim Waugh
17183         as RedHat bug# 84846.
17184         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17185         to 1MB, so as not to render systems with no stack size limit (e.g.,
17186         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17187         Include <unistd.h>.  On some systems,
17188         it is required for the definition of _SC_PAGESIZE.
17189
17190 2003-08-16  Jim Meyering  <jim@meyering.net>
17191
17192         Merge from coreutils.
17193         * lib/xstrtoimax.c: #else #if -> #elif.
17194         * lib/xstrtoumax.c: Likewise.
17195
17196 2003-08-16  Jim Meyering  <jim@meyering.net>
17197
17198         * m4/utimes.m4 (gl_FUNC_UTIMES): New file.
17199         * m4/utimes.m4: Removed.
17200         * m4/utimes-null.m4: Renamed from utimes.m4.
17201
17202         * m4/c-stack.m4 (AC_SYS_XSI_STACK_OVERFLOW_HEURISTIC): Limit stack size
17203         to 1MB, so as not to render systems with no stack size limit (e.g.,
17204         linux-2.2.x) unusable.  Suggestion and code from Bruno Haible.
17205         Include <unistd.h>.  On some systems,
17206         it is required for the definition of _SC_PAGESIZE.
17207
17208 2003-08-16  Jim Meyering  <jim@meyering.net>
17209         and Paul Eggert  <eggert@cs.ucla.edu>
17210
17211         Merges from coreutils, etc.
17212
17213         * m4/jm-macros.m4 (AC_LANG_SOURCE(C)): New macro, undefine, then define
17214         using the latest version from cvs.  This avoids problems with #line
17215         directives using a vendor (Sun) compiler.
17216         (jm_MACROS): Bump prerequisite from 2.52g to 2.57.
17217         Don't set GETGROUPS_LIB here; now it's
17218         done via getgroups.m4's wrapper function.
17219         AC_SUBST OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, and MAN here,
17220         rather than just in sh-util/configure.in, so that the
17221         now-shared-by-fileutils-and-textutils lib/Makefile.am are all the
17222         same.
17223         Use AC_CONFIG_LIBOBJ_DIR(lib) to tell the new
17224         AC_FUNC_GETLOADAVG where to find getloadavg.c.
17225         Require AC_FUNC_FTW, gt_INTTYPES_PRI, gl_CLOCK_TIME,
17226         UTILS_SYS_OPEN_MAX, GL_FUNC_GETCWD_PATH_MAX, GL_FUNC_READDIR,
17227         gl_FSUSAGE, gl_MOUNTLIST, AC_FUNC_CANONICALIZE_FILE_NAME.
17228         Remove code that is now done by the newly-required macros.
17229         Append $(EXEEXT) to DF_PROG.
17230         AC_LIBOBJ fchdir-stub if fchdir doesn't exist; similarly for fchown.
17231         Do not invoke or require the following here,
17232         since prereq.m4 or some gnulib .m4 now does this for us:
17233         gl_REGEX, UTILS_FUNC_MKDIR_TRAILING_SLASH, jm_BISON, gl_FUNC_MKTIME,
17234         jm_FUNC_LSTAT, jm_FUNC_STAT, jm_FUNC_REALLOC, jm_FUNC_MALLOC,
17235         jm_FUNC_NANOSLEEP, jm_FUNC_READDIR, jm_FUNC_MEMCMP,
17236         jm_FUNC_GLIBC_UNLOCKED_IO, AC_FUNC_FNMATCH_GNU, jm_FUNC_PUTENV,
17237         jm_AC_PREREQ_XSTRTOUMAX, jm_AC_PREREQ_XSTRTOIMAX,
17238         AC_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, AC_FUNC_VPRINTF,
17239         vb_FUNC_RENAME, UTILS_FUNC_MKSTEP, jm_FUNC_UTIME, AM_FUNC_GETLINE,
17240         AC_FUNC_OBSTACK.
17241         Do not replace the following functions, as this is now the job
17242         of some gnulib .m4: strcasecmp, strncasecmp, dup2, gethostname,
17243         getusershell, sig2str, strcspn, stpcpy, strstr, strtol, strtoul
17244         strpbrk, euidaccess, memcmp, rmdir, rpmatch, strndup, strverscmp,
17245         atexit getpass, strdup, getpagesize.
17246         Replace 'raise'.
17247         Do not check for the following functions, as this is now the job
17248         of some gnulib .m4: bcopy, canonicalize_file_name, fchdir, ftime,
17249         getcwd, getmntinfo, resolvepath.  But check for sysctl, setreuid,
17250         setregid.
17251         (jm_CHECK_ALL_HEADERS): Do not check for fenv.h.
17252         Check for sys/sysctl.h.
17253         (jm_CHECK_ALL_TYPES): Do not require AC_STRUCT_TM, AC_STRUCT_TIMEZONE,
17254         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Invoke gt_TYPE_SSIZE_T instead
17255         of checking for ssize_t ourselves.
17256
17257         * m4/prereq.m4 (jm_PREREQ): Don't invoke macros; AC_REQUIRE them.
17258         Require every macro that gnulib/modules/* suggests for us.
17259         (jm_PREREQ_ADDEXT): New macro.
17260         (jm_PREREQ_STAT): Check for 'struct statfs' on Ultrix 4.4.
17261         Require jm_AC_TYPE_LONG_LONG instead of invoking it.
17262
17263         * m4/physmem.m4 (gl_SYS__SYSTEM_CONFIGURATION): New macro.
17264         (gl_PHYSMEM): Use it.
17265         Also check for `table' function.
17266         Check for new headers and functions.
17267         Add check for sys/sysmp.h.
17268         With suggestions from Kaveh Ghazi.
17269         Ignore headers that are present but cannot be compiled.  This
17270         avoids spurious warnings on Solaris 9 sparc with Forte Developer 7
17271         C 5.4.
17272
17273 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17274
17275         Document merge from coreutils.
17276         * modules/userspec: Depend on posixver.
17277         * modules/strftime: Depend on tzset.
17278
17279 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17280
17281         * lib/config.charset, ref-add.sin, ref-del.sin: Use three spaces,
17282         rather than tab, after '#' in shell-script copyright notices.
17283         Suggested by Bruno Haible.
17284
17285 2003-08-15  Paul Eggert  <eggert@twinsun.com>
17286
17287         * config/srclist-update: Use three spaces, rather than tab, after '#'
17288         in shell-script copyright notices.  Suggested by Bruno Haible.
17289         Remove unnecessary parenthesization in regular expression.
17290
17291 2003-08-15  Jim Meyering  <jim@meyering.net>
17292
17293         Merge from coreutils.
17294         * lib/xgethostname.c: Include <stdlib.h>.
17295         (xghostname): Don't exit for anything other than memory-related
17296         failure; just return NULL.
17297         * lib/userspec.c: Include "posixver.h".
17298         (parse_user_spec): Accept `.' as a separator only
17299         in pre-POSIX-200112 mode.
17300         * lib/strtoimax.c: Use #elif rather than #else #if.
17301         * lib/strftime.c (my_strftime) [!_LIBC && HAVE_TZNAME && HAVE_TZSET]:
17302         Remove function, now that we can rely on a working tzset function.
17303         [!_LIBC]: Ensure that the required autoconf test has been run.
17304         [!defined _NL_CURRENT && HAVE_STRFTIME]:
17305         Use underlying_strftime for %r.
17306         * lib/sha.c: Merge in some clean-up and optimization changes from
17307         glibc.
17308         * lib/sha.c (sha_stream) [BLOCKSIZE]: Move definition to top of file.
17309         Ensure that it is a multiple of 64.
17310         Rearrange loop exit tests so as to avoid performing an
17311         additional fread after encountering an error or EOF.
17312         * lib/realloc.c: Update copyright date.
17313
17314 2003-08-15  Jim Meyering  <jim@meyering.net>
17315         and Paul Eggert  <eggert@twinsun.com>
17316
17317         Merge from coreutils.
17318         * lib/readutmp.h (HAVE_UTMPX_H): Undef if struct utmp has the ut_exit
17319         member but strut utmpx does not.  Needed for AIX 4.3.3.
17320         (UT_EXIT_E_TERMINATION, UT_EXIT_E_EXIT): Define.
17321
17322 2003-08-15  Jim Meyering  <jim@meyering.net>
17323         and Paul Eggert  <eggert@cs.ucla.edu>
17324
17325         Merges from coreutils, etc.
17326         * m4/strftime.m4 (_jm_STRFTIME_PREREQS):
17327         Require gl_FUNC_TZSET_CLOBBER.
17328         * m4/readutmp.m4 (gl_READUTMP): Check for ut_exit.ut_exit,
17329         ut_exit.e_exit, ut_exit.ut_termination, and ut_exit.e_termination
17330         members.
17331
17332 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17333
17334         Help the merge from coreutils.
17335         * m4/gettimeofday.m4 (gl_GETTIMEOFDAY_REPLACE_LOCALTIME): New macro.
17336         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use it.
17337         * m4/tzset.m4: Use it too.
17338
17339 2003-08-14  Paul Eggert  <eggert@twinsun.com>
17340
17341         * modules/tzset: New file.
17342
17343 2003-08-14  Jim Meyering  <jim@meyering.net>
17344
17345         Merges from coreutils.
17346         * modules/fnmatch: Use the `$(FNMATCH_H)' notation for AC_REPLACED
17347         variable names, rather than @FNMATCH_H@.
17348         * modules/alloca: Likewise for $(ALLOCA_H).
17349
17350         * modules/fnmatch (fnmatch.h): Use `$@' in the commands, in place of
17351         the three copies of the literal target, `fnmatch.h'.
17352         * modules/alloca (alloca.h): Likewise.
17353
17354 2003-08-14  Jim Meyering  <jim@meyering.net>
17355
17356         Merge from coreutils.
17357         * m4/tzset.m4: New file.
17358         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Move the
17359         MOUNTED_VMOUNT test to precede the MOUNTED_GETMNTENT1 tests, since
17360         otherwise, AIX 5.1 systems would end up using the latter.
17361         MOUNTED_GETMNTENT1 support is inadequate on such systems: 1) detecting
17362         whether a file system is remote doesn't work  2) the MOUNTED_VMOUNT
17363         code reports the HOSTNAME:/MOUNT_POINT, while the MOUNTED_GETMNTENT1
17364         code reports merely /MOUNT_POINT.  Reported by Mike Jetzer.
17365
17366 2003-08-14  Jim Meyering  <jim@meyering.net>
17367
17368         Merge from coreutils.
17369         * lib/obstack.h: Whitespace changes.
17370         * lib/mountlist.c: Remove anachronistic casts of xmalloc, xrealloc,
17371         and xcalloc return values.
17372         (read_filesystem_list) [MOUNTED_GETFSSTAT]:
17373         Use MNT_NOWAIT, rather than MNT_WAIT.  Otherwise, `df DIR' could
17374         hang on OSF/1 5.1 for DIR on both local and remote file systems.
17375         Reported by (and fix confirmed by) Nelson H. F. Beebe.
17376         (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
17377         error from mntctl.
17378         Use mntctl's return value to drive the entry-processing loop, since
17379         we can't rely on the value of the vmt_length member in the last
17380         entry.  On some systems doing so could result in exhausting
17381         virtual memory.  Based in part on a patch from Mike Jetzer.
17382
17383 2003-08-14  Jim Meyering  <jim@meyering.net>
17384         and Paul Eggert  <eggert@twinsun.com>
17385
17386         Merges from coreutils, plus other fixes.
17387         * lib/physmem.c: Merge in portability changes from gcc/libiberty
17388         to support AIX, IRIX, Tru64, and Windows.  See the ChangeLog there
17389         for credits and details.  Thanks to Kaveh Ghazi for helping
17390         to keep these files in sync.
17391         (ARRAY_SIZE): Define it.
17392         (physmem_total, physmem_available): Add comments. From Kaveh Ghazi.
17393         * lib/memcasecmp.c: Remove unnecessary parentheses after 'defined'.
17394         (memcasecmp): Don't assume size_t fits in unsigned int.
17395         Remove casts and duplicate code.
17396         * lib/md5.c: Include <string.h> and <stdlib.h> unconditionally.
17397         (memcpy): Remove definition.
17398         Merge in some clean-up and optimization changes from glibc.
17399         [BLOCKSIZE]: Move definition to top of file.
17400         Ensure that it is a multiple of 64.
17401         Rearrange loop exit tests so as to avoid performing an
17402         additional fread after encountering an error or EOF.
17403         * lib/md5.h (md5_uintptr): Define.
17404         * lib/makepath.c (CLEANUP_CWD): Report an error if we failed to
17405         return to the initial working directory.  Preserve errno
17406         for caller.
17407         * lib/idcache.c: Include "xalloc.h".
17408         (xmalloc, xrealloc): Remove decls.
17409         (getuser): Remove casts no longer required in C89.
17410         * lib/human.c: Include stdio.h, for sprintf.
17411         * lib/group-member.c: Include "xalloc.h".
17412         (xmalloc, xrealloc): Remove decls.
17413         (get_group_info): Remove casts no longer required in C89.
17414         * lib/getusershell.c (readname): Remove casts no longer required in
17415         C89.
17416         * lib/gettimeofday.c (rpl_gmtime, rpl_tzset): New functions.
17417         * lib/getline.c: Whitespace fix, from coreutils.
17418
17419 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17420
17421         * m4/exclude.m4 (gl_EXCLUDE): Require AC_C_INLINE, AC_HEADER_STDC.
17422         Check for isascii.
17423
17424         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17425         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17426         Undo previous (whitespace-only) change.
17427
17428 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17429
17430         * lib/exclude.c: Include <ctype.h>
17431         (IN_CTYPE_DOMAIN): New macro.
17432         (is_space): New fn.
17433         (add_exclude_file): If LINE_END is a space, ignore trailing spaces
17434         and empty lines.
17435
17436         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17437         Undo previous (whitespace-only) change.
17438
17439 2003-08-13  Paul Eggert  <eggert@twinsun.com>
17440
17441         * config/srclist-update: Change update back to the old behavior,
17442         leaving whitespace alone.  Use one 'sed' command rather than a
17443         pipeline.
17444         (fixlicense): Now a variable, not a function.
17445         (remove_trailing_blanks): Remove.
17446         (fixfile): Don't invoke unexpand or cat, or remove trailing blanks.
17447         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17448         Undo previous (whitespace-only) change.
17449
17450 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17451
17452         Merge from coreutils.
17453         * modules/euidaccess: Add lib_SOURCES, include for new
17454         file euidaccess.h
17455
17456 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17457
17458         * m4/gettext.m4, iconv.m4, intdiv0.m4, inttypes-pri.m4, lib-link.m4,
17459         lib-prefix.m4, longdouble.m4, po.m4, progtest.m4, signed.m4:
17460         Normalize leading white space and remove trailing white space.
17461
17462         Merge from coreutils
17463         * m4/euidaccess.m4 (gl_FUNC_EUIDACCESS): Check for euidaccess decl.
17464
17465         * m4/lib-ld.m4, lib-link.m4, lib-prefix.m4: Regenerate from gettext
17466         0.12.1.  These files are now being upgraded automatically by
17467         ../config/srclist-update.
17468
17469 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17470
17471         * lib/argp-help.c, argp-parse.c, config.charset, getopt.h:
17472         Normalize leading white space and remove trailing white space.
17473         * lib/ref-add.sin, ref-del.sin: Use '#' before empty line in copyright
17474         notice, as per ../config/srclist-update.
17475
17476         Merge from coreutils.
17477         * lib/euidaccess.h: New file.
17478         * lib/euidaccess.c: Include it.
17479         * lib/.cppi-disable: Add printf-args.h, printf-parse.h, stdbool_.h,
17480         vasnprintf.h, vasprintf.h.  Remove strdup.c, gettext.h.
17481         * lib/regex.h, strdup.c, strtoll.c, strtoul.c: Normalize white space.
17482
17483 2003-08-12  Paul Eggert  <eggert@twinsun.com>
17484
17485         * config/srclist-update: Add copyright notice.
17486         (remove_id_lines, remove_trailing_blanks): New constants.
17487         (fixfile): Use them to normalize spacing a bit in copied files.
17488         * config/config.guess, config.sub, install-sh, missing, texinfo.tex:
17489         Normalize leading white space and remove trailing white space.
17490
17491         * config/texinfo.tex: Sync with texinfo.
17492
17493         * config/srclist.txt: Don't get regex.h, strdup.c, strtoll.c,
17494         strtoul.c from libc, to merge coreutils whitespace changes.
17495
17496         * config/srclist.txt: Get the following m4 files from gettext:
17497         codeset.m4, gettext.m4, glibc21.m4, iconv.m4, intdiv0.m4,
17498         inttypes-pri.m4, lcmessage.m4, lib-ld.m4, lib-link.m4, lib-prefix.m4,
17499         longdouble.m4, nls.m4, po.m4, progtest.m4, signed.m4, wchar_t.m4,
17500         wint_t.m4.
17501
17502 2003-08-12  Karl Berry  <karl@gnu.org>
17503
17504         * config/srclist.txt: can't sync vasnprintf.c any more, changes have
17505         been made.
17506
17507 2003-08-11  Paul Eggert  <eggert@twinsun.com>
17508
17509         * modules/gnu-source, m4/gnu-source.m4:
17510         Remove; we're assuming Autoconf 2.54 or later now.
17511         Suggested by Bruno Haible.
17512         * MODULES.html.sh (func_all_modules): Remove gnu-source.
17513
17514 2003-08-11  Bruno Haible  <bruno@clisp.org>
17515
17516         * m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF): Also check for wcslen.
17517
17518 2003-08-11  Bruno Haible  <bruno@clisp.org>
17519
17520         * lib/vasnprintf.c (local_wcslen): New function, for Solaris 2.5.1.
17521         (vasnprintf): Use it instead of wcslen.
17522
17523 2003-08-11  Bruno Haible  <bruno@clisp.org>
17524
17525         * lib/stdbool_.h (_Bool): Undo last change; instead use a negative enum
17526         value to ensure that _Bool promotes to int. Use #define for _Bool when
17527         using the Solaris C compiler. Adds comments suggested by Paul Eggert.
17528
17529 2003-08-10  Karl Berry  <karl@gnu.org>
17530
17531         * lib/regex.h: update from libc (whitespace fix).
17532
17533 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17534
17535         Merge some files from coreutils.  These changes were
17536         originally made by Jim Meyering.
17537         * lib/acl.c: Include <sys/types.h> before <sys/stat.h>;
17538         many older Unixes require this.
17539         * lib/alloca.c (alloca): Remove cast to argument of free;
17540         no longer needed in C89.
17541         * lib/alloca_.h, regex.h: Fix white space to match
17542         what GNU indent does.
17543
17544 2003-08-09  Paul Eggert  <eggert@twinsun.com>
17545
17546         * m4/regex.m4 (jm_INCLUDED_REGEX): Change "\201" to "\371";
17547         apparently Emacs's Unicode mode got confused before my 2003-08-05
17548         checkin.
17549
17550 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17551
17552         * m4/extensions.m4: New file.
17553         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC):
17554         Require gl_USE_SYSTEM_EXTENSIONS.
17555         * m4/unlocked-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO):
17556         Require gl_USE_SYSTEM_EXTENSIONS rather than AC_GNU_SOURCE.
17557
17558 2003-08-08  Paul Eggert  <eggert@twinsun.com>
17559
17560         * MODULES.html.sh (func_all_modules): Add extensions, gnu-source.
17561         * modules/extensions, modules/gnu-source: New files.
17562         * modules/timespec, modules/unlocked-io: Depend on extensions.
17563
17564 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17565
17566         * modules/restrict: New file.
17567         * MODULES.html.sh (func_all_modules): Add restrict.
17568         * modules/regex: Depend on restrict.
17569
17570 2003-08-07  Paul Eggert  <eggert@twinsun.com>
17571
17572         * m4/restrict.m4: New file.
17573         * m4/regex.m4 (jm_PREREQ_REGEX): Add gl_C_RESTRICT.
17574
17575 2003-08-07  Bruno Haible  <bruno@clisp.org>
17576
17577         * modules/getndelim2 (Makefile.am): Add the files to EXTRA_DIST, not
17578         lib_SOURCES, because getndelim2.m4 now uses AC_LIBOBJ(getndelim2).
17579
17580 2003-08-07  Bruno Haible  <bruno@clisp.org>
17581
17582         * m4/getndelim2.m4 (gl_GETNDELIM2): Use AC_LIBOBJ(getndelim2). This
17583         makes the module 'getndelim2' compatible with the module 'getline'.
17584
17585 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17586
17587         * m4/regex.m4 (jm_INCLUDED_REGEX): Replace a single non-ASCII
17588         byte with "\201" to avoid glitches when editing that source file
17589         with multi-gnome-terminal.
17590
17591 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17592
17593         * lib/bumpalloc.h: Remove.
17594
17595 2003-08-05  Paul Eggert  <eggert@twinsun.com>
17596
17597         * MODULES.html.sh (func_all_modules): Remove bumpalloc.
17598         * modules/bumpalloc: Remove.
17599
17600 2003-08-04  Paul Eggert  <eggert@twinsun.com>
17601
17602         * lib/getloadavg.c: Change copyright notice and spacing to conform to
17603         GNU coding style.
17604
17605         Merge from coreutils.
17606         * lib/error.c [!USE_IN_LIBIO]: Omit this case; assume USE_IN_LIBIO is
17607         1. From glibc.
17608         * lib/getdate.y (date): Also accept dates like May-23-2003; suggestion
17609         from Karl Berry, implemented by Jim Meyering.
17610         * lib/getgroups.c: Include "xalloc.h" instead of declaring xalloc fns;
17611         from Dmitry V. Levin.
17612         Remove anachronistic cast of xrealloc.
17613         * lib/fnmatch_.h (__const): Remove.  Use 'const'.
17614         * lib/fnmatch_loop.c (NEW_PATTERN): Cast alloca return value to proper
17615         type. Otherwise, it wouldn't compile with at least /bin/cc on
17616         ymp-cray-unicos9.0.2.X.
17617         Combine two mostly-identical uses of alloca into one.
17618         Thanks to the Cray-Cyber project for access to a Cray Y-MP.
17619
17620 2003-08-04  Dave Love  <d.love@dl.ac.uk>
17621
17622         [From Emacs.]
17623
17624         * lib/getloadavg.c: Check `__unix' as well as `unix'.  Use #ifdef, not
17625         #if.  Check HAVE_LIBKSTAT as well as LOAD_AVE_TYPE.  Check
17626         F_SETFD, not FD_SETFD.  Use HAVE_STRUCT_NLIST_N_UN_N_NAME, not
17627         obsolete NLIST_NAME_UNION.
17628         [__GNU__]: Undef BSD and FSCALE.
17629         [!NLIST_STRUCT]: Remove conditional definition of NLIST_STRUCT.
17630
17631 2003-08-03  Paul Eggert  <eggert@twinsun.com>
17632
17633         * lib/stdbool_.h (_Bool): Make it signed char, instead of
17634         an enum type, so that it's guaranteed to promote to int.  See:
17635         <http://mail.gnu.org/archive/html/bug-gnulib/2003-07/msg00124.html>
17636
17637 2003-08-03  Karl Berry  <karl@gnu.org>
17638
17639         * config/depcomp: update from automake.
17640
17641 2003-07-31  Paul Eggert  <eggert@twinsun.com>
17642
17643         * lib/strerror.c: Include config.h, limits.h.  Declare sprintf.
17644         (strerror): Don't assume that a printable int fits in 14 bytes.
17645
17646 2003-07-31  Bruno Haible  <bruno@clisp.org>
17647
17648         * modules/getpass-gnu: New file.
17649         * MODULES.html.sh (func_all_modules): Add getpass-gnu.
17650
17651 2003-07-31  Bruno Haible  <bruno@clisp.org>
17652
17653         * m4/getpass.m4 (gl_FUNC_GETPASS_GNU): New macro.
17654
17655 2003-07-24  Karl Berry  <karl@gnu.org>
17656
17657         * config/missing: update from automake.
17658
17659 2003-07-24  Derek Robert Price  <derek@ximbiot.com>
17660             Bruno Haible  <bruno@clisp.org>
17661
17662         * lib/getline.h (getline, getdelim): Change return type to ssize_t.
17663         * lib/getline.c (getline, getdelim): Likewise.
17664         Remove _GNU_SOURCE define; now it's defined in config.h through
17665         m4/getline.m4.
17666
17667 2003-07-23  Karl Berry  <karl@gnu.org>
17668
17669         * config/config.sub: update from prep.
17670
17671 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17672
17673         * modules/xalloc (Depends-on): Add exitfail.
17674         * modules/xmemcoll: Likewise.
17675
17676 2003-07-22  Paul Eggert  <eggert@twinsun.com>
17677
17678         * lib/xalloc.h (XCALLOC, XREALLOC, CCLONE): Fix under- and
17679         over-parenthesization in macros.
17680
17681         Sync with coreutils.
17682
17683         * lib/xalloc.h (XMALLOC, XCALLOC, XREALLOC): Remove casts not
17684         required by C99.
17685
17686         Use `exit_failure' for xalloc and xmemcoll instead of their own
17687         private exit-failure variables.
17688         * lib/xalloc.h (xalloc_exit_failure): Remove.
17689         * lib/xmalloc.c: Likewise.  Include exitfail.h.
17690         (xalloc_die): Use exit_failure instead of xalloc_exit_failure.
17691         * lib/xmemcoll.h (xmemcoll_exit_failure): Remove.
17692         * lib/xmemcoll.c: Likewise.  Include exitfail.h.
17693         (xmemcoll): Use exit_failure instead of xalloc_exit_failure.
17694
17695 2003-07-20  Jim Meyering  <jim@meyering.net>
17696
17697         * modules/closeout (Depends-on): Add exitfail.
17698         Suggestion from Bruno Haible.
17699
17700 2003-07-19  Karl Berry  <karl@gnu.org>
17701
17702         * config/config.sub: update from prep.
17703
17704 2003-07-18  Paul Eggert  <eggert@twinsun.com>
17705
17706         * lib/closeout.h (close_stdout_set_status, close_stdout_status):
17707         Remove.
17708         * lib/closeout.c: Likewise.  Include "closeout.h" right after config.h,
17709         to test that it can stand by itself.  Include "exitfail.h".
17710         Clients should set exit_failure instead.
17711         (EXIT_FAILURE): Remove; no longer needed.  Do not include <stdlib.h>.
17712
17713 2003-07-18  Bruno Haible  <bruno@clisp.org>
17714
17715         * modules/getndelim2: New file.
17716         * modules/getline: Share files with module getndelim2.
17717         * modules/getnline: Depend on getndelim2 instead of sharing files with
17718         it. Add getnline.c to lib_SOURCES.
17719         * MODULES.html.sh (func_all_modules): Add getndelim2.
17720
17721 2003-07-18  Bruno Haible  <bruno@clisp.org>
17722
17723         * m4/getndelim2.m4: New file.
17724         * m4/getline.m4 (AM_FUNC_GETLINE): Add AC_LIBOBJ of getndelim2.c and
17725         invoke gl_PREREQ_GETNDELIM2.
17726         (gl_PREREQ_GETLINE): Drop AC_HEADER_STDC, now done by
17727         gl_PREREQ_GETNDELIM2.
17728         * m4/getnline.m4 (gl_GETNLINE): Drop AC_HEADER_STDC, now done by
17729         gl_GETNDELIM2.
17730
17731 2003-07-18  Bruno Haible  <bruno@clisp.org>
17732
17733         * lib/getndelim2.h: New file.
17734         * lib/getndelim2.c: Make into a module of its own. Include config.h,
17735         getndelim2.h.
17736         (getndelim2): Make non-static. Change return type to ssize_t.
17737         * lib/getline.h: Change argument names.
17738         * lib/getline.c: Include getndelim2.h instead of getndelim2.c.
17739         * lib/getnline.c: Include getndelim2.h.
17740
17741 2003-07-18  Andreas Schwab  <schwab@suse.de>
17742
17743         * lib/memcoll.c (memcoll) [!HAVE_STRCOLL]: Clear errno.
17744
17745 2003-07-17  Karl Berry  <karl@gnu.org>
17746
17747         * config/config.sub: update from prep.
17748
17749 2003-07-17  Bruno Haible  <bruno@clisp.org>
17750
17751         * modules/getnline: New file.
17752         * modules/getline: Add lib/getndelim2.c to source file list.
17753         * MODULES.html.sh (func_all_modules): Add getnline.
17754
17755 2003-07-17  Bruno Haible  <bruno@clisp.org>
17756
17757         * m4/getnline.m4: New file.
17758
17759 2003-07-17  Bruno Haible  <bruno@clisp.org>
17760
17761         * m4/Makefile.am.in: Remove file.
17762         * m4/Makefile.am: Remove file.
17763         * m4/Makefile.in: Remove file.
17764
17765 2003-07-17  Bruno Haible  <bruno@clisp.org>
17766
17767         * lib/getnline.h: New file.
17768         * lib/getnline.c: New file.
17769         * lib/getndelim2.c: New file, extracted from getline.c.
17770         (getndelim2): Renamed from getdelim2, with added nmax argument.
17771         * lib/getline.c: Include getndelim2.c.
17772         (getdelim2): Moved out to getndelim2.c.
17773         (getline, getdelim): Update.
17774
17775 2003-07-17  Bruno Haible  <bruno@clisp.org>
17776
17777         * lib/Makefile.am: Remove file.
17778         * lib/Makefile.in: Remove file.
17779
17780 2003-07-17  Bruno Haible  <bruno@clisp.org>
17781
17782         * configure.in: Remove file.
17783         * Makefile.in: Remove file.
17784
17785 2003-07-17  Bruno Haible  <bruno@clisp.org>
17786
17787         * MODULES.html.sh: Put the </BODY> right before </HTML>.
17788
17789 2003-07-16  Karl Berry  <karl@gnu.org>
17790
17791         * config/srclist-update: was running fixlicense twice, which caused
17792                 texinfo.tex to be nullified for some reason.  Simplify,
17793                 $gplsrc is no longer needed as far as I can see?
17794
17795 2003-07-16  Jim Meyering  <jim@meyering.net>
17796
17797         * modules/save-cwd: Depend on xgetcwd.  From Derek Price.
17798
17799 2003-07-15  Paul Eggert  <eggert@twinsun.com>
17800
17801         * config/srclist.txt: Get the following files from gettext-runtime/intl
17802         instead: config.charset, localcharset.c, localcharset.h, ref-add.sin,
17803         ref-del.sin.  From Bruno Haible.
17804         * config/srclist-update (fixfile): Change grep pattern again, since the
17805         previous fix didn't work (there was another trailing $).  Use
17806         '[$]' to escape the $s.
17807
17808 2003-07-15  Karl Berry  <karl@gnu.org>
17809
17810         * lib/vasnprintf.c: update from gettext.
17811
17812 2003-07-15  Karl Berry  <karl@gnu.org>
17813
17814         * config/srclist-update (fixfile): Change grep pattern, since 'Id'
17815         gets expanded when surrounded by '$'.
17816
17817 2003-07-15  Jim Meyering  <jim@meyering.net>
17818
17819         * modules/save-cwd: Don't depend on error.  From Derek Price.
17820
17821 2003-07-15  Jim Meyering  <jim@meyering.net>
17822
17823         * lib/makepath.c (make_path): Enclose diagnostic in _(...).
17824
17825 2003-07-14  Simon Josefsson  <jas@extundo.com>
17826
17827         * modules/mempcpy: New file.
17828         * MODULES.html.sh (func_all_modules): Add mempcpy.
17829
17830 2003-07-14  Simon Josefsson  <jas@extundo.com>
17831
17832         * m4/mempcpy.m4: New file.
17833
17834 2003-07-14  Simon Josefsson  <jas@extundo.com>
17835
17836         * lib/mempcpy.h: New file.
17837         * lib/mempcpy.c: New file.
17838
17839 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17840
17841         * modules/getdate, modules/posixtm: Depend on mktime.
17842
17843 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17844
17845         * lib/ceill.c, expl.c, floorl.c, frexpl.c, ldexpl.c, mathl.h,
17846         sincosl.c, sqrtl.c, trigl.c, trigl.h, poll.c, poll_.h, mkstemp.c,
17847         unicodeio.c, unicodeio.h, unlocked-io.h:
17848         Switch from LGPL to GPL.
17849
17850 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17851
17852         * lib/asnprintf.c, asprintf.c, config.charset, gettext.h,
17853         localcharset.c, localcharset.h, mkdtemp.c, printf-args.c,
17854         printf-args.h, printf-parse.c, printf-parse.h, ref-add.sin,
17855         ref-del.sin, setenv.c, unsetenv.c, vasnprintf.c, vasnprintf.h,
17856         vasprintf.c, vasprintf.h: Regenerate.  These files are now being
17857         updated automatically by ../config/srclist-update.  This changes
17858         their license from LPGL to GPL.
17859
17860 2003-07-14  Paul Eggert  <eggert@twinsun.com>
17861
17862         * config/srclist.txt: Add tons more gettext files.  $GETTEXT is now
17863         assumed to refer to the root of the most recent stable gettext version.
17864         * config/srclistvars.sh: Add defaults for eggert.
17865         * config/srclist-update: Convert LGPL to GPL in shell scripts, too.
17866         Match "This program" as well as "The program".  This is needed
17867         for gettext.
17868
17869 2003-07-14  Jim Meyering  <jim@meyering.net>
17870
17871         Don't emit diagnostics.  Let callers do that.
17872         * lib/save-cwd.c: Don't include "error.h".
17873         (save_cwd): Don't call error.  Ensure that errno is valid
17874         when returning nonzero.
17875
17876         * lib/save-cwd.h (restore_cwd): Update prototype.
17877         * lib/save-cwd.c (restore_cwd): Remove two parameters.
17878         Simplify.  Don't call error upon failure.  Let callers do that.
17879         (save_cwd): Mention that Irix 5.3 has the same problem as SunOS 4
17880         when auditing is enabled.  But don't bother updating the #if.
17881
17882 2003-07-11  Alexandre Duret-Lutz  <adl@gnu.org>
17883
17884         * lib/obstack.h (__INT_TO_PTR): Revert change of 2003-03-13;
17885         it breaks C++ compilation.
17886         [!__GNUC__ || !__STDC__] (obstack_finish): Cast result to void*.
17887
17888 2003-07-10  Simon Josefsson  <jas@extundo.com>
17889
17890         * modules/strchrnul (Makefile.am): Add strchrnul.h.
17891
17892 2003-07-10  Jim Meyering  <jim@meyering.net>
17893
17894         * m4/clock_time.m4: Remove trailing blank.
17895         * m4/intmax_t.m4: Likewise.
17896
17897 2003-07-10  Jim Meyering  <jim@meyering.net>
17898
17899         * lib/vasnprintf.c: Remove trailing blanks.
17900         Make cpp indentation consistent.
17901
17902 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17903
17904         * lib/alloca_.h, euidaccess.c, getpass.c, memrchr.c, obstack.h,
17905         posixver.c, strftime.c, strnlen.c, strverscmp.c:
17906         Switch from LGPL to GPL.
17907
17908 2003-07-09  Paul Eggert  <eggert@twinsun.com>
17909
17910         * config/srclist.txt: Sort sublists.  Add
17911         $LIBCSRC/sysdeps/generic/strtoul.c. In comments, add more libc files
17912         that differ from gnulib for one reason or another; we'd like this list
17913         to be smaller but for now let's document what we have.
17914
17915 2003-07-08  Paul Eggert  <eggert@twinsun.com>
17916
17917         * config/srclist-update: Port to POSIX 1003.1-2001 hosts by avoiding
17918         the use of GNU extensions.  Change "x=`eval echo $x`" to the shorter
17919         and sweeter "eval x=$x".
17920         * config/srclist.txt: Get lib/argp* from glibc.
17921
17922 2003-07-07  Paul Eggert  <eggert@twinsun.com>
17923
17924         * lib/mktime.c: Fix some boundary cases and remove need for floating
17925         point.
17926
17927         Issue a compile-time diagnostic if time_t is floating point, or if
17928         two's complement arithmetic is not in effect, or if arithmetic
17929         right shift does not propagate the sign.  These assumptions were
17930         all in the original code but they weren't checked.
17931
17932         (TIME_T_MIDPOINT, verify): New macros.
17933         (__isleap): Remove; it has integer overflow problems.
17934         (leapyear): New function, without those problems.
17935         (ydhms_tm_diff): Remove; splitting into two parts.
17936         (ydhms_diff): New function, containing the arithmetic part of
17937         the old ydhms_tm_diff function.  Issue a compile-time
17938         diagnostic if we are not using C99 integer division.
17939         Avoid casts when possible.
17940         (guess_time_tm): New function, containing the checking part of
17941         the old ydhms_tm_diff function.  Return the new value, rather than
17942         the difference between it and the old.  Accept a new argument T
17943         so that *T specifies the old value.  Check for overflow in the result.
17944
17945         (__mktime_internal): Use a time_t offset, not a long int offset.
17946         This undoes the 2003-06-04 change, which is no longer needed now
17947         that we have better overflow checking.
17948         (localtime_offset): Likewise.
17949
17950         (__mktime_internal): Avoid harmful overflow on hosts where time_t
17951         and long are 64-bit but int is only 32-bit.
17952         (ydhms_diff): Use long int to store year1 and yday1.
17953         Issue a compile-time diagnostic if long int is not wide enough.
17954
17955         (__mktime_internal): Use long int to store adjusted year and yday.
17956         Use plain C rather than preprocessor commands, if that doesn't
17957         affect efficiency.
17958         Check for overflow (and try to repair) after each probe
17959         rather than checking only at the very end.  This avoids some bugs
17960         (e.g., southern hemisphere, behind GMT, and GMT offset at minimum time
17961         does not equal GMT offset at maximum time).
17962         Use integer to check for overflow rather than floating point; this
17963         is more portable to non-IEEE hosts, and is a tad faster.
17964         When we detect that we are oscillating between two values,
17965         don't check whether tm_isdst has the requested value, since
17966         we already know the answer.  When tm_isdst has the wrong value,
17967         use a different heuristic to find the right one, based on the
17968         extreme values actually observed in practice in tz2003a,
17969         rather than the (overly optimistic) "previous 3 calendar quarters".
17970
17971         (not_equal_tm, print_tm, check_result): Use "const T" rather than
17972         "T const" to accommodate glibc style.
17973         (check_result): Use less-confusing report format.  "long" -> "long int.
17974         (main): Likewise.
17975         Don't loop if the iteration overflows time_t.
17976         Allow a negative step in the iteration.
17977
17978 2003-07-06  Karl Berry  <karl@gnu.org>
17979
17980         * config/depcomp: update from automake.
17981         * config/config.sub: update from prep.
17982
17983 2003-07-03  Karl Berry  <karl@gnu.org>
17984
17985         * config/config.guess: update from prep.
17986
17987 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17988
17989         * m4/xreadlink.m4 (gl_XREADLINK): Don't check for sys/types.h, since
17990         xreadlink.c now includes it unconditionally.
17991
17992 2003-07-01  Paul Eggert  <eggert@twinsun.com>
17993
17994         * lib/xreadlink.c: Include <sys/types.h> unconditionally, instead of
17995         having it depend on HAVE_SYS_TYPES_H.
17996
17997 2003-07-01  Bruno Haible  <bruno@clisp.org>
17998
17999         * m4/ssize_t.m4 (gt_TYPE_SSIZE_T): Don't include <unistd.h>.
18000         <sys/types.h> should be sufficient.
18001         Reported by Paul Eggert.
18002
18003 2003-06-26  Karl Berry  <karl@gnu.org>
18004
18005         * config/depcomp: update from automake.
18006
18007 2003-06-26  Bruno Haible  <bruno@clisp.org>
18008
18009         * modules/human: Depend on module stdbool.
18010
18011 2003-06-25  Bruno Haible  <bruno@clisp.org>
18012
18013         * modules/readlink: New file.
18014         * modules/xreadlink: Depend on it.
18015         * MODULES.html.sh (func_all_modules): Add readlink.
18016
18017 2003-06-25  Bruno Haible  <bruno@clisp.org>
18018
18019         * m4/readlink.m4: New file.
18020
18021 2003-06-25  Bruno Haible  <bruno@clisp.org>
18022
18023         * lib/readlink.c: New file.
18024
18025 2003-06-22  Karl Berry  <karl@gnu.org>
18026
18027         * config/srclist.txt: update mkinstalldirs from automake.
18028         * config/mkinstalldirs: update.
18029
18030 2003-06-22  Bruno Haible  <bruno@clisp.org>
18031
18032         Portability to mingw32.
18033         * m4/ssize_t.m4: New file, from GNU gettext.
18034         * m4/safe-read.m4 (gl_PREREQ_SAFE_READ): Require gt_TYPE_SSIZE_T.
18035         * m4/xreadlink.m4 (gl_XREADLINK): Require gt_TYPE_SSIZE_T.
18036
18037 2003-06-22  Bruno Haible  <bruno@clisp.org>
18038
18039         * modules/safe-read: Add m4/ssize_t.m4.
18040         * modules/xreadlink: Add m4/ssize_t.m4.
18041
18042 2003-06-20  Bruno Haible  <bruno@clisp.org>
18043
18044         Assume C89, so PARAMS isn't needed.
18045         * lib/unicodeio.h (PARAMS): Remove.
18046         * lib/unicodeio.c: Don't use PARAMS.
18047
18048 2003-06-18  Karl Berry  <karl@gnu.org>
18049
18050         * config/config.{guess,sub}: update from prep.
18051
18052 2003-06-18  Jim Meyering  <jim@meyering.net>
18053
18054         Merge changes from coreutils.
18055         * lib/readutmp.c: Include <string.h> and <stdlib.h> unconditionally.
18056         Remove explicit declarations of xmalloc and realloc.
18057         Include xalloc.h.
18058         (read_utmp): Remove anachronistic cast of xmalloc.
18059
18060 2003-06-17  Paul Eggert  <eggert@twinsun.com>
18061
18062         Assume C89, so PARAMS isn't needed.
18063         * lib/backupfile.h (PARAMS): Remove.  All uses removed.
18064         * lib/closeout.h, lib/dirname.h, lib/filemode.h, lib/fsusage.h,
18065         lib/getdate.h, lib/getline.h, lib/group-member.h, lib/hard-locale.h,
18066         lib/hash.h, lib/linebuffer.h, lib/long-options.h, lib/makepath.h,
18067         lib/memcasecmp.h, lib/memcoll.h, lib/modechange.h, lib/mountlist.h,
18068         lib/path-concat.h, lib/physmem.h, lib/posixtm.h, lib/quote.h,
18069         lib/readutmp.h, lib/same.h, lib/save-cwd.h, lib/savedir.h,
18070         lib/stdio-safer.h, lib/strtoimax.c, lib/strverscmp.h,
18071         lib/unistd-safer.h, lib/version-etc.h, lib/xalloc.h, lib/xreadlink.h,
18072         lib/xstrtod.h, lib/xstrtol.h: Likewise.
18073         * lib/filemode.h, lib/hard-locale.h, lib/memcoll.h, lib/modechange.h,
18074         lib/physmem.h, lib/same.h, lib/strverscmp.h: Do not include config.h;
18075         no longer needed. Anyway, config.h should always be included before any
18076         other file.
18077
18078 2003-06-11  Simon Josefsson  <jas@extundo.com>
18079
18080         * modules/sysexits: New file.
18081         * MODULES.html.sh (func_all_modules): Add sysexits.
18082
18083 2003-06-11  Simon Josefsson  <jas@extundo.com>
18084
18085         * lib/sysexit_.h: New file.
18086
18087 2003-06-11  Derek Price  <derek@ximbiot.com>
18088
18089         * lib/stat.c [LSTAT]: Compile/use slash_aware_lstat only if it is
18090         necessary.
18091
18092 2003-06-11  Bruno Haible  <bruno@clisp.org>
18093
18094         * m4/sysexits.m4: New file.
18095
18096 2003-06-10  Simon Josefsson  <jas@extundo.com>
18097
18098         * lib/argp.h: New file, from glibc.
18099         * lib/argp-ba.c: New file, from glibc.
18100         * lib/argp-eexst.c: New file, from glibc.
18101         * lib/argp-fmtstream.c: New file, from glibc.
18102         * lib/argp-fmtstream.h: New file, from glibc.
18103         * lib/argp-fs-xinl.c: New file, from glibc.
18104         * lib/argp-help.c: New file, from glibc.
18105         * lib/argp-namefrob.h: New file, from glibc.
18106         * lib/argp-parse.c: New file, from glibc.
18107         * lib/argp-pv.c: New file, from glibc.
18108         * lib/argp-pvh.c: New file, from glibc.
18109         * lib/argp-xinl.c: New file, from glibc.
18110
18111 2003-06-10  Simon Josefsson  <jas@extundo.com>
18112
18113         * modules/strchrnul: New file.
18114
18115 2003-06-10  Simon Josefsson  <jas@extundo.com>
18116
18117         * modules/argp: New file.
18118
18119 2003-06-10  Simon Josefsson  <jas@extundo.com>
18120
18121         * m4/strchrnul.m4: New file.
18122
18123 2003-06-10  Simon Josefsson  <jas@extundo.com>
18124
18125         * lib/strchrnul.h: New file.
18126         * lib/strchrnul.c: New file.
18127
18128 2003-06-10  Bruno Haible  <bruno@clisp.org>
18129
18130         * MODULES.html.sh (func_all_modules): Add strchrnul and argp.
18131
18132 2003-06-07  Karl Berry  <karl@gnu.org>
18133
18134         * config/config.{guess,sub}: update from prep.
18135
18136 2003-06-07  Jim Meyering  <jim@meyering.net>
18137
18138         * modules/strtod: Use $(...) notation, not @...@ for
18139         AC_REPLACE'd variables.
18140         * modules/localcharset: Likewise.
18141
18142 2003-06-07  Jim Meyering  <jim@meyering.net>
18143
18144         * lib/readtokens.h: Put `Free Software Foundation, Inc.'
18145         in place of my name in the copyright comment.
18146         Remove definition and uses of __P.
18147
18148         From coreutils.
18149         * lib/stat.c: Don't declare xmalloc explicitly.
18150         Instead, include "xalloc.h".
18151         * lib/readtokens.c (readtokens): Remove anachronistic casts of xmalloc,
18152         xrealloc, and xcalloc return values.
18153         * lib/xgetcwd.c (xgetcwd): Include "xgetcwd.h".
18154         Improve comment.
18155         * lib/xgetcwd.h: Remove definition/uses of PARAMS.
18156
18157 2003-06-07  Bruno Haible  <bruno@clisp.org>
18158
18159         * modules/poll (Makefile.am): Use explicit creation rule for poll.h, to
18160         avoid AC_CONFIG_LINKS.
18161         * modules/fnmatch (Makefile.am): Use explicit creation rule for
18162         fnmatch.h, to avoid AC_CONFIG_LINKS.
18163         * modules/alloca (Makefile.am): Make creation of alloca.h Ctrl-C safe.
18164
18165 2003-06-07  Bruno Haible  <bruno@clisp.org>
18166
18167         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH, gl_FUNC_FNMATCH_POSIX,
18168         gl_FUNC_FNMATCH_GNU): Set FNMATCH_H instead of invoking
18169         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18170         directory.
18171         * m4/poll.m4 (gl_FUNC_POLL): Set POLL_H instead of invoking
18172         AC_CONFIG_LINKS. Needed to allow for a different name of the lib
18173         directory.
18174
18175 2003-06-06  Jim Meyering  <jim@meyering.net>
18176
18177         Merge from coreutils.
18178         * lib/same.c: (same_name): Declare *_basename locals to be `const'.
18179         Consolidate declarations and initializations of *_base* locals.
18180
18181         Merge from coreutils.
18182         This avoids a core dump on systems without GNU putenv,
18183         when running `env -u SOME_ALREADY_UNSET_VARIABLE'.
18184         * lib/putenv.c (__set_errno, LOCK, UNLOCK): Define.
18185         (unsetenv): New static function, from GNU libc.
18186         (rpl_putenv): Use it.
18187
18188         * lib/modechange.c: Remove trailing blanks.
18189
18190         Merge from coreutils.
18191         * lib/fsusage.c: Remove declaration of statfs.
18192         It conflicted with one from OSF/1 5.1 in <sys/mount.h>.
18193
18194         * lib/posixtm.c: Include <stdbool.h> unconditionally.
18195
18196 2003-06-06  Jim Meyering  <jim@meyering.net>
18197
18198         * lib/stdbool_.h: Renamed from stdbool.h.in.
18199
18200 2003-06-06  Jim Meyering  <jim@meyering.net>
18201             Bruno Haible  <bruno@clisp.org>
18202
18203         * modules/stdbool: Reflect renaming: stdbool.h.in -> stdbool_.h.
18204         Adjust Makefile.am snippet not to redirect directly to target.
18205         Use $(STDBOOL_H) notation, not @STDBOOL_H@ for AC_REPLACE'd variables.
18206
18207 2003-06-05  Paul Eggert  <eggert@twinsun.com>
18208
18209         * lib/mktime.c (__mktime_internal): When resolving a tm_isdst
18210         mismatch, look in future quarters as well as past.  This fixes a
18211         bug when processing fall-backwards gaps immediately after a long
18212         period of daylight-saving time.
18213
18214         * lib/mktime.c: Assume freestanding C89 or better.
18215         (HAVE_LIMITS_H): Remove.  Assume it's 1.
18216         (__P): Remove; not used.
18217         (CHAR_BIT, INT_MIN, INT_MAX): Remove; <limits.h> defines them.
18218         (mktime, not_equal_tm, print_tm, check_result,
18219         main): Use prototypes.  Use const * where appropriate.
18220         (main): Fix typo in testing code that uncovered by above changes.
18221         (Local Variables): Remove -DHAVE_LIMITS_H from compile-command.
18222
18223 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18224
18225         * m4/human.m4 (gl_HUMAN): Require AM_STDBOOL_H.  Check for
18226         locale.h, localeconv.  This merges changes from coreutils.
18227
18228         * m4/mktime.m4 (AC_FUNC_MKTIME): New macro, taken from Autoconf CVS.
18229         It can be removed after the next Autoconf is released.
18230         * m4/exclude.m4 (gl_EXCLUDE): Don't check for sys/types.h; no loner
18231         needed.
18232
18233 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18234
18235         * lib/mktime.c: Fix Debian bug 177940
18236         <http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=177940>.
18237         (localtime_offset): Now long int, not time_t, because we want it
18238         to be guaranteed to be signed.  All uses changed.
18239         (__mktime_internal): If overflow would occur when adding offset,
18240         don't add it.
18241
18242         Merge 'human' changes from coreutils.  Rewrite to support
18243         locale-specific notations like thousands separators.
18244         * lib/human.c: Simplify authorship notice.
18245         Include human.h immediately after config.h.
18246         <sys/types.h>, <stdio.h>: Do not include; no longer needed.
18247         <limits.h>: Do not include, since human.h does.
18248         (SIZE_MAX, UINTMAX_MAX): New macros.
18249         <strings.h>: Include if HAVE_STRINGS_H, not if !HAVE_STRING_H.
18250         <locale.h>: Include if HAVE_LOCALE_H and HAVE_LOCALECONV.
18251         (HUMAN_READABLE_SUFFIX_LENGTH_MAX): New macro.
18252         (power_letter): Renamed from suffixes.
18253         (generate_suffix_backwards): Remove.
18254         (adjust_value): Now takes int style (because of human.h changes)
18255         and long double value (for greater precision on some platforms).
18256         (group_number): New function.
18257         (human_readable): Use it.  Use integer options, not enum.
18258         Put the options before the sizes in the arg list.
18259         Support all the new options.
18260         The old human_readable function has been removed;
18261         use inttostr.h instead.
18262         (human_readable, default_block_size, humblock):
18263         Use uintmax_t, not int, for block sizes.
18264         (human_readable_inexact, block_size_types): Remove.
18265         (block_size_opts): New constant.
18266         (human_options): Renamed from human_block_size, with new signature
18267         that allows block sizes up to UINTMAX_MAX.  All callers changed.
18268         * lib/human.h: Add copyright and authorship notice.
18269         Include <limits.h> and <stdbool.h> unconditionally.
18270         (PARAMS): Remove.  All uses removed.
18271         (LONGEST_HUMAN_READABLE): Add support for thousands separator.
18272         (enum human_inexact_style): Remove tag; now a nameless enum.
18273         (human_floor, human_ceiling, human_round_to_even): Now have
18274         values 2, 0, 1 rather than -1, 1, 0.
18275         (human_group_digits, human_suppress_point_zero, human_autoscale,
18276         human_base_1024, human_SI, human_B): New constants.
18277         (human_readable_inexact, human_block_size): Remove.
18278         (human_readable): Size args are now uintmax_t, not int.
18279         (human_options): New decl.
18280
18281         * lib/exclude.c: (new_exclude, add_exclude): Remove casts that are
18282         unnecessary now that we assume C89 or better.  This change
18283         imported from coreutils.
18284
18285         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18286         arbitrarily.  This is the same patch as 2003-05-28, but it got lost
18287         in the 2003-05-30 sync from glibc.
18288
18289         .h files should stand alone, but we shouldn't include <sys/types.h>
18290         if we can get away with just <stddef.h>.
18291
18292         * lib/__fpending.h, addext.c, backupfile.c, exclude.c, getline.c,
18293         malloc.c, putenv.c, realloc.c, strcasecmp.c: Include <stddef.h>
18294         rather than <sys/types.h>, as we merely need size_t.
18295         * lib/dirname.h, memcoll.h, xalloc.h, xmemcoll.h: Include <stddef.h>,
18296         to get size_t.
18297         * lib/hash.h, linebuffer.h, readtokens.h, stdio-safer.h, version-etc.h:
18298         Include <stdio.h>, to get FILE.
18299         * lib/memcasecmp.c: Don't include <sys/types.h>, as we can assume
18300         memcasecmp.h has included <stddef.h> and all we need is size_t.
18301         * lib/memcoll.c: Include "memcoll.h", which gets us size_t and checks
18302         our interface, instead of including <sys/types.h>
18303
18304 2003-06-04  Paul Eggert  <eggert@twinsun.com>
18305
18306         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): Comment out for
18307         now, as glibc mktime is buggy on non-glibc systems.
18308
18309 2003-06-03  Karl Berry  <karl@gnu.org>
18310
18311         * config/config.sub: update from prep.
18312
18313 2003-06-02  Paul Eggert  <eggert@twinsun.com>
18314
18315         [from coreutils]
18316         Fix some minor time-related bugs with POSIX time arguments.
18317         Some valid time stamps were being rejected (notably -1, and
18318         time stamps before 1900 on 64-bit hosts).  And some invalid
18319         time stamps were being accepted, e.g. September 31.
18320
18321         * lib/posixtm.h (posixtime): Return bool instead of time_t, so
18322         that we can return (time_t) -1 successfully.
18323         * lib/posixtm.c: Likewise.
18324         [HAVE_STDBOOL_H]: Include <stdbool.h>.
18325         (bool, false, true) [!HAVE_STDBOOL_H]: New type.
18326         (t): Remove static var.
18327         (year, posix_time_parse): Now takes struct tm * arg to modify, instead
18328         of static var.  All uses changed.
18329         (year): Do not reject years before 1900; they can occur with
18330         64-bit time_t.
18331         (posix_time_parse): Do not check for out-of-range components;
18332         that is now the caller's responsibility, since our checks were
18333         only approximations.
18334         (posixtime): Use mktime to check for out-of-range components,
18335         since it knows them exactly.
18336         If mktime returns (time_t) -1, check whether an error actually occurred
18337         by invoking localtime on -1.
18338         (main) [TEST_POSIXTIME]: Check for input data errors, and report
18339         posixtime failures better.
18340         Improve the test data (in comments only).
18341
18342 2003-06-02  Karl Berry  <karl@gnu.org>
18343
18344         * config/mkinstalldirs (version): new variable.
18345         (--version): new option.
18346         (usage): improve message.
18347
18348 2003-05-30  Karl Berry  <karl@gnu.org>
18349
18350         * lib/mktime.c: update from libc.
18351
18352 2003-05-30  Bruno Haible  <bruno@clisp.org>
18353
18354         * modules/gettext: Add files m4/nls.m4 and m4/po.m4.
18355         * config/config.rpath: Upgrade to gettext-0.12.1.
18356
18357 2003-05-30  Bruno Haible  <bruno@clisp.org>
18358
18359         * m4/gettext.m4: Upgrade to gettext-0.12.1.
18360         * m4/nls.m4: New file, from gettext-0.12.1.
18361         * m4/po.m4: New file, from gettext-0.12.1.
18362         * m4/progtest.m4: Upgrade to gettext-0.12.1.
18363
18364 2003-05-30  Bruno Haible  <bruno@clisp.org>
18365
18366         * lib/config.charset: Upgrade to gettext-0.12.1 and libiconv-1.9.1.
18367         * lib/localcharset.h: Likewise.
18368         * lib/localcharset.c: Likewise.
18369
18370 2003-05-29  Karl Berry  <karl@gnu.org>
18371
18372         * config/config.rpath: update from gettext.
18373
18374 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18375
18376         Assume the headers required for C89 freestanding compilers.
18377         * m4/backupfile.m4 (gl_BACKUPFILE): Don't check for limits.h.
18378         * m4/fsusage.m4 (gl_PREREQ_FSUSAGE_EXTRA): Likewise.
18379         * m4/human.m4 (gl_HUMAN): Likewise.
18380         * m4/pathmax.m4 (gl_PATHMAX): Likewise.
18381         * m4/rpmatch.m4 (gl_FUNC_RPMATCH): Likewise.
18382         * m4/userspec.m4 (gl_USERSPEC): Likewise.
18383         * m4/xreadlink.m4 (gl_XREADLINK): Likewise.
18384         * m4/xstrtol.m4 (gl_PREREQ_XSTRTOL): Likewise.
18385         * m4/quote.m4 (gl_QUOTE): Don't check for stddef.h.
18386
18387 2003-05-28  Paul Eggert  <eggert@twinsun.com>
18388
18389         Assume the headers required for C89 freestanding compilers.
18390         * lib/addext.c, lib/backupfile.c, lib/fsusage.c, lib/human.c,
18391         lib/pathmax.h, lib/rpmatch.c, lib/userspec.c, lib/xreadlink.c,
18392         lib/xstrtol.c: Include <limits.h> without checking for HAVE_LIMITS_H.
18393         * lib/backupfile.c, lib/fsusage.c, lib/hash.c, lib/human.c,
18394         lib/safe-read.c, lib/userspec.c, lib/xstrtol.c (CHAR_BIT): Don't
18395         define, since <limits.h> is guaranteed to do that.
18396         * lib/fatal.c: Include <stdarg.h> without checking for __STDC__.
18397         * lib/exclude.c: Include <stdbool.h> unconditionally.
18398         * lib/tempname.c: Include <stddef.h> unconditionally.
18399         * lib/hash.c: Include <limits.h>, since we no longer define CHAR_BIT.
18400         * lib/modechange.c, rpmatch.c (NULL): Don't define, since
18401         <stddef.h> does that.
18402         * lib/quote.c: Dont include <stddef.h> or <sys/types.h>; not needed.
18403         * lib/safe-read.c (INT_MAX): Don't define, since <limits.h> does that.
18404         * lib/safe-read.c (TYPE_MINIMUM, TYPE_MAXIMUM): Remove; no longer
18405         needed.
18406         * lib/xstrtol.c: Likewise.
18407         * lib/safe-read.c: Remove TYPE_SIGNED; no longer needed.
18408         * lib/savedir.c: Include <stddef.h> instead of defining NULL.
18409
18410         * lib/addext.c (addext): Use assignment rather than cast, to avoid
18411         warnings on some platforms.
18412
18413         * lib/mktime.c (__mktime_internal): Do not reject negative timestamps
18414         arbitrarily.
18415
18416 2003-05-26  Jim Meyering  <jim@meyering.net>
18417
18418         Merge in a change from coreutils:
18419         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Test the cache variable, not one
18420         that is guaranteed to be `no'.  Use `no_such_member' to indicate
18421         that condition, rather than `-1' which is slightly misleading.
18422         Change the name of the cache variable to have the gl_ prefix.
18423         Prompted by a patch from Richard Dawe for DJGPP.
18424
18425 2003-05-24  Karl Berry  <karl@gnu.org>
18426
18427         * config/config.guess: update from prep.
18428
18429 2003-05-22  Karl Berry  <karl@gnu.org>
18430
18431         * gnulib-tool (func_usage): =LIBRARY not =libRARY in help msg.
18432
18433 2003-05-20  Karl Berry  <karl@gnu.org>
18434
18435         * config/config.guess: update from prep.
18436
18437 2003-05-18  Karl Berry  <karl@gnu.org>
18438
18439         * config/srclistvars.sh (TEXMF): use TEXMFROOT instead, since TEXMF
18440         might actually be set by the user.
18441
18442         * config/depcomp, install-sh, mdate-sh: update from automake.
18443
18444 2003-05-17  Bruno Haible  <bruno@clisp.org>
18445
18446         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Fix a quoting bug leading to an
18447         invalid expansion for AC_EGREP_CPP.
18448         * m4/strtoimax.m4 (gl_FUNC_STRTOIMAX): Likewise.
18449         * m4/strtoumax.m4 (gl_FUNC_STRTOUMAX): Likewise.
18450         Suggested by Akim Demaille <akim@epita.fr> in
18451         http://mail.gnu.org/archive/html/bug-autoconf/2003-05/threads.html
18452
18453 2003-05-12  Jim Meyering  <jim@meyering.net>
18454
18455         * lib/strftime.c (my_strftime): Let the `-' (no-pad) flag affect
18456         the space-padded-by-default conversion specifiers, %e, %k, %l.
18457
18458 2003-05-12  Bruno Haible  <bruno@clisp.org>
18459
18460         * lib/linebreak.c (iconv_string_length): Don't return -1 just because
18461         the string is longer than 4 KB.
18462
18463 2003-05-11  Karl Berry  <karl@gnu.org>
18464
18465         * config/config.{guess,sub}: update from prep.
18466
18467 2003-05-09  Bruno Haible  <bruno@clisp.org>
18468
18469         * modules/error: Add m4/strerror_r.m4 to file list.
18470
18471 2003-05-03  Bruno Haible  <bruno@clisp.org>
18472
18473         Upgrade to Unicode-4.0.
18474         * lib/linebreak.c (nonspacing_table_data): Change width of U+00AD,
18475         U+0350..U+0357, U+035D..U+035F, U+0600..U+0603, U+0610..U+0615,
18476         U+0656..U+0658, U+0A01, U+0AE2..U+0AE3, U+0CBC, U+17B4..U+17B5,
18477         U+17DD, U+1920..U+1922, U+1927..U+192B, U+1932, U+1939..U+193B
18478         from 1 to 0. Change width of U+0CBF, U+0CC6, U+180E from 0 to 1.
18479         (uc_width): Change width of U+4DC0..U+4DFF from 2 to 1. Change width
18480         of U+2A6D7..U+2F7FF, U+2FA1E..U+2FFFD, U+30000..U+3FFFD from 1 to 2.
18481         Change width of U+E0100..U+E01EF from 1 to 0.
18482
18483 2003-04-25  Jim Meyering  <jim@meyering.net>
18484
18485         * lib/copy-file.c (copy_file_preserving): Declare buf_size to be
18486         of type size_t, not int.
18487
18488 2003-04-25  Bruno Haible  <bruno@clisp.org>
18489
18490         * lib/copy-file.c: Include <stddef.h>, for size_t.
18491
18492 2003-04-21  Paul Eggert  <eggert@twinsun.com>
18493
18494         * m4/error.m4 (gl_ERROR): Do not put under dynamic conditions some
18495         code which expansion is under static control.  Patch imported from
18496         Akim Demaille's patch to Bison; see
18497         <http://mail.gnu.org/archive/html/bison-patches/2003-03/msg00057.html>.
18498
18499 2003-04-14  Bruno Haible  <bruno@clisp.org>
18500
18501         * m4/error.m4 (jm_PREREQ_ERROR): Use AC_FUNC_VPRINTF.
18502
18503 2003-04-11  Jim Meyering  <jim@meyering.net>
18504
18505         Merge changes from Coreutils.
18506
18507         2003-03-22  Jim Meyering  <jim@meyering.net>
18508
18509         * lib/strftime.c (widen): Cast alloca return value to proper type.
18510
18511         2003-01-19  Ulrich Drepper  <drepper@redhat.com>
18512
18513         From GNU libc.
18514         * lib/strftime.c (my_strftime): Handle very large width
18515         specifications for numeric values correctly.  Improve checks for
18516         overflow.
18517
18518         2003-01-19  Jim Meyering  <jim@meyering.net>
18519
18520         * lib/strftime.c (widen) [COMPILE_WIDE]: Merge nearly-identical
18521         definitions.
18522         (nl_get_alt_digit) [! defined my_strftime]: Define.
18523         (my_strftime) [_NL_CURRENT]: Merge nearly-identical uses of
18524         _nl_get_alt_digit and _nl_get_walt_digit.
18525
18526         * lib/strftime.c (my_strftime): Merge in locale-related changes from
18527         libc. These changes have no effect outside of _LIBC.
18528
18529 2003-04-10  Bruno Haible  <bruno@clisp.org>
18530
18531         * modules/findprog: New file.
18532         * MODULES.html.sh (func_all_modules): Add it.
18533
18534 2003-04-10  Bruno Haible  <bruno@clisp.org>
18535
18536         * m4/findprog.m4: New file.
18537         * m4/eaccess.m4: New file.
18538
18539 2003-04-10  Bruno Haible  <bruno@clisp.org>
18540
18541         * lib/findprog.h: New file, from GNU gettext.
18542         * lib/findprog.c: New file, from GNU gettext.
18543
18544 2003-04-05  Jim Meyering  <jim@meyering.net>
18545
18546         Merge changes from Coreutils.
18547
18548         * lib/exclude.h (PARAMS): Remove definition and uses.
18549         * lib/exclude.c: Remove uses of `PARAMS'.
18550
18551         * lib/dirname.c [TEST_DIRNAME]: Update build instructions for test.
18552         Add test-cases for DOS filenames. Declare program_name.
18553         (main): Set up program_name.  Patch by Rich Dawe.
18554
18555         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Detect any
18556         error from mntctl.
18557         Use mntctl's return value to drive the entry-processing loop, since
18558         we can't rely on the value of the vmt_length member in the last
18559         entry.  On some systems doing so could result in exhausting
18560         virtual memory.  Based in part on a patch from Mike Jetzer.
18561
18562 2003-04-04  Bruno Haible  <bruno@clisp.org>
18563
18564         * modules/linebreak: New file.
18565         * MODULES.html.sh (func_all_modules): Add it.
18566
18567 2003-04-04  Bruno Haible  <bruno@clisp.org>
18568
18569         * m4/linebreak.m4: New file.
18570
18571 2003-04-04  Bruno Haible  <bruno@clisp.org>
18572
18573         * lib/linebreak.h: New file, from GNU gettext.
18574         * lib/linebreak.c: New file, from GNU gettext with slight
18575         modifications.
18576         * lib/lbrkprop.h: New file, from GNU gettext.
18577
18578 2003-04-03  Bruno Haible  <bruno@clisp.org>
18579
18580         * modules/utf8-ucs4: New file.
18581         * modules/utf16-ucs4: New file.
18582         * modules/ucs4-utf8: New file.
18583         * modules/ucs4-utf16: New file.
18584         * MODULES.html.sh (func_all_modules): Add them.
18585
18586 2003-04-03  Bruno Haible  <bruno@clisp.org>
18587
18588         * m4/utf-ucs4.m4: New file.
18589         * m4/ucs4-utf.m4: New file.
18590
18591 2003-04-03  Bruno Haible  <bruno@clisp.org>
18592
18593         * lib/utf8-ucs4.h: New file, from GNU gettext.
18594         * lib/utf16-ucs4.h: New file, from GNU gettext.
18595         * lib/ucs4-utf8.h: New file, from GNU gettext.
18596         * lib/ucs4-utf16.h: New file, from GNU gettext.
18597
18598 2003-04-02  Bruno Haible  <bruno@clisp.org>
18599
18600         * modules/binary-io: New file.
18601         * MODULES.html.sh (func_all_modules): Add it.
18602
18603 2003-04-02  Bruno Haible  <bruno@clisp.org>
18604
18605         * lib/binary-io.h: New file, from GNU gettext.
18606
18607 2003-04-01  Bruno Haible  <bruno@clisp.org>
18608
18609         * modules/pathname: New file.
18610         * MODULES.html.sh (func_all_modules): Add it.
18611
18612 2003-04-01  Bruno Haible  <bruno@clisp.org>
18613
18614         * lib/pathname.h: New file, from GNU gettext.
18615         * lib/concatpath.c: New file, from GNU gettext.
18616
18617 2003-03-30  Bruno Haible  <bruno@clisp.org>
18618
18619         * m4/copy-file.m4 (gl_COPY_FILE): Add check for chown().
18620
18621 2003-03-30  Bruno Haible  <bruno@clisp.org>
18622
18623         * lib/copy-file.c (copy_file_preserving): Don't set owner if the
18624         function chown() doesn't exist.
18625
18626 2003-03-28  Bruno Haible  <bruno@clisp.org>
18627
18628         * modules/copy-file: New file.
18629         * MODULES.html.sh (func_all_modules): Add it.
18630
18631 2003-03-28  Bruno Haible  <bruno@clisp.org>
18632
18633         * m4/copy-file.m4: New file.
18634
18635 2003-03-28  Bruno Haible  <bruno@clisp.org>
18636
18637         * lib/copy-file.h: New file, from GNU gettext.
18638         * lib/copy-file.c: New file, from GNU gettext.
18639
18640 2003-03-18  Jim Meyering  <jim@meyering.net>
18641
18642         * lib/quote.c (quote_n): Fix typo in comment.
18643
18644 2003-03-18  Bruno Haible  <bruno@clisp.org>
18645
18646         * m4/onceonly.m4: Use m4_defn instead of defn, for better error
18647         checking.
18648         * m4/onceonly_2_57.m4: Likewise.
18649
18650 2003-03-17  Bruno Haible  <bruno@clisp.org>
18651
18652         * m4/onceonly.m4: Require autoconf 2.54 or newer.
18653         (m4_quote): Remove macro.
18654         * m4/onceonly_2_57.m4: Require autoconf 2.54 or newer.
18655
18656 2003-03-14  Jim Meyering  <jim@meyering.net>
18657
18658         Merge changes from Coreutils.
18659         * lib/obstack.h (obstack_object_size): Declare temporary, __o,
18660         to be const, in order to avoid warnings.
18661         (obstack_room): Likewise.
18662         (obstack_empty_p): Likewise.
18663
18664 2003-03-14  Bruno Haible  <bruno@clisp.org>
18665
18666         * m4/onceonly_2_57.m4 (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE,
18667         AC_CHECK_DECLS_ONCE): Quote AC_FOREACH variable-expansions properly.
18668
18669 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18670
18671         Merge changes from Bison.
18672         * lib/obstack.h: (__INT_TO_PTR) [__STDC__]: Cast result to
18673         (void *) to avoid diagnostic with native c89 on SGI IRIX 6.5
18674         when compiling Bison 1.875's `bitset bset = obstack_alloc
18675         (bobstack, bytes);'.  Problem reported by Nelson H. F. Beebe.
18676         * lib/hash.c: Include <stdbool.h> unconditionally.
18677
18678 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18679
18680         * m4/onceonly.m4 (m4_quote): New macro.
18681         (AC_CHECK_HEADERS_ONCE, AC_CHECK_FUNCS_ONCE, AC_CHECK_DECLS_ONCE):
18682         Quote AC_FOREACH variable-expansions properly.
18683
18684 2003-03-13  Paul Eggert  <eggert@twinsun.com>
18685
18686         * doc/COPYING.DOC, fdl.texi: Sync with latest FSF version.
18687
18688 2003-03-09  Paul Eggert  <eggert@twinsun.com>
18689
18690         * lib/argmatch.c (EXIT_FAILURE): Define if the system doesn't.
18691         Reported by Bruce Becker; see:
18692         http://mail.gnu.org/archive/html/bug-bison/2003-03/msg00017.html
18693
18694 2003-03-03  Paul Eggert  <eggert@twinsun.com>
18695             Bruno Haible  <bruno@clisp.org>
18696
18697         * lib/mbswidth.h: Include <wchar.h>. Needed for UnixWare 7.1.1.
18698         Reported by John Hughes, see
18699         http://mail.gnu.org/archive/html/bug-bison/2003-02/msg00030.html
18700
18701 2003-02-20  Bruno Haible  <bruno@clisp.org>
18702
18703         * MODULES.html.sh (func_all_modules): Add poll.
18704
18705 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18706
18707         * modules/poll: New file.
18708
18709 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18710
18711         * lib/poll_.h: New file.
18712         * lib/poll.c: New file.
18713
18714 2003-02-19  Paolo Bonzini  <bonzini@gnu.org>
18715
18716         * m4/poll.m4: New file.
18717
18718 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18719
18720         * modules/mathl: New file.
18721
18722 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18723
18724         * lib/mathl.h: New file.
18725         * lib/acosl.c: New file.
18726         * lib/asinl.c: New file.
18727         * lib/atanl.c: New file.
18728         * lib/ceill.c: New file.
18729         * lib/cosl.c: New file.
18730         * lib/expl.c: New file.
18731         * lib/floorl.c: New file.
18732         * lib/frexpl.c: New file.
18733         * lib/ldexpl.c: New file.
18734         * lib/logl.c: New file.
18735         * lib/sincosl.c: New file.
18736         * lib/sinl.c: New file.
18737         * lib/sqrtl.c: New file.
18738         * lib/tanl.c: New file.
18739         * lib/trigl.c: New file.
18740         * lib/trigl.h: New file.
18741
18742 2003-02-18  Paolo Bonzini  <bonzini@gnu.org>
18743
18744         * m4/mathl.m4: New file.
18745
18746 2003-02-18  Bruno Haible  <bruno@clisp.org>
18747
18748         * MODULES.html.sh (func_all_modules): Add mathl.
18749
18750 2003-02-17  Bruno Haible  <bruno@clisp.org>
18751
18752         * modules/mkdtemp: New module.
18753         * MODULES.html.sh (func_all_modules): Add it.
18754
18755 2003-02-17  Bruno Haible  <bruno@clisp.org>
18756
18757         * m4/mkdtemp.m4: New file, from GNU gettext with modifications.
18758
18759 2003-02-17  Bruno Haible  <bruno@clisp.org>
18760
18761         * lib/mkdtemp.h: New file, from GNU gettext.
18762         * lib/mkdtemp.c: New file, from GNU gettext.
18763
18764 2003-02-02  Jim Meyering  <jim@meyering.net>
18765
18766         * m4/regex.m4 (jm_INCLUDED_REGEX): Detect broken re_search in
18767         e.g. glibc-2.2.93.
18768
18769 2003-01-31  Bruno Haible  <bruno@clisp.org>
18770
18771         * m4/rename.m4 (vb_FUNC_RENAME): Add a redirection from 'rename' to
18772         'rpl_rename'.
18773         * m4/strnlen.m4 (gl_FUNC_STRNLEN): Add a redirection from 'strnlen' to
18774         'rpl_strnlen'.
18775         * m4/strtod.m4 (gl_FUNC_STRTOD): Add a redirection from 'strtod' to
18776         'rpl_strtod'.
18777         * m4/utime.m4 (jm_FUNC_UTIME): Add a redirection from 'utime' to
18778         'rpl_utime'.
18779
18780 2003-01-31  Bruno Haible  <bruno@clisp.org>
18781
18782         * lib/rename.c: #undef rename before defining rpl_rename.
18783         * lib/strnlen.c: #undef strnlen, define rpl_strnlen instead of strnlen.
18784
18785 2003-01-30  Bruno Haible  <bruno@clisp.org>
18786
18787         * modules/vasnprintf, modules/vasprintf: New modules.
18788         * MODULES.html.sh (func_all_modules): Add them.
18789
18790 2003-01-30  Bruno Haible  <bruno@clisp.org>
18791
18792         * m4/signed.m4: New file, from GNU gettext.
18793         * m4/longdouble.m4: New file, from GNU gettext.
18794         * m4/wchar_t.m4: New file, from GNU gettext.
18795         * m4/wint_t.m4: New file, from GNU gettext.
18796         * m4/vasnprintf.m4: New file.
18797         * m4/vasprintf.m4: New file.
18798
18799 2003-01-30  Bruno Haible  <bruno@clisp.org>
18800
18801         * lib/printf-args.h: New file, from GNU gettext.
18802         * lib/printf-args.c: New file, from GNU gettext.
18803         * lib/printf-parse.h: New file, from GNU gettext.
18804         * lib/printf-parse.c: New file, from GNU gettext.
18805         * lib/vasnprintf.h: New file, from GNU gettext.
18806         * lib/vasnprintf.c: New file, from GNU gettext.
18807         * lib/asnprintf.c: New file, from GNU gettext.
18808         * lib/vasprintf.h: New file, from GNU gettext with modifications.
18809         * lib/vasprintf.c: New file, from GNU gettext.
18810         * lib/asprintf.c: New file, from GNU gettext.
18811
18812 2003-01-29  Bruno Haible  <bruno@clisp.org>
18813
18814         * modules/stpncpy: New module.
18815         * MODULES.html.sh (func_all_modules): Add it.
18816
18817 2003-01-29  Bruno Haible  <bruno@clisp.org>
18818
18819         * m4/stpncpy.m4: New file.
18820
18821 2003-01-29  Bruno Haible  <bruno@clisp.org>
18822
18823         * lib/stpncpy.h: New file, from GNU gettext with modifications.
18824         * lib/stpncpy.c: New file, from GNU gettext with modifications.
18825
18826 2003-01-28  Bruno Haible  <bruno@clisp.org>
18827
18828         * modules/c-ctype: New module.
18829         * MODULES.html.sh (func_all_modules): Add it.
18830
18831 2003-01-28  Bruno Haible  <bruno@clisp.org>
18832
18833         * lib/c-ctype.h: New file, from GNU gettext, with changes suggested by
18834         Paul Eggert.
18835         * lib/c-ctype.c: New file, from GNU gettext, with changes suggested by
18836         Paul Eggert.
18837
18838 2003-01-27  Bruno Haible  <bruno@clisp.org>
18839
18840         * modules/xsetenv: New module.
18841         * MODULES.html.sh (func_all_modules): Add it.
18842
18843 2003-01-27  Bruno Haible  <bruno@clisp.org>
18844
18845         * lib/xsetenv.h: New file, from GNU gettext.
18846         * lib/xsetenv.c: New file, from GNU gettext.
18847
18848 2003-01-23  Jim Meyering  <jim@meyering.net>
18849
18850         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Correct typo: s/-1/no/ that kept this
18851         from working on systems without dirfd (at least Irix and OSF1/Tru64).
18852
18853 2003-01-23  Bruno Haible  <bruno@clisp.org>
18854
18855         * modules/minmax: New module.
18856         * MODULES.html.sh (func_all_modules): Add it.
18857
18858 2003-01-23  Bruno Haible  <bruno@clisp.org>
18859
18860         * lib/minmax.h: New file, from GNU gettext, with comments from Paul
18861         Eggert.
18862
18863 2003-01-22  Bruno Haible  <bruno@clisp.org>
18864
18865         * modules/exit: New module.
18866         * MODULES.html.sh (func_all_modules): Add it.
18867
18868 2003-01-22  Bruno Haible  <bruno@clisp.org>
18869
18870         * lib/exit.h: New file, from GNU gettext.
18871
18872 2003-01-19  Bruno Haible  <bruno@clisp.org>
18873
18874         * gnulib-tool: Recognize option --extract-maintainer.
18875         (func_get_maintainer): New function.
18876         * modules/*: Add Maintainer entry.
18877
18878 2003-01-16  Jim Meyering  <jim@meyering.net>
18879
18880         * m4/regex.m4: The `regex' struct is both input and output.
18881         Initialize it before each use.  Patch by Tim Waugh.
18882
18883 2003-01-16  Bruno Haible  <bruno@clisp.org>
18884
18885         * MODULES.html.sh: Add a table of contents. Add the module name as
18886         leftmost column. Add hyperlinks.
18887
18888 2003-01-15  Bruno Haible  <bruno@clisp.org>
18889
18890         * m4/md5.m4 (gl_MD5): Require AC_C_INLINE.
18891
18892 2003-01-15  Bruno Haible  <bruno@clisp.org>
18893
18894         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): Also test the LL suffix.
18895         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Also test the ULL
18896         suffix.
18897
18898 2003-01-15  Bruno Haible  <bruno@clisp.org>
18899
18900         * m4/alloca.m4 (gl_FUNC_ALLOCA): Invoke AC_EGREP_CPP prerequisites.
18901
18902 2003-01-15  Bruno Haible  <bruno@clisp.org>
18903
18904         * lib/stpcpy.h (stpcpy): Use ANSI C function declarations.
18905         * lib/strcase.h (strcasecmp, strncasecmp): Likewise.
18906
18907 2003-01-14  Jim Meyering  <jim@meyering.net>
18908
18909         * lib/same.c (same_name): Tweak a comment.
18910
18911 2003-01-14  Bruno Haible  <bruno@clisp.org>
18912
18913         * lib/same.c (same_name): Reorder tests so as to avoid calling stat()
18914         when a string comparison is sufficient.
18915
18916 2003-01-14  Bruno Haible  <bruno@clisp.org>
18917
18918         * lib/readtokens.c (readtoken): Cast character to 'unsigned char', not
18919         'unsigned int'.
18920
18921 2003-01-14  Bruno Haible  <bruno@clisp.org>
18922
18923         * lib/hash-pjw.c: Add comment about low quality of this function.
18924
18925 2003-01-13  Bruno Haible  <bruno@clisp.org>
18926
18927         * modules/stpcpy: Distribute lib/stpcpy.h.
18928         * modules/setenv: Depend on alloca. Distribute lib/setenv.h.
18929
18930 2003-01-13  Bruno Haible  <bruno@clisp.org>
18931
18932         * modules/*: Add a description.
18933         * modules/strpbrk: Fix Makefile.am snippet.
18934         * modules/strtoimax: Fix dependencies.
18935         * modules/strtoumax: Likewise.
18936
18937 2003-01-13  Bruno Haible  <bruno@clisp.org>
18938
18939         * gnulib-tool (func_create_testdir): Substitute lib_OBJECTS.
18940         * modules/alloca (Makefile.am): All object files depend on alloca.h.
18941         * modules/stdbool (Makefile.am): All object files depend on stdbool.h.
18942
18943 2003-01-13  Bruno Haible  <bruno@clisp.org>
18944
18945         * gnulib-tool (func_create_testdir): Store config/* files in the main
18946         directory.
18947         * config.rpath: Move to ...
18948         * config/config.rpath: ... here.
18949         * modules/gettext: Contains config/config.rpath, not config.rpath.
18950         * modules/iconv: Likewise.
18951
18952 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18953
18954         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18955         to avoid collisions with libcurses and libreadline.
18956
18957         * m4/getstr.m4: Remove.
18958         * m4/getline.m4 (gl_PREREQ_GETLINE): Require AC_HEADER_STDC.
18959
18960 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18961
18962         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18963         to avoid collisions with libcurses and libreadline.
18964
18965         * lib/Makefile.am (libfetish_a_SOURCES): Remove getstr.c, getstr.h.
18966         * lib/getstr.h, getstr.c: Remove.
18967         * lib/getline.c: Include "getline.h", to check interface.
18968         Move body of old getstr.c here: this defines MIN_CHUNK and
18969         declares getdelim2, which is renamed from getstr.
18970         (getline, getdelim): Adjust to renaming of getstr -> getdelim2.
18971
18972         * lib/linebuffer.c (readlinebuffer): Renamed from readline.
18973         All uses changed.
18974         * lib/linebuffer.h: Likewise.
18975         (readline): Remove backward-compatibility macro.
18976
18977 2003-01-12  Paul Eggert  <eggert@twinsun.com>
18978
18979         Finish renaming getstr -> getdelim2 and readline -> readlinebuffer,
18980         to avoid collisions with libcurses and libreadline.
18981         * getstr: Remove.
18982         * MODULES.html.sh: Remove getstr.
18983         * modules/getline: Depend on unlocked-io, not getstr.
18984
18985 2003-01-12  Jim Meyering  <jim@meyering.net>
18986
18987         * lib/makepath.c: Don't test HAVE_ERRNO_H.  It's not necessary.
18988
18989 2003-01-10  Bruno Haible  <bruno@clisp.org>
18990
18991         * modules/alloca: Change Makefile.am requirements. Simplify Include
18992         requirements. Add lib/alloca_.h to file list.
18993
18994 2003-01-10  Bruno Haible  <bruno@clisp.org>
18995
18996         * m4/alloca.m4 (gl_FUNC_ALLOCA): Also define ALLOCA_H.
18997
18998 2003-01-10  Bruno Haible  <bruno@clisp.org>
18999
19000         * lib/alloca_.h: New file.
19001         * lib/getdate.y: Unconditionally include alloca.h.
19002         * lib/makepath.c: Likewise.
19003         * lib/setenv.c: Likewise.
19004         * lib/userspec.c: Likewise.
19005
19006 2003-01-09  Karl Berry  <karl@gnu.org>
19007
19008         * MODULES.html.sh: include `dirname $0` in PATH, to find
19009         gnulib-tool.
19010
19011 2003-01-09  Bruno Haible  <bruno@clisp.org>
19012
19013         * modules/stdbool: Change configure.ac, Makefile.am requirements.
19014         Simplify Include requirements. Add lib/stdbool.h.in to file list.
19015
19016 2003-01-09  Bruno Haible  <bruno@clisp.org>
19017
19018         * m4/stdbool.m4 (AM_STDBOOL_H): New macro.
19019
19020 2003-01-09  Bruno Haible  <bruno@clisp.org>
19021
19022         * lib/stdbool.h.in: New file.
19023
19024 2003-01-09  Bruno Haible  <bruno@clisp.org>
19025
19026         * gnulib-tool (func_all_modules): Ignore files ending in ~.
19027         * MODULES.html.sh: Likewise.
19028
19029 2003-01-08  Jim Meyering  <jim@meyering.net>
19030
19031         * lib/full-write.c: Undefine and define-away `const' after inclusion
19032         of errno.h, not before.  Suggestion from Bruno Haible.
19033
19034 2003-01-08  Bruno Haible  <bruno@clisp.org>
19035
19036         * modules/full-read: Depend on full-write.
19037
19038 2003-01-08  Bruno Haible  <bruno@clisp.org>
19039
19040         * lib/safe-read.c: Include specification header first, to ensure its
19041         selfcontainedness.
19042         * lib/full-write.c: Likewise.
19043
19044 2003-01-07  Jim Meyering  <jim@meyering.net>
19045
19046         * lib/full-write.c: Rework so that it may serve to define full_read,
19047         too.
19048         * lib/full-read.c: Simply #define FULL_READ and include full-write.c.
19049
19050 2003-01-07  Bruno Haible  <bruno@clisp.org>
19051
19052         * lib/strtoimax.c: Include <stdint.h> as an alternative to
19053         <inttypes.h>.
19054         * lib/xstrtol.h: Likewise.
19055         * lib/xstrtoimax.c: Likewise.
19056         * lib/xstrtoumax.c: Likewise.
19057         * lib/human.h: Likewise.
19058
19059         * lib/tempname.c: Include <inttypes.h> too. Avoids a compilation error
19060         on systems that have <inttypes.h> but not <stdint.h>.
19061
19062 2003-01-07  Bruno Haible  <bruno@clisp.org>
19063
19064         * MODULES.html.sh: Add copyright notice.
19065         (missed_files): Omit CVS directory entries.
19066         (func_module): Make it work with sed-3.02.
19067         * MODULES.txt: Remove file.
19068
19069 2003-01-06  Jim Meyering  <jim@meyering.net>
19070
19071         * lib/version-etc.c: Update year in translatable copyright string.
19072
19073 2003-01-03  Karl Berry  <karl@gnu.org>
19074
19075         * config/config.{guess,sub}: update from prep.
19076
19077 2003-01-02  Karl Berry  <karl@gnu.org>
19078
19079         * doc/COPYING.DOC: belatedly updated to 1.2.
19080
19081 2003-01-01  Karl Berry  <karl@gnu.org>
19082
19083         * gnulib-tool (func_verify_module): report module name $module in
19084         error message, not $1.
19085         * gnulib-tool (create-testdir): don't complain if destdir couldn't
19086         be created, only if it doesn't exist.
19087         * gnulib-tool (last_checkin_date): don't expand the $Date here.
19088
19089 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19090
19091         * m4/memcoll.m4 (gl_MEMCOLL): Require AC_FUNC_MEMCMP.
19092
19093 2002-12-31  Paul Eggert  <eggert@twinsun.com>
19094
19095         * lib/memcoll.c (memcoll): Fall back on a simple algorithm using
19096         memcmp if strcoll doesn't work.
19097
19098 2002-12-31  Bruno Haible  <bruno@clisp.org>
19099
19100         * lib/utime.c (utime_null): No need to call ftruncate if the file was
19101         nonempty.
19102
19103 2002-12-31  Bruno Haible  <bruno@clisp.org>
19104
19105         * lib/memcoll.c (STRCOLL): New macro.
19106         (memcoll): Use it.
19107
19108 2002-12-31  Bruno Haible  <bruno@clisp.org>
19109
19110         * lib/localcharset.h: New file.
19111         * lib/localcharset.c: Include it.
19112         * lib/unicodeio.c: Likewise.
19113
19114 2002-12-31  Bruno Haible  <bruno@clisp.org>
19115
19116         * lib/getstr.h (getstr): Define, to avoid clash with libcurses.
19117         * lib/linebuffer.h (readline): Define, to avoid clash with libreadline.
19118
19119 2002-12-31  Bruno Haible  <bruno@clisp.org>
19120
19121         * lib/getline.h: Include <stddef.h>, for size_t.
19122
19123         * lib/unicodeio.h: Include <stddef.h>, for size_t.
19124         * lib/unicodeio.c: Don't include <stddef.h>.
19125
19126 2002-12-31  Bruno Haible  <bruno@clisp.org>
19127
19128         * lib/getdate.y (get_date): Test HAVE_STRUCT_TM_TM_ZONE, not
19129         HAVE_TM_ZONE.
19130
19131 2002-12-24  Karl Berry  <karl@gnu.org>
19132
19133         * config/config.guess: update from prep.
19134
19135 2002-12-24  Bruno Haible  <bruno@clisp.org>
19136
19137         General infrasructure.
19138         * m4/README: Rewritten.
19139         * m4/onceonly.m4: New file.
19140         * m4/onceonly_2_57.m4: New file.
19141
19142         Module atexit.
19143         * m4/atexit.m4: New file.
19144
19145         Module strtod.
19146         * m4/strtod.m4: New file.
19147
19148         Module strtol.
19149         * m4/strtol.m4: New file.
19150
19151         Module strtoul.
19152         * m4/strtoul.m4: New file.
19153
19154         Module memchr.
19155         * m4/memchr.m4: New file.
19156
19157         Module memcmp.
19158         * m4/memcmp.m4 (gl_PREREQ_MEMCMP): New macro.
19159         (jm_FUNC_MEMCMP): Invoke it.
19160
19161         Module memcpy.
19162         * m4/memcpy.m4: New file.
19163
19164         Module memmove.
19165         * m4/memmove.m4: New file.
19166
19167         Module memset.
19168         * m4/memset.m4: New file.
19169
19170         Module strcspn.
19171         * m4/strcspn.m4: New file.
19172
19173         Module strpbrk.
19174         * m4/strpbrk.m4: New file.
19175
19176         Module strstr.
19177         * m4/strstr.m4: New file.
19178
19179         Module strerror.
19180         * m4/strerror.m4: New file.
19181
19182         Module mktime.
19183         * m4/mktime.m4: Renamed from jm-mktime.m4.
19184         (gl_PREREQ_MKTIME): New macro.
19185         (gl_FUNC_MKTIME): Renamed from jm_FUNC_MKTIME. Invoke gl_PREREQ_MKTIME.
19186
19187         Module malloc.
19188         * m4/malloc.m4 (gl_PREREQ_MALLOC): New macro.
19189         (jm_FUNC_MALLOC): Use AC_FUNC_MALLOC. Invoke gl_PREREQ_MALLOC.
19190         Don't define HAVE_DONE_WORKING_MALLOC_CHECK, since nothing uses it.
19191
19192         Module realloc.
19193         * m4/realloc.m4 (gl_PREREQ_REALLOC): New macro.
19194         (jm_FUNC_REALLOC): Use AC_FUNC_REALLOC. Invoke gl_PREREQ_REALLOC.
19195         Don't define HAVE_DONE_WORKING_REALLOC_CHECK, since nothing uses it.
19196
19197         Module strftime.
19198         * m4/tm_gmtoff.m4: New file, extracted from strftime.m4.
19199         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Use AC_FUNC_STRFTIME.
19200         Don't test for bcopy (we are not emacs). Invoke AC_TYPE_MBSTATE_T and
19201         gl_TM_GMTOFF.
19202         (_jm_STRFTIME_PREREQS, jm_FUNC_GNU_STRFTIME): Use onceonly macros.
19203
19204         Module xalloc.
19205         * m4/xalloc.m4: New file.
19206
19207         Module alloca.
19208         * m4/alloca.m4: New file.
19209
19210         Module putenv.
19211         * m4/putenv.m4 (gl_PREREQ_PUTENV): New macro.
19212         (jm_FUNC_PUTENV): Invoke it.
19213
19214         Module setenv.
19215         * m4/setenv.m4 (gt_FUNC_SETENV): New macro.
19216         (gt_CHECK_VAR_DECL): Fix quoting error that led to infinite loop in m4
19217         when invoked twice.
19218         (gt_PREREQ_SETENV, gt_PREREQ_UNSETENV): New macros, replacing old
19219         gt_FUNC_SETENV.
19220
19221         Module memrchr.
19222         * m4/memrchr.m4: New file.
19223
19224         Module stpcpy.
19225         * m4/stpcpy.m4: New file.
19226
19227         Module strcase.
19228         * m4/strcase.m4: New file.
19229
19230         Module strdup.
19231         * m4/strdup.m4: New file.
19232
19233         Module strnlen.
19234         * m4/strnlen.m4: New file.
19235
19236         Module strndup.
19237         * m4/strndup.m4: New file.
19238
19239         Module xstrtod.
19240         * m4/xstrtod.m4: New file.
19241
19242         Module xstrtol.
19243         * m4/xstrtol.m4: New file.
19244
19245         Module getdate.
19246         * m4/getdate.m4: New file.
19247
19248         Module unlocked-io.
19249         * m4/unlocked-io.m4: Renamed from jm-glibc-io.m4.
19250         (jm_FUNC_GLIBC_UNLOCKED_IO): Invoke AC_GNU_SOURCE. Use onceonly macros.
19251         * m4/jm-glibc-io.m4n: Remove file.
19252
19253         Module long-options.
19254         * m4/long-options.m4: New file.
19255
19256         Module md5.
19257         * m4/md5.m4: New file.
19258
19259         Module sha.
19260         * m4/sha.m4: New file.
19261
19262         Module getstr.
19263         * m4/getstr.m4: New file.
19264
19265         Module getline.
19266         * m4/getline.m4 (gl_PREREQ_GETLINE): New macro.
19267         (AM_FUNC_GETLINE): Invoke AC_GNU_SOURCE. Use <stdlib.h>, not
19268         <sys/types.h>, for size_t. Use the function name gnu_getline, not
19269         simply getline. Infoke gl_PREREQ_GETLINE.
19270
19271         Module obstack.
19272         * m4/obstack.m4: New file.
19273
19274         Module hash.
19275         * m4/hash.m4: New file.
19276
19277         Module readtokens.
19278         * m4/readtokens.m4: New file.
19279
19280         Module strverscmp.
19281         * m4/strverscmp.m4: New file.
19282
19283         Module stdbool.
19284         * m4/stdbool.m4 (AC_HEADER_STDBOOL): Add test for _Bool. Needed for
19285         OSF/1.
19286
19287         Module strtoll.
19288         * m4/strtoll.m4: New file.
19289
19290         Module strtoull.
19291         * m4/strtoull.m4: New file.
19292
19293         Module strtoimax.
19294         * m4/strtoimax.m4: New file.
19295
19296         Module strtoumax.
19297         * m4/strtoumax.m4: New file.
19298
19299         Module xstrtoimax.
19300         * m4/xstrtoimax.m4 (jm_XSTRTOIMAX): Renamed from
19301         jm_AC_PREREQ_XSTRTOIMAX.
19302         Moved the strtol prerequisites to strtol.m4.
19303         Moved the strtoll prerequisites to strtoll.m4.
19304         Moved the strtoimax prerequisites to strtoimax.m4.
19305
19306         Module xstrtoumax.
19307         * m4/xstrtoumax.m4 (jm_XSTRTOUMAX): Renamed from
19308         jm_AC_PREREQ_XSTRTOUMAX.
19309         Moved the strtoul prerequisites to strtoul.m4.
19310         Moved the strtoull prerequisites to strtoull.m4.
19311         Moved the strtoumax prerequisites to strtoumax.m4.
19312
19313         Module chown.
19314         * m4/chown.m4 (gl_PREREQ_CHOWN): New macro.
19315         (jm_FUNC_CHOWN): Use AC_FUNC_CHOWN. Invoke gl_PREREQ_CHOWN.
19316
19317         Module dup2.
19318         * m4/dup2.m4: New file.
19319
19320         Module ftruncate.
19321         * m4/ftruncate.m4 (gl_PREREQ_FTRUNCATE): New macro.
19322         (jm_FUNC_FTRUNCATE): Use AC_REPLACE_FUNCS. Invoke gl_PREREQ_FTRUNCATE.
19323
19324         Module getgroups.
19325         * m4/getgroups.m4 (gl_PREREQ_GETGROUPS): New macro.
19326         (jm_FUNC_GETGROUPS): Use AC_FUNC_GETGROUPS. Invoke gl_PREREQ_GETGROUPS.
19327
19328         Module gettimeofday.
19329         * m4/gettimeofday.m4 (gl_PREREQ_GETTIMEOFDAY): New macro.
19330         (AC_FUNC_GETTIMEOFDAY_CLOBBER): Use onceonly macros. Invoke
19331         gl_PREREQ_GETTIMEOFDAY.
19332
19333         Module mkdir.
19334         * m4/mkdir-slash.m4 (gl_PREREQ_MKDIR): New macro.
19335         (UTILS_FUNC_MKDIR_TRAILING_SLASH): Invoke gl_PREREQ_MKDIR.
19336
19337         Module mkstemp.
19338         * m4/mkstemp.m4 (gl_PREREQ_MKSTEMP): New macro.
19339         (jm_PREREQ_TEMPNAME): New macro, from prereq.m4. Also invoke
19340         jm_AC_TYPE_UINTMAX_T.
19341         (UTILS_FUNC_MKSTEMP): Invoke gl_PREREQ_MKSTEMP and jm_PREREQ_TEMPNAME.
19342
19343         Module stat.
19344         * m4/stat.m4 (gl_PREREQ_STAT): New macro.
19345         (jm_FUNC_STAT): Use AC_FUNC_STAT. Invoke gl_PREREQ_STAT.
19346
19347         Module lstat.
19348         * m4/lstat.m4 (gl_PREREQ_LSTAT): New macro.
19349         (jm_FUNC_LSTAT): Use AC_FUNC_LSTAT. Invoke gl_PREREQ_LSTAT.
19350
19351         Module timespec.
19352         * m4/timespec.m4 (gl_TIMESPEC): New macro.
19353         (jm_CHECK_TYPE_STRUCT_TIMESPEC): Add check for <sys/time.h>.
19354         * m4/st_mtim.m4: Indentation.
19355
19356         Module nanosleep.
19357         * m4/nanosleep.m4 (gl_PREREQ_NANOSLEEP): New macro.
19358         (jm_FUNC_NANOSLEEP): Add check for <sys/time.h>. Invoke
19359         gl_PREREQ_NANOSLEEP.
19360
19361         Module regex.
19362         * m4/regex.m4 (jm_PREREQ_REGEX): New macro.
19363         (jm_INCLUDED_REGEX): Invoke jm_PREREQ_REGEX.
19364         (gl_REGEX): New macro.
19365
19366         Module rename.
19367         * m4/rename.m4 (gl_PREREQ_RENAME): New macro.
19368         (vb_FUNC_RENAME): Invoke gl_PREREQ_RENAME.
19369
19370         Module rmdir.
19371         * m4/rmdir.m4: New file.
19372
19373         Module utime.
19374         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Use onceonly macros.
19375         * m4/utime.m4 (gl_PREREQ_UTIME): New macro.
19376         (jm_FUNC_UTIME): Invoke gl_PREREQ_UTIME.
19377
19378         Module dirname.
19379         * m4/dirname.m4: New file.
19380
19381         Module getopt.
19382         * m4/getopt.m4: New file.
19383
19384         Module unistd-safer.
19385         * m4/unistd-safer.m4: New file.
19386
19387         Module fnmatch.
19388         * m4/fnmatch.m4 (_AC_FUNC_FNMATCH_IF): Include <stdlib.h>, for exit()
19389         declaration.
19390         (gl_PREREQ_FNMATCH_EXTRA): New macro.
19391         (gl_FUNC_FNMATCH_POSIX): New macro.
19392         (gl_FUNC_FNMATCH_GNU): Renamed from AC_FUNC_FNMATCH_GNU. Invoke
19393         gl_PREREQ_FNMATCH_EXTRA. Use the function name gnu_fnmatch, not
19394         simply fnmatch.
19395
19396         Module exclude.
19397         * m4/exclude.m4: New file.
19398
19399         Module human.
19400         * m4/human.m4: New file.
19401
19402         Module acl.
19403         * m4/acl.m4: Nop.
19404
19405         Module backupfile.
19406         * m4/backupfile.m4: New file.
19407         * m4/d-ino.m4: Indentation.
19408
19409         Module fsusage.
19410         * m4/fsusage.m4 (gl_FSUSAGE): New macro.
19411         (jm_STATFS_TRUNCATES): New macro, from coreutils-4.5.4/configure.ac.
19412         (gl_PREREQ_FSUSAGE_EXTRA): New macro.
19413
19414         Module dirfd.
19415         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Invoke some AC_EGREP_CPP
19416         requirements.
19417
19418         Module euidaccess.
19419         * m4/euidaccess.m4: New file.
19420
19421         Module file-type.
19422         * m4/file-type.m4: New file.
19423
19424         Module fileblocks.
19425         * m4/fileblocks.m4: New file.
19426
19427         Module filemode.
19428         * m4/filemode.m4: New file.
19429
19430         Module isdir.
19431         * m4/isdir.m4: New file.
19432
19433         Module lchown.
19434         * m4/lchown.m4 (gl_PREREQ_LCHOWN): New macro.
19435         (jm_FUNC_LCHOWN): Invoke gl_PREREQ_LCHOWN.
19436
19437         Module makepath.
19438         * m4/makepath.m4: New file.
19439
19440         Module modechange.
19441         * m4/modechange.m4: New file.
19442
19443         Module mountlist.
19444         * m4/mountlist.m4: New file.
19445         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Use onceonly macros.
19446         Indentation.
19447
19448         Module path-concat.
19449         * m4/path-concat.m4: New file.
19450
19451         Module pathmax.
19452         * m4/pathmax.m4: New file.
19453
19454         Module same.
19455         * m4/same.m4: New file.
19456
19457         Module save-cwd.
19458         * m4/save-cwd.m4: New file.
19459
19460         Module savedir.
19461         * m4/savedir.m4: New file.
19462
19463         Module xgetcwd.
19464         * m4/xgetcwd.m4: New file.
19465         * m4/getcwd.m4 (AC_FUNC_GETCWD_NULL): Use onceonly macros.
19466
19467         Module xreadlink.
19468         * m4/xreadlink.m4: New file.
19469
19470         Module safe-read.
19471         * m4/safe-read.m4: New file.
19472
19473         Module safe-write.
19474         * m4/safe-write.m4: New file.
19475
19476         Module closeout.
19477         * m4/closeout.m4: New file.
19478
19479         Module stdio-safer.
19480         * m4/stdio-safer.m4: New file.
19481
19482         Module getpass.
19483         * m4/getpass.m4: New file.
19484
19485         Module getugroups.
19486         * m4/getugroups.m4: New file.
19487
19488         Module group-member.
19489         * m4/group-member.m4 (gl_PREREQ_GROUP_MEMBER): New macro.
19490         (jm_FUNC_GROUP_MEMBER): Invoke AC_GNU_SOURCE, gl_PREREQ_GROUP_MEMBER.
19491
19492         Module idcache.
19493         * m4/idcache.m4: New file.
19494
19495         Module userspec.
19496         * m4/userspec.m4: New file.
19497
19498         Module gettime.
19499         * m4/clock_time.m4: New file.
19500         * m4/gettime.m4: New file.
19501
19502         Module settime.
19503         * m4/settime.m4: New file.
19504
19505         Module posixtm.
19506         * m4/posixtm.m4: New file.
19507
19508         Module gethostname.
19509         * m4/gethostname.m4: New file.
19510
19511         Module canon-host.
19512         * m4/canon-host.m4: New file.
19513
19514         Module gettext.
19515         * m4/codeset.m4: New file, from gettext-0.11.5.
19516         * m4/gettext.m4: New file, from gettext-0.11.5.
19517         * m4/glibc21.m4: New file, from gettext-0.11.5.
19518         * m4/iconv.m4: New file, from gettext-0.11.5.
19519         * m4/intdiv0.m4: New file, from gettext-0.11.5.
19520         * m4/inttypes-pri.m4: New file, from gettext-0.11.5.
19521         * m4/inttypes.m4: New file, from gettext-0.11.5.
19522         * m4/inttypes_h.m4: New file, from gettext-0.11.5 with modifications.
19523         * m4/isc-posix.m4: New file, from gettext-0.11.5.
19524         * m4/lcmessage.m4: New file, from gettext-0.11.5.
19525         * m4/lib-ld.m4: New file, from gettext-0.11.5.
19526         * m4/lib-link.m4: New file, from gettext-0.11.5.
19527         * m4/lib-prefix.m4: New file, from gettext-0.11.5.
19528         * m4/progtest.m4: New file, from gettext-0.11.5.
19529         * m4/stdint_h.m4: New file, from gettext-0.11.5 with modifications.
19530         * m4/uintmax_t.m4: New file, from gettext-0.11.5 with modifications.
19531         * m4/ulonglong.m4: New file, from gettext-0.11.5 with modifications.
19532
19533         Module localcharset.
19534         * m4/localcharset.m4: New file.
19535
19536         Module hard-locale.
19537         * m4/hard-locale.m4: New file.
19538
19539         Module mbswidth.
19540         * m4/mbswidth.m4 (gl_MBSWIDTH): Renamed from jm_PREREQ_MBSWIDTH. Use
19541         onceonly macros.
19542         * m4/mbrtowc.m4: Add comment.
19543
19544         Module memcasecmp.
19545         * m4/memcasecmp.m4: New file.
19546
19547         Module memcoll.
19548         * m4/memcoll.m4: New file.
19549
19550         Module unicodeio.
19551         * m4/unicodeio.m4: New file.
19552
19553         Module rpmatch.
19554         * m4/rpmatch.m4: New file.
19555
19556         Module yesno.
19557         * m4/yesno.m4: New file.
19558
19559         Module exitfail.
19560         * m4/exitfail.m4: New file.
19561
19562         Module c-stack.
19563         * m4/c-stack.m4 (gl_C_STACK): New macro.
19564         (jm_PREREQ_C_STACK): Check for <sys/time.h>. Use onceonly macros.
19565
19566         Module error.
19567         * m4/error.m4 (gl_ERROR): New macro.
19568         (jm_PREREQ_ERROR): Use onceonly macros.
19569
19570         Module fatal.
19571         * m4/fatal.m4: New file.
19572
19573         Module getloadavg.
19574         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Use onceonly macros.
19575         (gl_FUNC_GETLOADAVG, gl_PREREQ_GETLOADAVG): New macros.
19576
19577         Module getpagesize.
19578         * m4/getpagesize.m4: New file.
19579
19580         Module getusershell.
19581         * m4/getusershell.m4: New file.
19582
19583         Module physmem.
19584         * m4/physmem.m4: New file.
19585
19586         Module posixver.
19587         * m4/posixver.m4: New file.
19588
19589         Module quotearg.
19590         * m4/quotearg.m4: New file.
19591
19592         Module quote.
19593         * m4/quote.m4: New file.
19594
19595         Module readutmp.
19596         * m4/readutmp.m4: New file, based on jm_PREREQ_READUTMP from prereq.m4.
19597
19598         Module sig2str.
19599         * m4/sig2str.m4: New file.
19600
19601         Other.
19602         * m4/longlong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Remove, moved to
19603         ulonglong.m4.
19604         * m4/intmax_t.m4: New file.
19605         * m4/d-type.m4: Indentation.
19606         * m4/jm-macros.m4: Update.
19607         * m4/prereq.m4 (jm_PREREQ): Update.
19608         (jm_PREREQ_ADDEXT): Remove, obsoleted by backupfile.m4.
19609         (jm_PREREQ_CANON_HOST): Remove, obsoleted by canon-host.m4.
19610         (jm_PREREQ_DIRNAME): Remove, obsoleted by dirname.m4.
19611         (jm_PREREQ_EXCLUDE): Remove, obsoleted by exclude.m4.
19612         (jm_PREREQ_GETPAGESIZE): Remove, obsoleted by getpagesize.m4.
19613         (jm_PREREQ_HARD_LOCALE): Remove, obsoleted by hard-locale.m4.
19614         (jm_PREREQ_HASH): Remove, obsoleted by hash.m4.
19615         (jm_PREREQ_HUMAN): Remove, obsoleted by human.m4.
19616         (jm_PREREQ_MEMCHR): Remove, obsoleted by memchr.m4.
19617         (jm_PREREQ_PHYSMEM): Remove, obsoleted by physmem.m4.
19618         (jm_PREREQ_POSIXVER): Remove, obsoleted by posixver.m4.
19619         (jm_PREREQ_QUOTEARG): Remove, obsoleted by quotearg.m4.
19620         (jm_PREREQ_READUTMP): Remove, obsoleted by readutmp.m4.
19621         (jm_PREREQ_REGEX): Remove, obsoleted by regex.m4.
19622         (jm_PREREQ_STRNLEN): Remove, obsoleted by strnlen.m4.
19623         (jm_PREREQ_TEMPNAME): Remove, obsoleted by mkstemp.m4.
19624         (jm_PREREQ_XGETCWD): Remove, obsoleted by xgetcwd.m4.
19625         (jm_PREREQ_XREADLINK): Remove, obsoleted by xreadlink.m4.
19626         * m4/readdir.m4 (jm_FUNC_READDIR): Use onceonly macros.
19627
19628 2002-12-24  Bruno Haible  <bruno@clisp.org>
19629
19630         * MODULES.txt: Update according to m4/ changes.
19631
19632         Module gettext.
19633         * config.rpath: New file, from gettext-0.11.5.
19634
19635         * modules/*: New module descriptions.
19636         * gnulib-tool: New file.
19637         * MODULES.html.sh: New file.
19638
19639 2002-12-21  Karl Berry  <karl@gnu.org>
19640
19641         * doc/fdl.texi: update to version 1.2.
19642
19643 2002-12-19  Karl Berry  <karl@gnu.org>
19644
19645         * config/config.guess: update from prep.
19646
19647 2002-12-18  Bruno Haible  <bruno@clisp.org>
19648
19649         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't test for localtime_r.
19650         * m4/jm-mktime.m4 (jm_FUNC_MKTIME): Likewise.
19651
19652 2002-12-17  Bruno Haible  <bruno@clisp.org>
19653
19654         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Remove checks for limits.h,
19655         stdlib.h, string.h.
19656
19657 2002-12-17  Bruno Haible  <bruno@clisp.org>
19658
19659         * lib/canon-host.c (strdup): Remove unused declaration.
19660
19661         * lib/fsusage.c: Include full_read.h.
19662         (get_fs_usage): Use full_read instead of safe_read.
19663
19664         * lib/utime.c (utime_null): Use SAFE_READ_ERROR.
19665
19666 2002-12-12  Karl Berry  <karl@gnu.org>
19667
19668         * config/config.guess: update from prep.
19669
19670 2002-12-11  Bruno Haible  <bruno@clisp.org>
19671
19672         * m4/setenv.m4: New file, from gettext-0.11.5.
19673
19674 2002-12-11  Bruno Haible  <bruno@clisp.org>
19675
19676         * lib/setenv.h: Rewritten to cope with systems that have setenv() but
19677         not unsetenv().
19678         * lib/setenv.c, unsetenv.c: Taken from glibc-2.2.4 with the following
19679         modifications:
19680
19681         2002-12-11  Bruno Haible  <bruno@clisp.org>
19682
19683                 * setenv.c (alloca): Fall back to malloc.
19684                 (freea): New macro.
19685                 (setenv): Use freea() to free memory allocated with alloca().
19686
19687         2002-11-13  Bruno Haible  <bruno@clisp.org>
19688
19689                 * setenv.c (compar_fn_t, __add_to_environ, setenv): Use ANSI C
19690                 function declarations.
19691                 * unsetenv.c (unsetenv): Likewise.
19692
19693         2002-03-04  Bruno Haible  <bruno@clisp.org>
19694
19695                 Portability to AIX 4.3.3.
19696                 * unsetenv.c: New file, extracted from setenv.c.
19697                 * setenv.c: Move the unsetenv() function to unsetenv.c.
19698
19699         2001-12-20  Bruno Haible  <bruno@clisp.org>
19700
19701                 * setenv.c (__add_to_environ): Don't call realloc(NULL,...),
19702                 use malloc instead. For SunOS 4.
19703
19704         2001-12-11  Bruno Haible  <bruno@clisp.org>
19705
19706                 * setenv.c: Declare alloca.
19707                 (compar_fn_t): New typedef.
19708                 (KNOWN_VALUE, STORE_VALUE): Use it.
19709
19710         * lib/Makefile.am (libfetish_a_SOURCES): Add setenv.c, unsetenv.c,
19711         setenv.h.
19712
19713 2002-12-10  Paul Eggert  <eggert@twinsun.com>
19714
19715         Port exclude.c and exclude.h to more non-GNU systems, e.g. Solaris 7.
19716         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE, EXCLUDE_WILDCARDS):
19717         Choose values that are less likely to collide with system fnmatch
19718         options.
19719         * lib/exclude.c (FNM_CASEFOLD, FNM_LEADING_DIR): Define to 0 if not
19720         defined (e.g., a pure POSIX system).
19721         (EXCLUDE_macros_do_not_collide_with_FNM_macros): Use FNM_PATHNAME
19722         instead of FNM_FILE_NAME, for compatibility with pure POSIX sytems.
19723
19724 2002-12-06  Paul Eggert  <eggert@twinsun.com>
19725
19726         Undo the 2001-07-02 change for jm-glibc-io, as it was too much of
19727         a pain in practice to deal with generated m4 files.  This change
19728         goes together with the 2002-12-04 unlocked-io.h change in ../lib.
19729
19730         * m4/Makefile.am.in (Makefile.am): Don't mention jm-glibc-io.m4n
19731         and jm-glibc-io.m4, as they are no longer a special case.
19732         * m4/jm-glibc-io.m4: Rename from jm-glibc-io.m4n, and remove the
19733         kludge and the auto-generation stuff.  Check only whether the
19734         functions are declared, not whether they exist, since older hosts
19735         that don't declare the functions can't use the optimization anyway.
19736
19737 2002-12-06  Jim Meyering  <jim@meyering.net>
19738
19739         * lib/error.c: Be consistent: change `#ifndef _LIBC' to `#if !_LIBC'.
19740
19741         Merge in changes from libc's misc/error.c, in preparation
19742         for the merge of gnulib's changes back into libc.
19743
19744         * lib/error.c (_): Define only if not already defined.
19745         Move definition to follow all #include directives.
19746         Include unlocked-io.h only if !_LIBC.
19747         [_LIBC]: Include <libio/libioP.h>.
19748         [USE_IN_LIBIO]: Include <libio/iolibio.h>
19749         (fflush): Tweak definition to use INTUSE.
19750         (putc): Define.
19751
19752 2002-12-05  Paul Eggert  <eggert@twinsun.com>
19753
19754         * lib/alloca.c [defined emacs]: Include "lisp.h".
19755         (xalloc_die) [defined emacs]: New macro.
19756         (free) [defined emacs && defined EMACS_FREE]: Define to EMACS_FREE.
19757         [! defined emacs]: Include <xalloc.h>.
19758         (POINTER_TYPE) [!defined POINTER_TYPE]: New macro.
19759         (pointer): Typedef to POINTER_TYPE *.
19760         (malloc): Remove decl; we now always use xmalloc.
19761         (alloca): Use old-style definition, since Emacs needs this.
19762         Check for arithmetic overflow when computing combined size.
19763
19764 2002-12-04  Paul Eggert  <eggert@twinsun.com>
19765
19766         Do not generate unlocked-io.h automatically, since it's easier to
19767         maintain it by hand.
19768
19769         * lib/unlocked-io.h: New file, from GNU diffutils,
19770         but with proper copyright notice and attribution.
19771         * lib/gen-uio: Remove.
19772         * lib/Makefile.am: Add copyright notice.
19773         (libfetish_a_SOURCES): Add unlocked-io.h.
19774         (BUILT_SOURCES, all-local): Remove unlocked-io.h.
19775         (DISTCLEANFILES, io_functions): Remove macros.
19776         (EXTRA_DIST): Remove gen_uio.
19777         (unlocked-io.h): Remove rule.
19778
19779 2002-12-04  Jim Meyering  <jim@meyering.net>
19780
19781         Reflect the fact that stat.c and lstat.c are no longer generated.
19782         * lib/Makefile.am (BUILT_SOURCES): Remove stat.c and lstat.c.
19783         (DISTCLEANFILES): Likewise.
19784         (EXTRA_DIST): Likewise.
19785         (all_local): Don't depend on stat.c or lstat.c.
19786         (stat.c, lstat.c): Remove rules.
19787         (EXTRA_DIST): Remove xstat.in.
19788
19789         * lib/xstat.in: Remove file.  Contents moved into stat.c.
19790         * lib/stat.c: New file.  Contents mostly from xstat.in.
19791         * lib/stat.c: Rework so that it may serve to define rpl_lstat, too.
19792         * lib/lstat.c: New file. Simply #define LSTAT and include stat.c.
19793
19794         * lib/safe-read.c: Rework so that it may serve to define safe_write,
19795         too.
19796         * lib/safe-write.c: Simply #define SAFE_WRITE and include safe-read.c.
19797
19798 2002-12-03  Jim Meyering  <jim@meyering.net>
19799
19800         * lib/safe-read.c, safe-write.c: Change variable names and comments,
19801         but not semantics, to minimize the differences between these two files.
19802         (safe_read): Change comment to mention SAFE_READ_ERROR.
19803
19804         * lib/safe-read.c (IS_EINTR): Define.
19805         (safe_read): Use IS_EINTR in place of in-function cpp directives.
19806
19807 2002-12-02  Jim Meyering  <jim@meyering.net>
19808
19809         * lib/safe-read.c (EINTR): Define.
19810         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
19811         (INT_MAX): Provide fallback.
19812         (safe_read): Rewrite to iterate IFF the read fails with EINTR.
19813
19814         * lib/safe-read.h (SAFE_READ_ERROR): Define.
19815
19816 2002-12-02  Bruno Haible  <bruno@clisp.org>
19817
19818         * lib/safe-write.c (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM):
19819         Define, taken from safe-read.c.
19820         (INT_MAX): Provide fallback.
19821         (safe_write): Rewrite to iterate IFF the write fails with EINTR.
19822         * lib/safe-write.h (SAFE_WRITE_ERROR): Define.
19823
19824         * lib/safe-read.c (EINTR): Remove definition.
19825         (safe_read): Don't use EINTR if it is absent.
19826
19827 2002-12-01  Jim Meyering  <jim@meyering.net>
19828
19829         * lib/safe-read.c: (safe_read): Also exit the loop when read returns
19830         zero.
19831         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM, INT_MAX): Define.
19832
19833 2002-11-27  Paul Eggert  <eggert@twinsun.com>
19834
19835         * lib/hash.c (hash_lookup, hash_get_first, hash_get_next,
19836         hash_find_entry, hash_rehash): Replace `if (limit <= value) abort ();'
19837         with `if (! (value < limit)) abort ();', for readability.
19838
19839 2002-11-26  Karl Berry  <karl@gnu.org>
19840
19841         * lib/strdup.c: copy from libc again, with jim's ok.
19842         * lib/.cppi-disable: re-add strdup.c
19843
19844 2002-11-25  Karl Berry  <karl@gnu.org>
19845
19846         * lib/strtoll.c: copy from libc, meaning we now #include <strtol.c>
19847         instead of "strtol.c".
19848
19849 2002-11-25  Karl Berry  <karl@gnu.org>
19850
19851         * config/install-sh: update from automake for variable quoting, $0 in
19852         error msgs, etc.
19853
19854         * config/srclist.txt ($LIBCSRC/time/mktime.c lib gpl): new entry.
19855         * config/srclist.txt ($LIBCSRC/sysdeps/generic/strtoll.c lib gpl): new
19856         entry.
19857
19858 2002-11-25  Jim Meyering  <jim@meyering.net>
19859
19860         * lib/mktime.c: Sync from libc, now that it has the latest fix.
19861
19862 2002-11-24  Karl Berry  <karl@gnu.org>
19863
19864         * lib/error.c, getopt.c, getopt.h, getopt1.c, obstack.c, regex.c,
19865         regex.h, strdup.c, strtoll.c, tempname.c: change license to gpl.
19866
19867 2002-11-24  Jim Meyering  <jim@meyering.net>
19868
19869         Update from coreutils:
19870
19871         * lib/mktime.c: Merge in changes from libc.
19872
19873         Avoid a link-time failure on some Linux systems.
19874         * lib/mktime.c (STATIC): Define to be empty (_LIBC) or `static'
19875         (otherwise).
19876         (__mon_yday): Declare with the STATIC attribute.
19877         (__mktime_internal): Likewise.
19878         Based on a report from Greg Schafer.
19879
19880 2002-11-23  Jim Meyering  <jim@meyering.net>
19881
19882         * lib/sig2str.c (str2signum, sig2str): Avoid a warning from gcc:
19883         Use `unsigned', not `int', as type of index.
19884
19885         * lib/xstat.in [@BEGIN_LSTAT_ONLY@]: Include <string.h>.
19886
19887         * lib/fsusage.c: Remove unneeded parentheses around operands of
19888         `defined'.
19889
19890 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19891
19892         * lib/quotearg.h: Allow multiple inclusion by surrounding with
19893         "#ifndef QUOTEARG_H_".  Include <stddef.h>, for size_t,
19894         so that we can be included first.
19895         (PARAMS): Remove; we now assume C89 or later.  All uses removed.
19896         * lib/quotearg.c: Include quotearg.h immediately after config.h.
19897         No need to include stddef.h or sys/types.h any more.
19898         Surround local include files with "", not "<>".
19899         Assume HAVE_LIMITS_H unconditionally, as we assume C89.
19900         Similarly, assume HAVE_C_BACKSLASH_A, CHAR_BIT, UCHAR_MAX, UINT_MAX,
19901         HAVE_STDLIB_H, HAVE_STRING_H, STDC_HEADERS.
19902         (HAVE_MBSINIT): Undef if !HAVE_MBRTOWC.
19903         (mbsinit): Define to 1 if !defined mbsinit && !HAVE_MBSINIT.
19904         (ISPRINT): Remove; no longer needed now that we assume C89.
19905
19906         (clone_quoting_options, quotearg_buffer, quotearg_n_options):
19907         Preserve errno.
19908
19909         (quotearg_buffer_restyled, quotearg_n, quotearg_n_style,
19910         quotearg_char): Use SIZE_MAX rather than
19911         (size_t) -1 when we are talking about "infinity".
19912
19913         (quotearg_buffer_restyled): Fix bug when quoting trigraphs.
19914
19915 2002-11-22  Paul Eggert  <eggert@twinsun.com>
19916
19917         * lib/hash.c: Avoid use of <assert.h>, as the GNU Coding Standards
19918         hint that one should use `if (! x) abort ();' rather than `assert
19919         (x);', and anyway it's one less thing to worry about configuring.
19920         (hash_lookup, hash_get_first, hash_get_next, hash_find_entry,
19921         hash_rehash, hash_insert): Use abort rather than assert.
19922
19923 2002-11-22  Bruno Haible  <bruno@clisp.org>
19924
19925         * lib/safe-read.h: Assume C89. Add comments.
19926         (safe_read): Change return type to size_t.
19927         * lib/safe-read.c (safe_read): Change return type to size_t. Handle
19928         byte counts > SSIZE_MAX correctly.
19929         * lib/safe-write.h: New file.
19930         * lib/safe-write.c: New file.
19931         * lib/full-read.h: New file.
19932         * lib/full-read.c: New file.
19933         * lib/full-write.h: Assume C89. Add comments.
19934         * lib/full-write.c: Include safe-write.h.
19935         (full_write): Rewritten to use safe_write.
19936         Suggested by Jim Meyering and Paul Eggert.
19937
19938 2002-11-21  Jim Meyering  <jim@meyering.net>
19939
19940         * lib/strdup.c (strdup): Tweak comment and initial #if/#include.
19941
19942         Merge in changes from the coreutils.
19943
19944         2002-09-25  Paul Eggert  <eggert@twinsun.com>
19945         * lib/fsusage.c [! HAVE_INTTYPES_H && HAVE_STDINT_H] Include
19946         <stdint.h>.
19947         (UINTMAX_MAX) [!defined UINTMAX_MAX]: New macro.
19948         (PROPAGATE_ALL_ONES): Work even if X is unsigned and narrower than
19949         int.  Work more efficiently if X is the same width as uintmax_t.
19950         Do not compare X to -1, to avoid bogus compiler warning.
19951         (get_fs_usage): (uintmax_t) -1 -> UINTMAX_MAX to avoid a cast.
19952         Don't assume that f_frsize and f_bsize are the same type.
19953
19954         * lib/mountlist.c: #undef MNT_IGNORE before defining it, to avoid
19955         warning on FreeBSD.
19956
19957         * lib/makepath.c (make_path): Restore umask *before* creating the final
19958         component.
19959         (make_path): Minor reformatting.
19960
19961         * lib/xmalloc.c: Adjust to work with new autoconf macros,
19962         AC_FUNC_MALLOC and AC_FUNC_REALLOC: test #ifndef
19963         HAVE_MALLOC/HAVE_REALLOC.
19964
19965         * lib/mountlist.h (ME_DUMMY): Don't count entries of type `auto' as
19966         dummy ones.  At least on GNU/Linux systems, `auto' means something
19967         else.
19968         From Michael Stone.
19969
19970 2002-11-21  Bruno Haible  <bruno@clisp.org>
19971
19972         Remove case insensitive option matching.
19973         * lib/argmatch.h (argcasematch): Remove declaration.
19974         (ARGCASEMATCH): Remove macro.
19975         (__xargmatch_internal): Remove case_sensitive argument.
19976         (XARGMATCH): Update.
19977         (XARGCASEMATCH): Remove macro.
19978         * lib/argmatch.c (argmatch): Renamed from __argmatch_internal. Remove
19979         case_sensitive argument.
19980         (argcasematch): Remove function.
19981         (__xargmatch_internal): Remove case_sensitive argument.
19982         (main): Use XARGMATCH instead of XARGCASEMATCH.
19983
19984         * lib/xmalloc.c: Change compile-time error message. Add comment about
19985         required autoconf version.
19986
19987 2002-11-20  Paul Eggert  <eggert@twinsun.com>
19988
19989         Merge argmatch cleanups from Bison.  Assume C89.
19990
19991         * lib/argmatch.c: Include config.h here, not in argmatch.h.
19992         Include stdlib.h, for EXIT_FAILURE.
19993         Always include <string.h>, since we assume C89.
19994         (EXIT_FAILURE): Remove pre-C89 bug workaround.
19995         * lib/argmatch.h: Do not include <config.h> or <sys/types.h>.
19996         Include <stddef.h> instead, since it's all we need for size_t.
19997         (PARAMS): Remove.  All uses removed.
19998         (ARRAY_CARDINALITY): Do not bother to #undef.
19999         (ARRAY_CARDINALITY, ARGMATCH, ARGCASEMATCH, invalid_arg,
20000         ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20001         Remove unnecessary parentheses.
20002         (ARGMATCH_VALID, XARGMATCH, XARGCASEMATCH):
20003         Insert necessary parentheses.
20004         (ARGMATCH_CONSTRAINT, ARGMATCH_VERIFY): New macros.
20005         (ARGMATCH_ASSERT): Use ARGMATCH_CONSTRAINT.
20006
20007 2002-11-19  Bruno Haible  <bruno@clisp.org>
20008
20009         * lib/mbswidth.c: Include mbswidth.h right at the beginning.
20010         * lib/mbswidth.h: Include <stddef.h>, for size_t.
20011
20012         * lib/mbswidth.h (PARAMS): Remove macro.
20013         (mbswidth, mbsnwidth): Use ANSI C function declarations.
20014         * lib/mbswidth.c (mbswidth, mbsnwidth): Likewise.
20015
20016         * lib/gcd.h (PARAMS): Remove macro.
20017         (gcd): Use ANSI C function declarations.
20018         * lib/gcd.c (gcd): Likewise.
20019
20020 2002-11-15  Bruno Haible  <bruno@clisp.org>
20021
20022         * lib/strcspn.c: Include <stddef.h>.
20023         (strcspn): Use ANSI C function declaration. Change return type to
20024         size_t. Use NULL.
20025         * lib/strpbrk.c: Minimize diffs to glibc. Include <stddef.h>.
20026         (strpbrk): Use NULL.
20027         * lib/strpbrk.h (PARAMS): Remove macro.
20028         (strpbrk): Use ANSI C function declaration.
20029         * lib/strstr.c: Don't include <sys/types.h>.
20030         * lib/strstr.h (PARAMS): Remove macro.
20031         (strstr): Use ANSI C function declarations.
20032
20033 2002-11-14  Karl Berry  <karl@gnu.org>
20034
20035         * config/mkinstalldirs: `do' on separate line, instead of
20036         `for var; do'.
20037
20038 2002-11-06  Bruno Haible  <bruno@clisp.org>
20039
20040         * lib/gcd.h (gcd): Change argument type to 'unsigned long'.
20041         * lib/gcd.c (gcd): Likewise.
20042
20043 2002-11-05  Bruno Haible  <bruno@clisp.org>
20044
20045         * lib/gcd.h: New file, from gettext-0.11.5.
20046         * lib/gcd.c: New file, from gettext-0.11.5.
20047
20048 2002-11-05  Bruno Haible  <bruno@clisp.org>
20049
20050         * lib/error.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20051         * lib/getopt.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20052         * lib/obstack.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20053         * lib/regex.c [!_LIBC]: Include gettext.h instead of <libintl.h>.
20054
20055         * lib/argmatch.c: Include gettext.h instead of <locale.h> and
20056         <libintl.h>.
20057         * lib/makepath.c: Include gettext.h instead of <locale.h> and
20058         <libintl.h>.
20059
20060         * lib/closeout.c: Include gettext.h instead of <libintl.h>.
20061         * lib/human.c: Include gettext.h instead of <libintl.h>.
20062         * lib/quotearg.c: Include gettext.h instead of <libintl.h>.
20063         * lib/rpmatch.c: Include gettext.h instead of <libintl.h>.
20064         * lib/unicodeio.c: Include gettext.h instead of <libintl.h>.
20065         * lib/userspec.c: Include gettext.h instead of <libintl.h>.
20066         * lib/version-etc.c: Include gettext.h instead of <libintl.h>.
20067         * lib/xmalloc.c: Include gettext.h instead of <libintl.h>.
20068         (textdomain): Remove definition.
20069         * lib/xmemcoll.c: Include gettext.h instead of <libintl.h>.
20070
20071         * lib/long-options.c: Remove include of <libintl.h> and definition of
20072         _.
20073         * lib/same.c: Remove include of <libintl.h> and definition of _.
20074
20075 2002-11-04  Owen Taylor  <otaylor@redhat.com>
20076
20077         * lib/config.charset: A few additions for Solaris.
20078
20079 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20080
20081         Make it possible to build libcharset with CC=gcc CFLAGS="-x c++".
20082         * lib/localcharset.c (locale_charset): Declare as extern "C".
20083
20084 2002-11-04  Bruno Haible  <haible@clisp.cons.org>
20085
20086         * lib/config.charset: msdos in uk_UA uses CP1125.
20087
20088 2002-11-04  Bruno Haible  <bruno@clisp.org>
20089
20090         * lib/stpcpy.h: New file, from GNU gettext-0.11.5.
20091         * lib/strcase.h: New file, from GNU gettext-0.11.5.
20092         * lib/strpbrk.h: New file, from GNU gettext-0.11.5.
20093         * lib/strstr.h: New file, from GNU gettext-0.11.5.
20094         * lib/xgetcwd.h: New file, from GNU gettext-0.11.5.
20095
20096 2002-11-04  Bruno Haible  <bruno@clisp.org>
20097
20098         * lib/localcharset.c (locale_charset): Don't return an empty string.
20099
20100 2002-11-04  Bruno Haible  <bruno@clisp.org>
20101
20102         * lib/localcharset.c (get_charset_aliases): Add more Windows specific
20103         aliases.
20104
20105 2002-11-04  Bruno Haible  <bruno@clisp.org>
20106
20107         * lib/config.charset: Update for newest glibc. Add canonical names
20108         ISO-8859-14, KOI8-T, TCVN5712-1, GEORGIAN-PS.
20109
20110 2002-11-04  Bruno Haible  <bruno@clisp.org>
20111
20112         * lib/config.charset: Add support for NetBSD.
20113
20114 2002-11-04  Bruno Haible  <bruno@clisp.org>
20115
20116         * lib/config.charset [msdosdjgpp]: For Russian, use CP866.
20117
20118 2002-11-01  Bruno Haible  <bruno@clisp.org>
20119
20120         * configure.in: Add AC_CONFIG_AUX_DIR call.
20121         (AC_OUTPUT): Add m4/Makefile, lib/Makefile. Remove doc/Makefile,
20122         test/Makefile.
20123         * Makefile.in (subdirs): Add m4, lib. Remove doc, test.
20124
20125 2002-09-28  Karl Berry  <karl@gnu.org>
20126
20127         * config/srclist.txt: can't copy install-sh/mkinstalldirs from
20128         installed automake until the next release, since changes have been
20129         made.
20130
20131 2002-09-25  Karl Berry  <karl@gnu.org>
20132
20133         * lib/strdup.c: copy from libc/string (via ../config/srclist*).
20134         * lib/getopt*: copy from libc/posix.
20135         * lib/gettext.h: copy from gettext.
20136         * lib/.cppi-disable: add strdup.c, gettext.h.
20137
20138 2002-09-25  Karl Berry  <karl@gnu.org>
20139
20140         * config/srclist.txt: enable gettext.h check.
20141         * config/config.{guess,sub}: update from prep.
20142         * config/depcomp, install-sh, mdate-sh, missing, mkinstalldirs: update
20143                 from automake 1.6.3.
20144         See srclist*.
20145
20146 2002-08-23  Stefan Monnier  <monnier@cs.yale.edu>
20147
20148         * regex.c (PATFETCH): Remove the translating fetch.
20149         (PATFETCH_RAW): Rename to PATFETCH.
20150         (set_image_of_range): New fun.
20151         (SET_RANGE_TABLE_WORK_AREA): Use it.
20152         (regex_compile): Don't translate the pattern chars so eagerly.
20153         Only do it when inserting an `exactn' bytecode or when handling
20154         a char-range.
20155         (mutually_exclusive_p): Avoid empty statement.
20156
20157 2002-07-06  Jim Meyering  <meyering@lucent.com>
20158
20159         * m4/README: Don't mention Makefile.am.in.
20160         Outline how I've tested changes to .m4 files.  Yep, it's a pain.
20161
20162 2002-07-01  Jim Meyering  <meyering@lucent.com>
20163
20164         * lib/c-stack.c: Include sys/time.h.
20165         From Volker Borchert.
20166
20167 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20168
20169         * m4/fnmatch.m4 (_AC_LIBOBJ_FNMATCH): Check for btowc.
20170
20171 2002-06-26  Paul Eggert  <eggert@twinsun.com>
20172
20173         * lib/fnmatch.c, fnmatch_loop.c (WIDE_CHAR_SUPPORT):
20174         New macro.  Use it uniformly instead of
20175         (defined HAVE_WCTYPE_H && defined HAVE_WCHAR_H).
20176         It also uses HAVE_BTOWC, to fix a porting bug on Solaris 2.5.1
20177         reported by Vin Shelton.
20178
20179 2002-06-22  Paul Eggert  <eggert@twinsun.com>
20180
20181         * lib/c-stack.h (segv_handler, c_stack_action) [! defined SA_SIGINFO]:
20182         Do not assume SA_SIGINFO behavior.
20183         Bug reported by Jim Meyering on NetBSD 1.5.2.
20184
20185 2002-06-22  Jim Meyering  <meyering@lucent.com>
20186
20187         * m4/c-stack.m4: New file, from diffutils-2.8.2.
20188         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_C_STACK.
20189
20190         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Don't require AC__GNU_SOURCE,
20191         now that configure.ac uses AC_GNU_SOURCE.
20192         (jm_MACROS): Rename: jm_FUNC_FNMATCH to AC_FUNC_FNMATCH_GNU.
20193         * m4/prereq.m4 (jm_PREREQ_EXCLUDE): Likewise, wrt jm_FUNC_FNMATCH.
20194
20195         Update to latest tools.  Suggestions from Paul Eggert.
20196         * m4/stdbool.m4: New file, from diffutils-2.8.2.
20197         * m4/gnu-source.m4: Update from diffutils-2.8.2.
20198         * m4/fnmatch.m4: Likewise.
20199         * m4/prereq.m4: Change each use of AC_CHECK_HEADERS(stdbool.h)
20200         to AC_HEADER_STDBOOL
20201
20202 2002-06-22  Jim Meyering  <meyering@lucent.com>
20203
20204         * lib/fnmatch.c (ISASCII, ISPRINT): Undefine, to avoid warning about
20205         redefinition due to Solaris 2.6's definition in /usr/include/sys/euc.h.
20206
20207 2002-06-22  Jim Meyering  <meyering@lucent.com>
20208
20209         * lib/c-stack.c, lib/c-stack.h: New files, from diffutils-2.8.2.
20210
20211         * lib/exitfail.c, exitfail.h: Likewise.
20212         * lib/Makefile.am (libfetish_a_SOURCES): Add exitfail.c and exitfail.h.
20213
20214         * lib/Makefile.am (libfetish_a_SOURCES): Add fnmatch_.h in place
20215         of fnmatch.h.
20216         (EXTRA_DIST): Add fnmatch_loop.c.
20217         (libfetish_a_SOURCES): Add c-stack.c and c-stack.h.
20218
20219         * lib/fnmatch_loop.c: New file, from diffutils-2.8.2.
20220         * lib/fnmatch.c: Update from diffutils-2.8.2.
20221         * lib/fnmatch_.h: New file.  From diffutils-2.8.2.
20222         * lib/fnmatch.h: Remove file.
20223
20224 2002-06-21  Jim Meyering  <meyering@lucent.com>
20225
20226         * m4/c-bs-a.m4: Add comment, from diffutils-2.8.2.
20227         * m4/mbrtowc.m4: Likewise.
20228
20229         * m4/mbstate_t.m4: Update from diffutils-2.8.2.
20230         * m4/mbswidth.m4: Reflect name change:
20231         s/AC_MBSTATE_T/AC_TYPE_MBSTATE_T.
20232         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
20233
20234         * m4/lib-link.m4: Update from gettext-0.11.2.
20235         * m4/gettext.m4: Likewise.
20236
20237         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for hurd.h.
20238         From Alfred M. Szmidt.
20239
20240 2002-06-18  Paul Eggert  <eggert@twinsun.com>
20241
20242         * lib/file-type.h: Report an error if neither S_ISREG nor
20243         S_IFREG is defined, instead of using a test specific to glibc
20244         2.2.  This should be safe, since POSIX requires S_ISREG and
20245         Unix Version 7 had S_IFREG.  We don't need to check for
20246         <sys/types.h> since we don't use any symbols that it defines.
20247
20248 2002-06-15  Richard Dawe  <richdawe@bigfoot.com>
20249
20250         * lib/Makefile.am (lstat.c, stat.c, .sin.sed): Use t-$@, rather than
20251         $@-t, so that each temporary file name is unique and valid in the first
20252         8 characters, for operation under DOS.
20253
20254 2002-06-15  Paul Eggert  <eggert@twinsun.com>
20255
20256         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Check for st_author.
20257
20258 2002-06-15  Jim Meyering  <meyering@lucent.com>
20259
20260         Work even with DJGPP 2.03, which lacks support for symlinks.
20261         From Richard Dawe.
20262         * lib/xstat.in (S_ISLNK): Define to 0 if neither S_ISLNK nor S_IFLNK
20263         is defined.
20264         * lib/lchown.c (S_ISLNK): Likewise.
20265
20266 2002-06-15  Jim Meyering  <meyering@lucent.com>
20267
20268         * lib/file-type.h (FILE_TYPE_H): Guard entire contents with #ifndef.
20269         For GNU libc 2.2 and newer, ensure that <sys/types.h> and <sys/stat.h>
20270         have been included before this file.
20271
20272 2002-06-14  Jim Meyering  <meyering@lucent.com>
20273
20274         * lib/file-type.h: Use the version from diffutils-2.8.2.
20275         * lib/file-type.c: Likewise.
20276
20277 2002-06-07  Jim Meyering  <meyering@lucent.com>
20278
20279         * m4/prereq.m4 (jm_PREREQ_STAT): Check for sys/param.h and sys/mount.h.
20280         They're needed at least for NetBSD 1.5.2.
20281         ($statxfs_includes): Include those same headers.
20282         ($statxfs_includes): Include sys/vfs.h if available.
20283         ($statxfs_includes): Likewise for sys/statvfs.h.
20284         Check for the following members in both structs statfs and statvfs:
20285         f_basetype, f_type, f_fsid.__val, f_namemax, f_namelen.
20286
20287 2002-06-01  Jim Meyering  <meyering@lucent.com>
20288
20289         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename macro:
20290         s/D_TYPE_IN_DIRENT/HAVE_STRUCT_DIRENT_D_TYPE/.
20291
20292 2002-05-28  Jim Meyering  <meyering@lucent.com>
20293
20294         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `mkdir', not `rmdir'.
20295         Reported by Volker Borchert.
20296
20297 2002-05-27  Jim Meyering  <meyering@lucent.com>
20298
20299         Fix a problem seen only on nonconforming systems whereby ls.c's
20300         use of localtime, and then of gettimeofday would cause trouble:
20301         the localtime call used to initialize rpl_gettimeofday's save
20302         mechanism would clobber ls's current local time information so
20303         that in any long listing the first file would always be listed
20304         with date 1970-01-01.  Analysis by Volker Borchert.
20305
20306         * lib/gettimeofday.c (localtime): Undefine.
20307         (rpl_localtime): New function.
20308
20309 2002-05-27  Jim Meyering  <meyering@lucent.com>
20310
20311         * m4/gettimeofday.m4 (AC_FUNC_GETTIMEOFDAY_CLOBBER): Also replace
20312         localtime.
20313
20314         * m4/readdir.m4 (jm_FUNC_READDIR): Undefine `rmdir' so we don't try to
20315         use the replacement function; it wouldn't resolve at link time.
20316         Reported by Volker Borchert.
20317
20318 2002-05-22  Jim Meyering  <meyering@lucent.com>
20319
20320         * lib/Makefile.am (libfetish_a_SOURCES): Add file-type.c and
20321         file-type.h.
20322         * lib/file-type.h: New file.
20323         * lib/file-type.c (file_type): New file/function.  Extracted from
20324         diffutils.
20325
20326 2002-04-30  Jim Meyering  <meyering@lucent.com>
20327
20328         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_STAT.
20329
20330 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20331
20332         * m4/prereq.m4 (jm_PREREQ_SIG2STR): Remove; all callers changed.
20333
20334 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20335
20336         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): Check for stdlib.h.
20337         Do not check for alloca.h (no longer used) or stdbool.h (was never
20338         used?).  Add AM_C_PROTOTYPES since hard-locale.h uses it.
20339
20340 2002-04-29  Paul Eggert  <eggert@twinsun.com>
20341
20342         * lib/hard-locale.c: Upgrade to version used in GNU Diffutils 2.8.1.
20343
20344 2002-04-29  Jim Meyering  <meyering@lucent.com>
20345
20346         * m4/jm-macros.m4 (jm_MACROS): Remove use of AC_FUNC_STRNLEN.
20347         * m4/prereq.m4: Add jm_PREREQ_STRNLEN.
20348         Use AC_FUNC_STRNLEN here instead.
20349
20350         * m4/jm-macros.m4: Don't AC_REQUIRE([AC_PROG_CC_STDC]).
20351         With autoconf-2.53a, it's part of AC_PROG_CC.
20352
20353 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20354
20355         * m4/jm-macros.m4 (jm_MACROS): Add AC_REPLACE_FUNCS(sig2str).
20356         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_SIG2STR.
20357
20358 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20359
20360         * lib/sig2str.h, lib/sig2str.c: New files.
20361         * lib/Makefile.am (libfetish_a_SOURCES): Add sig2str.h.
20362
20363 2002-04-28  Paul Eggert  <eggert@twinsun.com>
20364
20365         * lib/sig2str.h (SIGNUM_BOUND): Do not use WTERMSIG, to avoid
20366         depending on <sys/wait.h> and WTERMSIG.  Default to 64 instead
20367         of 127, since 64 is the largest conceivable number for ancient
20368         nonstandard hosts.
20369         * lib/sig2str.c: Do not include <sys/wait.h>; no longer needed.
20370
20371 2002-04-28  Jim Meyering  <meyering@lucent.com>
20372
20373         * lib/sig2str.c (WTERMSIG): Remove definition (unused).
20374
20375 2002-04-24  Jim Meyering  <meyering@lucent.com>
20376
20377         * m4/prereq.m4 (jm_PREREQ_HARD_LOCALE): New macro.
20378         (jm_PREREQ): Use it.
20379
20380         * m4/getloadavg.m4: Check for these headers: locale.h unistd.h
20381         mach/mach.h fcntl.h.
20382         Check for this function: setlocale.
20383
20384 2002-04-24  Jim Meyering  <meyering@lucent.com>
20385
20386         * lib/gettext.h: New file, from Gettext.
20387         * lib/Makefile.am (INCLUDES): Remove -I../intl.
20388         (libfetish_a_SOURCES): Add gettext.h.
20389
20390 2002-04-16  Jim Meyering  <meyering@lucent.com>
20391
20392         * m4/prereq.m4 (jm_PREREQ_READUTMP): Also check for these members:
20393         ut_pid, ut_id, ut_exit.
20394
20395 2002-04-16  Jim Meyering  <meyering@lucent.com>
20396
20397         * lib/readutmp.h (UT_TYPE): Remove definition (now in who.c).
20398         (HAVE_STRUCT_XTMP_UT_EXIT, HAVE_STRUCT_XTMP_UT_ID): Define.
20399         (HAVE_STRUCT_XTMP_UT_PID, HAVE_STRUCT_XTMP_UT_TYPE): Define.
20400
20401 2002-04-12  Jim Meyering  <meyering@lucent.com>
20402
20403         * m4/ls-mntd-fs.m4 (checking for getmntinfo function...): Remove
20404         now-bogus check for f_type in sys/mount.h.  Instead, just test for the
20405         existence of the getmntinfo function.  Needed for Darwin 5.3.
20406
20407         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Also detect when dirfd is a macro.
20408         This is necessary at least on Darwin 5.3.
20409
20410         * m4/jm-macros.m4: Don't AC_REPLACE(strnlen), now that we use
20411         AC_FUNC_STRNLEN.  Otherwise, we'd end up putting two copies of
20412         strnlen.o in the library, and that makes some versions of ranlib
20413         object.
20414
20415 2002-04-12  Jim Meyering  <meyering@lucent.com>
20416
20417         * lib/dirfd.h (dirfd): Elide prototype if dirfd is a macro.
20418
20419 2002-04-09  Jim Meyering  <meyering@lucent.com>
20420
20421         * m4/malloc.m4: (jm_FUNC_MALLOC): Change the `checking ...' message
20422         to be more precise.  Rather than saying we're checking whether the
20423         function `works', say what we're testing.
20424         * m4/realloc.m4 (jm_FUNC_REALLOC): Likewise.
20425         Reported by Bruno Haible.
20426
20427 2002-03-10  Jim Meyering  <meyering@lucent.com>
20428
20429         * lib/makepath.c (make_path): Remove a comma from a diagnostic.
20430         Suggestion from Santiago Vila.
20431
20432 2002-03-08  Jim Meyering  <meyering@lucent.com>
20433
20434         * lib/rename.c: Mention that this wrapper is needed also on
20435         mips-dec-ultrix4.4 systems.
20436
20437 2002-03-02  Jim Meyering  <meyering@lucent.com>
20438
20439         * lib/gettime.c (gettime): Test HAVE_CLOCK_GETTIME,
20440         not HAVE_CLOCK_SETTIME.
20441
20442 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20443
20444         * m4/jm-macros.m4 (jm_MACROS): Do not replace stime; no longer used.
20445         Check for clock_settime.
20446
20447 2002-02-27  Paul Eggert  <eggert@twinsun.com>
20448
20449         * lib/nanosleep.h: Rename to....
20450         * lib/timespec.h: New name for nanosleep.h.  All uses changed.
20451
20452         * lib/gettime.c: New file.
20453         * lib/settime.c: New file.
20454         * lib/stime.c: Remove.
20455
20456         * lib/Makefile.am (libfetish_a_SOURCES): Add gettime.c, settime.c,
20457         timespec.h.  Remove nanosleep.h.
20458
20459 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20460
20461         * m4/acl.m4: New file.
20462         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_ACL.
20463         Do not check for acl or sys/acl.h, as AC_FUNC_ACL does that now.
20464
20465 2002-02-25  Paul Eggert  <eggert@twinsun.com>
20466
20467         * lib/acl.c, lib/acl.h: New files.
20468         * lib/Makefile.am (libfetish_a_SOURCES): Add acl.h, acl.c.
20469
20470 2002-02-24  Jim Meyering  <meyering@lucent.com>
20471
20472         * lib/strnlen.c (strnlen): Define-away/undef so that an inconsistent
20473         prototype in string.h (on at least AIX4.3.2.0 w/gcc-2.95.3) doesn't
20474         cause trouble.  Reported by Nelson Beebe.
20475
20476 2002-02-23  Paul Eggert  <eggert@twinsun.com>
20477
20478         * lib/path-concat.c (xpath_concat): Reorder code to pacify
20479         compilers that don't know that xalloc_die never returns.
20480
20481 2002-02-20  Jim Meyering  <meyering@lucent.com>
20482
20483         * lib/getdate.c: Regenerate using bison-1.33.
20484
20485 2002-02-17  Jim Meyering  <meyering@lucent.com>
20486
20487         * config/config.guess (main): Don't use `head -1'; it's no longer
20488         portable. Use `sed 1q' instead.
20489
20490 2002-02-16  gettextize  <bug-gnu-gettext@gnu.org>
20491
20492         * m4/codeset.m4: Upgrade to gettext-0.11.
20493         * m4/gettext.m4: Upgrade to gettext-0.11.
20494         * m4/glibc21.m4: Upgrade to gettext-0.11.
20495         * m4/iconv.m4: Upgrade to gettext-0.11.
20496         * m4/isc-posix.m4: Upgrade to gettext-0.11.
20497         * m4/lcmessage.m4: Upgrade to gettext-0.11.
20498         * m4/lib-ld.m4: New file, from gettext-0.11.
20499         * m4/lib-link.m4: New file, from gettext-0.11.
20500         * m4/lib-prefix.m4: New file, from gettext-0.11.
20501         * m4/progtest.m4: Upgrade to gettext-0.11.
20502
20503 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20504
20505         * m4/prereq.m4 (jm_PREREQ_POSIXVER): New macro.
20506         (jm_PREREQ): Use it.
20507
20508 2002-02-15  Paul Eggert  <eggert@twinsun.com>
20509
20510         * lib/posixver.c, lib/posixver.h: New files.
20511         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20512
20513 2002-02-02  Paul Eggert  <eggert@twinsun.com>
20514             Bruno Haible  <bruno@clisp.org>
20515
20516         * lib/unicodeio.h (print_unicode_char): Add exit_on_error argument.
20517         (fwrite_success_callback): New declaration.
20518         * lib/unicodeio.c (unicode_to_mb): New function, extracted from
20519         print_unicode_char. Call failure callback instead of error.
20520         (fwrite_success_callback): New function.
20521         (exit_failure_callback): New function.
20522         (fallback_failure_callback): New function.
20523         (print_unicode_char): Call unicode_to_mb.
20524
20525 2002-01-26  Jim Meyering  <meyering@lucent.com>
20526
20527         * m4/jm-macros.m4 (jm_MACROS): Require autoconf-2.52g.
20528         * m4/strnlen.m4: Remove file, now that it's part of autoconf.
20529
20530 2002-01-26  Jim Meyering  <meyering@lucent.com>
20531
20532         * lib/Makefile.am (getdate$U.o): Depend on unlocked-io.h.
20533
20534 2002-01-22  Paul Eggert  <eggert@twinsun.com>
20535
20536         * m4/jm-macros.m4 (jm_MACROS): Require AC_FUNC_FSEEKO.
20537
20538 2002-01-22  Jim Meyering  <meyering@lucent.com>
20539
20540         * lib/Makefile.am (Makefile): Don't depend on $(BUILT_SOURCES).
20541         Otherwise, some versions of automake would omit the rule that makes
20542         Makefile from Makefile.in.
20543
20544 2002-01-21  Paul Eggert  <eggert@twinsun.com>
20545
20546         * lib/xmemcoll.h, lib/xmemcoll.c: New files.
20547         * lib/Makefile.am (libfetish_a_SOURCES): Add them.
20548         * lib/memcoll.c: Include errno.h, and declare errno if not defined.
20549         (memcoll): Set errno to zero if there is no error.
20550
20551         * lib/quotearg.c (quotearg_buffer_restyled):
20552         Fix bug with quoting buffers containing NUL when backslashing escapes.
20553         This bug was exposed by the other changes in this patch.
20554         (quotearg_n_options): New arg ARGSIZE.
20555         All callers changed.
20556         (quoting_options_from_style): New function.
20557         (quotearg_n_style): Use it.
20558         (quotearg_n_style_mem): New function.
20559
20560         * lib/quotearg.h (quotearg_n_style_mem): New function.
20561
20562 2002-01-19  Jim Meyering  <meyering@lucent.com>
20563
20564         * m4/jm-macros.m4 (jm_MACROS): Use AC_FUNC_STRNLEN.
20565         Remove useless quotes: DF_PROG="df".
20566         * m4/strnlen.m4: New file.
20567
20568 2002-01-16  Paul Eggert  <eggert@twinsun.com>
20569
20570         * lib/backupfile.c (ISDIGIT): Comment fix.
20571         * lib/getdate.y (ISDIGIT): Likewise.
20572         * lib/posixtm.c (ISDIGIT, year): Likewise.
20573         * lib/strverscmp.c (ISDIGIT): Likewise.
20574         * lib/userspec.c (ISDIGIT): Likewise.
20575
20576 2002-01-16  Jim Meyering  <meyering@lucent.com>
20577
20578         * lib/getdate.y: Add three semicolons, each just before a closing
20579         brace. Bison (as of version 1.31) no longer papers over that mistake.
20580
20581 2002-01-05  Jim Meyering  <meyering@lucent.com>
20582
20583         * lib/version-etc.c (version_etc_copyright): Update copyright year.
20584
20585 2001-12-19  Paul Eggert  <eggert@twinsun.com>
20586
20587         * lib/closeout.c (close_stdout_status): If ferror (stdout), do
20588         not silently exit merely because the output buffer happens to
20589         have nothing pending.
20590
20591 2001-12-18  Paul Eggert  <eggert@twinsun.com>
20592
20593         See the big note in ../ChangeLog.
20594         * lib/human.c (suffixes): Prefer K to k for 1024.
20595         (generate_suffix_backwards): New function.
20596         (human_readable_inexact): Use it.
20597         * lib/xstrtol.c (__xstrtol): If there is no number but there
20598         is a valid suffix, assume 1.  "MB" now means decimal, "MiB" binary.
20599         Accept 'K' as well as 'k'.
20600
20601 2001-12-15  Jim Meyering  <meyering@lucent.com>
20602
20603         * lib/regex.h (__restrict_arr): Update from libc.
20604
20605         * lib/mountlist.h (ME_REMOTE): Recognize file systems of type smbfs
20606         as `remote' if the name starts with `//'.  Suggested by Michael Stone.
20607         (STREQ): Define.
20608
20609 2001-12-14  Jim Meyering  <meyering@lucent.com>
20610
20611         * m4/jm-macros.m4 (jm_MACROS): Check for iswspace.
20612         Suggestion from Bruno Haible.
20613
20614 2001-12-10  Jim Meyering  <meyering@lucent.com>
20615
20616         * lib/linebuffer.c: Remove explicit declarations of xmalloc and
20617         xrealloc, Instead, include "xalloc.h".
20618         (initbuffer): Don't cast xmalloc return value to char*.
20619         (readline): Reword comment.
20620         Don't cast xrealloc return value to char*
20621         Return NULL, not 0.
20622
20623 2001-12-09  Jim Meyering  <meyering@lucent.com>
20624
20625         * lib/modechange.c (mode_compile): Add cast to avoid pedantic warning
20626         about `signed and unsigned type in conditional expression'.
20627         * lib/posixtm.c (posix_time_parse): Likewise.
20628
20629         * lib/xreadlink.c (xreadlink): Add cast to avoid a pedantic warning.
20630
20631         * lib/readtokens.c (readtoken): Declare an index to be of type unsigned
20632         to avoid a pedantic warning.
20633
20634         * lib/getstr.c: Don't include assert.h.
20635         (getstr): Remove warning-evoking assertions.
20636         Return -1 if offset parameter is out of bounds.
20637         Change the type of a local from int to size_t.
20638
20639         * lib/strftime.c (my_strftime_localtime_r): Include this function
20640         definition in the `#if ! HAVE_TM_GMTOFF' block.
20641
20642         * lib/xgethostname.c: Remove declarations of xmalloc and xrealloc.
20643         Include xalloc.h instead.
20644
20645 2001-12-02  Jim Meyering  <meyering@lucent.com>
20646
20647         * lib/tempname.c: Don't declare getenv, thus reverting the change of
20648         2001-11-18.  It's no longer necessary, now that stdlib.h is always
20649         included.
20650
20651         * lib/regex.c [!__BOUNDED_POINTERS__]: Define away __bounded,
20652         __unbounded, and __ptrvalue.  Reported by Uwe H. Steinfeld.
20653
20654 2001-11-30  Akim Demaille  <akim@epita.fr>
20655
20656         * lib/xstrdup.c: Include xalloc.h, so that xstrdup is declared
20657         before being defined.
20658
20659 2001-11-27  Paul Eggert  <eggert@twinsun.com>
20660
20661         * lib/quotearg.h (quotearg_n, quotearg_n_style):
20662         First arg is int, not unsigned.
20663         * lib/quotearg.c (quotearg_n, quotearg_n_style): Likewise.
20664         (SIZE_MAX, UINT_MAX): New macros.
20665         (quotearg_n_options): Abort if N is negative.
20666         Avoid overflow check on hosts where size_t is 64 bits and int
20667         is 32 bits, as overflow is impossible there.
20668         Fix off-by-one typo that caused unnecessary reallocation.
20669
20670 2001-11-27  Jim Meyering  <meyering@lucent.com>
20671
20672         * lib/tempname.c: Merge with version from libc.
20673         * lib/regex.c: Likewise.
20674
20675         * lib/tempname.c: Include stdlib.h unconditionally.  On some old
20676         systems for which STDC_HEADERS is 0, it was not included, resulting in
20677         a warning about an integer-to-pointer conversion problem with getenv.
20678         Reported by Volker Borchert.
20679
20680 2001-11-26  Jim Meyering  <meyering@lucent.com>
20681
20682         * lib/gtod.h: Remove file.
20683         * lib/Makefile.am (libfetish_a_SOURCES): Remove gtod.h.
20684         * lib/gettimeofday.c: Don't include gtod.h.
20685         (GTOD_init): Remove function.
20686         (rpl_gettimeofday): Do its job here instead, rather than aborting.
20687         Suggestion from Volker Borchert.
20688
20689 2001-11-23  Jim Meyering  <meyering@lucent.com>
20690
20691         * lib/hash.h (struct hash_table): Don't define here.  Merely declare
20692         it.
20693         * lib/hash.c (struct hash_table): Define it here instead.
20694
20695 2001-11-22  Jim Meyering  <meyering@lucent.com>
20696
20697         * lib/hash.h: Bracket contents of file with #ifndef HASH_H_ ... #endif.
20698
20699 2001-11-20  Jim Meyering  <meyering@lucent.com>
20700
20701         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Update comment to reflect that
20702         SunOS 4.1.4 and Solaris 2.5.1 lose, too.
20703
20704 2001-11-19  Jim Meyering  <meyering@lucent.com>
20705
20706         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Don't bother with a temporary
20707         directory.  Use "conftestXXXXXX" as the template.
20708         Suggestion from Paul Eggert.
20709
20710         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): Close each descriptor
20711         immediately, so the test doesn't mistakenly hit the max-open-files
20712         limit.
20713
20714 2001-11-18  Paul Eggert  <eggert@twinsun.com>
20715
20716         * lib/tempname.c (TMP_MAX): Remove; no longer needed.
20717         (TEMPORARIES): New macro.
20718         (__gen_tempname): Use TEMPORARIES rather than TMP_MAX.  This
20719         removes an artificial limitation (e.g. HP-UX 10.20, where
20720         TMP_MAX is 17576).
20721
20722 2001-11-18  Jim Meyering  <meyering@lucent.com>
20723
20724         * m4/prereq.m4 (jm_PREREQ_TEMPNAME): Check for declaration of getenv.
20725
20726 2001-11-18  Jim Meyering  <meyering@lucent.com>
20727
20728         * lib/tempname.c [!HAVE_DECL_GETENV]: Declare getenv to avoid warning
20729         on SunOS 4.
20730
20731         * lib/Makefile.am (Makefile): Depend on $(BUILT_SOURCES), so those
20732         files will be created before anything else.
20733
20734 2001-11-17  Paul Eggert  <eggert@twinsun.com>
20735
20736         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): Do not define
20737         WINSIZE_IN_PTEM if <termios.h> defines struct winsize.
20738
20739 2001-11-17  Jim Meyering  <meyering@lucent.com>
20740
20741         * m4/mkstemp.m4 (UTILS_FUNC_MKSTEMP): New file and macro.
20742         Prompted by a report from Bob Proulx.
20743
20744         * m4/jm-macros.m4 (jm_MACROS): Don't test for mkstemp here.
20745         Instead, require UTILS_FUNC_MKSTEMP.
20746
20747 2001-11-17  Jim Meyering  <meyering@lucent.com>
20748
20749         * m4/jm-macros.m4 (jm_MACROS): Remove code to set POW_LIBM.
20750         Now, that's done as part of AC_FUNC_STRTOD.
20751
20752 2001-11-17  Jim Meyering  <meyering@lucent.com>
20753
20754         * lib/modechange.c (mode_adjust): Fix error introduced on 1999-04-26
20755         that made e.g., `chmod a=,o=w,g=o F' cause F to be group readable
20756         rather than group writable.  Patch by Juan F. Codagnone.
20757
20758         * lib/readtokens.c: Remove explicit declarations of xmalloc and
20759         xrealloc, Instead, include "xalloc.h".
20760
20761         * lib/mountlist.c: Include unlocked-io.h after all system headers.
20762         Remove explicit declarations of xmalloc, xrealloc,
20763         and xstrdup.  Instead, include "xalloc.h".
20764
20765         * lib/argmatch.c, closeout.c, error.c, exclude.c: Include
20766         unlocked-io.h.
20767         * lib/fatal.c, getdate.y, getpass.c, getstr.c, getusershell.c:
20768         Likewise.
20769         * lib/mountlist.c, posixtm.c, readtokens.c, readutmp.c: Likewise.
20770
20771         * lib/regex.c, sha.c, version-etc.c, yesno.c: Likewise.
20772         Reported by Padraig Brady.
20773
20774         * lib/mkstemp.c: #undef mkstemp.
20775         Include config.h.
20776         (rpl_mkstemp): Rename from mkstemp.
20777         Protoize.
20778
20779 2001-11-16  Jim Meyering  <meyering@lucent.com>
20780
20781         * lib/physmem.c [HAVE_SYS_PSTAT_H]: Include <sys/pstat.h>.
20782         (physmem_total) [HAVE_PSTAT_GETSTATIC]: If sysconf couldn't be used to
20783         determine the amount of total physical memory, use pstat_getstatic.
20784         HPUX-11 doesn't define _SC_PHYS_PAGES.
20785         (physmem_available) [HAVE_PSTAT_GETSTATIC && HAVE_PSTAT_GETDYNAMIC]:
20786         If sysconf couldn't be used to determine the amount of available
20787         physical memory, use both pstat_getstatic and pstat_getdynamic.
20788         Based on a patch from Bob Proulx.
20789
20790 2001-11-10  Jim Meyering  <meyering@lucent.com>
20791
20792         * m4/prereq.m4 (jm_PREREQ_PHYSMEM): New function.
20793         (jm_PREREQ): Use it.
20794
20795 2001-11-09  Jim Meyering  <meyering@lucent.com>
20796
20797         * m4/jm-macros.m4: Require autoconf-2.52f.
20798         (AC_FUNC_ERROR_AT_LINE, AC_FUNC_OBSTACK, AC_FUNC_STRTOD):
20799         Use these AC_-prefixed names, not the AM_-prefixed ones.
20800
20801         * m4/afs.m4 (jm_AFS): Quote the body.  Patch by Akim Demaille.
20802
20803 2001-11-05  Jim Meyering  <meyering@lucent.com>
20804
20805         * lib/xstat.in (slash_aware_lstat): Correct a misleading comment.
20806
20807 2001-11-04  Jim Meyering  <meyering@lucent.com>
20808
20809         * m4/fpending.m4: Remove unused cruft that saved, set, and restored
20810         $DEFS.
20811
20812 2001-11-03  Jim Meyering  <meyering@lucent.com>
20813
20814         * m4/jm-glibc-io.m4n (jm_FUNC_GLIBC_UNLOCKED_IO): Quote first arg
20815         of AC_DEFUN.
20816
20817         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): Rework so dirfd.c doesn't have to
20818         know the name of the variable in the macro definition.
20819
20820 2001-11-03  Jim Meyering  <meyering@lucent.com>
20821
20822         * lib/argmatch.h (ARGMATCH_TO_ARGUMENT): Remove casts of first two args
20823         in argmatch_to_argument call.
20824
20825         * lib/dirfd.c (dirfd): Reflect the fact that DIR_TO_FD now takes an
20826         argument.
20827
20828         * lib/hash.c (hash_clear): Fix a bug that could lead to an infloop or
20829         e.g., a fault due to an attempt to free a NULL pointer.
20830
20831 2001-11-01  Jim Meyering  <meyering@lucent.com>
20832
20833         * m4/dirfd.m4 (UTILS_FUNC_DIRFD): New macro.
20834         * m4/jm-macros.m4 (jm_MACROS): Require UTILS_FUNC_DIRFD.
20835
20836 2001-11-01  Jim Meyering  <meyering@lucent.com>
20837
20838         * lib/dirfd.c, lib/dirfd.h: New files.
20839         * lib/Makefile.am (libfetish_a_SOURCES): Add dirfd.h.
20840
20841         * lib/hash.c (hash_print) [TESTING]: Clean up.
20842
20843 2001-10-22  Paul Eggert  <eggert@twinsun.com>
20844
20845         * lib/hard-locale.c (alloca): Define to __builtin_alloca if __GNUC__,
20846         to avoid a warning if -Wall.
20847
20848 2001-10-22  Jeff Bailey  <jbailey@outpost.dnsalias.org>
20849
20850         * README: New file
20851         * doc/*: Add COPYING, COPYING.LIB, COPYING.DOC, fdl.texi
20852         (per RMS's instructions, this is now the canonical source)
20853         * lgpl/, gpl/: New directories.
20854
20855 2001-10-21  Paul Eggert  <eggert@twinsun.com>
20856
20857         * lib/regex.c (uintptr_t): Remove macro and decl; it's config.h's job.
20858
20859 2001-10-21  Jim Meyering  <meyering@lucent.com>
20860
20861         * lib/obstack.c (_): Honor the setting of ENABLE_NLS.  Otherwise,
20862         this code would end up calling gettext even in packages built
20863         with --disable-nls.
20864         * lib/getopt.c (_): Likewise.
20865         * lib/regex.c (_): Likewise.
20866
20867 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20868
20869         * m4/error.m4 (jm_PREREQ_ERROR):
20870         Do not invoke AC_CHECK_FUNCS with strerror_r, as
20871         AC_FUNC_STRERROR_R does that.
20872         Check for strerror declaration.
20873
20874         * m4/strerror_r.m4: Add copyright notice, as nontrivial m4 files
20875         are supposed to have them these days.
20876         (AC_FUNC_STRERROR_R): Always do char* test, so that it gets cached.
20877         Merge changes from latest Autoconf CVS.
20878         Rename ac_cv_func_strerror_r_works to ac_cv_func_strerror_r_char_p,
20879         and rename HAVE_WORKING_STRERROR_R to STRERROR_R_CHAR_P, since
20880         POSIX decided to standardize on the int flavor of strerror_r.
20881
20882 2001-10-20  Paul Eggert  <eggert@twinsun.com>
20883
20884         * lib/error.c (strerror_r): Do not declare unless !_LIBC.
20885         Do not check for HAVE_DECL_STRERROR_R missing unless STRERROR_R_CHAR_P.
20886         Use strerror_r that is only a macro, even if it is not a function.
20887         (strerror): Check for HAVE_DECL_STRERROR before declaring.
20888         (private_strerror): Use prototypes, not old-style function definition.
20889         (print_errno_message): New function.
20890         Support the POSIX 'int'-flavored strerror_r, as well as the traditional
20891         char*-flavored one.
20892         (error_tail, error, error_at_line): Use it.
20893
20894 2001-10-11  Jim Meyering  <meyering@lucent.com>
20895
20896         * lib/argmatch.c (argmatch_invalid): Use quotearg_n_style (0, ...
20897         and quote_n (1, ... to avoid clobbering a buffer.
20898
20899 2001-10-05  Jim Meyering  <meyering@lucent.com>
20900
20901         * lib/Makefile.am: (libfetish_a_SOURCES): Add hash-pjw.c and
20902         hash-pjw.h.
20903         * lib/hash-pjw.c: New file (factored out of fileutils' remove.c).
20904         * lib/hash-pjw.h: New file.
20905
20906 2001-09-30  Jim Meyering  <meyering@lucent.com>
20907
20908         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): See if
20909         `struct fsstat' has the `f_fstypename' member.
20910         Use that to define FS_TYPE, which is now used to make
20911         the getfsstat link test tighter.
20912
20913 2001-09-30  Jim Meyering  <meyering@lucent.com>
20914
20915         * lib/mountlist.c [MOUNTED_GETFSSTAT]:
20916         Include <sys/ucred.h>, for Apple Darwin.
20917         Include sys/mount.h and sys/fs_types.h only if available.
20918         (FS_TYPE): Define.
20919         (read_filesystem_list): Use FS_TYPE.
20920
20921 2001-09-29  Paul Eggert  <eggert@twinsun.com>
20922
20923         * lib/exclude.c (excluded_filename): 0 -> false, since it's
20924         a boolean context.
20925
20926 2001-09-29  Jim Meyering  <meyering@lucent.com>
20927
20928         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20929         [one-argument getmntent function]): Include stdio.h before mntent.h.
20930         SunOS 4.1.x needs it for the declaration of `FILE'.
20931         Patch by Volker Borchert.
20932
20933         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS)
20934         Check for these headers: sys/param.h sys/ucred.h sys/mount.h
20935         sys/fs_types.h, and make the link-test for getfsstat guard #include
20936         directives with appropriate #if HAVE_*_H tests so that we can
20937         detect getfsstat on Apple Darwin1.3.7 systems.
20938         Reported by Nelson Beebe.
20939         Fix harmless typo in cache variable name: s/getsstat/getfsstat/.
20940
20941 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20942
20943         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20944         #defines strtoimax.  Also treat the other strto* functions
20945         like strtoimax.
20946
20947         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
20948         Check for strtoul and strtoumax,
20949         as those declarations are made even in the signed case.
20950         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX):
20951         Likewise, for strtol and strtoimax.
20952
20953 2001-09-28  Paul Eggert  <eggert@twinsun.com>
20954
20955         Fix bug reported by Petter Reinholdtsen for HP-UX 10.20, which
20956         #defines strtoimax.  Also treat the other strto* functions
20957         like strtoimax.
20958
20959         * lib/xstrtol.c (strtol): Do not declare if HAVE_DECL_STRTOL.
20960         (strtoul): Do not declare if HAVE_DECL_STRTOUL.
20961         (strtoimax, strtoumax): Do not declare if already defined as a macro.
20962
20963 2001-09-26  Jim Meyering  <meyering@lucent.com>
20964
20965         Most macros in unlocked-io.h had the wrong number of arguments.
20966         * lib/gen-uio: New script.
20967         (USE_UNLOCKED_IO): Define to 1 if not already defined.
20968         * lib/unlocked-io.hin: Remove file.
20969         * lib/Makefile.am (unlocked-io.h): Rewrite to use a separate script,
20970         rather than trying to embed it here.
20971         (EXTRA_DIST): Add gen-uio.  Remove unlocked-io.hin
20972         Reported by Padraig Brady.
20973
20974 2001-09-25  Volker Borchert  <bt@teknon.de>
20975
20976         * lib/gettimeofday.c (rpl_gettimeofday): Declare local variable
20977         `result'.
20978
20979 2001-09-24  Jim Meyering  <meyering@lucent.com>
20980
20981         * m4/gettext.m4: Use the version from gettext-0.10.40, not CVS.
20982
20983 2001-09-23  Jim Meyering  <meyering@lucent.com>
20984
20985         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add a compile-test
20986         instead of the mere test for existence of mntent.h.  The latter
20987         would get a false-positive on AIX 3.4 systems.
20988         In the outer getmntent if-block, don't die if neither of the getmntent
20989         tests succeeds.  Instead, just fall through and continue with the
20990         remaining tests.
20991
20992 2001-09-23  Jim Meyering  <meyering@lucent.com>
20993
20994         * lib/mountlist.c: Remove useless parentheses in #if directives.
20995         (MOUNTED) [!defined MOUNTED]: Define to _PATH_MOUNTED, for when
20996         the deprecated MOUNTED symbol is no longer defined in mntent.h.
20997
20998 2001-09-22  Jim Meyering  <meyering@lucent.com>
20999
21000         * m4/gettext.m4: New file.  From gettext.
21001         * m4/lcmessage.m4: Sync with gettext -- this changes only comments.
21002         * m4/progtest.m4: Likewise
21003         * m4/isc-posix.m4: Decrement serial number to sync with gettext.
21004         * m4/glibc21.m4: Likewise.
21005
21006         * m4/libintl.m4: Remove.  No longer used.
21007
21008 2001-09-22  Jim Meyering  <meyering@lucent.com>
21009
21010         * lib/localcharset.c: Update from latest gettext.
21011         * lib/config.charset: Likewise.
21012
21013 2001-09-20  Jim Meyering  <meyering@lucent.com>
21014
21015         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX): Check for declaration of
21016         strtoimax.
21017         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check for declaration of
21018         strtoumax.
21019
21020 2001-09-20  Jim Meyering  <meyering@lucent.com>
21021
21022         * lib/xstrtol.c (strtoimax): Guard declaration with
21023         `#if !HAVE_DECL_STRTOIMAX', rather than just `#ifndef strtoimax'.
21024         The latter fails because some systems (at least rs6000-ibm-aix4.3.3.0)
21025         have their own, conflicting declaration of strtoimax in sys/inttypes.h.
21026         (strtoumax): Likewise, for completeness (it wasn't necessary).
21027
21028 2001-09-17  Paul Eggert  <eggert@twinsun.com>
21029
21030         * lib/strtoimax.c (HAVE_LONG_LONG):
21031         Redefine to HAVE_UNSIGNED_LONG_LONG if unsigned.
21032         (strtoimax): Use sizeof (long), not sizeof strtol (ptr, endptr, base),
21033         to work around bug in IBM C compiler.
21034
21035 2001-09-17  Jim Meyering  <meyering@lucent.com>
21036
21037         * m4/chown.m4, fstypename.m4, getgroups.m4, gettimeofday.m4,
21038         * m4/jm-mktime.m4, lstat.m4, malloc.m4, memcmp.m4, mkdir-slash.m4,
21039         * m4/nanosleep.m4, putenv.m4, readdir.m4, realloc.m4, rename.m4,
21040         * m4/st_dm_mode.m4, stat.m4, strerror_r.m4, timespec.m4, utimbuf.m4,
21041         * m4/utimes.m4: Use AC_DEFINE rather than AC_DEFINE_UNQUOTED,
21042         whenever the right hand side need not be expanded by the shell.
21043
21044 2001-09-16  Paul Eggert  <eggert@twinsun.com>
21045
21046         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): Remove test for GNU C
21047         library.  It's not correct, as some older glibcs are buggy.
21048         fnmatch wasn't fixed until glibc 2.2.
21049
21050         Use AC_DEFINE, not AC_DEFINE_UNQUOTED, as there's no
21051         special shell magic here.
21052
21053 2001-09-16  Jim Meyering  <meyering@lucent.com>
21054
21055         * m4/mkdir-slash.m4 (UTILS_FUNC_MKDIR_TRAILING_SLASH): New file/macro.
21056         * m4/jm-macros.m4: Require it.
21057
21058 2001-09-16  Jim Meyering  <meyering@lucent.com>
21059
21060         * lib/mkdir.c: New file.
21061
21062 2001-09-15  Jim Meyering  <meyering@lucent.com>
21063
21064         * m4/jm-macros.m4: Check for help2man.
21065
21066 2001-09-11  Jim Meyering  <meyering@lucent.com>
21067
21068         * m4/host-os.m4 (UTILS_HOST_OS): New file/macro.
21069         The body, by Paul Eggert, was moved here from configure.in.
21070         * m4/jm-macros.m4: Require UTILS_HOST_OS.
21071
21072 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21073
21074         * m4/prereq.m4 (jm_PREREQ_XREADLINK): New macro.
21075         (jm_PREREQ): Use it.
21076
21077 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21078
21079         * lib/xreadlink.c (xreadlink): Omit size_t* arg.  All uses changed.
21080         Use ssize_t, not int, to store result of readlink.
21081         Check for ssize_t overflow as well as size_t overflow,
21082         as POSIX says the result of readlink is implementation-defined
21083         when ssize_t overflows.
21084         Remove unnecessary cast to char*.
21085         Use free+malloc instead of realloc, as the storage doesn't need
21086         to be preserved and it's clearer and can be more efficient that way.
21087         (SIZE_MAX, SSIZE_MAX): New macros, if <limits.h> doesn't declare.
21088         * lib/xreadlink.h (xreadlink): Update prototype.
21089
21090 2001-09-04  Paul Eggert  <eggert@twinsun.com>
21091
21092         * lib/xgetcwd.c: Revert some of the previous change; intead,
21093         fix the HAVE_GETCWD_NULL code to behave more like the
21094         !HAVE_GETCWD_NULL code used to.
21095
21096         Include "xalloc.h".
21097         (xgetcwd): Do not return NULL when memory is exhausted; instead,
21098         invoke xalloc_die.
21099
21100 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21101
21102         * m4/prereq.m4 (jm_PREREQ_XGETCWD): Check for limits.h and
21103         sys/param.h, as pathmax.h includes them.
21104
21105 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21106
21107         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_XGETCWD.
21108         (jm_PREREQ_XGETCWD): New macro.
21109
21110         * m4/getcwd.m4: New file.
21111
21112 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21113
21114         * lib/xgetcwd.c: Fix the !HAVE_GETCWD_NULL code to behave more
21115         like the HAVE_GETCWD_NULL code.
21116         Include pathmax.h if not HAVE_GETCWD.
21117         Do not include xalloc.h.
21118         (INITIAL_BUFFER_SIZE): New symbol.
21119         Do not use xmalloc / xrealloc, since the caller is responsible for
21120         handling errors.  Preserve errno around `free' during failure.
21121         Do not overrun buffer when using getwd.
21122
21123 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21124
21125         * lib/xgetcwd.c (xgetcwd): Use HAVE_GETCWD_NULL, not (defined
21126         __GLIBC__ && __GLIBC__ >= 2), to decide whether to use
21127         getcwd (NULL, 0).
21128
21129 2001-09-03  Paul Eggert  <eggert@twinsun.com>
21130
21131         * lib/exclude.c (fnmatch_no_wildcards): Fix confusion between
21132         usage of FNM_CASEFOLD and FNM_LEADING_DIR.  The bug was
21133         spotted by Jim Meyering.
21134
21135 2001-09-03  Jim Meyering  <meyering@lucent.com>
21136
21137         * lib/xreadlink.c (xreadlink): Preserve errno around `free' during
21138         failure.
21139
21140 2001-09-02  Jim Meyering  <meyering@lucent.com>
21141
21142         * lib/error.c: Update from GNU libc.
21143
21144 2001-09-01  Jim Meyering  <meyering@lucent.com>
21145
21146         * m4/jm-macros.m4 (jm_MACROS): Check for canonicalize_file_name.
21147         Used by df.
21148
21149 2001-09-01  Jim Meyering  <meyering@lucent.com>
21150
21151         * lib/xreadlink.c: New file.
21152         * lib/xreadlink.h: New file.
21153         * lib/Makefile.am (libfetish_a_SOURCES): Add xreadlink.c and
21154         xreadlink.h.
21155
21156         * lib/regex.c (uintptr_t) [!_LIBC]: Define to private_uintptr_t, so it
21157         doesn't conflict with sparc Solaris 7's definition in
21158         /usr/include/sys/int_types.h.
21159
21160         * lib/exclude.c: Use `""', not `<>' to #include non-system header
21161         files.
21162         (fnmatch_no_wildcards): Rewrite not to use function names, strcasecmp
21163         and strncasecmp as r-values.  Unixware didn't have declarations.
21164
21165 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21166
21167         * lib/xstrtol.h: Add copyright notice.
21168         (_DECLARE_XSTRTOL): Improve quality of diagnostic for
21169         LONGINT_INVALID_SUFFIX_CHAR.
21170
21171 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21172
21173         * lib/xstrtol.c (strtoimax): New decl.
21174
21175 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21176
21177         * lib/xgetcwd.c: Don't include pathmax.h.
21178         Include stdlib.h and unistd.h if available.
21179         Include xalloc.h.
21180         (xmalloc, xstrdup, free): Remove decls.
21181         (xgetcwd): Don't assume sizes fit in unsigned.
21182         Check for overflow when computing sizes.
21183         Simplify reallocation code.
21184
21185 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21186
21187         * lib/savedir.c (savedir): Remove size parameter, as POSIX says that
21188         a directory's st_size can have an arbitrary value, so the old
21189         usage could waste an arbitrary amount of memory.  All uses
21190         changed.
21191         * lib/savedir.h: Update prototype.
21192
21193 2001-08-31  Paul Eggert  <eggert@twinsun.com>
21194
21195         * lib/Makefile.am (libfetish_a_SOURCES): Remove strtoxmax.c.
21196
21197         * lib/strtoimax.c: Renamed from strtoxmax.c, removing the
21198         old strtoimax.c.
21199
21200         Also, make the following further changes to make this file's
21201         configuration more similar to that of strtol.c:
21202         (UNSIGNED): Renamed from STRTOUXMAX_UNSIGNED.  All uses changed.
21203         (strtoumax, uintmax_t, strtoull, strtol): Remove.
21204         (intmax_t, strtoimax, strtol, strtoll): New macros, if UNSIGNED.
21205         (strtoimax): Renamed from strtoumax.  All uses of unsigned values
21206         changed to signed values.
21207
21208         And make the following changes as well:
21209         Fix copyright notice, as 1999 was missing.
21210         (verify): New macro.
21211         (strtoimax): Check sizes at compile-time, not run-time.
21212         Prefer strtol to strtoll if both work.
21213         (main): Remove; it was not that useful and was a pain to maintain.
21214
21215         * lib/strtoumax.c: Include strtoimax.c, not strtouxmax.c.
21216
21217 2001-08-31  Jim Meyering  <meyering@lucent.com>
21218
21219         * lib/xgetcwd.c (xgetcwd): Reorganize to avoid some duplication.
21220         Use an initial, malloc'd, buffer of length 128 rather than
21221         a statically allocated one of length 1024.
21222
21223 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21224
21225         Simplify code, partly by assuming autoconf 2.52 semantics.
21226
21227         * m4/Makefile.am (EXTRA_DIST): Remove uintmax_t.m4.
21228
21229         * m4/inttypes.m4 (AC_PREREQ): Bump to 2.52.
21230         (jm_AC_HEADER_INTTYPES_H): Remove; now done by autoconf in 2.52.
21231         All uses removed.
21232         (jm_AC_TYPE_INTMAX_T, jm_AC_TYPE_UINTMAX_T):
21233         Move AC_REQUIRE to next-to-top level, to avoid confusion.
21234         Use 2.52's AC_CHECK_TYPE instead of merely looking for the header.
21235         * m4/prereq.m4 (jm_PREREQ_HUMAN): Don't require
21236         jm_AC_HEADER_INTTYPES_H.
21237         * m4/jm-macros.m4 (jm_MACROS): Likewise.
21238
21239         * m4/uintmax_t.m4: Remove, as it duplicates inttypes.m4.
21240
21241         * m4/xstrtoimax.m4 (jm_AC_PREREQ_XSTRTOIMAX):
21242         Quote first arg of AC_DEFUN.
21243         Require jm_AC_TYPE_UINTMAX_T and jm_AC_TYPE_UNSIGNED_LONG_LONG
21244         since they are needed to parse the include file even if we need
21245         only xstrtoimax.  Simplify logic behind the args to AC_REPLACE.
21246         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Likewise,
21247         but with opposite signedness.
21248
21249 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21250
21251         Merge 'exclude' changes from tar 1.13.22.
21252         This fixes one or two unlikely storage allocation overflow bugs,
21253         but doesn't change user-visible behavior otherwise.
21254
21255 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21256
21257         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_EXCLUDE.
21258         (jm_PREREQ_EXCLUDE): New macro.
21259
21260 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21261
21262         * lib/quotearg.c: BSD/OS 4.1 wchar.h requires FILE and struct
21263         tm to be declared.
21264
21265 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21266
21267         * lib/hash.c: Remove '2001' from copyright notice.
21268
21269 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21270
21271         * lib/full-write.h: New file.
21272         * lib/Makefile.am (libfetish_a_SOURCES): Add full-write.h.
21273         * lib/full-write.c: Correct credits, as cccp.c no longer
21274         exists and anyway it was so heavily changed from the old cccp
21275         code as to be unrecognizable.  Include full-write.h.
21276         (full_write) Return size_t, with short writes meaning failure.
21277         All callers changed.  This fixes a bug with large buffers
21278         on 64-bit hosts.
21279         * lib/utime.c: Include full-write.h.
21280
21281 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21282
21283         * lib/exclude.c (bool): Declare, perhaps by including stdbool.h.
21284         (<sys/types.h>): Include only if HAVE_SYS_TYPES_H.
21285         (<stdlib.h>, <string.h>, <strings.h>, <inttypes.h>, <stdint.h>):
21286         Include if available.
21287         (<xalloc.h>): Include
21288         (SIZE_MAX): Define if <stdint.h> or <inttypes.h> doesn't.
21289         (verify): New macro.  Use it to verify that EXCLUDE macros do not
21290         collide with FNM macros.
21291         (struct patopts): New struct.
21292         (struct exclude): Use it, as exclude patterns now come with options.
21293         (new_exclude): Support above changes.
21294         (new_exclude, add_exclude_file):
21295         Initial size must now be a power of two to simplify overflow checking.
21296         (free_exclude, fnmatch_no_wildcards): New function.
21297         (excluded_filename): No longer requires options arg, as the options
21298         are determined by add_exclude.  Now returns bool, not int.
21299         (excluded_filename, add_exclude):
21300         Add support for the fancy new exclusion options.
21301         (add_exclude, add_exclude_file): Now takes int options arg.
21302         Check for arithmetic overflow when computing sizes.
21303         (add_exclude_file): xrealloc might modify errno, so don't
21304         realloc until after errno might be used.
21305
21306         * lib/exclude.h (EXCLUDE_ANCHORED, EXCLUDE_INCLUDE,EXCLUDE_WILDCARDS):
21307         New macros.
21308         (free_exclude): New decl.
21309         (add_exclude, add_exclude_file): Now takes int options arg.
21310         (excluded_filename): No longer requires options arg, as the options
21311         are determined by add_exclude.  Now returns bool, not int.
21312
21313 2001-08-30  Paul Eggert  <eggert@twinsun.com>
21314
21315         * lib/alloca.c (alloca): Arg is of type size_t, not unsigned.
21316
21317 2001-08-27  Jim Meyering  <meyering@lucent.com>
21318
21319         * lib/Makefile.am (libfetish_a_SOURCES): Add strtoxmax.c
21320
21321         * lib/version-etc.c (N_): Remove definition.
21322         Revert most of last change.
21323         Instead, simply don't mark the `Copyright...' string for translation.
21324         Based on advice from Paul Eggert.
21325
21326         * lib/strtoxmax.c: Tweak comment.
21327
21328 2001-08-26  Jim Meyering  <meyering@lucent.com>
21329
21330         * m4/jm-macros.m4: Require jm_AC_PREREQ_XSTRTOIMAX.
21331
21332         * m4/xstrtoimax.m4: New file.
21333         * m4/xstrtoumax.m4: Add comments explaining why we
21334         AC_REPLACE_FUNCS(strtol).
21335
21336 2001-08-26  Jim Meyering  <meyering@lucent.com>
21337
21338         * lib/version-etc.c (version_etc_copyright_fmt): Replace literal year
21339         of copyright with `%s' so translators don't get an untranslated
21340         message in 2002.
21341         (COPYRIGHT_YEAR): Define.
21342         (version_etc): Use fprintf rather than fputs.
21343         Suggestion from Ulrich Drepper.
21344
21345         * lib/Makefile.am (libfetish_a_SOURCES): Add xstrtoimax.c.
21346
21347         * lib/strtoll.c: New file, from GNU libc.
21348         * lib/xstrtoimax.c: New file.
21349
21350         * lib/xstrtol.h: Add xstrtoimax.
21351         * lib/strtoumax.c: New file.  Simply include "strtoumax.c".
21352         * lib/strtoimax.c: New file.  Likewise, but first define
21353         STRTOUXMAX_SIGNED.
21354
21355         * lib/strtoumax.c: Factor to work both for unsigned and signed types,
21356         ...
21357         * lib/strtoxmax.c: ... then renamed to this.
21358
21359 2001-08-18  Paul Eggert  <eggert@twinsun.com>
21360
21361         * m4/inttypes.m4: Add AC_PREREQ(2.13).
21362         (jm_AC_HEADER_INTTYPES_H): Test for intmax_t, too.
21363         (jm_AC_TYPE_INTMAX_T): New macro.
21364         (jm_AC_TYPE_UINTMAX_T): Moved here from uintmax_t.m4.
21365
21366         * m4/longlong.m4 (jm_AC_TYPE_LONG_LONG): New macro.
21367
21368         * m4/longlong.m4: Renamed from ulonglong.m4.
21369         * m4/inttypes.m4: Renamed from inttypes_h.m4.
21370         * m4/uintmax_t.m4: Removed.
21371
21372 2001-08-13  Paul Eggert  <eggert@twinsun.com>
21373
21374         * lib/Makefile.am (unlocked-io.h): Do not append "_unlocked" twice.
21375         Port to Solaris 8, where 'sed' requires a space after the 'r'
21376         command, and where sh dislikes "$/".  Clean up the spacing a bit.
21377         Redirect output to $tmp just once.
21378
21379 2001-08-12  Paul Eggert  <eggert@sic.twinsun.com>
21380
21381         * lib/addext.c (<errno.h>): Include.
21382         (errno): Declare if not defined.
21383         (addext): Work correctly when pathconf returns -1 and leaves
21384         errno alone because there is no limit.  Also, work even if
21385         pathconf returns a value greater than SIZE_MAX.
21386
21387 2001-08-12  Jim Meyering  <meyering@lucent.com>
21388
21389         * m4/afs.m4, assert.m4, bison.m4, check-decl.m4, chown.m4, d-ino.m4,
21390         d-type.m4, dos.m4, error.m4, fnmatch.m4, fpending.m4, fstypename.m4,
21391         fsusage.m4, ftruncate.m4, getgroups.m4, glibc.m4, gnu-source.m4,
21392         group-member.m4, jm-glibc-io.m4, jm-macros.m4, jm-mktime.m4,
21393         jm-winsz1.m4, jm-winsz2.m4, lchown.m4, lib-check.m4, libintl.m4,
21394         link-follow.m4, ls-mntd-fs.m4, lstat.m4, malloc.m4, mbrtowc.m4,
21395         mbstate_t.m4, mbswidth.m4, memcmp.m4, nanosleep.m4, perl.m4,
21396         prereq.m4, putenv.m4, readdir.m4, realloc.m4, regex.m4, rename.m4,
21397         rmdir-errno.m4, search-libs.m4, st_dm_mode.m4, st_mtim.m4, stat.m4,
21398         strftime.m4, timespec.m4, unlink-busy.m4, uptime.m4, utimbuf.m4,
21399         utime.m4, utimes.m4, xstrtoumax.m4:
21400         Quote the first argument in each use of AC_DEFUN.
21401
21402 2001-08-12  Jim Meyering  <meyering@lucent.com>
21403
21404         * lib/xgetcwd.c (xgetcwd) [defined __GLIBC__ && __GLIBC__ >= 2]:
21405         Simply `return getcwd (NULL, 0);'.
21406         [! (defined __GLIBC__ && __GLIBC__ >= 2)]:
21407         Use 1300 as initial value for length, not PATH_MAX.
21408
21409         * lib/pathmax.h: Clean up cpp syntax.
21410
21411 2001-08-12  Jim Meyering  <meyering@lucent.com>
21412
21413         * lib/gettimeofday.c: New file.
21414         * lib/gtod.h: New file.
21415         * lib/Makefile.am (libfetish_a_SOURCES): Add gtod.h.
21416
21417 2001-08-05  Jim Meyering  <meyering@lucent.com>
21418
21419         * m4/jm-macros.m4: Require autoconf-2.52.
21420
21421 2001-08-04  Jim Meyering  <meyering@lucent.com>
21422
21423         * lib/error.h (__attribute__): Remove `|| __STRICT_ANSI__' from #if
21424         stmt, to get in sync with glibc.
21425
21426 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21427
21428         The following changes are from gettext 0.10.39 as maintained by
21429         Bruno Haible.
21430
21431         * lib/mbswidth.h (MBSW_REJECT_UNPRINTABLE, MBSW_REJECT_INVALID):
21432         Renamed from MBSW_ACCEPT_UNPRINTABLE and MBSW_ACCEPT_INVALID
21433         with inverted sense.  All uses changed.
21434
21435         * lib/mbswidth.c: Don't include <limits.h>.
21436         Include <stdlib.h> and <string.h> unconditionally.
21437         (iswcntrl, mbsinit, ISCNTRL): New macros.
21438         (mbsnwidth): Use K&R style function declarations.
21439         Don't bother checking for MB_LEN_MAX == 1, since the compiler
21440         can optimize it when MB_CUR_MAX == 1.
21441         The width of control characters is zero, not 1.
21442
21443 2001-08-03  Paul Eggert  <eggert@twinsun.com>
21444
21445         The following changes are from gettext 0.10.39 as maintained by
21446         Bruno Haible, except that getline.m4 continues to use AC_LIBOBJ.
21447
21448         * m4/codeset.m4: Upgrade to serial AM1.
21449         (AM_LANGINFO_CODESET): Renamed from jm_LANGINFO_CODESET;
21450         all uses changed.  Quote first arg of AC_DEFUN.
21451         (am_cv_langinfo_codeset): Renamed from jm_cv_langinfo_codeset.
21452
21453         * m4/iconv.m4: Upgrade to serial AM2.
21454         (AM_ICONV): Renamed from jm_ICONV; all uses changed.
21455         Add --with-libconv-prefix.
21456         Quote first arg of AC_DEFUN.  Add description for ICONV_CONST.
21457         (am_cv_func_iconv): Renamed from jm_cv_func_iconv.
21458         (am_cv_lib_iconv): Renamed from jm_cv_lib_iconv.
21459         (am_cv_proto_iconv): Renamed from jm_cv_proto_iconv.
21460         * m4/jm-macros.m4 (jm_MACROS): Reflect s/jm_/AM_/ renamings.
21461
21462         * m4/c-bs-a.m4 (AC_C_BACKSLASH_A): Quote first arg of AC_DEFUN.
21463         * m4/getline.m4 (AM_FUNC_GETLINE): Likewise.
21464         * m4/glibc21.m4 (jm_GLIBC21): Likewise.
21465         * m4/inttypes_h.m4 (jm_AC_HEADER_INTTYPES_H): Likewise.
21466         * m4/isc-posix.m4 (AC_ISC_POSIX): Likewise.
21467         * m4/lcmessage.m4 (AM_LC_MESSAGES): Likewise.
21468         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): Likewise.
21469         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Likewise.
21470         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Likewise.
21471
21472         * m4/getline.m4 (AM_FUNC_GETLINE): Don't bother checking for
21473         string.h any more.
21474
21475         * m4/progtest.m4 (AM_PATH_PROG_WITH_TEST): If not found, print "no",
21476         not the default value.
21477
21478         2001-06-25  Bruno Haible  <haible@clisp.cons.org>
21479         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Don't require AM_C_PROTOTYPES.
21480         Also check for mbsinit.  Needed for SCO 3.2v5.0.2.
21481         Also include <string.h>; this is where AIX 3.2.5 declares wcwidth.
21482         Also check for iswcntrl, used for wcwidth fallback.
21483         Use AC_TRY_COMPILE to emulate AC_CHECK_DECLS, for portability
21484         to Autoconf 2.13.
21485
21486 2001-08-03  Jim Meyering  <meyering@lucent.com>
21487
21488         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Use `#include', not `@%:@include',
21489         as it was in the original.  Reported by Paul Eggert.
21490
21491 2001-07-16  Jim Meyering  <meyering@lucent.com>
21492
21493         * m4/gettimeofday.m4: New file.
21494         Prompted by a report from Bernhard Baehr.
21495
21496 2001-07-15  Jim Meyering  <meyering@lucent.com>
21497
21498         * m4/Makefile.am.in (Makefile.am): Remove most of the unlocked-io.h
21499         stuff. Now it's in ../Makefile.cfg.
21500
21501 2001-07-15  Jim Meyering  <meyering@lucent.com>
21502
21503         * lib/Makefile.am (EXTRA_DIST): Add unlocked-io.hin.
21504         (BUILT_SOURCES): Add unlocked-io.h.
21505         (io_functions): Define.
21506         (unlocked-io.h): New rule.
21507         (DISTCLEANFILES): Add unlocked-io.h.
21508         (all-local): Depend on unlocked-io.h, to ensure it is created.
21509
21510         * lib/unlocked-io.hin: New file
21511
21512         * lib/regex.c: Update from glibc.
21513
21514 2001-07-05  Jim Meyering  <meyering@lucent.com>
21515
21516         * lib/Makefile.am (noinst_HEADERS): Remove definition, per new automake
21517         recommendation.
21518         (libfetish_a_SOURCES): Put all .h files here instead.
21519         Remove a thus-exposed (better checks in automake) duplicate and
21520         two unnecessary .h files.
21521
21522 2001-07-04  Jim Meyering  <meyering@lucent.com>
21523
21524         * m4/Makefile.am.in (glibc-io.struct): New target.  Rework the code
21525         that generates jm-glibc-io.m4 so that it doesn't trigger any make
21526         distcheck failure.
21527
21528 2001-07-02  Jim Meyering  <meyering@lucent.com>
21529
21530         The following changes were prompted by suggestions from Bruno Haible.
21531
21532         * m4/jm-glibc-io.m4n: New file, the template from which jm-glibc-io.m4
21533         is now generated.
21534         * m4/Makefile.am.in (Makefile.am): Include jm-glibc-io.m4n in emitted
21535         definition of EXTRA_DIST.
21536         (Makefile.am): Emit the dependency, `all-local: jm-glibc-io.m4' to
21537         ensure that the generated file is created/updated whenever the list
21538         of $(unlocked_functions) is changed.
21539         (jm-glibc-io.m4): New rule.
21540         (unlocked-io.h): New rule -- currently unused.
21541
21542 2001-06-24  Jim Meyering  <meyering@lucent.com>
21543
21544         * m4/regex.m4 (jm_INCLUDED_REGEX): Use a quadrigraph to represent an
21545         unmatched right bracket, rather than kludging it with an extra,
21546         falsely-matching quote in a comment.  Patch by Akim Demaille.
21547
21548 2001-06-11  Jim Meyering  <meyering@lucent.com>
21549
21550         * lib/regex.c: Update from GNU libc.
21551
21552 2001-05-27  Jim Meyering  <meyering@lucent.com>
21553
21554         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for ut_type in struct utmpx.
21555         Check for ut_type in struct utmp.
21556
21557 2001-05-27  Jim Meyering  <meyering@lucent.com>
21558
21559         * lib/readutmp.h (UT_TYPE): Define.
21560
21561 2001-05-24  Jim Meyering  <meyering@lucent.com>
21562
21563         * lib/argmatch.c: Include "quote.h".
21564         (argmatch_invalid): Remove explicit `' quotes.  Instead, use the
21565         quote function.  Reported by Göran Uddeborg.
21566
21567 2001-05-22  Jim Meyering  <meyering@lucent.com>
21568
21569         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Don't use AC_LIBOBJ(strftime),
21570         now that we use the package-supplied version unconditionally.
21571         (jm_FUNC_STRFTIME): Don't replace strftime, for the same reason.
21572
21573 2001-05-21  Jim Meyering  <meyering@lucent.com>
21574
21575         * m4/regex.m4: Change a couple backticks to single quotes to avoid
21576         shell syntax errors.
21577
21578 2001-05-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21579
21580         * m4/dos.m4 (jm_AC_DOS): Check for _WIN32, __WIN32__, and __MSDOS__.
21581
21582 2001-05-20  Paul Eggert  <eggert@twinsun.com>
21583
21584         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME):
21585         Don't bother to check library strftime, since
21586         we'll be using our own my_strftime function anyway.
21587         Define my_strftime instead of strftime.
21588
21589 2001-05-20  Alexandre Duret-Lutz  <duret_g@epita.fr>
21590
21591         * lib/dirname.c (dir_name): Compute append_dot using path, not newpath
21592         which is not yet declared.
21593
21594 2001-05-15  Jim Meyering  <meyering@lucent.com>
21595
21596         * m4/regex.m4: Use proper quoting so brackets appear in the test
21597         program.
21598         Reported by, and with help from, Bruno Haible.
21599
21600 2001-05-13  Jim Meyering  <meyering@lucent.com>
21601
21602         * m4/jm-macros.m4 (major_t, minor_t): Define to unsigned int if
21603         undefined.
21604
21605 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21606
21607         dirname code cleanup.  base_name now behaves more compatibly
21608         with POSIX basename when given file names that have trailing
21609         slashes, and similarly for dir_name.  Add new primitives
21610         base_len and dir_len.  Put the directory-name-related decls
21611         into dirname.h.
21612
21613         * lib/addext.c (ISSLASH, base_name): Remove; now in dirname.h.
21614         * lib/backupfile.c (base_name): Likewise.
21615         * lib/basename.c (FILESYSTEM_PREFIX_LEN, PARAMS, ISSLASH): Likewise.
21616         * lib/dirname.c (FILESYSTEM_PREFIX_LEN, ISSLASH): Likewise.
21617         * lib/makepath.c (strip_trailing_slashes): Likewise.
21618         * lib/path-concat.c (DIRECTORY_SEPARATOR, FILESYSTEM_PREFIX_LEN,
21619         ISSLASH): Likewise.
21620         * lib/rename.c (strip_trailing_slashes): Likewise.
21621         * lib/same.c (base_name): Likewise.
21622         * lib/stripslash.c (ISSLASH): Likewise.
21623
21624         * lib/addext.c: Include <dirname.h> after size_t is defined.
21625         * lib/backupfile.c: Likewise.
21626
21627         * lib/addext.c (addext): Use base_len to trim redundant
21628         trailing slashes instead of doing it ourselves.
21629         But do not trim the last slash if it is not redundant.
21630
21631         * lib/backupfile.c (find_backup_file_name,
21632         max_backup_version): Use base_len instead of rolling it ourselves.
21633         Handle the case of "" and (on DOS) "C:" correctly.
21634
21635         * lib/basename.c: Do not include <stdio.h>, <assert.h>; no longer
21636         needed. Include <string.h>, <dirname.h>.
21637         (base_name): Allow file names ending in slashes, other than names
21638         that are all slashes.  In this case, return the basename followed
21639         by the slashes.  This is more general, and can be used in places
21640         where the original base_name purposely had an assertion failure.
21641         (base_len): New function.
21642
21643         * lib/dirname.c: Include <string.h> instead of <stdlib.h>.
21644         Do not include <assert.h>; no longer needed.
21645         Include xalloc.h.
21646         (memrchr): Remove decl.
21647         (dir_name_r): Remove.
21648         (dir_len): Renamed from dirlen.  All callers changed.
21649         Rewrite in terms of base_name, for simplicity and consistency.
21650         (dir_name): Never return NULL.  All callers changed.
21651         Do not include <stdlib.h> in test program; no longer needed.
21652         return 0; is fine for test program.
21653
21654         * lib/dirname.h (DIRECTORY_SEPARATOR, ISSLASH, FILESYSTEM_PREFIX_LEN):
21655         New macros.
21656         (base_name, base_len, dir_len, strip_trailing_slashes): New decls.
21657
21658         * lib/path-concat.c (path_concat): Use base_len to compute
21659         base length, not strlen; this means we cannot rely on memcpy
21660         to null-terminate.
21661
21662         * lib/same.c (STREQ): Remove.
21663         (same_name): Handle the case where the basename ends in trailing '/'.
21664
21665         * lib/stripslash.c (strip_trailing_slashes): Return nonzero if
21666         a slash was stripped.  Do not strip the last slash after a
21667         file system prefix.
21668
21669 2001-05-11  Paul Eggert  <eggert@twinsun.com>
21670
21671         * lib/Makefile.am (libfetish_a_SOURCES):
21672         Add strftime.c, since we now compile it on all hosts.
21673
21674         * lib/strftime.c (my_strftime):
21675         Define to nstrftime if emacs, but only if my_strftime is not defined.
21676         (extra_args, extra_args_spec, extra_args_spec_iso): Rename from
21677         ut_argument, ut_argument_spec, ut_argument_spec_iso, respectively.
21678         Add one more extra argument: a nanoseconds value.
21679         All uses changed.
21680         (ns): New macro.
21681         (my_strftime function): Add %N format.
21682         (emacs_strftimeu): Renamed from emacs_strftime,
21683         with extra ut argument.
21684
21685 2001-05-09  Paul Eggert  <eggert@twinsun.com>
21686
21687         * m4/jm-macros.m4 (jm_MACROS): Do not check for fseeko; no longer used.
21688
21689 2001-04-21  Jim Meyering  <meyering@lucent.com>
21690
21691         * m4/rmdir-errno.m4: Write to a new file, so that a restrictive umask
21692         doesn't interfere.
21693
21694 2001-04-21  Alexandre Duret-Lutz  <duret_g@epita.fr>
21695
21696         * m4/ftruncate.m4: Check for chsize.
21697         Link with ftruncate.o unconditionally if ftruncate is missing.
21698         This was required when cross-compiling to i586-mingw32msvc.
21699
21700 2001-04-08  Jim Meyering  <meyering@lucent.com>
21701
21702         * lib/getdate.y (get_date): Set tm_isdst to -1 to ensure that it is
21703         recomputed; that's necessary when the offset spans a DST transition.
21704         Patch by David J. MacKenzie.  Reported by Hon-Yin Kok.
21705
21706 2001-04-02  Jim Meyering  <meyering@lucent.com>
21707
21708         * lib/regex.h, regex.c: Update from GNU libc.
21709
21710 2001-03-24  Jim Meyering  <meyering@lucent.com>
21711
21712         * m4/jm-macros.m4: Require autoconf-2.49d.
21713
21714 2001-03-20  Bruno Haible  <haible@clisp.cons.org>
21715
21716         * m4/iconv.m4 (jm_ICONV): Recommend GNU libiconv.
21717
21718 2001-03-19  Paul Eggert  <eggert@twinsun.com>
21719
21720         * lib/version-etc.c (version_etc_copyright): Update to 2001.
21721
21722 2001-03-17  Jim Meyering  <meyering@lucent.com>
21723
21724         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Remove my copy of AC_FUNC_MEMCMP,
21725         now that the version in autoconf is equivalent.
21726         (jm_FUNC_MEMCMP): Adjust to use AC_FUNC_MEMCMP.
21727
21728         * m4/error.m4 (jm_PREREQ_ERROR): Invoke AC_FUNC_STRERROR_R.
21729         Suggestion from Akim Demaille.
21730
21731         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_TEMPNAME.
21732         (jm_PREREQ_TEMPNAME): New function.
21733
21734 2001-03-16  Paul Eggert  <eggert@twinsun.com>
21735
21736         * lib/tempname.c (uint64_t): Define to uintmax_t if
21737         not defined, and if UINT64_MAX is not defined.
21738         Required at least for Vax Ultrix4.3, which doesn't define uint64_t.
21739         Reported by John David Anglin.
21740
21741 2001-03-15  Bruno Haible  <haible@clisp.cons.org>
21742
21743         * lib/localcharset.c (locale_charset): Allow wildcard syntax. Also
21744         resolve alias if codeset is empty.
21745         * lib/config.charset (BeOS): Use wildcard syntax.
21746
21747 2001-03-13  Jim Meyering  <meyering@lucent.com>
21748
21749         * lib/path-concat.c (path_concat)
21750         [FILESYSTEM_ACCEPTS_DRIVE_LETTER_PREFIX]: Don't insert a backslash when
21751         concatenating e.g., `C:' and `foo'.
21752         From Bruno Haible.
21753
21754 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21755
21756         * lib/localcharset.c (locale_charset): Don't use
21757         setlocale(LC_CTYPE,NULL). Don't return NULL.
21758         * lib/unicodeio.c (print_unicode_char): Simplify accordingly.
21759
21760 2001-03-06  Bruno Haible  <haible@clisp.cons.org>
21761
21762         * lib/config.charset: Update for FreeBSD 4.2 and OSF/1 5.1. Add
21763         support for DOS/DJGPP.
21764
21765 2001-03-01  Paul Eggert  <eggert@twinsun.com>
21766
21767         * m4/jm-macros.m4 (jm_MACROS): Use mkstemp replacement if the system
21768         lacks mkstemp.  Compile our own tempname.c if we compile our own
21769         mkstemp.c, as mkstemp relies on tempname.
21770
21771 2001-03-01  Jim Meyering  <meyering@lucent.com>
21772
21773         * m4/dos.m4 (jm_AC_DOS): Remove extra backslashes, now that
21774         AH_VERBATIM really does output its argument verbatim.
21775
21776 2001-02-28  Paul Eggert  <eggert@twinsun.com>
21777
21778         * lib/Makefile.am (libfetish_a_SOURCES):
21779         Add dup-safer.c, fopen-safer.c.
21780         (noinst_HEADERS): Add stdio-safer.h, unistd-safer.h.
21781
21782         * lib/dup-safer.c, lib/fopen-safer.c, lib/stdio-safer.h:
21783         * lib/unistd-safer.h: New files.
21784
21785 2001-02-25  Paul Eggert  <eggert@twinsun.com>
21786
21787         The mkstemp replacement is taken from glibc 2.2.2, with some
21788         portability fixes for use outside glibc, as follows:
21789
21790         * lib/tempname.c (struct_stat64): New macro.
21791         (direxists, __gen_tempname): Use it.
21792         This avoids a portability problem with Solaris 8.
21793
21794         * lib/tempname.c (<config.h>): Include if HAVE_CONFIG_H.
21795         (<stddef.h>, <stdint.h>, <string.h>):
21796         Include only if STDC_HEADERS || _LIBC.
21797         (<fcntl.h>): Include only if HAVE_FCNTL_H || _LIBC.
21798         (<unistd.h>): Include only if HAVE_UNISTD_H || _LIBC.
21799         (<sys/time.h>): Include only if HAVE_SYS_TIME_H || _LIBC.
21800         (__set_errno): Define this macro if <errno.h> doesn't.
21801         (P_tmpdir, TMP_MAX, __GT_FILE, __GT_BIGFILE, __GT_DIR, __GT_NOCREATE):
21802         Define these macros if <stdio.h> doesn't.
21803         (S_ISDIR, S_IRUSR, S_IWUSR, S_IXUSR):
21804         Define these macros if <sys/stat.h>
21805         doesn't.  Ignore <sys/stat.h> S_ISDIR if STAT_MACROS_BROKEN.
21806         (stat64, __getpid, __gettimeofday, __mkdir, __open, __open64, lxstat64,
21807         __xstat64): Define if not _LIBC.
21808         (__secure_getenv): Define if ! (HAVE___SECURE_GETENV || _LIBC).
21809         (__gen_tempname): Invoke gettimeofday only if
21810         HAVE_GETTIMEOFDAY || _LIBC;
21811         otherwise, fall back on plain "time".
21812         Use macros like S_IRUSR | S_IWUSR rather than octal values like 0600.
21813
21814         * lib/mkstemp.c (__GT_FILE): Define to zero if not defined.
21815
21816         * lib/mkstemp.c, lib/tempname.c: New files, taken from glibc 2.2.2.
21817
21818 2001-02-18  Paul Eggert  <eggert@twinsun.com>
21819
21820         * m4/jm-macros.m4 (jm_CHECK_ALL_HEADERS): Check for sys/resource.h.
21821
21822 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21823
21824         * m4/mbrtowc.m4: New file, defining jm_FUNC_MBRTOWC.
21825         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH):
21826         Use jm_FUNC_MBRTOWC, not AC_CHECK_FUNCS(mbrtowc).
21827         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Likewise.
21828
21829 2001-02-17  Paul Eggert  <eggert@twinsun.com>
21830
21831         * lib/mbswidth.c, quotearg.c (mbrtowc, mbsinit):
21832         Remove workaround macros for hosts that have mbrtowc but not
21833         mbstate_t, as we now insist on proper declarations for both
21834         before using mbrtowc.
21835
21836 2001-02-17  Jim Meyering  <meyering@lucent.com>
21837
21838         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Don't check for
21839         getmntent via AC_CHECK_FUNCS, since that would get a `no' and disrupt
21840         further attempts by AC_FUNC_GETMNTENT to check with e.g., -lgen on
21841         UnixWare 7.1.1.
21842
21843         * m4/mbrtowc.m4 (jm_FUNC_MBRTOWC): Adapt to use AC_CACHE_CHECK etc.,
21844         rather than AC_CACHE_VAL.
21845
21846 2001-02-17  Jim Meyering  <meyering@lucent.com>
21847
21848         * lib/strtoul.c: Sync from GNU libc.  Use double quotes, not <...>
21849         around included file name.
21850
21851         * lib/strnlen.c (__strnlen): Merge in a change from GNU libc.
21852
21853         * lib/strftime.c: Update from GNU libc (the only changes were to
21854         comments).
21855
21856 2001-02-17  Jim Meyering  <meyering@lucent.com>
21857
21858         * lib/regex.c: Update from libc.
21859
21860 2001-02-17  Bruno Haible  <haible@clisp.cons.org>
21861
21862         * lib/mbswidth.h (mbswidth): Also define as macro, to avoid prototype
21863         clash.
21864
21865 2001-02-16  Paul Eggert  <eggert@twinsun.com>
21866
21867         * lib/alloca.c (malloc): Undef before defining, since stdlib.h
21868         may have defined it.  Needed for Encore Umax-3.0.9.16b systems.
21869         Reported by Mark Hounschell via Paul Eggert.
21870
21871 2001-02-07  Jim Meyering  <meyering@lucent.com>
21872
21873         * m4/regex.m4 (jm_INCLUDED_REGEX): Add a test for the latest bug.
21874
21875 2001-02-05  Jim Meyering  <meyering@lucent.com>
21876
21877         * m4/jm-macros.m4: Require autoconf-2.14d (not yet released), because
21878         it includes the patch required for `large file' support with at least
21879         HP-UX's 10.20 /bin/cc.
21880
21881 2001-02-03  Jim Meyering  <meyering@lucent.com>
21882
21883         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Restore prior use of
21884         AS_IF, now that it works once again (mysteriously).
21885         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21886
21887 2001-01-30  Jim Meyering  <meyering@lucent.com>
21888
21889         Don't use filenames that are 8.3-equivalent to "conftest" on DOS.
21890         * m4/chown.m4: Rename conftestchown to conftest.chown.
21891         * m4/rename.m4: s/conftestdir/conftest.d1/ and
21892         s/conftestdir2/conftest.d2/.
21893         * m4/utimes.m4: s/conftestdata/conftest.data/
21894         Inspired by Pavel Roskin's change in autoconf.
21895
21896 2001-01-30  Bruno Haible  <haible@clisp.cons.org>
21897
21898         * lib/config.charset: Update for FreeBSD 4.2.
21899
21900 2001-01-27  Jim Meyering  <meyering@lucent.com>
21901
21902         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Open-code what was
21903         a use of AS_IF.
21904         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Likewise.
21905
21906 2001-01-26  Jim Meyering  <meyering@lucent.com>
21907
21908         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Check for stddef.h, now that
21909         quotearg.c includes it.
21910
21911 2001-01-26  Jim Meyering  <meyering@lucent.com>
21912
21913         * lib/quotearg.c: Include stddef.h.
21914         * lib/quote.c: Include stddef.h.
21915         Reported by Axel Kittenberger.
21916
21917         * lib/xmalloc.c [HAVE_DONE_WORKING_MALLOC_CHECK]: Enclose error-evoking
21918         line in double quotes so that it evokes a better diagnostic.
21919         [HAVE_DONE_WORKING_REALLOC_CHECK]: Likewise.
21920         Reported by Axel Kittenberger.
21921
21922 2001-01-24  Stefan Monnier  <monnier@cs.yale.edu>
21923
21924         * regex.c (mutually_exclusive_p): Don't blindly handle `charset_not'
21925         as if it was a `charset'.
21926
21927 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21928
21929         * m4/iconv.m4 (jm_ICONV): Also check whether the iconv declaration
21930         has const.
21931
21932 2001-01-21  Bruno Haible  <haible@clisp.cons.org>
21933
21934         * lib/unicodeio.c (print_unicode_char): Cast the second iconv() arg,
21935         to avoid a warning.  Add back 'const' to inptr.
21936
21937 2001-01-20  Jim Meyering  <meyering@lucent.com>
21938
21939         Be sure that headers are checked before used in code compiled
21940         for the type checks.
21941         * m4/jm-macros.m4 (jm_MACROS): Remove all header checks.
21942         In place of that, invoke jm_CHECK_ALL_TYPES.
21943         (jm_CHECK_ALL_HEADERS): New functions with the above checks.
21944         (jm_CHECK_ALL_TYPES): Require jm_CHECK_ALL_HEADERS.
21945         Alan Iwi reported a build failure on an f300-fujitsu-uxpv4.1_ES;
21946         The check for ssize_t was mistakenly run before the test for unistd.h.
21947
21948         The configure-time check for stdbool.h was missing.
21949         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_HASH.
21950         (jm_PREREQ_HASH): New function.
21951
21952 2001-01-17  Jim Meyering  <meyering@lucent.com>
21953
21954         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use AS_IF, not AS_IFELSE,
21955         for autoconf-2.49c.
21956         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Likewise.
21957
21958 2001-01-16  Jim Meyering  <meyering@lucent.com>
21959
21960         * lib/basename.c: Include <stdio.h>, needed by assert on SunOS 4.
21961         From Bruno Haible.
21962
21963 2001-01-14  Jim Meyering  <meyering@lucent.com>
21964
21965         * m4/rename.m4: Use temporary directories named conftestdir{,2}, not
21966         foo and bar.  Create conftestdir/ in the script, not in the C code.
21967         Remove directories in the script, not in the C code.
21968         Remove conftestdir{,2} before trying to create the directory.
21969         Make the entire configure script fail if the mkdir fails.
21970
21971 2001-01-14  Jim Meyering  <meyering@lucent.com>
21972
21973         * lib/rename.c: New file.  From Volker Borchert.
21974         Include stdlib.h, string.h or strings.h, and xalloc.h.
21975         Use strip_trailing_slashes rather than open-coding it.
21976
21977 2001-01-03  Paul Eggert  <eggert@twinsun.com>
21978
21979         * lib/strftime.c: Sync with glibc time/strftime.c 1.81.
21980
21981 2001-01-03  Jim Meyering  <meyering@lucent.com>
21982
21983         * lib/unicodeio.c (print_unicode_char): Remove `const' from declaration
21984         of local `inptr' to avoid warning with some system declarations of
21985         iconv.
21986
21987 2001-01-02  Volker Borchert  <bt@teknon.de>
21988
21989         * m4/rename.m4: New file.
21990         * m4/jm-macros.m4 (jm_MACROS): Require vb_FUNC_RENAME.
21991
21992 2001-01-01  Jim Meyering  <meyering@lucent.com>
21993
21994         * m4/prereq.m4 (jm_PREREQ_READUTMP): Include utmp.h (if available),
21995         even on systems with utmpx.h.  It's necessary for the declaration of
21996         utmp's ut_user member.  Reported by Andreas Jaeger.
21997
21998         * m4/check-decl.m4 (jm_CHECK_DECLS): Include grp.h and pwd.h if
21999         available. They are required for the declarations of getgrgid and
22000         getpwuid resp.
22001         (_jm_DECL_HEADERS): Check for grp.h and pwd.h.
22002         Reported by Andreas Jaeger.
22003
22004 2001-01-01  Alexandre Duret-Lutz  <duret_g@epita.fr>
22005
22006         * m4/libintl.m4 (AM_GNU_GETTEXT): Define MKINSTALLDIRS by
22007         expanding the value of $ac_aux_dir, as in AM_MISSING_HAS_RUN,
22008         so `make install' also works in VPATH builds.
22009
22010 2000-12-31  Alexandre Duret-Lutz  <duret_g@epita.fr>
22011
22012         * m4/libintl.m4 (AM_WITH_NLS): When using AC_CONFIG_AUX_DIR,
22013         prepend $(top_srcdir) to the value of MKINSTALLDIRS so that it
22014         can be used in subdirectories.
22015
22016 2000-12-29  Paul Eggert  <eggert@twinsun.com>
22017
22018         * lib/modechange.c: Do not assume that mode_t uses the
22019         traditional octal encoding.  E.g. "chmod 1 FOO" should set
22020         the other-execute bit of FOO even if S_IXOTH != 1.
22021
22022         (SUID, SGID, SVTX, RUSR, WUSR, XUSR, RGRP, WGRP, XGRP, ROTH,
22023         WOTH, XOTH, ALLM): New macros.
22024         (S_ISUID, S_ISGID, S_ISVTX, S_IRUSR, S_IWUSR, S_IXUSR,
22025          S_IRGRP, S_IWGRP, S_IXGRP, S_IROTH, S_IWOTH, S_IXOTH):
22026         Use them.
22027         (S_ISGID): Fix typo; it was defaulting to the same value as S_ISUID.
22028         (S_IRWXU, S_IRWXG, S_IRWXO): Specify defaults in terms of the above.
22029         (mode_compile):
22030         No need to use uintmax_t; unsigned long is long enough.
22031         Don't bother to get suffix since we don't use it.
22032
22033 2000-12-26  Jim Meyering  <meyering@lucent.com>
22034
22035         * m4/dos.m4 (jm_AC_DOS): Rewrite (though it's still a stub) to work
22036         better with autoheader.
22037
22038 2000-12-24  Jim Meyering  <meyering@lucent.com>
22039
22040         * lib/hash.c (is_prime): Return explicit boolean values.
22041         (hash_get_first): Return NULL to appease Irix5.6's 89.
22042         Reported by Nelson Beebe.
22043
22044 2000-12-19  Bruno Haible  <haible@clisp.cons.org>
22045
22046         * lib/localcharset.c (locale_charset): Add support for Win32.
22047
22048 2000-12-18  Paul Eggert  <eggert@twinsun.com>
22049
22050         * lib/physmem.h, lib/physmem.c: New files.
22051
22052         * lib/Makefile.am (libfetish_a_SOURCES): Add physmem.c.
22053         (noinst_HEADERS): Add physmem.h.
22054
22055         * lib/xstrtol.c (__xstrtol): Add undocumented suffixes 'g' and
22056         't' for compatibility with Solaris 8 sort.
22057
22058 2000-12-18  Bruno Haible  <haible@clisp.cons.org>
22059
22060         * lib/config.charset: Add support for BeOS.
22061
22062 2000-12-17  Jim Meyering  <meyering@lucent.com>
22063
22064         * m4/dos.m4 (jm_AC_DOS): New file and macro.
22065         * m4/jm-macros.m4 (jm_MACROS): Require jm_AC_DOS.
22066
22067 2000-12-16  Jim Meyering  <meyering@lucent.com>
22068
22069         This bug had a serious impact on chown: `chown N:M FILE' (for integer
22070         N and M) would have treated it like `chown N:N FILE'.
22071
22072         * lib/userspec.c (parse_user_spec): Fix typo: s/u/g/.
22073
22074 2000-12-16  Jim Meyering  <meyering@lucent.com>
22075
22076         * lib/getusershell.c [!SHELLS_FILE && __DJGPP__]: Define
22077         SHELLS_FILE to a file name that's useful on djgpp systems.
22078         Include stdlib.h.
22079         (ADDITIONAL_DEFAULT_SHELLS): Define.
22080         (default_shells): Prepend ADDITIONAL_DEFAULT_SHELLS.
22081         Based mostly on a patch from Prashant TR.
22082
22083 2000-12-16  Bruno Haible  <haible@clisp.cons.org>
22084
22085         * lib/config.charset: Add ISO-8859-3, BIG5HKSCS, GB18030, JOHAB,
22086         VISCII, CP874, CP949, CP950, CP1250, CP1253, CP1254, CP1255, CP1256,
22087         CP1257 to the list of canonical encodings. Rename EUC-CN to GB2312.
22088
22089 2000-12-08  Andreas Schwab  <schwab@suse.de>
22090
22091         * lib/mbswidth.c (mbsnwidth): Don't loop endlessly when called with an
22092         invalid mulitbyte sequence and with the MBSW_ACCEPT_INVALID flag set.
22093
22094 2000-12-07  Jim Meyering  <meyering@lucent.com>
22095
22096         * lib/stripslash.c (ISSLASH): Define.
22097         (strip_trailing_slashes): Use ISSLASH rather than comparing against
22098         `/'.
22099         From Prashant TR.
22100
22101         * lib/dirname.c (FILESYSTEM_PREFIX_LEN): Define.
22102         (dir_name_r): Declare this function as static.
22103         [BACKSLASH_IS_PATH_SEPARATOR]: Fix a bug that'd
22104         manifest itself on a name containing a mix of slashes and
22105         backslashes.
22106         Make this function work with names starting with a DOS-style
22107         drive letter and colon prefix.
22108         (dir_name): Append `.' if necessary.
22109         Based mostly on patches from Prashant TR and Eli Zaretskii.
22110
22111         * lib/dirname.h (dir_name_r): Remove prototype.
22112
22113 2000-12-06  Paul Eggert  <eggert@twinsun.com>
22114
22115         * m4/off_t-format.m4: Remove this file.
22116         * m4/jm-macros.m4 (jm_MACROS): Remove jm_SYS_OFF_T_PRINTF_FORMAT.
22117
22118 2000-12-06  Jim Meyering  <meyering@lucent.com>
22119
22120         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): If we need the
22121         replacement strtoull, we may well need the replacement strtoul, too.
22122         Check for declarations of strtoul and strtoull.
22123         Check for strtol.  Mainly as a cue to cause automake to include
22124         strtol.c -- that file is included by each of strtoul.c and strtoull.c.
22125         Check for limits.h -- strtol.c needs it.
22126
22127 2000-12-05  Jim Meyering  <meyering@lucent.com>
22128
22129         * lib/dirname.c (dir_name_r): Add `const' in a few local declarations.
22130
22131 2000-12-04  Jim Meyering  <meyering@lucent.com>
22132
22133         * lib/path-concat.c: [!HAVE_DECL_MALLOC]: Declare malloc.
22134         Also include memory.h, stdlib.h, unistd.h if appropriate.
22135         Reported by Andreas Jaeger (conflicting declaration of malloc).
22136
22137 2000-12-02  Jim Meyering  <meyering@lucent.com>
22138
22139         * m4/off_t-format.m4 (OFF_T_PRINTF_FORMAT_STRING): New file/macro.
22140         * m4/jm-macros.m4 (jm_MACROS): require it.
22141
22142 2000-12-02  Jim Meyering  <meyering@lucent.com>
22143
22144         * lib/closeout.h: Make idempotent, to avoid some obscure warnings.
22145
22146 2000-12-01  Paul Eggert  <eggert@twinsun.com>
22147
22148         * lib/memrchr.c: Include <config.h> before any system include file.
22149
22150 2000-11-30  Jim Meyering  <meyering@lucent.com>
22151
22152         * m4/jm-macros.m4 (jm_MACROS): Check for stdint.h.
22153
22154 2000-11-30  Jim Meyering  <meyering@lucent.com>
22155
22156         * m4/getloadavg.m4: s/ifval/m4_ifval/ to accommodate new autoconf.
22157
22158 2000-11-29  Paul Eggert  <eggert@twinsun.com>
22159
22160         * lib/dirname.c (dir_name_r): Fix typo: int -> size_t.
22161
22162 2000-11-26  Jim Meyering  <meyering@lucent.com>
22163
22164         * lib/memcoll.c: Include sys/types.h.  From Werner Almesberger.
22165
22166 2000-11-22  Paul Eggert  <eggert@twinsun.com>
22167
22168         * lib/strftime.c (my_strftime): Do not invoke mbrlen with a
22169         size of (size_t) -1; it's not portable.
22170
22171 2000-11-17  Jim Meyering  <meyering@lucent.com>
22172
22173         * lib/strstr.c: Update from GNU libc.
22174
22175 2000-11-17  Akim Demaille  <akim@epita.fr>
22176
22177         * lib/obstack.h: Formatting changes.
22178         (obstack_grow, obstack_grow0): Don't cast WHERE at all: that would
22179         prevent type checking.
22180         (obstack_ptr_grow, obstack_ptr_grow_fast): When assigning, don't
22181         cast the value to (void *): assigning a `foo *' to a `void *'
22182         variable is valid.
22183         (obstack_int_grow, obstack_int_grow_fast): Don't cast AINT to int.
22184
22185 2000-11-16  Jim Meyering  <meyering@lucent.com>
22186
22187         * lib/strverscmp.c: Incorporate weak-alias-related changes from glibc.
22188
22189 2000-11-11  Jim Meyering  <meyering@lucent.com>
22190
22191         * lib/error.c: Add a couple #includes, merging from GNU libc version.
22192
22193 2000-11-10  Jim Meyering  <meyering@lucent.com>
22194
22195         * lib/obstack.h: Update from GNU libc.
22196         * lib/obstack.c: Likewise.
22197
22198 2000-11-08  Bruno Haible  <haible@clisp.cons.org>
22199
22200         * m4/jm-macros.m4 (jm_MACROS): Add test for wcrtomb.
22201
22202 2000-11-06  Paul Eggert  <eggert@twinsun.com>
22203
22204         * lib/getusershell.c (setusershell): Use rewind rather than
22205         fseek/fseeko, to avoid configuration hassles with fseeko.
22206         Don't bother opening SHELLS_FILE if shellstream is NULL;
22207         it's not necessary.
22208
22209 2000-11-05  Jim Meyering  <meyering@lucent.com>
22210
22211         * lib/makepath.h (make_dir): Declare.
22212         * lib/makepath.c (make_dir): Remove `static' attribute.
22213         Tweak a comment.
22214
22215 2000-11-04  Jim Meyering  <meyering@lucent.com>
22216
22217         * m4/regex.m4: Use the `m4_' prefix on `syscmd' and `m4_sysval'.
22218
22219 2000-11-04  Alexandre Duret-Lutz  <duret_g@epita.fr>
22220
22221         * lib/hash.c (hash_get_next): Fix a thinko:  when ENTRY is the
22222         last one in a bucket, advance to the next bucket.
22223
22224 2000-11-02  Vesselin Atanasov  <vesselin@bgnet.bg>
22225
22226         * lib/fnmatch.c: Do not comment out all the code if we are using
22227         the GNU C library, because in some cases we are replacing buggy
22228         code in the GNU C library itself.
22229
22230 2000-10-30  Stefan Monnier  <monnier@cs.yale.edu>
22231
22232         * regex.c (re_iswctype, re_wctype_to_bit): Fix braino.
22233         (regex_compile): Catch bogus \(\1\).
22234
22235 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22236
22237         * lib/fnmatch.c (FOLD): Do not assume that characters are unsigned.
22238         (fnmatch): Fix some FNM_FILE_NAME and FNM_LEADING_DIR bugs,
22239         e.g. fnmatch("d*/*1", "d/s/1", FNM_FILE_NAME) incorrectly yielded zero.
22240
22241 2000-10-30  Paul Eggert  <eggert@twinsun.com>
22242
22243         * lib/error.h, getline.h, modechange.h:
22244         Remove "2000" from Copyright line, as the file hasn't been
22245         changed this year other than in the copyright notice.
22246
22247         * lib/xalloc.h: Add "2000" to Copyright line, as this file
22248         was changed this year.
22249
22250 2000-10-29  Jim Meyering  <meyering@lucent.com>
22251
22252         * m4/fsusage.m4: s/AC_SHELL_IFELSE/AS_IFELSE/ to match autoconf
22253         renaming.
22254         * m4/ls-mntd-fs.m4: Likewise
22255
22256 2000-10-29  Jim Meyering  <meyering@lucent.com>
22257
22258         * lib/xstat.in: Fix grammar in comment.
22259
22260 2000-10-29  Greg Louis  <glouis@dynamicro.on.ca>
22261
22262         * lib/regex.h (__restrict_arr): Move definition out of #ifndef block.
22263         Required because egcs-2.91.66 (aka 1.1.2) defines __restrict, but
22264         doesn't define __restrict_arr.
22265
22266 2000-10-28  Jim Meyering  <meyering@lucent.com>
22267
22268         * m4/prereq.m4 (jm_PREREQ): Add jm_PREREQ_MEMCHR.
22269         (jm_PREREQ_MEMCHR): New function.
22270
22271 2000-10-28  Jim Meyering  <meyering@lucent.com>
22272
22273         * lib/memchr.c: Update from libc.
22274         Adjust for portability:
22275         [HAVE_STDLIB_H]: Include stdlib.h.
22276         [HAVE_BP_SYM_H || _LIBC]: Guard inclusion of bp-sym.h.
22277         Undef __memchr, too.
22278         [!weak_alias]: Define __memchr to memchr.
22279
22280         * lib/regex.c: Update from libc.
22281         * lib/regex.h: Likewise.
22282         * lib/getopt1.c: Likewise.
22283         * lib/memcmp.c: Likewise.
22284
22285         * lib/getusershell.c (setusershell) [HAVE_FSEEKO]: Use fseeko.
22286         Avoid using fseek, when possible -- it's broken by design.
22287         Patch by Ulrich Drepper.
22288
22289 2000-10-27  Stefan Monnier  <monnier@cs.yale.edu>
22290
22291         * regex.c (POP_FAILURE_REG_OR_COUNT, re_match_2_internal)
22292         (re_match_2_internal, re_match_2_internal, re_match_2_internal):
22293         Giving in to popular pressure to shut up the compiler with casts.
22294
22295 2000-10-26  Jim Meyering  <meyering@lucent.com>
22296
22297         * lib/strftime.c: Update from libc.
22298
22299 2000-10-25  Stefan Monnier  <monnier@cs.yale.edu>
22300
22301         * regex.c: More `unsigned char' -> `re_char' changes.
22302         Also change several `int' into `re_wchar_t'.
22303         (PATTERN_STACK_EMPTY, PUSH_PATTERN_OP, POP_PATTERN_OP): Remove.
22304         (PUSH_FAILURE_POINTER): Don't cast any more.
22305         (POP_FAILURE_REG_OR_COUNT): Remove the cast that strips `const'.
22306         We want GCC to complain, since this piece of code makes
22307         re_match non-reentrant, which *should* be fixed.
22308         (GET_BUFFER_SPACE): Use size_t rather than unsigned long.
22309         (EXTEND_BUFFER): Use RETALLOC.
22310         (SET_LIST_BIT): Don't cast.
22311         (re_wchar_t): New type.
22312         (re_iswctype, re_wctype_to_bit): Make it crystal clear to GCC
22313         that those two functions will always properly return.
22314         (IMMEDIATE_QUIT_CHECK): Cast to void.
22315         (analyse_first): Use recursion rather than an explicit stack.
22316         (re_compile_fastmap): Can't fail anymore.
22317         (re_search_2): Don't check re_compile_fastmap for failure.
22318         (PUSH_NUMBER): Renamed from PUSH_FAILURE_COUNT.
22319         Now also sets the new value (passed in a new argument).
22320         (re_match_2_internal): Use it.
22321         Also, use a new var `reg' of type size_t when looping through regs
22322         rather than reuse the inappropriate `mcnt'.
22323
22324 2000-10-25  Jim Meyering  <meyering@lucent.com>
22325
22326         * lib/obstack.c: Update from libc.
22327
22328 2000-10-24  Kenichi Handa  <handa@etl.go.jp>
22329
22330         * regex.c (regex_compile): Change the way of handling a range from
22331         a char less than 256 to a char not less than 256.
22332
22333 2000-10-24  Andrew Innes  <andrewi@gnu.org>
22334
22335         * regex.c (IMMEDIATE_QUIT_CHECK): New macro, which does QUIT on
22336         NT-Emacs only.
22337         (re_match_2_internal): Use IMMEDIATE_QUIT_CHECK instead of QUIT,
22338         so that re_search functions only quit when callers expect them to.
22339
22340 2000-10-23  Jim Meyering  <meyering@lucent.com>
22341
22342         * lib/hard-locale.c (hard_locale): Revert last change -- it was simply
22343         wrong.  That set_locale call must not have any side effects.
22344         From Paul Eggert.
22345
22346 2000-10-22  Jim Meyering  <meyering@lucent.com>
22347
22348         * lib/md5.c (md5_process_block) [OP]: Use `rol', not CYCLIC.
22349         [CYCLIC]: Remove now-unused definition.
22350
22351         * lib/save-cwd.c (O_DIRECTORY): Define, if needed.
22352         (save_cwd) [HAVE_FCHDIR]: Use O_DIRECTORY when opening ".".
22353         Suggestion from Ulrich Drepper.
22354
22355 2000-10-21  Jim Meyering  <meyering@lucent.com>
22356
22357         * m4/check-decl.m4 (jm_CHECK_DECLS): Also check for memrchr.
22358         * m4/prereq.m4 (jm_PREREQ_DIRNAME): New macro.
22359         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memrchr.
22360
22361 2000-10-21  Jim Meyering  <meyering@lucent.com>
22362
22363         * lib/dirname.c (memrchr): Declare if necessary.
22364         (dir_name): Remove the restriction that there be no
22365         trailing slashes.  Now, this code skips past them, effectively
22366         ignoring them.
22367         [TEST_DIRNAME] (main): New unit tests.
22368
22369         * lib/memrchr.c: New file from GNU libc.
22370         Undef __memrchr, too.
22371         [!weak_alias]: Define __memrchr to memrchr.
22372         Guard weak_alias use with `#ifdef weak_alias'.
22373
22374 2000-10-21  Jim Meyering  <meyering@lucent.com>
22375
22376         * lib/dirname.c (dir_name_r): New function, factored out of dir_name.
22377         (dir_name): Use dir_name_r.
22378         * lib/dirname.h (dir_name_r): Declare it.
22379
22380 2000-10-17  Jim Meyering  <meyering@lucent.com>
22381
22382         * lib/quote.h (PARAMS): Define and use.
22383         Reported by Akim Demaille.
22384
22385         * lib/getopt.c: Update from libc.
22386
22387 2000-10-16  Jim Meyering  <meyering@lucent.com>
22388
22389         * lib/hard-locale.c (hard_locale): Use "", not 0 as 2nd arg to
22390         setlocale.
22391         From Jan Fedak.
22392
22393 2000-10-15  Stefan Monnier  <monnier@cs.yale.edu>
22394
22395         * regex.c (WIDE_CHAR_SUPPORT): Define if _LIBC as well.
22396
22397 2000-09-25  Jim Meyering  <meyering@lucent.com>
22398
22399         * lib/md5.h (rol): Define (from GnuPG).
22400
22401         * lib/sha.c: Give credit (GnuPG) where due.
22402         (M): Use rol rather than open-coding it.
22403         Add a FIXME comment.
22404
22405 2000-09-21  Jim Meyering  <meyering@lucent.com>
22406
22407         * lib/userspec.c (parse_user_spec): Remove debugging printf I'd added.
22408         Reported by Michael Stone.
22409
22410 2000-09-20  Jim Meyering  <meyering@lucent.com>
22411
22412         * lib/Makefile.am (libfetish_a_SOURCES): Add sha.c.
22413         (noinst_HEADERS): Add sha.h.
22414         Based on code from Scott G. Miller and from GnuPG.
22415
22416 2000-09-18  Jim Meyering  <meyering@lucent.com>
22417
22418         * m4/getloadavg.m4 (AC_FUNC_GETLOADAVG): Restore the initial value of
22419         LIBS. Otherwise, everyone ends up linking with -lelf for some
22420         configurations.
22421         Reported by Mike Stone.
22422
22423 2000-09-15  Jim Meyering  <meyering@lucent.com>
22424
22425         * lib/regex.c: Update from libc.
22426
22427 2000-09-10  Jim Meyering  <meyering@lucent.com>
22428
22429         * lib/getopt.c (_getopt_internal): Update from glibc.
22430
22431 2000-09-09  Jim Meyering  <meyering@lucent.com>
22432
22433         * lib/quotearg.c: Rename ISASCII to IN_CTYPE_DOMAIN, so people don't
22434         think it should be used as a general replacement for isascii.
22435         * lib/fnmatch.c: Likewise.
22436         * lib/mbswidth.c: Likewise
22437         * lib/regex.c: Likewise.
22438
22439         Don't use atoi.
22440         * lib/userspec.c: Include sys/param.h and limits.h.
22441         Include xstrtol.h.
22442         (CHAR_BIT, TYPE_SIGNED, TYPE_MINIMUM, TYPE_MAXIMUM): Define.
22443         (UID_T_MAX, GID_T_MAX, MAXUID, MAXGID): Define.
22444         (parse_user_spec): Use xstrtoul, not atoi when converting numeric
22445         UID, GID.  Check range.
22446
22447 2000-09-06  Jim Meyering  <meyering@lucent.com>
22448
22449         * lib/getopt.c (_getopt_internal): Update from glibc.
22450
22451 2000-08-30  Jim Meyering  <meyering@lucent.com>
22452
22453         * lib/strftime.c: Merge in changes from GNU libc.
22454
22455 2000-08-26  Jim Meyering  <meyering@lucent.com>
22456
22457         * m4/jm-macros.m4: Use jm_FUNC_FPENDING.
22458         * m4/fpending.m4: New file.
22459
22460 2000-08-26  Jim Meyering  <meyering@lucent.com>
22461
22462         * lib/closeout.c: Include "__fpending.h".
22463         (close_stdout_status): Return right away if there's nothing to flush.
22464
22465         * lib/Makefile.am (noinst_HEADERS): Add __fpending.h.
22466         * lib/__fpending.c: New file.
22467         * lib/__fpending.h: New file.
22468
22469 2000-08-20  Jim Meyering  <meyering@lucent.com>
22470
22471         * m4/check-decl.m4: Include utmp.h `#if HAVE_UTMP_H', rather than
22472         `#if !HAVE_UTMPX_H'.  The latter would lose on systems with neither
22473         utmp.h nor utmpx.h.  Reported by Eli Zaretskii.
22474
22475 2000-08-11  J. David Anglin  <dave@hiauly1.hia.nrc.ca>
22476
22477         Improve fileutils installation on systems where running
22478         programs (like install) can't be unlinked.
22479         * m4/unlink-busy.m4 (jm_FUNC_UNLINK_BUSY_TEXT): New file/macro.
22480         * m4/jm-macros.m4: Use jm_FUNC_UNLINK_BUSY_TEXT.
22481
22482 2000-08-07  Paul Eggert  <eggert@twinsun.com>
22483
22484         Standardize on "memory exhausted" instead of "Memory exhausted"
22485         or "virtual memory exhausted".
22486         * lib/obstack.c (print_and_abort): Use "memory exhausted", not
22487         "virtual memory exhausted".
22488         * lib/same.c (same_name): Invoke xalloc_die instead of printing
22489         our own message.
22490         * lib/userspec.c (parse_user_spec): Likewise.
22491         * lib/bumpalloc.h: comment fix
22492         * lib/same.c, userspec.c: Include xalloc.h.
22493
22494         * lib/xalloc.h (xalloc_msg_memory_exhausted): Now char const[],
22495         not char *const and pointing to a constant array.
22496         * lib/xmalloc.c (xalloc_msg_memory_exhausted): Likewise.
22497         (xrealloc): Comment fix.
22498
22499         * lib/userspec.c (parse_user_spec):
22500         Don't translate a message until just before returning,
22501         to avoid unnecessary translation.
22502
22503 2000-08-07  Jim Meyering  <meyering@lucent.com>
22504
22505         * lib/addext.c, argmatch.c, argmatch.h, backupfile.h, bumpalloc.h,
22506         chown.c, diacrit.h, dirname.h, dup2.c, exclude.h, fileblocks.c,
22507         fnmatch.c, fnmatch.h, fsusage.c, fsusage.h, getdate.h,
22508         getgroups.c, gethostname.c, getopt.h, group-member.c,
22509         hard-locale.c, hash.h, isdir.c, lchown.c, linebuffer.c,
22510         linebuffer.h, long-options.h, malloc.c, md5.c, md5.h, memchr.c,
22511         memcmp.c, memcoll.c, memset.c, mktime.c, modechange.h, obstack.h,
22512         pathmax.h, realloc.c, rmdir.c, safe-read.c, save-cwd.c, stime.c,
22513         stpcpy.c, strcasecmp.c, strcspn.c, strdup.c, stripslash.c,
22514         strstr.c, strtod.c, strtol.c, strtoul.c, strtoull.c, strtoumax.c,
22515         utime.c, version-etc.h, xalloc.h, xstrdup.c, xstrtoumax.c,
22516         yesno.c: Back out Copyright date changes for each file with no change
22517         this year.  This eases coordination with other programs using the same
22518         source code modules.  From Paul Eggert.
22519
22520 2000-08-06  Paul Eggert  <eggert@twinsun.com>
22521
22522         * m4/mbstate_t.m4 (AC_MBSTATE_T): Define mbstate_t to be int,
22523         not char, for compatibility with glibc 2.1.3 strftime.c.
22524
22525 2000-08-03  Greg McGary  <greg@mcgary.org>
22526
22527         * lib/regex.c (SET_HIGH_BOUND, MOVE_BUFFER_POINTER,
22528         ELSE_EXTEND_BUFFER_HIGH_BOUND): New macros.
22529         (EXTEND_BUFFER): Use them.
22530
22531 2000-08-01  Jim Meyering  <meyering@lucent.com>
22532
22533         * lib/dirname.c (ISSLASH): Define.
22534         (BACKSLASH_IS_PATH_SEPARATOR): Define.
22535         (dir_name) [BACKSLASH_IS_PATH_SEPARATOR]: Handle the case in which
22536         both `\' and `/' may be use as path separators.
22537         Based on a patch from Prashant TR.
22538
22539 2000-07-31  Paul Eggert  <eggert@twinsun.com>
22540
22541         * lib/quotearg.c (quotearg_n_options): Don't make the initial
22542         slot vector a constant, since it might get modified.
22543
22544 2000-07-31  Jim Meyering  <meyering@lucent.com>
22545
22546         * lib/xmalloc.c: Use `virtual memory exhausted', not
22547         `Memory exhausted'.
22548         * lib/obstack.c (print_and_abort): Likewise.
22549
22550 2000-07-30  Paul Eggert  <eggert@twinsun.com>
22551
22552         * lib/quotearg.c (quotearg_n_options): Preallocate a slot 0
22553         buffer, so that the caller can always quote one small
22554         component of a "memory exhausted" message in slot 0.
22555         From a suggestion by Jim Meyering.
22556
22557 2000-07-30  Jim Meyering  <meyering@lucent.com>
22558
22559         * lib/makepath.c (make_path): Quote the other instance, too.
22560
22561         * lib/quotearg.c (N_STATIC_SLOTVECS): Define.
22562         (STATIC_BUF_SIZE): Define.
22563         (quotearg_n_options): Use only statically allocated storage when
22564         N < N_STATIC_SLOTVECS and the length of the quoted result is smaller
22565         than STATIC_BUF_SIZE.
22566
22567 2000-07-29  Jim Meyering  <meyering@lucent.com>
22568
22569         * lib/diacrit.c (diacrit_diac): Use __MSDOS__ in favor of MSDOS.
22570         * lib/dirname.c (dir_name): Likewise.
22571
22572         * lib/basename.c (base_name): Use ISSLASH rather than comparing against
22573         `/'.
22574
22575         * lib/dirname.c (dir_name) [MSDOS]: Declare `lim' to be const.
22576         (dir_name): Assert that there are no trailing slashes.
22577
22578 2000-07-29  Bruno Haible  <haible@clisp.cons.org>
22579
22580         * lib/mbswidth.h (mbswidth): Add a flags argument.
22581         (mbswidth): New declaration.
22582         (MBSW_ACCEPT_INVALID, MBSW_ACCEPT_UNPRINTABLE): New macros.
22583         * lib/mbswidth.c (mbswidth): Add a flags argument.
22584         (mbsnwidth): New function.
22585
22586 2000-07-24  Jim Meyering  <meyering@lucent.com>
22587
22588         * lib/mbswidth.c: Remove useless #else.  From Bruno Haible.
22589
22590 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22591
22592         * m4/mbswidth.m4 (jm_PREREQ_MBSWIDTH): Check for wcwidth declaration.
22593
22594 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22595
22596         * lib/quotearg.c: Streamline by invoking multibyte code only if needed.
22597         <wchar.h>: Include only if HAVE_MBRTOWC && 1 < MB_LEN_MAX.
22598         (MB_CUR_MAX): Redefine to 1 if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX).
22599         (quotearg_buffer_restyled): If a unibyte locale, don't bother to
22600         invoke multibyte primitives.
22601
22602 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22603
22604         * lib/quotearg.c:
22605         Include <wchar.h> even if ! (HAVE_MBRTOWC && 1 < MB_LEN_MAX),
22606         so that mbstate_t is always defined.
22607
22608         Do not inspect MB_LEN_MAX, since it's incorrectly defined to
22609         be 1 in at least one GCC installation, and this configuration
22610         error is likely to be common.  Ignoring MB_LEN_MAX hurts
22611         performance on hosts that have mbrtowc but have only unibyte
22612         locales, but I assume these hosts are rare.
22613
22614 2000-07-23  Paul Eggert  <eggert@twinsun.com>
22615
22616         * lib/mbswidth.c (_XOPEN_SOURCE):
22617         Don't define; this causes problems on Solaris 7.
22618         (wcwidth) [!HAVE_DECL_WCWIDTH]: Declare.
22619
22620 2000-07-23  Jim Meyering  <meyering@lucent.com>
22621
22622         * m4/check-decl.m4 (jm_CHECK_DECLS): Check for declarations of these,
22623         too: getgrgid, getpwuid, getuid.
22624
22625 2000-07-23  Jim Meyering  <meyering@lucent.com>
22626
22627         * lib/basename.c (base_name): Add an assertion.
22628
22629 2000-07-23  Bruno Haible  <haible@clisp.cons.org>
22630
22631         * lib/quotearg.c: When the system forces us to redefine mbstate_t,
22632         shadow its mbsinit function.
22633
22634 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22635
22636         * lib/mbswidth.h: New file.
22637         * lib/mbswidth.c: New file.
22638         * lib/Makefile.am (libfetish_a_SOURCES): Add mbswidth.c.
22639         (noinst_HEADERS): Add mbswidth.h.
22640
22641 2000-07-17  Bruno Haible  <haible@clisp.cons.org>
22642
22643         * lib/config.charset: Add support for FreeBSD. Improve support for
22644         HP-UX and IRIX 6.
22645
22646 2000-07-16  Bruno Haible  <haible@clisp.cons.org>
22647
22648         * m4/mbswidth.m4: New file.
22649         * m4/prereq.m4 (jm_PREREQ): Call jm_PREREQ_MBSWIDTH.
22650
22651 2000-07-15  Jim Meyering  <meyering@lucent.com>
22652
22653         * lib/makepath.c: Include quote.h.
22654         (make_path): Convert "`%s'" in format strings to "%s", and wrap each
22655         corresponding argument in a `quote (...)' call.
22656         Give better diagnostics.
22657
22658         * lib/Makefile.am (libfetish_a_SOURCES): Add quote.c.
22659         (noinst_HEADERS): Add quote.h.
22660
22661         * lib/quote.c (quote, quote_n): New file.  Two functions taken verbatim
22662         from tar's src/misc.c.
22663         * lib/quote.h: New file.  Prototypes for same.
22664
22665 2000-07-14  Paul Eggert  <eggert@twinsun.com>
22666
22667         From a suggestion by Bruno Haible.
22668         * lib/quotearg.c (mbrtowc): Do not use HAVE_WCHAR_H in the definition.
22669         Use defined mbstate_t, not HAVE_MBSTATE_T_OBJECT,
22670         to decide whether to define the BeOS workaround macro;
22671         this adjusts to the change to AC_MBSTATE_T.
22672
22673 2000-07-14  Jim Meyering  <meyering@lucent.com>
22674
22675         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Require
22676         jm_AC_TYPE_UINTMAX_T.
22677
22678 2000-07-13  Paul Eggert  <eggert@twinsun.com>
22679
22680         * lib/quotearg.h (enum quoting style): New enum clocale_quoting_style.
22681
22682         * lib/quotearg.c (quoting_style_args, quoting_style_vals,
22683         quotearg_buffer_restyled): Add support for
22684         clocale_quoting_style.  Undo previous change to
22685         locale_quoting_style behavior, and undo the "{LEFT QUOTATION MARK}"
22686         and "{RIGHT QUOTATION MARK}" msgids.
22687
22688 2000-07-10  Paul Eggert  <eggert@twinsun.com>
22689
22690         From a suggestion by Bruno Haible.
22691         * m4/mbstate_t.m4 (AC_MBSTATE_T):
22692         Renamed from AC_MBSTATE_T_OBJECT.  All uses changed.
22693         Change from a two-part test, which defines both HAVE_MBSTATE_T_OBJECT
22694         and mbstate_t, to a single-part test that simply defines mbstate_t.
22695         * m4/prereq.m4 (jm_PREREQ_QUOTEARG):
22696         s/AC_MBSTATE_T_OBJECT/AC_MBSTATE_T/.
22697
22698 2000-07-10  Jim Meyering  <meyering@lucent.com>
22699
22700         * m4/strerror_r.m4: Mirror the correction made in autoconf.
22701
22702         * m4/gnu-source.m4: Output to confdefs.h directly.
22703         Suggestion from Akim Demaille.
22704
22705 2000-07-09  Paul Eggert  <eggert@twinsun.com>
22706
22707         The old behavior of quoting `like this' doesn't look good with
22708         newer, ISO-style fonts.  See:
22709         http://www.cl.cam.ac.uk/~mgk25/ucs/quotes.html
22710
22711         Instead, quote "like this" by default.  Let the translator
22712         tailor the locale-specific quoting behavior by providing
22713         translations for {LEFT QUOTATION MARK} and {RIGHT QUOTATION MARK}.
22714
22715         * lib/quotearg.c (N_): New macro.
22716         (gettext_default): New function.
22717         (quotearg_buffer_restyled): Use
22718         gettext_default ("{LEFT QUOTATION MARK}", "\"") for left quote, and
22719         gettext_default ("{RIGHT QUOTATION MARK}", "\"") for right quote.
22720
22721 2000-07-09  Jim Meyering  <meyering@lucent.com>
22722
22723         * m4/jm-macros.m4 (jm_MACROS): Add a test to see if -lm is required
22724         to link seq.  If so, set SEQ_LIBM to -lm.  From Bruno Haible.
22725
22726         * m4/gnu-source.m4 (AC__GNU_SOURCE): New file/macro.
22727         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require it.
22728
22729 2000-07-09  Jim Meyering  <meyering@lucent.com>
22730
22731         * lib/Most files: Update copyright dates to include 2000.
22732
22733 2000-07-08  Jim Meyering  <meyering@lucent.com>
22734
22735         * lib/xgethostname.c (ENAMETOOLONG): Define to an unlikely value
22736         if not defined.
22737         (xgethostname): Remove now-unnecessary #ifdef.
22738         Move declaration of `err' into loop where it's used.
22739
22740 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22741         and Bruno Haible  <haible@clisp.cons.org>
22742
22743         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Test for mbstate_t
22744         only if the test for an object-type mbstate_t fails.  This
22745         prevents us from mistakenly reporting that mbstate_t is a
22746         system object type after we "#define mbstate_t int" to work
22747         around its lack.
22748
22749 2000-07-05  Paul Eggert  <eggert@twinsun.com>
22750         and Bruno Haible  <haible@clisp.cons.org>
22751
22752         * lib/quotearg.c (mbrtowc): Declare returned type, since BeOS doesn't.
22753
22754 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22755
22756         * m4/strerror_r.m4 (AC_FUNC_STRERROR_R): Pass a reasonably large buffer
22757         to strerror_r.
22758         Include <ctype.h> for use of isalpha.
22759
22760 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22761
22762         * lib/xgethostname.c (xgethostname): Protect against the SunOS 5.5 bug
22763         by allocating a larger buffer. Test the gethostname return value for
22764         being >= 0, not == 0, for BeOS.  Don't exhaust memory if gethostname
22765         returns an error and ENAMETOOLONG isn't defined.
22766
22767 2000-07-05  Bruno Haible  <haible@clisp.cons.org>
22768
22769         * lib/quotearg.c (struct quoting_options): Simplify quote_these_too
22770         dimension.
22771
22772 2000-07-04  Jim Meyering  <meyering@lucent.com>
22773
22774         * m4/fsusage.m4 (jm_FILE_SYSTEM_USAGE): Use plain old `echo' instead
22775         of the deprecated AC_CHECKING.
22776
22777 2000-07-04  Jim Meyering  <meyering@lucent.com>
22778
22779         * lib/strndup.c: [!HAVE_DECL_STRNLEN]: Declare strnlen.
22780         Reported by Bruno Haible.
22781
22782 2000-07-04  Jim Meyering  <meyering@lucent.com>
22783
22784         * lib/quotearg.c: Make inclusion of <wchar.h> independent of whether
22785         HAVE_MBRTOWC is set.  Required at least for irix-5.6, which
22786         lacks mbrtowc.
22787
22788 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22789
22790         * m4/mbstate_t.m4 (AC_MBSTATE_T_OBJECT): Port to autoconf 2.13.
22791         Add AC_CHECK_HEADERS(stdlib.h), since we use HAVE_STDLIB_H.
22792
22793 2000-07-03  Paul Eggert  <eggert@twinsun.com>
22794         and Bruno Haible  <haible@clisp.cons.org>
22795
22796         * lib/quotearg.c (mbrtowc):
22797         Assign to *pwc, and return 1 only if result is nonzero.
22798         (iswprint): Use ISPRINT when substituting our own mbrtowc.
22799
22800 2000-07-03  Jim Meyering  <meyering@lucent.com>
22801
22802         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strnlen.
22803
22804 2000-07-03  Jim Meyering  <meyering@lucent.com>
22805
22806         * lib/readutmp.h: [HAVE_UTMPX_H]: Include <utmp.h> if HAVE_UTMP_H.
22807         This is necessary to get a definition of e.g., UTMP_FILE on
22808         HP-UX 10.20.
22809         From Bob Proulx.
22810
22811 2000-07-02  Jim Meyering  <meyering@lucent.com>
22812
22813         * m4/mbstate_t.m4: Also define mbstate_t, if necessary.
22814
22815         * m4/chown.m4: Replace each use of AC_SUBST(LIBOBJS)/LIBOBJS=... with
22816         AC_LIBOBJ(function_name).
22817         * m4/chown.m4: Likewise.
22818         * m4/fnmatch.m4: Likewise.
22819         * m4/ftruncate.m4: Likewise.
22820         * m4/getgroups.m4: Likewise.
22821         * m4/getline.m4: Likewise.
22822         * m4/group-member.m4: Likewise.
22823         * m4/jm-macros.m4: Likewise.
22824         * m4/lstat.m4: Likewise.
22825         * m4/malloc.m4: Likewise.
22826         * m4/memcmp.m4: Likewise.
22827         * m4/nanosleep.m4: Likewise.
22828         * m4/putenv.m4: Likewise.
22829         * m4/realloc.m4: Likewise.
22830         * m4/regex.m4: Likewise.
22831         * m4/stat.m4: Likewise.
22832         * m4/strftime.m4: Likewise.
22833
22834 2000-07-02  Jim Meyering  <meyering@lucent.com>
22835
22836         * lib/quotearg.c (mbstate_t): Don't define here.
22837
22838 2000-07-02  Jim Meyering  <meyering@lucent.com>
22839
22840         * lib/nanosleep.c (SIGCONT): Define if not already defined.
22841
22842 2000-07-01  Jim Meyering  <meyering@lucent.com>
22843
22844         * m4/uptime.m4: Put double quotes around use of $cross_compiling.
22845
22846 2000-07-01  Jim Meyering  <meyering@lucent.com>
22847
22848         * m4/ls-mntd-fs.m4: Remove a `FIXME' comment and fix the associated
22849         problem.
22850
22851 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22852
22853         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Rename BeOS specific
22854         macro from MOUNTED_NEXT_DEV to MOUNTED_FS_STAT_DEV.
22855
22856 2000-07-01  Bruno Haible  <haible@clisp.cons.org>
22857
22858         * lib/mountlist.c: Use MOUNTED_FS_STAT_DEV instead of MOUNTED_NEXT_DEV,
22859         per change in ../m4/ls-mntd-fs.m4.
22860         (read_filesystem_list): Ignore symbolic links.
22861
22862 2000-06-29  Jim Meyering  <meyering@lucent.com>
22863
22864         * lib/same.c: Include <string.h> or <strings.h>, as appropriate,
22865         for declaration of strcmp.
22866
22867         * lib/long-options.c: Include <stdlib.h>, for declaration of exit.
22868
22869         * lib/mountlist.c (fsp_to_string) [HAVE_F_FSTYPENAME_IN_STATFS]:
22870         Avoid warning by casting result to `char *' to remove `const'.
22871
22872 2000-06-28  Jim Meyering  <meyering@lucent.com>
22873
22874         * m4/mbstate_t.m4: Use stdlib.h, not stdio.h.  The latter is not
22875         included by quotearg.c, for which we perform this test.  From
22876         Bruno Haible.
22877
22878 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22879
22880         * m4/check-decl.m4 (_jm_DECL_HEADERS): Check for utmp.h as well.
22881         * m4/prereq.m4 (jm_PREREQ_READUTMP): Likewise. If either <utmp.h> or
22882         <utmpx.h> exists, put readutmp.o into LIBOBJS.
22883
22884 2000-06-27  Bruno Haible  <haible@clisp.cons.org>
22885
22886         * lib/Makefile.am (libfetish_a_SOURCES): Remove readutmp.c.
22887
22888 2000-06-26  Paul Eggert  <eggert@twinsun.com>
22889
22890         savedir now sets errno on failure and invokes xmalloc to get memory.
22891         Fix a couple of other minor bugs while we're at it.
22892
22893         * lib/savedir.c (<unistd.h>): Do not include; there's no need.
22894         (NAMLEN): Remove macro.
22895         (malloc, realloc): Remove decls.
22896         (stpcpy): Likewise.
22897         ("xalloc.h"): Include.
22898         (NAME_SIZE_DEFAULT): New macro.
22899         (savedir): Use xmalloc / xrealloc to allocate memory.
22900         Use NAME_SIZE_DEFAULT if name_size is negative or overflows to zero.
22901         Skip "" directory entries.
22902         Use strlen to calculate directory entry length, since the old method
22903         is rarely used these days and isn't worth supporting.
22904         Don't use a pointer after freeing it.
22905         Check for integer overflow when calculating allocation size.
22906         Use memcpy to copy entries, instead of stpcpy.
22907         Set errno properly when returning NULL.
22908         Check for readdir error.
22909
22910 2000-06-26  Jim Meyering  <meyering@lucent.com>
22911
22912         * lib/posixtm.c [HAVE_STDLIB_H]: Include stdlib.h, for decl of abort.
22913
22914 2000-06-25  Jim Meyering  <meyering@lucent.com>
22915
22916         * m4/mbstate_t.m4: Include stdio.h before wchar.h to work around
22917         Linux header bug when _XOPEN_SOURCE is defined to 500.
22918
22919 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22920
22921         * lib/unicodeio.c (print_unicode_char): Work around ansi2knr
22922         deficiency.
22923
22924 2000-06-25  Bruno Haible  <haible@clisp.cons.org>
22925
22926         * lib/getusershell.c (xmalloc, xrealloc): Remove functions.
22927         Include xalloc.h.
22928         Don't include <stdlib.h>.  Don't declare malloc, realloc.
22929
22930 2000-06-24  Jim Meyering  <meyering@lucent.com>
22931
22932         * m4/strerror_r.m4: Revive this file -- to try out an experimental
22933         version of AC_FUNC_STRERROR_R that may work even on BeOS, a system
22934         for which strerror does return char*, but which lacks a conveniently
22935         accessible declaration of the function.  If the compile-test says
22936         strerror_r doesn't work, then resort to a `run'-test that works on
22937         BeOS and segfaults on DEC Unix.
22938
22939 2000-06-24  Jim Meyering  <meyering@lucent.com>
22940
22941         * lib/error.c [!HAVE_DECL_STRERROR_R]: Declare strerror_r.
22942
22943 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22944
22945         * m4/mbstate_t.m4: New file, defining AC_MBSTATE_T_OBJECT.
22946         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Use it.  Add check for iswprint.
22947
22948 2000-06-23  Paul Eggert  <eggert@twinsun.com>
22949
22950         * lib/quotearg.c: Include <wctype.h> after <wchar.h>, for Solaris 2.5.
22951         (mbrtowc, mbstate_t): Define substitutes if
22952         HAVE_MBRTOWC && HAVE_WCHAR_H && !HAVE_MBSTATE_T_OBJECT.
22953         (iswprint): Define to 1 if !defined iswprint && !HAVE_ISWPRINT,
22954         not if ! (HAVE_MBRTOWC && HAVE_WCHAR_H).
22955
22956 2000-06-23  Jim Meyering  <meyering@lucent.com>
22957
22958         * m4/afs.m4: Add missing AC_MSG_RESULT.
22959         Reported by Bruno Haible.
22960
22961         * m4/fsusage.m4: s/AC_MSG_CHECKING/AC_CHECKING/.
22962         Suggestion from Bruno Haible.
22963
22964 2000-06-23  Jim Meyering  <meyering@lucent.com>
22965
22966         * lib/getpass.c: New file, from Bruno Haible.  Required for BeOS.
22967
22968 2000-06-21  Jim Meyering  <meyering@lucent.com>
22969
22970         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add getpass.
22971
22972 2000-06-21  Jim Meyering  <meyering@lucent.com>
22973
22974         * lib/Makefile.am (libfetish_a_SOURCES): Add getstr.c.
22975         (noinst_HEADERS): Add getstr.h.
22976
22977         * lib/getline.c (getstr): Move into a separate file.
22978         * lib/getstr.c (getstr): New file, extracted from getline.c, with
22979         the following changes: new parameter, delim2; both delim[12]
22980         parameters have type `int', not `char'.  The latter would lose
22981         with 8-bit delimiters.
22982         * lib/getstr.h: New file.
22983
22984 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22985
22986         * lib/xgetcwd.c (xgetcwd): If the required pathname length is smaller
22987         than 1024, return a memory chunk of least possible size, instead
22988         of size PATH_MAX + 2. In the loop, increment the size proportionally.
22989         Use free/xmalloc instead of xrealloc to avoid copying for very long
22990         paths.
22991
22992 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22993
22994         * lib/path-concat.c (path_concat): Don't access dir[-1] if dir is
22995         the empty string.
22996
22997 2000-06-21  Bruno Haible  <haible@clisp.cons.org>
22998
22999         * lib/canon-host.c (canon_host): Use malloc and memcpy to copy an
23000         address, not strdup.  Include <stdlib.h> and don't declare free().
23001
23002 2000-06-19  Jim Meyering  <meyering@lucent.com>
23003
23004         * lib/getloadavg.c [HAVE_NLIST_H] (NLIST_STRUCT): Define.
23005
23006 2000-06-18  Jim Meyering  <meyering@lucent.com>
23007
23008         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Remove mkdir.
23009
23010         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): Change the
23011         `checking whether...' message to be consistent with that of the
23012         lstat test.
23013
23014 2000-06-18  Jim Meyering  <meyering@lucent.com>
23015
23016         * lib/mkdir.c: Remove file, due mainly to copyright incompatibility.
23017         Besides, these days every porting target provides a mkdir function.
23018
23019         * lib/strnlen.c: Include memory.h, string.h, and/or strings.h as
23020         needed. (this snippet comes from src/system.h).
23021
23022 2000-06-16  Bruno Haible  <haible@clisp.cons.org>
23023
23024         * m4/glibc21.m4 (jm_GLIBC21): Define GLIBC21 for Makefiles, not for C.
23025
23026 2000-06-15  Paul Eggert  <eggert@twinsun.com>
23027
23028         * lib/human.c (adjust_value): New function.
23029         (human_readable_inexact): Apply rounding style even when
23030         printing approximate values.
23031
23032 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23033
23034         * lib/human.c (human_readable_inexact): Allow an input block
23035         size that is not a multiple of the output block size, and vice versa.
23036         Reported by Piergiorgio Sartor.
23037
23038 2000-06-14  Paul Eggert  <eggert@twinsun.com>
23039
23040         * lib/getdate.y (get_date): Apply relative times after time
23041         zone indicator, not before.  Reported by Todd A. Jacobs.
23042
23043 2000-06-13  Jim Meyering  <meyering@lucent.com>
23044
23045         * lib/Makefile.am (all-local): Depend on lstat.c and stat.c.
23046
23047         * lib/xstat.in [!HAVE_DECL_FREE]: Declare free in lstat.c.
23048
23049 2000-06-12  Paul Eggert  <eggert@twinsun.com>
23050
23051         * lib/xstat.in: Include <stdlib.h> in lstat, to declare "free".
23052
23053 2000-06-12  Jim Meyering  <meyering@lucent.com>
23054
23055         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Replace with
23056         AC_FUNC_GETLOADAVG from autoconf, and tweak the latter to accept an
23057         optional argument.
23058         * m4/jm-macros.m4: s/AM_FUNC_GETLOADAVG/AC_FUNC_GETLOADAVG/, and supply
23059         the optional argument, `lib'.
23060
23061 2000-06-08  Jim Meyering  <meyering@lucent.com>
23062
23063         * m4/largefile.m4: Remove file (now that it's part of autoconf).
23064
23065 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23066
23067         Rewrite largefile configuration so that we don't need to run
23068         getconf and don't need AC_CANONICAL_HOST.  [I'm leaving the use of
23069         AC_CANONICAL_HOST in configure.in -- jmm]
23070
23071         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS,
23072         AC_SYS_LARGEFILE_SPACE_APPEND): Remove.
23073         (AC_SYS_LARGEFILE_TEST_INCLUDES): New macro.
23074         (AC_SYS_LARGEFILE_MACRO_VALUE): Change arguments from
23075         CODE-TO-SET-DEFAULT to VALUE, INCLUDES, FUNCTION-BODY.
23076         All uses changed.
23077         Instead of inspecting the output of getconf, try to compile the
23078         test program without and with the macro definition.
23079         (AC_SYS_LARGEFILE): Do not require AC_CANONICAL_HOST or check
23080         for getconf.  Instead, check for the needed flags by compiling
23081         test programs.
23082
23083 2000-06-04  Paul Eggert  <eggert@twinsun.com>
23084
23085         * lib/strnlen.c: Include <config.h> if HAVE_CONFIG_H.
23086
23087 2000-06-04  Jim Meyering  <meyering@lucent.com>
23088
23089         * lib/getugroups.c (getugroups): Cast -1 to gid_t, for systems like
23090         SunOS 4.1.4 for which gid_t is an unsigned type.
23091
23092 2000-06-03  Jim Meyering  <meyering@lucent.com>
23093
23094         * m4/prereq.m4 (jm_PREREQ_HUMAN): Use []-quoted list in AC_CHECK_DECLS,
23095         now that autoconf requires that.
23096
23097         * m4/jm-glibc-io.m4: Add a kludge to make autoheader emit the required
23098         #undefs.  E.g., #undef HAVE_DECL_FERROR_UNLOCKED.
23099         Use []-quoted list in AC_CHECK_DECLS, now that autoconf requires that.
23100
23101 2000-06-03  Jim Meyering  <meyering@lucent.com>
23102
23103         * lib/strnlen.c [!HAVE_DECL_MEMCHR]: Declare memchr.
23104
23105 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23106
23107         * m4/glibc21.m4: New file.
23108         * m4/jm-macros.m4 (jm_MACROS): Call jm_GLIBC21.
23109
23110 2000-06-03  Bruno Haible  <haible@clisp.cons.org>
23111
23112         * lib/Makefile.am (install-exec-local): On systems with glibc-2.1 or
23113         newer, don't install charset.alias.
23114         * lib/config.charset: Change the Linux/glibc rules so they become empty
23115         on glibc-2.1 or newer.
23116
23117 2000-06-02  Jim Meyering  <meyering@lucent.com>
23118
23119         * lib/mountlist.c: Back out last change.  Instead, do this...
23120         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Set the
23121         me_dummy member using the same `ignore'-testing code.
23122         * lib/mountlist.h (ME_DUMMY): Add `autofs' to the list of ignored
23123         fs_type strings.
23124         From Mark D. Roth.
23125
23126 2000-05-29  Jim Meyering  <meyering@lucent.com>
23127
23128         * lib/mountlist.c (read_filesystem_list) [MOUNTED_VMOUNT]: Ignore
23129         mounts with the `ignore' attribute.  Based on a patch from
23130         Mark D. Roth.
23131
23132 2000-05-28  Jim Meyering  <meyering@lucent.com>
23133
23134         * m4/jm-macros.m4 (AC_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK): Rename from
23135         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23136         * m4/stat.m4: Likewise.
23137         * m4/lstat.m4: Likewise.
23138         * m4/lstat-slash.m4: Remove file (absorbed into autoconf).
23139
23140         * m4/jm-macros.m4 (AC_FUNC_STRERROR_R): Rename from jm_FUNC_STRERROR_R.
23141         * m4/strerror_r.m4: Remove file (absorbed into autoconf).
23142
23143 2000-05-26  Jim Meyering  <meyering@lucent.com>
23144
23145         * m4/uptime.m4: Use `$cross_compiling', not `$ac_cv_prog_cc_cross'.
23146
23147 2000-05-24  Jim Meyering  <meyering@lucent.com>
23148
23149         * m4/prereq.m4: Use []-quoted list in AC_CHECK_MEMBERS, now that
23150         autoconf requires that.
23151         * m4/lib-check.m4: Likewise.
23152         * m4/jm-macros.m4: Likewise.
23153         * m4/strftime.m4: Likewise.
23154
23155         * m4/check-decl.m4 (jm_CHECK_DECLS): Use []-quoted list in
23156         AC_CHECK_DECLS, now that autoconf requires that.
23157
23158 2000-05-22  Jim Meyering  <meyering@lucent.com>
23159
23160         * m4/stat.m4: Require jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23161         * m4/lstat.m4: Likewise.
23162
23163 2000-05-22  Jim Meyering  <meyering@lucent.com>
23164
23165         * lib/makepath.c: Remove old, now-unnecessary `#ifdef __MSDOS__' block.
23166
23167 2000-05-20  Jim Meyering  <meyering@lucent.com>
23168
23169         * m4/prereq.m4 (jm_PREREQ_HUMAN): New macro.
23170         (jm_PREREQ): Use it.
23171
23172 2000-05-18  Jim Meyering  <meyering@lucent.com>
23173
23174         * lib/hash.c (hash_rehash): Fix a nasty bug: copy the free entry list
23175         back, too, since it may have been modified by allocate_entry.
23176         (hash_delete): Rewrite to use neither the assignment operator
23177         nor the comma operator in an if-expression.
23178
23179 2000-05-15  Paul Eggert  <eggert@twinsun.com>
23180
23181         * lib/closeout.c:
23182         <sys/stat.h>, <sys/types.h>, <unistd.h>, (STDOUT_FILENO):
23183         Remove; no longer needed.
23184         "quotearg.h": Add include.
23185         (file_name): Do not bother to explicitly initialize to NULL; it's less
23186         efficient on some hosts.
23187         (close_stdout_status): Remove test as to whether stdout was already
23188         closed; it breaks for the case "echo x | sort >&-".
23189         Quote file name colons.
23190         Do not assume that _("write error") lacks format strings.
23191
23192 2000-05-15  Jim Meyering  <meyering@lucent.com>
23193
23194         * lib/version-etc.c (version_etc_copyright): Update the copyright
23195         string used in all --version output.
23196
23197 2000-05-14  Jim Meyering  <meyering@lucent.com>
23198
23199         * lib/closeout.c (close_stdout_set_file_name): New function.
23200         (close_stdout_status): Use new file-scoped global.
23201         Return right away if fstat says the stdout file descriptor is invalid.
23202         * lib/closeout.h (close_stdout_set_file_name): Declare.
23203
23204 2000-05-10  Jim Meyering  <meyering@lucent.com>
23205
23206         * lib/closeout.c [default_exit_status]: New file-scoped variable.
23207         (close_stdout_set_status): New function.
23208         * lib/closeout.h (close_stdout_set_status): Declare.
23209
23210 2000-05-09  Jim Meyering  <meyering@lucent.com>
23211
23212         * m4/gettext.m4: Rename this...
23213         * m4/libintl.m4: ...to this.
23214
23215 2000-05-08  Jim Meyering  <meyering@lucent.com>
23216
23217         * lib/long-options.c: Don't include closeout.h.
23218         (parse_long_options): Don't call close_stdout for --version.
23219
23220 2000-05-06  Paul Eggert  <eggert@twinsun.com>
23221
23222         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _XOPEN_SOURCE to
23223         be 500, instead of _GNU_SOURCE to be 1, to work around glibc
23224         2.1.3 bug.  This avoids a clash when files like regex.c define
23225         _GNU_SOURCE.
23226
23227 2000-05-06  Jim Meyering  <meyering@lucent.com>
23228
23229         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add atexit.
23230         (AC_REPLACE_FUNCS): Add strnlen.
23231
23232         * m4/rmdir-errno.m4 (fetish_FUNC_RMDIR_NOTEMPTY): New macro and file.
23233         * m4/jm-macros.m4: Require fetish_FUNC_RMDIR_NOTEMPTY.
23234
23235         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Save and restore LIBS around
23236         AC_SEARCH_LIBS call for nanosleep.
23237         (LIB_NANOSLEEP): Set and AC_SUBST.
23238
23239 2000-05-06  Jim Meyering  <meyering@lucent.com>
23240
23241         * lib/strnlen.c: Undefine __strnlen and strnlen.
23242         [!weak_alias]: Define __strnlen to strnlen.
23243
23244         * lib/atexit.c: New file, from libiberty.
23245
23246 2000-05-06  Jim Meyering  <meyering@lucent.com>
23247
23248         * lib/closeout.c (close_stdout_status): Also check for errors on the
23249         stderr stream.
23250
23251 2000-05-05  Jim Meyering  <meyering@lucent.com>
23252
23253         * m4/jm-macros.m4 (jm_MACROS): Save and restore LIBS around
23254         AC_SEARCH_LIBS call for clock_gettime.
23255         (LIB_CLOCK_GETTIME): Set and AC_SUBST.
23256
23257         * m4/search-libs.m4: Update from autoconf.
23258
23259         su doesn't work on Solaris 2.6.
23260         * m4/lib-check.m4: When checking for struct spwd.sp_pwdp, also include
23261         <shadow.h>.  Reported by Dragos Harabor.
23262
23263 2000-05-05  Bruno Haible  <haible@clisp.cons.org>
23264
23265         * lib/localcharset.c (get_charset_aliases): Use malloc, realloc and
23266         memcpy instead of xmalloc, xrealloc, path_concat.
23267         (locale_charset): Treat empty environment variables as absent.
23268         (DIRECTORY_SEPARATOR, ISSLASH): New macros.
23269
23270 2000-05-04  Jim Meyering  <meyering@lucent.com>
23271
23272         * lib/getopt.c: Update from glibc.
23273         * lib/obstack.c: Likewise.
23274         * lib/obstack.h: Likewise.
23275         * lib/regex.c: Likewise.  NB: K&R compiler support is dropped for this
23276         file
23277
23278         * lib/regex.h: Likewise.
23279         * lib/strndup.c: Likewise.
23280         * lib/strnlen.c: New file, from glibc.
23281
23282 2000-05-03  Jim Meyering  <meyering@lucent.com>
23283
23284         * m4/check-decl.m4 (AC_CHECK_DECLS): Add strndup.
23285
23286 2000-05-02  Paul Eggert  <eggert@twinsun.com>
23287
23288         * m4/largefile.m4 (AC_SYS_LARGEFILE): Define _GNU_SOURCE if
23289         this is needed to make ftello visible (e.g. glibc 2.1.3).  Use
23290         compile-time test, rather than inspecting host and OS, to
23291         decide whether to define _LARGEFILE_SOURCE.
23292
23293 2000-05-01  Jim Meyering  <meyering@lucent.com>
23294
23295         * m4/fsusage.m4: Use AC_MSG_CHECKING instead of obsolete AC_CHECKING.
23296
23297         * m4/ls-mntd-fs.m4 (jm_LIST_MOUNTED_FILESYSTEMS): Add BeOS support.
23298         Based on a patch from Bruno Haible.
23299
23300 2000-05-01  Jim Meyering  <meyering@lucent.com>
23301
23302         * lib/full-write.c (full_write): Remove `FIXME' part of comment.
23303
23304 2000-04-29  Jim Meyering  <meyering@lucent.com>
23305
23306         * lib/path-concat.c: Declare strdup only if it's not defined.
23307         * lib/canon-host.c: Likewise.
23308
23309 2000-04-28  Jim Meyering  <meyering@lucent.com>
23310
23311         * lib/rpmatch.c [HAVE_LIMITS_H]: Include limits.h before regex.h to
23312         avoid redefinition warning on some systems (HPUX).  Otherwise, regex.h
23313         is included first, then limits.h is included by locale.h by libintl.h.
23314         From John David Anglin.
23315
23316 2000-04-25  Jim Meyering  <meyering@lucent.com>
23317
23318         * lib/makepath.c (S_IRWXUGO): Define.
23319         (make_path): Always perform explicit chmod if MODE specifies any
23320         of the `special' permission bits.  Prompted by a bug report against
23321         install from Mate Wierdl and Joost van Baal.
23322
23323 2000-04-18  Jim Meyering  <meyering@lucent.com>
23324
23325         * m4/prereq.m4 (jm_PREREQ_GETPAGESIZE): New macro.
23326         (jm_PREREQ): Use it.
23327
23328 2000-04-18  Jim Meyering  <meyering@lucent.com>
23329
23330         * lib/README: New file.
23331
23332         * lib/getpagesize.h [!getpagesize && HAVE_OS_H && B_PAGE_SIZE]: Define
23333         getpagesize.  For BeOS.  Based on a patch from Bruno Haible.
23334
23335 2000-04-17  Jim Meyering  <meyering@lucent.com>
23336
23337         Get it right :-)
23338         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Emit the
23339         actual #define via AH_VERBATIM.  Don't need separate AC_DEFINE.
23340         Suggestion from Akim Demaille.
23341
23342 2000-04-17  Jim Meyering  <meyering@lucent.com>
23343
23344         * lib/strftime.c (my_strftime) [strftime]: Declare strftime here, since
23345         the definition of it to rpl_strftime also defined-away the system's
23346         declaration.
23347
23348 2000-04-15  Jim Meyering  <meyering@lucent.com>
23349
23350         Use `C' to denote so-called `contiguous' files, the same way
23351         that tar does.
23352         * lib/filemode.c (S_ISCTG) [!S_ISCTG && S_IFCTG]: Define.
23353         (ftypelet): Use S_ISCTG.
23354         From Michael Deutschmann.
23355
23356 2000-04-14  Jim Meyering  <meyering@lucent.com>
23357
23358         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use the one-arg
23359         form of AC_DEFINE.  Otherwise, the #ifndef in AH_VERBATIM gets
23360         clobbered.
23361
23362 2000-04-14  Jim Meyering  <meyering@lucent.com>
23363
23364         * lib/strftime.c (my_strftime) [#ifdef strftime]: Declare strftime.
23365
23366 2000-04-13  Jim Meyering  <meyering@lucent.com>
23367
23368         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES) [_GNU_SOURCE]: Use new
23369         AH_VERBATIM to insert required #ifndef into config.h.in.
23370         Suggestion from Akim Demaille.
23371
23372 2000-04-12  Jim Meyering  <meyering@lucent.com>
23373
23374         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Use AC_CHECK_HEADERS, not
23375         `AC_CHECK_HEADER' to check for locale.h.  Thanks to a report from
23376         Christian Krackowizer.
23377
23378         More code moved from ../configure.in into (jm_CHECK_ALL_TYPES).
23379         * m4/jm-macros.m4 (_GNU_SOURCE): Define.
23380         (AC_SYS_LARGEFILE): Require.
23381         (AM_C_PROTOTYPES): Require.
23382
23383 2000-04-08  Jim Meyering  <meyering@lucent.com>
23384
23385         * lib/Makefile.am (charset.alias): Use t-$@, not $@-t so the DOS 8.3
23386         names don't conflict.  Reported by Eli Zaretskii.
23387
23388 2000-04-07  Jim Meyering  <meyering@lucent.com>
23389
23390         * lib/putenv.c: Move inclusion of errno.h so it follows that of
23391         sys/types.h, to work around system header problems on AIX 3.2.5.
23392         From Bruno Haible.
23393
23394 2000-04-07  Bruno Haible  <haible@clisp.cons.org>
23395
23396         * lib/unicodeio.c (print_unicode_char): Avoid triggering Solaris iconv
23397         bug.  Deal with the different error behavior of Irix iconv.
23398
23399 2000-04-05  Paul Eggert  <eggert@twinsun.com>
23400
23401         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Don't use -n32 on
23402         IRIX if the installer said otherwise.
23403
23404 2000-04-05  Jim Meyering  <meyering@lucent.com>
23405
23406         Portability tweaks required for ultrix4.3.
23407         * m4/check-decl.m4 [!HAVE_UTMPX_H] (headers): Include <utmp.h>.
23408         (jm_CHECK_DECLS): Add getutent to the list of functions.
23409         (_jm_DECL_HEADERS): Add utmpx.h.
23410         From John David Anglin.
23411
23412         * m4/strftime.m4: Back out the 2000-04-02 change.
23413         Instead of that change, simply undefine putenv in the test program.
23414
23415 2000-04-05  Jim Meyering  <meyering@lucent.com>
23416
23417         Portability tweaks required for ultrix4.3.
23418         * lib/readutmp.h [HAVE_UTMPX_H && !HAVE_DECL_GETUTENT]: Declare
23419         getutent.
23420         * lib/readutmp.c: Include sys/types.h before sys/stat.h.
23421         * lib/canon-host.c: Declare strdup.
23422         * lib/path-concat.c: Likewise.
23423         From John David Anglin.
23424
23425 2000-04-04  Jim Meyering  <meyering@lucent.com>
23426
23427         Be more DOS 8.3-friendly.
23428         * lib/ref-add.sin: Renamed from ref-add.sed.in.
23429         * lib/ref-del.sin: Renamed from ref-del.sed.in.
23430         * lib/Makefile.am: Reflect renaming.
23431         Reported by Eli Zaretskii.
23432
23433         Use a temporary file name that won't clash with `charset.alias'
23434         in the DOS 8.3 name space.
23435         * lib/Makefile.am (charset_tmp): Define.
23436         (install-exec-local): Use $(charset_tmp) instead of $(charset_alias)-t.
23437         (uninstall-local): Likewise.
23438         Reported by Eli Zaretskii.
23439
23440 2000-04-03  Jim Meyering  <meyering@lucent.com>
23441
23442         * m4/gettext.m4: Fix typo in comment.
23443
23444         * m4/codeset.m4 (AC_CHECK_HEADERS): Add langinfo.h (moved here from
23445         textutils/configure.in).  Suggestion from Paul Eggert.
23446         (AC_CHECK_FUNCS): Add nl_langinfo.  (also from textutils/configure.in)
23447
23448 2000-04-02  Paul Eggert  <eggert@twinsun.com>
23449
23450         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Set TZ environment
23451         variable in the shell rather than using putenv, which isn't
23452         portable.  This avoids the configure-time inter-test dependency
23453         on the potentially-renamed putenv function.
23454
23455 2000-03-30  Paul Eggert  <eggert@twinsun.com>
23456
23457         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Include <sys/stat.h>
23458         before checking struct stat.st_blksize, so that
23459         HAVE_STRUCT_STAT_ST_BLKSIZE is defined correctly.
23460
23461 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23462
23463         * m4/strftime.m4 (_jm_STRFTIME_PREREQS): Check for strftime,
23464         since strftime.c uses HAVE_STRFTIME to decide whether to use
23465         the underlying strftime.
23466
23467 2000-03-29  Paul Eggert  <eggert@twinsun.com>
23468
23469         * lib/time/strftime.c (my_strftime): Make sure we call the system
23470         strftime, not ourselves, when invoking the underlying strftime.
23471
23472 2000-03-24  Jim Meyering  <meyering@lucent.com>
23473
23474         * lib/Makefile.am (EXTRA_DIST): Add ref-add.sed.in and ref-del.sed.in.
23475         (charset_alias): Define.
23476         (install-exec-local): Factor out common code.
23477         (uninstall-local): Split lines longer than 80.
23478         (ref-add.sed, ref-del.sed): Remove rules... (do the following instead)
23479         (SUFFIXES): Define.
23480         (.sed.in.sed): New rule.  Don't redirect directly to $@.
23481         (CLEANFILES): Add ref-add.sed and ref-del.sed.
23482
23483 2000-03-19  Bruno Haible  <haible@clisp.cons.org>
23484
23485         * lib/config.charset: Output a line containing "Packages using this
23486         file".
23487         * lib/ref-add.sed.in, lib/ref-del.sed.in: New files.
23488         * lib/Makefile.am (install-exec-local, uninstall-local, ref-add.sed,
23489         ref-del.sed): New rules.
23490
23491 2000-03-17  Jim Meyering  <meyering@lucent.com>
23492
23493         * lib/unicodeio.c (<string.h>): Include only #if HAVE_STRING_H.
23494         Otherwise, include <strings.h>
23495
23496 2000-03-17  Bruno Haible  <haible@clisp.cons.org>
23497
23498         * lib/unicodeio.c (utf8_wctomb): New function.
23499         (print_unicode_char): Pass the Unicode character to iconv in UTF-8
23500         format instead of in UCS-4 with platform dependent endianness.
23501
23502 2000-03-10  Jim Meyering  <meyering@lucent.com>
23503
23504         * m4/lib-check.m4: Look for getspnam in -lgen, too.
23505         From Marco Franzen.
23506
23507 2000-03-07  Paul Eggert  <eggert@twinsun.com>
23508
23509         * lib/savedir.c (savedir): Work even if directory size is
23510         negative; this can happen with some screwy NFS configurations.
23511
23512 2000-03-06  Jim Meyering  <meyering@lucent.com>
23513
23514         * lib/localcharset.c (get_charset_aliases): Don't try to free file_name
23515         if it's NULL (because we ran out of memory).  From Bruno Haible.
23516
23517 2000-03-05  Jim Meyering  <meyering@lucent.com>
23518
23519         * lib/localcharset.c ("path-concat.h"): Include.
23520         (get_charset_aliases): Use path_concat instead of ANSI string
23521         concatenation.
23522
23523         * lib/unicodeio.h (PARAMS): Define.
23524         Use it to guard prototype.
23525
23526 2000-03-04  Jim Meyering  <meyering@lucent.com>
23527
23528         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require AC_C_VOLATILE,
23529         for lib/localcharset.c.
23530
23531 2000-03-04  Jim Meyering  <meyering@lucent.com>
23532
23533         * lib/Makefile.am (install-exec-local): Create $(libdir) before
23534         installing into it.
23535         (uninstall-local): Uncomment this rule so `make distcheck' works
23536         once again.
23537
23538         * lib/unicodeio.c (<errno.h>): Include it.
23539         (errno): Declare if not defined.
23540
23541         * lib/localcharset.c: Add Bruno's comment justifying use of volatile.
23542
23543         * lib/config.charset: New version, incorporating remarks from a linux
23544         i18n mailing list.  From Bruno Haible.
23545
23546 2000-03-04  Bruno Haible  <haible@clisp.cons.org>
23547
23548         * m4/codeset.m4: New file.
23549         * m4/iconv.m4: New file.
23550         * m4/jm-macros.m4 (jm_MACROS): Call jm_LANGINFO_CODESET and jm_ICONV.
23551
23552 2000-03-03  Jim Meyering  <meyering@lucent.com>
23553
23554         * m4/regex.m4: Make sure re_compile_pattern accepts patterns like `{1'.
23555
23556 2000-03-02  Jim Meyering  <meyering@lucent.com>
23557
23558         * m4/timespec.m4: Require AC_HEADER_TIME before the cache check so
23559         the messages come out on separate lines.
23560
23561         * m4/jm-glibc-io.m4 (jm_FUNC_GLIBC_UNLOCKED_IO): Use AC_CHECK_DECLS,
23562         rather than jm_CHECK_DECLARATIONS.
23563         * m4/decl.m4: Remove now-unused file.
23564
23565         * m4/check-decl.m4 (AC_CHECK_DECLS): Add getlogin, ttyname, and
23566         geteuid.
23567
23568 2000-03-02  Jim Meyering  <meyering@lucent.com>
23569
23570         * lib/Makefile.am (EXTRA_DIST): Add config.charset.
23571
23572 2000-03-01  Jim Meyering  <meyering@lucent.com>
23573
23574         * lib/localcharset.c: Guard some #includes with `#if HAVE_...'.
23575         * lib/unicodeio.c: Likewise.
23576
23577 2000-03-01  Bruno Haible  <haible@clisp.cons.org>
23578
23579         * lib/config.charset: New file.
23580         * lib/localcharset.c: New file.
23581         * lib/unicodeio.h, lib/unicodeio.c: New files.
23582         * lib/Makefile.am (DEFS): Add -DLIBDIR=...
23583         (libfetish_a_SOURCES): Add localcharset.c and unicodeio.c.
23584         (noinst_HEADERS): Add unicodeio.h.
23585         (all-local, install-exec-local, charset.alias): New targets.
23586
23587 2000-02-28  Paul Eggert  <eggert@twinsun.com>
23588
23589         * lib/quotearg.c (ALERT_CHAR): New macro.
23590         (quotearg_buffer_restyled): Use it.
23591
23592 2000-02-27  Jim Meyering  <meyering@lucent.com>
23593
23594         * m4/check-decl.m4: Add getenv to the list.
23595
23596 2000-02-27  Jim Meyering  <meyering@lucent.com>
23597
23598         * lib/strtoumax.c: Fix typo in decl of strtoul: s/long long/long/.
23599         Guard declaration of strtoull also with `&& HAVE_UNSIGNED_LONG_LONG'.
23600
23601         * lib/backupfile.c: Guard inclusion of stdlib.h with
23602         `#if HAVE_STDLIB_H', not `#if STDC_HEADERS'.
23603         Declare malloc if needed.
23604
23605         * lib/backupfile.c: Use `#if !HAVE_DECL...' instead of
23606         `#ifndef HAVE_DECL..'
23607         now that autoconf always defines the HAVE_DECL_ symbols.
23608         * lib/human.c: Likewise.
23609         * lib/same.c: Likewise.
23610         * lib/strtoumax.c: Likewise.
23611
23612         * lib/backupfile.c: Arrange for cpp to fail if the configure-time
23613         declaration check was not run.
23614         * lib/hash.c: Likewise.
23615         * lib/human.c: Likewise.
23616         * lib/same.c: Likewise.
23617         * lib/strtoumax.c: Likewise.
23618
23619         * lib/userspec.c (parse_user_spec): If there is no `:' but there is a
23620         `.', then first look up the entire `.'-containing string as a login
23621         name.
23622
23623 2000-02-23  Jim Meyering  <meyering@lucent.com>
23624
23625         * m4/check-decl.m4: Now that we have the new AC_CHECK_DECLS, use it
23626         in place of my hack.
23627
23628 2000-02-18  Paul Eggert  <eggert@twinsun.com>
23629
23630         * lib/getdate.y: Handle two-digit years with leading zeros correctly.
23631         (textint): New typedef.
23632         (parser_control): Member year changed from int to textint.
23633         All uses changed.
23634         (YYSTYPE): Removed; replaced by %union with int and textint members.
23635         (tDAY, tDAY_UNIT, tDAYZONE, tHOUR_UNIT, tID, tLOCAL_ZONE, tMERIDIAN,
23636         tMINUTE_UNIT, tMONTH, tMONTH_UNIT tSEC_UNIT, tSNUMBER, tUNUMBER,
23637         tYEAR_UNIT, tZONE, o_merid): Now of type <intval>.
23638         (tSNUMBER, tUNUMBER): Now of type <textintval>.
23639         (date, number, to_year): Use width of number in digits, not its value,
23640         to determine whether it's a 2-digit year, or a 2-digit time.
23641         (yylex): Store number of digits of numeric tokens.
23642         Reported by John Kendall.
23643
23644         (parser_control): Changed from struct parser_control to typedef (for
23645         consistency).  All uses changed.
23646
23647         (tID): Removed; not used.
23648         (yylex): Return '?' for unknown identifiers, rather than (unused) tID.
23649
23650 2000-02-14  Paul Eggert  <eggert@twinsun.com>
23651
23652         * lib/getpagesize.h (getpagesize): Port to VMS for Alpha;
23653         adapted from changes to grep getpagesize.h by Martin P.J. Zinser.
23654
23655 2000-02-12  Jim Meyering  <meyering@lucent.com>
23656
23657         * lib/userspec.c (ISDIGIT): Define it.
23658         (isdigit): Remove definition.
23659         (is_number): Use ISDIGIT, not isdigit.
23660         <libintl.h>: Include.
23661         (_ and N_): Define.
23662         (parse_user_spec): Mark translatable strings.
23663
23664 2000-02-10  Jim Meyering  <meyering@lucent.com>
23665
23666         With these changes, nanosleep.[ch] are finally enough like the other
23667         lib/* replacement files to compile on a few more losing systems.
23668
23669         * lib/nanosleep.h: Don't include config.h.
23670         Remove prototype from declaration of nanosleep.
23671         (PARAMS): Remove now-unneeded definition.
23672         * lib/nanosleep.c: #undef nanosleep.
23673         (rpl_nanosleep): Rename from nanosleep.
23674
23675 2000-02-10  Jim Meyering  <meyering@lucent.com>
23676
23677         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Rename replacement function from
23678         gnu_nanosleep to rpl_nanosleep.
23679
23680 2000-02-09  Jim Meyering  <meyering@lucent.com>
23681
23682         * m4/lib-check.m4 (jm_LIB_CHECK): Fix typo: check for sp_pwdp in
23683         struct spwd, rather than in struct passwd.  Reported by Gaël Quéri.
23684
23685 2000-02-08  Akim Demaille  <akim@epita.fr>
23686
23687         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Quote square brackets with
23688         `[' and `]' and remove uses of `changequote'.
23689         (AC_SYS_LARGEFILE_MACRO_VALUE): Likewise.
23690         (AC_SYS_LARGEFILE): Likewise.
23691         * m4/gettext.m4 (AM_GNU_GETTEXT): Likewise.
23692         * m4/strftime.m4 (jm_FUNC_GNU_STRFTIME): Remove now-unnecessary use
23693         of changequote.
23694         * m4/regex.m4 (jm_INCLUDED_REGEX): Likewise.
23695         * m4/readdir.m4 (jm_FUNC_READDIR): Likewise
23696         * m4/memcmp.m4 (jm_AC_FUNC_MEMCMP): Likewise, and add `int' for main.
23697         * m4/getloadavg.m4 (AM_FUNC_GETLOADAVG): Likewise.
23698
23699 2000-02-05  Jim Meyering  <meyering@lucent.com>
23700
23701         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require most macros.
23702         Remove explicit use of AC_HEADER_TIME.  It is required by
23703         jm_CHECK_TYPE_STRUCT_TIMESPEC.  Using AC_HEADER_TIME and
23704         `AC_REQUIRE'ing jm_CHECK_TYPE_STRUCT_TIMESPEC provoked a but
23705         in autoconf whereby the expansion of the latter ended up preceding
23706         the expansion of its prerequisite, AC_HEADER_TIME.
23707         Reported by Volker Borchert.
23708
23709 2000-02-03  Jim Meyering  <meyering@lucent.com>
23710
23711         * m4/prereq.m4 (jm_PREREQ_READUTMP): Check for utmpxname.
23712
23713 2000-02-03  Jim Meyering  <meyering@lucent.com>
23714
23715         * lib/readutmp.c (read_utmp): Guard with `#ifdef UTMP_NAME_FUNCTION',
23716         rather than with `#if HAVE_UTMPNAME'.
23717
23718 2000-02-02  Jim Meyering  <meyering@lucent.com>
23719
23720         * m4/prereq.m4 (jm_PREREQ_ADDEXT): Fix typo that resulted in no
23721         definition of HAVE_PATHCONF: s/AC_CHECK_FUNC/AC_CHECK_FUNCS/.
23722         Reported by Eli Zaretskii.
23723
23724 2000-02-01  Jim Meyering  <meyering@lucent.com>
23725
23726         * lib/readutmp.h (UT_USER): Add parens.  From Andreas Schwab.
23727
23728 2000-01-31  Jim Meyering  <meyering@lucent.com>
23729
23730         * m4/check-decl.m4 (jm_CHECK_DECLS): Add nanosleep to the list of
23731         functions.  Add the time.h and sys/time.h headers along with the
23732         AC_REQUIRE'ment of AC_HEADER_TIME.
23733
23734 2000-01-31  Jim Meyering  <meyering@lucent.com>
23735
23736         * lib/nanosleep.h (nanosleep): Guard declaration with
23737         `#if ! HAVE_DECL_NANOSLEEP'.
23738         Without this, OFS gets a redeclaration error for rpl_nanosleep, due to
23739         the declaration in that vendor's sys/timers.h.
23740         Reported by Christian Krackowizer.
23741
23742         * lib/quotearg.c (ISASCII): Add #undef and move definition to follow
23743         inclusion of wctype.h to work around Solaris 2.6 namespace pollution.
23744         (ISPRINT): Likewise.
23745         Reported by Tom Tromey.
23746
23747 2000-01-30  Jim Meyering  <meyering@lucent.com>
23748
23749         * m4/lib-check.m4: Clean up some kludgy old shadow password tests.
23750
23751         * m4/prereq.m4 (utmp_includes): Define.
23752         Check for ut_user and ut_name members in both struct utmpx
23753         and struct utmp.
23754
23755 2000-01-30  Jim Meyering  <meyering@lucent.com>
23756
23757         * lib/readutmp.c (extract_trimmed_name): Use UT_USER instead of
23758         hard-coding uses of ->ut_name.  The latter doesn't work with new Linux
23759         header files where only utmpx.ut_user is declared.
23760
23761         * lib/readutmp.h (UT_USER): Define.
23762
23763 2000-01-29  Jim Meyering  <meyering@lucent.com>
23764
23765         * m4/lib-check.m4: New file containing library-related checks from
23766         fileutils and sh-utils (textutils had none).
23767
23768 2000-01-28  Jim Meyering  <meyering@lucent.com>
23769
23770         * m4/perl.m4: Change format of warning message to look more like that
23771         from the missing script.  Suggestion from François Pinard.
23772
23773 2000-01-25  Jim Meyering  <meyering@lucent.com>
23774
23775         * m4/timespec.m4: Require AC_HEADER_TIME, and include sys/time.h as
23776         well as time.h in the compile check.
23777         * m4/nanosleep.m4: Require AC_HEADER_TIME rather than simply using it.
23778         Fix typo in cross-compiling case: s/yes/no/.
23779
23780 2000-01-23  Jim Meyering  <meyering@lucent.com>
23781
23782         * m4/jm-macros.m4: Move df-related tests here from
23783         fileutils/configure.in
23784
23785         * m4/ls-mntd-fs.m4: s/list_mounted_fs/ac_list_mounted_fs/
23786         (jm_LIST_MOUNTED_FILESYSTEMS): Take two parameters.
23787
23788         * m4/fsusage.m4: New file.  Extracted from fileutils/configure.in.
23789         s/space/ac_fsusage_space/.
23790         (jm_FILE_SYSTEM_USAGE): Take two parameters.
23791
23792         * m4/ftruncate.m4: New file (derived from part of
23793         fileutils/configure.in).
23794         * m4/jm-macros.m4 (jm_FUNC_FTRUNCATE): AC_REQUIRE it.
23795         (jm_CHECK_ALL_TYPES): Require AC_HEADER_MAJOR and AC_HEADER_DIRENT.
23796
23797         * m4/jm-macros.m4 (OPTIONAL_BIN_PROGS, OPTIONAL_BIN_ZCRIPTS, MAN):
23798         AC_SUBST these here, rather than just in sh-util/configure.in, so
23799         that the now-shared-by-fileutils-and-textutils lib/Makefile.am are
23800         all the same.
23801         (AM_FUNC_OBSTACK): Add (from fileutils/configure.in).
23802         (AC_CHECK_FUNCS): Merge all checks from fileutils, textutils, sh-utils.
23803         (AM_FUNC_STRTOD): Added (from textutils', sh-utils' configure.in).
23804         (AC_SUBST(POW_LIBM)): Likewise.
23805         (AC_SUBST(DF_PROG)): Moved from fileutils/configure.in.
23806
23807 2000-01-23  Jim Meyering  <meyering@lucent.com>
23808
23809         * lib/Makefile.am (libfetish_a_SOURCES): Remove explicit mention of
23810         obstack.c.
23811
23812 2000-01-22  Jim Meyering  <meyering@lucent.com>
23813
23814         * m4/jm-macros.m4: Call AC_PROG_CC_STDC just before AC_C_CONST.
23815
23816         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): Add wctype.h.
23817
23818         * m4/jm-macros.m4 (AC_CHECK_HEADERS): Add checks from fileutils'
23819         configure.in
23820         (AC_CHECK_HEADERS): Likewise for sh-utils.
23821         (AC_CHECK_HEADERS): Likewise for textutils.
23822         Merge the three lists of headers.
23823
23824         * m4/prereq.m4 (jm_PREREQ_ADDEXT): New macro.  Parts moved here
23825         from fileutils' configure.in.
23826
23827         * m4/decl.m4: Remove kludgy `test -z $ac_...AC_CHECK_HEADERS(...)'
23828         code. Moved tests into their own function (_jm_DECL_HEADERS) in
23829         check-decl.m4.
23830
23831         * m4/check-decl.m4: Use #if rather than #ifdef.
23832         Add HAVE_DECL_STRTOUL and HAVE_DECL_STRTOULL.
23833         (jm_CHECK_DECLARATIONS): Add strtoul strtoull.
23834         (_jm_DECL_HEADERS): Define new function.
23835         (jm_CHECK_DECLARATIONS): Require it.
23836
23837 2000-01-22  Jim Meyering  <meyering@lucent.com>
23838
23839         * lib/strtoumax.c: [! HAVE_DECL_STRTOUL]: Declare strtoul.
23840         [! HAVE_DECL_STRTOULL]: Declare strtoull.
23841         Required for some AIX systems.  Reported by Christian Krackowizer.
23842         [TESTING] (main): New function.
23843
23844         1997-10-17  Eli Zaretskii  <eliz@is.elta.co.il>
23845         * lib/dirname.c (dir_name): Support for DOS-style file names with drive
23846         letters.
23847
23848         * lib/quotearg.c [HAVE_WCTYPE_H]: Include <wctype.h> for decl of
23849         iswprint.
23850
23851         * lib/strverscmp.c (ISDIGIT): Define.
23852         (strverscmp): Use ISDIGIT, not isdigit.
23853
23854 2000-01-19  Jim Meyering  <meyering@lucent.com>
23855
23856         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Include <sys/time.h>, too.
23857         Use AC_HEADER_TIME.  Volker Borchert reported that OpenBSD-2.3/sparc
23858         defines `struct timespec' in <sys/time.h>
23859
23860         * m4/c-bs-a.m4: Remove uses of changequote altogether.
23861         Thanks to Akim for explaining.
23862
23863 2000-01-17  Paul Eggert  <eggert@twinsun.com>
23864
23865         * lib/nanosleep.c (nanosleep):
23866         Don't use SA_INTERRUPT to decide whether to call sigaction, as
23867         POSIX.1 doesn't require SA_INTERRUPT and some systems
23868         (e.g. Solaris 7) don't define it.  Use SA_NOCLDSTOP instead;
23869         it's been part of POSIX.1 since day 1 (in 1988).
23870
23871 2000-01-17  Jim Meyering  <meyering@lucent.com>
23872
23873         * lib/interlock: Remove unused file.  Reported by François Pinard.
23874
23875 2000-01-16  Paul Eggert  <eggert@twinsun.com>
23876
23877         * lib/quotearg.c (quotearg_buffer_restyled): Do not quote
23878         alert, backslash, formfeed, and vertical tab unnecessarily in
23879         shell quoting style.
23880
23881 2000-01-16  Jim Meyering  <meyering@lucent.com>
23882
23883         * m4/jm-macros.m4: Require jm_FUNC_GROUP_MEMBER, jm_FUNC_PUTENV,
23884         AM_FUNC_ERROR_AT_LINE, jm_FUNC_GNU_STRFTIME, jm_FUNC_MKTIME,
23885         jm_FUNC_GETGROUPS AC_FUNC_VPRINTF, AC_FUNC_ALLOCA,
23886         AM_FUNC_GETLOADAVG, and jm_SYS_PROC_UPTIME.
23887
23888 2000-01-16  Jim Meyering  <meyering@lucent.com>
23889
23890         * m4/c-bs-a.m4: Use `changequote(<<,>>)', rather than `changequote(, )'
23891         because the latter didn't work.
23892
23893 2000-01-15  Jim Meyering  <meyering@lucent.com>
23894
23895         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add gethostname and getusershell.
23896         (AC_REPLACE_FUNCS): Add memcpy and memset.
23897         Add these, too: stime strcspn stpcpy strstr strtol strtoul.
23898         Add strpbrk.
23899         Add these: euidaccess memcmp mkdir rmdir rpmatch strndup strverscmp.
23900
23901 2000-01-12  Jim Meyering  <meyering@lucent.com>
23902
23903         * m4/prereq.m4 (jm_PREREQ_CANON_HOST): New macro.
23904         (jm_PREREQ): Use it.
23905         (jm_PREREQ_READUTMP): New macro.
23906         (jm_PREREQ): Use it.
23907
23908 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23909
23910         Quote multibyte characters correctly.
23911         * m4/c-bs-a.m4: New file.
23912         * m4/prereq.m4 (jm_PREREQ_QUOTEARG): New macro.
23913         (jm_PREREQ): Use it.
23914
23915 2000-01-11  Paul Eggert  <eggert@twinsun.com>
23916
23917         * m4/uintmax_t.m4: Port to autoconf 2.13.
23918
23919 2000-01-08  Jim Meyering  <meyering@ascend.com>
23920
23921         * m4/strerror_r.m4 (jm_FUNC_STRERROR_R): New file/macro.
23922         * m4/jm-macros.m4 (jm_FUNC_STRERROR_R): Require it.
23923
23924 2000-01-04  Jim Meyering  <meyering@ascend.com>
23925
23926         * m4/d-type.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_TYPE): Rename from
23927         jm_STRUCT_DIRENT_D_TYPE.
23928         * m4/d-ino.m4 (jm_CHECK_TYPE_STRUCT_DIRENT_D_INO): Rename from
23929         jm_STRUCT_DIRENT_D_INO.
23930         * m4/utimbuf.m4 (jm_CHECK_TYPE_STRUCT_UTIMBUF): Rename from
23931         jm_STRUCT_UTIMBUF.
23932         * m4/jm-macros.m4: Reflect s/jm_STRUCT_/jm_CHECK_TYPE_STRUCT_/
23933         renamings.
23934         * m4/utime.m4: Likewise.
23935
23936         * m4/timespec.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): New file, macro.
23937         * m4/jm-macros.m4 (jm_CHECK_TYPE_STRUCT_TIMESPEC): Require it.
23938
23939 2000-01-03  Paul Eggert  <eggert@twinsun.com>
23940
23941         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): Search for nanosleep in -lrt
23942         (for Solaris 7) and in -lposix4 (for Solaris 2.5.1).
23943
23944 2000-01-02  Jim Meyering  <meyering@ascend.com>
23945
23946         * m4/search-libs.m4: Escape `$' in $3 of dnl comment.  I no longer
23947         remember if this is necessary.
23948
23949 1999-12-26  Jim Meyering  <meyering@ascend.com>
23950
23951         * m4/jm-macros.m4: Use it here.
23952         * m4/nanosleep.m4 (jm_FUNC_NANOSLEEP): New file/macro.
23953
23954 1999-12-23  Jim Meyering  <meyering@ascend.com>
23955
23956         * m4/jm-macros.m4: Check for clock_gettime (moved from
23957         fileutils/configure.in)
23958         Check for gettimeofday.
23959
23960 1999-12-20  Jim Meyering  <meyering@ascend.com>
23961
23962         * m4/strftime.m4: Remove kludge, now that I'm using the fixed
23963         autoconf-2.14a-1999-12-20.
23964
23965 1999-12-19  Jim Meyering  <meyering@ascend.com>
23966
23967         * m4/lstat-slash.m4: New file.
23968         * m4/jm-macros.m4: Use the new macro:
23969         jm_FUNC_LSTAT_FOLLOWS_SLASHED_SYMLINK.
23970
23971 1999-12-07  Jim Meyering  <meyering@ascend.com>
23972
23973         * m4/perl.m4: Require that File::Compare be available, too.
23974         Too many systems seem to lack it.
23975
23976         * m4/strftime.m4: Add checks for most of the cpp macros tested in
23977         GNU's strftime.c.  Prompted by a patch from Paul Eggert.
23978
23979 1999-11-18  Paul Eggert  <eggert@twinsun.com>
23980
23981         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around a
23982         problem with the QNX 4.25 shell, which doesn't propagate exit
23983         status of failed commands inside shell assignments.
23984
23985 1999-11-17  Jim Meyering  <meyering@ascend.com>
23986
23987         * m4/gettext.m4: Use new AC_CONFIG_LINKS in place of AC_LINK_FILES.
23988
23989 1999-11-07  Jim Meyering  <meyering@ascend.com>
23990
23991         * m4/getloadavg.m4: Add `, 1, [FIXME]' to each use of AC_DEFINE.
23992
23993 1999-11-06  Jim Meyering  <meyering@ascend.com>
23994
23995         * m4/link-follow.m4 (jm_AC_FUNC_LINK_FOLLOWS_SYMLINK): New file/macro.
23996         * m4/jm-macros.m4 (jm_MACROS): Use it here.
23997
23998 1999-11-05  Jim Meyering  <meyering@ascend.com>
23999
24000         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Move some tests from
24001         configure.in of textutils, fileutils, and sh-utils into this one
24002         (shared between those packages) file.
24003         Use `AC_CHECK_MEMBERS((struct stat.st_blksize))' instead of deprecated
24004         AC_STRUCT_ST_BLKSIZE.
24005
24006 1999-11-03  Jim Meyering  <meyering@ascend.com>
24007
24008         * m4/ssize_t.m4: Remove file.  No longer needed since the new version
24009         of AC_CHECK_TYPE checks includes unistd.h.
24010         * m4/jm-macros.m4: Use straight `AC_CHECK_TYPE(ssize_t, int)'.
24011         Suggestion from Akim Demaille.
24012
24013 1999-10-30  Jim Meyering  <meyering@ascend.com>
24014
24015         * m4/uintmax_t.m4: Require 2.14a.  Remove backslash before backtick in
24016         m4-quoted string.
24017         * m4/ls-mntd-fs.m4: Likewise.
24018         * m4/jm-macros.m4: Likewise.  Also, use AC_TYPE_SSIZE_T instead
24019         * m4/jm-winsz1.m4: Likewise.
24020
24021         * m4/const.m4: Remove file, since the fix made it into the experimental
24022         version of autoconf.
24023         * m4/mktime.m4: Likewise.
24024
24025         * m4/check-type.m4: Remove file, now that the latest version of
24026         AC_CHECK_TYPE takes a third arg to specify additional #includes.
24027
24028         * m4/ssize_t.m4: New file, requires experimental version of autoconf.
24029         * m4/jm-macros.m4: Use new AC_TYPE_SSIZE_T instead of my hacked
24030         AC_CHECK_TYPE.
24031
24032 1999-10-04  Jim Meyering  <meyering@ascend.com>
24033
24034         * m4/jm-macros.m4: Don't require autoconf-2.14.1.
24035
24036 1999-09-22  Paul Eggert  <eggert@twinsun.com>
24037
24038         * m4/largefile.m4 (AC_SYS_LARGEFILE_FLAGS): Work around GCC
24039         2.95.1 bug with HP-UX 10.20.
24040
24041 1999-09-17  Jim Meyering  <meyering@ascend.com>
24042
24043         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add strdup.
24044         Paul Nevai reported a link failure on a NeXT CUBE with NeXTSTEP 3.3
24045         due to missing strdup (against sh-utils-2.0).
24046
24047 1999-08-29  Jim Meyering  <meyering@ascend.com>
24048
24049         * m4/jm-macros.m4: Require jm_BISON.
24050         * m4/bison.m4: New file.
24051
24052 1999-08-17  Paul Eggert  <eggert@twinsun.com>
24053
24054         * m4/largefile.m4 (AC_SYS_LARGEFILE): Fix typo: missing comma
24055         in value for _FILE_OFFSET_BITS, which broke ports to HP-UX 10.20.
24056
24057 1999-08-05  Jim Meyering  <meyering@ascend.com>
24058
24059         * m4/getline.m4: Rename test file from conftestdata to conftest.data
24060         to avoid conflicts with `conftest' on 8+3 filesystems.
24061         Suggestion from Eli Zaretskii.
24062
24063 1999-08-04  Jim Meyering  <meyering@ascend.com>
24064
24065         * m4/jm-macros.m4: Move a 4-line block of code from the configure.in of
24066         fileutils and sh-utils (textutils's getline test was inadequate).
24067         (AM_FUNC_GETLINE): Run this test.
24068         (AC_CHECK_FUNCS): Check for getdelim.
24069         Reported by Bob Proulx.
24070
24071 1999-08-02  Jim Meyering  <meyering@ascend.com>
24072
24073         * m4/jm-macros.m4: Add a comment.
24074
24075 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24076
24077         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): Check whether
24078         <inttypes.h> defines strtoumax as a macro (and not as a
24079         function).
24080
24081 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24082
24083         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): Make sure
24084         that we can shift, multiply and divide unsigned long long
24085         values; Ultrix cc can't do it.
24086
24087 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24088
24089         * m4/mktime.m4: New file, which is a preview of what should appear
24090         in the next public autoconf release.
24091
24092 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24093
24094         * m4/lfs.m4: Remove this file.
24095         * m4/largefile.m4: New file.  It contains the old contents of
24096         lfs.m4, except that all names with prefix AC_LFS have been
24097         changed to use the prefix AC_SYS_LARGEFILE instead, to be
24098         compatible with future autoconf versions.  Also, some minor m4
24099         quoting problems have been fixed.
24100
24101 1999-08-01  Paul Eggert  <eggert@twinsun.com>
24102
24103         * m4/gettext.m4 (AM_WITH_NLS): Remove unnecessary lines.
24104         Fix typo: $nls_cv_header_intl was misspelled as $nsl_cv_header_intl.
24105         (AM_GNU_GETTEXT): Fix problem with brackets and m4 quoting,
24106         and simplify the shell code.
24107
24108 1999-08-01  Jim Meyering  <meyering@ascend.com>
24109
24110         * m4/mktime.m4 (AC_FUNC_MKTIME): Undefine to avoid syntax errors from
24111         m4.
24112
24113 1999-07-20  Jim Meyering  <meyering@ascend.com>
24114
24115         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memmove.
24116
24117 1999-07-15  Jim Meyering  <meyering@ascend.com>
24118
24119         * m4/jm-macros.m4 (AC_CHECK_FUNCS): Check for getpagesize.
24120
24121 1999-05-22  Jim Meyering  <meyering@ascend.com>
24122
24123         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add memchr.
24124
24125 1999-05-20  Jim Meyering  <meyering@ascend.com>
24126
24127         * m4/search-libs.m4 [AC_SEARCH_LIBS]: Quote name in undefine.
24128         Add a colon after each `then' in case $4 is empty.
24129
24130 1999-05-16  Jim Meyering  <meyering@ascend.com>
24131
24132         * m4/search-libs.m4: New file to override autoconf's AC_SEARCH_LIBS.
24133
24134 1999-05-10  Jim Meyering  <meyering@ascend.com>
24135
24136         * m4/jm-mktime.m4: Reflect renaming: AM_FUNC_MKTIME -> AC_FUNC_MKTIME.
24137
24138         * m4/jm-macros.m4: Require 2.14.1, since we use newly-renamed
24139         AC_FUNC_MKTIME.
24140
24141 1999-05-10  Andreas Schwab  <schwab@issan.cs.uni-dortmund.de>
24142
24143         * m4/jm-mktime.m4, putenv.m4: Fix typos in config.h comments.
24144
24145 1999-05-04  Paul Eggert  <eggert@twinsun.com>
24146
24147         * m4/lfs.m4 (AC_LFS): -n32, -o32, and -n64 should be in CFLAGS,
24148         not CPPFLAGS, so that linking works correctly in IRIX.
24149
24150 1999-04-30  Paul Eggert  <eggert@twinsun.com>
24151
24152         * m4/jm-macros.m4 (AC_REPLACE_FUNCS): Add dup2.
24153
24154 1999-04-20  Paul Eggert  <eggert@twinsun.com>
24155
24156         * m4/uintmax_t.m4 (jm_AC_TYPE_UINTMAX_T): Move unsigned long
24157         long check into new jm_AC_TYPE_UNSIGNED_LONG_LONG macro.
24158         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): Require
24159         jm_AC_TYPE_UNSIGNED_LONG_LONG.
24160         * m4/ulonglong.m4 (jm_AC_TYPE_UNSIGNED_LONG_LONG): New file/macro.
24161
24162         * m4/lfs.m4: Port to AIX and HP-UX.  Support cross-compilation.
24163
24164 1999-04-20  Jim Meyering  <meyering@ascend.com>
24165
24166         * m4/xstrtoumax.m4: Require jm_AC_TYPE_UNSIGNED_LONG_LONG.
24167         AC_REPLACE xstroull if necessary.  From Paul Eggert.
24168         (AC_CHECK_FUNCS): Remove strtoull, strtoumax, strtouq.
24169
24170 1999-04-18  Jim Meyering  <meyering@ascend.com>
24171
24172         * m4/xstrtoumax.m4 (jm_AC_PREREQ_XSTRTOUMAX): New file/macro.
24173         * m4/jm-macros.m4: Use it.
24174
24175 1999-04-06  Jim Meyering  <meyering@ascend.com>
24176
24177         * m4/strftime.m4: Remove test for %f.
24178
24179 1999-03-29  Jim Meyering  <meyering@ascend.com>
24180
24181         * m4/jm-macros.m4 (jm_CHECK_ALL_TYPES): New macro, contains the
24182         superset of the AC_TYPE_* checks in the textutils, fileutils,
24183         and sh-utils, plus AC_TYPE_PID_T.  Paul Eggert suggested adding
24184         AC_TYPE_PID_T.
24185
24186 1999-03-28  Jim Meyering  <meyering@ascend.com>
24187
24188         * m4/jm-macros.m4: Define GNU_PACKAGE here.
24189         Be sure to AC_SUBST it, once again, so that @GNU_PACKAGE@ is
24190         replaced e.g., in the *.sh files of the sh-utils.
24191
24192 1999-03-20  Jim Meyering  <meyering@ascend.com>
24193
24194         * m4/jm-macros.m4: s/jm_WITH_REGEX/jm_INCLUDED_REGEX/.
24195         * m4/regex.m4 (jm_INCLUDED_REGEX): Rename from jm_WITH_REGEX.
24196         Don't depend on AM_GLIBC.  Suggestions from Alain Magloire.
24197
24198 1999-03-19  Jim Meyering  <meyering@ascend.com>
24199
24200         * m4/jm-winsz1.m4 (jm_WINSIZE_IN_PTEM): New macro.
24201
24202 1999-03-12  Jim Meyering  <meyering@ascend.com>
24203
24204         * m4/jm-macros.m4: Use AC_FUNC_SETVBUF_REVERSED.
24205
24206 1999-03-07  Jim Meyering  <meyering@ascend.com>
24207
24208         * m4/jm-glibc-io.m4: Use only those *_unlocked macros that are
24209         declared.
24210
24211 1999-02-17  Jim Meyering  <meyering@ascend.com>
24212
24213         * m4/gettext.m4 (AM_GNU_GETTEXT): Do `changequote' around use of
24214         brackets in macro definition.  From Eli Zaretskii and Alain Magloire.
24215
24216 1999-02-07  Jim Meyering  <meyering@ascend.com>
24217
24218         * m4/group-member.m4: New file -- extracted from sh-utils'
24219         configure.in.
24220
24221         1999-02-05  Eli Zaretskii  <eliz@is.elta.co.il>
24222         * m4/gettext.m4: Support DOS-style d:/foo/bar absolute file names.
24223
24224 1999-02-06  Jim Meyering  <meyering@ascend.com>
24225
24226         * m4/chown.m4: Use `AC_SUBST(LIBOBJS)' since we set LIBOBJS.
24227         * m4/fnmatch.m4: Likewise.
24228         * m4/getgroups.m4: Likewise.
24229         * m4/lstat.m4: Likewise.
24230         * m4/malloc.m4: Likewise.
24231         * m4/putenv.m4: Likewise.
24232         * m4/realloc.m4: Likewise.
24233         * m4/regex.m4: Likewise.
24234         * m4/stat.m4: Likewise.
24235         * m4/strftime.m4: Likewise.
24236         Suggestion from Alain Magloire.
24237
24238         * m4/chown.m4: Use `.$ac_objext', not `.o'.
24239         * m4/fnmatch.m4: Likewise.
24240         * m4/getgroups.m4: Likewise.
24241         * m4/getline.m4: Likewise.
24242         * m4/lstat.m4: Likewise.
24243         * m4/malloc.m4: Likewise.
24244         * m4/memcmp.m4: Likewise.
24245         * m4/putenv.m4: Likewise.
24246         * m4/realloc.m4: Likewise.
24247         * m4/regex.m4: Likewise.
24248         * m4/stat.m4: Likewise.
24249         * m4/strftime.m4: Likewise.
24250         Suggestion from Alain Magloire.
24251
24252         * m4/jm-macros.m4: Actually invoke jm_WITH_REGEX now that it requires
24253         an argument.
24254
24255         * m4/regex.m4: Add a run-time Test for proper operation of
24256         re_compile_pattern.
24257
24258 1999-01-31  Jim Meyering  <meyering@ascend.com>
24259
24260         * m4/getloadavg.m4: Check for locale.h and the function, setlocale.
24261
24262 1999-01-30  Jim Meyering  <meyering@ascend.com>
24263
24264         * m4/check-type.m4: Use 3-arg form of AC_DEFINE.
24265
24266         * m4/jm-mktime.m4: Make this a wrapper around the official
24267         AM_FUNC_MKTIME rather than my private copy, now that the official one
24268         is up to date.
24269         * m4/mktime.m4: Remove file.
24270
24271         * m4/getloadavg.m4: Use 3-arg form of AC_DEFINE.
24272         * m4/uptime.m4: Likewise.
24273         * m4/uintmax_t.m4: Likewise.
24274
24275 1999-01-28  Jim Meyering  <meyering@ascend.com>
24276
24277         * m4/jm-macros.m4: Use jm_AFS.
24278         * m4/afs.m4: New file (from fileutils' configure.in).
24279
24280         * m4/assert.m4: Use the 3-argument forms of AC_DEFINE* macros.
24281         * m4/chown.m4: Likewise.
24282         * m4/d-ino.m4: Likewise.
24283         * m4/d-type.m4: Likewise.
24284         * m4/fnmatch.m4: Likewise.
24285         * m4/getgroups.m4: Likewise.
24286         * m4/gettext.m4: Likewise.
24287         * m4/jm-mktime.m4: Likewise.
24288         * m4/jm-winsz2.m4: Likewise.
24289         * m4/lcmessage.m4: Likewise.
24290         * m4/ls-mntd-fs.m4: Likewise.
24291         * m4/malloc.m4: Likewise.
24292         * m4/memcmp.m4: Likewise.
24293         * m4/putenv.m4: Likewise.
24294         * m4/realloc.m4: Likewise.
24295         * m4/st_mtim.m4: Likewise.
24296         * m4/strftime.m4: Likewise.
24297
24298 1999-01-16  Jim Meyering  <meyering@ascend.com>
24299
24300         * m4/jm-macros.m4 (ARGMATCH_DIE): Define.
24301         (ARGMATCH_DIE_DECL): Define.
24302
24303 1999-01-12  Jim Meyering  <meyering@ascend.com>
24304
24305         * m4/Makefile.am.in: Rewrite to avoid using fmt.
24306         Reported by Lars Hecking.
24307
24308 1999-01-10  Jim Meyering  <meyering@ascend.com>
24309
24310         * m4/fstypename.m4: Use the new 3-arg form of AC_DEFINE instead of my
24311         gross kludge.
24312         * m4/inttypes_h.m4: Likewise.
24313         * m4/lstat.m4: Likewise.
24314         * m4/malloc.m4: Likewise.
24315         * m4/readdir.m4: Likewise.
24316         * m4/realloc.m4: Likewise.
24317         * m4/st_dm_mode.m4: Likewise.
24318         * m4/stat.m4: Likewise.
24319         * m4/utimbuf.m4: Likewise.
24320         * m4/utimes.m4: Likewise.
24321
24322         * m4/check-decl.m4: Use the new 3-arg form of AC_DEFINE instead of the
24323         AC_CHECK_FUNCS hack.  Now, it's still a hack, but at least the
24324         comments in config.h.in are meaningful.
24325
24326         * m4/jm-macros.m4: Require autoconf-2.13 here.
24327
24328         * m4/regex.m4: By default, don't use the included regex.c on systems
24329         with glibc 2.  Suggestion from Uli Drepper.
24330
24331 1999-01-02  Jim Meyering  <meyering@ascend.com>
24332
24333         * m4/jm-macros.m4: Replace strcasecmp and strncasecmp.
24334
24335 1998-12-18  Jim Meyering  <meyering@ascend.com>
24336
24337         * m4/Makefile.am.in (Makefile.am): Simplify rule.
24338         Based on a suggestion from Lars Hecking.
24339
24340 1998-11-16  Paul Eggert  <eggert@twinsun.com>
24341
24342         * m4/lfs.m4 (AC_LFS): Add support for HP-UX 10.20 and HP-UX 11.
24343
24344 1998-11-16  Jim Meyering  <meyering@ascend.com>
24345
24346         * m4/lfs.m4: Double-quote the `uname...` expression.
24347
24348 1998-11-14  Jim Meyering  <meyering@ascend.com>
24349
24350         * m4/lstat.m4: Correct comment.  POSIX does not permit it to succeed.
24351         * m4/stat.m4: Likewise.
24352
24353 1998-11-03  Jim Meyering  <meyering@ascend.com>
24354
24355         * m4/stat.m4: Rewrite to set HAVE_STAT_EMPTY_STRING_BUG.
24356         * m4/lstat.m4: Rewrite to set HAVE_LSTAT_EMPTY_STRING_BUG.
24357
24358 1998-10-18  Jim Meyering  <meyering@ascend.com>
24359
24360         * m4/check-decl.m4 (jm_CHECK_DECL_LOCALTIME_R): Remove macro.
24361
24362 1998-10-17  Jim Meyering  <meyering@ascend.com>
24363
24364         * m4/decl.m4 (jm_CHECK_DECLARATION): Don't hard-code which headers to
24365         include, though we still hard-code the `require'-like AC_CHECK_HEADERS
24366         calls for those previously hard-coded headers.  Instead, take a new
24367         parameter.
24368         (jm_CHECK_DECLARATIONS): Reflect interface change.
24369         * m4/check-decl.m4 (jm_CHECK_DECLS): Likewise.
24370         (jm_CHECK_DECL_LOCALTIME_R): New macro.
24371
24372         * m4/mktime.m4: Test for spring-forward gap before long-running test.
24373
24374 1998-10-14  Jim Meyering  <meyering@ascend.com>
24375
24376         * m4/mktime.m4: Use the more portable "TZ=PST8PDT,M4.1.0,M10.5.0"
24377         instead of "TZ=America/Vancouver".  From Paul Eggert.
24378
24379 1998-10-11  Jim Meyering  <meyering@ascend.com>
24380
24381         * m4/mktime.m4 (jm_AM_FUNC_MKTIME): New file and macro.
24382         This adds a test for a recently added compatibility fix for mktime.c.
24383         * m4/jm-mktime.m4: Require jm_AM_FUNC_MKTIME, not AM_FUNC_MKTIME.
24384
24385 1998-09-27  Jim Meyering  <meyering@ascend.com>
24386
24387         * m4/jm-macros.m4 (jm_MACROS): Require jm_FUNC_FNMATCH.
24388
24389         * m4/fnmatch.m4 (jm_FUNC_FNMATCH): New file/macro.  Extracted from
24390         ../configure.in, including a change from Gordon Matzigkeit to allow
24391         cross-compiling for the Hurd.
24392
24393         * m4/glibc.m4: New file/macro to test for the GNU C Library
24394         versions 1 and 2.  From Gordon Matzigkeit.
24395         Indent.
24396
24397 1998-09-21  Jim Meyering  <meyering@ascend.com>
24398
24399         * m4/chown.m4: Declare locals: before, after.  From Andries Brouwer.
24400
24401 1998-08-18  Paul Eggert  <eggert@twinsun.com>
24402
24403         Port nanosecond-resolution times to UnixWare 2.1.2 and
24404         pedantic Solaris 2.6.
24405
24406         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC): Renamed from
24407         AC_STRUCT_ST_MTIM.
24408         * m4/st_mtim.m4 (AC_STRUCT_ST_MTIM_NSEC):
24409         Generate name of ns member, instead of just 1 or undef.
24410         Allow for UnixWare 2.1.2 and Solaris 2.6 if in pedantic mode.
24411
24412 1998-08-15  Jim Meyering  <meyering@ascend.com>
24413
24414         * m4/ssize_t.m4 (jm_TYPE_SSIZE_T): Remove file.
24415         * m4/check-type.m4: New file.  Replacement for AC_CHECK_TYPE.
24416         * m4/jm-macros.m4: Use the new AC_CHECK_TYPE(ssize_t, int)
24417         instead of jm_TYPE_SSIZE_T.
24418
24419 1998-08-12  Jim Meyering  <meyering@ascend.com>
24420
24421         * m4/st_dm_mode.m4: New file.  From Johan Danielsson.
24422
24423 1998-08-02  Jim Meyering  <meyering@ascend.com>
24424
24425         * m4/st_mtim.m4: Use hack to avoid having to put #undef HAVE_ST_MTIM
24426         in acconfig.h manually.
24427
24428 1998-07-31  Paul Eggert  <eggert@twinsun.com>
24429
24430         * m4/st_mtim.m4: New file.
24431
24432 1998-07-28  Jim Meyering  <meyering@ascend.com>
24433
24434         * m4/utimes.m4: Undef stat.
24435
24436 1998-07-25  Jim Meyering  <meyering@ascend.com>
24437
24438         * m4/utime.m4 (jm_FUNC_UTIME): New file and macro.
24439         * m4/utimes.m4 (jm_FUNC_UTIMES_NULL): New file and macro.
24440
24441 1998-07-09  Manfred Hollstein  <manfred@s-direktnet.de>
24442
24443         * m4/chown.m4 (jm_FUNC_CHOWN): Add a check to verify that the
24444         uid and gid actually remain unchanged.
24445
24446 1998-07-07  Jim Meyering  <meyering@ascend.com>
24447
24448         * m4/jm-glibc-io.m4: Remove fclose_unlocked.
24449
24450 1998-07-04  Jim Meyering  <meyering@ascend.com>
24451
24452         * m4/regex.m4: Use syscmd, ifelse, and sysval.  Mainly as an exercise
24453         to prove that this macro can be used in packages without regex.c.
24454
24455 1998-07-04  Andreas Schwab  <schwab@issan.informatik.uni-dortmund.de>
24456
24457         * m4/gettext.m4 (AM_WITH_NLS): Remove intl/libintl.h if <libintl.h>
24458         is to be used.
24459
24460 1998-07-03  Jim Meyering  <meyering@ascend.com>
24461
24462         * m4/gettext.m4: Add -lintl if it's found to be necessary.
24463
24464         * m4/gettext.m4: New file -- from gettext-0.10.35.
24465         * m4/lcmessage.m4: Likewise.
24466         * m4/progtest.m4: Likewise.
24467
24468         * m4/regex.m4 (jm_WITH_REGEX): New file and macro.
24469         * m4/jm-macros.m4: Require the new macro.
24470
24471 1998-06-29  Jim Meyering  <meyering@ascend.com>
24472
24473         * m4/fstypename.m4: Include sys/param.h.  NetBSD 1.3.1 requires this
24474         for the definition of NGROUPS (used in a system header included
24475         by sys/mount.h).
24476
24477 1998-06-28  Jim Meyering  <meyering@ascend.com>
24478
24479         * m4/ls-mntd-fs.m4: New file.
24480         * m4/fstypename.m4: New file.
24481
24482         * m4/jm-macros.m4: Require the new macro.
24483         * m4/jm-glibc-io.m4: New file.
24484
24485 1998-05-19  Jim Meyering  <meyering@ascend.com>
24486
24487         * m4/jm-macros.m4: Add jm_FUNC_LCHOWN.
24488         * m4/lchown.m4: New file.
24489
24490         * m4/Makefile.am.in: New file.
24491         * m4/Makefile.am (Makefile.am): Depend on Makefile.am.in.
24492
24493 1998-05-14  Jim Meyering  <meyering@ascend.com>
24494
24495         * m4/Makefile.am (EXTRA_DIST): Add them.
24496         * m4/jm-macros.m4: New file.
24497         * m4/utimbuf.m4: New file.
24498
24499 1998-05-12  Jim Meyering  <meyering@ascend.com>
24500
24501         * m4/Makefile.am (EXTRA_DIST): Add isc-posix.m4.
24502
24503 1998-05-11  Jim Meyering  <meyering@ascend.com>
24504
24505         * m4/isc-posix.m4: New file.
24506
24507 1998-05-10  Jim Meyering  <meyering@ascend.com>
24508
24509         * m4/jm-mktime.m4: Use AM_FUNC_MKTIME, now that it's up to date.
24510
24511 1998-05-09  Jim Meyering  <meyering@ascend.com>
24512
24513         * m4/Makefile.am (EXTRA_DIST): Add ssize_t.m4.
24514         (EXTRA_DIST): Remove mktime.m4, now that the new version is included
24515         with automake.
24516
24517         * m4/ssize_t.m4: New file.
24518         * m4/mktime.m4: Remove file -- the new automake has this now.
24519
24520 1998-04-26  Jim Meyering  <meyering@ascend.com>
24521
24522         * m4/assert.m4: New file.
24523         * m4/Makefile.am (EXTRA_DIST): Add assert.m4.
24524
24525 1998-04-05  Jim Meyering  <meyering@ascend.com>
24526
24527         * m4/prereq.m4 (jm_PREREQ_REGEX): New macro.
24528         (jm_PREREQ): Use it here.
24529
24530 1998-03-23  Jim Meyering  <meyering@eng.ascend.com>
24531
24532         * m4/inttypes_h.m4: Kludges so I don't have to add HAVE_INTTYPES_H
24533         in acconfig.h.
24534
24535 1998-03-15  Jim Meyering  <meyering@eng.ascend.com>
24536
24537         * m4/prereq.m4: New file.
24538         * m4/error.m4: New file.
24539         * m4/Makefile.am (EXTRA_DIST): Add error.m4 and prereq.m4.
24540
24541 1998-02-07  Jim Meyering  <meyering@eng.ascend.com>
24542
24543         * m4/getline.m4: Don't set am_cv_func_working_getline before the
24544         cache-check for the same variable -- that defeated the purpose of
24545         the test; the test program was never run.  This was a problem only
24546         on systems with losing getline functions -- HP-UX 10.20 is one.
24547         Reported by Bjorn Helgaas.
24548
24549 1998-02-06  Jim Meyering  <meyering@eng.ascend.com>
24550
24551         * m4/Makefile.am (EXTRA_DIST): Add perl.m4.
24552
24553 1998-01-10  Jim Meyering  <meyering@na-net.ornl.gov>
24554
24555         * m4/Makefile.am (EXTRA_DIST): Add const.m4.
24556
24557         * m4/const.m4: New file.  Use an initializer in this declaration
24558         typedef int charset[2]; const charset x;
24559         Reported by Bob Glickstein.
24560
24561 1997-12-21  Jim Meyering  <meyering@na-net.ornl.gov>
24562
24563         * m4/chown.m4: Fix reversed types on -1 args to chown.
24564         From Kaveh Ghazi.
24565
24566 1997-12-14  Jim Meyering  <meyering@na-net.ornl.gov>
24567
24568         * m4/check-decl.m4: s/DECLARATION_/DECL_/g.
24569         Add lseek and memchr.
24570
24571         * m4/decl.m4: s/HAVE_DECLARATION_/HAVE_DECL_/g.
24572         T.E.Dickey <dickey@clark.net> said that some older preprocessors
24573         have a 20-character limit on names.
24574
24575 1997-11-30  Jim Meyering  <meyering@na-net.ornl.gov>
24576
24577         * m4/inttypes_h.m4: New file.
24578         * m4/uintmax_t.m4: New file.
24579         * m4/Makefile.am (EXTRA_DIST): Add inttypes_h.m4 and uintmax_t.m4.
24580
24581 Copyright (C) 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
24582   Free Software Foundation, Inc.
24583 Copying and distribution of this file, with or without modification,
24584 are permitted provided the copyright notice and this notice are preserved.